From 55d7cf17b695814fd80b83a3e54dc9e36ca7584c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 22 Nov 2022 17:23:31 +0000
Subject: [PATCH 001/531] Bump pytest from 7.1.3 to 7.2.0

Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.3 to 7.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.3...7.2.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 poetry.lock    | 45 ++++++++++++++++++++++++---------------------
 pyproject.toml |  2 +-
 2 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 02ea4e95..64ff3adf 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -10,7 +10,7 @@ python-versions = ">=3.5"
 dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"]
 docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
 tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"]
-tests_no_zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
+tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
 
 [[package]]
 name = "black"
@@ -77,6 +77,17 @@ tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.1
 [package.extras]
 toml = ["tomli"]
 
+[[package]]
+name = "exceptiongroup"
+version = "1.0.4"
+description = "Backport of PEP 654 (exception groups)"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+
+[package.extras]
+test = ["pytest (>=6)"]
+
 [[package]]
 name = "flake8"
 version = "5.0.4"
@@ -125,9 +136,9 @@ python-versions = ">=3.6.1,<4.0"
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
-pipfile_deprecated_finder = ["pipreqs", "requirementslib"]
+pipfile-deprecated-finder = ["pipreqs", "requirementslib"]
 plugins = ["setuptools"]
-requirements_deprecated_finder = ["pip-api", "pipreqs"]
+requirements-deprecated-finder = ["pip-api", "pipreqs"]
 
 [[package]]
 name = "mccabe"
@@ -191,14 +202,6 @@ importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
 dev = ["pre-commit", "tox"]
 testing = ["pytest", "pytest-benchmark"]
 
-[[package]]
-name = "py"
-version = "1.11.0"
-description = "library with cross-python path, ini-parsing, io, code, log facilities"
-category = "dev"
-optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
-
 [[package]]
 name = "py4j"
 version = "0.10.9"
@@ -252,7 +255,7 @@ sql = ["pandas (>=0.23.2)", "pyarrow (>=1.0.0)"]
 
 [[package]]
 name = "pytest"
-version = "7.1.3"
+version = "7.2.0"
 description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
@@ -261,12 +264,12 @@ python-versions = ">=3.7"
 [package.dependencies]
 attrs = ">=19.2.0"
 colorama = {version = "*", markers = "sys_platform == \"win32\""}
+exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
 importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
 iniconfig = "*"
 packaging = "*"
 pluggy = ">=0.12,<2.0"
-py = ">=1.8.2"
-tomli = ">=1.0.0"
+tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
 
 [package.extras]
 testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
@@ -359,7 +362,7 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
 [metadata]
 lock-version = "1.1"
 python-versions = "^3.7"
-content-hash = "cbe589cfd5291a03b44f734062f65ce7b45a4288015a5c6f31fccc611f79986b"
+content-hash = "861cbc85675fe9efd472f5276b4451e2ed4a20398e80d94d13214a751437b620"
 
 [metadata.files]
 attrs = [
@@ -453,6 +456,10 @@ coverage = [
     {file = "coverage-6.5.0-pp36.pp37.pp38-none-any.whl", hash = "sha256:1431986dac3923c5945271f169f59c45b8802a114c8f548d611f2015133df77a"},
     {file = "coverage-6.5.0.tar.gz", hash = "sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84"},
 ]
+exceptiongroup = [
+    {file = "exceptiongroup-1.0.4-py3-none-any.whl", hash = "sha256:542adf9dea4055530d6e1279602fa5cb11dab2395fa650b8674eaec35fc4a828"},
+    {file = "exceptiongroup-1.0.4.tar.gz", hash = "sha256:bd14967b79cd9bdb54d97323216f8fdf533e278df937aa2a90089e7d6e06e5ec"},
+]
 flake8 = [
     {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
     {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
@@ -493,10 +500,6 @@ pluggy = [
     {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
     {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
 ]
-py = [
-    {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"},
-    {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"},
-]
 py4j = [
     {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
     {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
@@ -517,8 +520,8 @@ pyspark = [
     {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
 ]
 pytest = [
-    {file = "pytest-7.1.3-py3-none-any.whl", hash = "sha256:1377bda3466d70b55e3f5cecfa55bb7cfcf219c7964629b967c37cf0bda818b7"},
-    {file = "pytest-7.1.3.tar.gz", hash = "sha256:4f365fec2dff9c1162f834d9f18af1ba13062db0c708bf7b946f8a5c76180c39"},
+    {file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"},
+    {file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"},
 ]
 pytest-cov = [
     {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
diff --git a/pyproject.toml b/pyproject.toml
index dc51727a..3ee2f58e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -10,7 +10,7 @@ python = "^3.7"
 pyspark = "3.1.1"
 
 [tool.poetry.dev-dependencies]
-pytest = "^7.1.2"
+pytest = "^7.2.0"
 black = "^22.10"
 isort = "^5.10.1"
 flake8 = "^5.0.4"

From 7039d07d4315ed3e43b1a215aa9734624d990b10 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 29 Nov 2022 12:48:19 +0000
Subject: [PATCH 002/531] More updates

---
 poetry.lock | 286 ++++++++++------------------------------------------
 1 file changed, 53 insertions(+), 233 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 64ff3adf..12654111 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -7,10 +7,10 @@ optional = false
 python-versions = ">=3.5"
 
 [package.extras]
-dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"]
-docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
-tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"]
-tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
+dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"]
+docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
+tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"]
+tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"]
 
 [[package]]
 name = "black"
@@ -57,11 +57,11 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""}
 
 [[package]]
 name = "colorama"
-version = "0.4.5"
+version = "0.4.6"
 description = "Cross-platform colored terminal text."
 category = "dev"
 optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
 
 [[package]]
 name = "coverage"
@@ -115,8 +115,8 @@ typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""}
 zipp = ">=0.5"
 
 [package.extras]
-docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"]
-testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517", "pyfakefs", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"]
+docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"]
+testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"]
 
 [[package]]
 name = "iniconfig"
@@ -135,10 +135,10 @@ optional = false
 python-versions = ">=3.6.1,<4.0"
 
 [package.extras]
+pipfile_deprecated_finder = ["pipreqs", "requirementslib"]
+requirements_deprecated_finder = ["pipreqs", "pip-api"]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
-pipfile-deprecated-finder = ["pipreqs", "requirementslib"]
 plugins = ["setuptools"]
-requirements-deprecated-finder = ["pip-api", "pipreqs"]
 
 [[package]]
 name = "mccabe"
@@ -169,7 +169,7 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
 
 [[package]]
 name = "pathspec"
-version = "0.10.1"
+version = "0.10.2"
 description = "Utility library for gitignore style pattern matching of file paths."
 category = "dev"
 optional = false
@@ -177,15 +177,15 @@ python-versions = ">=3.7"
 
 [[package]]
 name = "platformdirs"
-version = "2.5.2"
-description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
+version = "2.5.4"
+description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 
 [package.extras]
-docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx (>=4)", "sphinx-autodoc-typehints (>=1.12)"]
-test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"]
+docs = ["furo (>=2022.9.29)", "proselint (>=0.13)", "sphinx-autodoc-typehints (>=1.19.4)", "sphinx (>=5.3)"]
+test = ["appdirs (==1.4.4)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest (>=7.2)"]
 
 [[package]]
 name = "pluggy"
@@ -199,8 +199,8 @@ python-versions = ">=3.6"
 importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
 
 [package.extras]
-dev = ["pre-commit", "tox"]
-testing = ["pytest", "pytest-benchmark"]
+testing = ["pytest-benchmark", "pytest"]
+dev = ["tox", "pre-commit"]
 
 [[package]]
 name = "py4j"
@@ -235,7 +235,7 @@ optional = false
 python-versions = ">=3.6.8"
 
 [package.extras]
-diagrams = ["jinja2", "railroad-diagrams"]
+diagrams = ["railroad-diagrams", "jinja2"]
 
 [[package]]
 name = "pyspark"
@@ -287,7 +287,7 @@ coverage = {version = ">=5.2.1", extras = ["toml"]}
 pytest = ">=4.6"
 
 [package.extras]
-testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"]
+testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"]
 
 [[package]]
 name = "pytest-dependency"
@@ -349,15 +349,15 @@ python-versions = ">=3.7"
 
 [[package]]
 name = "zipp"
-version = "3.9.0"
+version = "3.11.0"
 description = "Backport of pathlib-compatible object wrapper for zip files"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 
 [package.extras]
-docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
-testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
+docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"]
+testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "jaraco.functools", "more-itertools", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"]
 
 [metadata]
 lock-version = "1.1"
@@ -365,214 +365,34 @@ python-versions = "^3.7"
 content-hash = "861cbc85675fe9efd472f5276b4451e2ed4a20398e80d94d13214a751437b620"
 
 [metadata.files]
-attrs = [
-    {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"},
-    {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"},
-]
-black = [
-    {file = "black-22.10.0-1fixedarch-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:5cc42ca67989e9c3cf859e84c2bf014f6633db63d1cbdf8fdb666dcd9e77e3fa"},
-    {file = "black-22.10.0-1fixedarch-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:5d8f74030e67087b219b032aa33a919fae8806d49c867846bfacde57f43972ef"},
-    {file = "black-22.10.0-1fixedarch-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:197df8509263b0b8614e1df1756b1dd41be6738eed2ba9e9769f3880c2b9d7b6"},
-    {file = "black-22.10.0-1fixedarch-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:2644b5d63633702bc2c5f3754b1b475378fbbfb481f62319388235d0cd104c2d"},
-    {file = "black-22.10.0-1fixedarch-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:e41a86c6c650bcecc6633ee3180d80a025db041a8e2398dcc059b3afa8382cd4"},
-    {file = "black-22.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2039230db3c6c639bd84efe3292ec7b06e9214a2992cd9beb293d639c6402edb"},
-    {file = "black-22.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ff67aec0a47c424bc99b71005202045dc09270da44a27848d534600ac64fc7"},
-    {file = "black-22.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:819dc789f4498ecc91438a7de64427c73b45035e2e3680c92e18795a839ebb66"},
-    {file = "black-22.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b9b29da4f564ba8787c119f37d174f2b69cdfdf9015b7d8c5c16121ddc054ae"},
-    {file = "black-22.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b49776299fece66bffaafe357d929ca9451450f5466e997a7285ab0fe28e3b"},
-    {file = "black-22.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:21199526696b8f09c3997e2b4db8d0b108d801a348414264d2eb8eb2532e540d"},
-    {file = "black-22.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e464456d24e23d11fced2bc8c47ef66d471f845c7b7a42f3bd77bf3d1789650"},
-    {file = "black-22.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:9311e99228ae10023300ecac05be5a296f60d2fd10fff31cf5c1fa4ca4b1988d"},
-    {file = "black-22.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fba8a281e570adafb79f7755ac8721b6cf1bbf691186a287e990c7929c7692ff"},
-    {file = "black-22.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:915ace4ff03fdfff953962fa672d44be269deb2eaf88499a0f8805221bc68c87"},
-    {file = "black-22.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:444ebfb4e441254e87bad00c661fe32df9969b2bf224373a448d8aca2132b395"},
-    {file = "black-22.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:974308c58d057a651d182208a484ce80a26dac0caef2895836a92dd6ebd725e0"},
-    {file = "black-22.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72ef3925f30e12a184889aac03d77d031056860ccae8a1e519f6cbb742736383"},
-    {file = "black-22.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:432247333090c8c5366e69627ccb363bc58514ae3e63f7fc75c54b1ea80fa7de"},
-    {file = "black-22.10.0-py3-none-any.whl", hash = "sha256:c957b2b4ea88587b46cf49d1dc17681c1e672864fd7af32fc1e9664d572b3458"},
-    {file = "black-22.10.0.tar.gz", hash = "sha256:f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1"},
-]
-chispa = [
-    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
-    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
-]
-click = [
-    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
-    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
-]
-colorama = [
-    {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"},
-    {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"},
-]
-coverage = [
-    {file = "coverage-6.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef8674b0ee8cc11e2d574e3e2998aea5df5ab242e012286824ea3c6970580e53"},
-    {file = "coverage-6.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:784f53ebc9f3fd0e2a3f6a78b2be1bd1f5575d7863e10c6e12504f240fd06660"},
-    {file = "coverage-6.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4a5be1748d538a710f87542f22c2cad22f80545a847ad91ce45e77417293eb4"},
-    {file = "coverage-6.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:83516205e254a0cb77d2d7bb3632ee019d93d9f4005de31dca0a8c3667d5bc04"},
-    {file = "coverage-6.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af4fffaffc4067232253715065e30c5a7ec6faac36f8fc8d6f64263b15f74db0"},
-    {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:97117225cdd992a9c2a5515db1f66b59db634f59d0679ca1fa3fe8da32749cae"},
-    {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a1170fa54185845505fbfa672f1c1ab175446c887cce8212c44149581cf2d466"},
-    {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:11b990d520ea75e7ee8dcab5bc908072aaada194a794db9f6d7d5cfd19661e5a"},
-    {file = "coverage-6.5.0-cp310-cp310-win32.whl", hash = "sha256:5dbec3b9095749390c09ab7c89d314727f18800060d8d24e87f01fb9cfb40b32"},
-    {file = "coverage-6.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:59f53f1dc5b656cafb1badd0feb428c1e7bc19b867479ff72f7a9dd9b479f10e"},
-    {file = "coverage-6.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4a5375e28c5191ac38cca59b38edd33ef4cc914732c916f2929029b4bfb50795"},
-    {file = "coverage-6.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4ed2820d919351f4167e52425e096af41bfabacb1857186c1ea32ff9983ed75"},
-    {file = "coverage-6.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:33a7da4376d5977fbf0a8ed91c4dffaaa8dbf0ddbf4c8eea500a2486d8bc4d7b"},
-    {file = "coverage-6.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8fb6cf131ac4070c9c5a3e21de0f7dc5a0fbe8bc77c9456ced896c12fcdad91"},
-    {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a6b7d95969b8845250586f269e81e5dfdd8ff828ddeb8567a4a2eaa7313460c4"},
-    {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:1ef221513e6f68b69ee9e159506d583d31aa3567e0ae84eaad9d6ec1107dddaa"},
-    {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cca4435eebea7962a52bdb216dec27215d0df64cf27fc1dd538415f5d2b9da6b"},
-    {file = "coverage-6.5.0-cp311-cp311-win32.whl", hash = "sha256:98e8a10b7a314f454d9eff4216a9a94d143a7ee65018dd12442e898ee2310578"},
-    {file = "coverage-6.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:bc8ef5e043a2af066fa8cbfc6e708d58017024dc4345a1f9757b329a249f041b"},
-    {file = "coverage-6.5.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4433b90fae13f86fafff0b326453dd42fc9a639a0d9e4eec4d366436d1a41b6d"},
-    {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4f05d88d9a80ad3cac6244d36dd89a3c00abc16371769f1340101d3cb899fc3"},
-    {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:94e2565443291bd778421856bc975d351738963071e9b8839ca1fc08b42d4bef"},
-    {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:027018943386e7b942fa832372ebc120155fd970837489896099f5cfa2890f79"},
-    {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:255758a1e3b61db372ec2736c8e2a1fdfaf563977eedbdf131de003ca5779b7d"},
-    {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:851cf4ff24062c6aec510a454b2584f6e998cada52d4cb58c5e233d07172e50c"},
-    {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:12adf310e4aafddc58afdb04d686795f33f4d7a6fa67a7a9d4ce7d6ae24d949f"},
-    {file = "coverage-6.5.0-cp37-cp37m-win32.whl", hash = "sha256:b5604380f3415ba69de87a289a2b56687faa4fe04dbee0754bfcae433489316b"},
-    {file = "coverage-6.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:4a8dbc1f0fbb2ae3de73eb0bdbb914180c7abfbf258e90b311dcd4f585d44bd2"},
-    {file = "coverage-6.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d900bb429fdfd7f511f868cedd03a6bbb142f3f9118c09b99ef8dc9bf9643c3c"},
-    {file = "coverage-6.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2198ea6fc548de52adc826f62cb18554caedfb1d26548c1b7c88d8f7faa8f6ba"},
-    {file = "coverage-6.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c4459b3de97b75e3bd6b7d4b7f0db13f17f504f3d13e2a7c623786289dd670e"},
-    {file = "coverage-6.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:20c8ac5386253717e5ccc827caad43ed66fea0efe255727b1053a8154d952398"},
-    {file = "coverage-6.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b07130585d54fe8dff3d97b93b0e20290de974dc8177c320aeaf23459219c0b"},
-    {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dbdb91cd8c048c2b09eb17713b0c12a54fbd587d79adcebad543bc0cd9a3410b"},
-    {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:de3001a203182842a4630e7b8d1a2c7c07ec1b45d3084a83d5d227a3806f530f"},
-    {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e07f4a4a9b41583d6eabec04f8b68076ab3cd44c20bd29332c6572dda36f372e"},
-    {file = "coverage-6.5.0-cp38-cp38-win32.whl", hash = "sha256:6d4817234349a80dbf03640cec6109cd90cba068330703fa65ddf56b60223a6d"},
-    {file = "coverage-6.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:7ccf362abd726b0410bf8911c31fbf97f09f8f1061f8c1cf03dfc4b6372848f6"},
-    {file = "coverage-6.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:633713d70ad6bfc49b34ead4060531658dc6dfc9b3eb7d8a716d5873377ab745"},
-    {file = "coverage-6.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:95203854f974e07af96358c0b261f1048d8e1083f2de9b1c565e1be4a3a48cfc"},
-    {file = "coverage-6.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9023e237f4c02ff739581ef35969c3739445fb059b060ca51771e69101efffe"},
-    {file = "coverage-6.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:265de0fa6778d07de30bcf4d9dc471c3dc4314a23a3c6603d356a3c9abc2dfcf"},
-    {file = "coverage-6.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f830ed581b45b82451a40faabb89c84e1a998124ee4212d440e9c6cf70083e5"},
-    {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7b6be138d61e458e18d8e6ddcddd36dd96215edfe5f1168de0b1b32635839b62"},
-    {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:42eafe6778551cf006a7c43153af1211c3aaab658d4d66fa5fcc021613d02518"},
-    {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:723e8130d4ecc8f56e9a611e73b31219595baa3bb252d539206f7bbbab6ffc1f"},
-    {file = "coverage-6.5.0-cp39-cp39-win32.whl", hash = "sha256:d9ecf0829c6a62b9b573c7bb6d4dcd6ba8b6f80be9ba4fc7ed50bf4ac9aecd72"},
-    {file = "coverage-6.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987"},
-    {file = "coverage-6.5.0-pp36.pp37.pp38-none-any.whl", hash = "sha256:1431986dac3923c5945271f169f59c45b8802a114c8f548d611f2015133df77a"},
-    {file = "coverage-6.5.0.tar.gz", hash = "sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84"},
-]
-exceptiongroup = [
-    {file = "exceptiongroup-1.0.4-py3-none-any.whl", hash = "sha256:542adf9dea4055530d6e1279602fa5cb11dab2395fa650b8674eaec35fc4a828"},
-    {file = "exceptiongroup-1.0.4.tar.gz", hash = "sha256:bd14967b79cd9bdb54d97323216f8fdf533e278df937aa2a90089e7d6e06e5ec"},
-]
-flake8 = [
-    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
-    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
-]
-importlib-metadata = [
-    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
-    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
-]
-iniconfig = [
-    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
-    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
-]
-isort = [
-    {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"},
-    {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"},
-]
-mccabe = [
-    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
-    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
-]
-mypy-extensions = [
-    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
-    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
-]
-packaging = [
-    {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"},
-    {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"},
-]
-pathspec = [
-    {file = "pathspec-0.10.1-py3-none-any.whl", hash = "sha256:46846318467efc4556ccfd27816e004270a9eeeeb4d062ce5e6fc7a87c573f93"},
-    {file = "pathspec-0.10.1.tar.gz", hash = "sha256:7ace6161b621d31e7902eb6b5ae148d12cfd23f4a249b9ffb6b9fee12084323d"},
-]
-platformdirs = [
-    {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"},
-    {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"},
-]
-pluggy = [
-    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
-    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
-]
-py4j = [
-    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
-    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
-]
-pycodestyle = [
-    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
-    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
-]
-pyflakes = [
-    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
-    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
-]
-pyparsing = [
-    {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"},
-    {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"},
-]
-pyspark = [
-    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
-]
-pytest = [
-    {file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"},
-    {file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"},
-]
-pytest-cov = [
-    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
-    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
-]
-pytest-dependency = [
-    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
-]
-pytest-tap = [
-    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
-    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
-]
-"tap.py" = [
-    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
-    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
-]
-tomli = [
-    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
-    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
-]
-typed-ast = [
-    {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"},
-    {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"},
-    {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"},
-    {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c542eeda69212fa10a7ada75e668876fdec5f856cd3d06829e6aa64ad17c8dfe"},
-    {file = "typed_ast-1.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:a9916d2bb8865f973824fb47436fa45e1ebf2efd920f2b9f99342cb7fab93f72"},
-    {file = "typed_ast-1.5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:79b1e0869db7c830ba6a981d58711c88b6677506e648496b1f64ac7d15633aec"},
-    {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a94d55d142c9265f4ea46fab70977a1944ecae359ae867397757d836ea5a3f47"},
-    {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:183afdf0ec5b1b211724dfef3d2cad2d767cbefac291f24d69b00546c1837fb6"},
-    {file = "typed_ast-1.5.4-cp36-cp36m-win_amd64.whl", hash = "sha256:639c5f0b21776605dd6c9dbe592d5228f021404dafd377e2b7ac046b0349b1a1"},
-    {file = "typed_ast-1.5.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cf4afcfac006ece570e32d6fa90ab74a17245b83dfd6655a6f68568098345ff6"},
-    {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed855bbe3eb3715fca349c80174cfcfd699c2f9de574d40527b8429acae23a66"},
-    {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6778e1b2f81dfc7bc58e4b259363b83d2e509a65198e85d5700dfae4c6c8ff1c"},
-    {file = "typed_ast-1.5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:0261195c2062caf107831e92a76764c81227dae162c4f75192c0d489faf751a2"},
-    {file = "typed_ast-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2efae9db7a8c05ad5547d522e7dbe62c83d838d3906a3716d1478b6c1d61388d"},
-    {file = "typed_ast-1.5.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7d5d014b7daa8b0bf2eaef684295acae12b036d79f54178b92a2b6a56f92278f"},
-    {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:370788a63915e82fd6f212865a596a0fefcbb7d408bbbb13dea723d971ed8bdc"},
-    {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4e964b4ff86550a7a7d56345c7864b18f403f5bd7380edf44a3c1fb4ee7ac6c6"},
-    {file = "typed_ast-1.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:683407d92dc953c8a7347119596f0b0e6c55eb98ebebd9b23437501b28dcbb8e"},
-    {file = "typed_ast-1.5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4879da6c9b73443f97e731b617184a596ac1235fe91f98d279a7af36c796da35"},
-    {file = "typed_ast-1.5.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3e123d878ba170397916557d31c8f589951e353cc95fb7f24f6bb69adc1a8a97"},
-    {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebd9d7f80ccf7a82ac5f88c521115cc55d84e35bf8b446fcd7836eb6b98929a3"},
-    {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98f80dee3c03455e92796b58b98ff6ca0b2a6f652120c263efdba4d6c5e58f72"},
-    {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"},
-    {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"},
-]
-typing-extensions = [
-    {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"},
-    {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"},
-]
-zipp = [
-    {file = "zipp-3.9.0-py3-none-any.whl", hash = "sha256:972cfa31bc2fedd3fa838a51e9bc7e64b7fb725a8c00e7431554311f180e9980"},
-    {file = "zipp-3.9.0.tar.gz", hash = "sha256:3a7af91c3db40ec72dd9d154ae18e008c69efe8ca88dde4f9a731bb82fe2f9eb"},
-]
+attrs = []
+black = []
+chispa = []
+click = []
+colorama = []
+coverage = []
+exceptiongroup = []
+flake8 = []
+importlib-metadata = []
+iniconfig = []
+isort = []
+mccabe = []
+mypy-extensions = []
+packaging = []
+pathspec = []
+platformdirs = []
+pluggy = []
+py4j = []
+pycodestyle = []
+pyflakes = []
+pyparsing = []
+pyspark = []
+pytest = []
+pytest-cov = []
+pytest-dependency = []
+pytest-tap = []
+"tap.py" = []
+tomli = []
+typed-ast = []
+typing-extensions = []
+zipp = []

From 60a413242e615e222a7a1df770160d241fcbcbe7 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Tue, 29 Nov 2022 12:57:43 +0000
Subject: [PATCH 003/531] Create CHANGELOG.md

---
 CHANGELOG.md | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 CHANGELOG.md

diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 00000000..0a05f3fe
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,9 @@
+
+# Change Log
+
+## [9.0.0] - 2022-11-29
+  
+Here we would have the update steps for 1.2.4 for people to follow.
+ 
+### Changed
+ - All three methods are now using arbitrary precision for calculations rather than floating point.

From b446c2a012a13aef9342981c301712dc2ca7caa4 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Tue, 29 Nov 2022 12:59:05 +0000
Subject: [PATCH 004/531] Forgot an element

---
 CHANGELOG.md | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a05f3fe..490fef61 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@
 ## [9.0.0] - 2022-11-29
   
 Here we would have the update steps for 1.2.4 for people to follow.
- 
+
+### Added
+ - Created a changlog to keep track of changes between versions.
+
 ### Changed
  - All three methods are now using arbitrary precision for calculations rather than floating point.

From 23c157258b3393359f71d696ea98301912b9ffe0 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Tue, 29 Nov 2022 13:02:39 +0000
Subject: [PATCH 005/531] Update CHANGELOG.md

---
 CHANGELOG.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 490fef61..9bf2e94c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,8 +2,8 @@
 # Change Log
 
 ## [9.0.0] - 2022-11-29
-  
-Here we would have the update steps for 1.2.4 for people to follow.
+
+To update to this version, data passed to the methods will need to be of a decimal type and not of a float type.
 
 ### Added
  - Created a changlog to keep track of changes between versions.

From 4d1e44beec800fb02c35dcec3d29f72e9c356e0a Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Tue, 29 Nov 2022 13:05:00 +0000
Subject: [PATCH 006/531] Update CHANGELOG.md

---
 CHANGELOG.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9bf2e94c..78f1bf27 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,7 @@
 
 ## [9.0.0] - 2022-11-29
 
-To update to this version, data passed to the methods will need to be of a decimal type and not of a float type.
+To update to this version, dataframes passed to the methods will need to change all float type columns to be decimal type columns.
 
 ### Added
  - Created a changlog to keep track of changes between versions.

From a253ea2d3e7c5e41a1a31eda52a1993911d66f2e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 29 Nov 2022 13:31:30 +0000
Subject: [PATCH 007/531] Migrate change log to release notes for more user
 focus

---
 CHANGELOG.md                | 12 ------------
 docs/release-notes/9.0.0.md | 21 +++++++++++++++++++++
 2 files changed, 21 insertions(+), 12 deletions(-)
 delete mode 100644 CHANGELOG.md
 create mode 100644 docs/release-notes/9.0.0.md

diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 78f1bf27..00000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# Change Log
-
-## [9.0.0] - 2022-11-29
-
-To update to this version, dataframes passed to the methods will need to change all float type columns to be decimal type columns.
-
-### Added
- - Created a changlog to keep track of changes between versions.
-
-### Changed
- - All three methods are now using arbitrary precision for calculations rather than floating point.
diff --git a/docs/release-notes/9.0.0.md b/docs/release-notes/9.0.0.md
new file mode 100644
index 00000000..86f9c41d
--- /dev/null
+++ b/docs/release-notes/9.0.0.md
@@ -0,0 +1,21 @@
+# Statistical methods Library 9.0.0
+
+Release date: 2022-11-29
+
+## Synopsis
+
+This release addresses various floating point accuracy issues by switching
+to the Pyspark Decimal type for all calculations where such issues may
+occur.
+
+## Changes
+
+All methods now expect columns which were previously double precision to be
+of type decimal and uses this type when outputting columns which would have
+previously been of double precision.
+
+## Notes
+
+No type casting is performed on either the input or output data frames.
+Providing columns using double precision where decimal types are now
+expected will cause an error as with any other incorrect data types.

From f4e2f17e8ccc7e38241f3580eab6904cb3e0f45b Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Tue, 29 Nov 2022 13:34:13 +0000
Subject: [PATCH 008/531] Update 9.0.0.md

---
 docs/release-notes/9.0.0.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/release-notes/9.0.0.md b/docs/release-notes/9.0.0.md
index 86f9c41d..2dd3cc6d 100644
--- a/docs/release-notes/9.0.0.md
+++ b/docs/release-notes/9.0.0.md
@@ -1,4 +1,4 @@
-# Statistical methods Library 9.0.0
+# Statistical Methods Library 9.0.0
 
 Release date: 2022-11-29
 

From 2d171541a0a1a08473c3f47df524b43d1cca22c2 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 29 Nov 2022 13:42:10 +0000
Subject: [PATCH 009/531] More explanation

---
 docs/release-notes/9.0.0.md | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/docs/release-notes/9.0.0.md b/docs/release-notes/9.0.0.md
index 2dd3cc6d..710b71cf 100644
--- a/docs/release-notes/9.0.0.md
+++ b/docs/release-notes/9.0.0.md
@@ -4,18 +4,24 @@ Release date: 2022-11-29
 
 ## Synopsis
 
-This release addresses various floating point accuracy issues by switching
-to the Pyspark Decimal type for all calculations where such issues may
+This release addresses various floating point accuracy issues by using
+arbitrary precision arithmetic for all calculations where such issues may
 occur.
 
 ## Changes
 
 All methods now expect columns which were previously double precision to be
 of type decimal and uses this type when outputting columns which would have
-previously been of double precision.
+previously been of double precision. This type provides arbitrary precision
+arithmetic with support for increasing the precision where calculations
+require.
 
 ## Notes
 
-No type casting is performed on either the input or output data frames.
-Providing columns using double precision where decimal types are now
+No type casting is performed on either the input or output data frames. Thus
+providing columns using double precision where decimal types are now
 expected will cause an error as with any other incorrect data types.
+
+To avoid loss of precision, the exact precision of the output data frames is
+unspecified. This can be enforced by explicitly casting the output from the
+methods.

From 0d6ec79fc5cd5a8c5547240df7651cdfce9f5582 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 6 Dec 2022 10:59:11 +0000
Subject: [PATCH 010/531] Stop forcing things to max decimal precision as this
 generates issues

---
 statistical_methods_library/estimation/ht_ratio.py      | 4 ++--
 statistical_methods_library/outliering/winsorisation.py | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index 762a471f..5a520a17 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -188,14 +188,14 @@ def estimate(
 
     # --- prepare our working data frame ---
     working_df = aliased_df.withColumn(
-        "sample_marker", col("sample_marker").cast(DecimalType(38, 18))
+        "sample_marker", col("sample_marker").cast(DecimalType())
     )
     if adjustment_marker_col is None:
         working_df = working_df.withColumn("adjustment_marker", lit("I"))
         working_df = working_df.withColumn("h_value", lit(0))
     else:
         working_df = working_df.withColumn(
-            "h_value", col("h_value").cast(DecimalType(38, 18))
+            "h_value", col("h_value").cast(DecimalType())
         )
 
     def count_conditional(cond):
diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index 690746e4..923dcd36 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -150,12 +150,12 @@ def outlier(
     pre_marker_df = aliased_df
     if auxiliary_col is None:
         pre_marker_df = pre_marker_df.withColumn(
-            "auxiliary", lit(1.0).cast(DecimalType(38, 18))
+            "auxiliary", lit(1).cast(DecimalType())
         )
 
     if calibration_col is None:
         pre_marker_df = pre_marker_df.withColumn(
-            "calibration", lit(1.0).cast(DecimalType(38, 18))
+            "calibration", lit(1).cast(DecimalType())
         )
 
     group_cols = ["period", "grouping"]
@@ -173,7 +173,7 @@ def outlier(
     )
 
     not_winsorised_df = df.filter(col("marker").isNotNull()).withColumn(
-        "outlier", lit(1.0).cast(DecimalType(38, 18))
+        "outlier", lit(1).cast(DecimalType())
     )
     to_be_winsorised_df = df.filter(col("marker").isNull())
 

From 2cea232f41dae7f1887ffa78b5106acdd5c366fa Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 6 Dec 2022 11:15:33 +0000
Subject: [PATCH 011/531] Round

---
 .../ht_ratio/methodology_scenarios/01_expansion_output.csv   | 2 +-
 tests/test_estimation.py                                     | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/fixture_data/estimation/ht_ratio/methodology_scenarios/01_expansion_output.csv b/tests/fixture_data/estimation/ht_ratio/methodology_scenarios/01_expansion_output.csv
index 12b90c90..4417836c 100644
--- a/tests/fixture_data/estimation/ht_ratio/methodology_scenarios/01_expansion_output.csv
+++ b/tests/fixture_data/estimation/ht_ratio/methodology_scenarios/01_expansion_output.csv
@@ -1,6 +1,6 @@
 date,group,design_weight
 202012,0001,1.500000
-202012,0002,2.250001
+202012,0002,2.250000
 202012,0003,2.000000
 202012,0004,4.000000
 202101,0001,2.000000
diff --git a/tests/test_estimation.py b/tests/test_estimation.py
index 85d90586..4fdf5d1d 100644
--- a/tests/test_estimation.py
+++ b/tests/test_estimation.py
@@ -420,6 +420,11 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     assert isinstance(ret_val, type(test_dataframe))
     sort_col_list = ["date", "group"]
     select_cols = list(set(dataframe_columns) & set(exp_val.columns))
+    if "unadjusted" in scenario:
+        sort_col_list.append(unadjusted_design_weight_col)
+        ret_val = ret_val.withColumn(
+            unadjusted_design_weight_col, bround(col(unadjusted_design_weight_col), 6)
+        )
     if calibration_group_col in test_dataframe.columns:
         sort_col_list.append(calibration_group_col)
         ret_val = ret_val.withColumn(

From bbaf4117f76e5a7a55afaa79077b907bb438281a Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 6 Dec 2022 11:17:53 +0000
Subject: [PATCH 012/531] Add release notes

---
 docs/release-notes/9.0.1.md | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 docs/release-notes/9.0.1.md

diff --git a/docs/release-notes/9.0.1.md b/docs/release-notes/9.0.1.md
new file mode 100644
index 00000000..3c3769f5
--- /dev/null
+++ b/docs/release-notes/9.0.1.md
@@ -0,0 +1,19 @@
+# Statistical Methods Library 9.0.1
+
+Release date: 2022-12-06
+
+## Synopsis
+
+This release corrects a minor issue in the usage of arbitrary precision
+arithmetic.
+
+## Changes
+
+The `outliering.winsorisation` and `estimation.ht_ratio` methods now use the
+default precision and scale when casting boolean columns. This avoids an
+issue where the precision was artificially being forced over the maximum which resulted in unnecessary precision loss.
+
+## Notes
+
+This change may increase the precision of output columns from the
+`outliering.winsorisation` and `estimation.ht_ratio` methods.

From 720f24a37fdfc41739115eb6493e229bb27a0a6e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 6 Dec 2022 11:19:06 +0000
Subject: [PATCH 013/531] pyproject.toml update

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index dc51727a..d08d2445 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "9.0.0"
+version = "9.0.1"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 1a654923783566597a8093069ee9fc340cf14763 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 6 Dec 2022 11:39:31 +0000
Subject: [PATCH 014/531] More appropriate form of pull request template for an
 externally viewable repository

---
 .github/pull_request_template.md | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 36004c0c..f2a983e5 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,17 +1,13 @@
-# Checklist
+## Synopsis
 
-- [ ] Documentation created/updated
-    - [ ] If documentation descoped, a JIRA Ticket has been created to complete
-      the documentation
-
-- [ ] Deployed and tested in a sandbox/dev environment
-- [ ] Confirmed that no breakage to contract with automated testing/other teams
-  and remedial PRs or tickets raised.
+Briefly describe the purpose of the pr.
 
-Please briefly summarise how the PR has been tested:
+## Checklist
 
-## JIRA references
+- [ ] Documentation created/updated
+- [ ] Tests created/updated
 
-**Feature:** SPP-
+## Description
 
-**Task/Story:** SPP-
+Add a more detailed description of the pr including background and ticket
+references if necessary. 

From 2e3c4c4abd427f29134da257af9c2b219831b427 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 9 Dec 2022 22:03:40 +0000
Subject: [PATCH 015/531] Bump black from 22.10.0 to 22.12.0

Bumps [black](https://github.com/psf/black) from 22.10.0 to 22.12.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.10.0...22.12.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 poetry.lock    | 43 +++++++++++++++++--------------------------
 pyproject.toml |  2 +-
 2 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 02ea4e95..3a6fdf3f 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -10,11 +10,11 @@ python-versions = ">=3.5"
 dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"]
 docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
 tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"]
-tests_no_zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
+tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
 
 [[package]]
 name = "black"
-version = "22.10.0"
+version = "22.12.0"
 description = "The uncompromising code formatter."
 category = "dev"
 optional = false
@@ -125,9 +125,9 @@ python-versions = ">=3.6.1,<4.0"
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
-pipfile_deprecated_finder = ["pipreqs", "requirementslib"]
+pipfile-deprecated-finder = ["pipreqs", "requirementslib"]
 plugins = ["setuptools"]
-requirements_deprecated_finder = ["pip-api", "pipreqs"]
+requirements-deprecated-finder = ["pip-api", "pipreqs"]
 
 [[package]]
 name = "mccabe"
@@ -359,7 +359,7 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
 [metadata]
 lock-version = "1.1"
 python-versions = "^3.7"
-content-hash = "cbe589cfd5291a03b44f734062f65ce7b45a4288015a5c6f31fccc611f79986b"
+content-hash = "2882907ddcde17c189b251782d7d0d07cc5f14114127d1ebd0a3195b94f3195a"
 
 [metadata.files]
 attrs = [
@@ -367,27 +367,18 @@ attrs = [
     {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"},
 ]
 black = [
-    {file = "black-22.10.0-1fixedarch-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:5cc42ca67989e9c3cf859e84c2bf014f6633db63d1cbdf8fdb666dcd9e77e3fa"},
-    {file = "black-22.10.0-1fixedarch-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:5d8f74030e67087b219b032aa33a919fae8806d49c867846bfacde57f43972ef"},
-    {file = "black-22.10.0-1fixedarch-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:197df8509263b0b8614e1df1756b1dd41be6738eed2ba9e9769f3880c2b9d7b6"},
-    {file = "black-22.10.0-1fixedarch-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:2644b5d63633702bc2c5f3754b1b475378fbbfb481f62319388235d0cd104c2d"},
-    {file = "black-22.10.0-1fixedarch-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:e41a86c6c650bcecc6633ee3180d80a025db041a8e2398dcc059b3afa8382cd4"},
-    {file = "black-22.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2039230db3c6c639bd84efe3292ec7b06e9214a2992cd9beb293d639c6402edb"},
-    {file = "black-22.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ff67aec0a47c424bc99b71005202045dc09270da44a27848d534600ac64fc7"},
-    {file = "black-22.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:819dc789f4498ecc91438a7de64427c73b45035e2e3680c92e18795a839ebb66"},
-    {file = "black-22.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b9b29da4f564ba8787c119f37d174f2b69cdfdf9015b7d8c5c16121ddc054ae"},
-    {file = "black-22.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b49776299fece66bffaafe357d929ca9451450f5466e997a7285ab0fe28e3b"},
-    {file = "black-22.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:21199526696b8f09c3997e2b4db8d0b108d801a348414264d2eb8eb2532e540d"},
-    {file = "black-22.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e464456d24e23d11fced2bc8c47ef66d471f845c7b7a42f3bd77bf3d1789650"},
-    {file = "black-22.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:9311e99228ae10023300ecac05be5a296f60d2fd10fff31cf5c1fa4ca4b1988d"},
-    {file = "black-22.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fba8a281e570adafb79f7755ac8721b6cf1bbf691186a287e990c7929c7692ff"},
-    {file = "black-22.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:915ace4ff03fdfff953962fa672d44be269deb2eaf88499a0f8805221bc68c87"},
-    {file = "black-22.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:444ebfb4e441254e87bad00c661fe32df9969b2bf224373a448d8aca2132b395"},
-    {file = "black-22.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:974308c58d057a651d182208a484ce80a26dac0caef2895836a92dd6ebd725e0"},
-    {file = "black-22.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72ef3925f30e12a184889aac03d77d031056860ccae8a1e519f6cbb742736383"},
-    {file = "black-22.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:432247333090c8c5366e69627ccb363bc58514ae3e63f7fc75c54b1ea80fa7de"},
-    {file = "black-22.10.0-py3-none-any.whl", hash = "sha256:c957b2b4ea88587b46cf49d1dc17681c1e672864fd7af32fc1e9664d572b3458"},
-    {file = "black-22.10.0.tar.gz", hash = "sha256:f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1"},
+    {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
+    {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
+    {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
+    {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
+    {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
+    {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
+    {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
+    {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
+    {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
+    {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
+    {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
+    {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
 ]
 chispa = [
     {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
diff --git a/pyproject.toml b/pyproject.toml
index d08d2445..6bd1a312 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -11,7 +11,7 @@ pyspark = "3.1.1"
 
 [tool.poetry.dev-dependencies]
 pytest = "^7.1.2"
-black = "^22.10"
+black = "^22.12"
 isort = "^5.10.1"
 flake8 = "^5.0.4"
 coverage = "^6.5"

From 7fc86204b06a98548f8b26e6146a6873eedb5000 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 21 Dec 2022 22:04:16 +0000
Subject: [PATCH 016/531] Bump isort from 5.10.1 to 5.11.4

Bumps [isort](https://github.com/pycqa/isort) from 5.10.1 to 5.11.4.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.10.1...5.11.4)

---
updated-dependencies:
- dependency-name: isort
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 poetry.lock    | 16 ++++++++--------
 pyproject.toml |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 02ea4e95..930e67ee 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -10,7 +10,7 @@ python-versions = ">=3.5"
 dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"]
 docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
 tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"]
-tests_no_zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
+tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
 
 [[package]]
 name = "black"
@@ -117,17 +117,17 @@ python-versions = "*"
 
 [[package]]
 name = "isort"
-version = "5.10.1"
+version = "5.11.4"
 description = "A Python utility / library to sort Python imports."
 category = "dev"
 optional = false
-python-versions = ">=3.6.1,<4.0"
+python-versions = ">=3.7.0"
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
-pipfile_deprecated_finder = ["pipreqs", "requirementslib"]
+pipfile-deprecated-finder = ["pipreqs", "requirementslib"]
 plugins = ["setuptools"]
-requirements_deprecated_finder = ["pip-api", "pipreqs"]
+requirements-deprecated-finder = ["pip-api", "pipreqs"]
 
 [[package]]
 name = "mccabe"
@@ -359,7 +359,7 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
 [metadata]
 lock-version = "1.1"
 python-versions = "^3.7"
-content-hash = "cbe589cfd5291a03b44f734062f65ce7b45a4288015a5c6f31fccc611f79986b"
+content-hash = "8ad1f171fa678fbc9a949c205a15771db8babe425c235878c40bd9de6208c05b"
 
 [metadata.files]
 attrs = [
@@ -466,8 +466,8 @@ iniconfig = [
     {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
 ]
 isort = [
-    {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"},
-    {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"},
+    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
+    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
 ]
 mccabe = [
     {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
diff --git a/pyproject.toml b/pyproject.toml
index d08d2445..a82825f9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,7 +12,7 @@ pyspark = "3.1.1"
 [tool.poetry.dev-dependencies]
 pytest = "^7.1.2"
 black = "^22.10"
-isort = "^5.10.1"
+isort = "^5.11.4"
 flake8 = "^5.0.4"
 coverage = "^6.5"
 pytest-cov = "^4.0.0"

From b077a3a4d5ff0f233d312d389c41475d91b068d5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 4 Jan 2023 22:03:48 +0000
Subject: [PATCH 017/531] Bump coverage from 6.5.0 to 7.0.3

Bumps [coverage](https://github.com/nedbat/coveragepy) from 6.5.0 to 7.0.3.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/6.5.0...7.0.3)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 poetry.lock    | 111 +++++++++++++++++++++++++------------------------
 pyproject.toml |   2 +-
 2 files changed, 57 insertions(+), 56 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 02ea4e95..13bca744 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -10,7 +10,7 @@ python-versions = ">=3.5"
 dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"]
 docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
 tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"]
-tests_no_zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
+tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
 
 [[package]]
 name = "black"
@@ -65,7 +65,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
 
 [[package]]
 name = "coverage"
-version = "6.5.0"
+version = "7.0.3"
 description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
@@ -125,9 +125,9 @@ python-versions = ">=3.6.1,<4.0"
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
-pipfile_deprecated_finder = ["pipreqs", "requirementslib"]
+pipfile-deprecated-finder = ["pipreqs", "requirementslib"]
 plugins = ["setuptools"]
-requirements_deprecated_finder = ["pip-api", "pipreqs"]
+requirements-deprecated-finder = ["pip-api", "pipreqs"]
 
 [[package]]
 name = "mccabe"
@@ -359,7 +359,7 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
 [metadata]
 lock-version = "1.1"
 python-versions = "^3.7"
-content-hash = "cbe589cfd5291a03b44f734062f65ce7b45a4288015a5c6f31fccc611f79986b"
+content-hash = "92f5bea94c5cd35e7a8d31829f1ca5eb0416487b6111b03ab0f0b49048aa2aa6"
 
 [metadata.files]
 attrs = [
@@ -402,56 +402,57 @@ colorama = [
     {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"},
 ]
 coverage = [
-    {file = "coverage-6.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef8674b0ee8cc11e2d574e3e2998aea5df5ab242e012286824ea3c6970580e53"},
-    {file = "coverage-6.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:784f53ebc9f3fd0e2a3f6a78b2be1bd1f5575d7863e10c6e12504f240fd06660"},
-    {file = "coverage-6.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4a5be1748d538a710f87542f22c2cad22f80545a847ad91ce45e77417293eb4"},
-    {file = "coverage-6.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:83516205e254a0cb77d2d7bb3632ee019d93d9f4005de31dca0a8c3667d5bc04"},
-    {file = "coverage-6.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af4fffaffc4067232253715065e30c5a7ec6faac36f8fc8d6f64263b15f74db0"},
-    {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:97117225cdd992a9c2a5515db1f66b59db634f59d0679ca1fa3fe8da32749cae"},
-    {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a1170fa54185845505fbfa672f1c1ab175446c887cce8212c44149581cf2d466"},
-    {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:11b990d520ea75e7ee8dcab5bc908072aaada194a794db9f6d7d5cfd19661e5a"},
-    {file = "coverage-6.5.0-cp310-cp310-win32.whl", hash = "sha256:5dbec3b9095749390c09ab7c89d314727f18800060d8d24e87f01fb9cfb40b32"},
-    {file = "coverage-6.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:59f53f1dc5b656cafb1badd0feb428c1e7bc19b867479ff72f7a9dd9b479f10e"},
-    {file = "coverage-6.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4a5375e28c5191ac38cca59b38edd33ef4cc914732c916f2929029b4bfb50795"},
-    {file = "coverage-6.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4ed2820d919351f4167e52425e096af41bfabacb1857186c1ea32ff9983ed75"},
-    {file = "coverage-6.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:33a7da4376d5977fbf0a8ed91c4dffaaa8dbf0ddbf4c8eea500a2486d8bc4d7b"},
-    {file = "coverage-6.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8fb6cf131ac4070c9c5a3e21de0f7dc5a0fbe8bc77c9456ced896c12fcdad91"},
-    {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a6b7d95969b8845250586f269e81e5dfdd8ff828ddeb8567a4a2eaa7313460c4"},
-    {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:1ef221513e6f68b69ee9e159506d583d31aa3567e0ae84eaad9d6ec1107dddaa"},
-    {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cca4435eebea7962a52bdb216dec27215d0df64cf27fc1dd538415f5d2b9da6b"},
-    {file = "coverage-6.5.0-cp311-cp311-win32.whl", hash = "sha256:98e8a10b7a314f454d9eff4216a9a94d143a7ee65018dd12442e898ee2310578"},
-    {file = "coverage-6.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:bc8ef5e043a2af066fa8cbfc6e708d58017024dc4345a1f9757b329a249f041b"},
-    {file = "coverage-6.5.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4433b90fae13f86fafff0b326453dd42fc9a639a0d9e4eec4d366436d1a41b6d"},
-    {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4f05d88d9a80ad3cac6244d36dd89a3c00abc16371769f1340101d3cb899fc3"},
-    {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:94e2565443291bd778421856bc975d351738963071e9b8839ca1fc08b42d4bef"},
-    {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:027018943386e7b942fa832372ebc120155fd970837489896099f5cfa2890f79"},
-    {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:255758a1e3b61db372ec2736c8e2a1fdfaf563977eedbdf131de003ca5779b7d"},
-    {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:851cf4ff24062c6aec510a454b2584f6e998cada52d4cb58c5e233d07172e50c"},
-    {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:12adf310e4aafddc58afdb04d686795f33f4d7a6fa67a7a9d4ce7d6ae24d949f"},
-    {file = "coverage-6.5.0-cp37-cp37m-win32.whl", hash = "sha256:b5604380f3415ba69de87a289a2b56687faa4fe04dbee0754bfcae433489316b"},
-    {file = "coverage-6.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:4a8dbc1f0fbb2ae3de73eb0bdbb914180c7abfbf258e90b311dcd4f585d44bd2"},
-    {file = "coverage-6.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d900bb429fdfd7f511f868cedd03a6bbb142f3f9118c09b99ef8dc9bf9643c3c"},
-    {file = "coverage-6.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2198ea6fc548de52adc826f62cb18554caedfb1d26548c1b7c88d8f7faa8f6ba"},
-    {file = "coverage-6.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c4459b3de97b75e3bd6b7d4b7f0db13f17f504f3d13e2a7c623786289dd670e"},
-    {file = "coverage-6.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:20c8ac5386253717e5ccc827caad43ed66fea0efe255727b1053a8154d952398"},
-    {file = "coverage-6.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b07130585d54fe8dff3d97b93b0e20290de974dc8177c320aeaf23459219c0b"},
-    {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dbdb91cd8c048c2b09eb17713b0c12a54fbd587d79adcebad543bc0cd9a3410b"},
-    {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:de3001a203182842a4630e7b8d1a2c7c07ec1b45d3084a83d5d227a3806f530f"},
-    {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e07f4a4a9b41583d6eabec04f8b68076ab3cd44c20bd29332c6572dda36f372e"},
-    {file = "coverage-6.5.0-cp38-cp38-win32.whl", hash = "sha256:6d4817234349a80dbf03640cec6109cd90cba068330703fa65ddf56b60223a6d"},
-    {file = "coverage-6.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:7ccf362abd726b0410bf8911c31fbf97f09f8f1061f8c1cf03dfc4b6372848f6"},
-    {file = "coverage-6.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:633713d70ad6bfc49b34ead4060531658dc6dfc9b3eb7d8a716d5873377ab745"},
-    {file = "coverage-6.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:95203854f974e07af96358c0b261f1048d8e1083f2de9b1c565e1be4a3a48cfc"},
-    {file = "coverage-6.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9023e237f4c02ff739581ef35969c3739445fb059b060ca51771e69101efffe"},
-    {file = "coverage-6.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:265de0fa6778d07de30bcf4d9dc471c3dc4314a23a3c6603d356a3c9abc2dfcf"},
-    {file = "coverage-6.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f830ed581b45b82451a40faabb89c84e1a998124ee4212d440e9c6cf70083e5"},
-    {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7b6be138d61e458e18d8e6ddcddd36dd96215edfe5f1168de0b1b32635839b62"},
-    {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:42eafe6778551cf006a7c43153af1211c3aaab658d4d66fa5fcc021613d02518"},
-    {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:723e8130d4ecc8f56e9a611e73b31219595baa3bb252d539206f7bbbab6ffc1f"},
-    {file = "coverage-6.5.0-cp39-cp39-win32.whl", hash = "sha256:d9ecf0829c6a62b9b573c7bb6d4dcd6ba8b6f80be9ba4fc7ed50bf4ac9aecd72"},
-    {file = "coverage-6.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987"},
-    {file = "coverage-6.5.0-pp36.pp37.pp38-none-any.whl", hash = "sha256:1431986dac3923c5945271f169f59c45b8802a114c8f548d611f2015133df77a"},
-    {file = "coverage-6.5.0.tar.gz", hash = "sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84"},
+    {file = "coverage-7.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f7c51b6074a8a3063c341953dffe48fd6674f8e4b1d3c8aa8a91f58d6e716a8"},
+    {file = "coverage-7.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:628f47eaf66727fc986d3b190d6fa32f5e6b7754a243919d28bc0fd7974c449f"},
+    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e89d5abf86c104de808108a25d171ad646c07eda96ca76c8b237b94b9c71e518"},
+    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75e43c6f4ea4d122dac389aabdf9d4f0e160770a75e63372f88005d90f5bcc80"},
+    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49da0ff241827ebb52d5d6d5a36d33b455fa5e721d44689c95df99fd8db82437"},
+    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0bce4ad5bdd0b02e177a085d28d2cea5fc57bb4ba2cead395e763e34cf934eb1"},
+    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f79691335257d60951638dd43576b9bcd6f52baa5c1c2cd07a509bb003238372"},
+    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5722269ed05fbdb94eef431787c66b66260ff3125d1a9afcc00facff8c45adf9"},
+    {file = "coverage-7.0.3-cp310-cp310-win32.whl", hash = "sha256:bdbda870e0fda7dd0fe7db7135ca226ec4c1ade8aa76e96614829b56ca491012"},
+    {file = "coverage-7.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:e56fae4292e216b8deeee38ace84557b9fa85b52db005368a275427cdabb8192"},
+    {file = "coverage-7.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b82343a5bc51627b9d606f0b6b6b9551db7b6311a5dd920fa52a94beae2e8959"},
+    {file = "coverage-7.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fd0a8aa431f9b7ad9eb8264f55ef83cbb254962af3775092fb6e93890dea9ca2"},
+    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:112cfead1bd22eada8a8db9ed387bd3e8be5528debc42b5d3c1f7da4ffaf9fb5"},
+    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:af87e906355fa42447be5c08c5d44e6e1c005bf142f303f726ddf5ed6e0c8a4d"},
+    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f30090e22a301952c5abd0e493a1c8358b4f0b368b49fa3e4568ed3ed68b8d1f"},
+    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ae871d09901911eedda1981ea6fd0f62a999107293cdc4c4fd612321c5b34745"},
+    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ed7c9debf7bfc63c9b9f8b595409237774ff4b061bf29fba6f53b287a2fdeab9"},
+    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:13121fa22dcd2c7b19c5161e3fd725692448f05377b788da4502a383573227b3"},
+    {file = "coverage-7.0.3-cp311-cp311-win32.whl", hash = "sha256:037b51ee86bc600f99b3b957c20a172431c35c2ef9c1ca34bc813ab5b51fd9f5"},
+    {file = "coverage-7.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:25fde928306034e8deecd5fc91a07432dcc282c8acb76749581a28963c9f4f3f"},
+    {file = "coverage-7.0.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7e8b0642c38b3d3b3c01417643ccc645345b03c32a2e84ef93cdd6844d6fe530"},
+    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18b09811f849cc958d23f733a350a66b54a8de3fed1e6128ba55a5c97ffb6f65"},
+    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:349d0b545520e8516f7b4f12373afc705d17d901e1de6a37a20e4ec9332b61f7"},
+    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b5b38813eee5b4739f505d94247604c72eae626d5088a16dd77b08b8b1724ab3"},
+    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ba9af1218fa01b1f11c72271bc7290b701d11ad4dbc2ae97c445ecacf6858dba"},
+    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c5648c7eec5cf1ba5db1cf2d6c10036a582d7f09e172990474a122e30c841361"},
+    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d0df04495b76a885bfef009f45eebe8fe2fbf815ad7a83dabcf5aced62f33162"},
+    {file = "coverage-7.0.3-cp37-cp37m-win32.whl", hash = "sha256:af6cef3796b8068713a48dd67d258dc9a6e2ebc3bd4645bfac03a09672fa5d20"},
+    {file = "coverage-7.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:62ef3800c4058844e2e3fa35faa9dd0ccde8a8aba6c763aae50342e00d4479d4"},
+    {file = "coverage-7.0.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:acef7f3a3825a2d218a03dd02f5f3cc7f27aa31d882dd780191d1ad101120d74"},
+    {file = "coverage-7.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a530663a361eb27375cec28aea5cd282089b5e4b022ae451c4c3493b026a68a5"},
+    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c58cd6bb46dcb922e0d5792850aab5964433d511b3a020867650f8d930dde4f4"},
+    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f918e9ef4c98f477a5458238dde2a1643aed956c7213873ab6b6b82e32b8ef61"},
+    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b865aa679bee7fbd1c55960940dbd3252621dd81468268786c67122bbd15343"},
+    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c5d9b480ebae60fc2cbc8d6865194136bc690538fa542ba58726433bed6e04cc"},
+    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:985ad2af5ec3dbb4fd75d5b0735752c527ad183455520055a08cf8d6794cabfc"},
+    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ca15308ef722f120967af7474ba6a453e0f5b6f331251e20b8145497cf1bc14a"},
+    {file = "coverage-7.0.3-cp38-cp38-win32.whl", hash = "sha256:c1cee10662c25c94415bbb987f2ec0e6ba9e8fce786334b10be7e6a7ab958f69"},
+    {file = "coverage-7.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:44d6a556de4418f1f3bfd57094b8c49f0408df5a433cf0d253eeb3075261c762"},
+    {file = "coverage-7.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e6dcc70a25cb95df0ae33dfc701de9b09c37f7dd9f00394d684a5b57257f8246"},
+    {file = "coverage-7.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:bf76d79dfaea802f0f28f50153ffbc1a74ae1ee73e480baeda410b4f3e7ab25f"},
+    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88834e5d56d01c141c29deedacba5773fe0bed900b1edc957595a8a6c0da1c3c"},
+    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef001a60e888f8741e42e5aa79ae55c91be73761e4df5e806efca1ddd62fd400"},
+    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4959dc506be74e4963bd2c42f7b87d8e4b289891201e19ec551e64c6aa5441f8"},
+    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b791beb17b32ac019a78cfbe6184f992b6273fdca31145b928ad2099435e2fcb"},
+    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b07651e3b9af8f1a092861d88b4c74d913634a7f1f2280fca0ad041ad84e9e96"},
+    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:55e46fa4168ccb7497c9be78627fcb147e06f474f846a10d55feeb5108a24ef0"},
+    {file = "coverage-7.0.3-cp39-cp39-win32.whl", hash = "sha256:e3f1cd1cd65695b1540b3cf7828d05b3515974a9d7c7530f762ac40f58a18161"},
+    {file = "coverage-7.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:d8249666c23683f74f8f93aeaa8794ac87cc61c40ff70374a825f3352a4371dc"},
+    {file = "coverage-7.0.3-pp37.pp38.pp39-none-any.whl", hash = "sha256:b1ffc8f58b81baed3f8962e28c30d99442079b82ce1ec836a1f67c0accad91c1"},
+    {file = "coverage-7.0.3.tar.gz", hash = "sha256:d5be4e93acce64f516bf4fd239c0e6118fc913c93fa1a3f52d15bdcc60d97b2d"},
 ]
 flake8 = [
     {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
diff --git a/pyproject.toml b/pyproject.toml
index d08d2445..93966517 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -14,7 +14,7 @@ pytest = "^7.1.2"
 black = "^22.10"
 isort = "^5.10.1"
 flake8 = "^5.0.4"
-coverage = "^6.5"
+coverage = "^7.0"
 pytest-cov = "^4.0.0"
 chispa = "*"
 pytest-dependency = "^0.5.1"

From 983054eb790c5765bc4bd30517c614555141e115 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 9 Jan 2023 12:14:24 +0000
Subject: [PATCH 018/531] Clarify test naming structure

---
 tests/{test_estimation.py => estimation/test_ht_ratio.py}       | 0
 tests/{test_imputation.py => imputation/test_ratio_of_means.py} | 0
 tests/{test_outliering.py => outliering/test_winsorisation.py}  | 0
 3 files changed, 0 insertions(+), 0 deletions(-)
 rename tests/{test_estimation.py => estimation/test_ht_ratio.py} (100%)
 rename tests/{test_imputation.py => imputation/test_ratio_of_means.py} (100%)
 rename tests/{test_outliering.py => outliering/test_winsorisation.py} (100%)

diff --git a/tests/test_estimation.py b/tests/estimation/test_ht_ratio.py
similarity index 100%
rename from tests/test_estimation.py
rename to tests/estimation/test_ht_ratio.py
diff --git a/tests/test_imputation.py b/tests/imputation/test_ratio_of_means.py
similarity index 100%
rename from tests/test_imputation.py
rename to tests/imputation/test_ratio_of_means.py
diff --git a/tests/test_outliering.py b/tests/outliering/test_winsorisation.py
similarity index 100%
rename from tests/test_outliering.py
rename to tests/outliering/test_winsorisation.py

From abc6980c2fd26cb8928b66410c1d71070b61dd07 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Jan 2023 22:04:45 +0000
Subject: [PATCH 019/531] Bump pytest from 7.2.0 to 7.2.1

Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.0 to 7.2.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.0...7.2.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 poetry.lock    | 395 ++++++++++++++++++++++++-------------------------
 pyproject.toml |   2 +-
 2 files changed, 198 insertions(+), 199 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 48033b50..3548fd3a 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,3 +1,5 @@
+# This file is automatically @generated by Poetry and should not be changed by hand.
+
 [[package]]
 name = "attrs"
 version = "22.2.0"
@@ -5,14 +7,17 @@ description = "Classes Without Boilerplate"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
+    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
+]
 
 [package.extras]
 cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"]
 dev = ["attrs[docs,tests]"]
 docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"]
 tests = ["attrs[tests-no-zope]", "zope.interface"]
-tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=0.971,<0.990)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"]
-tests_no_zope = ["cloudpickle", "hypothesis", "mypy (>=0.971,<0.990)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"]
+tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"]
 
 [[package]]
 name = "black"
@@ -21,6 +26,20 @@ description = "The uncompromising code formatter."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
+    {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
+    {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
+    {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
+    {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
+    {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
+    {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
+    {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
+    {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
+    {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
+    {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
+    {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
+]
 
 [package.dependencies]
 click = ">=8.0.0"
@@ -44,6 +63,10 @@ description = "Pyspark test helper library"
 category = "dev"
 optional = false
 python-versions = ">=3.5"
+files = [
+    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
+    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
+]
 
 [[package]]
 name = "click"
@@ -52,6 +75,10 @@ description = "Composable command line interface toolkit"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
+    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
+]
 
 [package.dependencies]
 colorama = {version = "*", markers = "platform_system == \"Windows\""}
@@ -64,6 +91,10 @@ description = "Cross-platform colored terminal text."
 category = "dev"
 optional = false
 python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
+files = [
+    {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
+    {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
+]
 
 [[package]]
 name = "coverage"
@@ -72,6 +103,59 @@ description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "coverage-7.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f7c51b6074a8a3063c341953dffe48fd6674f8e4b1d3c8aa8a91f58d6e716a8"},
+    {file = "coverage-7.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:628f47eaf66727fc986d3b190d6fa32f5e6b7754a243919d28bc0fd7974c449f"},
+    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e89d5abf86c104de808108a25d171ad646c07eda96ca76c8b237b94b9c71e518"},
+    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75e43c6f4ea4d122dac389aabdf9d4f0e160770a75e63372f88005d90f5bcc80"},
+    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49da0ff241827ebb52d5d6d5a36d33b455fa5e721d44689c95df99fd8db82437"},
+    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0bce4ad5bdd0b02e177a085d28d2cea5fc57bb4ba2cead395e763e34cf934eb1"},
+    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f79691335257d60951638dd43576b9bcd6f52baa5c1c2cd07a509bb003238372"},
+    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5722269ed05fbdb94eef431787c66b66260ff3125d1a9afcc00facff8c45adf9"},
+    {file = "coverage-7.0.3-cp310-cp310-win32.whl", hash = "sha256:bdbda870e0fda7dd0fe7db7135ca226ec4c1ade8aa76e96614829b56ca491012"},
+    {file = "coverage-7.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:e56fae4292e216b8deeee38ace84557b9fa85b52db005368a275427cdabb8192"},
+    {file = "coverage-7.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b82343a5bc51627b9d606f0b6b6b9551db7b6311a5dd920fa52a94beae2e8959"},
+    {file = "coverage-7.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fd0a8aa431f9b7ad9eb8264f55ef83cbb254962af3775092fb6e93890dea9ca2"},
+    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:112cfead1bd22eada8a8db9ed387bd3e8be5528debc42b5d3c1f7da4ffaf9fb5"},
+    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:af87e906355fa42447be5c08c5d44e6e1c005bf142f303f726ddf5ed6e0c8a4d"},
+    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f30090e22a301952c5abd0e493a1c8358b4f0b368b49fa3e4568ed3ed68b8d1f"},
+    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ae871d09901911eedda1981ea6fd0f62a999107293cdc4c4fd612321c5b34745"},
+    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ed7c9debf7bfc63c9b9f8b595409237774ff4b061bf29fba6f53b287a2fdeab9"},
+    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:13121fa22dcd2c7b19c5161e3fd725692448f05377b788da4502a383573227b3"},
+    {file = "coverage-7.0.3-cp311-cp311-win32.whl", hash = "sha256:037b51ee86bc600f99b3b957c20a172431c35c2ef9c1ca34bc813ab5b51fd9f5"},
+    {file = "coverage-7.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:25fde928306034e8deecd5fc91a07432dcc282c8acb76749581a28963c9f4f3f"},
+    {file = "coverage-7.0.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7e8b0642c38b3d3b3c01417643ccc645345b03c32a2e84ef93cdd6844d6fe530"},
+    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18b09811f849cc958d23f733a350a66b54a8de3fed1e6128ba55a5c97ffb6f65"},
+    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:349d0b545520e8516f7b4f12373afc705d17d901e1de6a37a20e4ec9332b61f7"},
+    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b5b38813eee5b4739f505d94247604c72eae626d5088a16dd77b08b8b1724ab3"},
+    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ba9af1218fa01b1f11c72271bc7290b701d11ad4dbc2ae97c445ecacf6858dba"},
+    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c5648c7eec5cf1ba5db1cf2d6c10036a582d7f09e172990474a122e30c841361"},
+    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d0df04495b76a885bfef009f45eebe8fe2fbf815ad7a83dabcf5aced62f33162"},
+    {file = "coverage-7.0.3-cp37-cp37m-win32.whl", hash = "sha256:af6cef3796b8068713a48dd67d258dc9a6e2ebc3bd4645bfac03a09672fa5d20"},
+    {file = "coverage-7.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:62ef3800c4058844e2e3fa35faa9dd0ccde8a8aba6c763aae50342e00d4479d4"},
+    {file = "coverage-7.0.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:acef7f3a3825a2d218a03dd02f5f3cc7f27aa31d882dd780191d1ad101120d74"},
+    {file = "coverage-7.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a530663a361eb27375cec28aea5cd282089b5e4b022ae451c4c3493b026a68a5"},
+    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c58cd6bb46dcb922e0d5792850aab5964433d511b3a020867650f8d930dde4f4"},
+    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f918e9ef4c98f477a5458238dde2a1643aed956c7213873ab6b6b82e32b8ef61"},
+    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b865aa679bee7fbd1c55960940dbd3252621dd81468268786c67122bbd15343"},
+    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c5d9b480ebae60fc2cbc8d6865194136bc690538fa542ba58726433bed6e04cc"},
+    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:985ad2af5ec3dbb4fd75d5b0735752c527ad183455520055a08cf8d6794cabfc"},
+    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ca15308ef722f120967af7474ba6a453e0f5b6f331251e20b8145497cf1bc14a"},
+    {file = "coverage-7.0.3-cp38-cp38-win32.whl", hash = "sha256:c1cee10662c25c94415bbb987f2ec0e6ba9e8fce786334b10be7e6a7ab958f69"},
+    {file = "coverage-7.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:44d6a556de4418f1f3bfd57094b8c49f0408df5a433cf0d253eeb3075261c762"},
+    {file = "coverage-7.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e6dcc70a25cb95df0ae33dfc701de9b09c37f7dd9f00394d684a5b57257f8246"},
+    {file = "coverage-7.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:bf76d79dfaea802f0f28f50153ffbc1a74ae1ee73e480baeda410b4f3e7ab25f"},
+    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88834e5d56d01c141c29deedacba5773fe0bed900b1edc957595a8a6c0da1c3c"},
+    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef001a60e888f8741e42e5aa79ae55c91be73761e4df5e806efca1ddd62fd400"},
+    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4959dc506be74e4963bd2c42f7b87d8e4b289891201e19ec551e64c6aa5441f8"},
+    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b791beb17b32ac019a78cfbe6184f992b6273fdca31145b928ad2099435e2fcb"},
+    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b07651e3b9af8f1a092861d88b4c74d913634a7f1f2280fca0ad041ad84e9e96"},
+    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:55e46fa4168ccb7497c9be78627fcb147e06f474f846a10d55feeb5108a24ef0"},
+    {file = "coverage-7.0.3-cp39-cp39-win32.whl", hash = "sha256:e3f1cd1cd65695b1540b3cf7828d05b3515974a9d7c7530f762ac40f58a18161"},
+    {file = "coverage-7.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:d8249666c23683f74f8f93aeaa8794ac87cc61c40ff70374a825f3352a4371dc"},
+    {file = "coverage-7.0.3-pp37.pp38.pp39-none-any.whl", hash = "sha256:b1ffc8f58b81baed3f8962e28c30d99442079b82ce1ec836a1f67c0accad91c1"},
+    {file = "coverage-7.0.3.tar.gz", hash = "sha256:d5be4e93acce64f516bf4fd239c0e6118fc913c93fa1a3f52d15bdcc60d97b2d"},
+]
 
 [package.dependencies]
 tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}
@@ -86,6 +170,10 @@ description = "Backport of PEP 654 (exception groups)"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
+    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
+]
 
 [package.extras]
 test = ["pytest (>=6)"]
@@ -97,6 +185,10 @@ description = "the modular source code checker: pep8 pyflakes and co"
 category = "dev"
 optional = false
 python-versions = ">=3.6.1"
+files = [
+    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
+    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
+]
 
 [package.dependencies]
 importlib-metadata = {version = ">=1.1.0,<4.3", markers = "python_version < \"3.8\""}
@@ -111,6 +203,10 @@ description = "Read metadata from Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
+    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
+]
 
 [package.dependencies]
 typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""}
@@ -127,6 +223,10 @@ description = "iniconfig: brain-dead simple config-ini parsing"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
+    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
+]
 
 [[package]]
 name = "isort"
@@ -135,6 +235,10 @@ description = "A Python utility / library to sort Python imports."
 category = "dev"
 optional = false
 python-versions = ">=3.7.0"
+files = [
+    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
+    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
+]
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
@@ -149,6 +253,10 @@ description = "McCabe checker, plugin for flake8"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
+    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
+]
 
 [[package]]
 name = "mypy-extensions"
@@ -157,6 +265,10 @@ description = "Experimental type system extensions for programs checked with the
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
+    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
+]
 
 [[package]]
 name = "packaging"
@@ -165,6 +277,10 @@ description = "Core utilities for Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
+    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
+]
 
 [[package]]
 name = "pathspec"
@@ -173,6 +289,10 @@ description = "Utility library for gitignore style pattern matching of file path
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
+    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
+]
 
 [[package]]
 name = "platformdirs"
@@ -181,6 +301,10 @@ description = "A small Python package for determining appropriate platform-speci
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
+    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
+]
 
 [package.dependencies]
 typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""}
@@ -196,6 +320,10 @@ description = "plugin and hook calling mechanisms for python"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
+    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
+]
 
 [package.dependencies]
 importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
@@ -211,6 +339,10 @@ description = "Enables Python programs to dynamically access arbitrary Java obje
 category = "main"
 optional = false
 python-versions = "*"
+files = [
+    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
+    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
+]
 
 [[package]]
 name = "pycodestyle"
@@ -219,6 +351,10 @@ description = "Python style guide checker"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
+    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
+]
 
 [[package]]
 name = "pyflakes"
@@ -227,6 +363,10 @@ description = "passive checker of Python programs"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
+    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
+]
 
 [[package]]
 name = "pyspark"
@@ -235,6 +375,9 @@ description = "Apache Spark Python API"
 category = "main"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
+]
 
 [package.dependencies]
 py4j = "0.10.9"
@@ -246,11 +389,15 @@ sql = ["pandas (>=0.23.2)", "pyarrow (>=1.0.0)"]
 
 [[package]]
 name = "pytest"
-version = "7.2.0"
+version = "7.2.1"
 description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
+    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
+]
 
 [package.dependencies]
 attrs = ">=19.2.0"
@@ -272,6 +419,10 @@ description = "Pytest plugin for measuring coverage."
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
+    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
+]
 
 [package.dependencies]
 coverage = {version = ">=5.2.1", extras = ["toml"]}
@@ -287,6 +438,9 @@ description = "Manage dependencies of tests"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
+]
 
 [package.dependencies]
 pytest = ">=3.6.0"
@@ -298,6 +452,10 @@ description = "Test Anything Protocol (TAP) reporting plugin for pytest"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
+    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
+]
 
 [package.dependencies]
 pytest = ">=3.0"
@@ -310,6 +468,10 @@ description = "Test Anything Protocol (TAP) tools"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
+    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
+]
 
 [package.extras]
 yaml = ["PyYAML (>=5.1)", "more-itertools"]
@@ -321,6 +483,10 @@ description = "A lil' TOML parser"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
+    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+]
 
 [[package]]
 name = "typed-ast"
@@ -329,199 +495,7 @@ description = "a fork of Python 2 and 3 ast modules with type comment support"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-
-[[package]]
-name = "typing-extensions"
-version = "4.4.0"
-description = "Backported and Experimental Type Hints for Python 3.7+"
-category = "dev"
-optional = false
-python-versions = ">=3.7"
-
-[[package]]
-name = "zipp"
-version = "3.11.0"
-description = "Backport of pathlib-compatible object wrapper for zip files"
-category = "dev"
-optional = false
-python-versions = ">=3.7"
-
-[package.extras]
-docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
-testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
-
-[metadata]
-lock-version = "1.1"
-python-versions = "^3.7"
-content-hash = "9496f704e05ddafc97ce787b14ac3e981b0671eda21f623ac025a6f381a5bc08"
-
-[metadata.files]
-attrs = [
-    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
-    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
-]
-black = [
-    {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
-    {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
-    {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
-    {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
-    {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
-    {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
-    {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
-    {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
-    {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
-    {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
-    {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
-    {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
-]
-chispa = [
-    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
-    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
-]
-click = [
-    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
-    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
-]
-colorama = [
-    {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
-    {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
-]
-coverage = [
-    {file = "coverage-7.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f7c51b6074a8a3063c341953dffe48fd6674f8e4b1d3c8aa8a91f58d6e716a8"},
-    {file = "coverage-7.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:628f47eaf66727fc986d3b190d6fa32f5e6b7754a243919d28bc0fd7974c449f"},
-    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e89d5abf86c104de808108a25d171ad646c07eda96ca76c8b237b94b9c71e518"},
-    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75e43c6f4ea4d122dac389aabdf9d4f0e160770a75e63372f88005d90f5bcc80"},
-    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49da0ff241827ebb52d5d6d5a36d33b455fa5e721d44689c95df99fd8db82437"},
-    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0bce4ad5bdd0b02e177a085d28d2cea5fc57bb4ba2cead395e763e34cf934eb1"},
-    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f79691335257d60951638dd43576b9bcd6f52baa5c1c2cd07a509bb003238372"},
-    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5722269ed05fbdb94eef431787c66b66260ff3125d1a9afcc00facff8c45adf9"},
-    {file = "coverage-7.0.3-cp310-cp310-win32.whl", hash = "sha256:bdbda870e0fda7dd0fe7db7135ca226ec4c1ade8aa76e96614829b56ca491012"},
-    {file = "coverage-7.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:e56fae4292e216b8deeee38ace84557b9fa85b52db005368a275427cdabb8192"},
-    {file = "coverage-7.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b82343a5bc51627b9d606f0b6b6b9551db7b6311a5dd920fa52a94beae2e8959"},
-    {file = "coverage-7.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fd0a8aa431f9b7ad9eb8264f55ef83cbb254962af3775092fb6e93890dea9ca2"},
-    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:112cfead1bd22eada8a8db9ed387bd3e8be5528debc42b5d3c1f7da4ffaf9fb5"},
-    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:af87e906355fa42447be5c08c5d44e6e1c005bf142f303f726ddf5ed6e0c8a4d"},
-    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f30090e22a301952c5abd0e493a1c8358b4f0b368b49fa3e4568ed3ed68b8d1f"},
-    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ae871d09901911eedda1981ea6fd0f62a999107293cdc4c4fd612321c5b34745"},
-    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ed7c9debf7bfc63c9b9f8b595409237774ff4b061bf29fba6f53b287a2fdeab9"},
-    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:13121fa22dcd2c7b19c5161e3fd725692448f05377b788da4502a383573227b3"},
-    {file = "coverage-7.0.3-cp311-cp311-win32.whl", hash = "sha256:037b51ee86bc600f99b3b957c20a172431c35c2ef9c1ca34bc813ab5b51fd9f5"},
-    {file = "coverage-7.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:25fde928306034e8deecd5fc91a07432dcc282c8acb76749581a28963c9f4f3f"},
-    {file = "coverage-7.0.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7e8b0642c38b3d3b3c01417643ccc645345b03c32a2e84ef93cdd6844d6fe530"},
-    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18b09811f849cc958d23f733a350a66b54a8de3fed1e6128ba55a5c97ffb6f65"},
-    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:349d0b545520e8516f7b4f12373afc705d17d901e1de6a37a20e4ec9332b61f7"},
-    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b5b38813eee5b4739f505d94247604c72eae626d5088a16dd77b08b8b1724ab3"},
-    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ba9af1218fa01b1f11c72271bc7290b701d11ad4dbc2ae97c445ecacf6858dba"},
-    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c5648c7eec5cf1ba5db1cf2d6c10036a582d7f09e172990474a122e30c841361"},
-    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d0df04495b76a885bfef009f45eebe8fe2fbf815ad7a83dabcf5aced62f33162"},
-    {file = "coverage-7.0.3-cp37-cp37m-win32.whl", hash = "sha256:af6cef3796b8068713a48dd67d258dc9a6e2ebc3bd4645bfac03a09672fa5d20"},
-    {file = "coverage-7.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:62ef3800c4058844e2e3fa35faa9dd0ccde8a8aba6c763aae50342e00d4479d4"},
-    {file = "coverage-7.0.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:acef7f3a3825a2d218a03dd02f5f3cc7f27aa31d882dd780191d1ad101120d74"},
-    {file = "coverage-7.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a530663a361eb27375cec28aea5cd282089b5e4b022ae451c4c3493b026a68a5"},
-    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c58cd6bb46dcb922e0d5792850aab5964433d511b3a020867650f8d930dde4f4"},
-    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f918e9ef4c98f477a5458238dde2a1643aed956c7213873ab6b6b82e32b8ef61"},
-    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b865aa679bee7fbd1c55960940dbd3252621dd81468268786c67122bbd15343"},
-    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c5d9b480ebae60fc2cbc8d6865194136bc690538fa542ba58726433bed6e04cc"},
-    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:985ad2af5ec3dbb4fd75d5b0735752c527ad183455520055a08cf8d6794cabfc"},
-    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ca15308ef722f120967af7474ba6a453e0f5b6f331251e20b8145497cf1bc14a"},
-    {file = "coverage-7.0.3-cp38-cp38-win32.whl", hash = "sha256:c1cee10662c25c94415bbb987f2ec0e6ba9e8fce786334b10be7e6a7ab958f69"},
-    {file = "coverage-7.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:44d6a556de4418f1f3bfd57094b8c49f0408df5a433cf0d253eeb3075261c762"},
-    {file = "coverage-7.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e6dcc70a25cb95df0ae33dfc701de9b09c37f7dd9f00394d684a5b57257f8246"},
-    {file = "coverage-7.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:bf76d79dfaea802f0f28f50153ffbc1a74ae1ee73e480baeda410b4f3e7ab25f"},
-    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88834e5d56d01c141c29deedacba5773fe0bed900b1edc957595a8a6c0da1c3c"},
-    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef001a60e888f8741e42e5aa79ae55c91be73761e4df5e806efca1ddd62fd400"},
-    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4959dc506be74e4963bd2c42f7b87d8e4b289891201e19ec551e64c6aa5441f8"},
-    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b791beb17b32ac019a78cfbe6184f992b6273fdca31145b928ad2099435e2fcb"},
-    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b07651e3b9af8f1a092861d88b4c74d913634a7f1f2280fca0ad041ad84e9e96"},
-    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:55e46fa4168ccb7497c9be78627fcb147e06f474f846a10d55feeb5108a24ef0"},
-    {file = "coverage-7.0.3-cp39-cp39-win32.whl", hash = "sha256:e3f1cd1cd65695b1540b3cf7828d05b3515974a9d7c7530f762ac40f58a18161"},
-    {file = "coverage-7.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:d8249666c23683f74f8f93aeaa8794ac87cc61c40ff70374a825f3352a4371dc"},
-    {file = "coverage-7.0.3-pp37.pp38.pp39-none-any.whl", hash = "sha256:b1ffc8f58b81baed3f8962e28c30d99442079b82ce1ec836a1f67c0accad91c1"},
-    {file = "coverage-7.0.3.tar.gz", hash = "sha256:d5be4e93acce64f516bf4fd239c0e6118fc913c93fa1a3f52d15bdcc60d97b2d"},
-]
-exceptiongroup = [
-    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
-    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
-]
-flake8 = [
-    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
-    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
-]
-importlib-metadata = [
-    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
-    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
-]
-iniconfig = [
-    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
-    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
-]
-isort = [
-    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
-    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
-]
-mccabe = [
-    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
-    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
-]
-mypy-extensions = [
-    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
-    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
-]
-packaging = [
-    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
-    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
-]
-pathspec = [
-    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
-    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
-]
-platformdirs = [
-    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
-    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
-]
-pluggy = [
-    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
-    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
-]
-py4j = [
-    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
-    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
-]
-pycodestyle = [
-    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
-    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
-]
-pyflakes = [
-    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
-    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
-]
-pyspark = [
-    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
-]
-pytest = [
-    {file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"},
-    {file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"},
-]
-pytest-cov = [
-    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
-    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
-]
-pytest-dependency = [
-    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
-]
-pytest-tap = [
-    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
-    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
-]
-"tap.py" = [
-    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
-    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
-]
-tomli = [
-    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
-    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
-]
-typed-ast = [
+files = [
     {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"},
     {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"},
     {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"},
@@ -547,11 +521,36 @@ typed-ast = [
     {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"},
     {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"},
 ]
-typing-extensions = [
+
+[[package]]
+name = "typing-extensions"
+version = "4.4.0"
+description = "Backported and Experimental Type Hints for Python 3.7+"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+files = [
     {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"},
     {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"},
 ]
-zipp = [
+
+[[package]]
+name = "zipp"
+version = "3.11.0"
+description = "Backport of pathlib-compatible object wrapper for zip files"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+files = [
     {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"},
     {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"},
 ]
+
+[package.extras]
+docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
+testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
+
+[metadata]
+lock-version = "2.0"
+python-versions = "^3.7"
+content-hash = "47195533df022e7b95b52d864c2019390362d2c1047797ed1f10b218c48be23f"
diff --git a/pyproject.toml b/pyproject.toml
index 1f3f88bf..5cbdfe76 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -10,7 +10,7 @@ python = "^3.7"
 pyspark = "3.1.1"
 
 [tool.poetry.dev-dependencies]
-pytest = "^7.2.0"
+pytest = "^7.2.1"
 black = "^22.12"
 isort = "^5.11.4"
 flake8 = "^5.0.4"

From 116addb148b9697089bfc8d927352197e18d84b2 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 17 Jan 2023 11:51:21 +0000
Subject: [PATCH 020/531] Lock Rewritten.

---
 poetry.lock | 390 ++++++++++++++++++++++++++--------------------------
 1 file changed, 195 insertions(+), 195 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 3548fd3a..230fc0b0 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,5 +1,3 @@
-# This file is automatically @generated by Poetry and should not be changed by hand.
-
 [[package]]
 name = "attrs"
 version = "22.2.0"
@@ -7,10 +5,6 @@ description = "Classes Without Boilerplate"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
-    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
-]
 
 [package.extras]
 cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"]
@@ -26,20 +20,6 @@ description = "The uncompromising code formatter."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
-    {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
-    {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
-    {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
-    {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
-    {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
-    {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
-    {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
-    {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
-    {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
-    {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
-    {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
-]
 
 [package.dependencies]
 click = ">=8.0.0"
@@ -63,10 +43,6 @@ description = "Pyspark test helper library"
 category = "dev"
 optional = false
 python-versions = ">=3.5"
-files = [
-    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
-    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
-]
 
 [[package]]
 name = "click"
@@ -75,10 +51,6 @@ description = "Composable command line interface toolkit"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
-    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
-]
 
 [package.dependencies]
 colorama = {version = "*", markers = "platform_system == \"Windows\""}
@@ -91,10 +63,6 @@ description = "Cross-platform colored terminal text."
 category = "dev"
 optional = false
 python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
-files = [
-    {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
-    {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
-]
 
 [[package]]
 name = "coverage"
@@ -103,59 +71,6 @@ description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "coverage-7.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f7c51b6074a8a3063c341953dffe48fd6674f8e4b1d3c8aa8a91f58d6e716a8"},
-    {file = "coverage-7.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:628f47eaf66727fc986d3b190d6fa32f5e6b7754a243919d28bc0fd7974c449f"},
-    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e89d5abf86c104de808108a25d171ad646c07eda96ca76c8b237b94b9c71e518"},
-    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75e43c6f4ea4d122dac389aabdf9d4f0e160770a75e63372f88005d90f5bcc80"},
-    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49da0ff241827ebb52d5d6d5a36d33b455fa5e721d44689c95df99fd8db82437"},
-    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0bce4ad5bdd0b02e177a085d28d2cea5fc57bb4ba2cead395e763e34cf934eb1"},
-    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f79691335257d60951638dd43576b9bcd6f52baa5c1c2cd07a509bb003238372"},
-    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5722269ed05fbdb94eef431787c66b66260ff3125d1a9afcc00facff8c45adf9"},
-    {file = "coverage-7.0.3-cp310-cp310-win32.whl", hash = "sha256:bdbda870e0fda7dd0fe7db7135ca226ec4c1ade8aa76e96614829b56ca491012"},
-    {file = "coverage-7.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:e56fae4292e216b8deeee38ace84557b9fa85b52db005368a275427cdabb8192"},
-    {file = "coverage-7.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b82343a5bc51627b9d606f0b6b6b9551db7b6311a5dd920fa52a94beae2e8959"},
-    {file = "coverage-7.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fd0a8aa431f9b7ad9eb8264f55ef83cbb254962af3775092fb6e93890dea9ca2"},
-    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:112cfead1bd22eada8a8db9ed387bd3e8be5528debc42b5d3c1f7da4ffaf9fb5"},
-    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:af87e906355fa42447be5c08c5d44e6e1c005bf142f303f726ddf5ed6e0c8a4d"},
-    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f30090e22a301952c5abd0e493a1c8358b4f0b368b49fa3e4568ed3ed68b8d1f"},
-    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ae871d09901911eedda1981ea6fd0f62a999107293cdc4c4fd612321c5b34745"},
-    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ed7c9debf7bfc63c9b9f8b595409237774ff4b061bf29fba6f53b287a2fdeab9"},
-    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:13121fa22dcd2c7b19c5161e3fd725692448f05377b788da4502a383573227b3"},
-    {file = "coverage-7.0.3-cp311-cp311-win32.whl", hash = "sha256:037b51ee86bc600f99b3b957c20a172431c35c2ef9c1ca34bc813ab5b51fd9f5"},
-    {file = "coverage-7.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:25fde928306034e8deecd5fc91a07432dcc282c8acb76749581a28963c9f4f3f"},
-    {file = "coverage-7.0.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7e8b0642c38b3d3b3c01417643ccc645345b03c32a2e84ef93cdd6844d6fe530"},
-    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18b09811f849cc958d23f733a350a66b54a8de3fed1e6128ba55a5c97ffb6f65"},
-    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:349d0b545520e8516f7b4f12373afc705d17d901e1de6a37a20e4ec9332b61f7"},
-    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b5b38813eee5b4739f505d94247604c72eae626d5088a16dd77b08b8b1724ab3"},
-    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ba9af1218fa01b1f11c72271bc7290b701d11ad4dbc2ae97c445ecacf6858dba"},
-    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c5648c7eec5cf1ba5db1cf2d6c10036a582d7f09e172990474a122e30c841361"},
-    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d0df04495b76a885bfef009f45eebe8fe2fbf815ad7a83dabcf5aced62f33162"},
-    {file = "coverage-7.0.3-cp37-cp37m-win32.whl", hash = "sha256:af6cef3796b8068713a48dd67d258dc9a6e2ebc3bd4645bfac03a09672fa5d20"},
-    {file = "coverage-7.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:62ef3800c4058844e2e3fa35faa9dd0ccde8a8aba6c763aae50342e00d4479d4"},
-    {file = "coverage-7.0.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:acef7f3a3825a2d218a03dd02f5f3cc7f27aa31d882dd780191d1ad101120d74"},
-    {file = "coverage-7.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a530663a361eb27375cec28aea5cd282089b5e4b022ae451c4c3493b026a68a5"},
-    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c58cd6bb46dcb922e0d5792850aab5964433d511b3a020867650f8d930dde4f4"},
-    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f918e9ef4c98f477a5458238dde2a1643aed956c7213873ab6b6b82e32b8ef61"},
-    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b865aa679bee7fbd1c55960940dbd3252621dd81468268786c67122bbd15343"},
-    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c5d9b480ebae60fc2cbc8d6865194136bc690538fa542ba58726433bed6e04cc"},
-    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:985ad2af5ec3dbb4fd75d5b0735752c527ad183455520055a08cf8d6794cabfc"},
-    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ca15308ef722f120967af7474ba6a453e0f5b6f331251e20b8145497cf1bc14a"},
-    {file = "coverage-7.0.3-cp38-cp38-win32.whl", hash = "sha256:c1cee10662c25c94415bbb987f2ec0e6ba9e8fce786334b10be7e6a7ab958f69"},
-    {file = "coverage-7.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:44d6a556de4418f1f3bfd57094b8c49f0408df5a433cf0d253eeb3075261c762"},
-    {file = "coverage-7.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e6dcc70a25cb95df0ae33dfc701de9b09c37f7dd9f00394d684a5b57257f8246"},
-    {file = "coverage-7.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:bf76d79dfaea802f0f28f50153ffbc1a74ae1ee73e480baeda410b4f3e7ab25f"},
-    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88834e5d56d01c141c29deedacba5773fe0bed900b1edc957595a8a6c0da1c3c"},
-    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef001a60e888f8741e42e5aa79ae55c91be73761e4df5e806efca1ddd62fd400"},
-    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4959dc506be74e4963bd2c42f7b87d8e4b289891201e19ec551e64c6aa5441f8"},
-    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b791beb17b32ac019a78cfbe6184f992b6273fdca31145b928ad2099435e2fcb"},
-    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b07651e3b9af8f1a092861d88b4c74d913634a7f1f2280fca0ad041ad84e9e96"},
-    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:55e46fa4168ccb7497c9be78627fcb147e06f474f846a10d55feeb5108a24ef0"},
-    {file = "coverage-7.0.3-cp39-cp39-win32.whl", hash = "sha256:e3f1cd1cd65695b1540b3cf7828d05b3515974a9d7c7530f762ac40f58a18161"},
-    {file = "coverage-7.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:d8249666c23683f74f8f93aeaa8794ac87cc61c40ff70374a825f3352a4371dc"},
-    {file = "coverage-7.0.3-pp37.pp38.pp39-none-any.whl", hash = "sha256:b1ffc8f58b81baed3f8962e28c30d99442079b82ce1ec836a1f67c0accad91c1"},
-    {file = "coverage-7.0.3.tar.gz", hash = "sha256:d5be4e93acce64f516bf4fd239c0e6118fc913c93fa1a3f52d15bdcc60d97b2d"},
-]
 
 [package.dependencies]
 tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}
@@ -170,10 +85,6 @@ description = "Backport of PEP 654 (exception groups)"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
-    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
-]
 
 [package.extras]
 test = ["pytest (>=6)"]
@@ -185,10 +96,6 @@ description = "the modular source code checker: pep8 pyflakes and co"
 category = "dev"
 optional = false
 python-versions = ">=3.6.1"
-files = [
-    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
-    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
-]
 
 [package.dependencies]
 importlib-metadata = {version = ">=1.1.0,<4.3", markers = "python_version < \"3.8\""}
@@ -203,10 +110,6 @@ description = "Read metadata from Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
-    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
-]
 
 [package.dependencies]
 typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""}
@@ -223,10 +126,6 @@ description = "iniconfig: brain-dead simple config-ini parsing"
 category = "dev"
 optional = false
 python-versions = "*"
-files = [
-    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
-    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
-]
 
 [[package]]
 name = "isort"
@@ -235,10 +134,6 @@ description = "A Python utility / library to sort Python imports."
 category = "dev"
 optional = false
 python-versions = ">=3.7.0"
-files = [
-    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
-    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
-]
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
@@ -253,10 +148,6 @@ description = "McCabe checker, plugin for flake8"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
-    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
-]
 
 [[package]]
 name = "mypy-extensions"
@@ -265,10 +156,6 @@ description = "Experimental type system extensions for programs checked with the
 category = "dev"
 optional = false
 python-versions = "*"
-files = [
-    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
-    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
-]
 
 [[package]]
 name = "packaging"
@@ -277,10 +164,6 @@ description = "Core utilities for Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
-    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
-]
 
 [[package]]
 name = "pathspec"
@@ -289,10 +172,6 @@ description = "Utility library for gitignore style pattern matching of file path
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
-    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
-]
 
 [[package]]
 name = "platformdirs"
@@ -301,10 +180,6 @@ description = "A small Python package for determining appropriate platform-speci
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
-    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
-]
 
 [package.dependencies]
 typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""}
@@ -320,10 +195,6 @@ description = "plugin and hook calling mechanisms for python"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
-    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
-]
 
 [package.dependencies]
 importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
@@ -339,10 +210,6 @@ description = "Enables Python programs to dynamically access arbitrary Java obje
 category = "main"
 optional = false
 python-versions = "*"
-files = [
-    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
-    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
-]
 
 [[package]]
 name = "pycodestyle"
@@ -351,10 +218,6 @@ description = "Python style guide checker"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
-    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
-]
 
 [[package]]
 name = "pyflakes"
@@ -363,10 +226,6 @@ description = "passive checker of Python programs"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
-    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
-]
 
 [[package]]
 name = "pyspark"
@@ -375,9 +234,6 @@ description = "Apache Spark Python API"
 category = "main"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
-]
 
 [package.dependencies]
 py4j = "0.10.9"
@@ -394,10 +250,6 @@ description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
-    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
-]
 
 [package.dependencies]
 attrs = ">=19.2.0"
@@ -419,10 +271,6 @@ description = "Pytest plugin for measuring coverage."
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
-    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
-]
 
 [package.dependencies]
 coverage = {version = ">=5.2.1", extras = ["toml"]}
@@ -438,9 +286,6 @@ description = "Manage dependencies of tests"
 category = "dev"
 optional = false
 python-versions = "*"
-files = [
-    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
-]
 
 [package.dependencies]
 pytest = ">=3.6.0"
@@ -452,10 +297,6 @@ description = "Test Anything Protocol (TAP) reporting plugin for pytest"
 category = "dev"
 optional = false
 python-versions = "*"
-files = [
-    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
-    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
-]
 
 [package.dependencies]
 pytest = ">=3.0"
@@ -468,10 +309,6 @@ description = "Test Anything Protocol (TAP) tools"
 category = "dev"
 optional = false
 python-versions = "*"
-files = [
-    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
-    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
-]
 
 [package.extras]
 yaml = ["PyYAML (>=5.1)", "more-itertools"]
@@ -483,10 +320,6 @@ description = "A lil' TOML parser"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
-    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
-]
 
 [[package]]
 name = "typed-ast"
@@ -495,7 +328,199 @@ description = "a fork of Python 2 and 3 ast modules with type comment support"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
+
+[[package]]
+name = "typing-extensions"
+version = "4.4.0"
+description = "Backported and Experimental Type Hints for Python 3.7+"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+
+[[package]]
+name = "zipp"
+version = "3.11.0"
+description = "Backport of pathlib-compatible object wrapper for zip files"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+
+[package.extras]
+docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
+testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
+
+[metadata]
+lock-version = "1.1"
+python-versions = "^3.7"
+content-hash = "47195533df022e7b95b52d864c2019390362d2c1047797ed1f10b218c48be23f"
+
+[metadata.files]
+attrs = [
+    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
+    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
+]
+black = [
+    {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
+    {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
+    {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
+    {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
+    {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
+    {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
+    {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
+    {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
+    {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
+    {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
+    {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
+    {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
+]
+chispa = [
+    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
+    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
+]
+click = [
+    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
+    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
+]
+colorama = [
+    {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
+    {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
+]
+coverage = [
+    {file = "coverage-7.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f7c51b6074a8a3063c341953dffe48fd6674f8e4b1d3c8aa8a91f58d6e716a8"},
+    {file = "coverage-7.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:628f47eaf66727fc986d3b190d6fa32f5e6b7754a243919d28bc0fd7974c449f"},
+    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e89d5abf86c104de808108a25d171ad646c07eda96ca76c8b237b94b9c71e518"},
+    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75e43c6f4ea4d122dac389aabdf9d4f0e160770a75e63372f88005d90f5bcc80"},
+    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49da0ff241827ebb52d5d6d5a36d33b455fa5e721d44689c95df99fd8db82437"},
+    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0bce4ad5bdd0b02e177a085d28d2cea5fc57bb4ba2cead395e763e34cf934eb1"},
+    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f79691335257d60951638dd43576b9bcd6f52baa5c1c2cd07a509bb003238372"},
+    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5722269ed05fbdb94eef431787c66b66260ff3125d1a9afcc00facff8c45adf9"},
+    {file = "coverage-7.0.3-cp310-cp310-win32.whl", hash = "sha256:bdbda870e0fda7dd0fe7db7135ca226ec4c1ade8aa76e96614829b56ca491012"},
+    {file = "coverage-7.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:e56fae4292e216b8deeee38ace84557b9fa85b52db005368a275427cdabb8192"},
+    {file = "coverage-7.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b82343a5bc51627b9d606f0b6b6b9551db7b6311a5dd920fa52a94beae2e8959"},
+    {file = "coverage-7.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fd0a8aa431f9b7ad9eb8264f55ef83cbb254962af3775092fb6e93890dea9ca2"},
+    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:112cfead1bd22eada8a8db9ed387bd3e8be5528debc42b5d3c1f7da4ffaf9fb5"},
+    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:af87e906355fa42447be5c08c5d44e6e1c005bf142f303f726ddf5ed6e0c8a4d"},
+    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f30090e22a301952c5abd0e493a1c8358b4f0b368b49fa3e4568ed3ed68b8d1f"},
+    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ae871d09901911eedda1981ea6fd0f62a999107293cdc4c4fd612321c5b34745"},
+    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ed7c9debf7bfc63c9b9f8b595409237774ff4b061bf29fba6f53b287a2fdeab9"},
+    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:13121fa22dcd2c7b19c5161e3fd725692448f05377b788da4502a383573227b3"},
+    {file = "coverage-7.0.3-cp311-cp311-win32.whl", hash = "sha256:037b51ee86bc600f99b3b957c20a172431c35c2ef9c1ca34bc813ab5b51fd9f5"},
+    {file = "coverage-7.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:25fde928306034e8deecd5fc91a07432dcc282c8acb76749581a28963c9f4f3f"},
+    {file = "coverage-7.0.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7e8b0642c38b3d3b3c01417643ccc645345b03c32a2e84ef93cdd6844d6fe530"},
+    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18b09811f849cc958d23f733a350a66b54a8de3fed1e6128ba55a5c97ffb6f65"},
+    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:349d0b545520e8516f7b4f12373afc705d17d901e1de6a37a20e4ec9332b61f7"},
+    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b5b38813eee5b4739f505d94247604c72eae626d5088a16dd77b08b8b1724ab3"},
+    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ba9af1218fa01b1f11c72271bc7290b701d11ad4dbc2ae97c445ecacf6858dba"},
+    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c5648c7eec5cf1ba5db1cf2d6c10036a582d7f09e172990474a122e30c841361"},
+    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d0df04495b76a885bfef009f45eebe8fe2fbf815ad7a83dabcf5aced62f33162"},
+    {file = "coverage-7.0.3-cp37-cp37m-win32.whl", hash = "sha256:af6cef3796b8068713a48dd67d258dc9a6e2ebc3bd4645bfac03a09672fa5d20"},
+    {file = "coverage-7.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:62ef3800c4058844e2e3fa35faa9dd0ccde8a8aba6c763aae50342e00d4479d4"},
+    {file = "coverage-7.0.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:acef7f3a3825a2d218a03dd02f5f3cc7f27aa31d882dd780191d1ad101120d74"},
+    {file = "coverage-7.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a530663a361eb27375cec28aea5cd282089b5e4b022ae451c4c3493b026a68a5"},
+    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c58cd6bb46dcb922e0d5792850aab5964433d511b3a020867650f8d930dde4f4"},
+    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f918e9ef4c98f477a5458238dde2a1643aed956c7213873ab6b6b82e32b8ef61"},
+    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b865aa679bee7fbd1c55960940dbd3252621dd81468268786c67122bbd15343"},
+    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c5d9b480ebae60fc2cbc8d6865194136bc690538fa542ba58726433bed6e04cc"},
+    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:985ad2af5ec3dbb4fd75d5b0735752c527ad183455520055a08cf8d6794cabfc"},
+    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ca15308ef722f120967af7474ba6a453e0f5b6f331251e20b8145497cf1bc14a"},
+    {file = "coverage-7.0.3-cp38-cp38-win32.whl", hash = "sha256:c1cee10662c25c94415bbb987f2ec0e6ba9e8fce786334b10be7e6a7ab958f69"},
+    {file = "coverage-7.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:44d6a556de4418f1f3bfd57094b8c49f0408df5a433cf0d253eeb3075261c762"},
+    {file = "coverage-7.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e6dcc70a25cb95df0ae33dfc701de9b09c37f7dd9f00394d684a5b57257f8246"},
+    {file = "coverage-7.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:bf76d79dfaea802f0f28f50153ffbc1a74ae1ee73e480baeda410b4f3e7ab25f"},
+    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88834e5d56d01c141c29deedacba5773fe0bed900b1edc957595a8a6c0da1c3c"},
+    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef001a60e888f8741e42e5aa79ae55c91be73761e4df5e806efca1ddd62fd400"},
+    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4959dc506be74e4963bd2c42f7b87d8e4b289891201e19ec551e64c6aa5441f8"},
+    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b791beb17b32ac019a78cfbe6184f992b6273fdca31145b928ad2099435e2fcb"},
+    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b07651e3b9af8f1a092861d88b4c74d913634a7f1f2280fca0ad041ad84e9e96"},
+    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:55e46fa4168ccb7497c9be78627fcb147e06f474f846a10d55feeb5108a24ef0"},
+    {file = "coverage-7.0.3-cp39-cp39-win32.whl", hash = "sha256:e3f1cd1cd65695b1540b3cf7828d05b3515974a9d7c7530f762ac40f58a18161"},
+    {file = "coverage-7.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:d8249666c23683f74f8f93aeaa8794ac87cc61c40ff70374a825f3352a4371dc"},
+    {file = "coverage-7.0.3-pp37.pp38.pp39-none-any.whl", hash = "sha256:b1ffc8f58b81baed3f8962e28c30d99442079b82ce1ec836a1f67c0accad91c1"},
+    {file = "coverage-7.0.3.tar.gz", hash = "sha256:d5be4e93acce64f516bf4fd239c0e6118fc913c93fa1a3f52d15bdcc60d97b2d"},
+]
+exceptiongroup = [
+    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
+    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
+]
+flake8 = [
+    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
+    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
+]
+importlib-metadata = [
+    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
+    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
+]
+iniconfig = [
+    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
+    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
+]
+isort = [
+    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
+    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
+]
+mccabe = [
+    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
+    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
+]
+mypy-extensions = [
+    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
+    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
+]
+packaging = [
+    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
+    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
+]
+pathspec = [
+    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
+    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
+]
+platformdirs = [
+    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
+    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
+]
+pluggy = [
+    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
+    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
+]
+py4j = [
+    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
+    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
+]
+pycodestyle = [
+    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
+    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
+]
+pyflakes = [
+    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
+    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
+]
+pyspark = [
+    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
+]
+pytest = [
+    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
+    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
+]
+pytest-cov = [
+    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
+    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
+]
+pytest-dependency = [
+    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
+]
+pytest-tap = [
+    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
+    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
+]
+"tap.py" = [
+    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
+    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
+]
+tomli = [
+    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
+    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+]
+typed-ast = [
     {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"},
     {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"},
     {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"},
@@ -521,36 +546,11 @@ files = [
     {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"},
     {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"},
 ]
-
-[[package]]
-name = "typing-extensions"
-version = "4.4.0"
-description = "Backported and Experimental Type Hints for Python 3.7+"
-category = "dev"
-optional = false
-python-versions = ">=3.7"
-files = [
+typing-extensions = [
     {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"},
     {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"},
 ]
-
-[[package]]
-name = "zipp"
-version = "3.11.0"
-description = "Backport of pathlib-compatible object wrapper for zip files"
-category = "dev"
-optional = false
-python-versions = ">=3.7"
-files = [
+zipp = [
     {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"},
     {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"},
 ]
-
-[package.extras]
-docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
-testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
-
-[metadata]
-lock-version = "2.0"
-python-versions = "^3.7"
-content-hash = "47195533df022e7b95b52d864c2019390362d2c1047797ed1f10b218c48be23f"

From 3231fdd22861abedcdefe14180b81e55ce3cdb9d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 17 Jan 2023 12:18:35 +0000
Subject: [PATCH 021/531] Bump coverage from 7.0.3 to 7.0.5

Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.0.3 to 7.0.5.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/7.0.3...7.0.5)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 poetry.lock | 392 ++++++++++++++++++++++++++--------------------------
 1 file changed, 196 insertions(+), 196 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 230fc0b0..5dbb1c76 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,3 +1,5 @@
+# This file is automatically @generated by Poetry and should not be changed by hand.
+
 [[package]]
 name = "attrs"
 version = "22.2.0"
@@ -5,6 +7,10 @@ description = "Classes Without Boilerplate"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
+    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
+]
 
 [package.extras]
 cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"]
@@ -20,6 +26,20 @@ description = "The uncompromising code formatter."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
+    {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
+    {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
+    {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
+    {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
+    {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
+    {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
+    {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
+    {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
+    {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
+    {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
+    {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
+]
 
 [package.dependencies]
 click = ">=8.0.0"
@@ -43,6 +63,10 @@ description = "Pyspark test helper library"
 category = "dev"
 optional = false
 python-versions = ">=3.5"
+files = [
+    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
+    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
+]
 
 [[package]]
 name = "click"
@@ -51,6 +75,10 @@ description = "Composable command line interface toolkit"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
+    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
+]
 
 [package.dependencies]
 colorama = {version = "*", markers = "platform_system == \"Windows\""}
@@ -63,14 +91,71 @@ description = "Cross-platform colored terminal text."
 category = "dev"
 optional = false
 python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
+files = [
+    {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
+    {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
+]
 
 [[package]]
 name = "coverage"
-version = "7.0.3"
+version = "7.0.5"
 description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "coverage-7.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2a7f23bbaeb2a87f90f607730b45564076d870f1fb07b9318d0c21f36871932b"},
+    {file = "coverage-7.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c18d47f314b950dbf24a41787ced1474e01ca816011925976d90a88b27c22b89"},
+    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef14d75d86f104f03dea66c13188487151760ef25dd6b2dbd541885185f05f40"},
+    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66e50680e888840c0995f2ad766e726ce71ca682e3c5f4eee82272c7671d38a2"},
+    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9fed35ca8c6e946e877893bbac022e8563b94404a605af1d1e6accc7eb73289"},
+    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d8d04e755934195bdc1db45ba9e040b8d20d046d04d6d77e71b3b34a8cc002d0"},
+    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e109f1c9a3ece676597831874126555997c48f62bddbcace6ed17be3e372de8"},
+    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0a1890fca2962c4f1ad16551d660b46ea77291fba2cc21c024cd527b9d9c8809"},
+    {file = "coverage-7.0.5-cp310-cp310-win32.whl", hash = "sha256:be9fcf32c010da0ba40bf4ee01889d6c737658f4ddff160bd7eb9cac8f094b21"},
+    {file = "coverage-7.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:cbfcba14a3225b055a28b3199c3d81cd0ab37d2353ffd7f6fd64844cebab31ad"},
+    {file = "coverage-7.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30b5fec1d34cc932c1bc04017b538ce16bf84e239378b8f75220478645d11fca"},
+    {file = "coverage-7.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1caed2367b32cc80a2b7f58a9f46658218a19c6cfe5bc234021966dc3daa01f0"},
+    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d254666d29540a72d17cc0175746cfb03d5123db33e67d1020e42dae611dc196"},
+    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19245c249aa711d954623d94f23cc94c0fd65865661f20b7781210cb97c471c0"},
+    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b05ed4b35bf6ee790832f68932baf1f00caa32283d66cc4d455c9e9d115aafc"},
+    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:29de916ba1099ba2aab76aca101580006adfac5646de9b7c010a0f13867cba45"},
+    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e057e74e53db78122a3979f908973e171909a58ac20df05c33998d52e6d35757"},
+    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:411d4ff9d041be08fdfc02adf62e89c735b9468f6d8f6427f8a14b6bb0a85095"},
+    {file = "coverage-7.0.5-cp311-cp311-win32.whl", hash = "sha256:52ab14b9e09ce052237dfe12d6892dd39b0401690856bcfe75d5baba4bfe2831"},
+    {file = "coverage-7.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:1f66862d3a41674ebd8d1a7b6f5387fe5ce353f8719040a986551a545d7d83ea"},
+    {file = "coverage-7.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b69522b168a6b64edf0c33ba53eac491c0a8f5cc94fa4337f9c6f4c8f2f5296c"},
+    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436e103950d05b7d7f55e39beeb4d5be298ca3e119e0589c0227e6d0b01ee8c7"},
+    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8c56bec53d6e3154eaff6ea941226e7bd7cc0d99f9b3756c2520fc7a94e6d96"},
+    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a38362528a9115a4e276e65eeabf67dcfaf57698e17ae388599568a78dcb029"},
+    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f67472c09a0c7486e27f3275f617c964d25e35727af952869dd496b9b5b7f6a3"},
+    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:220e3fa77d14c8a507b2d951e463b57a1f7810a6443a26f9b7591ef39047b1b2"},
+    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ecb0f73954892f98611e183f50acdc9e21a4653f294dfbe079da73c6378a6f47"},
+    {file = "coverage-7.0.5-cp37-cp37m-win32.whl", hash = "sha256:d8f3e2e0a1d6777e58e834fd5a04657f66affa615dae61dd67c35d1568c38882"},
+    {file = "coverage-7.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9e662e6fc4f513b79da5d10a23edd2b87685815b337b1a30cd11307a6679148d"},
+    {file = "coverage-7.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:790e4433962c9f454e213b21b0fd4b42310ade9c077e8edcb5113db0818450cb"},
+    {file = "coverage-7.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49640bda9bda35b057b0e65b7c43ba706fa2335c9a9896652aebe0fa399e80e6"},
+    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d66187792bfe56f8c18ba986a0e4ae44856b1c645336bd2c776e3386da91e1dd"},
+    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:276f4cd0001cd83b00817c8db76730938b1ee40f4993b6a905f40a7278103b3a"},
+    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95304068686545aa368b35dfda1cdfbbdbe2f6fe43de4a2e9baa8ebd71be46e2"},
+    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:17e01dd8666c445025c29684d4aabf5a90dc6ef1ab25328aa52bedaa95b65ad7"},
+    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea76dbcad0b7b0deb265d8c36e0801abcddf6cc1395940a24e3595288b405ca0"},
+    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:50a6adc2be8edd7ee67d1abc3cd20678987c7b9d79cd265de55941e3d0d56499"},
+    {file = "coverage-7.0.5-cp38-cp38-win32.whl", hash = "sha256:e4ce984133b888cc3a46867c8b4372c7dee9cee300335e2925e197bcd45b9e16"},
+    {file = "coverage-7.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:4a950f83fd3f9bca23b77442f3a2b2ea4ac900944d8af9993743774c4fdc57af"},
+    {file = "coverage-7.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c2155943896ac78b9b0fd910fb381186d0c345911f5333ee46ac44c8f0e43ab"},
+    {file = "coverage-7.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:54f7e9705e14b2c9f6abdeb127c390f679f6dbe64ba732788d3015f7f76ef637"},
+    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ee30375b409d9a7ea0f30c50645d436b6f5dfee254edffd27e45a980ad2c7f4"},
+    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b78729038abea6a5df0d2708dce21e82073463b2d79d10884d7d591e0f385ded"},
+    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13250b1f0bd023e0c9f11838bdeb60214dd5b6aaf8e8d2f110c7e232a1bff83b"},
+    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c407b1950b2d2ffa091f4e225ca19a66a9bd81222f27c56bd12658fc5ca1209"},
+    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c76a3075e96b9c9ff00df8b5f7f560f5634dffd1658bafb79eb2682867e94f78"},
+    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f26648e1b3b03b6022b48a9b910d0ae209e2d51f50441db5dce5b530fad6d9b1"},
+    {file = "coverage-7.0.5-cp39-cp39-win32.whl", hash = "sha256:ba3027deb7abf02859aca49c865ece538aee56dcb4871b4cced23ba4d5088904"},
+    {file = "coverage-7.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:949844af60ee96a376aac1ded2a27e134b8c8d35cc006a52903fc06c24a3296f"},
+    {file = "coverage-7.0.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:b9727ac4f5cf2cbf87880a63870b5b9730a8ae3a4a360241a0fdaa2f71240ff0"},
+    {file = "coverage-7.0.5.tar.gz", hash = "sha256:051afcbd6d2ac39298d62d340f94dbb6a1f31de06dfaf6fcef7b759dd3860c45"},
+]
 
 [package.dependencies]
 tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}
@@ -85,6 +170,10 @@ description = "Backport of PEP 654 (exception groups)"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
+    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
+]
 
 [package.extras]
 test = ["pytest (>=6)"]
@@ -96,6 +185,10 @@ description = "the modular source code checker: pep8 pyflakes and co"
 category = "dev"
 optional = false
 python-versions = ">=3.6.1"
+files = [
+    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
+    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
+]
 
 [package.dependencies]
 importlib-metadata = {version = ">=1.1.0,<4.3", markers = "python_version < \"3.8\""}
@@ -110,6 +203,10 @@ description = "Read metadata from Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
+    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
+]
 
 [package.dependencies]
 typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""}
@@ -126,6 +223,10 @@ description = "iniconfig: brain-dead simple config-ini parsing"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
+    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
+]
 
 [[package]]
 name = "isort"
@@ -134,6 +235,10 @@ description = "A Python utility / library to sort Python imports."
 category = "dev"
 optional = false
 python-versions = ">=3.7.0"
+files = [
+    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
+    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
+]
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
@@ -148,6 +253,10 @@ description = "McCabe checker, plugin for flake8"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
+    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
+]
 
 [[package]]
 name = "mypy-extensions"
@@ -156,6 +265,10 @@ description = "Experimental type system extensions for programs checked with the
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
+    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
+]
 
 [[package]]
 name = "packaging"
@@ -164,6 +277,10 @@ description = "Core utilities for Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
+    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
+]
 
 [[package]]
 name = "pathspec"
@@ -172,6 +289,10 @@ description = "Utility library for gitignore style pattern matching of file path
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
+    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
+]
 
 [[package]]
 name = "platformdirs"
@@ -180,6 +301,10 @@ description = "A small Python package for determining appropriate platform-speci
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
+    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
+]
 
 [package.dependencies]
 typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""}
@@ -195,6 +320,10 @@ description = "plugin and hook calling mechanisms for python"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
+    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
+]
 
 [package.dependencies]
 importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
@@ -210,6 +339,10 @@ description = "Enables Python programs to dynamically access arbitrary Java obje
 category = "main"
 optional = false
 python-versions = "*"
+files = [
+    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
+    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
+]
 
 [[package]]
 name = "pycodestyle"
@@ -218,6 +351,10 @@ description = "Python style guide checker"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
+    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
+]
 
 [[package]]
 name = "pyflakes"
@@ -226,6 +363,10 @@ description = "passive checker of Python programs"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
+    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
+]
 
 [[package]]
 name = "pyspark"
@@ -234,6 +375,9 @@ description = "Apache Spark Python API"
 category = "main"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
+]
 
 [package.dependencies]
 py4j = "0.10.9"
@@ -250,6 +394,10 @@ description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
+    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
+]
 
 [package.dependencies]
 attrs = ">=19.2.0"
@@ -271,6 +419,10 @@ description = "Pytest plugin for measuring coverage."
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
+    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
+]
 
 [package.dependencies]
 coverage = {version = ">=5.2.1", extras = ["toml"]}
@@ -286,6 +438,9 @@ description = "Manage dependencies of tests"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
+]
 
 [package.dependencies]
 pytest = ">=3.6.0"
@@ -297,6 +452,10 @@ description = "Test Anything Protocol (TAP) reporting plugin for pytest"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
+    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
+]
 
 [package.dependencies]
 pytest = ">=3.0"
@@ -309,6 +468,10 @@ description = "Test Anything Protocol (TAP) tools"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
+    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
+]
 
 [package.extras]
 yaml = ["PyYAML (>=5.1)", "more-itertools"]
@@ -320,6 +483,10 @@ description = "A lil' TOML parser"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
+    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+]
 
 [[package]]
 name = "typed-ast"
@@ -328,199 +495,7 @@ description = "a fork of Python 2 and 3 ast modules with type comment support"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-
-[[package]]
-name = "typing-extensions"
-version = "4.4.0"
-description = "Backported and Experimental Type Hints for Python 3.7+"
-category = "dev"
-optional = false
-python-versions = ">=3.7"
-
-[[package]]
-name = "zipp"
-version = "3.11.0"
-description = "Backport of pathlib-compatible object wrapper for zip files"
-category = "dev"
-optional = false
-python-versions = ">=3.7"
-
-[package.extras]
-docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
-testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
-
-[metadata]
-lock-version = "1.1"
-python-versions = "^3.7"
-content-hash = "47195533df022e7b95b52d864c2019390362d2c1047797ed1f10b218c48be23f"
-
-[metadata.files]
-attrs = [
-    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
-    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
-]
-black = [
-    {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
-    {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
-    {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
-    {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
-    {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
-    {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
-    {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
-    {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
-    {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
-    {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
-    {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
-    {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
-]
-chispa = [
-    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
-    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
-]
-click = [
-    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
-    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
-]
-colorama = [
-    {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
-    {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
-]
-coverage = [
-    {file = "coverage-7.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f7c51b6074a8a3063c341953dffe48fd6674f8e4b1d3c8aa8a91f58d6e716a8"},
-    {file = "coverage-7.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:628f47eaf66727fc986d3b190d6fa32f5e6b7754a243919d28bc0fd7974c449f"},
-    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e89d5abf86c104de808108a25d171ad646c07eda96ca76c8b237b94b9c71e518"},
-    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75e43c6f4ea4d122dac389aabdf9d4f0e160770a75e63372f88005d90f5bcc80"},
-    {file = "coverage-7.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49da0ff241827ebb52d5d6d5a36d33b455fa5e721d44689c95df99fd8db82437"},
-    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0bce4ad5bdd0b02e177a085d28d2cea5fc57bb4ba2cead395e763e34cf934eb1"},
-    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f79691335257d60951638dd43576b9bcd6f52baa5c1c2cd07a509bb003238372"},
-    {file = "coverage-7.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5722269ed05fbdb94eef431787c66b66260ff3125d1a9afcc00facff8c45adf9"},
-    {file = "coverage-7.0.3-cp310-cp310-win32.whl", hash = "sha256:bdbda870e0fda7dd0fe7db7135ca226ec4c1ade8aa76e96614829b56ca491012"},
-    {file = "coverage-7.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:e56fae4292e216b8deeee38ace84557b9fa85b52db005368a275427cdabb8192"},
-    {file = "coverage-7.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b82343a5bc51627b9d606f0b6b6b9551db7b6311a5dd920fa52a94beae2e8959"},
-    {file = "coverage-7.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fd0a8aa431f9b7ad9eb8264f55ef83cbb254962af3775092fb6e93890dea9ca2"},
-    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:112cfead1bd22eada8a8db9ed387bd3e8be5528debc42b5d3c1f7da4ffaf9fb5"},
-    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:af87e906355fa42447be5c08c5d44e6e1c005bf142f303f726ddf5ed6e0c8a4d"},
-    {file = "coverage-7.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f30090e22a301952c5abd0e493a1c8358b4f0b368b49fa3e4568ed3ed68b8d1f"},
-    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ae871d09901911eedda1981ea6fd0f62a999107293cdc4c4fd612321c5b34745"},
-    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ed7c9debf7bfc63c9b9f8b595409237774ff4b061bf29fba6f53b287a2fdeab9"},
-    {file = "coverage-7.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:13121fa22dcd2c7b19c5161e3fd725692448f05377b788da4502a383573227b3"},
-    {file = "coverage-7.0.3-cp311-cp311-win32.whl", hash = "sha256:037b51ee86bc600f99b3b957c20a172431c35c2ef9c1ca34bc813ab5b51fd9f5"},
-    {file = "coverage-7.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:25fde928306034e8deecd5fc91a07432dcc282c8acb76749581a28963c9f4f3f"},
-    {file = "coverage-7.0.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7e8b0642c38b3d3b3c01417643ccc645345b03c32a2e84ef93cdd6844d6fe530"},
-    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18b09811f849cc958d23f733a350a66b54a8de3fed1e6128ba55a5c97ffb6f65"},
-    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:349d0b545520e8516f7b4f12373afc705d17d901e1de6a37a20e4ec9332b61f7"},
-    {file = "coverage-7.0.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b5b38813eee5b4739f505d94247604c72eae626d5088a16dd77b08b8b1724ab3"},
-    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ba9af1218fa01b1f11c72271bc7290b701d11ad4dbc2ae97c445ecacf6858dba"},
-    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c5648c7eec5cf1ba5db1cf2d6c10036a582d7f09e172990474a122e30c841361"},
-    {file = "coverage-7.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d0df04495b76a885bfef009f45eebe8fe2fbf815ad7a83dabcf5aced62f33162"},
-    {file = "coverage-7.0.3-cp37-cp37m-win32.whl", hash = "sha256:af6cef3796b8068713a48dd67d258dc9a6e2ebc3bd4645bfac03a09672fa5d20"},
-    {file = "coverage-7.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:62ef3800c4058844e2e3fa35faa9dd0ccde8a8aba6c763aae50342e00d4479d4"},
-    {file = "coverage-7.0.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:acef7f3a3825a2d218a03dd02f5f3cc7f27aa31d882dd780191d1ad101120d74"},
-    {file = "coverage-7.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a530663a361eb27375cec28aea5cd282089b5e4b022ae451c4c3493b026a68a5"},
-    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c58cd6bb46dcb922e0d5792850aab5964433d511b3a020867650f8d930dde4f4"},
-    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f918e9ef4c98f477a5458238dde2a1643aed956c7213873ab6b6b82e32b8ef61"},
-    {file = "coverage-7.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b865aa679bee7fbd1c55960940dbd3252621dd81468268786c67122bbd15343"},
-    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c5d9b480ebae60fc2cbc8d6865194136bc690538fa542ba58726433bed6e04cc"},
-    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:985ad2af5ec3dbb4fd75d5b0735752c527ad183455520055a08cf8d6794cabfc"},
-    {file = "coverage-7.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ca15308ef722f120967af7474ba6a453e0f5b6f331251e20b8145497cf1bc14a"},
-    {file = "coverage-7.0.3-cp38-cp38-win32.whl", hash = "sha256:c1cee10662c25c94415bbb987f2ec0e6ba9e8fce786334b10be7e6a7ab958f69"},
-    {file = "coverage-7.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:44d6a556de4418f1f3bfd57094b8c49f0408df5a433cf0d253eeb3075261c762"},
-    {file = "coverage-7.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e6dcc70a25cb95df0ae33dfc701de9b09c37f7dd9f00394d684a5b57257f8246"},
-    {file = "coverage-7.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:bf76d79dfaea802f0f28f50153ffbc1a74ae1ee73e480baeda410b4f3e7ab25f"},
-    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88834e5d56d01c141c29deedacba5773fe0bed900b1edc957595a8a6c0da1c3c"},
-    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef001a60e888f8741e42e5aa79ae55c91be73761e4df5e806efca1ddd62fd400"},
-    {file = "coverage-7.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4959dc506be74e4963bd2c42f7b87d8e4b289891201e19ec551e64c6aa5441f8"},
-    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b791beb17b32ac019a78cfbe6184f992b6273fdca31145b928ad2099435e2fcb"},
-    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b07651e3b9af8f1a092861d88b4c74d913634a7f1f2280fca0ad041ad84e9e96"},
-    {file = "coverage-7.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:55e46fa4168ccb7497c9be78627fcb147e06f474f846a10d55feeb5108a24ef0"},
-    {file = "coverage-7.0.3-cp39-cp39-win32.whl", hash = "sha256:e3f1cd1cd65695b1540b3cf7828d05b3515974a9d7c7530f762ac40f58a18161"},
-    {file = "coverage-7.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:d8249666c23683f74f8f93aeaa8794ac87cc61c40ff70374a825f3352a4371dc"},
-    {file = "coverage-7.0.3-pp37.pp38.pp39-none-any.whl", hash = "sha256:b1ffc8f58b81baed3f8962e28c30d99442079b82ce1ec836a1f67c0accad91c1"},
-    {file = "coverage-7.0.3.tar.gz", hash = "sha256:d5be4e93acce64f516bf4fd239c0e6118fc913c93fa1a3f52d15bdcc60d97b2d"},
-]
-exceptiongroup = [
-    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
-    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
-]
-flake8 = [
-    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
-    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
-]
-importlib-metadata = [
-    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
-    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
-]
-iniconfig = [
-    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
-    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
-]
-isort = [
-    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
-    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
-]
-mccabe = [
-    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
-    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
-]
-mypy-extensions = [
-    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
-    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
-]
-packaging = [
-    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
-    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
-]
-pathspec = [
-    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
-    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
-]
-platformdirs = [
-    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
-    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
-]
-pluggy = [
-    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
-    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
-]
-py4j = [
-    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
-    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
-]
-pycodestyle = [
-    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
-    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
-]
-pyflakes = [
-    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
-    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
-]
-pyspark = [
-    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
-]
-pytest = [
-    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
-    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
-]
-pytest-cov = [
-    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
-    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
-]
-pytest-dependency = [
-    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
-]
-pytest-tap = [
-    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
-    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
-]
-"tap.py" = [
-    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
-    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
-]
-tomli = [
-    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
-    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
-]
-typed-ast = [
+files = [
     {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"},
     {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"},
     {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"},
@@ -546,11 +521,36 @@ typed-ast = [
     {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"},
     {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"},
 ]
-typing-extensions = [
+
+[[package]]
+name = "typing-extensions"
+version = "4.4.0"
+description = "Backported and Experimental Type Hints for Python 3.7+"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+files = [
     {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"},
     {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"},
 ]
-zipp = [
+
+[[package]]
+name = "zipp"
+version = "3.11.0"
+description = "Backport of pathlib-compatible object wrapper for zip files"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+files = [
     {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"},
     {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"},
 ]
+
+[package.extras]
+docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
+testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
+
+[metadata]
+lock-version = "2.0"
+python-versions = "^3.7"
+content-hash = "47195533df022e7b95b52d864c2019390362d2c1047797ed1f10b218c48be23f"

From 12ebc6430243cd2642f1b65f58fa16f6fb4a89ee Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 17 Jan 2023 12:20:55 +0000
Subject: [PATCH 022/531] Lock Rewritten.

---
 poetry.lock | 390 ++++++++++++++++++++++++++--------------------------
 1 file changed, 195 insertions(+), 195 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 5dbb1c76..7bce49db 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,5 +1,3 @@
-# This file is automatically @generated by Poetry and should not be changed by hand.
-
 [[package]]
 name = "attrs"
 version = "22.2.0"
@@ -7,10 +5,6 @@ description = "Classes Without Boilerplate"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
-    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
-]
 
 [package.extras]
 cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"]
@@ -26,20 +20,6 @@ description = "The uncompromising code formatter."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
-    {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
-    {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
-    {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
-    {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
-    {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
-    {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
-    {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
-    {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
-    {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
-    {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
-    {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
-]
 
 [package.dependencies]
 click = ">=8.0.0"
@@ -63,10 +43,6 @@ description = "Pyspark test helper library"
 category = "dev"
 optional = false
 python-versions = ">=3.5"
-files = [
-    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
-    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
-]
 
 [[package]]
 name = "click"
@@ -75,10 +51,6 @@ description = "Composable command line interface toolkit"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
-    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
-]
 
 [package.dependencies]
 colorama = {version = "*", markers = "platform_system == \"Windows\""}
@@ -91,10 +63,6 @@ description = "Cross-platform colored terminal text."
 category = "dev"
 optional = false
 python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
-files = [
-    {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
-    {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
-]
 
 [[package]]
 name = "coverage"
@@ -103,59 +71,6 @@ description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "coverage-7.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2a7f23bbaeb2a87f90f607730b45564076d870f1fb07b9318d0c21f36871932b"},
-    {file = "coverage-7.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c18d47f314b950dbf24a41787ced1474e01ca816011925976d90a88b27c22b89"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef14d75d86f104f03dea66c13188487151760ef25dd6b2dbd541885185f05f40"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66e50680e888840c0995f2ad766e726ce71ca682e3c5f4eee82272c7671d38a2"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9fed35ca8c6e946e877893bbac022e8563b94404a605af1d1e6accc7eb73289"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d8d04e755934195bdc1db45ba9e040b8d20d046d04d6d77e71b3b34a8cc002d0"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e109f1c9a3ece676597831874126555997c48f62bddbcace6ed17be3e372de8"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0a1890fca2962c4f1ad16551d660b46ea77291fba2cc21c024cd527b9d9c8809"},
-    {file = "coverage-7.0.5-cp310-cp310-win32.whl", hash = "sha256:be9fcf32c010da0ba40bf4ee01889d6c737658f4ddff160bd7eb9cac8f094b21"},
-    {file = "coverage-7.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:cbfcba14a3225b055a28b3199c3d81cd0ab37d2353ffd7f6fd64844cebab31ad"},
-    {file = "coverage-7.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30b5fec1d34cc932c1bc04017b538ce16bf84e239378b8f75220478645d11fca"},
-    {file = "coverage-7.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1caed2367b32cc80a2b7f58a9f46658218a19c6cfe5bc234021966dc3daa01f0"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d254666d29540a72d17cc0175746cfb03d5123db33e67d1020e42dae611dc196"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19245c249aa711d954623d94f23cc94c0fd65865661f20b7781210cb97c471c0"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b05ed4b35bf6ee790832f68932baf1f00caa32283d66cc4d455c9e9d115aafc"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:29de916ba1099ba2aab76aca101580006adfac5646de9b7c010a0f13867cba45"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e057e74e53db78122a3979f908973e171909a58ac20df05c33998d52e6d35757"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:411d4ff9d041be08fdfc02adf62e89c735b9468f6d8f6427f8a14b6bb0a85095"},
-    {file = "coverage-7.0.5-cp311-cp311-win32.whl", hash = "sha256:52ab14b9e09ce052237dfe12d6892dd39b0401690856bcfe75d5baba4bfe2831"},
-    {file = "coverage-7.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:1f66862d3a41674ebd8d1a7b6f5387fe5ce353f8719040a986551a545d7d83ea"},
-    {file = "coverage-7.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b69522b168a6b64edf0c33ba53eac491c0a8f5cc94fa4337f9c6f4c8f2f5296c"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436e103950d05b7d7f55e39beeb4d5be298ca3e119e0589c0227e6d0b01ee8c7"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8c56bec53d6e3154eaff6ea941226e7bd7cc0d99f9b3756c2520fc7a94e6d96"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a38362528a9115a4e276e65eeabf67dcfaf57698e17ae388599568a78dcb029"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f67472c09a0c7486e27f3275f617c964d25e35727af952869dd496b9b5b7f6a3"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:220e3fa77d14c8a507b2d951e463b57a1f7810a6443a26f9b7591ef39047b1b2"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ecb0f73954892f98611e183f50acdc9e21a4653f294dfbe079da73c6378a6f47"},
-    {file = "coverage-7.0.5-cp37-cp37m-win32.whl", hash = "sha256:d8f3e2e0a1d6777e58e834fd5a04657f66affa615dae61dd67c35d1568c38882"},
-    {file = "coverage-7.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9e662e6fc4f513b79da5d10a23edd2b87685815b337b1a30cd11307a6679148d"},
-    {file = "coverage-7.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:790e4433962c9f454e213b21b0fd4b42310ade9c077e8edcb5113db0818450cb"},
-    {file = "coverage-7.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49640bda9bda35b057b0e65b7c43ba706fa2335c9a9896652aebe0fa399e80e6"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d66187792bfe56f8c18ba986a0e4ae44856b1c645336bd2c776e3386da91e1dd"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:276f4cd0001cd83b00817c8db76730938b1ee40f4993b6a905f40a7278103b3a"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95304068686545aa368b35dfda1cdfbbdbe2f6fe43de4a2e9baa8ebd71be46e2"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:17e01dd8666c445025c29684d4aabf5a90dc6ef1ab25328aa52bedaa95b65ad7"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea76dbcad0b7b0deb265d8c36e0801abcddf6cc1395940a24e3595288b405ca0"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:50a6adc2be8edd7ee67d1abc3cd20678987c7b9d79cd265de55941e3d0d56499"},
-    {file = "coverage-7.0.5-cp38-cp38-win32.whl", hash = "sha256:e4ce984133b888cc3a46867c8b4372c7dee9cee300335e2925e197bcd45b9e16"},
-    {file = "coverage-7.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:4a950f83fd3f9bca23b77442f3a2b2ea4ac900944d8af9993743774c4fdc57af"},
-    {file = "coverage-7.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c2155943896ac78b9b0fd910fb381186d0c345911f5333ee46ac44c8f0e43ab"},
-    {file = "coverage-7.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:54f7e9705e14b2c9f6abdeb127c390f679f6dbe64ba732788d3015f7f76ef637"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ee30375b409d9a7ea0f30c50645d436b6f5dfee254edffd27e45a980ad2c7f4"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b78729038abea6a5df0d2708dce21e82073463b2d79d10884d7d591e0f385ded"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13250b1f0bd023e0c9f11838bdeb60214dd5b6aaf8e8d2f110c7e232a1bff83b"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c407b1950b2d2ffa091f4e225ca19a66a9bd81222f27c56bd12658fc5ca1209"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c76a3075e96b9c9ff00df8b5f7f560f5634dffd1658bafb79eb2682867e94f78"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f26648e1b3b03b6022b48a9b910d0ae209e2d51f50441db5dce5b530fad6d9b1"},
-    {file = "coverage-7.0.5-cp39-cp39-win32.whl", hash = "sha256:ba3027deb7abf02859aca49c865ece538aee56dcb4871b4cced23ba4d5088904"},
-    {file = "coverage-7.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:949844af60ee96a376aac1ded2a27e134b8c8d35cc006a52903fc06c24a3296f"},
-    {file = "coverage-7.0.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:b9727ac4f5cf2cbf87880a63870b5b9730a8ae3a4a360241a0fdaa2f71240ff0"},
-    {file = "coverage-7.0.5.tar.gz", hash = "sha256:051afcbd6d2ac39298d62d340f94dbb6a1f31de06dfaf6fcef7b759dd3860c45"},
-]
 
 [package.dependencies]
 tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}
@@ -170,10 +85,6 @@ description = "Backport of PEP 654 (exception groups)"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
-    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
-]
 
 [package.extras]
 test = ["pytest (>=6)"]
@@ -185,10 +96,6 @@ description = "the modular source code checker: pep8 pyflakes and co"
 category = "dev"
 optional = false
 python-versions = ">=3.6.1"
-files = [
-    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
-    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
-]
 
 [package.dependencies]
 importlib-metadata = {version = ">=1.1.0,<4.3", markers = "python_version < \"3.8\""}
@@ -203,10 +110,6 @@ description = "Read metadata from Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
-    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
-]
 
 [package.dependencies]
 typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""}
@@ -223,10 +126,6 @@ description = "iniconfig: brain-dead simple config-ini parsing"
 category = "dev"
 optional = false
 python-versions = "*"
-files = [
-    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
-    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
-]
 
 [[package]]
 name = "isort"
@@ -235,10 +134,6 @@ description = "A Python utility / library to sort Python imports."
 category = "dev"
 optional = false
 python-versions = ">=3.7.0"
-files = [
-    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
-    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
-]
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
@@ -253,10 +148,6 @@ description = "McCabe checker, plugin for flake8"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
-    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
-]
 
 [[package]]
 name = "mypy-extensions"
@@ -265,10 +156,6 @@ description = "Experimental type system extensions for programs checked with the
 category = "dev"
 optional = false
 python-versions = "*"
-files = [
-    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
-    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
-]
 
 [[package]]
 name = "packaging"
@@ -277,10 +164,6 @@ description = "Core utilities for Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
-    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
-]
 
 [[package]]
 name = "pathspec"
@@ -289,10 +172,6 @@ description = "Utility library for gitignore style pattern matching of file path
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
-    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
-]
 
 [[package]]
 name = "platformdirs"
@@ -301,10 +180,6 @@ description = "A small Python package for determining appropriate platform-speci
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
-    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
-]
 
 [package.dependencies]
 typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""}
@@ -320,10 +195,6 @@ description = "plugin and hook calling mechanisms for python"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
-    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
-]
 
 [package.dependencies]
 importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
@@ -339,10 +210,6 @@ description = "Enables Python programs to dynamically access arbitrary Java obje
 category = "main"
 optional = false
 python-versions = "*"
-files = [
-    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
-    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
-]
 
 [[package]]
 name = "pycodestyle"
@@ -351,10 +218,6 @@ description = "Python style guide checker"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
-    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
-]
 
 [[package]]
 name = "pyflakes"
@@ -363,10 +226,6 @@ description = "passive checker of Python programs"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
-    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
-]
 
 [[package]]
 name = "pyspark"
@@ -375,9 +234,6 @@ description = "Apache Spark Python API"
 category = "main"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
-]
 
 [package.dependencies]
 py4j = "0.10.9"
@@ -394,10 +250,6 @@ description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
-    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
-]
 
 [package.dependencies]
 attrs = ">=19.2.0"
@@ -419,10 +271,6 @@ description = "Pytest plugin for measuring coverage."
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
-    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
-    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
-]
 
 [package.dependencies]
 coverage = {version = ">=5.2.1", extras = ["toml"]}
@@ -438,9 +286,6 @@ description = "Manage dependencies of tests"
 category = "dev"
 optional = false
 python-versions = "*"
-files = [
-    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
-]
 
 [package.dependencies]
 pytest = ">=3.6.0"
@@ -452,10 +297,6 @@ description = "Test Anything Protocol (TAP) reporting plugin for pytest"
 category = "dev"
 optional = false
 python-versions = "*"
-files = [
-    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
-    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
-]
 
 [package.dependencies]
 pytest = ">=3.0"
@@ -468,10 +309,6 @@ description = "Test Anything Protocol (TAP) tools"
 category = "dev"
 optional = false
 python-versions = "*"
-files = [
-    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
-    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
-]
 
 [package.extras]
 yaml = ["PyYAML (>=5.1)", "more-itertools"]
@@ -483,10 +320,6 @@ description = "A lil' TOML parser"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
-files = [
-    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
-    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
-]
 
 [[package]]
 name = "typed-ast"
@@ -495,7 +328,199 @@ description = "a fork of Python 2 and 3 ast modules with type comment support"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-files = [
+
+[[package]]
+name = "typing-extensions"
+version = "4.4.0"
+description = "Backported and Experimental Type Hints for Python 3.7+"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+
+[[package]]
+name = "zipp"
+version = "3.11.0"
+description = "Backport of pathlib-compatible object wrapper for zip files"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+
+[package.extras]
+docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
+testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
+
+[metadata]
+lock-version = "1.1"
+python-versions = "^3.7"
+content-hash = "47195533df022e7b95b52d864c2019390362d2c1047797ed1f10b218c48be23f"
+
+[metadata.files]
+attrs = [
+    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
+    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
+]
+black = [
+    {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
+    {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
+    {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
+    {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
+    {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
+    {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
+    {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
+    {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
+    {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
+    {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
+    {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
+    {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
+]
+chispa = [
+    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
+    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
+]
+click = [
+    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
+    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
+]
+colorama = [
+    {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
+    {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
+]
+coverage = [
+    {file = "coverage-7.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2a7f23bbaeb2a87f90f607730b45564076d870f1fb07b9318d0c21f36871932b"},
+    {file = "coverage-7.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c18d47f314b950dbf24a41787ced1474e01ca816011925976d90a88b27c22b89"},
+    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef14d75d86f104f03dea66c13188487151760ef25dd6b2dbd541885185f05f40"},
+    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66e50680e888840c0995f2ad766e726ce71ca682e3c5f4eee82272c7671d38a2"},
+    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9fed35ca8c6e946e877893bbac022e8563b94404a605af1d1e6accc7eb73289"},
+    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d8d04e755934195bdc1db45ba9e040b8d20d046d04d6d77e71b3b34a8cc002d0"},
+    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e109f1c9a3ece676597831874126555997c48f62bddbcace6ed17be3e372de8"},
+    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0a1890fca2962c4f1ad16551d660b46ea77291fba2cc21c024cd527b9d9c8809"},
+    {file = "coverage-7.0.5-cp310-cp310-win32.whl", hash = "sha256:be9fcf32c010da0ba40bf4ee01889d6c737658f4ddff160bd7eb9cac8f094b21"},
+    {file = "coverage-7.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:cbfcba14a3225b055a28b3199c3d81cd0ab37d2353ffd7f6fd64844cebab31ad"},
+    {file = "coverage-7.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30b5fec1d34cc932c1bc04017b538ce16bf84e239378b8f75220478645d11fca"},
+    {file = "coverage-7.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1caed2367b32cc80a2b7f58a9f46658218a19c6cfe5bc234021966dc3daa01f0"},
+    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d254666d29540a72d17cc0175746cfb03d5123db33e67d1020e42dae611dc196"},
+    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19245c249aa711d954623d94f23cc94c0fd65865661f20b7781210cb97c471c0"},
+    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b05ed4b35bf6ee790832f68932baf1f00caa32283d66cc4d455c9e9d115aafc"},
+    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:29de916ba1099ba2aab76aca101580006adfac5646de9b7c010a0f13867cba45"},
+    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e057e74e53db78122a3979f908973e171909a58ac20df05c33998d52e6d35757"},
+    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:411d4ff9d041be08fdfc02adf62e89c735b9468f6d8f6427f8a14b6bb0a85095"},
+    {file = "coverage-7.0.5-cp311-cp311-win32.whl", hash = "sha256:52ab14b9e09ce052237dfe12d6892dd39b0401690856bcfe75d5baba4bfe2831"},
+    {file = "coverage-7.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:1f66862d3a41674ebd8d1a7b6f5387fe5ce353f8719040a986551a545d7d83ea"},
+    {file = "coverage-7.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b69522b168a6b64edf0c33ba53eac491c0a8f5cc94fa4337f9c6f4c8f2f5296c"},
+    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436e103950d05b7d7f55e39beeb4d5be298ca3e119e0589c0227e6d0b01ee8c7"},
+    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8c56bec53d6e3154eaff6ea941226e7bd7cc0d99f9b3756c2520fc7a94e6d96"},
+    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a38362528a9115a4e276e65eeabf67dcfaf57698e17ae388599568a78dcb029"},
+    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f67472c09a0c7486e27f3275f617c964d25e35727af952869dd496b9b5b7f6a3"},
+    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:220e3fa77d14c8a507b2d951e463b57a1f7810a6443a26f9b7591ef39047b1b2"},
+    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ecb0f73954892f98611e183f50acdc9e21a4653f294dfbe079da73c6378a6f47"},
+    {file = "coverage-7.0.5-cp37-cp37m-win32.whl", hash = "sha256:d8f3e2e0a1d6777e58e834fd5a04657f66affa615dae61dd67c35d1568c38882"},
+    {file = "coverage-7.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9e662e6fc4f513b79da5d10a23edd2b87685815b337b1a30cd11307a6679148d"},
+    {file = "coverage-7.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:790e4433962c9f454e213b21b0fd4b42310ade9c077e8edcb5113db0818450cb"},
+    {file = "coverage-7.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49640bda9bda35b057b0e65b7c43ba706fa2335c9a9896652aebe0fa399e80e6"},
+    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d66187792bfe56f8c18ba986a0e4ae44856b1c645336bd2c776e3386da91e1dd"},
+    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:276f4cd0001cd83b00817c8db76730938b1ee40f4993b6a905f40a7278103b3a"},
+    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95304068686545aa368b35dfda1cdfbbdbe2f6fe43de4a2e9baa8ebd71be46e2"},
+    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:17e01dd8666c445025c29684d4aabf5a90dc6ef1ab25328aa52bedaa95b65ad7"},
+    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea76dbcad0b7b0deb265d8c36e0801abcddf6cc1395940a24e3595288b405ca0"},
+    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:50a6adc2be8edd7ee67d1abc3cd20678987c7b9d79cd265de55941e3d0d56499"},
+    {file = "coverage-7.0.5-cp38-cp38-win32.whl", hash = "sha256:e4ce984133b888cc3a46867c8b4372c7dee9cee300335e2925e197bcd45b9e16"},
+    {file = "coverage-7.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:4a950f83fd3f9bca23b77442f3a2b2ea4ac900944d8af9993743774c4fdc57af"},
+    {file = "coverage-7.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c2155943896ac78b9b0fd910fb381186d0c345911f5333ee46ac44c8f0e43ab"},
+    {file = "coverage-7.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:54f7e9705e14b2c9f6abdeb127c390f679f6dbe64ba732788d3015f7f76ef637"},
+    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ee30375b409d9a7ea0f30c50645d436b6f5dfee254edffd27e45a980ad2c7f4"},
+    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b78729038abea6a5df0d2708dce21e82073463b2d79d10884d7d591e0f385ded"},
+    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13250b1f0bd023e0c9f11838bdeb60214dd5b6aaf8e8d2f110c7e232a1bff83b"},
+    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c407b1950b2d2ffa091f4e225ca19a66a9bd81222f27c56bd12658fc5ca1209"},
+    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c76a3075e96b9c9ff00df8b5f7f560f5634dffd1658bafb79eb2682867e94f78"},
+    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f26648e1b3b03b6022b48a9b910d0ae209e2d51f50441db5dce5b530fad6d9b1"},
+    {file = "coverage-7.0.5-cp39-cp39-win32.whl", hash = "sha256:ba3027deb7abf02859aca49c865ece538aee56dcb4871b4cced23ba4d5088904"},
+    {file = "coverage-7.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:949844af60ee96a376aac1ded2a27e134b8c8d35cc006a52903fc06c24a3296f"},
+    {file = "coverage-7.0.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:b9727ac4f5cf2cbf87880a63870b5b9730a8ae3a4a360241a0fdaa2f71240ff0"},
+    {file = "coverage-7.0.5.tar.gz", hash = "sha256:051afcbd6d2ac39298d62d340f94dbb6a1f31de06dfaf6fcef7b759dd3860c45"},
+]
+exceptiongroup = [
+    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
+    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
+]
+flake8 = [
+    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
+    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
+]
+importlib-metadata = [
+    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
+    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
+]
+iniconfig = [
+    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
+    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
+]
+isort = [
+    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
+    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
+]
+mccabe = [
+    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
+    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
+]
+mypy-extensions = [
+    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
+    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
+]
+packaging = [
+    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
+    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
+]
+pathspec = [
+    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
+    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
+]
+platformdirs = [
+    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
+    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
+]
+pluggy = [
+    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
+    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
+]
+py4j = [
+    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
+    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
+]
+pycodestyle = [
+    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
+    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
+]
+pyflakes = [
+    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
+    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
+]
+pyspark = [
+    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
+]
+pytest = [
+    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
+    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
+]
+pytest-cov = [
+    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
+    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
+]
+pytest-dependency = [
+    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
+]
+pytest-tap = [
+    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
+    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
+]
+"tap.py" = [
+    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
+    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
+]
+tomli = [
+    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
+    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+]
+typed-ast = [
     {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"},
     {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"},
     {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"},
@@ -521,36 +546,11 @@ files = [
     {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"},
     {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"},
 ]
-
-[[package]]
-name = "typing-extensions"
-version = "4.4.0"
-description = "Backported and Experimental Type Hints for Python 3.7+"
-category = "dev"
-optional = false
-python-versions = ">=3.7"
-files = [
+typing-extensions = [
     {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"},
     {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"},
 ]
-
-[[package]]
-name = "zipp"
-version = "3.11.0"
-description = "Backport of pathlib-compatible object wrapper for zip files"
-category = "dev"
-optional = false
-python-versions = ">=3.7"
-files = [
+zipp = [
     {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"},
     {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"},
 ]
-
-[package.extras]
-docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
-testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
-
-[metadata]
-lock-version = "2.0"
-python-versions = "^3.7"
-content-hash = "47195533df022e7b95b52d864c2019390362d2c1047797ed1f10b218c48be23f"

From 2a79fab090731e40ed3268c6db42195ba61ba20c Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 3 Feb 2023 13:31:54 +0000
Subject: [PATCH 023/531] Unneeded Cols

---
 .../back_data_filtered_input.csv              | 42 ++++++++++++++
 .../back_data_filtered_output.csv             | 42 ++++++++++++++
 .../back_data_scenarios/back_data_output.csv  | 58 +++++++++----------
 3 files changed, 113 insertions(+), 29 deletions(-)
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_output.csv

diff --git a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_input.csv b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_input.csv
new file mode 100644
index 00000000..6852fe99
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_input.csv
@@ -0,0 +1,42 @@
+identifier,date,group,question,other
+140001,202001,100,3582,27
+140001,202002,100,4533,27
+140001,202003,100,4471,27
+140001,202004,100,3040,27
+140001,202005,100,8519,27
+140001,202006,100,8690,27
+140001,202007,100,9979,27
+140002,202001,100,5359,83
+140002,202002,100,7091,83
+140002,202003,100,7098,83
+140002,202004,100,7408,83
+140002,202005,100,1937,83
+140002,202006,100,6711,83
+140002,202007,100,1052,83
+140003,202001,100,439,89
+140003,202002,100,7783,89
+140003,202003,100,897,89
+140003,202004,100,8477,89
+140003,202005,100,2207,89
+140003,202006,100,9889,89
+140003,202007,100,2528,89
+140004,202001,100,,28
+140004,202002,100,,28
+140004,202003,100,,28
+140004,202005,100,,28
+140004,202006,100,,28
+140004,202007,100,7243,28
+140005,202001,100,150000,85
+140005,202002,100,180000,85
+140005,202003,100,120000,85
+140005,202004,100,115000,85
+140005,202005,100,105000,85
+140005,202006,100,110000,85
+140005,202007,100,160000,85
+140006,202001,100,,71
+140006,202002,100,,71
+140006,202003,100,,71
+140006,202004,100,,71
+140006,202005,100,,71
+140006,202006,100,,71
+140006,202007,100,,71
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_output.csv
new file mode 100644
index 00000000..726ac432
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_output.csv
@@ -0,0 +1,42 @@
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
+140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,,3,3
+140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3
+140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3
+140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3
+140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3
+140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3
+140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,,4
+140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,,3,3
+140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3
+140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3
+140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3
+140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3
+140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3
+140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,,4
+140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,,3,3
+140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3
+140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3
+140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3
+140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3
+140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3
+140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,,4
+140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,,3,3
+140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3
+140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3
+140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3
+140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3
+140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,,4
+140005,202001,100,85,150000,R,1.0,0.483330757,47.13567839,,3,3
+140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3
+140005,202003,100,85,120000,R,0.642345545,0.658705416,62.64321608,3,3,3
+140005,202004,100,85,115000,R,1.518129312,1.494511569,95.10050251,3,3,3
+140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3
+140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3
+140005,202007,100,85,160000,R,0.536140767,1.0,91.63876651982379,3,,4
+140006,202001,100,71,3346.6331658291456,C,1.0,0.483330757,47.13567839,,3,3
+140006,202002,100,71,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3
+140006,202003,100,71,4447.668341708542,FIC,0.642345545,0.658705416,62.64321608,3,3,3
+140006,202004,100,71,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3
+140006,202005,100,71,4517.954773869346,FIC,0.669114927,0.500711744,63.63316583,3,3,3
+140006,202006,100,71,9023.065326633165,FIC,1.997157072,1.865181798,127.0854271,3,3,3
+140006,202007,100,71,4837.633165829145,FIC,0.536140767,1.0,91.63876651982379,3,,4
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_output.csv
index 31e77b24..09480fae 100644
--- a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,output,other,marker,calc_output,next_period,prev_period,forward,backward,construction
-1111000,203901,9000,1464.1,2,R,1464.1,203902,,1,1,1
-1111001,203901,8000,2464.1,2,BI,2464.1,203902,,1,1,1
-1111002,203901,9000,3464.1,2,FIR,3464.1,203902,,1,1,1
-1111003,203901,8000,4464.1,2,FIC,4464.1,203902,,1,1,1
-1111004,203901,9000,5464.1,2,C,5464.1,203902,,1,1,1
-1200001,203901,8000,3500,2,R,3500,203902,,1,1,1
-1111000,203902,9000,6000,2,R,6000,203903,203901,4.09808073219042,1,3000
-1111001,203902,8000,7000,2,R,0,203903,203901,1,1,3500
-1111002,203902,9000,14196.1614643808,2,FIR,0,203903,203901,4.09808073219042,1,3000
-1111003,203902,8000,2000,2,BI,0,203903,203901,1,1,3500
-1111004,203902,9000,1478.57142857143,2,BI,0,203903,203901,4.09808073219042,1,3000
-1111007,203902,8000,7000,2,C,0,203903,203901,1,1,3500
-1111000,203903,9000,6000,2,FIR,0,203904,203902,1,0.6428571428571429,1500.05
-1111001,203903,8000,7000,2,FIR,0,203904,203902,1,2,805
-1111002,203903,9000,1500.2,2,R,0,203904,203902,1,0.6428571428571429,1500.05
-1111003,203903,8000,2000,2,R,0,203904,203902,1,2,805
-1111004,203903,9000,1478.57142857143,2,BI,0,203904,203902,1,0.642857142857145,1500.05
-1111005,203903,8000,1220,2,R,0,203904,203902,1,2,805
-1111006,203903,9000,4500,2,R,0,203904,203902,1,0.642857142857145,1500.05
-1111007,203903,8000,7000,2,FIC,0,203904,203902,1,2,805
-1111000,203904,9000,9333.3333333333,2,FIR,0,203905,203903,1.55555555555555,1,2325
-1111001,203904,8000,3500,2,FIR,0,203905,203903,0.5,1,500
-1111002,203904,9000,2333.64444444444,2,FIR,0,203905,203903,1.55555555555555,1,2325
-1111003,203904,8000,1000,2,R,1000,203905,203903,0.5,1,500
-1111004,203904,9000,2300,2,R,0,203905,203903,1.55555555555555,1,2325
-1111005,203904,8000,610,2,FIR,0,203905,203903,0.5,1,500
-1111006,203904,9000,7000,2,R,7000,203905,203903,1.55555555555555,1,2325
-1111007,203904,8000,3500,2,FIC,0,203905,203903,0.5,1,500
+identifier,date,group,output,other,marker,forward,backward,construction
+1111000,203901,9000,1464.1,2,R,1,1,1
+1111001,203901,8000,2464.1,2,BI,1,1,1
+1111002,203901,9000,3464.1,2,FIR,1,1,1
+1111003,203901,8000,4464.1,2,FIC,1,1,1
+1111004,203901,9000,5464.1,2,C,1,1,1
+1200001,203901,8000,3500,2,R,1,1,1
+1111000,203902,9000,6000,2,R,4.09808073219042,1,3000
+1111001,203902,8000,7000,2,R,1,1,3500
+1111002,203902,9000,14196.1614643808,2,FIR,4.09808073219042,1,3000
+1111003,203902,8000,2000,2,BI,1,1,3500
+1111004,203902,9000,1478.57142857143,2,BI,4.09808073219042,1,3000
+1111007,203902,8000,7000,2,C,1,1,3500
+1111000,203903,9000,6000,2,FIR,1,0.642857142857143,1500.05
+1111001,203903,8000,7000,2,FIR,1,2,805
+1111002,203903,9000,1500.2,2,R,1,0.642857142857143,1500.05
+1111003,203903,8000,2000,2,R,1,2,805
+1111004,203903,9000,1478.57142857143,2,BI,1,0.642857142857145,1500.05
+1111005,203903,8000,1220,2,R,1,2,805
+1111006,203903,9000,4500,2,R,1,0.642857142857145,1500.05
+1111007,203903,8000,7000,2,FIC,1,2,805
+1111000,203904,9000,9333.3333333333,2,FIR,1.55555555555555,1,2325
+1111001,203904,8000,3500,2,FIR,0.5,1,500
+1111002,203904,9000,2333.64444444444,2,FIR,1.55555555555555,1,2325
+1111003,203904,8000,1000,2,R,0.5,1,500
+1111004,203904,9000,2300,2,R,1.55555555555555,1,2325
+1111005,203904,8000,610,2,FIR,0.5,1,500
+1111006,203904,9000,7000,2,R,1.55555555555555,1,2325
+1111007,203904,8000,3500,2,FIC,0.5,1,500

From 120efb7dc1a90cc221f3c0d19629389c6f8fb77d Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 3 Feb 2023 13:50:51 +0000
Subject: [PATCH 024/531] Fix Bug Of Back Data Not Being Used By Link Filter.

---
 .../imputation/ratio_of_means.py                      | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 6e413929..2b4101ff 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -219,11 +219,6 @@ def impute(
         ["target", "forward", "backward", "construction"],
     )
 
-    if link_filter:
-        filtered_refs = input_df.filter(link_filter).select(
-            col(reference_col).alias("ref"), col(period_col).alias("period")
-        )
-
     # Cache the prepared back data df since we'll need a few differently
     # filtered versions
     prepared_back_data_df = None
@@ -232,6 +227,12 @@ def impute(
         prepared_back_data_df = validation.validate_dataframe(
             back_data_df, back_expected_columns, type_mapping, ["ref", "period"]
         )
+        input_df = input_df.unionByName(back_data_df, allowMissingColumns=True)
+
+    if link_filter:
+        filtered_refs = input_df.filter(link_filter).select(
+            col(reference_col).alias("ref"), col(period_col).alias("period")
+        )
 
     # Store the value for the period prior to the start of imputation.
     # Stored as a value to avoid a join in output creation.

From f8bcecced361ede8524d0245a6ba5018961e91ae Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 3 Feb 2023 14:15:16 +0000
Subject: [PATCH 025/531] back data testing for all ratio of means scenarios

---
 tests/imputation/test_ratio_of_means.py | 191 ++++++------------------
 1 file changed, 44 insertions(+), 147 deletions(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index f1bcbd92..08570735 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -105,7 +105,7 @@
     ("unit", "imputation_link_counts"),
 ]
 
-for scenario_category in ("dev", "methodology", "back_data"):
+for scenario_category in ("dev", "methodology"):
     for file_name in glob.iglob(
         str(
             pathlib.Path(
@@ -125,21 +125,11 @@
             )
         )
 
-
-def scenarios(categories):
-    return sum(
-        (
-            sorted(
-                (
-                    scenario
-                    for scenario in test_scenarios
-                    if scenario[0].replace("_scenarios", "") == category
-                )
-            )
-            for category in categories
-        ),
-        [],
-    )
+test_scenarios += [
+    (f"back_data_{scenario_type}", scenario_file)
+    for scenario_type, scenario_file in test_scenarios
+    if scenario_type.split("_", 1)[0] in ("dev", "methodology")
+]
 
 
 # --- Test type validation on the input dataframe(s) ---
@@ -520,7 +510,7 @@ def test_dataframe_expected_columns(fxt_spark_session, fxt_load_test_csv):
 
 @pytest.mark.parametrize(
     "scenario_type, scenario",
-    scenarios(["unit", "dev", "methodology"]),
+    test_scenarios,
 )
 @pytest.mark.dependency(
     depends=[
@@ -533,22 +523,36 @@ def test_dataframe_expected_columns(fxt_spark_session, fxt_load_test_csv):
         "test_incorrect_column_types",
         "test_input_data_contains_nulls",
         "test_dataframe_expected_columns",
+        "test_back_data_not_a_dataframe",
+        "test_back_data_missing_column",
+        "test_back_data_contains_nulls",
+        "test_back_data_without_output_is_invalid",
+        "test_back_data_drops_link_cols_when_present",
+        "test_input_has_link_cols_and_back_data_does_not_have_link_cols",
     ]
 )
 def test_calculations(fxt_load_test_csv, scenario_type, scenario):
-    test_dataframe = fxt_load_test_csv(
+    scenario_file_type = scenario_type.replace("back_data_", "")
+    scenario_input = fxt_load_test_csv(
         dataframe_columns,
         dataframe_types,
         "imputation",
         "ratio_of_means",
-        scenario_type,
+        scenario_file_type,
         f"{scenario}_input",
     )
-
+    scenario_expected_output = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        scenario_file_type,
+        f"{scenario}_output",
+    )
     # We use imputation_kwargs to allow us to pass in the forward, backward
     # and construction link columns which are usually defaulted to None. This
     # means that we can autodetect when we should pass these.
-    if forward_col in test_dataframe.columns:
+    if forward_col in scenario_input.columns:
         imputation_kwargs = {
             "forward_link_col": forward_col,
             "backward_link_col": backward_col,
@@ -565,142 +569,35 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
                 "(" + auxiliary_col + " != 71) and (" + target_col + " < 100000)"
             )
 
-    exp_val = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        scenario_type,
-        f"{scenario}_output",
-    )
-
-    ret_val = ratio_of_means.impute(test_dataframe, *params, **imputation_kwargs)
-    ret_val = ret_val.withColumn(output_col, bround(col(output_col), 6))
-    ret_val = ret_val.withColumn(forward_col, bround(col(forward_col), 6))
-    ret_val = ret_val.withColumn(
-        backward_col, bround(col(backward_col).cast(decimal_type), 6)
-    )
-    ret_val = ret_val.withColumn(
-        construction_col, bround(col(construction_col).cast(decimal_type), 6)
-    )
-    select_cols = list(set(dataframe_columns) & set(exp_val.columns))
-    assert isinstance(ret_val, type(test_dataframe))
-    sort_col_list = [reference_col, period_col]
-    assert_df_equality(
-        ret_val.sort(sort_col_list).select(select_cols),
-        exp_val.sort(sort_col_list).select(select_cols),
-        ignore_nullable=True,
-    )
-
-
-@pytest.mark.dependency(
-    depends=[
-        "test_back_data_not_a_dataframe",
-        "test_back_data_missing_column",
-        "test_back_data_contains_nulls",
-        "test_back_data_without_output_is_invalid",
-        "test_back_data_drops_link_cols_when_present",
-        "test_input_has_link_cols_and_back_data_does_not_have_link_cols",
-    ]
-)
-@pytest.mark.parametrize(
-    "scenario_type, scenario",
-    scenarios(["dev", "back_data"]),
-)
-def test_back_data_calculations(fxt_load_test_csv, scenario_type, scenario):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        scenario_type,
-        f"{scenario}_input",
-    )
-
-    back_data_cols = [
-        reference_col,
-        period_col,
-        strata_col,
-        target_col,
-        auxiliary_col,
-        output_col,
-        marker_col,
-        forward_col,
-        backward_col,
-    ]
-
-    scenario_output = fxt_load_test_csv(
-        back_data_cols,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        scenario_type,
-        f"{scenario}_output",
-    )
-
-    select_back_data_cols = [
-        col(reference_col),
-        col(period_col),
-        col(strata_col),
-        col(auxiliary_col),
-        col(output_col),
-        col(output_col).alias(target_col),
-        when(col(marker_col).isNotNull(), col(marker_col))
-        .otherwise("BI")
-        .alias(marker_col),
-    ]
-
-    min_period_df = scenario_output.selectExpr("min(" + period_col + ")")
+    if scenario_type.startswith("back_data"):
+        min_period_df = scenario_expected_output.selectExpr("min(" + period_col + ")")
 
-    back_data_df = scenario_output.join(
-        min_period_df, [col(period_col) == col("min(" + period_col + ")")]
-    )
+        back_data_df = scenario_expected_output.join(
+            min_period_df, [col(period_col) == col("min(" + period_col + ")")]
+        )
 
-    input_df = test_dataframe.join(
-        min_period_df, [col(period_col) == col("min(" + period_col + ")")], "leftanti"
-    ).drop("min(" + period_col + ")")
+        scenario_input = scenario_input.join(
+            min_period_df, [col(period_col) == col("min(" + period_col + ")")], "leftanti"
+        ).drop("min(" + period_col + ")")
 
-    scenario_expected_output = scenario_output.join(
-        min_period_df, [col(period_col) == col("min(" + period_col + ")")], "leftanti"
-    ).drop("min(" + period_col + ")")
+        scenario_expected_output = scenario_expected_output.join(
+            min_period_df, [col(period_col) == col("min(" + period_col + ")")], "leftanti"
+        ).drop("min(" + period_col + ")")
 
-    # We use imputation_kwargs to allow us to pass in the forward, backward
-    # and construction link columns which are usually defaulted to None. This
-    # means that we can autodetect when we should pass these.
-    if forward_col in test_dataframe.columns:
-        select_back_data_cols += [
-            when(col(forward_col).isNotNull(), col(forward_col))
-            .otherwise(1)
-            .alias(forward_col),
-            when(col(backward_col).isNotNull(), col(backward_col))
-            .otherwise(1)
-            .alias(backward_col),
-        ]
-        imputation_kwargs = {
-            "forward_link_col": forward_col,
-            "backward_link_col": backward_col,
-            "construction_link_col": construction_col,
-            "back_data_df": back_data_df.select(select_back_data_cols),
-        }
-    else:
-        imputation_kwargs = {
-            "back_data_df": back_data_df.select(select_back_data_cols),
-        }
-
-    ret_val = ratio_of_means.impute(input_df, *params, **imputation_kwargs)
-    ret_val = ret_val.withColumn(output_col, bround(col(output_col), 6))
-    ret_val = ret_val.withColumn(forward_col, bround(col(forward_col), 6))
-    ret_val = ret_val.withColumn(
+    scenario_actual_output = ratio_of_means.impute(scenario_input, *params, **imputation_kwargs)
+    scenario_actual_output = scenario_actual_output.withColumn(output_col, bround(col(output_col), 6))
+    scenario_actual_output = scenario_actual_output.withColumn(forward_col, bround(col(forward_col), 6))
+    scenario_actual_output = scenario_actual_output.withColumn(
         backward_col, bround(col(backward_col).cast(decimal_type), 6)
     )
-    ret_val = ret_val.withColumn(
+    scenario_actual_output = scenario_actual_output.withColumn(
         construction_col, bround(col(construction_col).cast(decimal_type), 6)
     )
-    assert isinstance(ret_val, type(test_dataframe))
-    sort_col_list = [reference_col, period_col]
     select_cols = list(set(dataframe_columns) & set(scenario_expected_output.columns))
+    assert isinstance(scenario_actual_output, type(scenario_input))
+    sort_col_list = [reference_col, period_col]
     assert_df_equality(
-        ret_val.sort(sort_col_list).select(select_cols),
+        scenario_actual_output.sort(sort_col_list).select(select_cols),
         scenario_expected_output.sort(sort_col_list).select(select_cols),
         ignore_nullable=True,
     )

From 2e3708c4d250b55d8fa997b5fb0281ade1bb17c3 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 3 Feb 2023 14:41:34 +0000
Subject: [PATCH 026/531] Kwargs

---
 tests/imputation/test_ratio_of_means.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 08570735..822b5b9b 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -576,6 +576,8 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
             min_period_df, [col(period_col) == col("min(" + period_col + ")")]
         )
 
+        imputation_kwargs["back_data_df"] = back_data_df
+
         scenario_input = scenario_input.join(
             min_period_df, [col(period_col) == col("min(" + period_col + ")")], "leftanti"
         ).drop("min(" + period_col + ")")

From 2f10c6c1b60ae9af47b422808a878c8c0c218933 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 3 Feb 2023 16:07:06 +0000
Subject: [PATCH 027/531] Update Tests

---
 .../back_data_filtered_input.csv              | 42 --------------
 .../back_data_filtered_output.csv             | 42 --------------
 .../back_data_scenarios/back_data_input.csv   | 23 --------
 .../back_data_missing_strata_input.csv        | 11 ----
 .../back_data_missing_strata_output.csv       | 16 ------
 .../back_data_scenarios/back_data_output.csv  | 29 ----------
 ...30_class_change_C_C_FI_filtered_output.csv | 56 +++++++++----------
 tests/imputation/test_ratio_of_means.py       |  5 ++
 8 files changed, 33 insertions(+), 191 deletions(-)
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_output.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_missing_strata_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_missing_strata_output.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_output.csv

diff --git a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_input.csv b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_input.csv
deleted file mode 100644
index 6852fe99..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_input.csv
+++ /dev/null
@@ -1,42 +0,0 @@
-identifier,date,group,question,other
-140001,202001,100,3582,27
-140001,202002,100,4533,27
-140001,202003,100,4471,27
-140001,202004,100,3040,27
-140001,202005,100,8519,27
-140001,202006,100,8690,27
-140001,202007,100,9979,27
-140002,202001,100,5359,83
-140002,202002,100,7091,83
-140002,202003,100,7098,83
-140002,202004,100,7408,83
-140002,202005,100,1937,83
-140002,202006,100,6711,83
-140002,202007,100,1052,83
-140003,202001,100,439,89
-140003,202002,100,7783,89
-140003,202003,100,897,89
-140003,202004,100,8477,89
-140003,202005,100,2207,89
-140003,202006,100,9889,89
-140003,202007,100,2528,89
-140004,202001,100,,28
-140004,202002,100,,28
-140004,202003,100,,28
-140004,202005,100,,28
-140004,202006,100,,28
-140004,202007,100,7243,28
-140005,202001,100,150000,85
-140005,202002,100,180000,85
-140005,202003,100,120000,85
-140005,202004,100,115000,85
-140005,202005,100,105000,85
-140005,202006,100,110000,85
-140005,202007,100,160000,85
-140006,202001,100,,71
-140006,202002,100,,71
-140006,202003,100,,71
-140006,202004,100,,71
-140006,202005,100,,71
-140006,202006,100,,71
-140006,202007,100,,71
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_output.csv
deleted file mode 100644
index 726ac432..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_filtered_output.csv
+++ /dev/null
@@ -1,42 +0,0 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,,3,3
-140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3
-140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3
-140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3
-140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3
-140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3
-140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,,4
-140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,,3,3
-140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3
-140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3
-140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3
-140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3
-140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3
-140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,,4
-140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,,3,3
-140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3
-140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3
-140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3
-140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3
-140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3
-140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,,4
-140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,,3,3
-140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3
-140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3
-140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3
-140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3
-140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,,4
-140005,202001,100,85,150000,R,1.0,0.483330757,47.13567839,,3,3
-140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3
-140005,202003,100,85,120000,R,0.642345545,0.658705416,62.64321608,3,3,3
-140005,202004,100,85,115000,R,1.518129312,1.494511569,95.10050251,3,3,3
-140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3
-140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3
-140005,202007,100,85,160000,R,0.536140767,1.0,91.63876651982379,3,,4
-140006,202001,100,71,3346.6331658291456,C,1.0,0.483330757,47.13567839,,3,3
-140006,202002,100,71,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3
-140006,202003,100,71,4447.668341708542,FIC,0.642345545,0.658705416,62.64321608,3,3,3
-140006,202004,100,71,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3
-140006,202005,100,71,4517.954773869346,FIC,0.669114927,0.500711744,63.63316583,3,3,3
-140006,202006,100,71,9023.065326633165,FIC,1.997157072,1.865181798,127.0854271,3,3,3
-140006,202007,100,71,4837.633165829145,FIC,0.536140767,1.0,91.63876651982379,3,,4
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_input.csv b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_input.csv
deleted file mode 100644
index 190ed91b..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_input.csv
+++ /dev/null
@@ -1,23 +0,0 @@
-identifier,date,group,question,other,
-1111000,203902,9000,6000,2,
-1111001,203902,8000,7000,2,
-1111002,203902,9000,,2,
-1111003,203902,8000,,2,
-1111004,203902,9000,,2,
-1111007,203902,8000,,2,
-1111000,203903,9000,,2,
-1111001,203903,8000,,2,
-1111002,203903,9000,1500.2,2,
-1111003,203903,8000,2000,2,
-1111004,203903,9000,,2,
-1111005,203903,8000,1220,2,
-1111006,203903,9000,4500,2,
-1111007,203903,8000,,2,
-1111000,203904,9000,,2,
-1111001,203904,8000,,2,
-1111002,203904,9000,,2,
-1111003,203904,8000,1000,2,
-1111004,203904,9000,2300,2,
-1111005,203904,8000,,2,
-1111006,203904,9000,7000,2,
-1111007,203904,8000,,2,
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_missing_strata_input.csv b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_missing_strata_input.csv
deleted file mode 100644
index 15f08df2..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_missing_strata_input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-identifier,date,group,question,other
-101,204001,9000,,2
-101,204002,9000,10000,2
-102,204002,7000,,2
-101,204003,9000,,2
-102,204003,7000,20000,2
-103,204003,9000,,2
-101,204004,9000,,2
-102,204004,7000,,2
-103,204004,9000,,2
-104,204004,7000,9000,2
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_missing_strata_output.csv b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_missing_strata_output.csv
deleted file mode 100644
index abf7ea17..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_missing_strata_output.csv
+++ /dev/null
@@ -1,16 +0,0 @@
-identifier,date,group,other,marker,output,forward,backward,construction
-101,203912,9000,2,FIR,12000,1,1,
-101,204001,9000,2,FIR,12000,1,1,
-101,204002,9000,2,R,10000,1,1,
-101,204003,9000,2,FIR,10000,1,1,
-101,204004,9000,2,FIR,10000,1,1,
-102,204002,7000,2,BI,20000,1,1,
-102,204003,7000,2,R,20000,1,1,
-102,204004,7000,2,FIR,20000,1,1,
-103,203912,9000,2,C,5000,1,1,
-103,204003,9000,2,C,2,1,1,19994
-103,204004,9000,2,FIC,2,1,1,
-107,203912,9000,2,FIC,1000,1,1,
-104,204004,7000,2,R,9000,1,1,
-110,203912,9000,2,BI,2999,1,1,
-900,203912,1234,2,R,1000,1,1,
diff --git a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_output.csv
deleted file mode 100644
index 09480fae..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/back_data_scenarios/back_data_output.csv
+++ /dev/null
@@ -1,29 +0,0 @@
-identifier,date,group,output,other,marker,forward,backward,construction
-1111000,203901,9000,1464.1,2,R,1,1,1
-1111001,203901,8000,2464.1,2,BI,1,1,1
-1111002,203901,9000,3464.1,2,FIR,1,1,1
-1111003,203901,8000,4464.1,2,FIC,1,1,1
-1111004,203901,9000,5464.1,2,C,1,1,1
-1200001,203901,8000,3500,2,R,1,1,1
-1111000,203902,9000,6000,2,R,4.09808073219042,1,3000
-1111001,203902,8000,7000,2,R,1,1,3500
-1111002,203902,9000,14196.1614643808,2,FIR,4.09808073219042,1,3000
-1111003,203902,8000,2000,2,BI,1,1,3500
-1111004,203902,9000,1478.57142857143,2,BI,4.09808073219042,1,3000
-1111007,203902,8000,7000,2,C,1,1,3500
-1111000,203903,9000,6000,2,FIR,1,0.642857142857143,1500.05
-1111001,203903,8000,7000,2,FIR,1,2,805
-1111002,203903,9000,1500.2,2,R,1,0.642857142857143,1500.05
-1111003,203903,8000,2000,2,R,1,2,805
-1111004,203903,9000,1478.57142857143,2,BI,1,0.642857142857145,1500.05
-1111005,203903,8000,1220,2,R,1,2,805
-1111006,203903,9000,4500,2,R,1,0.642857142857145,1500.05
-1111007,203903,8000,7000,2,FIC,1,2,805
-1111000,203904,9000,9333.3333333333,2,FIR,1.55555555555555,1,2325
-1111001,203904,8000,3500,2,FIR,0.5,1,500
-1111002,203904,9000,2333.64444444444,2,FIR,1.55555555555555,1,2325
-1111003,203904,8000,1000,2,R,0.5,1,500
-1111004,203904,9000,2300,2,R,1.55555555555555,1,2325
-1111005,203904,8000,610,2,FIR,0.5,1,500
-1111006,203904,9000,7000,2,R,1.55555555555555,1,2325
-1111007,203904,8000,3500,2,FIC,0.5,1,500
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 07c2c576..444ff764 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,547,1.0,0.992513369,15.46666667,547,R,,2,2
-10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,362,R,2,2,2
-10001,202003,1,10,895,1.186096257,1.0,18.48333333,895,R,2,,2
-10002,202001,1,50,381,1.0,0.992513369,15.46666667,381,R,,2,2
-10002,202002,1,50,573,1.007543103,0.843101893,15.58333333,573,R,2,2,2
-10002,202003,1,50,214,1.186096257,1.0,18.48333333,214,R,2,,2
-10003,202001,2,12,961,1.0,1.693854749,72.19047619,961,R,,2,2
-10003,202002,2,12,267,0.590369393,0.852380952,42.61904762,267,R,2,2,2
-10003,202003,2,12,314,1.173184358,1.0,50,314,R,2,,2
-10004,202001,2,9,555,1.0,1.693854749,72.19047619,555,R,,2,2
-10004,202002,2,9,628,0.590369393,0.852380952,42.61904762,628,R,2,2,2
-10004,202003,2,9,736,1.173184358,1.0,50,736,R,2,,2
-10005,202001,1,18,278.4,1.0,0.992513369,15.46666667,278.4000001,C,,2,2
-10005,202002,2,18,767.1429,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2
-10005,202003,2,18,899.9997,1.173184358,1.0,50,900.00000,FIC,2,,2
-10006,202001,1,85,150000,1.0,0.992513369,15.46666667,547,R,,2,2
-10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,362,R,2,2,2
-10006,202003,1,85,120000,1.186096257,1.0,18.48333333,895,R,2,,2
-10007,202001,1,71,1098.133334,1.0,0.992513369,15.46666667,547,C,,2,2
-10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,362,FIC,2,2,2
-10007,202003,1,71,1312.316666,1.186096257,1.0,18.48333333,895,FIC,2,,2
-10008,202001,2,85,150000,1.0,1.693854749,72.19047619,961,R,,2,2
-10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,267,R,2,2,2
-10008,202003,2,85,120000,1.173184358,1.0,50,314,R,2,,2
-10009,202001,2,71,5125.523809,1.0,1.693854749,72.19047619,961,C,,2,2
-10009,202002,2,71,3025.952380,0.590369393,0.852380952,42.61904762,267,FIC,2,2,2
-10009,202003,2,71,3550.000001,1.173184358,1.0,50,314,FIC,2,,2
+identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction
+10001,202001,1,10,547,1,0.992513369,15.46666667,R,,2,2
+10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,R,2,2,2
+10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,,2
+10002,202001,1,50,381,1,0.992513369,15.46666667,R,,2,2
+10002,202002,1,50,573,1.007543103,0.843101893,15.58333333,R,2,2,2
+10002,202003,1,50,214,1.186096257,1,18.48333333,R,2,,2
+10003,202001,2,12,961,1,1.693854749,72.19047619,R,,2,2
+10003,202002,2,12,267,0.590369393,0.852380952,42.61904762,R,2,2,2
+10003,202003,2,12,314,1.173184358,1,50,R,2,,2
+10004,202001,2,9,555,1,1.693854749,72.19047619,R,,2,2
+10004,202002,2,9,628,0.590369393,0.852380952,42.61904762,R,2,2,2
+10004,202003,2,9,736,1.173184358,1,50,R,2,,2
+10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,,2,2
+10005,202002,2,18,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2
+10005,202003,2,18,900.000,1.173184358,1,50,FIC,2,,2
+10006,202001,1,85,150000,1,0.992513369,15.46666667,R,,2,2
+10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2
+10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,,2
+10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,,2,2
+10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2
+10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,,2
+10008,202001,2,85,150000,1,1.693854749,72.19047619,R,,2,2
+10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2
+10008,202003,2,85,120000,1.173184358,1,50,R,2,,2
+10009,202001,2,71,5125.523810,1,1.693854749,72.19047619,C,,2,2
+10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2
+10009,202003,2,71,3550.00000,1.173184358,1,50,FIC,2,,2
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 822b5b9b..b5664bae 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -575,6 +575,11 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         back_data_df = scenario_expected_output.join(
             min_period_df, [col(period_col) == col("min(" + period_col + ")")]
         )
+        
+        if scenario.endswith("filtered") and "dev" in scenario_type:
+            back_data_df = back_data_df.join(
+            scenario_input.select(reference_col, period_col, exclude_col), [reference_col, period_col]
+            )
 
         imputation_kwargs["back_data_df"] = back_data_df
 

From 5f65002538f81c55c673bc2dd2e68de25b4a5b56 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 3 Feb 2023 16:30:39 +0000
Subject: [PATCH 028/531] Output?

---
 .../30_class_change_C_C_FI_filtered_output.csv                  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 444ff764..87db6ec2 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -25,4 +25,4 @@ identifier,date,group,other,output,forward,backward,construction,marker,count_fo
 10008,202003,2,85,120000,1.173184358,1,50,R,2,,2
 10009,202001,2,71,5125.523810,1,1.693854749,72.19047619,C,,2,2
 10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2
-10009,202003,2,71,3550.00000,1.173184358,1,50,FIC,2,,2
+10009,202003,2,71,3550.000000,1.173184358,1,50,FIC,2,,2

From 7c007a67e5bb76c15add7ae713cf0bdcfa443c17 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 3 Feb 2023 16:31:31 +0000
Subject: [PATCH 029/531] Sort per category tests

---
 tests/imputation/test_ratio_of_means.py | 55 ++++++++++++++-----------
 1 file changed, 30 insertions(+), 25 deletions(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index b5664bae..7eb5a6ae 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -105,25 +105,19 @@
     ("unit", "imputation_link_counts"),
 ]
 
+scenario_path_prefix = pathlib.Path(
+    "tests", "fixture_data", "imputation", "ratio_of_means"
+)
 for scenario_category in ("dev", "methodology"):
-    for file_name in glob.iglob(
-        str(
-            pathlib.Path(
-                "tests",
-                "fixture_data",
-                "imputation",
-                "ratio_of_means",
-                f"{scenario_category}_scenarios",
-                "*_input.csv",
-            )
-        )
-    ):
-        test_scenarios.append(
-            (
-                f"{scenario_category}_scenarios",
-                os.path.basename(file_name).replace("_input.csv", ""),
-            )
-        )
+    scenario_type = f"{scenario_category}_scenarios"
+    test_files = glob.glob(str(scenario_path_prefix / scenario_type / "*_input.csv"))
+    test_scenarios += sorted(
+        (
+            (scenario_type, os.path.basename(f).replace("_input.csv", ""))
+            for f in test_files
+        ),
+        key=lambda t: t[1],
+    )
 
 test_scenarios += [
     (f"back_data_{scenario_type}", scenario_file)
@@ -575,25 +569,36 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         back_data_df = scenario_expected_output.join(
             min_period_df, [col(period_col) == col("min(" + period_col + ")")]
         )
-        
+
         if scenario.endswith("filtered") and "dev" in scenario_type:
             back_data_df = back_data_df.join(
-            scenario_input.select(reference_col, period_col, exclude_col), [reference_col, period_col]
+                scenario_input.select(reference_col, period_col, exclude_col),
+                [reference_col, period_col],
             )
 
         imputation_kwargs["back_data_df"] = back_data_df
 
         scenario_input = scenario_input.join(
-            min_period_df, [col(period_col) == col("min(" + period_col + ")")], "leftanti"
+            min_period_df,
+            [col(period_col) == col("min(" + period_col + ")")],
+            "leftanti",
         ).drop("min(" + period_col + ")")
 
         scenario_expected_output = scenario_expected_output.join(
-            min_period_df, [col(period_col) == col("min(" + period_col + ")")], "leftanti"
+            min_period_df,
+            [col(period_col) == col("min(" + period_col + ")")],
+            "leftanti",
         ).drop("min(" + period_col + ")")
 
-    scenario_actual_output = ratio_of_means.impute(scenario_input, *params, **imputation_kwargs)
-    scenario_actual_output = scenario_actual_output.withColumn(output_col, bround(col(output_col), 6))
-    scenario_actual_output = scenario_actual_output.withColumn(forward_col, bround(col(forward_col), 6))
+    scenario_actual_output = ratio_of_means.impute(
+        scenario_input, *params, **imputation_kwargs
+    )
+    scenario_actual_output = scenario_actual_output.withColumn(
+        output_col, bround(col(output_col), 6)
+    )
+    scenario_actual_output = scenario_actual_output.withColumn(
+        forward_col, bround(col(forward_col), 6)
+    )
     scenario_actual_output = scenario_actual_output.withColumn(
         backward_col, bround(col(backward_col).cast(decimal_type), 6)
     )

From 82c754cb0ce6d1d33325f0dfe23b277225a51c27 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 3 Feb 2023 17:28:17 +0000
Subject: [PATCH 030/531] Tests Working

---
 tests/imputation/test_ratio_of_means.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 7eb5a6ae..d3e27205 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -4,7 +4,7 @@
 
 import pytest
 from chispa.dataframe_comparer import assert_df_equality
-from pyspark.sql.functions import bround, col, lit, when
+from pyspark.sql.functions import bround, col, lit
 from pyspark.sql.types import DecimalType, LongType, StringType
 
 from statistical_methods_library.imputation import ratio_of_means
@@ -570,11 +570,14 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
             min_period_df, [col(period_col) == col("min(" + period_col + ")")]
         )
 
-        if scenario.endswith("filtered") and "dev" in scenario_type:
-            back_data_df = back_data_df.join(
-                scenario_input.select(reference_col, period_col, exclude_col),
-                [reference_col, period_col],
-            )
+        if scenario.endswith("filtered"):
+            if "dev" in scenario_type:
+                back_data_df = back_data_df.join(
+                    scenario_input.select(reference_col, period_col, exclude_col),
+                    [reference_col, period_col],
+                )
+            else:
+                back_data_df = back_data_df.withColumn(target_col, col(output_col))
 
         imputation_kwargs["back_data_df"] = back_data_df
 

From d01e85e4f96bc27840a725ea94d79c9e366e180a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 3 Feb 2023 17:44:36 +0000
Subject: [PATCH 031/531] Release Notes

---
 docs/release-notes/9.1.0.md | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 docs/release-notes/9.1.0.md

diff --git a/docs/release-notes/9.1.0.md b/docs/release-notes/9.1.0.md
new file mode 100644
index 00000000..dfb265be
--- /dev/null
+++ b/docs/release-notes/9.1.0.md
@@ -0,0 +1,24 @@
+# Statistical Methods Library 9.1.0
+
+Release date: 2023-02-06
+
+## Synopsis
+
+This release addresses a conflict between the imputation link filtering of matched pairs and the use of back data functionalities in the ratio of means method.
+
+## Changes
+
+Ratio of Means link filtering now happens after back data is validated
+and if there is back data it will be added to the input data before being data is passed to the filter.
+
+Testing has also been changed to merge the back data testing into the main testing section.
+This will mean that the methadology provided data will be run as ordinary data and then run again
+with the first period used as back data.
+This means all testing scenarios are covered with and without back data.
+
+## Notes
+
+The way the methadology provided data is used to test back data is by taking the expected output file
+and splitting it into back data (the first period) and the new expected output (all other periods).
+This is possible because there shold be no change to the links based on if the links are calculated
+with or without back data due to the actual data being the same figures.

From 8596129fa13e6e1e699472cf120430f7abc07c98 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Mon, 6 Feb 2023 10:04:32 +0000
Subject: [PATCH 032/531] Update 9.1.0.md

---
 docs/release-notes/9.1.0.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/release-notes/9.1.0.md b/docs/release-notes/9.1.0.md
index dfb265be..469cd3b8 100644
--- a/docs/release-notes/9.1.0.md
+++ b/docs/release-notes/9.1.0.md
@@ -4,7 +4,8 @@ Release date: 2023-02-06
 
 ## Synopsis
 
-This release addresses a conflict between the imputation link filtering of matched pairs and the use of back data functionalities in the ratio of means method.
+This release addresses a conflict between the imputation link filtering of matched pairs and
+the use of back data functionalities in the ratio of means method.
 
 ## Changes
 

From 57d1a2fa6623087d6eed652da2a25215d3aa18f9 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Mon, 6 Feb 2023 10:12:04 +0000
Subject: [PATCH 033/531] Forgot the version update

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 5cbdfe76..5f8b43dc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "9.0.1"
+version = "9.1.0"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From fc76980c1e7db55b7ce682e30ec9d3329a44efe7 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Feb 2023 10:23:23 +0000
Subject: [PATCH 034/531] Alter release notes for 9.1.0

- Removed notes about testing since that change won't impact users who are
  the target audience
- Altered the explanation of the issue being addressed to hopefully clarify to
  users
- Added a note on the effect of the prior bug and recommendations for
  remediation
---
 docs/release-notes/9.1.0.md | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/docs/release-notes/9.1.0.md b/docs/release-notes/9.1.0.md
index 469cd3b8..32dddb4e 100644
--- a/docs/release-notes/9.1.0.md
+++ b/docs/release-notes/9.1.0.md
@@ -4,22 +4,17 @@ Release date: 2023-02-06
 
 ## Synopsis
 
-This release addresses a conflict between the imputation link filtering of matched pairs and
-the use of back data functionalities in the ratio of means method.
+This release addresses an issue applying the link filter when using back data in the Ratio of Means imputation method.
 
 ## Changes
 
-Ratio of Means link filtering now happens after back data is validated
-and if there is back data it will be added to the input data before being data is passed to the filter.
-
-Testing has also been changed to merge the back data testing into the main testing section.
-This will mean that the methadology provided data will be run as ordinary data and then run again
-with the first period used as back data.
-This means all testing scenarios are covered with and without back data.
+In the Ratio of Means imputation method, link filtering now happens after
+back data is validated and if there is back data it will be added to the
+input data before applying the filter. This fixes an issue where all the
+back data was filtered out in link calculations when using a link filter.
 
 ## Notes
 
-The way the methadology provided data is used to test back data is by taking the expected output file
-and splitting it into back data (the first period) and the new expected output (all other periods).
-This is possible because there shold be no change to the links based on if the links are calculated
-with or without back data due to the actual data being the same figures.
+Any data produced using a prior version of the Ratio of Means method relying
+on the link filter and back data should be considered suspect and it is
+recommended to repeat such runs with this new version.

From b2ee3246792862f78bc6062f4f259e4ea0fc0969 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Feb 2023 10:40:39 +0000
Subject: [PATCH 035/531] Fix line length

---
 docs/release-notes/9.1.0.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/release-notes/9.1.0.md b/docs/release-notes/9.1.0.md
index 32dddb4e..e985d242 100644
--- a/docs/release-notes/9.1.0.md
+++ b/docs/release-notes/9.1.0.md
@@ -4,7 +4,8 @@ Release date: 2023-02-06
 
 ## Synopsis
 
-This release addresses an issue applying the link filter when using back data in the Ratio of Means imputation method.
+This release addresses an issue applying the link filter when using back
+data in the Ratio of Means imputation method.
 
 ## Changes
 

From 1316cbe23d6836c0cecb7587eeeb6773ba0a5edd Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 7 Feb 2023 10:01:23 +0000
Subject: [PATCH 036/531] While doing other work, noticed a unused drop in the
 code. (In validate, backdata selects only the expected columns passed in and
 target column is not one of them.)

---
 statistical_methods_library/imputation/ratio_of_means.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 2b4101ff..b5a4082a 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -290,7 +290,6 @@ def prepare_df(df: DataFrame) -> DataFrame:
                         & (col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))
                     )
                 )
-                .drop("target")
                 .withColumn("previous_period", calculate_previous_period(col("period")))
                 .withColumn("next_period", calculate_next_period(col("period")))
             )

From 44b6ae71f89db9c562f646011b333dfb7d3b7587 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 7 Feb 2023 10:02:17 +0000
Subject: [PATCH 037/531] Version Bump

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 5f8b43dc..4c30ac60 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "9.1.0"
+version = "9.1.1"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 5fa90ed346970426f7db754c1b0c5500c80d4d83 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 7 Feb 2023 10:31:06 +0000
Subject: [PATCH 038/531] Release Note

---
 docs/release-notes/9.1.1.md | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 docs/release-notes/9.1.1.md

diff --git a/docs/release-notes/9.1.1.md b/docs/release-notes/9.1.1.md
new file mode 100644
index 00000000..13959b40
--- /dev/null
+++ b/docs/release-notes/9.1.1.md
@@ -0,0 +1,18 @@
+# Statistical Methods Library 9.1.1
+
+Release date: 2023-02-07
+
+## Synopsis
+
+This release remove a piece of unused code.
+
+## Changes
+
+In the Ratio of Means imputation method, as part of back data processing
+the methid drops the target column. But back data is the output of Ration of
+Means imputation and so does not contain the target column.
+
+## Notes
+
+No changes have been made to functionality of the library, this is only removing
+code that does not do anything.

From 5df42c41350372f344e29131bb9837aeba56ee84 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Tue, 7 Feb 2023 10:39:02 +0000
Subject: [PATCH 039/531] Update 9.1.1.md

---
 docs/release-notes/9.1.1.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/release-notes/9.1.1.md b/docs/release-notes/9.1.1.md
index 13959b40..08db49d1 100644
--- a/docs/release-notes/9.1.1.md
+++ b/docs/release-notes/9.1.1.md
@@ -4,7 +4,7 @@ Release date: 2023-02-07
 
 ## Synopsis
 
-This release remove a piece of unused code.
+This release removes a piece of unused code.
 
 ## Changes
 

From 81eac94167e2c7edee9a59cdb8749e6cc549cd99 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Tue, 7 Feb 2023 10:40:33 +0000
Subject: [PATCH 040/531] Update 9.1.1.md

---
 docs/release-notes/9.1.1.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/release-notes/9.1.1.md b/docs/release-notes/9.1.1.md
index 08db49d1..c5eaa874 100644
--- a/docs/release-notes/9.1.1.md
+++ b/docs/release-notes/9.1.1.md
@@ -8,11 +8,11 @@ This release removes a piece of unused code.
 
 ## Changes
 
-In the Ratio of Means imputation method, as part of back data processing
-the methid drops the target column. But back data is the output of Ration of
+In the Ratio of Means imputation method, as part of back data processing,
+this method drops the target column but back data is an output from Ratio of
 Means imputation and so does not contain the target column.
 
 ## Notes
 
-No changes have been made to functionality of the library, this is only removing
-code that does not do anything.
+No changes have been made to the functionality of the library, this is only
+removing code that does not do anything.

From 46f2b32f2c9977d0598bf27392058128f32e4b00 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 7 Feb 2023 11:23:21 +0000
Subject: [PATCH 041/531] minor release note rewrite

---
 docs/release-notes/9.1.1.md | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/docs/release-notes/9.1.1.md b/docs/release-notes/9.1.1.md
index c5eaa874..71b35c16 100644
--- a/docs/release-notes/9.1.1.md
+++ b/docs/release-notes/9.1.1.md
@@ -4,15 +4,14 @@ Release date: 2023-02-07
 
 ## Synopsis
 
-This release removes a piece of unused code.
+This release removes a piece of unused code in back data handling.
 
 ## Changes
 
-In the Ratio of Means imputation method, as part of back data processing,
-this method drops the target column but back data is an output from Ratio of
-Means imputation and so does not contain the target column.
+In the Ratio of Means imputation method, an attempt was made to drop a
+non-existent column (the input target column) from the back data. This was
+silently failing and so has been removed.
 
 ## Notes
 
-No changes have been made to the functionality of the library, this is only
-removing code that does not do anything.
+This change has no functional impact.

From 7194d9457a1b6789257bf6a74611e17f783773e5 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 7 Feb 2023 14:49:58 +0000
Subject: [PATCH 042/531] Update version of poetry used

---
 .github/workflows/ci-checks.yaml               | 10 +++++-----
 .github/workflows/package-release-artifact.yml |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 5d2b8711..6e46f261 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -24,7 +24,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.1.6
+          poetry-version: 1.3.2
       - name: Install dependencies
         run: poetry install
       - name: build
@@ -50,7 +50,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.1.6
+          poetry-version: 1.3.2
       - name: Install dependencies
         run: poetry install
       - name: test
@@ -90,7 +90,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.1.6
+          poetry-version: 1.3.2
       - name: Install dependencies
         run: poetry install
       - name: run flake8
@@ -116,7 +116,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.1.6
+          poetry-version: 1.3.2
       - name: Install dependencies
         run: poetry install
       - name: run isort
@@ -142,7 +142,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.1.6
+          poetry-version: 1.3.2
       - name: Install dependencies
         run: poetry install
       - name: run black
diff --git a/.github/workflows/package-release-artifact.yml b/.github/workflows/package-release-artifact.yml
index c1b7d3f8..42a732f1 100644
--- a/.github/workflows/package-release-artifact.yml
+++ b/.github/workflows/package-release-artifact.yml
@@ -28,7 +28,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.1.6
+          poetry-version: 1.3.2
       - name: Install dependencies
         run: poetry install --no-dev
       - name: build

From 91876466b1d81fd23d1b15203bdef6bda72c7eb1 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 7 Feb 2023 14:57:06 +0000
Subject: [PATCH 043/531] Bump black from 22.12.0 to 23.1.0

Bumps [black](https://github.com/psf/black) from 22.12.0 to 23.1.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.12.0...23.1.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 poetry.lock    | 408 +++++++++++++++++++++++++------------------------
 pyproject.toml |   2 +-
 2 files changed, 212 insertions(+), 198 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 7bce49db..d4db3dfd 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,3 +1,5 @@
+# This file is automatically @generated by Poetry and should not be changed by hand.
+
 [[package]]
 name = "attrs"
 version = "22.2.0"
@@ -5,6 +7,10 @@ description = "Classes Without Boilerplate"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
+    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
+]
 
 [package.extras]
 cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"]
@@ -15,18 +21,46 @@ tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy
 
 [[package]]
 name = "black"
-version = "22.12.0"
+version = "23.1.0"
 description = "The uncompromising code formatter."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "black-23.1.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:b6a92a41ee34b883b359998f0c8e6eb8e99803aa8bf3123bf2b2e6fec505a221"},
+    {file = "black-23.1.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:57c18c5165c1dbe291d5306e53fb3988122890e57bd9b3dcb75f967f13411a26"},
+    {file = "black-23.1.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:9880d7d419bb7e709b37e28deb5e68a49227713b623c72b2b931028ea65f619b"},
+    {file = "black-23.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e6663f91b6feca5d06f2ccd49a10f254f9298cc1f7f49c46e498a0771b507104"},
+    {file = "black-23.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:9afd3f493666a0cd8f8df9a0200c6359ac53940cbde049dcb1a7eb6ee2dd7074"},
+    {file = "black-23.1.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:bfffba28dc52a58f04492181392ee380e95262af14ee01d4bc7bb1b1c6ca8d27"},
+    {file = "black-23.1.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:c1c476bc7b7d021321e7d93dc2cbd78ce103b84d5a4cf97ed535fbc0d6660648"},
+    {file = "black-23.1.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:382998821f58e5c8238d3166c492139573325287820963d2f7de4d518bd76958"},
+    {file = "black-23.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bf649fda611c8550ca9d7592b69f0637218c2369b7744694c5e4902873b2f3a"},
+    {file = "black-23.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:121ca7f10b4a01fd99951234abdbd97728e1240be89fde18480ffac16503d481"},
+    {file = "black-23.1.0-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:a8471939da5e824b891b25751955be52ee7f8a30a916d570a5ba8e0f2eb2ecad"},
+    {file = "black-23.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8178318cb74f98bc571eef19068f6ab5613b3e59d4f47771582f04e175570ed8"},
+    {file = "black-23.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:a436e7881d33acaf2536c46a454bb964a50eff59b21b51c6ccf5a40601fbef24"},
+    {file = "black-23.1.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:a59db0a2094d2259c554676403fa2fac3473ccf1354c1c63eccf7ae65aac8ab6"},
+    {file = "black-23.1.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:0052dba51dec07ed029ed61b18183942043e00008ec65d5028814afaab9a22fd"},
+    {file = "black-23.1.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:49f7b39e30f326a34b5c9a4213213a6b221d7ae9d58ec70df1c4a307cf2a1580"},
+    {file = "black-23.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:162e37d49e93bd6eb6f1afc3e17a3d23a823042530c37c3c42eeeaf026f38468"},
+    {file = "black-23.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b70eb40a78dfac24842458476135f9b99ab952dd3f2dab738c1881a9b38b753"},
+    {file = "black-23.1.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:a29650759a6a0944e7cca036674655c2f0f63806ddecc45ed40b7b8aa314b651"},
+    {file = "black-23.1.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:bb460c8561c8c1bec7824ecbc3ce085eb50005883a6203dcfb0122e95797ee06"},
+    {file = "black-23.1.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:c91dfc2c2a4e50df0026f88d2215e166616e0c80e86004d0003ece0488db2739"},
+    {file = "black-23.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a951cc83ab535d248c89f300eccbd625e80ab880fbcfb5ac8afb5f01a258ac9"},
+    {file = "black-23.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:0680d4380db3719ebcfb2613f34e86c8e6d15ffeabcf8ec59355c5e7b85bb555"},
+    {file = "black-23.1.0-py3-none-any.whl", hash = "sha256:7a0f701d314cfa0896b9001df70a530eb2472babb76086344e688829efd97d32"},
+    {file = "black-23.1.0.tar.gz", hash = "sha256:b0bd97bea8903f5a2ba7219257a44e3f1f9d00073d6cc1add68f0beec69692ac"},
+]
 
 [package.dependencies]
 click = ">=8.0.0"
 mypy-extensions = ">=0.4.3"
+packaging = ">=22.0"
 pathspec = ">=0.9.0"
 platformdirs = ">=2"
-tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""}
+tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
 typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""}
 typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}
 
@@ -43,6 +77,10 @@ description = "Pyspark test helper library"
 category = "dev"
 optional = false
 python-versions = ">=3.5"
+files = [
+    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
+    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
+]
 
 [[package]]
 name = "click"
@@ -51,6 +89,10 @@ description = "Composable command line interface toolkit"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
+    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
+]
 
 [package.dependencies]
 colorama = {version = "*", markers = "platform_system == \"Windows\""}
@@ -63,6 +105,10 @@ description = "Cross-platform colored terminal text."
 category = "dev"
 optional = false
 python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
+files = [
+    {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
+    {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
+]
 
 [[package]]
 name = "coverage"
@@ -71,6 +117,59 @@ description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "coverage-7.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2a7f23bbaeb2a87f90f607730b45564076d870f1fb07b9318d0c21f36871932b"},
+    {file = "coverage-7.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c18d47f314b950dbf24a41787ced1474e01ca816011925976d90a88b27c22b89"},
+    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef14d75d86f104f03dea66c13188487151760ef25dd6b2dbd541885185f05f40"},
+    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66e50680e888840c0995f2ad766e726ce71ca682e3c5f4eee82272c7671d38a2"},
+    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9fed35ca8c6e946e877893bbac022e8563b94404a605af1d1e6accc7eb73289"},
+    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d8d04e755934195bdc1db45ba9e040b8d20d046d04d6d77e71b3b34a8cc002d0"},
+    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e109f1c9a3ece676597831874126555997c48f62bddbcace6ed17be3e372de8"},
+    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0a1890fca2962c4f1ad16551d660b46ea77291fba2cc21c024cd527b9d9c8809"},
+    {file = "coverage-7.0.5-cp310-cp310-win32.whl", hash = "sha256:be9fcf32c010da0ba40bf4ee01889d6c737658f4ddff160bd7eb9cac8f094b21"},
+    {file = "coverage-7.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:cbfcba14a3225b055a28b3199c3d81cd0ab37d2353ffd7f6fd64844cebab31ad"},
+    {file = "coverage-7.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30b5fec1d34cc932c1bc04017b538ce16bf84e239378b8f75220478645d11fca"},
+    {file = "coverage-7.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1caed2367b32cc80a2b7f58a9f46658218a19c6cfe5bc234021966dc3daa01f0"},
+    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d254666d29540a72d17cc0175746cfb03d5123db33e67d1020e42dae611dc196"},
+    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19245c249aa711d954623d94f23cc94c0fd65865661f20b7781210cb97c471c0"},
+    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b05ed4b35bf6ee790832f68932baf1f00caa32283d66cc4d455c9e9d115aafc"},
+    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:29de916ba1099ba2aab76aca101580006adfac5646de9b7c010a0f13867cba45"},
+    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e057e74e53db78122a3979f908973e171909a58ac20df05c33998d52e6d35757"},
+    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:411d4ff9d041be08fdfc02adf62e89c735b9468f6d8f6427f8a14b6bb0a85095"},
+    {file = "coverage-7.0.5-cp311-cp311-win32.whl", hash = "sha256:52ab14b9e09ce052237dfe12d6892dd39b0401690856bcfe75d5baba4bfe2831"},
+    {file = "coverage-7.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:1f66862d3a41674ebd8d1a7b6f5387fe5ce353f8719040a986551a545d7d83ea"},
+    {file = "coverage-7.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b69522b168a6b64edf0c33ba53eac491c0a8f5cc94fa4337f9c6f4c8f2f5296c"},
+    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436e103950d05b7d7f55e39beeb4d5be298ca3e119e0589c0227e6d0b01ee8c7"},
+    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8c56bec53d6e3154eaff6ea941226e7bd7cc0d99f9b3756c2520fc7a94e6d96"},
+    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a38362528a9115a4e276e65eeabf67dcfaf57698e17ae388599568a78dcb029"},
+    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f67472c09a0c7486e27f3275f617c964d25e35727af952869dd496b9b5b7f6a3"},
+    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:220e3fa77d14c8a507b2d951e463b57a1f7810a6443a26f9b7591ef39047b1b2"},
+    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ecb0f73954892f98611e183f50acdc9e21a4653f294dfbe079da73c6378a6f47"},
+    {file = "coverage-7.0.5-cp37-cp37m-win32.whl", hash = "sha256:d8f3e2e0a1d6777e58e834fd5a04657f66affa615dae61dd67c35d1568c38882"},
+    {file = "coverage-7.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9e662e6fc4f513b79da5d10a23edd2b87685815b337b1a30cd11307a6679148d"},
+    {file = "coverage-7.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:790e4433962c9f454e213b21b0fd4b42310ade9c077e8edcb5113db0818450cb"},
+    {file = "coverage-7.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49640bda9bda35b057b0e65b7c43ba706fa2335c9a9896652aebe0fa399e80e6"},
+    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d66187792bfe56f8c18ba986a0e4ae44856b1c645336bd2c776e3386da91e1dd"},
+    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:276f4cd0001cd83b00817c8db76730938b1ee40f4993b6a905f40a7278103b3a"},
+    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95304068686545aa368b35dfda1cdfbbdbe2f6fe43de4a2e9baa8ebd71be46e2"},
+    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:17e01dd8666c445025c29684d4aabf5a90dc6ef1ab25328aa52bedaa95b65ad7"},
+    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea76dbcad0b7b0deb265d8c36e0801abcddf6cc1395940a24e3595288b405ca0"},
+    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:50a6adc2be8edd7ee67d1abc3cd20678987c7b9d79cd265de55941e3d0d56499"},
+    {file = "coverage-7.0.5-cp38-cp38-win32.whl", hash = "sha256:e4ce984133b888cc3a46867c8b4372c7dee9cee300335e2925e197bcd45b9e16"},
+    {file = "coverage-7.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:4a950f83fd3f9bca23b77442f3a2b2ea4ac900944d8af9993743774c4fdc57af"},
+    {file = "coverage-7.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c2155943896ac78b9b0fd910fb381186d0c345911f5333ee46ac44c8f0e43ab"},
+    {file = "coverage-7.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:54f7e9705e14b2c9f6abdeb127c390f679f6dbe64ba732788d3015f7f76ef637"},
+    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ee30375b409d9a7ea0f30c50645d436b6f5dfee254edffd27e45a980ad2c7f4"},
+    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b78729038abea6a5df0d2708dce21e82073463b2d79d10884d7d591e0f385ded"},
+    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13250b1f0bd023e0c9f11838bdeb60214dd5b6aaf8e8d2f110c7e232a1bff83b"},
+    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c407b1950b2d2ffa091f4e225ca19a66a9bd81222f27c56bd12658fc5ca1209"},
+    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c76a3075e96b9c9ff00df8b5f7f560f5634dffd1658bafb79eb2682867e94f78"},
+    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f26648e1b3b03b6022b48a9b910d0ae209e2d51f50441db5dce5b530fad6d9b1"},
+    {file = "coverage-7.0.5-cp39-cp39-win32.whl", hash = "sha256:ba3027deb7abf02859aca49c865ece538aee56dcb4871b4cced23ba4d5088904"},
+    {file = "coverage-7.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:949844af60ee96a376aac1ded2a27e134b8c8d35cc006a52903fc06c24a3296f"},
+    {file = "coverage-7.0.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:b9727ac4f5cf2cbf87880a63870b5b9730a8ae3a4a360241a0fdaa2f71240ff0"},
+    {file = "coverage-7.0.5.tar.gz", hash = "sha256:051afcbd6d2ac39298d62d340f94dbb6a1f31de06dfaf6fcef7b759dd3860c45"},
+]
 
 [package.dependencies]
 tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}
@@ -85,6 +184,10 @@ description = "Backport of PEP 654 (exception groups)"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
+    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
+]
 
 [package.extras]
 test = ["pytest (>=6)"]
@@ -96,6 +199,10 @@ description = "the modular source code checker: pep8 pyflakes and co"
 category = "dev"
 optional = false
 python-versions = ">=3.6.1"
+files = [
+    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
+    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
+]
 
 [package.dependencies]
 importlib-metadata = {version = ">=1.1.0,<4.3", markers = "python_version < \"3.8\""}
@@ -110,6 +217,10 @@ description = "Read metadata from Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
+    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
+]
 
 [package.dependencies]
 typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""}
@@ -126,6 +237,10 @@ description = "iniconfig: brain-dead simple config-ini parsing"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
+    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
+]
 
 [[package]]
 name = "isort"
@@ -134,6 +249,10 @@ description = "A Python utility / library to sort Python imports."
 category = "dev"
 optional = false
 python-versions = ">=3.7.0"
+files = [
+    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
+    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
+]
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
@@ -148,6 +267,10 @@ description = "McCabe checker, plugin for flake8"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
+    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
+]
 
 [[package]]
 name = "mypy-extensions"
@@ -156,6 +279,10 @@ description = "Experimental type system extensions for programs checked with the
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
+    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
+]
 
 [[package]]
 name = "packaging"
@@ -164,6 +291,10 @@ description = "Core utilities for Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
+    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
+]
 
 [[package]]
 name = "pathspec"
@@ -172,6 +303,10 @@ description = "Utility library for gitignore style pattern matching of file path
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
+    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
+]
 
 [[package]]
 name = "platformdirs"
@@ -180,6 +315,10 @@ description = "A small Python package for determining appropriate platform-speci
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
+    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
+]
 
 [package.dependencies]
 typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""}
@@ -195,6 +334,10 @@ description = "plugin and hook calling mechanisms for python"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
+    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
+]
 
 [package.dependencies]
 importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
@@ -210,6 +353,10 @@ description = "Enables Python programs to dynamically access arbitrary Java obje
 category = "main"
 optional = false
 python-versions = "*"
+files = [
+    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
+    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
+]
 
 [[package]]
 name = "pycodestyle"
@@ -218,6 +365,10 @@ description = "Python style guide checker"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
+    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
+]
 
 [[package]]
 name = "pyflakes"
@@ -226,6 +377,10 @@ description = "passive checker of Python programs"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
+    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
+]
 
 [[package]]
 name = "pyspark"
@@ -234,6 +389,9 @@ description = "Apache Spark Python API"
 category = "main"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
+]
 
 [package.dependencies]
 py4j = "0.10.9"
@@ -250,6 +408,10 @@ description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
+    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
+]
 
 [package.dependencies]
 attrs = ">=19.2.0"
@@ -271,6 +433,10 @@ description = "Pytest plugin for measuring coverage."
 category = "dev"
 optional = false
 python-versions = ">=3.6"
+files = [
+    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
+    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
+]
 
 [package.dependencies]
 coverage = {version = ">=5.2.1", extras = ["toml"]}
@@ -286,6 +452,9 @@ description = "Manage dependencies of tests"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
+]
 
 [package.dependencies]
 pytest = ">=3.6.0"
@@ -297,6 +466,10 @@ description = "Test Anything Protocol (TAP) reporting plugin for pytest"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
+    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
+]
 
 [package.dependencies]
 pytest = ">=3.0"
@@ -309,6 +482,10 @@ description = "Test Anything Protocol (TAP) tools"
 category = "dev"
 optional = false
 python-versions = "*"
+files = [
+    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
+    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
+]
 
 [package.extras]
 yaml = ["PyYAML (>=5.1)", "more-itertools"]
@@ -320,6 +497,10 @@ description = "A lil' TOML parser"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
+files = [
+    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
+    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+]
 
 [[package]]
 name = "typed-ast"
@@ -328,199 +509,7 @@ description = "a fork of Python 2 and 3 ast modules with type comment support"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
-
-[[package]]
-name = "typing-extensions"
-version = "4.4.0"
-description = "Backported and Experimental Type Hints for Python 3.7+"
-category = "dev"
-optional = false
-python-versions = ">=3.7"
-
-[[package]]
-name = "zipp"
-version = "3.11.0"
-description = "Backport of pathlib-compatible object wrapper for zip files"
-category = "dev"
-optional = false
-python-versions = ">=3.7"
-
-[package.extras]
-docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
-testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
-
-[metadata]
-lock-version = "1.1"
-python-versions = "^3.7"
-content-hash = "47195533df022e7b95b52d864c2019390362d2c1047797ed1f10b218c48be23f"
-
-[metadata.files]
-attrs = [
-    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
-    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
-]
-black = [
-    {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
-    {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
-    {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
-    {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
-    {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
-    {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
-    {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
-    {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
-    {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
-    {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
-    {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
-    {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
-]
-chispa = [
-    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
-    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
-]
-click = [
-    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
-    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
-]
-colorama = [
-    {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
-    {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
-]
-coverage = [
-    {file = "coverage-7.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2a7f23bbaeb2a87f90f607730b45564076d870f1fb07b9318d0c21f36871932b"},
-    {file = "coverage-7.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c18d47f314b950dbf24a41787ced1474e01ca816011925976d90a88b27c22b89"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef14d75d86f104f03dea66c13188487151760ef25dd6b2dbd541885185f05f40"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66e50680e888840c0995f2ad766e726ce71ca682e3c5f4eee82272c7671d38a2"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9fed35ca8c6e946e877893bbac022e8563b94404a605af1d1e6accc7eb73289"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d8d04e755934195bdc1db45ba9e040b8d20d046d04d6d77e71b3b34a8cc002d0"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e109f1c9a3ece676597831874126555997c48f62bddbcace6ed17be3e372de8"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0a1890fca2962c4f1ad16551d660b46ea77291fba2cc21c024cd527b9d9c8809"},
-    {file = "coverage-7.0.5-cp310-cp310-win32.whl", hash = "sha256:be9fcf32c010da0ba40bf4ee01889d6c737658f4ddff160bd7eb9cac8f094b21"},
-    {file = "coverage-7.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:cbfcba14a3225b055a28b3199c3d81cd0ab37d2353ffd7f6fd64844cebab31ad"},
-    {file = "coverage-7.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30b5fec1d34cc932c1bc04017b538ce16bf84e239378b8f75220478645d11fca"},
-    {file = "coverage-7.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1caed2367b32cc80a2b7f58a9f46658218a19c6cfe5bc234021966dc3daa01f0"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d254666d29540a72d17cc0175746cfb03d5123db33e67d1020e42dae611dc196"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19245c249aa711d954623d94f23cc94c0fd65865661f20b7781210cb97c471c0"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b05ed4b35bf6ee790832f68932baf1f00caa32283d66cc4d455c9e9d115aafc"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:29de916ba1099ba2aab76aca101580006adfac5646de9b7c010a0f13867cba45"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e057e74e53db78122a3979f908973e171909a58ac20df05c33998d52e6d35757"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:411d4ff9d041be08fdfc02adf62e89c735b9468f6d8f6427f8a14b6bb0a85095"},
-    {file = "coverage-7.0.5-cp311-cp311-win32.whl", hash = "sha256:52ab14b9e09ce052237dfe12d6892dd39b0401690856bcfe75d5baba4bfe2831"},
-    {file = "coverage-7.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:1f66862d3a41674ebd8d1a7b6f5387fe5ce353f8719040a986551a545d7d83ea"},
-    {file = "coverage-7.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b69522b168a6b64edf0c33ba53eac491c0a8f5cc94fa4337f9c6f4c8f2f5296c"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436e103950d05b7d7f55e39beeb4d5be298ca3e119e0589c0227e6d0b01ee8c7"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8c56bec53d6e3154eaff6ea941226e7bd7cc0d99f9b3756c2520fc7a94e6d96"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a38362528a9115a4e276e65eeabf67dcfaf57698e17ae388599568a78dcb029"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f67472c09a0c7486e27f3275f617c964d25e35727af952869dd496b9b5b7f6a3"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:220e3fa77d14c8a507b2d951e463b57a1f7810a6443a26f9b7591ef39047b1b2"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ecb0f73954892f98611e183f50acdc9e21a4653f294dfbe079da73c6378a6f47"},
-    {file = "coverage-7.0.5-cp37-cp37m-win32.whl", hash = "sha256:d8f3e2e0a1d6777e58e834fd5a04657f66affa615dae61dd67c35d1568c38882"},
-    {file = "coverage-7.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9e662e6fc4f513b79da5d10a23edd2b87685815b337b1a30cd11307a6679148d"},
-    {file = "coverage-7.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:790e4433962c9f454e213b21b0fd4b42310ade9c077e8edcb5113db0818450cb"},
-    {file = "coverage-7.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49640bda9bda35b057b0e65b7c43ba706fa2335c9a9896652aebe0fa399e80e6"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d66187792bfe56f8c18ba986a0e4ae44856b1c645336bd2c776e3386da91e1dd"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:276f4cd0001cd83b00817c8db76730938b1ee40f4993b6a905f40a7278103b3a"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95304068686545aa368b35dfda1cdfbbdbe2f6fe43de4a2e9baa8ebd71be46e2"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:17e01dd8666c445025c29684d4aabf5a90dc6ef1ab25328aa52bedaa95b65ad7"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea76dbcad0b7b0deb265d8c36e0801abcddf6cc1395940a24e3595288b405ca0"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:50a6adc2be8edd7ee67d1abc3cd20678987c7b9d79cd265de55941e3d0d56499"},
-    {file = "coverage-7.0.5-cp38-cp38-win32.whl", hash = "sha256:e4ce984133b888cc3a46867c8b4372c7dee9cee300335e2925e197bcd45b9e16"},
-    {file = "coverage-7.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:4a950f83fd3f9bca23b77442f3a2b2ea4ac900944d8af9993743774c4fdc57af"},
-    {file = "coverage-7.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c2155943896ac78b9b0fd910fb381186d0c345911f5333ee46ac44c8f0e43ab"},
-    {file = "coverage-7.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:54f7e9705e14b2c9f6abdeb127c390f679f6dbe64ba732788d3015f7f76ef637"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ee30375b409d9a7ea0f30c50645d436b6f5dfee254edffd27e45a980ad2c7f4"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b78729038abea6a5df0d2708dce21e82073463b2d79d10884d7d591e0f385ded"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13250b1f0bd023e0c9f11838bdeb60214dd5b6aaf8e8d2f110c7e232a1bff83b"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c407b1950b2d2ffa091f4e225ca19a66a9bd81222f27c56bd12658fc5ca1209"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c76a3075e96b9c9ff00df8b5f7f560f5634dffd1658bafb79eb2682867e94f78"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f26648e1b3b03b6022b48a9b910d0ae209e2d51f50441db5dce5b530fad6d9b1"},
-    {file = "coverage-7.0.5-cp39-cp39-win32.whl", hash = "sha256:ba3027deb7abf02859aca49c865ece538aee56dcb4871b4cced23ba4d5088904"},
-    {file = "coverage-7.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:949844af60ee96a376aac1ded2a27e134b8c8d35cc006a52903fc06c24a3296f"},
-    {file = "coverage-7.0.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:b9727ac4f5cf2cbf87880a63870b5b9730a8ae3a4a360241a0fdaa2f71240ff0"},
-    {file = "coverage-7.0.5.tar.gz", hash = "sha256:051afcbd6d2ac39298d62d340f94dbb6a1f31de06dfaf6fcef7b759dd3860c45"},
-]
-exceptiongroup = [
-    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
-    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
-]
-flake8 = [
-    {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"},
-    {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"},
-]
-importlib-metadata = [
-    {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"},
-    {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"},
-]
-iniconfig = [
-    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
-    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
-]
-isort = [
-    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
-    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
-]
-mccabe = [
-    {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
-    {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
-]
-mypy-extensions = [
-    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
-    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
-]
-packaging = [
-    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
-    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
-]
-pathspec = [
-    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
-    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
-]
-platformdirs = [
-    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
-    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
-]
-pluggy = [
-    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
-    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
-]
-py4j = [
-    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
-    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
-]
-pycodestyle = [
-    {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"},
-    {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"},
-]
-pyflakes = [
-    {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"},
-    {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"},
-]
-pyspark = [
-    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
-]
-pytest = [
-    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
-    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
-]
-pytest-cov = [
-    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
-    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
-]
-pytest-dependency = [
-    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
-]
-pytest-tap = [
-    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
-    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
-]
-"tap.py" = [
-    {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"},
-    {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"},
-]
-tomli = [
-    {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
-    {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
-]
-typed-ast = [
+files = [
     {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"},
     {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"},
     {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"},
@@ -546,11 +535,36 @@ typed-ast = [
     {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"},
     {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"},
 ]
-typing-extensions = [
+
+[[package]]
+name = "typing-extensions"
+version = "4.4.0"
+description = "Backported and Experimental Type Hints for Python 3.7+"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+files = [
     {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"},
     {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"},
 ]
-zipp = [
+
+[[package]]
+name = "zipp"
+version = "3.11.0"
+description = "Backport of pathlib-compatible object wrapper for zip files"
+category = "dev"
+optional = false
+python-versions = ">=3.7"
+files = [
     {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"},
     {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"},
 ]
+
+[package.extras]
+docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
+testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
+
+[metadata]
+lock-version = "2.0"
+python-versions = "^3.7"
+content-hash = "030886887dc78ab5e32a2e6181cb497f6655eb7a1e73a0285c47905680ea15b9"
diff --git a/pyproject.toml b/pyproject.toml
index 4c30ac60..b119924d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -11,7 +11,7 @@ pyspark = "3.1.1"
 
 [tool.poetry.dev-dependencies]
 pytest = "^7.2.1"
-black = "^22.12"
+black = "^23.1"
 isort = "^5.11.4"
 flake8 = "^5.0.4"
 coverage = "^7.0"

From f4e2ffe9743d97fbd35eb0e63722ac7eb17e40b5 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Tue, 7 Feb 2023 14:59:26 +0000
Subject: [PATCH 044/531] Update validation.py

---
 statistical_methods_library/utilities/validation.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/statistical_methods_library/utilities/validation.py b/statistical_methods_library/utilities/validation.py
index 1e4cc19d..1c80e347 100644
--- a/statistical_methods_library/utilities/validation.py
+++ b/statistical_methods_library/utilities/validation.py
@@ -7,7 +7,6 @@
 def validate_dataframe(
     input_df, expected_columns, type_mapping, unique_cols, excluded_columns=[]
 ):
-
     if not isinstance(input_df, DataFrame):
         raise TypeError("input_df must be an instance of pyspark.sql.DataFrame")
     expected_input_col_names = set(expected_columns.values())

From f8c181de5c17a081b8552ee7af94ff4791fdbe5e Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 8 Feb 2023 18:15:03 +0000
Subject: [PATCH 045/531] Drop from mapping to abide by specification

---
 statistical_methods_library/imputation/ratio_of_means.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index b5a4082a..148fa189 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -619,6 +619,8 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
 
     # --- Utility functions ---
     def create_output(df: DataFrame) -> DataFrame:
+        del full_col_mapping("aux")
+        del full_col_mapping("strata")
         return select_cols(
             df.filter(col("period") != lit(prior_period)), reversed=False
         ).withColumnRenamed("output", output_col)

From e5ee02cde929c8b4c6ef07d265e8b10078ef912b Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 8 Feb 2023 18:19:54 +0000
Subject: [PATCH 046/531] Square Brackets

---
 statistical_methods_library/imputation/ratio_of_means.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 148fa189..093c6c3c 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -619,8 +619,8 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
 
     # --- Utility functions ---
     def create_output(df: DataFrame) -> DataFrame:
-        del full_col_mapping("aux")
-        del full_col_mapping("strata")
+        del full_col_mapping["aux"]
+        del full_col_mapping["strata"]
         return select_cols(
             df.filter(col("period") != lit(prior_period)), reversed=False
         ).withColumnRenamed("output", output_col)

From 9bbcf4d4312a90f7c3f779a8daaa05c5fe4922ae Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 8 Feb 2023 18:33:26 +0000
Subject: [PATCH 047/531] Correct expected output columns in Ratio of Means
 tests

- Drop strata and aux columns (in test as we need them in the output data to
  allow back data testing)
- Drop the expected columns unit test as it required calling imputation in a
  way which saved less time than the test added when compared with running the
  scenarios with the improved column checks
---
 tests/imputation/test_ratio_of_means.py | 43 ++++---------------------
 1 file changed, 7 insertions(+), 36 deletions(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index d3e27205..67e0e5c1 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -464,41 +464,6 @@ def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
         ratio_of_means.impute(test_dataframe, *params)
 
 
-# --- Test expected columns are in the output ---
-@pytest.mark.dependency()
-def test_dataframe_expected_columns(fxt_spark_session, fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    ret_val = ratio_of_means.impute(
-        test_dataframe,
-        *default_params,
-    )
-    # perform action on the dataframe to trigger lazy evaluation
-    ret_val.count()
-    ret_cols = set(ret_val.columns)
-    expected_cols = {
-        reference_col,
-        period_col,
-        strata_col,
-        auxiliary_col,
-        forward_col,
-        backward_col,
-        construction_col,
-        "imputed",
-        "imputation_marker",
-        "count_forward",
-        "count_backward",
-        "count_construction",
-    }
-    assert expected_cols == ret_cols
-
-
 # --- Test Scenarios.
 
 
@@ -516,7 +481,6 @@ def test_dataframe_expected_columns(fxt_spark_session, fxt_load_test_csv):
         "test_input_not_a_dataframe",
         "test_incorrect_column_types",
         "test_input_data_contains_nulls",
-        "test_dataframe_expected_columns",
         "test_back_data_not_a_dataframe",
         "test_back_data_missing_column",
         "test_back_data_contains_nulls",
@@ -593,6 +557,13 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
             "leftanti",
         ).drop("min(" + period_col + ")")
 
+    # We need to drop our strata and auxiliary columns from our output now
+    # we've potentially set up our back data as these must not come out of
+    # imputation.
+    scenario_expected_output = scenario_expected_output.drop(
+        strata_col,
+        auxiliary_col,
+    )
     scenario_actual_output = ratio_of_means.impute(
         scenario_input, *params, **imputation_kwargs
     )

From 3f0a8cb362ee0e44731d05b423cfd6e366cb56d4 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 8 Feb 2023 18:53:15 +0000
Subject: [PATCH 048/531] Bump version and add release note

---
 docs/release-notes/10.0.0.md | 26 ++++++++++++++++++++++++++
 pyproject.toml               |  2 +-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 docs/release-notes/10.0.0.md

diff --git a/docs/release-notes/10.0.0.md b/docs/release-notes/10.0.0.md
new file mode 100644
index 00000000..09fcdbc7
--- /dev/null
+++ b/docs/release-notes/10.0.0.md
@@ -0,0 +1,26 @@
+# Statistical Methods Library 10.0.0
+
+Release date: 2023-02-08
+
+## Synopsis
+
+Correct the columns in the Ratio of Means output.
+
+## Changes
+
+In the Ratio of Means imputation method the strata and auxiliary columns
+were incorrectly output. This was not compliant with either the
+specification or the method's documentation. This change removes these
+columns from the output.
+
+## Notes
+
+Since both strata and auxiliary columns must be passed to the method as part
+of the input dataset, users should join these columns onto the output via
+the reference and period columns if strata and auxiliary information is
+required in the output dataset. This was always the specified behaviour
+however this non-compliance was only detected in this release.
+
+Although this is a bug fix, the output is potentially incompatible with code
+written against previous releases if it relies on the non-compliant
+behaviour. As such this release is a major version change.
diff --git a/pyproject.toml b/pyproject.toml
index b119924d..e887f429 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "9.1.1"
+version = "10.0.0"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 6ad5d42623f1cd2084241502e0199cdb8b61e0e2 Mon Sep 17 00:00:00 2001
From: Michael Candlin <29595780+kingmushroom@users.noreply.github.com>
Date: Tue, 14 Feb 2023 12:14:40 +0000
Subject: [PATCH 049/531] Create LICENSE

---
 LICENSE | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 LICENSE

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000..0c185067
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 Crown Copyright (Office for National Statistics)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

From 4c2e0a531b8dd526dd05979923005e014aab1d3a Mon Sep 17 00:00:00 2001
From: Michael Candlin <29595780+kingmushroom@users.noreply.github.com>
Date: Tue, 14 Feb 2023 12:25:19 +0000
Subject: [PATCH 050/531] Update ht_ratio.py

---
 statistical_methods_library/estimation/ht_ratio.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index 5a520a17..3de9694d 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -1,5 +1,6 @@
 """
 Estimates design weigths and calibration factors based on Expansion and Ratio estimation.
+For Copyright information, please see LICENCE.
 """
 
 import typing

From 4ecf182b36870feb73afb9c3980a49e15e195c04 Mon Sep 17 00:00:00 2001
From: Michael Candlin <29595780+kingmushroom@users.noreply.github.com>
Date: Tue, 14 Feb 2023 12:25:38 +0000
Subject: [PATCH 051/531] Update ratio_of_means.py

---
 statistical_methods_library/imputation/ratio_of_means.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 093c6c3c..e081c58c 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -2,6 +2,7 @@
 Perform imputation on a data frame.
 
 Currently only Ratio of Means (or Ratio of Sums) imputation is implemented.
+For Copyright information, please see LICENCE.
 """
 
 import typing

From 3b218c23908eeb1f7b3d9379b5a3e6cee2d23d82 Mon Sep 17 00:00:00 2001
From: Michael Candlin <29595780+kingmushroom@users.noreply.github.com>
Date: Tue, 14 Feb 2023 12:31:19 +0000
Subject: [PATCH 052/531] Update winsorisation.py

---
 statistical_methods_library/outliering/winsorisation.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index 923dcd36..60a1db54 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -2,6 +2,7 @@
 This module performs Winsorisation.
 
 Currently only One-sided Winsorisation is implemented.
+For Copyright information, please see LICENCE.
 """
 
 import typing

From 28a30771a004f735aac9d9beb3ede333fbb1b68c Mon Sep 17 00:00:00 2001
From: Michael Candlin <29595780+kingmushroom@users.noreply.github.com>
Date: Tue, 14 Feb 2023 12:32:12 +0000
Subject: [PATCH 053/531] Update validation.py

---
 statistical_methods_library/utilities/validation.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/statistical_methods_library/utilities/validation.py b/statistical_methods_library/utilities/validation.py
index 1c80e347..4553172e 100644
--- a/statistical_methods_library/utilities/validation.py
+++ b/statistical_methods_library/utilities/validation.py
@@ -1,3 +1,7 @@
+'''
+For Copyright information, please see LICENCE.
+'''
+
 from pyspark.sql import DataFrame
 from pyspark.sql.functions import col
 

From bb9669b135d8bcd2ab8cfc6b7a2ae92e04c47b5d Mon Sep 17 00:00:00 2001
From: Michael Candlin <29595780+kingmushroom@users.noreply.github.com>
Date: Tue, 14 Feb 2023 13:26:04 +0000
Subject: [PATCH 054/531] ' - "

---
 statistical_methods_library/utilities/validation.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/utilities/validation.py b/statistical_methods_library/utilities/validation.py
index 4553172e..6a114980 100644
--- a/statistical_methods_library/utilities/validation.py
+++ b/statistical_methods_library/utilities/validation.py
@@ -1,6 +1,6 @@
-'''
+"""
 For Copyright information, please see LICENCE.
-'''
+"""
 
 from pyspark.sql import DataFrame
 from pyspark.sql.functions import col

From 622f310b0410c05776c52b5a15595443c3a726b7 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 23 Feb 2023 15:30:03 +0000
Subject: [PATCH 055/531] Remove tap-stream from default test options to make
 debugging certain exceptions easier

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index e887f429..1ca21c34 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -24,7 +24,7 @@ profile = "black"
 
 [tool.pytest.ini_options]
 junit_test_suite_name = "statistical_methods_library"
-addopts = "--exitfirst --tap-stream --cov=statistical_methods_library --cov-fail-under=95"
+addopts = "--exitfirst --cov=statistical_methods_library --cov-fail-under=95"
 
 [build-system]
 requires = ["poetry-core>=1.0.0"]

From 2bd024c43d9463162177eab6891cfe9dd2904da2 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 23 Feb 2023 15:30:41 +0000
Subject: [PATCH 056/531] Split out ratio of means link calculation from
 generic imputation engine code

---
 .../imputation/engine.py                      | 588 ++++++++++++++++++
 .../imputation/ratio_of_means.py              | 502 +--------------
 2 files changed, 600 insertions(+), 490 deletions(-)
 create mode 100644 statistical_methods_library/imputation/engine.py

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
new file mode 100644
index 00000000..a80448f9
--- /dev/null
+++ b/statistical_methods_library/imputation/engine.py
@@ -0,0 +1,588 @@
+"""
+Perform imputation on a data frame.
+
+Currently only Ratio of Means (or Ratio of Sums) imputation is implemented.
+For Copyright information, please see LICENCE.
+"""
+
+from typing import Callable, Optional, Union
+from enum import Enum
+
+from pyspark.sql import Column, DataFrame
+from pyspark.sql.functions import col, count, lit, sum, when
+from pyspark.sql.types import DecimalType, IntegerType, StringType
+
+from statistical_methods_library.utilities import validation
+
+# --- Marker constants ---
+# Documented after the variable as per Pdoc syntax for documenting variables.
+
+
+class Marker(Enum):
+    """Values for the marker column created during imputation."""
+
+    RESPONSE = "R"
+    """The value is a response."""
+
+    FORWARD_IMPUTE_FROM_RESPONSE = "FIR"
+    """The value has been forward imputed from a response."""
+
+    BACKWARD_IMPUTE = "BI"
+    """The value has been backward imputed from a response,
+    backward imputation from construction is not permitted."""
+
+    CONSTRUCTED = "C"
+    """The value is constructed."""
+
+    FORWARD_IMPUTE_FROM_CONSTRUCTION = "FIC"
+    """The value has been forward imputed from a constructed value."""
+
+
+def impute(
+    *,
+    input_df: DataFrame,
+    reference_col: str,
+    period_col: str,
+    strata_col: str,
+    target_col: str,
+    auxiliary_col: str,
+    ratio_calculation_function: Callable[[DataFrame], DataFrame],
+    output_col: Optional[str] = "imputed",
+    marker_col: Optional[str] = "imputation_marker",
+    forward_link_col: Optional[str] = None,
+    backward_link_col: Optional[str] = None,
+    construction_link_col: Optional[str] = None,
+    count_construction_col: Optional[str] = "count_construction",
+    count_forward_col: Optional[str] = "count_forward",
+    count_backward_col: Optional[str] = "count_backward",
+    back_data_df: Optional[DataFrame] = None,
+    link_filter: Optional[Union[str, Column]] = None,
+) -> DataFrame:
+    """
+    Perform Ratio of means (also known as Ratio of Sums) imputation on a
+    dataframe.
+
+    ###Arguments
+    * `input_df`: The input dataframe
+    * `reference_col`: The name of the column to reference a unique
+      contributor.
+    * `period_col`: The name of the column containing the period
+      information for the contributor.
+    * `strata_col`: The Name of the column containing the strata information
+      for the contributor.
+    * `target_col`: The name of the column containing the target
+      variable.
+    * `auxiliary_col`: The name of the column containing the auxiliary
+      variable.
+    * `output_col`: The name of the column which will contain the
+      output. Defaults to `imputed`.
+    * `marker_col`: The name of the column which will contain the marker
+      information for a given value. Defaults to `imputation_marker`.
+    * `forward_link_col`: If specified, the name of an existing column
+      containing forward ratio (or link) information. Defaults to None which
+      means that a default column name of `forward` will be created and the
+      forward ratios will be calculated.
+    * `backward_link_col`: If specified, the name of an existing column
+      containing backward ratio (or link) information. Defaults to None which
+      means that a default column name of `backward` will be created and the
+      backward ratios will be calculated.
+    * `construction_link_col`: If specified, the name of an existing column
+      containing construction ratio (or link) information. Defaults to None
+      which means that a default column name of `construction` will be created
+      and the construction ratios will be calculated.
+    * `count_construction_col`: If specified, the name of the column that will
+      hold the count of matched pairs for construction.
+      Defaults to 'count_construction'
+    * `count_forward_col`: If specified, the name of the column that will
+      hold the count of matched pairs for forward imputation.
+      Defaults to 'count_forward'
+    * `count_backward_col`: If specified, the name of the column that will
+      hold the count of matched pairs for forward imputation.
+      Defaults to 'count_forward'
+    * `back_data_df`: If specified, will use this to base the initial imputation
+      calculations on.
+    * `link_filter`: A filter compatible with the pyspark DataFrame.filter
+      method. Only responses that match the filter conditions will be included
+      in link calculations.
+      This will not prevent non responses from being imputed for.
+
+    ###Returns
+    A new dataframe containing:
+
+    * `reference_col`
+    * `period_col`
+    * `output_col`
+    * `marker_col`
+    * `forward_col`
+    * `backward_col`
+    * `construction_col`
+    * `construction_count_col`
+    * `forward_count_col`
+    * `backward_count_col`
+
+    No other columns are created. In particular, no other columns
+    will be passed through from the input since it is expected that the
+    information in the output dataframe will be sufficient to join on any
+    other required input data.
+
+    ###Notes
+    If no Imputation needs to take place, the forward, backward and
+    construction columns returned will still be calculated if they are not
+    passed in.
+
+    The existence of `output_col` and `marker_col` in the input data is
+    an error.
+
+    All or none of `forward_link_col`, `backward_link_col` and
+    `construction_link_col` must be specified.
+
+    `marker_col` will contain one of the marker constants defined in the
+    `Marker` enum.
+
+    This method implements rolling imputation, that is imputed values chain
+    together until either a return is present or the contributor is not present
+    in the sample. Values either side of such a gap do not interact (i.e.
+    ratios and imputes will not take into account values for a contributor
+    from before or after periods where they were dropped from the sample). In
+    the case of rolling imputation, the markers will be the same for chains of
+    imputed values.
+
+    If `back_data_df` is provided it must contain the following columns:
+        *`reference_col`
+        *`period_col`
+        *`strata_col`
+        *`auxiliary_col`
+        *`output_col`
+        *`marker_col`
+    """
+    # --- Validate params ---
+    link_cols = [forward_link_col, backward_link_col, construction_link_col]
+    if any(link_cols) and not all(link_cols):
+        raise TypeError("Either all or no link columns must be specified")
+
+    input_params = {
+        "ref": reference_col,
+        "period": period_col,
+        "strata": strata_col,
+        "target": target_col,
+        "aux": auxiliary_col,
+        "forward": forward_link_col,
+        "backward": backward_link_col,
+        "construction": construction_link_col,
+    }
+
+    # Mapping of column aliases to parameters
+    created_col_mapping = {
+        "output": output_col,
+        "marker": marker_col,
+        "count_construction": count_construction_col,
+        "count_forward": count_forward_col,
+        "count_backward": count_backward_col,
+    }
+
+    new_link_map = {
+        "forward": "forward",
+        "backward": "backward",
+        "construction": "construction",
+    }
+
+    input_expected_columns = {k: v for k, v in input_params.items() if v is not None}
+
+    full_col_mapping = {**input_expected_columns, **created_col_mapping}
+    if forward_link_col is None:
+        full_col_mapping = {**full_col_mapping, **new_link_map}
+
+    back_expected_columns = {
+        "ref": reference_col,
+        "period": period_col,
+        "strata": strata_col,
+        "aux": auxiliary_col,
+        "output": output_col,
+        "marker": marker_col,
+    }
+
+    type_mapping = {
+        "ref": StringType,
+        "period": StringType,
+        "strata": StringType,
+        "target": DecimalType,
+        "aux": DecimalType,
+        "output": DecimalType,
+        "marker": StringType,
+        "forward": DecimalType,
+        "backward": DecimalType,
+        "construction": DecimalType,
+    }
+
+    aliased_input_df = validation.validate_dataframe(
+        input_df,
+        input_expected_columns,
+        type_mapping,
+        ["ref", "period"],
+        ["target", "forward", "backward", "construction"],
+    )
+
+    # Cache the prepared back data df since we'll need a few differently
+    # filtered versions
+    prepared_back_data_df = None
+
+    if back_data_df:
+        prepared_back_data_df = validation.validate_dataframe(
+            back_data_df, back_expected_columns, type_mapping, ["ref", "period"]
+        )
+        input_df = input_df.unionByName(back_data_df, allowMissingColumns=True)
+
+    if link_filter:
+        filtered_refs = input_df.filter(link_filter).select(
+            col(reference_col).alias("ref"), col(period_col).alias("period")
+        )
+
+    # Store the value for the period prior to the start of imputation.
+    # Stored as a value to avoid a join in output creation.
+    prior_period = None
+
+    # --- Run ---
+    def run() -> DataFrame:
+        nonlocal back_data_df
+
+        def should_null_check(func, perform_null_check, *args, **kwargs):
+            return lambda df: (func(df, *args, **kwargs), perform_null_check)
+
+        stages = [
+            should_null_check(prepare_df, False),
+            should_null_check(calculate_ratios, True),
+            should_null_check(forward_impute_from_response, True),
+            should_null_check(backward_impute, True),
+            should_null_check(construct_values, True),
+            should_null_check(forward_impute_from_construction, True),
+        ]
+        df = aliased_input_df
+        for stage in stages:
+            result = stage(df)
+            if result:
+                df = result[0].localCheckpoint(eager=False)
+
+                if result[1] and df.filter(col("output").isNull()).count() == 0:
+                    break
+
+        return create_output(df)
+
+    # --- Prepare DF ---
+
+    def prepare_df(df: DataFrame) -> DataFrame:
+        nonlocal prepared_back_data_df
+
+        prepared_df = (
+            df.withColumn("output", col("target"))
+            .drop("target")
+            .withColumn("marker", when(~col("output").isNull(), Marker.RESPONSE.value))
+            .withColumn("previous_period", calculate_previous_period(col("period")))
+            .withColumn("next_period", calculate_next_period(col("period")))
+        )
+
+        nonlocal prior_period
+        # We know this will be a single value so use collect as then we
+        # can filter directly.
+        prior_period = prepared_df.selectExpr("min(previous_period)").collect()[0][0]
+
+        if prepared_back_data_df:
+            prepared_back_data_df = (
+                prepared_back_data_df.filter(
+                    (
+                        (col(period_col) == lit(prior_period))
+                        & (col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))
+                    )
+                )
+                .withColumn("previous_period", calculate_previous_period(col("period")))
+                .withColumn("next_period", calculate_next_period(col("period")))
+            )
+
+        else:
+            # Set the prepared_back_data_df to be empty when back_data not
+            # supplied.
+            prepared_back_data_df = prepared_df.filter(col(period_col).isNull())
+
+        prepared_back_data_df = prepared_back_data_df.localCheckpoint(eager=True)
+        # Ratio calculation needs all the responses from the back data
+        prepared_df = prepared_df.unionByName(
+            filter_back_data(col("marker") == lit(Marker.RESPONSE.value)),
+            allowMissingColumns=True,
+        )
+
+        return prepared_df
+
+    # --- Calculate Ratios ---
+
+    def calculate_ratios(df: DataFrame) -> DataFrame:
+        if "forward" in df.columns:
+            df = (
+                df.fillna(1.0, ["forward", "backward", "construction"])
+                .withColumn("count_forward", lit(None).cast("long"))
+                .withColumn("count_backward", lit(None).cast("long"))
+                .withColumn("count_construction", lit(None).cast("long"))
+            )
+            return df
+
+        # Since we're going to join on to the main df at the end filtering here
+        # won't cause us to lose strata as they'll just be filled with
+        # default ratios.
+        if link_filter:
+            filtered_df = df.join(filtered_refs, ["ref", "period"])
+        else:
+            filtered_df = df
+        filtered_df = filtered_df.filter(~df.output.isNull()).select(
+            "ref",
+            "period",
+            "strata",
+            "output",
+            "aux",
+            "previous_period",
+            "next_period",
+        )
+
+        # Put the values from the current and previous periods for a
+        # contributor on the same row.
+        working_df = filtered_df.alias("current")
+        working_df = working_df.join(
+            filtered_df.select("ref", "period", "output", "strata").alias("prev"),
+            [
+                col("current.ref") == col("prev.ref"),
+                col("current.previous_period") == col("prev.period"),
+                col("current.strata") == col("prev.strata"),
+            ],
+            "leftouter",
+        ).select(
+            col("current.strata").alias("strata"),
+            col("current.period").alias("period"),
+            when(~col("prev.output").isNull(), col("current.output")).alias("output"),
+            col("current.aux").alias("aux"),
+            col("prev.output").alias("other_output"),
+            col("current.output").alias("output_for_construction"),
+        )
+
+        # Join the strata ratios onto the input such that each contributor has
+        # a set of ratios.
+        return df.join(
+            ratio_calculation_function(working_df), ["period", "strata"], "leftouter"
+        ).fillna(1.0, ["forward", "backward", "construction"])
+
+    # Caching for both imputed and unimputed data.
+    imputed_df = None
+    null_response_df = None
+
+    # --- Impute helper ---
+    def impute_helper(
+        df: DataFrame, link_col: str, marker: Marker, direction: bool
+    ) -> DataFrame:
+        nonlocal imputed_df
+        nonlocal null_response_df
+        if direction:
+            # Forward imputation
+            other_period_col = "previous_period"
+        else:
+            # Backward imputation
+            other_period_col = "next_period"
+
+        if imputed_df is None:
+            working_df = df.select(
+                "ref",
+                "period",
+                "strata",
+                "output",
+                "marker",
+                "previous_period",
+                "next_period",
+                "forward",
+                "backward",
+            )
+
+            # Anything which isn't null is already imputed or a response and thus
+            # can be imputed from. Note that in the case of backward imputation
+            # this still holds since it always happens after forward imputation
+            # and thus it can never attempt to backward impute from a forward
+            # imputation since there will never be a null value directly prior to
+            # one.
+            imputed_df = working_df.filter(~col("output").isNull()).localCheckpoint(
+                eager=True
+            )
+            # Any refs which have no values at all can't be imputed from so we
+            # don't care about them here.
+            ref_df = imputed_df.select("ref").distinct()
+            null_response_df = (
+                working_df.filter(col("output").isNull())
+                .drop("output", "marker")
+                .join(ref_df, "ref")
+                .localCheckpoint(eager=True)
+            )
+
+        while True:
+            other_df = imputed_df.selectExpr(
+                "ref AS other_ref",
+                "period AS other_period",
+                "output AS other_output",
+                "strata AS other_strata",
+            )
+            calculation_df = (
+                null_response_df.join(
+                    other_df,
+                    [
+                        col(other_period_col) == col("other_period"),
+                        col("ref") == col("other_ref"),
+                        col("strata") == col("other_strata"),
+                    ],
+                )
+                .select(
+                    "ref",
+                    "period",
+                    "strata",
+                    (col(link_col) * col("other_output")).alias("output"),
+                    lit(marker.value).alias("marker"),
+                    "previous_period",
+                    "next_period",
+                    "forward",
+                    "backward",
+                )
+                .localCheckpoint(eager=False)
+            )
+            # If we've imputed nothing then we've got as far as we can get for
+            # this phase.
+            if calculation_df.count() == 0:
+                break
+
+            # Store this set of imputed values in our main set for the next
+            # iteration. Use eager checkpoints to help prevent rdd DAG explosion.
+            imputed_df = imputed_df.union(calculation_df).localCheckpoint(eager=True)
+            # Remove the newly imputed rows from our filtered set.
+            null_response_df = null_response_df.join(
+                calculation_df.select("ref", "period"), ["ref", "period"], "leftanti"
+            ).localCheckpoint(eager=True)
+
+        # We should now have an output column which is as fully populated as
+        # this phase of imputation can manage. As such replace the existing
+        # output column with our one. Same goes for the marker column.
+        return df.drop("output", "marker").join(
+            imputed_df.select("ref", "period", "output", "marker"),
+            ["ref", "period"],
+            "leftouter",
+        )
+
+    # --- Imputation functions ---
+    def forward_impute_from_response(df: DataFrame) -> DataFrame:
+        # Add the forward imputes from responses from the back data
+        df = df.unionByName(
+            filter_back_data(
+                col("marker") == lit(Marker.FORWARD_IMPUTE_FROM_RESPONSE.value)
+            ),
+            allowMissingColumns=True,
+        )
+        return impute_helper(df, "forward", Marker.FORWARD_IMPUTE_FROM_RESPONSE, True)
+
+    def backward_impute(df: DataFrame) -> DataFrame:
+        return impute_helper(df, "backward", Marker.BACKWARD_IMPUTE, False)
+
+    # --- Construction functions ---
+    def construct_values(df: DataFrame) -> DataFrame:
+        # Add in the constructions and forward imputes from construction in the back data
+        df = df.unionByName(
+            filter_back_data(
+                (
+                    (col("marker") == lit(Marker.CONSTRUCTED.value))
+                    | (
+                        col("marker")
+                        == lit(Marker.FORWARD_IMPUTE_FROM_CONSTRUCTION.value)
+                    )
+                )
+            ),
+            allowMissingColumns=True,
+        )
+        construction_df = df.filter(df.output.isNull()).select(
+            "ref", "period", "strata", "aux", "construction", "previous_period"
+        )
+        other_df = df.select("ref", "period", "strata").alias("other")
+        construction_df = construction_df.alias("construction")
+        construction_df = construction_df.join(
+            other_df,
+            [
+                col("construction.ref") == col("other.ref"),
+                col("construction.previous_period") == col("other.period"),
+                col("construction.strata") == col("other.strata"),
+            ],
+            "leftanti",
+        ).select(
+            col("construction.ref").alias("ref"),
+            col("construction.period").alias("period"),
+            (col("aux") * col("construction")).alias("constructed_output"),
+            lit(Marker.CONSTRUCTED.value).alias("constructed_marker"),
+        )
+
+        return (
+            df.withColumnRenamed("output", "existing_output")
+            .withColumnRenamed("marker", "existing_marker")
+            .join(
+                construction_df,
+                ["ref", "period"],
+                "leftouter",
+            )
+            .select(
+                "*",
+                when(col("existing_output").isNull(), col("constructed_output"))
+                .otherwise(col("existing_output"))
+                .alias("output"),
+                when(col("existing_marker").isNull(), col("constructed_marker"))
+                .otherwise(col("existing_marker"))
+                .alias("marker"),
+            )
+            .drop("existing_output", "constructed_output", "constructed_marker")
+        )
+
+    def forward_impute_from_construction(df: DataFrame) -> DataFrame:
+        # We need to recalculate our imputed and null response data frames to
+        # account for construction.
+        nonlocal imputed_df
+        nonlocal null_response_df
+        imputed_df = None
+        null_response_df = None
+        return impute_helper(
+            df, "forward", Marker.FORWARD_IMPUTE_FROM_CONSTRUCTION, True
+        )
+
+    # --- Utility functions ---
+    def create_output(df: DataFrame) -> DataFrame:
+        del full_col_mapping["aux"]
+        del full_col_mapping["strata"]
+        return select_cols(
+            df.filter(col("period") != lit(prior_period)), reversed=False
+        ).withColumnRenamed("output", output_col)
+
+    def select_cols(
+        df: DataFrame,
+        reversed: bool = True,
+        drop_unmapped: bool = True,
+        mapping: dict = full_col_mapping,
+    ) -> DataFrame:
+        col_mapping = {v: k for k, v in mapping.items()} if reversed else mapping
+        col_set = set(df.columns)
+
+        return df.select(
+            [
+                col(k).alias(col_mapping.get(k, k))
+                for k in ((col_mapping.keys() & col_set) if drop_unmapped else col_set)
+            ]
+        )
+
+    def calculate_previous_period(period: Column) -> Column:
+        return when(
+            period.endswith("01"), (period.cast(IntegerType()) - 89).cast(StringType())
+        ).otherwise((period.cast(IntegerType()) - 1).cast(StringType()))
+
+    def calculate_next_period(period: Column) -> Column:
+        return when(
+            period.endswith("12"), (period.cast(IntegerType()) + 89).cast(StringType())
+        ).otherwise((period.cast(IntegerType()) + 1).cast(StringType()))
+
+    def filter_back_data(filter_col: Column) -> DataFrame:
+        return prepared_back_data_df.filter(filter_col).localCheckpoint(eager=True)
+
+    # ----------
+
+    return run()
diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index e081c58c..2ddefe42 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -1,61 +1,11 @@
-"""
-Perform imputation on a data frame.
-
-Currently only Ratio of Means (or Ratio of Sums) imputation is implemented.
-For Copyright information, please see LICENCE.
-"""
-
-import typing
-from enum import Enum
+# For Copyright information, please see LICENCE.
 
 from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, count, lit, sum, when
 from pyspark.sql.types import DecimalType, IntegerType, StringType
+from . import engine
 
-from statistical_methods_library.utilities import validation
-
-# --- Marker constants ---
-# Documented after the variable as per Pdoc syntax for documenting variables.
-
-
-class Marker(Enum):
-    """Values for the marker column created during imputation."""
-
-    RESPONSE = "R"
-    """The value is a response."""
-
-    FORWARD_IMPUTE_FROM_RESPONSE = "FIR"
-    """The value has been forward imputed from a response."""
-
-    BACKWARD_IMPUTE = "BI"
-    """The value has been backward imputed from a response,
-    backward imputation from construction is not permitted."""
-
-    CONSTRUCTED = "C"
-    """The value is constructed."""
-
-    FORWARD_IMPUTE_FROM_CONSTRUCTION = "FIC"
-    """The value has been forward imputed from a constructed value."""
-
-
-def impute(
-    input_df: DataFrame,
-    reference_col: str,
-    period_col: str,
-    strata_col: str,
-    target_col: str,
-    auxiliary_col: str,
-    output_col: typing.Optional[str] = "imputed",
-    marker_col: typing.Optional[str] = "imputation_marker",
-    forward_link_col: typing.Optional[str] = None,
-    backward_link_col: typing.Optional[str] = None,
-    construction_link_col: typing.Optional[str] = None,
-    count_construction_col: typing.Optional[str] = "count_construction",
-    count_forward_col: typing.Optional[str] = "count_forward",
-    count_backward_col: typing.Optional[str] = "count_backward",
-    back_data_df: typing.Optional[DataFrame] = None,
-    link_filter: typing.Optional[typing.Union[str, Column]] = None,
-) -> DataFrame:
+def impute(**kwargs) -> DataFrame:
     """
     Perform Ratio of means (also known as Ratio of Sums) imputation on a
     dataframe.
@@ -153,214 +103,9 @@ def impute(
         *`output_col`
         *`marker_col`
     """
-    # --- Validate params ---
-    link_cols = [forward_link_col, backward_link_col, construction_link_col]
-    if any(link_cols) and not all(link_cols):
-        raise TypeError("Either all or no link columns must be specified")
-
-    input_params = {
-        "ref": reference_col,
-        "period": period_col,
-        "strata": strata_col,
-        "target": target_col,
-        "aux": auxiliary_col,
-        "forward": forward_link_col,
-        "backward": backward_link_col,
-        "construction": construction_link_col,
-    }
-
-    # Mapping of column aliases to parameters
-    created_col_mapping = {
-        "output": output_col,
-        "marker": marker_col,
-        "count_construction": count_construction_col,
-        "count_forward": count_forward_col,
-        "count_backward": count_backward_col,
-    }
-
-    new_link_map = {
-        "forward": "forward",
-        "backward": "backward",
-        "construction": "construction",
-    }
-
-    input_expected_columns = {k: v for k, v in input_params.items() if v is not None}
-
-    full_col_mapping = {**input_expected_columns, **created_col_mapping}
-    if forward_link_col is None:
-        full_col_mapping = {**full_col_mapping, **new_link_map}
-
-    back_expected_columns = {
-        "ref": reference_col,
-        "period": period_col,
-        "strata": strata_col,
-        "aux": auxiliary_col,
-        "output": output_col,
-        "marker": marker_col,
-    }
-
-    type_mapping = {
-        "ref": StringType,
-        "period": StringType,
-        "strata": StringType,
-        "target": DecimalType,
-        "aux": DecimalType,
-        "output": DecimalType,
-        "marker": StringType,
-        "forward": DecimalType,
-        "backward": DecimalType,
-        "construction": DecimalType,
-    }
-
-    aliased_input_df = validation.validate_dataframe(
-        input_df,
-        input_expected_columns,
-        type_mapping,
-        ["ref", "period"],
-        ["target", "forward", "backward", "construction"],
-    )
-
-    # Cache the prepared back data df since we'll need a few differently
-    # filtered versions
-    prepared_back_data_df = None
-
-    if back_data_df:
-        prepared_back_data_df = validation.validate_dataframe(
-            back_data_df, back_expected_columns, type_mapping, ["ref", "period"]
-        )
-        input_df = input_df.unionByName(back_data_df, allowMissingColumns=True)
-
-    if link_filter:
-        filtered_refs = input_df.filter(link_filter).select(
-            col(reference_col).alias("ref"), col(period_col).alias("period")
-        )
-
-    # Store the value for the period prior to the start of imputation.
-    # Stored as a value to avoid a join in output creation.
-    prior_period = None
-
-    # --- Run ---
-    def run() -> DataFrame:
-        nonlocal back_data_df
-
-        def should_null_check(func, perform_null_check, *args, **kwargs):
-            return lambda df: (func(df, *args, **kwargs), perform_null_check)
-
-        stages = [
-            should_null_check(prepare_df, False),
-            should_null_check(calculate_ratios, True),
-            should_null_check(forward_impute_from_response, True),
-            should_null_check(backward_impute, True),
-            should_null_check(construct_values, True),
-            should_null_check(forward_impute_from_construction, True),
-        ]
-        df = aliased_input_df
-        for stage in stages:
-            result = stage(df)
-            if result:
-                df = result[0].localCheckpoint(eager=False)
-
-                if result[1] and df.filter(col("output").isNull()).count() == 0:
-                    break
-
-        return create_output(df)
-
-    # --- Prepare DF ---
-
-    def prepare_df(df: DataFrame) -> DataFrame:
-        nonlocal prepared_back_data_df
-
-        prepared_df = (
-            df.withColumn("output", col("target"))
-            .drop("target")
-            .withColumn("marker", when(~col("output").isNull(), Marker.RESPONSE.value))
-            .withColumn("previous_period", calculate_previous_period(col("period")))
-            .withColumn("next_period", calculate_next_period(col("period")))
-        )
-
-        nonlocal prior_period
-        # We know this will be a single value so use collect as then we
-        # can filter directly.
-        prior_period = prepared_df.selectExpr("min(previous_period)").collect()[0][0]
-
-        if prepared_back_data_df:
-            prepared_back_data_df = (
-                prepared_back_data_df.filter(
-                    (
-                        (col(period_col) == lit(prior_period))
-                        & (col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))
-                    )
-                )
-                .withColumn("previous_period", calculate_previous_period(col("period")))
-                .withColumn("next_period", calculate_next_period(col("period")))
-            )
-
-        else:
-            # Set the prepared_back_data_df to be empty when back_data not
-            # supplied.
-            prepared_back_data_df = prepared_df.filter(col(period_col).isNull())
-
-        prepared_back_data_df = prepared_back_data_df.localCheckpoint(eager=True)
-        # Ratio calculation needs all the responses from the back data
-        prepared_df = prepared_df.unionByName(
-            filter_back_data(col("marker") == lit(Marker.RESPONSE.value)),
-            allowMissingColumns=True,
-        )
-
-        return prepared_df
-
-    # --- Calculate Ratios ---
-
-    def calculate_ratios(df: DataFrame) -> DataFrame:
-        if "forward" in df.columns:
-            df = (
-                df.fillna(1.0, ["forward", "backward", "construction"])
-                .withColumn("count_forward", lit(None).cast("long"))
-                .withColumn("count_backward", lit(None).cast("long"))
-                .withColumn("count_construction", lit(None).cast("long"))
-            )
-            return df
-
-        # Since we're going to join on to the main df at the end filtering here
-        # won't cause us to lose strata as they'll just be filled with
-        # default ratios.
-        if link_filter:
-            filtered_df = df.join(filtered_refs, ["ref", "period"])
-        else:
-            filtered_df = df
-
-        filtered_df = filtered_df.filter(~df.output.isNull()).select(
-            "ref",
-            "period",
-            "strata",
-            "output",
-            "aux",
-            "previous_period",
-            "next_period",
-        )
-
-        # Put the values from the current and previous periods for a
-        # contributor on the same row. Then calculate the sum for both
-        # for all contributors in a period as the values now line up.
-        working_df = filtered_df.alias("current")
-        working_df = working_df.join(
-            filtered_df.select("ref", "period", "output", "strata").alias("prev"),
-            [
-                col("current.ref") == col("prev.ref"),
-                col("current.previous_period") == col("prev.period"),
-                col("current.strata") == col("prev.strata"),
-            ],
-            "leftouter",
-        ).select(
-            col("current.strata").alias("strata"),
-            col("current.period").alias("period"),
-            when(~col("prev.output").isNull(), col("current.output")).alias("output"),
-            col("current.aux").alias("aux"),
-            col("prev.output").alias("other_output"),
-            col("current.output").alias("output_for_construction"),
-        )
 
-        working_df = working_df.groupBy("period", "strata").agg(
+    def ratio_of_means(df: DataFrame) -> DataFrame:
+        working_df = df.groupBy("period", "strata").agg(
             sum(col("output")),
             sum(col("other_output")),
             sum(col("aux")),
@@ -398,14 +143,14 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
                 .cast("long"),
             )
             .join(
-                filtered_df.select("period", "strata", "next_period").distinct(),
+                df.select("period", "strata", "next_period").distinct(),
                 ["period", "strata"],
             )
         )
-        # denominator for link col, if 0 then count 0, otherwise count for that column
-        # Calculate backward ratio as 1/forward for the next period for each
-        # strata.
-        strata_ratio_df = forward_df.join(
+
+        # Calculate backward ratio for each strata; reuse calculations from
+        # above where applicable.
+        return forward_df.join(
             forward_df.select(
                 col("period").alias("other_period"),
                 col("strata").alias("other_strata"),
@@ -432,229 +177,6 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             col("count_forward"),
         )
 
-        # Join the strata ratios onto the input such that each contributor has
-        # a set of ratios.
-        return df.join(strata_ratio_df, ["period", "strata"], "leftouter").fillna(
-            1.0, ["forward", "backward", "construction"]
-        )
-
-    # Caching for both imputed and unimputed data.
-    imputed_df = None
-    null_response_df = None
-
-    # --- Impute helper ---
-    def impute_helper(
-        df: DataFrame, link_col: str, marker: Marker, direction: bool
-    ) -> DataFrame:
-        nonlocal imputed_df
-        nonlocal null_response_df
-        if direction:
-            # Forward imputation
-            other_period_col = "previous_period"
-        else:
-            # Backward imputation
-            other_period_col = "next_period"
-
-        if imputed_df is None:
-            working_df = df.select(
-                "ref",
-                "period",
-                "strata",
-                "output",
-                "marker",
-                "previous_period",
-                "next_period",
-                "forward",
-                "backward",
-            )
-
-            # Anything which isn't null is already imputed or a response and thus
-            # can be imputed from. Note that in the case of backward imputation
-            # this still holds since it always happens after forward imputation
-            # and thus it can never attempt to backward impute from a forward
-            # imputation since there will never be a null value directly prior to
-            # one.
-            imputed_df = working_df.filter(~col("output").isNull()).localCheckpoint(
-                eager=True
-            )
-            # Any refs which have no values at all can't be imputed from so we
-            # don't care about them here.
-            ref_df = imputed_df.select("ref").distinct()
-            null_response_df = (
-                working_df.filter(col("output").isNull())
-                .drop("output", "marker")
-                .join(ref_df, "ref")
-                .localCheckpoint(eager=True)
-            )
-
-        while True:
-            other_df = imputed_df.selectExpr(
-                "ref AS other_ref",
-                "period AS other_period",
-                "output AS other_output",
-                "strata AS other_strata",
-            )
-            calculation_df = (
-                null_response_df.join(
-                    other_df,
-                    [
-                        col(other_period_col) == col("other_period"),
-                        col("ref") == col("other_ref"),
-                        col("strata") == col("other_strata"),
-                    ],
-                )
-                .select(
-                    "ref",
-                    "period",
-                    "strata",
-                    (col(link_col) * col("other_output")).alias("output"),
-                    lit(marker.value).alias("marker"),
-                    "previous_period",
-                    "next_period",
-                    "forward",
-                    "backward",
-                )
-                .localCheckpoint(eager=False)
-            )
-            # If we've imputed nothing then we've got as far as we can get for
-            # this phase.
-            if calculation_df.count() == 0:
-                break
-
-            # Store this set of imputed values in our main set for the next
-            # iteration. Use eager checkpoints to help prevent rdd DAG explosion.
-            imputed_df = imputed_df.union(calculation_df).localCheckpoint(eager=True)
-            # Remove the newly imputed rows from our filtered set.
-            null_response_df = null_response_df.join(
-                calculation_df.select("ref", "period"), ["ref", "period"], "leftanti"
-            ).localCheckpoint(eager=True)
-
-        # We should now have an output column which is as fully populated as
-        # this phase of imputation can manage. As such replace the existing
-        # output column with our one. Same goes for the marker column.
-        return df.drop("output", "marker").join(
-            imputed_df.select("ref", "period", "output", "marker"),
-            ["ref", "period"],
-            "leftouter",
-        )
-
-    # --- Imputation functions ---
-    def forward_impute_from_response(df: DataFrame) -> DataFrame:
-        # Add the forward imputes from responses from the back data
-        df = df.unionByName(
-            filter_back_data(
-                col("marker") == lit(Marker.FORWARD_IMPUTE_FROM_RESPONSE.value)
-            ),
-            allowMissingColumns=True,
-        )
-        return impute_helper(df, "forward", Marker.FORWARD_IMPUTE_FROM_RESPONSE, True)
-
-    def backward_impute(df: DataFrame) -> DataFrame:
-        return impute_helper(df, "backward", Marker.BACKWARD_IMPUTE, False)
-
-    # --- Construction functions ---
-    def construct_values(df: DataFrame) -> DataFrame:
-        # Add in the constructions and forward imputes from construction in the back data
-        df = df.unionByName(
-            filter_back_data(
-                (
-                    (col("marker") == lit(Marker.CONSTRUCTED.value))
-                    | (
-                        col("marker")
-                        == lit(Marker.FORWARD_IMPUTE_FROM_CONSTRUCTION.value)
-                    )
-                )
-            ),
-            allowMissingColumns=True,
-        )
-        construction_df = df.filter(df.output.isNull()).select(
-            "ref", "period", "strata", "aux", "construction", "previous_period"
-        )
-        other_df = df.select("ref", "period", "strata").alias("other")
-        construction_df = construction_df.alias("construction")
-        construction_df = construction_df.join(
-            other_df,
-            [
-                col("construction.ref") == col("other.ref"),
-                col("construction.previous_period") == col("other.period"),
-                col("construction.strata") == col("other.strata"),
-            ],
-            "leftanti",
-        ).select(
-            col("construction.ref").alias("ref"),
-            col("construction.period").alias("period"),
-            (col("aux") * col("construction")).alias("constructed_output"),
-            lit(Marker.CONSTRUCTED.value).alias("constructed_marker"),
-        )
-
-        return (
-            df.withColumnRenamed("output", "existing_output")
-            .withColumnRenamed("marker", "existing_marker")
-            .join(
-                construction_df,
-                ["ref", "period"],
-                "leftouter",
-            )
-            .select(
-                "*",
-                when(col("existing_output").isNull(), col("constructed_output"))
-                .otherwise(col("existing_output"))
-                .alias("output"),
-                when(col("existing_marker").isNull(), col("constructed_marker"))
-                .otherwise(col("existing_marker"))
-                .alias("marker"),
-            )
-            .drop("existing_output", "constructed_output", "constructed_marker")
-        )
-
-    def forward_impute_from_construction(df: DataFrame) -> DataFrame:
-        # We need to recalculate our imputed and null response data frames to
-        # account for construction.
-        nonlocal imputed_df
-        nonlocal null_response_df
-        imputed_df = None
-        null_response_df = None
-        return impute_helper(
-            df, "forward", Marker.FORWARD_IMPUTE_FROM_CONSTRUCTION, True
-        )
-
-    # --- Utility functions ---
-    def create_output(df: DataFrame) -> DataFrame:
-        del full_col_mapping["aux"]
-        del full_col_mapping["strata"]
-        return select_cols(
-            df.filter(col("period") != lit(prior_period)), reversed=False
-        ).withColumnRenamed("output", output_col)
-
-    def select_cols(
-        df: DataFrame,
-        reversed: bool = True,
-        drop_unmapped: bool = True,
-        mapping: dict = full_col_mapping,
-    ) -> DataFrame:
-        col_mapping = {v: k for k, v in mapping.items()} if reversed else mapping
-        col_set = set(df.columns)
-
-        return df.select(
-            [
-                col(k).alias(col_mapping.get(k, k))
-                for k in ((col_mapping.keys() & col_set) if drop_unmapped else col_set)
-            ]
-        )
-
-    def calculate_previous_period(period: Column) -> Column:
-        return when(
-            period.endswith("01"), (period.cast(IntegerType()) - 89).cast(StringType())
-        ).otherwise((period.cast(IntegerType()) - 1).cast(StringType()))
-
-    def calculate_next_period(period: Column) -> Column:
-        return when(
-            period.endswith("12"), (period.cast(IntegerType()) + 89).cast(StringType())
-        ).otherwise((period.cast(IntegerType()) + 1).cast(StringType()))
-
-    def filter_back_data(filter_col: Column) -> DataFrame:
-        return prepared_back_data_df.filter(filter_col).localCheckpoint(eager=True)
-
-    # ----------
+    kwargs["ratio_calculation_function"] = ratio_of_means
 
-    return run()
+    return engine.impute(**kwargs)

From 45e7b777034190d1aa86b940b7bbd08d1f011e4c Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 23 Feb 2023 15:30:59 +0000
Subject: [PATCH 057/531] Adjust tests to new imputation api

---
 tests/imputation/test_ratio_of_means.py | 136 +++++++++---------------
 1 file changed, 53 insertions(+), 83 deletions(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 67e0e5c1..3fecb779 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -82,23 +82,15 @@
 bad_dataframe_types[target_col] = reference_type
 
 # Params used when calling impute
-params = (
-    reference_col,
-    period_col,
-    strata_col,
-    target_col,
-    auxiliary_col,
-    output_col,
-    marker_col,
-)
-
-default_params = (
-    reference_col,
-    period_col,
-    strata_col,
-    target_col,
-    auxiliary_col,
-)
+params = {
+    "reference_col": reference_col,
+    "period_col": period_col,
+    "strata_col": strata_col,
+    "target_col": target_col,
+    "auxiliary_col": auxiliary_col,
+    "output_col": output_col,
+    "marker_col": marker_col,
+}
 
 test_scenarios = [
     ("unit", "ratio_calculation"),
@@ -133,7 +125,7 @@
 def test_input_not_a_dataframe():
     with pytest.raises(TypeError):
         # noinspection PyTypeChecker
-        ratio_of_means.impute("not_a_dataframe", *params)
+        ratio_of_means.impute(input_df="not_a_dataframe", **params)
 
 
 # --- Test type validation on the back_data dataframe(s) ---
@@ -151,7 +143,7 @@ def test_back_data_not_a_dataframe(fxt_load_test_csv):
     )
     with pytest.raises(TypeError):
         # noinspection PyTypeChecker
-        ratio_of_means.impute(test_dataframe, *params, back_data_df="not_a_dataframe")
+        ratio_of_means.impute(input_df=test_dataframe, **params, back_data_df="not_a_dataframe")
 
 
 # --- Test if cols missing from input dataframe(s) ---
@@ -169,7 +161,7 @@ def test_dataframe_column_missing(fxt_load_test_csv):
     )
     bad_dataframe = test_dataframe.drop(strata_col)
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(bad_dataframe, *params)
+        ratio_of_means.impute(input_df=bad_dataframe, **params)
 
 
 # --- Test if dataframe has duplicate rows ---
@@ -186,7 +178,7 @@ def test_dataframe_duplicate_rows(fxt_load_test_csv):
         "duplicate_rows",
     )
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(test_dataframe, *params)
+        ratio_of_means.impute(input_df=test_dataframe, **params)
 
 
 # --- Test if target missing from input dataframe(s) ---
@@ -204,7 +196,7 @@ def test_dataframe_target_missing(fxt_load_test_csv):
     )
     bad_dataframe = test_dataframe.drop(target_col)
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(bad_dataframe, *params)
+        ratio_of_means.impute(input_df=bad_dataframe, **params)
 
 
 # --- Test if params null ---
@@ -220,17 +212,10 @@ def test_params_null(fxt_load_test_csv):
         "unit",
         "basic_functionality",
     )
-    bad_params = (
-        reference_col,
-        period_col,
-        strata_col,
-        "",
-        auxiliary_col,
-        output_col,
-        marker_col,
-    )
+    bad_params = params.copy()
+    bad_params["target_col"] = None
     with pytest.raises(ValueError):
-        ratio_of_means.impute(test_dataframe, *bad_params)
+        ratio_of_means.impute(input_df=test_dataframe, **bad_params)
 
 
 @pytest.mark.dependency()
@@ -245,7 +230,7 @@ def test_params_missing_link_column(fxt_load_test_csv):
     )
     with pytest.raises(TypeError):
         ratio_of_means.impute(
-            test_dataframe, *params, construction_link_col=construction_col
+            test_dataframe, **params, construction_link_col=construction_col
         )
 
 
@@ -259,22 +244,14 @@ def test_params_not_string(fxt_load_test_csv):
         "unit",
         "basic_functionality",
     )
-    bad_params = (
-        reference_col,
-        period_col,
-        strata_col,
-        ["target_col"],
-        auxiliary_col,
-        output_col,
-        marker_col,
-    )
+    bad_params = params.copy()
+    bad_params["reference_col"] = 23
     with pytest.raises(TypeError):
-        ratio_of_means.impute(test_dataframe, *bad_params)
+        ratio_of_means.impute(input_df=test_dataframe, **bad_params)
 
 
 # --- Test if output contents are as expected, both new columns and data ---
 
-
 @pytest.mark.dependency()
 def test_dataframe_returned_as_expected(fxt_spark_session, fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -287,9 +264,7 @@ def test_dataframe_returned_as_expected(fxt_spark_session, fxt_load_test_csv):
     )
     # Make sure that no extra columns pass through.
     test_dataframe = test_dataframe.withColumn("bonus_column", lit(0))
-    ret_val = ratio_of_means.impute(test_dataframe, *params)
-    # perform action on the dataframe to trigger lazy evaluation
-    ret_val.count()
+    ret_val = ratio_of_means.impute(input_df=test_dataframe, **params)
     assert isinstance(ret_val, type(test_dataframe))
     ret_cols = ret_val.columns
     assert "bonus_column" not in ret_cols
@@ -315,7 +290,7 @@ def test_back_data_missing_column(fxt_load_test_csv, fxt_spark_session):
         "back_data_missing_column",
     )
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(test_dataframe, *params, back_data_df=bad_back_data)
+        ratio_of_means.impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
 
 
 @pytest.mark.dependency()
@@ -338,7 +313,7 @@ def test_back_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
     )
 
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(test_dataframe, *params, back_data_df=bad_back_data)
+        ratio_of_means.impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
 
 
 @pytest.mark.dependency()
@@ -361,13 +336,11 @@ def test_back_data_without_output_is_invalid(fxt_load_test_csv, fxt_spark_sessio
     )
 
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(test_dataframe, *params, back_data_df=bad_back_data)
-
-
-# --- Test if when the back data input has link cols and the main data input does not
-# --- then the columns are ignored.
+        ratio_of_means.impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
 
 
+# Test if when the back data input has link cols and the main data input does not
+# then the columns are ignored.
 @pytest.mark.dependency()
 def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_session):
     test_dataframe = fxt_load_test_csv(
@@ -388,15 +361,13 @@ def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_ses
         "back_data_with_link_cols",
     )
 
-    ret_val = ratio_of_means.impute(test_dataframe, *params, back_data_df=back_data)
+    ret_val = ratio_of_means.impute(input_df=test_dataframe, **params, back_data_df=back_data)
 
     assert ret_val.count() == 1
 
 
-# --- Test when main data input has link cols and the back data input does not
-# --- then columns aren't lost.
-
-
+# Test when main data input has link cols and the back data input does not
+# then columns aren't lost.
 @pytest.mark.dependency()
 def test_input_has_link_cols_and_back_data_does_not_have_link_cols(
     fxt_load_test_csv, fxt_spark_session
@@ -419,22 +390,23 @@ def test_input_has_link_cols_and_back_data_does_not_have_link_cols(
         "back_data_without_link_cols",
     )
 
-    imputation_kwargs = {
-        "forward_link_col": forward_col,
-        "backward_link_col": backward_col,
-        "construction_link_col": construction_col,
-    }
-
-    ret_val = ratio_of_means.impute(
-        test_dataframe, *params, **imputation_kwargs, back_data_df=back_data
+    imputation_kwargs = params.copy()
+    imputation_kwargs.update(
+        {
+            "forward_link_col": forward_col,
+            "backward_link_col": backward_col,
+            "construction_link_col": construction_col,
+            "input_df": test_dataframe,
+            "back_data_df": back_data
+        }
     )
 
-    assert ret_val.count() == 1
+    ret_val = ratio_of_means.impute(**imputation_kwargs)
 
-
-# --- Test if columns of the incorrect type are caught.
+    assert ret_val.count() == 1
 
 
+# Test if columns of the incorrect type are caught.
 @pytest.mark.dependency()
 def test_incorrect_column_types(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -446,7 +418,7 @@ def test_incorrect_column_types(fxt_load_test_csv):
         "basic_functionality",
     )
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(test_dataframe, *params)
+        ratio_of_means.impute(input_df=test_dataframe, **params)
 
 
 @pytest.mark.dependency()
@@ -461,7 +433,7 @@ def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
     )
 
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(test_dataframe, *params)
+        ratio_of_means.impute(input_df=test_dataframe, **params)
 
 
 # --- Test Scenarios.
@@ -507,17 +479,15 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         scenario_file_type,
         f"{scenario}_output",
     )
-    # We use imputation_kwargs to allow us to pass in the forward, backward
-    # and construction link columns which are usually defaulted to None. This
-    # means that we can autodetect when we should pass these.
+    imputation_kwargs = params.copy()
     if forward_col in scenario_input.columns:
-        imputation_kwargs = {
-            "forward_link_col": forward_col,
-            "backward_link_col": backward_col,
-            "construction_link_col": construction_col,
-        }
-    else:
-        imputation_kwargs = {}
+        imputation_kwargs.update(
+            {
+                "forward_link_col": forward_col,
+                "backward_link_col": backward_col,
+                "construction_link_col": construction_col,
+            }
+        )
 
     if scenario.endswith("filtered"):
         if "dev" in scenario_type:
@@ -565,7 +535,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         auxiliary_col,
     )
     scenario_actual_output = ratio_of_means.impute(
-        scenario_input, *params, **imputation_kwargs
+        input_df=scenario_input, **imputation_kwargs
     )
     scenario_actual_output = scenario_actual_output.withColumn(
         output_col, bround(col(output_col), 6)

From 565fabc4bc78dba4979d700cf1e64c261ad1e493 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 23 Feb 2023 15:49:42 +0000
Subject: [PATCH 058/531] Rename null params test to reflect the fact that the
 test is actually testing for an empty string

---
 tests/imputation/test_ratio_of_means.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 3fecb779..08e1b864 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -203,7 +203,7 @@ def test_dataframe_target_missing(fxt_load_test_csv):
 
 
 @pytest.mark.dependency()
-def test_params_null(fxt_load_test_csv):
+def test_params_empty_string(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
         dataframe_columns,
         dataframe_types,
@@ -213,7 +213,7 @@ def test_params_null(fxt_load_test_csv):
         "basic_functionality",
     )
     bad_params = params.copy()
-    bad_params["target_col"] = None
+    bad_params["target_col"] = ""
     with pytest.raises(ValueError):
         ratio_of_means.impute(input_df=test_dataframe, **bad_params)
 

From 282df5ae7411e9c9753fe7a92d5eca0bc29ac493 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 23 Feb 2023 15:55:42 +0000
Subject: [PATCH 059/531] Bug Fix. Required Columns Not Passed To Validation

---
 .../imputation/engine.py                      | 15 ++++++++----
 .../imputation/ratio_of_means.py              |  2 ++
 tests/imputation/test_ratio_of_means.py       | 23 ++++++++++++++-----
 3 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index a80448f9..758c0752 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -5,11 +5,11 @@
 For Copyright information, please see LICENCE.
 """
 
-from typing import Callable, Optional, Union
 from enum import Enum
+from typing import Callable, Optional, Union
 
 from pyspark.sql import Column, DataFrame
-from pyspark.sql.functions import col, count, lit, sum, when
+from pyspark.sql.functions import col, lit, when
 from pyspark.sql.types import DecimalType, IntegerType, StringType
 
 from statistical_methods_library.utilities import validation
@@ -166,6 +166,9 @@ def impute(
         "strata": strata_col,
         "target": target_col,
         "aux": auxiliary_col,
+    }
+
+    optional_params = {
         "forward": forward_link_col,
         "backward": backward_link_col,
         "construction": construction_link_col,
@@ -186,9 +189,11 @@ def impute(
         "construction": "construction",
     }
 
-    input_expected_columns = {k: v for k, v in input_params.items() if v is not None}
+    if forward_link_col is not None:
+        input_params.update(optional_params)
+
+    full_col_mapping = {**input_params, **created_col_mapping}
 
-    full_col_mapping = {**input_expected_columns, **created_col_mapping}
     if forward_link_col is None:
         full_col_mapping = {**full_col_mapping, **new_link_map}
 
@@ -216,7 +221,7 @@ def impute(
 
     aliased_input_df = validation.validate_dataframe(
         input_df,
-        input_expected_columns,
+        input_params,
         type_mapping,
         ["ref", "period"],
         ["target", "forward", "backward", "construction"],
diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 2ddefe42..fcf9b940 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -3,8 +3,10 @@
 from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, count, lit, sum, when
 from pyspark.sql.types import DecimalType, IntegerType, StringType
+
 from . import engine
 
+
 def impute(**kwargs) -> DataFrame:
     """
     Perform Ratio of means (also known as Ratio of Sums) imputation on a
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 08e1b864..fb52f841 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -143,7 +143,9 @@ def test_back_data_not_a_dataframe(fxt_load_test_csv):
     )
     with pytest.raises(TypeError):
         # noinspection PyTypeChecker
-        ratio_of_means.impute(input_df=test_dataframe, **params, back_data_df="not_a_dataframe")
+        ratio_of_means.impute(
+            input_df=test_dataframe, **params, back_data_df="not_a_dataframe"
+        )
 
 
 # --- Test if cols missing from input dataframe(s) ---
@@ -252,6 +254,7 @@ def test_params_not_string(fxt_load_test_csv):
 
 # --- Test if output contents are as expected, both new columns and data ---
 
+
 @pytest.mark.dependency()
 def test_dataframe_returned_as_expected(fxt_spark_session, fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -290,7 +293,9 @@ def test_back_data_missing_column(fxt_load_test_csv, fxt_spark_session):
         "back_data_missing_column",
     )
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
+        ratio_of_means.impute(
+            input_df=test_dataframe, **params, back_data_df=bad_back_data
+        )
 
 
 @pytest.mark.dependency()
@@ -313,7 +318,9 @@ def test_back_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
     )
 
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
+        ratio_of_means.impute(
+            input_df=test_dataframe, **params, back_data_df=bad_back_data
+        )
 
 
 @pytest.mark.dependency()
@@ -336,7 +343,9 @@ def test_back_data_without_output_is_invalid(fxt_load_test_csv, fxt_spark_sessio
     )
 
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
+        ratio_of_means.impute(
+            input_df=test_dataframe, **params, back_data_df=bad_back_data
+        )
 
 
 # Test if when the back data input has link cols and the main data input does not
@@ -361,7 +370,9 @@ def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_ses
         "back_data_with_link_cols",
     )
 
-    ret_val = ratio_of_means.impute(input_df=test_dataframe, **params, back_data_df=back_data)
+    ret_val = ratio_of_means.impute(
+        input_df=test_dataframe, **params, back_data_df=back_data
+    )
 
     assert ret_val.count() == 1
 
@@ -397,7 +408,7 @@ def test_input_has_link_cols_and_back_data_does_not_have_link_cols(
             "backward_link_col": backward_col,
             "construction_link_col": construction_col,
             "input_df": test_dataframe,
-            "back_data_df": back_data
+            "back_data_df": back_data,
         }
     )
 

From 8d00f7f66499c87bf45feffa4fc1d70a017e94cd Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 23 Feb 2023 16:03:02 +0000
Subject: [PATCH 060/531] Test For None Passed In

---
 tests/imputation/test_ratio_of_means.py | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index fb52f841..e50dc9a6 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -204,6 +204,22 @@ def test_dataframe_target_missing(fxt_load_test_csv):
 # --- Test if params null ---
 
 
+@pytest.mark.dependency()
+def test_params_none(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    bad_params = params.copy()
+    bad_params["target_col"] = None
+    with pytest.raises(TypeError):
+        ratio_of_means.impute(input_df=test_dataframe, **bad_params)
+
+
 @pytest.mark.dependency()
 def test_params_empty_string(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -458,7 +474,8 @@ def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
     depends=[
         "test_dataframe_returned_as_expected",
         "test_params_not_string",
-        "test_params_null",
+        "test_params_none",
+        "test_params_empty_string"
         "test_params_missing_link_column",
         "test_dataframe_column_missing",
         "test_input_not_a_dataframe",

From fcffe71a7822482f0608330822bdefb9226fdffb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 23 Feb 2023 16:09:16 +0000
Subject: [PATCH 061/531] Add next_period column to dataframe passed to ratio
 calculation

---
 statistical_methods_library/imputation/engine.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 758c0752..4c3d1c66 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -363,6 +363,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             col("current.aux").alias("aux"),
             col("prev.output").alias("other_output"),
             col("current.output").alias("output_for_construction"),
+            col("current.next_period").alias("next_period"),
         )
 
         # Join the strata ratios onto the input such that each contributor has

From 7ed0e4a6b286fe10f4f694dbf7b9ca7114ba824e Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 23 Feb 2023 16:11:52 +0000
Subject: [PATCH 062/531] Comma

---
 tests/imputation/test_ratio_of_means.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index e50dc9a6..d6127f36 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -475,7 +475,7 @@ def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
         "test_dataframe_returned_as_expected",
         "test_params_not_string",
         "test_params_none",
-        "test_params_empty_string"
+        "test_params_empty_string",
         "test_params_missing_link_column",
         "test_dataframe_column_missing",
         "test_input_not_a_dataframe",

From b82d6254f5344b37878950022125f307a903edd5 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 23 Feb 2023 16:33:01 +0000
Subject: [PATCH 063/531] Unused Imports

---
 statistical_methods_library/imputation/ratio_of_means.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index fcf9b940..9e359f5e 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -1,8 +1,7 @@
 # For Copyright information, please see LICENCE.
 
-from pyspark.sql import Column, DataFrame
-from pyspark.sql.functions import col, count, lit, sum, when
-from pyspark.sql.types import DecimalType, IntegerType, StringType
+from pyspark.sql import DataFrame
+from pyspark.sql.functions import col, count, sum, when
 
 from . import engine
 

From 425d8b25b6f8c5aadc46c681084ec60cfded7c8d Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 23 Feb 2023 16:36:17 +0000
Subject: [PATCH 064/531] Major version bump as we dropped the positional
 arguments from imputation

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 1ca21c34..bc3063fc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "10.0.0"
+version = "11.0.0"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From e06968272d145073164d71cf68bfb9019504a7a5 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 23 Feb 2023 17:05:36 +0000
Subject: [PATCH 065/531] Fix call in test so that it returns a type error from
 the correct place (from coverage)

---
 tests/imputation/test_ratio_of_means.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index d6127f36..696972e3 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -248,7 +248,7 @@ def test_params_missing_link_column(fxt_load_test_csv):
     )
     with pytest.raises(TypeError):
         ratio_of_means.impute(
-            test_dataframe, **params, construction_link_col=construction_col
+            input_df=test_dataframe, **params, construction_link_col=construction_col
         )
 
 

From ddbad265a5b6ed562dea272b01a32515dd4e30a9 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 24 Feb 2023 11:04:52 +0000
Subject: [PATCH 066/531] Fix comments in tests

---
 tests/estimation/test_ht_ratio.py | 45 ++++++++++++++++++++++---------
 1 file changed, 32 insertions(+), 13 deletions(-)

diff --git a/tests/estimation/test_ht_ratio.py b/tests/estimation/test_ht_ratio.py
index 4fdf5d1d..748d950b 100644
--- a/tests/estimation/test_ht_ratio.py
+++ b/tests/estimation/test_ht_ratio.py
@@ -79,7 +79,7 @@
         )
 
 
-# --- Test type validation on the input dataframe(s) ---
+# Test type validation on the input dataframe(s)
 @pytest.mark.dependency()
 def test_input_not_a_dataframe():
     with pytest.raises(TypeError):
@@ -87,7 +87,7 @@ def test_input_not_a_dataframe():
         ht_ratio.estimate("not_a_dataframe", *params)
 
 
-# --- Test validation fail if mismatched death cols  ---
+# Test validation fail if mismatched death cols
 @pytest.mark.dependency()
 def test_params_mismatched_death_cols(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -108,8 +108,27 @@ def test_params_mismatched_death_cols(fxt_load_test_csv):
     with pytest.raises(TypeError):
         ht_ratio.estimate(test_dataframe, *bad_params)
 
+@pytest.mark.dependency()
+def test_params_mismatched_death_cols(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "estimation",
+        "ht_ratio",
+        "unit",
+        "basic_functionality",
+    )
+    bad_params = (
+        unique_identifier_col,
+        period_col,
+        strata_col,
+        sample_col,
+        adjustment_col,
+    )
+    with pytest.raises(TypeError):
+        ht_ratio.estimate(test_dataframe, *bad_params)
 
-# --- Test validation fail if mismatched calibration cols  ---
+# Test validation fail if mismatched calibration cols
 @pytest.mark.dependency()
 def test_params_mismatched_calibration_cols(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -131,7 +150,7 @@ def test_params_mismatched_calibration_cols(fxt_load_test_csv):
         ht_ratio.estimate(test_dataframe, *bad_params)
 
 
-# --- Test if params not strings  ---
+# Test if params not strings
 @pytest.mark.dependency()
 def test_params_not_string(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -147,7 +166,7 @@ def test_params_not_string(fxt_load_test_csv):
         ht_ratio.estimate(test_dataframe, *bad_params)
 
 
-# --- Test if params null  ---
+# Test if params null
 @pytest.mark.dependency()
 def test_params_null(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -163,7 +182,7 @@ def test_params_null(fxt_load_test_csv):
         ht_ratio.estimate(test_dataframe, *bad_params)
 
 
-# --- Test validation fail if nulls in data  ---
+# Test validation fail if nulls in data
 @pytest.mark.dependency()
 def test_dataframe_nulls_in_data(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -178,7 +197,7 @@ def test_dataframe_nulls_in_data(fxt_load_test_csv):
         ht_ratio.estimate(test_dataframe, *params)
 
 
-# --- Test if cols missing from input dataframe(s)  ---
+# Test if cols missing from input dataframe(s)
 @pytest.mark.dependency()
 def test_dataframe_column_missing(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -194,7 +213,7 @@ def test_dataframe_column_missing(fxt_load_test_csv):
         ht_ratio.estimate(bad_dataframe, *params)
 
 
-# --- Test if references are duplicated in the input dataframe  ---
+# Test if references are duplicated in the input dataframe
 @pytest.mark.dependency()
 def test_dataframe_duplicate_reference(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -224,7 +243,7 @@ def test_dataframe_deaths_in_unsampled(fxt_load_test_csv):
         ht_ratio.estimate(test_dataframe, *estimation_params)
 
 
-# --- Test validation fail if mixed h values in a strata  ---
+# Test validation fail if mixed h values in a strata
 @pytest.mark.dependency()
 def test_dataframe_mixed_h_values_in_strata(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -240,7 +259,7 @@ def test_dataframe_mixed_h_values_in_strata(fxt_load_test_csv):
         ht_ratio.estimate(test_dataframe, *estimation_params)
 
 
-# --- Test output is correct type ---
+# Test output is correct type
 @pytest.mark.dependency()
 def test_dataframe_correct_type(fxt_spark_session, fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -257,7 +276,7 @@ def test_dataframe_correct_type(fxt_spark_session, fxt_load_test_csv):
     assert isinstance(ret_val, type(test_dataframe))
 
 
-# --- Test no extra columns are copied to the output ---
+# Test no extra columns are copied to the output
 @pytest.mark.dependency()
 def test_dataframe_no_extra_columns(fxt_spark_session, fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -276,7 +295,7 @@ def test_dataframe_no_extra_columns(fxt_spark_session, fxt_load_test_csv):
     assert "bonus_column" not in ret_cols
 
 
-# --- Test expected columns are in the output ---
+# Test expected columns are in the output
 @pytest.mark.dependency()
 def test_dataframe_expected_columns(fxt_spark_session, fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -306,7 +325,7 @@ def test_dataframe_expected_columns(fxt_spark_session, fxt_load_test_csv):
     assert expected_cols == ret_cols
 
 
-# --- Test expected columns are in the output when default names aren't used ---
+# Test expected columns are in the output when default names aren't used
 @pytest.mark.dependency()
 def test_dataframe_expected_columns_not_defaults(fxt_spark_session, fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(

From eec055d6bd6cf9e553e3642f22fe56db2bcc23a5 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 24 Feb 2023 11:37:47 +0000
Subject: [PATCH 067/531] Add missing estimation tests and switch them to use
 mostly keyword args for simplicity

---
 tests/estimation/test_ht_ratio.py | 127 +++++++++++++++++-------------
 1 file changed, 72 insertions(+), 55 deletions(-)

diff --git a/tests/estimation/test_ht_ratio.py b/tests/estimation/test_ht_ratio.py
index 748d950b..c1a018e9 100644
--- a/tests/estimation/test_ht_ratio.py
+++ b/tests/estimation/test_ht_ratio.py
@@ -13,8 +13,8 @@
 unique_identifier_col = "identifier"
 period_col = "date"
 strata_col = "group"
-sample_col = "sample"
-adjustment_col = "adjustment"
+sample_marker_col = "sample"
+adjustment_marker_col = "adjustment"
 h_col = "H"
 auxiliary_col = "other"
 calibration_group_col = "calibration"
@@ -26,8 +26,8 @@
     unique_identifier_col,
     period_col,
     strata_col,
-    sample_col,
-    adjustment_col,
+    sample_marker_col,
+    adjustment_marker_col,
     h_col,
     auxiliary_col,
     calibration_group_col,
@@ -41,8 +41,8 @@
     unique_identifier_col: StringType(),
     period_col: StringType(),
     strata_col: StringType(),
-    sample_col: BooleanType(),
-    adjustment_col: StringType(),
+    sample_marker_col: BooleanType(),
+    adjustment_marker_col: StringType(),
     h_col: BooleanType(),
     auxiliary_col: decimal_type,
     calibration_group_col: StringType(),
@@ -54,7 +54,12 @@
 bad_dataframe_types = dataframe_types.copy()
 bad_dataframe_types[unique_identifier_col] = decimal_type
 
-params = (unique_identifier_col, period_col, strata_col, sample_col)
+params = {
+    "unique_identifier_col": unique_identifier_col,
+    "period_col": period_col,
+    "strata_col": strata_col,
+    "sample_marker_col": sample_marker_col
+}
 
 test_scenarios = []
 
@@ -84,7 +89,7 @@
 def test_input_not_a_dataframe():
     with pytest.raises(TypeError):
         # noinspection PyTypeChecker
-        ht_ratio.estimate("not_a_dataframe", *params)
+        ht_ratio.estimate("not_a_dataframe", **params)
 
 
 # Test validation fail if mismatched death cols
@@ -98,18 +103,16 @@ def test_params_mismatched_death_cols(fxt_load_test_csv):
         "unit",
         "basic_functionality",
     )
-    bad_params = (
-        unique_identifier_col,
-        period_col,
-        strata_col,
-        sample_col,
-        adjustment_col,
-    )
+
     with pytest.raises(TypeError):
-        ht_ratio.estimate(test_dataframe, *bad_params)
+        ht_ratio.estimate(
+            test_dataframe,
+            **params,
+            adjustment_marker_col=adjustment_marker_col
+        )
 
 @pytest.mark.dependency()
-def test_params_mismatched_death_cols(fxt_load_test_csv):
+def test_params_mismatched_out_of_scope_cols(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
         dataframe_columns,
         dataframe_types,
@@ -118,15 +121,12 @@ def test_params_mismatched_death_cols(fxt_load_test_csv):
         "unit",
         "basic_functionality",
     )
-    bad_params = (
-        unique_identifier_col,
-        period_col,
-        strata_col,
-        sample_col,
-        adjustment_col,
-    )
+
     with pytest.raises(TypeError):
-        ht_ratio.estimate(test_dataframe, *bad_params)
+        ht_ratio.estimate(test_dataframe, **params, out_of_scope_full=True, adjustment_marker_col=adjustment_marker_col)
+
+    with pytest.raises(TypeError):
+        ht_ratio.estimate(test_dataframe, **params, out_of_scope_full=False, h_value_col=adjustment_marker_col)
 
 # Test validation fail if mismatched calibration cols
 @pytest.mark.dependency()
@@ -139,15 +139,9 @@ def test_params_mismatched_calibration_cols(fxt_load_test_csv):
         "unit",
         "basic_functionality",
     )
-    bad_params = (
-        unique_identifier_col,
-        period_col,
-        strata_col,
-        sample_col,
-        calibration_group_col,
-    )
+
     with pytest.raises(TypeError):
-        ht_ratio.estimate(test_dataframe, *bad_params)
+        ht_ratio.estimate(test_dataframe, **params, calibration_group_col=calibration_group_col)
 
 
 # Test if params not strings
@@ -161,14 +155,15 @@ def test_params_not_string(fxt_load_test_csv):
         "unit",
         "basic_functionality",
     )
-    bad_params = (unique_identifier_col, period_col, ["strata_col"], sample_col)
+    bad_params = params.copy()
+    bad_params["sample_marker_col"] = 42
     with pytest.raises(TypeError):
-        ht_ratio.estimate(test_dataframe, *bad_params)
+        ht_ratio.estimate(test_dataframe, **bad_params)
 
 
-# Test if params null
+# Test if params empty string
 @pytest.mark.dependency()
-def test_params_null(fxt_load_test_csv):
+def test_params_empty_string(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
         dataframe_columns,
         dataframe_types,
@@ -177,9 +172,26 @@ def test_params_null(fxt_load_test_csv):
         "unit",
         "basic_functionality",
     )
-    bad_params = (unique_identifier_col, period_col, "", sample_col)
+    bad_params = params.copy()
+    bad_params["strata_col"] = ""
     with pytest.raises(ValueError):
-        ht_ratio.estimate(test_dataframe, *bad_params)
+        ht_ratio.estimate(test_dataframe, **bad_params)
+
+#Test validation fails if params explicitly None
+@pytest.mark.dependency()
+def test_params_none(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "estimation",
+        "ht_ratio",
+        "unit",
+        "basic_functionality",
+    )
+    bad_params = params.copy()
+    bad_params["strata_col"] = None
+    with pytest.raises(ValueError):
+        ht_ratio.estimate(test_dataframe, **bad_params)
 
 
 # Test validation fail if nulls in data
@@ -194,7 +206,7 @@ def test_dataframe_nulls_in_data(fxt_load_test_csv):
         "null_value_present",
     )
     with pytest.raises(ValidationError):
-        ht_ratio.estimate(test_dataframe, *params)
+        ht_ratio.estimate(test_dataframe, **params)
 
 
 # Test if cols missing from input dataframe(s)
@@ -210,7 +222,7 @@ def test_dataframe_column_missing(fxt_load_test_csv):
     )
     bad_dataframe = test_dataframe.drop(strata_col)
     with pytest.raises(ValidationError):
-        ht_ratio.estimate(bad_dataframe, *params)
+        ht_ratio.estimate(bad_dataframe, **params)
 
 
 # Test if references are duplicated in the input dataframe
@@ -225,7 +237,7 @@ def test_dataframe_duplicate_reference(fxt_load_test_csv):
         "duplicate_references",
     )
     with pytest.raises(ValidationError):
-        ht_ratio.estimate(test_dataframe, *params)
+        ht_ratio.estimate(test_dataframe, **params)
 
 
 @pytest.mark.dependency()
@@ -239,8 +251,10 @@ def test_dataframe_deaths_in_unsampled(fxt_load_test_csv):
         "deaths_in_unsampled",
     )
     with pytest.raises(ValidationError):
-        estimation_params = [*params, adjustment_col, h_col]
-        ht_ratio.estimate(test_dataframe, *estimation_params)
+
+        estimation_params = params.copy()
+        estimation_params.update({"adjustment_marker_col": adjustment_marker_col, "h_value_col": h_col})
+        ht_ratio.estimate(test_dataframe, **estimation_params)
 
 
 # Test validation fail if mixed h values in a strata
@@ -255,8 +269,9 @@ def test_dataframe_mixed_h_values_in_strata(fxt_load_test_csv):
         "mixed_h-values_in_strata",
     )
     with pytest.raises(ValidationError):
-        estimation_params = [*params, adjustment_col, h_col]
-        ht_ratio.estimate(test_dataframe, *estimation_params)
+        estimation_params = params.copy()
+        estimation_params.update({"adjustment_marker_col": adjustment_marker_col, "h_value_col": h_col})
+        ht_ratio.estimate(test_dataframe, **estimation_params)
 
 
 # Test output is correct type
@@ -272,7 +287,7 @@ def test_dataframe_correct_type(fxt_spark_session, fxt_load_test_csv):
     )
 
     test_dataframe = test_dataframe.withColumn("bonus_column", lit(0))
-    ret_val = ht_ratio.estimate(test_dataframe, *params)
+    ret_val = ht_ratio.estimate(test_dataframe, **params)
     assert isinstance(ret_val, type(test_dataframe))
 
 
@@ -288,7 +303,7 @@ def test_dataframe_no_extra_columns(fxt_spark_session, fxt_load_test_csv):
         "basic_functionality",
     )
     test_dataframe = test_dataframe.withColumn("bonus_column", lit(0))
-    ret_val = ht_ratio.estimate(test_dataframe, *params)
+    ret_val = ht_ratio.estimate(test_dataframe, **params)
     # perform action on the dataframe to trigger lazy evaluation
     ret_val.count()
     ret_cols = ret_val.columns
@@ -308,7 +323,7 @@ def test_dataframe_expected_columns(fxt_spark_session, fxt_load_test_csv):
     )
     ret_val = ht_ratio.estimate(
         test_dataframe,
-        *params,
+        **params,
         auxiliary_col=auxiliary_col,
         calibration_group_col=calibration_group_col,
     )
@@ -338,7 +353,7 @@ def test_dataframe_expected_columns_not_defaults(fxt_spark_session, fxt_load_tes
     )
     ret_val = ht_ratio.estimate(
         test_dataframe,
-        *params,
+        **params,
         auxiliary_col=auxiliary_col,
         calibration_group_col=calibration_group_col,
         unadjusted_design_weight_col="u_a",
@@ -363,7 +378,7 @@ def test_incorrect_column_types(fxt_load_test_csv):
         "basic_functionality",
     )
     with pytest.raises(ValidationError):
-        ht_ratio.estimate(test_dataframe, *params)
+        ht_ratio.estimate(test_dataframe, **params)
 
 
 # --- Test valid scenarios ---
@@ -374,10 +389,12 @@ def test_incorrect_column_types(fxt_load_test_csv):
 @pytest.mark.dependency(
     depends=[
         "test_input_not_a_dataframe",
+        "test_params_mismatched_out_of_scope_cols",
         "test_params_mismatched_death_cols",
         "test_params_mismatched_calibration_cols",
         "test_params_not_string",
-        "test_params_null",
+        "test_params_none",
+        "test_params_empty_string",
         "test_dataframe_duplicate_reference",
         "test_dataframe_nulls_in_data",
         "test_dataframe_column_missing",
@@ -404,10 +421,10 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         "unique_identifier_col": unique_identifier_col,
         "period_col": period_col,
         "strata_col": strata_col,
-        "sample_marker_col": sample_col,
+        "sample_marker_col": sample_marker_col,
     }
-    if adjustment_col in test_dataframe.columns:
-        estimation_kwargs["adjustment_marker_col"] = adjustment_col
+    if adjustment_marker_col in test_dataframe.columns:
+        estimation_kwargs["adjustment_marker_col"] = adjustment_marker_col
         estimation_kwargs["h_value_col"] = h_col
 
     if "out_of_scope" in scenario:

From 76d1fd721639a08bf24dc3c2a06c21a12b0e4ec2 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 24 Feb 2023 12:02:17 +0000
Subject: [PATCH 068/531] Fix Type Error Test

---
 statistical_methods_library/estimation/ht_ratio.py | 7 +++++--
 tests/estimation/test_ht_ratio.py                  | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index 3de9694d..8ed22d0c 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -134,13 +134,16 @@ def estimate(
         "period": period_col,
         "strata": strata_col,
         "sample_marker": sample_marker_col,
+    }
+
+    optional_params = {
         "adjustment_marker": adjustment_marker_col,
         "h_value": h_value_col,
         "auxiliary": auxiliary_col,
         "calibration_group": calibration_group_col,
     }
 
-    expected_columns = {k: v for k, v in input_params.items() if v is not None}
+    input_params.update({k: v for k, v in optional_params.items() if v is not None})
 
     type_mapping = {
         "unique_identifier": StringType,
@@ -154,7 +157,7 @@ def estimate(
     }
 
     aliased_df = validation.validate_dataframe(
-        input_df, expected_columns, type_mapping, ["unique_identifier", "period"]
+        input_df, input_params, type_mapping, ["unique_identifier", "period"]
     )
 
     # h values must not change within a stratum
diff --git a/tests/estimation/test_ht_ratio.py b/tests/estimation/test_ht_ratio.py
index c1a018e9..283d3a8c 100644
--- a/tests/estimation/test_ht_ratio.py
+++ b/tests/estimation/test_ht_ratio.py
@@ -190,7 +190,7 @@ def test_params_none(fxt_load_test_csv):
     )
     bad_params = params.copy()
     bad_params["strata_col"] = None
-    with pytest.raises(ValueError):
+    with pytest.raises(TypeError):
         ht_ratio.estimate(test_dataframe, **bad_params)
 
 

From d3dac5320d813d0f9b3f38f6b66a477874dc2530 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 24 Feb 2023 12:04:12 +0000
Subject: [PATCH 069/531] Black

---
 tests/estimation/test_ht_ratio.py | 38 ++++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 11 deletions(-)

diff --git a/tests/estimation/test_ht_ratio.py b/tests/estimation/test_ht_ratio.py
index 283d3a8c..22df0f1c 100644
--- a/tests/estimation/test_ht_ratio.py
+++ b/tests/estimation/test_ht_ratio.py
@@ -58,7 +58,7 @@
     "unique_identifier_col": unique_identifier_col,
     "period_col": period_col,
     "strata_col": strata_col,
-    "sample_marker_col": sample_marker_col
+    "sample_marker_col": sample_marker_col,
 }
 
 test_scenarios = []
@@ -106,11 +106,10 @@ def test_params_mismatched_death_cols(fxt_load_test_csv):
 
     with pytest.raises(TypeError):
         ht_ratio.estimate(
-            test_dataframe,
-            **params,
-            adjustment_marker_col=adjustment_marker_col
+            test_dataframe, **params, adjustment_marker_col=adjustment_marker_col
         )
 
+
 @pytest.mark.dependency()
 def test_params_mismatched_out_of_scope_cols(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -123,10 +122,21 @@ def test_params_mismatched_out_of_scope_cols(fxt_load_test_csv):
     )
 
     with pytest.raises(TypeError):
-        ht_ratio.estimate(test_dataframe, **params, out_of_scope_full=True, adjustment_marker_col=adjustment_marker_col)
+        ht_ratio.estimate(
+            test_dataframe,
+            **params,
+            out_of_scope_full=True,
+            adjustment_marker_col=adjustment_marker_col,
+        )
 
     with pytest.raises(TypeError):
-        ht_ratio.estimate(test_dataframe, **params, out_of_scope_full=False, h_value_col=adjustment_marker_col)
+        ht_ratio.estimate(
+            test_dataframe,
+            **params,
+            out_of_scope_full=False,
+            h_value_col=adjustment_marker_col,
+        )
+
 
 # Test validation fail if mismatched calibration cols
 @pytest.mark.dependency()
@@ -141,7 +151,9 @@ def test_params_mismatched_calibration_cols(fxt_load_test_csv):
     )
 
     with pytest.raises(TypeError):
-        ht_ratio.estimate(test_dataframe, **params, calibration_group_col=calibration_group_col)
+        ht_ratio.estimate(
+            test_dataframe, **params, calibration_group_col=calibration_group_col
+        )
 
 
 # Test if params not strings
@@ -177,7 +189,8 @@ def test_params_empty_string(fxt_load_test_csv):
     with pytest.raises(ValueError):
         ht_ratio.estimate(test_dataframe, **bad_params)
 
-#Test validation fails if params explicitly None
+
+# Test validation fails if params explicitly None
 @pytest.mark.dependency()
 def test_params_none(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -251,9 +264,10 @@ def test_dataframe_deaths_in_unsampled(fxt_load_test_csv):
         "deaths_in_unsampled",
     )
     with pytest.raises(ValidationError):
-
         estimation_params = params.copy()
-        estimation_params.update({"adjustment_marker_col": adjustment_marker_col, "h_value_col": h_col})
+        estimation_params.update(
+            {"adjustment_marker_col": adjustment_marker_col, "h_value_col": h_col}
+        )
         ht_ratio.estimate(test_dataframe, **estimation_params)
 
 
@@ -270,7 +284,9 @@ def test_dataframe_mixed_h_values_in_strata(fxt_load_test_csv):
     )
     with pytest.raises(ValidationError):
         estimation_params = params.copy()
-        estimation_params.update({"adjustment_marker_col": adjustment_marker_col, "h_value_col": h_col})
+        estimation_params.update(
+            {"adjustment_marker_col": adjustment_marker_col, "h_value_col": h_col}
+        )
         ht_ratio.estimate(test_dataframe, **estimation_params)
 
 

From 6d091c91d196f8acb09c6da70eeda4bb7162060d Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 27 Feb 2023 13:35:20 +0000
Subject: [PATCH 070/531] Support multiple data frame returns from ratio
 calculation

- Also remove unnecessary documentation from imputation engine as this needs to be replaced
---
 .../imputation/engine.py                      | 120 +++---------------
 .../imputation/ratio_of_means.py              |   5 +-
 2 files changed, 18 insertions(+), 107 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 4c3d1c66..e574aa52 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -4,9 +4,9 @@
 Currently only Ratio of Means (or Ratio of Sums) imputation is implemented.
 For Copyright information, please see LICENCE.
 """
-
+from dataclasses import dataclass
 from enum import Enum
-from typing import Callable, Optional, Union
+from typing import Callable, Iterable, Optional, Union
 
 from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, lit, when
@@ -15,8 +15,6 @@
 from statistical_methods_library.utilities import validation
 
 # --- Marker constants ---
-# Documented after the variable as per Pdoc syntax for documenting variables.
-
 
 class Marker(Enum):
     """Values for the marker column created during imputation."""
@@ -37,6 +35,12 @@ class Marker(Enum):
     FORWARD_IMPUTE_FROM_CONSTRUCTION = "FIC"
     """The value has been forward imputed from a constructed value."""
 
+@dataclass
+class RatioCalculationResult:
+    data: DataFrame
+    join_columns: list[Union[str, Column]]
+    fill_columns: list[Union[str, Column]] = None
+
 
 def impute(
     *,
@@ -46,7 +50,7 @@ def impute(
     strata_col: str,
     target_col: str,
     auxiliary_col: str,
-    ratio_calculation_function: Callable[[DataFrame], DataFrame],
+    ratio_calculation_function: Callable[[DataFrame], Iterable[RatioCalculationResult]],
     output_col: Optional[str] = "imputed",
     marker_col: Optional[str] = "imputation_marker",
     forward_link_col: Optional[str] = None,
@@ -58,103 +62,6 @@ def impute(
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
 ) -> DataFrame:
-    """
-    Perform Ratio of means (also known as Ratio of Sums) imputation on a
-    dataframe.
-
-    ###Arguments
-    * `input_df`: The input dataframe
-    * `reference_col`: The name of the column to reference a unique
-      contributor.
-    * `period_col`: The name of the column containing the period
-      information for the contributor.
-    * `strata_col`: The Name of the column containing the strata information
-      for the contributor.
-    * `target_col`: The name of the column containing the target
-      variable.
-    * `auxiliary_col`: The name of the column containing the auxiliary
-      variable.
-    * `output_col`: The name of the column which will contain the
-      output. Defaults to `imputed`.
-    * `marker_col`: The name of the column which will contain the marker
-      information for a given value. Defaults to `imputation_marker`.
-    * `forward_link_col`: If specified, the name of an existing column
-      containing forward ratio (or link) information. Defaults to None which
-      means that a default column name of `forward` will be created and the
-      forward ratios will be calculated.
-    * `backward_link_col`: If specified, the name of an existing column
-      containing backward ratio (or link) information. Defaults to None which
-      means that a default column name of `backward` will be created and the
-      backward ratios will be calculated.
-    * `construction_link_col`: If specified, the name of an existing column
-      containing construction ratio (or link) information. Defaults to None
-      which means that a default column name of `construction` will be created
-      and the construction ratios will be calculated.
-    * `count_construction_col`: If specified, the name of the column that will
-      hold the count of matched pairs for construction.
-      Defaults to 'count_construction'
-    * `count_forward_col`: If specified, the name of the column that will
-      hold the count of matched pairs for forward imputation.
-      Defaults to 'count_forward'
-    * `count_backward_col`: If specified, the name of the column that will
-      hold the count of matched pairs for forward imputation.
-      Defaults to 'count_forward'
-    * `back_data_df`: If specified, will use this to base the initial imputation
-      calculations on.
-    * `link_filter`: A filter compatible with the pyspark DataFrame.filter
-      method. Only responses that match the filter conditions will be included
-      in link calculations.
-      This will not prevent non responses from being imputed for.
-
-    ###Returns
-    A new dataframe containing:
-
-    * `reference_col`
-    * `period_col`
-    * `output_col`
-    * `marker_col`
-    * `forward_col`
-    * `backward_col`
-    * `construction_col`
-    * `construction_count_col`
-    * `forward_count_col`
-    * `backward_count_col`
-
-    No other columns are created. In particular, no other columns
-    will be passed through from the input since it is expected that the
-    information in the output dataframe will be sufficient to join on any
-    other required input data.
-
-    ###Notes
-    If no Imputation needs to take place, the forward, backward and
-    construction columns returned will still be calculated if they are not
-    passed in.
-
-    The existence of `output_col` and `marker_col` in the input data is
-    an error.
-
-    All or none of `forward_link_col`, `backward_link_col` and
-    `construction_link_col` must be specified.
-
-    `marker_col` will contain one of the marker constants defined in the
-    `Marker` enum.
-
-    This method implements rolling imputation, that is imputed values chain
-    together until either a return is present or the contributor is not present
-    in the sample. Values either side of such a gap do not interact (i.e.
-    ratios and imputes will not take into account values for a contributor
-    from before or after periods where they were dropped from the sample). In
-    the case of rolling imputation, the markers will be the same for chains of
-    imputed values.
-
-    If `back_data_df` is provided it must contain the following columns:
-        *`reference_col`
-        *`period_col`
-        *`strata_col`
-        *`auxiliary_col`
-        *`output_col`
-        *`marker_col`
-    """
     # --- Validate params ---
     link_cols = [forward_link_col, backward_link_col, construction_link_col]
     if any(link_cols) and not all(link_cols):
@@ -368,9 +275,12 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
 
         # Join the strata ratios onto the input such that each contributor has
         # a set of ratios.
-        return df.join(
-            ratio_calculation_function(working_df), ["period", "strata"], "leftouter"
-        ).fillna(1.0, ["forward", "backward", "construction"])
+        for result in ratio_calculation_function(working_df):
+            df = df.join(
+                result.data, result.columns,
+        )
+        if result.fill_columns:
+            df = df.fillna(1.0, result.fill_columns)
 
     # Caching for both imputed and unimputed data.
     imputed_df = None
diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 9e359f5e..309852cb 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -105,7 +105,7 @@ def impute(**kwargs) -> DataFrame:
         *`marker_col`
     """
 
-    def ratio_of_means(df: DataFrame) -> DataFrame:
+    def ratio_of_means(df: DataFrame) -> list[engine.RatioCalculationResult]:
         working_df = df.groupBy("period", "strata").agg(
             sum(col("output")),
             sum(col("other_output")),
@@ -151,7 +151,7 @@ def ratio_of_means(df: DataFrame) -> DataFrame:
 
         # Calculate backward ratio for each strata; reuse calculations from
         # above where applicable.
-        return forward_df.join(
+        returned = forward_df.join(
             forward_df.select(
                 col("period").alias("other_period"),
                 col("strata").alias("other_strata"),
@@ -177,6 +177,7 @@ def ratio_of_means(df: DataFrame) -> DataFrame:
             col("count_construction"),
             col("count_forward"),
         )
+        return [engine.RatioCalculationResult(data=returned_df, columns=["period", "strata"], fill_columns=["fforward", "backward", "construction"])]
 
     kwargs["ratio_calculation_function"] = ratio_of_means
 

From 120bd87bdde998a763e477d5ff1daa233c96e101 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 27 Feb 2023 13:44:00 +0000
Subject: [PATCH 071/531] Multiple fixes following ratio calculation multiple
 return refactor

---
 statistical_methods_library/imputation/engine.py         | 9 +++++----
 statistical_methods_library/imputation/ratio_of_means.py | 4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index e574aa52..d22f53c1 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -277,11 +277,12 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         # a set of ratios.
         for result in ratio_calculation_function(working_df):
             df = df.join(
-                result.data, result.columns,
-        )
-        if result.fill_columns:
-            df = df.fillna(1.0, result.fill_columns)
+                result.data, result.join_columns,
+            )
+            if result.fill_columns:
+                df = df.fillna(1.0, result.fill_columns)
 
+        return df
     # Caching for both imputed and unimputed data.
     imputed_df = None
     null_response_df = None
diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 309852cb..09061317 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -151,7 +151,7 @@ def ratio_of_means(df: DataFrame) -> list[engine.RatioCalculationResult]:
 
         # Calculate backward ratio for each strata; reuse calculations from
         # above where applicable.
-        returned = forward_df.join(
+        returned_df = forward_df.join(
             forward_df.select(
                 col("period").alias("other_period"),
                 col("strata").alias("other_strata"),
@@ -177,7 +177,7 @@ def ratio_of_means(df: DataFrame) -> list[engine.RatioCalculationResult]:
             col("count_construction"),
             col("count_forward"),
         )
-        return [engine.RatioCalculationResult(data=returned_df, columns=["period", "strata"], fill_columns=["fforward", "backward", "construction"])]
+        return [engine.RatioCalculationResult(data=returned_df, join_columns=["period", "strata"], fill_columns=["forward", "backward", "construction"])]
 
     kwargs["ratio_calculation_function"] = ratio_of_means
 

From 38298e26ae49ee24e7483a4f26034006c801c518 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 27 Feb 2023 14:59:52 +0000
Subject: [PATCH 072/531] Fix join type and move the fill na call out of the
 loop

---
 statistical_methods_library/imputation/engine.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index d22f53c1..fb03eb7c 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -275,12 +275,16 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
 
         # Join the strata ratios onto the input such that each contributor has
         # a set of ratios.
+        all_fill_cols = []
         for result in ratio_calculation_function(working_df):
             df = df.join(
-                result.data, result.join_columns,
+                result.data, result.join_columns, "left outer"
             )
             if result.fill_columns:
-                df = df.fillna(1.0, result.fill_columns)
+                all_fill_cols += result.fill_columns
+
+        if all_fill_cols:
+            df.fillna(1.0, all_fill_cols)
 
         return df
     # Caching for both imputed and unimputed data.

From e67c06e1db53f55ef97d669d155d498df107de5d Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 27 Feb 2023 15:01:19 +0000
Subject: [PATCH 073/531] Fix join type name

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index fb03eb7c..df4b31cb 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -278,7 +278,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         all_fill_cols = []
         for result in ratio_calculation_function(working_df):
             df = df.join(
-                result.data, result.join_columns, "left outer"
+                result.data, result.join_columns, "left"
             )
             if result.fill_columns:
                 all_fill_cols += result.fill_columns

From aa11be9b861fb05d65381ca8bf841adb975d9e0d Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 27 Feb 2023 15:05:28 +0000
Subject: [PATCH 074/531] Actually assign the filled data frame to be returned

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index df4b31cb..2ca3c71d 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -284,7 +284,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
                 all_fill_cols += result.fill_columns
 
         if all_fill_cols:
-            df.fillna(1.0, all_fill_cols)
+            df = df.fillna(1.0, all_fill_cols)
 
         return df
     # Caching for both imputed and unimputed data.

From 0e5e0f9a0300e0e3de232e05ffd108645ffc57c7 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Mon, 27 Feb 2023 15:17:54 +0000
Subject: [PATCH 075/531] Update winsorisation.py

---
 statistical_methods_library/outliering/winsorisation.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index 60a1db54..bba657f8 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -104,12 +104,15 @@ def outlier(
         "grouping": grouping_col,
         "target": target_col,
         "design": design_col,
+    }
+    
+    optional_params = {
         "l_value": l_value_col,
         "calibration": calibration_col,
         "auxiliary": auxiliary_col,
     }
 
-    expected_columns = {k: v for k, v in input_params.items() if v is not None}
+    input_params.update({k: v for k, v in optional_params.items() if v is not None})
 
     type_mapping = {
         "reference": StringType,

From 61cb74de282d1508533beceef8e7b22a4627e3f2 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 27 Feb 2023 15:26:55 +0000
Subject: [PATCH 076/531] Fix that was implemented in Estimation also mirrored
 for Winsorisation

---
 .../outliering/winsorisation.py               |  2 +-
 tests/outliering/test_winsorisation.py        | 30 ++++++++++++++++---
 2 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index bba657f8..5c1582df 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -126,7 +126,7 @@ def outlier(
     }
 
     aliased_df = validation.validate_dataframe(
-        input_df, expected_columns, type_mapping, ["reference", "period"]
+        input_df, input_params, type_mapping, ["reference", "period"]
     )
     validation.validate_one_value_per_group(
         input_df, [period_col, grouping_col], l_value_col
diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index d39e556a..8006d27e 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -129,11 +129,33 @@ def test_params_not_string(fxt_load_test_csv):
         winsorisation.outlier(test_dataframe, *bad_params)
 
 
-# --- Test if params null  ---
+# --- Test if params none ---
 
 
 @pytest.mark.dependency()
-def test_params_null(fxt_load_test_csv):
+def test_params_none(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "outliering",
+        "winsorisation",
+        "unit",
+        "basic_functionality",
+    )
+    bad_params = (
+        reference_col,
+        period_col,
+        grouping_col,
+        None,
+        design_weight_col,
+        l_value_col,
+        outlier_weight_col,
+    )
+    with pytest.raises(TypeError):
+        winsorisation.outlier(test_dataframe, *bad_params)
+
+@pytest.mark.dependency()
+def test_params_empty_string(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
         dataframe_columns,
         dataframe_types,
@@ -154,7 +176,6 @@ def test_params_null(fxt_load_test_csv):
     with pytest.raises(ValueError):
         winsorisation.outlier(test_dataframe, *bad_params)
 
-
 # --- Test validation fail if mismatched calibration cols  ---
 
 
@@ -290,7 +311,8 @@ def test_incorrect_column_types(fxt_load_test_csv):
     depends=[
         "test_input_not_a_dataframe",
         "test_params_not_string",
-        "test_params_null",
+        "test_params_none",
+        "test_params_empty_string"
         "test_dataframe_nulls_in_data",
         "test_dataframe_column_missing",
         "test_params_mismatched_calibration_cols",

From 73ead6c9b8d73d1d6da1024e8658f0932d6ce9bc Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 27 Feb 2023 15:27:43 +0000
Subject: [PATCH 077/531] Black

---
 statistical_methods_library/outliering/winsorisation.py | 2 +-
 tests/outliering/test_winsorisation.py                  | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index 5c1582df..e14bbbe2 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -105,7 +105,7 @@ def outlier(
         "target": target_col,
         "design": design_col,
     }
-    
+
     optional_params = {
         "l_value": l_value_col,
         "calibration": calibration_col,
diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index 8006d27e..28b90c3c 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -154,6 +154,7 @@ def test_params_none(fxt_load_test_csv):
     with pytest.raises(TypeError):
         winsorisation.outlier(test_dataframe, *bad_params)
 
+
 @pytest.mark.dependency()
 def test_params_empty_string(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -176,6 +177,7 @@ def test_params_empty_string(fxt_load_test_csv):
     with pytest.raises(ValueError):
         winsorisation.outlier(test_dataframe, *bad_params)
 
+
 # --- Test validation fail if mismatched calibration cols  ---
 
 
@@ -312,8 +314,7 @@ def test_incorrect_column_types(fxt_load_test_csv):
         "test_input_not_a_dataframe",
         "test_params_not_string",
         "test_params_none",
-        "test_params_empty_string"
-        "test_dataframe_nulls_in_data",
+        "test_params_empty_string" "test_dataframe_nulls_in_data",
         "test_dataframe_column_missing",
         "test_params_mismatched_calibration_cols",
         "test_dataframe_returned_as_expected",

From 15e6033535750709e64533631310c2d62b82ed58 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 27 Feb 2023 15:34:16 +0000
Subject: [PATCH 078/531] Ran Linting

---
 statistical_methods_library/imputation/engine.py         | 7 ++++---
 statistical_methods_library/imputation/ratio_of_means.py | 8 +++++++-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 2ca3c71d..ada0fcbd 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -16,6 +16,7 @@
 
 # --- Marker constants ---
 
+
 class Marker(Enum):
     """Values for the marker column created during imputation."""
 
@@ -35,6 +36,7 @@ class Marker(Enum):
     FORWARD_IMPUTE_FROM_CONSTRUCTION = "FIC"
     """The value has been forward imputed from a constructed value."""
 
+
 @dataclass
 class RatioCalculationResult:
     data: DataFrame
@@ -277,9 +279,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         # a set of ratios.
         all_fill_cols = []
         for result in ratio_calculation_function(working_df):
-            df = df.join(
-                result.data, result.join_columns, "left"
-            )
+            df = df.join(result.data, result.join_columns, "left")
             if result.fill_columns:
                 all_fill_cols += result.fill_columns
 
@@ -287,6 +287,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             df = df.fillna(1.0, all_fill_cols)
 
         return df
+
     # Caching for both imputed and unimputed data.
     imputed_df = None
     null_response_df = None
diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 09061317..4d5dc390 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -177,7 +177,13 @@ def ratio_of_means(df: DataFrame) -> list[engine.RatioCalculationResult]:
             col("count_construction"),
             col("count_forward"),
         )
-        return [engine.RatioCalculationResult(data=returned_df, join_columns=["period", "strata"], fill_columns=["forward", "backward", "construction"])]
+        return [
+            engine.RatioCalculationResult(
+                data=returned_df,
+                join_columns=["period", "strata"],
+                fill_columns=["forward", "backward", "construction"],
+            )
+        ]
 
     kwargs["ratio_calculation_function"] = ratio_of_means
 

From 60a891fb368b08e3645ca4d7f50ec440b5150dca Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Mon, 27 Feb 2023 15:35:57 +0000
Subject: [PATCH 079/531] Missing Comma in dependancy list

---
 tests/outliering/test_winsorisation.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index 28b90c3c..7d481f4c 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -314,7 +314,8 @@ def test_incorrect_column_types(fxt_load_test_csv):
         "test_input_not_a_dataframe",
         "test_params_not_string",
         "test_params_none",
-        "test_params_empty_string" "test_dataframe_nulls_in_data",
+        "test_params_empty_string",
+        "test_dataframe_nulls_in_data",
         "test_dataframe_column_missing",
         "test_params_mismatched_calibration_cols",
         "test_dataframe_returned_as_expected",

From 8e9bd36484f0b963912583cca2d2b192c5e2f407 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 27 Feb 2023 15:48:49 +0000
Subject: [PATCH 080/531] Temporarily disable tap output to see why github is
 failing to run tests

---
 .github/workflows/ci-checks.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 6e46f261..0aee8893 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -54,7 +54,7 @@ jobs:
       - name: Install dependencies
         run: poetry install
       - name: test
-        run: poetry run pytest --tap-stream --cov-report=html --junitxml=junit.xml
+        run: poetry run pytest --cov-report=html --junitxml=junit.xml
       - name: Upload Test report
         uses: dorny/test-reporter@v1
         if: success() || failure()

From 1da6ba2f94b8a3490cf17f2c951d219aa1c9f736 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 27 Feb 2023 16:03:16 +0000
Subject: [PATCH 081/531] Prior to Python 3.9 cannot just use list

---
 statistical_methods_library/imputation/engine.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index ada0fcbd..f054a55b 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -6,7 +6,7 @@
 """
 from dataclasses import dataclass
 from enum import Enum
-from typing import Callable, Iterable, Optional, Union
+from typing import Callable, List, Iterable, Optional, Union
 
 from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, lit, when
@@ -40,8 +40,8 @@ class Marker(Enum):
 @dataclass
 class RatioCalculationResult:
     data: DataFrame
-    join_columns: list[Union[str, Column]]
-    fill_columns: list[Union[str, Column]] = None
+    join_columns: List[Union[str, Column]]
+    fill_columns: List[Union[str, Column]] = None
 
 
 def impute(

From ad12462055ad4d432ad92b6d93aa5ca4bd1082b4 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 27 Feb 2023 16:09:29 +0000
Subject: [PATCH 082/531] Other List Usage

---
 statistical_methods_library/imputation/ratio_of_means.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 4d5dc390..e69177e1 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -2,6 +2,7 @@
 
 from pyspark.sql import DataFrame
 from pyspark.sql.functions import col, count, sum, when
+from typing import List
 
 from . import engine
 
@@ -180,8 +181,8 @@ def ratio_of_means(df: DataFrame) -> list[engine.RatioCalculationResult]:
         return [
             engine.RatioCalculationResult(
                 data=returned_df,
-                join_columns=["period", "strata"],
-                fill_columns=["forward", "backward", "construction"],
+                join_columns=List["period", "strata"],
+                fill_columns=List["forward", "backward", "construction"],
             )
         ]
 

From 71ac6d69d0cc358d703c2eb32e2d9e950a301909 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 27 Feb 2023 16:15:51 +0000
Subject: [PATCH 083/531] List change.

---
 statistical_methods_library/imputation/ratio_of_means.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index e69177e1..971a60ab 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -106,7 +106,7 @@ def impute(**kwargs) -> DataFrame:
         *`marker_col`
     """
 
-    def ratio_of_means(df: DataFrame) -> list[engine.RatioCalculationResult]:
+    def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
         working_df = df.groupBy("period", "strata").agg(
             sum(col("output")),
             sum(col("other_output")),
@@ -181,8 +181,8 @@ def ratio_of_means(df: DataFrame) -> list[engine.RatioCalculationResult]:
         return [
             engine.RatioCalculationResult(
                 data=returned_df,
-                join_columns=List["period", "strata"],
-                fill_columns=List["forward", "backward", "construction"],
+                join_columns=["period", "strata"],
+                fill_columns=["forward", "backward", "construction"],
             )
         ]
 

From cec67907c6cec25c0855e04596b2125632f7194c Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 27 Feb 2023 16:36:36 +0000
Subject: [PATCH 084/531] ISORT and inital release notes

---
 docs/release-notes/11.0.0.md                  | 28 +++++++++++++++++++
 .../imputation/engine.py                      |  2 +-
 .../imputation/ratio_of_means.py              |  3 +-
 3 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 docs/release-notes/11.0.0.md

diff --git a/docs/release-notes/11.0.0.md b/docs/release-notes/11.0.0.md
new file mode 100644
index 00000000..c0713728
--- /dev/null
+++ b/docs/release-notes/11.0.0.md
@@ -0,0 +1,28 @@
+# Statistical Methods Library 11.0.0
+
+Release date: 2023-02-28
+
+## Synopsis
+
+For Ratio of Means, HT Estimation and Winsorisation it was possible to pass in
+a None value for the target column in these methods and it would not be caught
+by the validation. This has been corrected.
+
+In preparation for new functionality the Ratio of Means imputation method has
+been split into a reusable engine component and a specific feature element.
+
+## Changes
+
+In the Ratio of Means imputation method, when calling the method it will no
+longer accept positional arguments.
+All arguments passed my be keyword arguments.
+
+## Notes
+
+Due to the keyword argument change, users who did not use keywork arguments
+when calling this method will find that they will not be able to update to this
+new version cleanly. Users who already used keyword arguments will have no ill
+effects from updating.
+
+As this is an API change for the Ratio of Means method this release is a major
+version change.
diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index f054a55b..b0658222 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -6,7 +6,7 @@
 """
 from dataclasses import dataclass
 from enum import Enum
-from typing import Callable, List, Iterable, Optional, Union
+from typing import Callable, Iterable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, lit, when
diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 971a60ab..6c7a3693 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -1,8 +1,9 @@
 # For Copyright information, please see LICENCE.
 
+from typing import List
+
 from pyspark.sql import DataFrame
 from pyspark.sql.functions import col, count, sum, when
-from typing import List
 
 from . import engine
 

From 23b703c04447e8ecedd9d1b0af84b39e78b6c520 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 27 Feb 2023 16:38:46 +0000
Subject: [PATCH 085/531] Reactivate Tap

---
 .github/workflows/ci-checks.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 0aee8893..6e46f261 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -54,7 +54,7 @@ jobs:
       - name: Install dependencies
         run: poetry install
       - name: test
-        run: poetry run pytest --cov-report=html --junitxml=junit.xml
+        run: poetry run pytest --tap-stream --cov-report=html --junitxml=junit.xml
       - name: Upload Test report
         uses: dorny/test-reporter@v1
         if: success() || failure()

From 884d9efae8877a6388b9f3770e68802b6d33ffd1 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 28 Feb 2023 12:56:22 +0000
Subject: [PATCH 086/531] Edit release notes

---
 docs/release-notes/11.0.0.md | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/docs/release-notes/11.0.0.md b/docs/release-notes/11.0.0.md
index c0713728..d7381db7 100644
--- a/docs/release-notes/11.0.0.md
+++ b/docs/release-notes/11.0.0.md
@@ -4,25 +4,21 @@ Release date: 2023-02-28
 
 ## Synopsis
 
-For Ratio of Means, HT Estimation and Winsorisation it was possible to pass in
-a None value for the target column in these methods and it would not be caught
-by the validation. This has been corrected.
-
-In preparation for new functionality the Ratio of Means imputation method has
-been split into a reusable engine component and a specific feature element.
+Split out imputation engine, correct parameter validation and switch to
+keyword only arguments for Ratio of Means Imputation.
 
 ## Changes
 
-In the Ratio of Means imputation method, when calling the method it will no
-longer accept positional arguments.
-All arguments passed my be keyword arguments.
+Ratio of Means imputation now only accepts keyword arguments. In addition,
+the imputation engine has been moved into a separate module to allow the
+ratio calculation function to be specified.
 
-## Notes
+This release also makes parameter validation for all methods compliant with
+the documentation. In particular, None was previously permitted as a value
+for a required column name which then caused code relying on the value to
+fail. This now raises an error as expected.
 
-Due to the keyword argument change, users who did not use keywork arguments
-when calling this method will find that they will not be able to update to this
-new version cleanly. Users who already used keyword arguments will have no ill
-effects from updating.
+## Notes
 
-As this is an API change for the Ratio of Means method this release is a major
-version change.
+All the arguments to Ratio of Means have the same meaning as in the previous
+release. In addition, this release does not introduce any output changes.

From fa49943c1e8b2421326e2fe1889aa968229fd14e Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 12:10:59 +0000
Subject: [PATCH 087/531] Strata -> Grouping

---
 .../imputation/engine.py                      | 36 +++++++++----------
 .../imputation/ratio_of_means.py              | 20 +++++------
 tests/imputation/test_ratio_of_means.py       | 18 +++++-----
 3 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index b0658222..93fd8442 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -49,7 +49,7 @@ def impute(
     input_df: DataFrame,
     reference_col: str,
     period_col: str,
-    strata_col: str,
+    grouping_col: str,
     target_col: str,
     auxiliary_col: str,
     ratio_calculation_function: Callable[[DataFrame], Iterable[RatioCalculationResult]],
@@ -72,7 +72,7 @@ def impute(
     input_params = {
         "ref": reference_col,
         "period": period_col,
-        "strata": strata_col,
+        "grouping": grouping_col,
         "target": target_col,
         "aux": auxiliary_col,
     }
@@ -109,7 +109,7 @@ def impute(
     back_expected_columns = {
         "ref": reference_col,
         "period": period_col,
-        "strata": strata_col,
+        "grouping": grouping_col,
         "aux": auxiliary_col,
         "output": output_col,
         "marker": marker_col,
@@ -118,7 +118,7 @@ def impute(
     type_mapping = {
         "ref": StringType,
         "period": StringType,
-        "strata": StringType,
+        "grouping": StringType,
         "target": DecimalType,
         "aux": DecimalType,
         "output": DecimalType,
@@ -238,7 +238,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             return df
 
         # Since we're going to join on to the main df at the end filtering here
-        # won't cause us to lose strata as they'll just be filled with
+        # won't cause us to lose grouping as they'll just be filled with
         # default ratios.
         if link_filter:
             filtered_df = df.join(filtered_refs, ["ref", "period"])
@@ -247,7 +247,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         filtered_df = filtered_df.filter(~df.output.isNull()).select(
             "ref",
             "period",
-            "strata",
+            "grouping",
             "output",
             "aux",
             "previous_period",
@@ -258,15 +258,15 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         # contributor on the same row.
         working_df = filtered_df.alias("current")
         working_df = working_df.join(
-            filtered_df.select("ref", "period", "output", "strata").alias("prev"),
+            filtered_df.select("ref", "period", "output", "grouping").alias("prev"),
             [
                 col("current.ref") == col("prev.ref"),
                 col("current.previous_period") == col("prev.period"),
-                col("current.strata") == col("prev.strata"),
+                col("current.grouping") == col("prev.grouping"),
             ],
             "leftouter",
         ).select(
-            col("current.strata").alias("strata"),
+            col("current.grouping").alias("grouping"),
             col("current.period").alias("period"),
             when(~col("prev.output").isNull(), col("current.output")).alias("output"),
             col("current.aux").alias("aux"),
@@ -275,7 +275,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             col("current.next_period").alias("next_period"),
         )
 
-        # Join the strata ratios onto the input such that each contributor has
+        # Join the grouping ratios onto the input such that each contributor has
         # a set of ratios.
         all_fill_cols = []
         for result in ratio_calculation_function(working_df):
@@ -309,7 +309,7 @@ def impute_helper(
             working_df = df.select(
                 "ref",
                 "period",
-                "strata",
+                "grouping",
                 "output",
                 "marker",
                 "previous_period",
@@ -342,7 +342,7 @@ def impute_helper(
                 "ref AS other_ref",
                 "period AS other_period",
                 "output AS other_output",
-                "strata AS other_strata",
+                "grouping AS other_grouping",
             )
             calculation_df = (
                 null_response_df.join(
@@ -350,13 +350,13 @@ def impute_helper(
                     [
                         col(other_period_col) == col("other_period"),
                         col("ref") == col("other_ref"),
-                        col("strata") == col("other_strata"),
+                        col("grouping") == col("other_grouping"),
                     ],
                 )
                 .select(
                     "ref",
                     "period",
-                    "strata",
+                    "grouping",
                     (col(link_col) * col("other_output")).alias("output"),
                     lit(marker.value).alias("marker"),
                     "previous_period",
@@ -418,16 +418,16 @@ def construct_values(df: DataFrame) -> DataFrame:
             allowMissingColumns=True,
         )
         construction_df = df.filter(df.output.isNull()).select(
-            "ref", "period", "strata", "aux", "construction", "previous_period"
+            "ref", "period", "grouping", "aux", "construction", "previous_period"
         )
-        other_df = df.select("ref", "period", "strata").alias("other")
+        other_df = df.select("ref", "period", "grouping").alias("other")
         construction_df = construction_df.alias("construction")
         construction_df = construction_df.join(
             other_df,
             [
                 col("construction.ref") == col("other.ref"),
                 col("construction.previous_period") == col("other.period"),
-                col("construction.strata") == col("other.strata"),
+                col("construction.grouping") == col("other.grouping"),
             ],
             "leftanti",
         ).select(
@@ -471,7 +471,7 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
     # --- Utility functions ---
     def create_output(df: DataFrame) -> DataFrame:
         del full_col_mapping["aux"]
-        del full_col_mapping["strata"]
+        del full_col_mapping["grouping"]
         return select_cols(
             df.filter(col("period") != lit(prior_period)), reversed=False
         ).withColumnRenamed("output", output_col)
diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 6c7a3693..11e305d0 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -19,7 +19,7 @@ def impute(**kwargs) -> DataFrame:
       contributor.
     * `period_col`: The name of the column containing the period
       information for the contributor.
-    * `strata_col`: The Name of the column containing the strata information
+    * `grouping_col`: The Name of the column containing the grouping information
       for the contributor.
     * `target_col`: The name of the column containing the target
       variable.
@@ -101,14 +101,14 @@ def impute(**kwargs) -> DataFrame:
     If `back_data_df` is provided it must contain the following columns:
         *`reference_col`
         *`period_col`
-        *`strata_col`
+        *`grouping_col`
         *`auxiliary_col`
         *`output_col`
         *`marker_col`
     """
 
     def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        working_df = df.groupBy("period", "strata").agg(
+        working_df = df.groupBy("period", "grouping").agg(
             sum(col("output")),
             sum(col("other_output")),
             sum(col("aux")),
@@ -146,29 +146,29 @@ def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
                 .cast("long"),
             )
             .join(
-                df.select("period", "strata", "next_period").distinct(),
-                ["period", "strata"],
+                df.select("period", "grouping", "next_period").distinct(),
+                ["period", "grouping"],
             )
         )
 
-        # Calculate backward ratio for each strata; reuse calculations from
+        # Calculate backward ratio for each grouping; reuse calculations from
         # above where applicable.
         returned_df = forward_df.join(
             forward_df.select(
                 col("period").alias("other_period"),
-                col("strata").alias("other_strata"),
+                col("grouping").alias("other_grouping"),
                 col("sum(other_output)").alias("sum_output"),
                 col("sum(output)").alias("sum_other_output"),
                 col("count(output)").alias("count_output"),
             ),
             [
                 col("next_period") == col("other_period"),
-                col("strata") == col("other_strata"),
+                col("grouping") == col("other_grouping"),
             ],
             "leftouter",
         ).select(
             col("period"),
-            col("strata"),
+            col("grouping"),
             col("forward"),
             (col("sum_output") / col("sum_other_output")).alias("backward"),
             when(col("sum_other_output") == 0, 0)
@@ -182,7 +182,7 @@ def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
         return [
             engine.RatioCalculationResult(
                 data=returned_df,
-                join_columns=["period", "strata"],
+                join_columns=["period", "grouping"],
                 fill_columns=["forward", "backward", "construction"],
             )
         ]
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 696972e3..87229bbb 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -17,7 +17,7 @@
 output_col = "output"
 period_col = "date"
 reference_col = "identifier"
-strata_col = "group"
+grouping_col = "group"
 target_col = "question"
 construction_col = "construction"
 count_forward_col = "count_forward"
@@ -29,7 +29,7 @@
 
 reference_type = StringType()
 period_type = StringType()
-strata_type = StringType()
+grouping_type = StringType()
 target_type = decimal_type
 auxiliary_type = decimal_type
 min_accuracy = decimal_type
@@ -47,7 +47,7 @@
 dataframe_columns = (
     reference_col,
     period_col,
-    strata_col,
+    grouping_col,
     target_col,
     auxiliary_col,
     output_col,
@@ -64,7 +64,7 @@
 dataframe_types = {
     reference_col: reference_type,
     period_col: period_type,
-    strata_col: strata_type,
+    grouping_col: grouping_type,
     target_col: target_type,
     auxiliary_col: auxiliary_type,
     output_col: min_accuracy,
@@ -85,7 +85,7 @@
 params = {
     "reference_col": reference_col,
     "period_col": period_col,
-    "strata_col": strata_col,
+    "grouping_col": grouping_col,
     "target_col": target_col,
     "auxiliary_col": auxiliary_col,
     "output_col": output_col,
@@ -161,7 +161,7 @@ def test_dataframe_column_missing(fxt_load_test_csv):
         "unit",
         "basic_functionality",
     )
-    bad_dataframe = test_dataframe.drop(strata_col)
+    bad_dataframe = test_dataframe.drop(grouping_col)
     with pytest.raises(ValidationError):
         ratio_of_means.impute(input_df=bad_dataframe, **params)
 
@@ -350,7 +350,7 @@ def test_back_data_without_output_is_invalid(fxt_load_test_csv, fxt_spark_sessio
         "basic_functionality",
     )
     bad_back_data = fxt_load_test_csv(
-        [reference_col, period_col, strata_col, target_col, marker_col, auxiliary_col],
+        [reference_col, period_col, grouping_col, target_col, marker_col, auxiliary_col],
         dataframe_types,
         "imputation",
         "ratio_of_means",
@@ -555,11 +555,11 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
             "leftanti",
         ).drop("min(" + period_col + ")")
 
-    # We need to drop our strata and auxiliary columns from our output now
+    # We need to drop our grouping and auxiliary columns from our output now
     # we've potentially set up our back data as these must not come out of
     # imputation.
     scenario_expected_output = scenario_expected_output.drop(
-        strata_col,
+        grouping_col,
         auxiliary_col,
     )
     scenario_actual_output = ratio_of_means.impute(

From 751c82ce71ad380b1709caabc1ca471b1562bb4a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 12:19:14 +0000
Subject: [PATCH 088/531] Construction Link

---
 .../imputation/mean_of_ratios.py              | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 statistical_methods_library/imputation/mean_of_ratios.py

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
new file mode 100644
index 00000000..f5fd409e
--- /dev/null
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -0,0 +1,50 @@
+# For Copyright information, please see LICENCE.
+
+from typing import List
+
+from pyspark.sql import DataFrame
+from pyspark.sql.functions import col, count, sum, when
+
+from . import engine
+
+
+def impute(**kwargs) -> DataFrame:
+
+    def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
+
+        # Calculate the construction links as a ratio of means between the returned values and the auxiliary value
+        working_df = df.groupBy("period", "grouping").agg(
+            sum(col("aux")),
+            sum(col("output_for_construction")),
+            count(col("output_for_construction")),
+        )
+
+        construction_df = (
+            working_df.withColumn(
+                "construction", col("sum(output_for_construction)") / col("sum(aux)")
+            )
+            .withColumn(
+                "count_construction",
+                when(col("sum(aux)") == 0, 0)
+                .when(
+                    col("sum(aux)").isNotNull(), col("count(output_for_construction)")
+                )
+                .cast("long"),
+            )
+            .join(
+                df.select("period", "grouping").distinct(),
+                ["period", "grouping"],
+            )
+        )
+
+        return [
+            engine.RatioCalculationResult(
+                data=returned_df,
+                join_columns=["period", "grouping"],
+                fill_columns=["forward", "backward", "construction"],
+            )
+        ]
+
+    kwargs["ratio_calculation_function"] = mean_of_ratios
+
+    return engine.impute(**kwargs)

From e45d68bd7a211d7b71e823dc00d59851d167e66a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 12:24:13 +0000
Subject: [PATCH 089/531] Put together.

---
 statistical_methods_library/imputation/mean_of_ratios.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index f5fd409e..c18444c0 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -13,14 +13,12 @@ def impute(**kwargs) -> DataFrame:
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
 
         # Calculate the construction links as a ratio of means between the returned values and the auxiliary value
-        working_df = df.groupBy("period", "grouping").agg(
+        construction_df = (
+            df.groupBy("period", "grouping").agg(
             sum(col("aux")),
             sum(col("output_for_construction")),
             count(col("output_for_construction")),
-        )
-
-        construction_df = (
-            working_df.withColumn(
+            ).withColumn(
                 "construction", col("sum(output_for_construction)") / col("sum(aux)")
             )
             .withColumn(

From e814024a0fda5c9cb0c0f81e42043da9eb506a0f Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 12:32:22 +0000
Subject: [PATCH 090/531] Initial Growth Ratio

---
 .../imputation/mean_of_ratios.py              | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index c18444c0..30020e19 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -11,6 +11,27 @@
 def impute(**kwargs) -> DataFrame:
 
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
+        working_df = df.withColumn(
+            "growth_ratio_forward",
+            col("output")/col("other_output")
+            ).join(
+            df.select(
+                col("period").alias("other_period"),
+                col("grouping").alias("other_grouping"),
+                col("other_output").alias("reverse_output"),
+                col("output").alias("reverse_other_output"),
+            ),
+            [
+                col("next_period") == col("other_period"),
+                col("grouping") == col("other_grouping"),
+            ],
+            "leftouter",
+        ).select(
+            col("period"),
+            col("grouping"),
+            col("growth_ratio_forward"),
+            (col("reverse_output") / col("reverse_other_output")).alias("growth_ratio_backward"),
+        )
 
         # Calculate the construction links as a ratio of means between the returned values and the auxiliary value
         construction_df = (

From f5bb53b77f25159c68059480a9e65c2735645d6e Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 12:37:03 +0000
Subject: [PATCH 091/531] Must pass the reference through for mean od ratios

---
 statistical_methods_library/imputation/engine.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 93fd8442..eced7f66 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -266,6 +266,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             ],
             "leftouter",
         ).select(
+            col("current.ref").alias("ref"),
             col("current.grouping").alias("grouping"),
             col("current.period").alias("period"),
             when(~col("prev.output").isNull(), col("current.output")).alias("output"),

From d4d829e28588fbdc47dcee17ff53487f3b0b2887 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 13:06:45 +0000
Subject: [PATCH 092/531] Streamlining Engine.

---
 .../imputation/engine.py                      | 23 ++++++++++++-------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index eced7f66..45b9f2f1 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -258,22 +258,29 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         # contributor on the same row.
         working_df = filtered_df.alias("current")
         working_df = working_df.join(
-            filtered_df.select("ref", "period", "output", "grouping").alias("prev"),
+            filtered_df.select("ref", "period", "output", "grouping").alias("previous"),
             [
-                col("current.ref") == col("prev.ref"),
-                col("current.previous_period") == col("prev.period"),
-                col("current.grouping") == col("prev.grouping"),
+                col("current.ref") == col("previous.ref"),
+                col("current.previous_period") == col("previous.period"),
+                col("current.grouping") == col("previous.grouping"),
+            ],
+            "leftouter",
+        ).join(
+            filtered_df.select("ref", "period", "output", "grouping").alias("next"),
+            [
+                col("current.ref") == col("next.ref"),
+                col("current.next_period") == col("next.period"),
+                col("current.grouping") == col("next.grouping"),
             ],
             "leftouter",
         ).select(
             col("current.ref").alias("ref"),
             col("current.grouping").alias("grouping"),
             col("current.period").alias("period"),
-            when(~col("prev.output").isNull(), col("current.output")).alias("output"),
             col("current.aux").alias("aux"),
-            col("prev.output").alias("other_output"),
-            col("current.output").alias("output_for_construction"),
-            col("current.next_period").alias("next_period"),
+            col("current.output"),
+            col("next.output"),
+            col("previous.output"),
         )
 
         # Join the grouping ratios onto the input such that each contributor has

From 3216d009d17aad10e583c694bdfaa68ad0ff526d Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 13:22:39 +0000
Subject: [PATCH 093/531] Updated Ratio of Means to match engine changes.

---
 .../imputation/ratio_of_means.py              | 80 +++----------------
 1 file changed, 10 insertions(+), 70 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 11e305d0..a4af2b8e 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -108,77 +108,17 @@ def impute(**kwargs) -> DataFrame:
     """
 
     def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        working_df = df.groupBy("period", "grouping").agg(
-            sum(col("output")),
-            sum(col("other_output")),
-            sum(col("aux")),
-            sum(col("output_for_construction")),
-            count(col("output_for_construction")),
-            count(col("other_output")),
-            count(col("output")),
-        )
-
-        # Calculate the forward ratio for every period using 1 as the link in
-        # the case of a 0 denominator. We also calculate construction
-        # links at the same time for efficiency reasons. This shares
-        # the same behaviour of defaulting to a 1 in the case of a 0
-        # denominator.
-
-        forward_df = (
-            working_df.withColumn(
-                "forward", col("sum(output)") / col("sum(other_output)")
+        returned_df = df.groupBy("period", "grouping").selectExpr(
+            "period",
+            "grouping",
+            "sum(CASE WHEN previous.output IS NOT NULL THEN current.output)/sum(previous.output END) AS forward",
+            "sum(CASE WHEN next.output IS NOT NULL THEN current.output)/sum(next.output END) AS backward",
+            "sum(current.output)/sum(aux) AS construction",
+            "sum(CASE WHEN previous.output IS NOT NULL THEN 1 END) AS count_forward",
+            "sum(CASE WHEN next.output IS NOT NULL THEN 1 END) AS count_backward",
+            "count(current.output) AS count_construction",
             )
-            .withColumn(
-                "count_forward",
-                when(col("sum(other_output)") == 0, 0)
-                .when(col("sum(other_output)").isNotNull(), col("count(other_output)"))
-                .cast("long"),
-            )
-            .withColumn(
-                "construction", col("sum(output_for_construction)") / col("sum(aux)")
-            )
-            .withColumn(
-                "count_construction",
-                when(col("sum(aux)") == 0, 0)
-                .when(
-                    col("sum(aux)").isNotNull(), col("count(output_for_construction)")
-                )
-                .cast("long"),
-            )
-            .join(
-                df.select("period", "grouping", "next_period").distinct(),
-                ["period", "grouping"],
-            )
-        )
-
-        # Calculate backward ratio for each grouping; reuse calculations from
-        # above where applicable.
-        returned_df = forward_df.join(
-            forward_df.select(
-                col("period").alias("other_period"),
-                col("grouping").alias("other_grouping"),
-                col("sum(other_output)").alias("sum_output"),
-                col("sum(output)").alias("sum_other_output"),
-                col("count(output)").alias("count_output"),
-            ),
-            [
-                col("next_period") == col("other_period"),
-                col("grouping") == col("other_grouping"),
-            ],
-            "leftouter",
-        ).select(
-            col("period"),
-            col("grouping"),
-            col("forward"),
-            (col("sum_output") / col("sum_other_output")).alias("backward"),
-            when(col("sum_other_output") == 0, 0)
-            .when(col("sum_other_output").isNotNull(), col("count_output"))
-            .cast("long")
-            .alias("count_backward"),
-            col("construction"),
-            col("count_construction"),
-            col("count_forward"),
-        )
+
         return [
             engine.RatioCalculationResult(
                 data=returned_df,

From 0ffe2eedda451e0236857b404c9a11c7db245ff0 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 13:26:29 +0000
Subject: [PATCH 094/531] End in wrong place.

---
 statistical_methods_library/imputation/ratio_of_means.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index a4af2b8e..80644cff 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -108,16 +108,16 @@ def impute(**kwargs) -> DataFrame:
     """
 
     def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        returned_df = df.groupBy("period", "grouping").selectExpr(
+        returned_df = df.selectExpr(
             "period",
             "grouping",
-            "sum(CASE WHEN previous.output IS NOT NULL THEN current.output)/sum(previous.output END) AS forward",
-            "sum(CASE WHEN next.output IS NOT NULL THEN current.output)/sum(next.output END) AS backward",
+            "sum(CASE WHEN previous.output IS NOT NULL THEN current.output END)/sum(previous.output) AS forward",
+            "sum(CASE WHEN next.output IS NOT NULL THEN current.output END)/sum(next.output) AS backward",
             "sum(current.output)/sum(aux) AS construction",
             "sum(CASE WHEN previous.output IS NOT NULL THEN 1 END) AS count_forward",
             "sum(CASE WHEN next.output IS NOT NULL THEN 1 END) AS count_backward",
             "count(current.output) AS count_construction",
-            )
+            ).groupBy("period", "grouping")
 
         return [
             engine.RatioCalculationResult(

From f06767995ac900f57f2e139dc467d13e8bbba14b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 1 Mar 2023 14:13:01 +0000
Subject: [PATCH 095/531] Rewrite ratio of means calculation

---
 .../imputation/ratio_of_means.py              | 59 +++++++++++++++----
 1 file changed, 46 insertions(+), 13 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 80644cff..31c82cc7 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -3,7 +3,7 @@
 from typing import List
 
 from pyspark.sql import DataFrame
-from pyspark.sql.functions import col, count, sum, when
+from pyspark.sql.functions import expr
 
 from . import engine
 
@@ -108,20 +108,53 @@ def impute(**kwargs) -> DataFrame:
     """
 
     def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        returned_df = df.selectExpr(
-            "period",
-            "grouping",
-            "sum(CASE WHEN previous.output IS NOT NULL THEN current.output END)/sum(previous.output) AS forward",
-            "sum(CASE WHEN next.output IS NOT NULL THEN current.output END)/sum(next.output) AS backward",
-            "sum(current.output)/sum(aux) AS construction",
-            "sum(CASE WHEN previous.output IS NOT NULL THEN 1 END) AS count_forward",
-            "sum(CASE WHEN next.output IS NOT NULL THEN 1 END) AS count_backward",
-            "count(current.output) AS count_construction",
-            ).groupBy("period", "grouping")
-
+        df = df.groupBy("period", "grouping").agg(
+            expr(
+                """
+                    sum(
+                        CASE
+                            WHEN previous.output IS NOT NULL
+                            THEN current.output 
+                        END
+                    )/sum(previous.output) AS forward
+                """
+            ),
+            expr(
+                """
+                    sum(
+                        CASE
+                            WHEN next.output IS NOT NULL
+                            THEN current.output
+                        END
+                    )/sum(next.output) AS backward
+                """
+            ),
+            expr("sum(current.output)/sum(aux) AS construction"),
+            expr(
+                """
+                    sum(
+                        CASE
+                            WHEN previous.output IS NOT NULL
+                            THEN 1 
+                        END
+                    ) AS count_forward
+                """
+            ),
+            expr(
+                """
+                    sum(
+                        CASE
+                            WHEN next.output IS NOT NULL
+                            THEN 1
+                        END
+                    ) AS count_backward
+                """
+            ),
+            expr("count(current.output) AS count_construction")
+        )
         return [
             engine.RatioCalculationResult(
-                data=returned_df,
+                data= df,
                 join_columns=["period", "grouping"],
                 fill_columns=["forward", "backward", "construction"],
             )

From e86a8e97e95af11d7e56f172caf554ab5b406e8c Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 14:20:44 +0000
Subject: [PATCH 096/531] Black

---
 .../imputation/engine.py                      | 54 ++++++++++--------
 .../imputation/mean_of_ratios.py              | 56 ++++++++++---------
 .../imputation/ratio_of_means.py              |  4 +-
 tests/imputation/test_ratio_of_means.py       |  9 ++-
 4 files changed, 70 insertions(+), 53 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 45b9f2f1..0605fc89 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -257,30 +257,36 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         # Put the values from the current and previous periods for a
         # contributor on the same row.
         working_df = filtered_df.alias("current")
-        working_df = working_df.join(
-            filtered_df.select("ref", "period", "output", "grouping").alias("previous"),
-            [
-                col("current.ref") == col("previous.ref"),
-                col("current.previous_period") == col("previous.period"),
-                col("current.grouping") == col("previous.grouping"),
-            ],
-            "leftouter",
-        ).join(
-            filtered_df.select("ref", "period", "output", "grouping").alias("next"),
-            [
-                col("current.ref") == col("next.ref"),
-                col("current.next_period") == col("next.period"),
-                col("current.grouping") == col("next.grouping"),
-            ],
-            "leftouter",
-        ).select(
-            col("current.ref").alias("ref"),
-            col("current.grouping").alias("grouping"),
-            col("current.period").alias("period"),
-            col("current.aux").alias("aux"),
-            col("current.output"),
-            col("next.output"),
-            col("previous.output"),
+        working_df = (
+            working_df.join(
+                filtered_df.select("ref", "period", "output", "grouping").alias(
+                    "previous"
+                ),
+                [
+                    col("current.ref") == col("previous.ref"),
+                    col("current.previous_period") == col("previous.period"),
+                    col("current.grouping") == col("previous.grouping"),
+                ],
+                "leftouter",
+            )
+            .join(
+                filtered_df.select("ref", "period", "output", "grouping").alias("next"),
+                [
+                    col("current.ref") == col("next.ref"),
+                    col("current.next_period") == col("next.period"),
+                    col("current.grouping") == col("next.grouping"),
+                ],
+                "leftouter",
+            )
+            .select(
+                col("current.ref").alias("ref"),
+                col("current.grouping").alias("grouping"),
+                col("current.period").alias("period"),
+                col("current.aux").alias("aux"),
+                col("current.output"),
+                col("next.output"),
+                col("previous.output"),
+            )
         )
 
         # Join the grouping ratios onto the input such that each contributor has
diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 30020e19..17358313 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -9,37 +9,41 @@
 
 
 def impute(**kwargs) -> DataFrame:
-
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        working_df = df.withColumn(
-            "growth_ratio_forward",
-            col("output")/col("other_output")
-            ).join(
-            df.select(
-                col("period").alias("other_period"),
-                col("grouping").alias("other_grouping"),
-                col("other_output").alias("reverse_output"),
-                col("output").alias("reverse_other_output"),
-            ),
-            [
-                col("next_period") == col("other_period"),
-                col("grouping") == col("other_grouping"),
-            ],
-            "leftouter",
-        ).select(
-            col("period"),
-            col("grouping"),
-            col("growth_ratio_forward"),
-            (col("reverse_output") / col("reverse_other_output")).alias("growth_ratio_backward"),
+        working_df = (
+            df.withColumn("growth_ratio_forward", col("output") / col("other_output"))
+            .join(
+                df.select(
+                    col("period").alias("other_period"),
+                    col("grouping").alias("other_grouping"),
+                    col("other_output").alias("reverse_output"),
+                    col("output").alias("reverse_other_output"),
+                ),
+                [
+                    col("next_period") == col("other_period"),
+                    col("grouping") == col("other_grouping"),
+                ],
+                "leftouter",
+            )
+            .select(
+                col("period"),
+                col("grouping"),
+                col("growth_ratio_forward"),
+                (col("reverse_output") / col("reverse_other_output")).alias(
+                    "growth_ratio_backward"
+                ),
+            )
         )
 
         # Calculate the construction links as a ratio of means between the returned values and the auxiliary value
         construction_df = (
-            df.groupBy("period", "grouping").agg(
-            sum(col("aux")),
-            sum(col("output_for_construction")),
-            count(col("output_for_construction")),
-            ).withColumn(
+            df.groupBy("period", "grouping")
+            .agg(
+                sum(col("aux")),
+                sum(col("output_for_construction")),
+                count(col("output_for_construction")),
+            )
+            .withColumn(
                 "construction", col("sum(output_for_construction)") / col("sum(aux)")
             )
             .withColumn(
diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 31c82cc7..e12a4327 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -150,11 +150,11 @@ def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
                     ) AS count_backward
                 """
             ),
-            expr("count(current.output) AS count_construction")
+            expr("count(current.output) AS count_construction"),
         )
         return [
             engine.RatioCalculationResult(
-                data= df,
+                data=df,
                 join_columns=["period", "grouping"],
                 fill_columns=["forward", "backward", "construction"],
             )
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 87229bbb..bed314dd 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -350,7 +350,14 @@ def test_back_data_without_output_is_invalid(fxt_load_test_csv, fxt_spark_sessio
         "basic_functionality",
     )
     bad_back_data = fxt_load_test_csv(
-        [reference_col, period_col, grouping_col, target_col, marker_col, auxiliary_col],
+        [
+            reference_col,
+            period_col,
+            grouping_col,
+            target_col,
+            marker_col,
+            auxiliary_col,
+        ],
         dataframe_types,
         "imputation",
         "ratio_of_means",

From 84a52626b53fe0de81df69dead74fd913db97c1f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 1 Mar 2023 14:22:41 +0000
Subject: [PATCH 097/531] New growth ratio calculations for mean of ratios

---
 .../imputation/mean_of_ratios.py              | 59 +++----------------
 1 file changed, 9 insertions(+), 50 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 17358313..477e33fb 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -10,61 +10,20 @@
 
 def impute(**kwargs) -> DataFrame:
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        working_df = (
-            df.withColumn("growth_ratio_forward", col("output") / col("other_output"))
-            .join(
-                df.select(
-                    col("period").alias("other_period"),
-                    col("grouping").alias("other_grouping"),
-                    col("other_output").alias("reverse_output"),
-                    col("output").alias("reverse_other_output"),
-                ),
-                [
-                    col("next_period") == col("other_period"),
-                    col("grouping") == col("other_grouping"),
-                ],
-                "leftouter",
-            )
-            .select(
-                col("period"),
-                col("grouping"),
-                col("growth_ratio_forward"),
-                (col("reverse_output") / col("reverse_other_output")).alias(
-                    "growth_ratio_backward"
-                ),
-            )
-        )
+        growth_df = df.selectExpr(
+            "period",
+            "grouping",
+            "ref",
+            "current.output/previous.output AS growth_forward",
+            "current.output/next.output AS growth_backward"
 
-        # Calculate the construction links as a ratio of means between the returned values and the auxiliary value
-        construction_df = (
-            df.groupBy("period", "grouping")
-            .agg(
-                sum(col("aux")),
-                sum(col("output_for_construction")),
-                count(col("output_for_construction")),
-            )
-            .withColumn(
-                "construction", col("sum(output_for_construction)") / col("sum(aux)")
-            )
-            .withColumn(
-                "count_construction",
-                when(col("sum(aux)") == 0, 0)
-                .when(
-                    col("sum(aux)").isNotNull(), col("count(output_for_construction)")
-                )
-                .cast("long"),
-            )
-            .join(
-                df.select("period", "grouping").distinct(),
-                ["period", "grouping"],
-            )
         )
 
         return [
             engine.RatioCalculationResult(
-                data=returned_df,
-                join_columns=["period", "grouping"],
-                fill_columns=["forward", "backward", "construction"],
+                data=growth_df,
+                join_columns=["period", "ref", "grouping"],
+                fill_columns=["growth_forward", "growth_backward"]
             )
         ]
 

From c85693b63b2ae533cbb78fe95ecdd93c1540d72b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 1 Mar 2023 14:29:31 +0000
Subject: [PATCH 098/531] Correctly fill growth ratios prior to where trimming
 will be added

---
 statistical_methods_library/imputation/mean_of_ratios.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 477e33fb..85272231 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -16,14 +16,12 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
             "ref",
             "current.output/previous.output AS growth_forward",
             "current.output/next.output AS growth_backward"
-
-        )
+        ).fillna(1.0, "growth_forward", "growth_backward")
 
         return [
             engine.RatioCalculationResult(
                 data=growth_df,
-                join_columns=["period", "ref", "grouping"],
-                fill_columns=["growth_forward", "growth_backward"]
+                join_columns=["period", "grouping", "ref"],
             )
         ]
 

From ec0588fad6b3870645c76445676e74e370bd63b1 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 1 Mar 2023 14:56:23 +0000
Subject: [PATCH 099/531] Fix counts in ratio of means

---
 .../imputation/ratio_of_means.py              | 42 +++++++++++++------
 1 file changed, 29 insertions(+), 13 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index e12a4327..d05c90d8 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -132,25 +132,41 @@ def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
             expr("sum(current.output)/sum(aux) AS construction"),
             expr(
                 """
-                    sum(
-                        CASE
-                            WHEN previous.output IS NOT NULL
-                            THEN 1 
-                        END
-                    ) AS count_forward
+                    CASE
+                        WHEN sum(previous.output) = 0
+                        THEN 0
+                        WHEN sum(previous.output) IS NOT NULL
+                        THEN sum(
+                            CASE
+                                WHEN previous.output IS NOT NULL
+                                THEN 1 
+                            END
+                        )
+                    END AS count_forward  
                 """
             ),
             expr(
                 """
-                    sum(
-                        CASE
-                            WHEN next.output IS NOT NULL
-                            THEN 1
-                        END
-                    ) AS count_backward
+                    CASE
+                        WHEN sum(next.output) IS NOT NULL
+                        THEN sum(
+                            CASE
+                                WHEN next.output IS NOT NULL
+                                THEN 1
+                            END
+                    )
+                    END AS count_backward
+                """
+            ),
+            expr(
+                """
+                    CASE
+                        WHEN sum(aux) = 0
+                        THEN 0
+                        ELSE count(current.output)
+                    END AS count_construction
                 """
             ),
-            expr("count(current.output) AS count_construction"),
         )
         return [
             engine.RatioCalculationResult(

From 4072c4b0a9baf8b8c57e354ca91431d93fa0bb44 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 15:14:28 +0000
Subject: [PATCH 100/531] Missing Case

---
 statistical_methods_library/imputation/ratio_of_means.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index d05c90d8..2c31ac64 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -148,6 +148,8 @@ def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
             expr(
                 """
                     CASE
+                        WHEN sum(next.output) = 0
+                        THEN 0
                         WHEN sum(next.output) IS NOT NULL
                         THEN sum(
                             CASE

From ee9a1e802a2fe1152c011101a016e9265a34683d Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 15:44:07 +0000
Subject: [PATCH 101/531] Black

---
 statistical_methods_library/imputation/mean_of_ratios.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 85272231..d847d317 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -15,7 +15,7 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
             "grouping",
             "ref",
             "current.output/previous.output AS growth_forward",
-            "current.output/next.output AS growth_backward"
+            "current.output/next.output AS growth_backward",
         ).fillna(1.0, "growth_forward", "growth_backward")
 
         return [

From 9b630454f1b92634b549c5d7b676b84ee54d042a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 15:46:03 +0000
Subject: [PATCH 102/531] Flake8

---
 statistical_methods_library/imputation/mean_of_ratios.py | 1 -
 statistical_methods_library/imputation/ratio_of_means.py | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index d847d317..05e43f4b 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -3,7 +3,6 @@
 from typing import List
 
 from pyspark.sql import DataFrame
-from pyspark.sql.functions import col, count, sum, when
 
 from . import engine
 
diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index 2c31ac64..a1058549 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -114,7 +114,7 @@ def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
                     sum(
                         CASE
                             WHEN previous.output IS NOT NULL
-                            THEN current.output 
+                            THEN current.output
                         END
                     )/sum(previous.output) AS forward
                 """
@@ -139,10 +139,10 @@ def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
                         THEN sum(
                             CASE
                                 WHEN previous.output IS NOT NULL
-                                THEN 1 
+                                THEN 1
                             END
                         )
-                    END AS count_forward  
+                    END AS count_forward
                 """
             ),
             expr(

From 7b58afab7b7154431a208f6496a99f3a1e742cb1 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 17:22:48 +0000
Subject: [PATCH 103/531] Easier Counts

---
 .../imputation/ratio_of_means.py                   | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
index a1058549..f910c48b 100644
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ b/statistical_methods_library/imputation/ratio_of_means.py
@@ -136,12 +136,7 @@ def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
                         WHEN sum(previous.output) = 0
                         THEN 0
                         WHEN sum(previous.output) IS NOT NULL
-                        THEN sum(
-                            CASE
-                                WHEN previous.output IS NOT NULL
-                                THEN 1
-                            END
-                        )
+                        THEN sum(cast(previous.output IS NOT NULL AS integer))
                     END AS count_forward
                 """
             ),
@@ -151,12 +146,7 @@ def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
                         WHEN sum(next.output) = 0
                         THEN 0
                         WHEN sum(next.output) IS NOT NULL
-                        THEN sum(
-                            CASE
-                                WHEN next.output IS NOT NULL
-                                THEN 1
-                            END
-                    )
+                        THEN sum(cast(next.output IS NOT NULL AS integer))
                     END AS count_backward
                 """
             ),

From c931fc19befb5f4c94999439b6a994084659fd69 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 1 Mar 2023 17:21:43 +0000
Subject: [PATCH 104/531] First pass at upper and lower trimming bounds

---
 .../imputation/mean_of_ratios.py              | 34 ++++++++++++++++---
 1 file changed, 29 insertions(+), 5 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 05e43f4b..8d677cc3 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -1,21 +1,45 @@
 # For Copyright information, please see LICENCE.
 
-from typing import List
+from typing import List, Number, Optional
 
 from pyspark.sql import DataFrame
 
 from . import engine
 
 
-def impute(**kwargs) -> DataFrame:
+def impute(*, lower_trim: Optional[Number]=None, upper_trim: Optional[Number]=None, **kwargs) -> DataFrame:
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
         growth_df = df.selectExpr(
             "period",
             "grouping",
             "ref",
-            "current.output/previous.output AS growth_forward",
-            "current.output/next.output AS growth_backward",
-        ).fillna(1.0, "growth_forward", "growth_backward")
+            """CASE
+                WHEN previous.output = 0
+                THEN 1
+                ELSE current.output/previous.output AS growth_forward
+            END""",
+            """CASE
+                WHEN next.output = 0
+                THEN 1
+                ELSE current.output/next.output AS growth_backward
+            END"""
+        )
+
+        trimmed_df = (
+            growth_df.groupBy("period", "grouping")
+            .agg(
+                expr("sum(growth_forward IS NOT NULL) AS count_forward"),
+                expr("sum(growth_backward IS NOT NULL) AS count_backward"),
+            )
+            .select(
+                col("period"),
+                col("grouping"),
+                (1 + (col("count_forward") * int(lower_trim) / 100)).alias("lower_forward"),
+                (col("count_forward") * (100 - int(upper_trim)) / 100).alias("lower_forward"),
+                (1 + (col("count_backward") * int(lower_trim) / 100)).alias("lower_backward"),
+                (col("count_backward") * (100 - int(upper_trim)) / 100).alias("lower_backward"),
+            )
+        )
 
         return [
             engine.RatioCalculationResult(

From ff2865d0a05b1acb5cb2ef369d269e03f9b1a85e Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 1 Mar 2023 17:30:41 +0000
Subject: [PATCH 105/531] Missing import, cast and duplicate alias

---
 statistical_methods_library/imputation/mean_of_ratios.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 8d677cc3..48f0f98e 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -3,6 +3,7 @@
 from typing import List, Number, Optional
 
 from pyspark.sql import DataFrame
+from pyspark.sql.functions import col, expr
 
 from . import engine
 
@@ -28,16 +29,16 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
         trimmed_df = (
             growth_df.groupBy("period", "grouping")
             .agg(
-                expr("sum(growth_forward IS NOT NULL) AS count_forward"),
-                expr("sum(growth_backward IS NOT NULL) AS count_backward"),
+                expr("sum(cast(growth_forward IS NOT NULL AS integer)) AS count_forward"),
+                expr("sum(cast(growth_backward IS NOT NULL AS integer)) AS count_backward"),
             )
             .select(
                 col("period"),
                 col("grouping"),
                 (1 + (col("count_forward") * int(lower_trim) / 100)).alias("lower_forward"),
-                (col("count_forward") * (100 - int(upper_trim)) / 100).alias("lower_forward"),
+                (col("count_forward") * (100 - int(upper_trim)) / 100).alias("upper_forward"),
                 (1 + (col("count_backward") * int(lower_trim) / 100)).alias("lower_backward"),
-                (col("count_backward") * (100 - int(upper_trim)) / 100).alias("lower_backward"),
+                (col("count_backward") * (100 - int(upper_trim)) / 100).alias("upper_backward"),
             )
         )
 

From 7293ef07a2ece4e1d668b4a70d518fa0b069d1de Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 2 Mar 2023 10:35:34 +0000
Subject: [PATCH 106/531] Initial version of mean of ratios link calculation,
 need to add observation counts

---
 .../imputation/mean_of_ratios.py              | 91 ++++++++++++++++---
 1 file changed, 80 insertions(+), 11 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 48f0f98e..5ea875e5 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -1,9 +1,9 @@
-# For Copyright information, please see LICENCE.
+lower_# For Copyright information, please see LICENCE.
 
 from typing import List, Number, Optional
 
 from pyspark.sql import DataFrame
-from pyspark.sql.functions import col, expr
+from pyspark.sql.functions import col, expr, when
 
 from . import engine
 
@@ -14,6 +14,7 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
             "period",
             "grouping",
             "ref",
+            "aux",
             """CASE
                 WHEN previous.output = 0
                 THEN 1
@@ -26,20 +27,88 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
             END"""
         )
 
-        trimmed_df = (
-            growth_df.groupBy("period", "grouping")
-            .agg(
-                expr("sum(cast(growth_forward IS NOT NULL AS integer)) AS count_forward"),
-                expr("sum(cast(growth_backward IS NOT NULL AS integer)) AS count_backward"),
+        ratio_df = (
+            growth_df.join(
+                (
+                    growth_df.groupBy("period", "grouping")
+                    .agg(
+                        expr("""
+                            sum(
+                                cast(growth_forward IS NOT NULL AS integer)
+                            ) AS count_forward
+                        """),
+                        expr("""
+                            sum(
+                                cast(growth_backward IS NOT NULL AS integer)
+                            ) AS count_backward
+                        """),
+                    )
+                    .select(
+                        col("period"),
+                        col("grouping"),
+                        (
+                            1 + (col("count_forward") * int(lower_trim) / 100)
+                        ).alias("lower_forward"),
+                        (
+                            col("count_forward") * (100 - int(upper_trim)) / 100
+                        ).alias("upper_forward"),
+                        (
+                            1 + (col("count_backward") * int(lower_trim) / 100)
+                        ).alias("lower_backward"),
+                        (
+                            col("count_backward") * (100 - int(upper_trim)) / 100
+                        ).alias("upper_backward"),
+                    )
+                ),
+                ["period", "grouping"]
+            )
+            .withColumn(
+                "num_forward",
+                expr("""
+                    row_number() OVER (
+                        PARTITION BY period, grouping
+                        ORDER BY growth_forward ASC
+                    )
+                """)
+            )
+            .withColumn(
+                "num_backward",
+                expr("""
+                    row_number() OVER (
+                        PARTITION BY period, grouping
+                        ORDER BY growth_backward ASC
+                    )
+                """)
             )
             .select(
                 col("period"),
                 col("grouping"),
-                (1 + (col("count_forward") * int(lower_trim) / 100)).alias("lower_forward"),
-                (col("count_forward") * (100 - int(upper_trim)) / 100).alias("upper_forward"),
-                (1 + (col("count_backward") * int(lower_trim) / 100)).alias("lower_backward"),
-                (col("count_backward") * (100 - int(upper_trim)) / 100).alias("upper_backward"),
+                when(
+                    (
+                        col("num_forward").between(
+                            col("lower_forward""),
+                            col("upper_forward")
+                        )
+                        | trim_threshold < col("count_forward")
+                    ),
+                    col("growth_forward")
+                ).alias("trimmed_forward"),
+                when(
+                    (
+                        col("num_backward").between(
+                            col("lower_backward""),
+                            col("upper_backward")
+                        )
+                        | trim_threshold < col("count_backward")
+                    ),
+                    col("growth_backward")
+                ).alias("trimmed_backward")
             )
+            .groupBy("period", "grouping")
+            .agg(
+                expr("mean(trimmed_forward) AS forward"),
+                expr("mean(trimmed_backward) AS backward"),
+            expr("sum(current.output)/sum(aux) AS construction"),
         )
 
         return [

From 11af634634777762ff9d0baff5ed47b965461036 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Thu, 2 Mar 2023 11:43:25 +0000
Subject: [PATCH 107/531] Return Something. Remove Mistake.

---
 statistical_methods_library/imputation/mean_of_ratios.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 5ea875e5..14b1ed6b 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -1,4 +1,4 @@
-lower_# For Copyright information, please see LICENCE.
+# For Copyright information, please see LICENCE.
 
 from typing import List, Number, Optional
 
@@ -115,6 +115,11 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
             engine.RatioCalculationResult(
                 data=growth_df,
                 join_columns=["period", "grouping", "ref"],
+            ),
+            engine.RatioCalculationResult(
+                data=ratio_df,
+                join_columns=["period", "grouping"],
+                fill_columns=["forward", "backward", "construction"]
             )
         ]
 

From 9a42642033dd43a5ceee6014fd376b0dc8a53ed5 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 2 Mar 2023 11:49:36 +0000
Subject: [PATCH 108/531] Fixed Mistakes. And Black

---
 .../imputation/mean_of_ratios.py              | 85 +++++++++++--------
 1 file changed, 50 insertions(+), 35 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 14b1ed6b..b16a8aba 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -8,7 +8,13 @@
 from . import engine
 
 
-def impute(*, lower_trim: Optional[Number]=None, upper_trim: Optional[Number]=None, **kwargs) -> DataFrame:
+def impute(
+    *,
+    trim_threshold: Optional[Number] = 10,
+    lower_trim: Optional[Number] = None,
+    upper_trim: Optional[Number] = None,
+    **kwargs
+) -> DataFrame:
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
         growth_df = df.selectExpr(
             "period",
@@ -24,7 +30,7 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
                 WHEN next.output = 0
                 THEN 1
                 ELSE current.output/next.output AS growth_backward
-            END"""
+            END""",
         )
 
         ratio_df = (
@@ -32,53 +38,61 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
                 (
                     growth_df.groupBy("period", "grouping")
                     .agg(
-                        expr("""
+                        expr(
+                            """
                             sum(
                                 cast(growth_forward IS NOT NULL AS integer)
                             ) AS count_forward
-                        """),
-                        expr("""
+                        """
+                        ),
+                        expr(
+                            """
                             sum(
                                 cast(growth_backward IS NOT NULL AS integer)
                             ) AS count_backward
-                        """),
+                        """
+                        ),
                     )
                     .select(
                         col("period"),
                         col("grouping"),
-                        (
-                            1 + (col("count_forward") * int(lower_trim) / 100)
-                        ).alias("lower_forward"),
-                        (
-                            col("count_forward") * (100 - int(upper_trim)) / 100
-                        ).alias("upper_forward"),
-                        (
-                            1 + (col("count_backward") * int(lower_trim) / 100)
-                        ).alias("lower_backward"),
-                        (
-                            col("count_backward") * (100 - int(upper_trim)) / 100
-                        ).alias("upper_backward"),
+                        (1 + (col("count_forward") * int(lower_trim) / 100)).alias(
+                            "lower_forward"
+                        ),
+                        (col("count_forward") * (100 - int(upper_trim)) / 100).alias(
+                            "upper_forward"
+                        ),
+                        (1 + (col("count_backward") * int(lower_trim) / 100)).alias(
+                            "lower_backward"
+                        ),
+                        (col("count_backward") * (100 - int(upper_trim)) / 100).alias(
+                            "upper_backward"
+                        ),
                     )
                 ),
-                ["period", "grouping"]
+                ["period", "grouping"],
             )
             .withColumn(
                 "num_forward",
-                expr("""
+                expr(
+                    """
                     row_number() OVER (
                         PARTITION BY period, grouping
                         ORDER BY growth_forward ASC
                     )
-                """)
+                """
+                ),
             )
             .withColumn(
                 "num_backward",
-                expr("""
+                expr(
+                    """
                     row_number() OVER (
                         PARTITION BY period, grouping
                         ORDER BY growth_backward ASC
                     )
-                """)
+                """
+                ),
             )
             .select(
                 col("period"),
@@ -86,29 +100,30 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
                 when(
                     (
                         col("num_forward").between(
-                            col("lower_forward""),
-                            col("upper_forward")
+                            col("lower_forward"), col("upper_forward")
                         )
-                        | trim_threshold < col("count_forward")
+                        | trim_threshold
+                        < col("count_forward")
                     ),
-                    col("growth_forward")
+                    col("growth_forward"),
                 ).alias("trimmed_forward"),
                 when(
                     (
                         col("num_backward").between(
-                            col("lower_backward""),
-                            col("upper_backward")
+                            col("lower_backward"), col("upper_backward")
                         )
-                        | trim_threshold < col("count_backward")
+                        | trim_threshold
+                        < col("count_backward")
                     ),
-                    col("growth_backward")
-                ).alias("trimmed_backward")
+                    col("growth_backward"),
+                ).alias("trimmed_backward"),
             )
             .groupBy("period", "grouping")
             .agg(
                 expr("mean(trimmed_forward) AS forward"),
                 expr("mean(trimmed_backward) AS backward"),
-            expr("sum(current.output)/sum(aux) AS construction"),
+                expr("sum(current.output)/sum(aux) AS construction"),
+            )
         )
 
         return [
@@ -119,8 +134,8 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
             engine.RatioCalculationResult(
                 data=ratio_df,
                 join_columns=["period", "grouping"],
-                fill_columns=["forward", "backward", "construction"]
-            )
+                fill_columns=["forward", "backward", "construction"],
+            ),
         ]
 
     kwargs["ratio_calculation_function"] = mean_of_ratios

From 0ff23ee7a2629c549c7be3b1cc2022a4d8ccb05d Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 2 Mar 2023 11:56:07 +0000
Subject: [PATCH 109/531] >= not <, new keyword argument

---
 statistical_methods_library/imputation/mean_of_ratios.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index b16a8aba..648a9002 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -10,7 +10,7 @@
 
 def impute(
     *,
-    trim_threshold: Optional[Number] = 10,
+    trim_threshold: Optional[Number] = None,
     lower_trim: Optional[Number] = None,
     upper_trim: Optional[Number] = None,
     **kwargs
@@ -103,7 +103,7 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
                             col("lower_forward"), col("upper_forward")
                         )
                         | trim_threshold
-                        < col("count_forward")
+                        >= col("count_forward")
                     ),
                     col("growth_forward"),
                 ).alias("trimmed_forward"),
@@ -113,7 +113,7 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
                             col("lower_backward"), col("upper_backward")
                         )
                         | trim_threshold
-                        < col("count_backward")
+                        >= col("count_backward")
                     ),
                     col("growth_backward"),
                 ).alias("trimmed_backward"),

From 4fb2d9191ee806b0a8ffd9fb248bec32bad80132 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 2 Mar 2023 15:44:39 +0000
Subject: [PATCH 110/531] New period calculations to support variable
 periodicity

---
 .../imputation/engine.py                        | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 0605fc89..79e956af 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -506,15 +506,14 @@ def select_cols(
             ]
         )
 
-    def calculate_previous_period(period: Column) -> Column:
-        return when(
-            period.endswith("01"), (period.cast(IntegerType()) - 89).cast(StringType())
-        ).otherwise((period.cast(IntegerType()) - 1).cast(StringType()))
-
-    def calculate_next_period(period: Column) -> Column:
-        return when(
-            period.endswith("12"), (period.cast(IntegerType()) + 89).cast(StringType())
-        ).otherwise((period.cast(IntegerType()) + 1).cast(StringType()))
+    def calculate_previous_period(period: Column, num_periods: Optional[int]=1) -> Column:
+        period = period.cast(IntegerType)
+        return (period-(num_periods + (num/_periods/12 + (period % 100 <= num_periods % 12).cast(IntegerType))*88)).cast(StringType)
+
+
+    def calculate_next_period(period: Column, num_periods: Optional[int]=1) -> Column:
+        period = period.cast(IntegerType)
+        return (period+ num_periods + ((num_periods//12 + ((period % 100) + (num_periods % 12) > 12).cast(IntegerType))*88)).cast(StringType)
 
     def filter_back_data(filter_col: Column) -> DataFrame:
         return prepared_back_data_df.filter(filter_col).localCheckpoint(eager=True)

From dfb20e3f7eba22ee0c57e2d92058bb6e33d7877e Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 2 Mar 2023 16:01:26 +0000
Subject: [PATCH 111/531] Equations Adjustments

---
 .../imputation/engine.py                      | 24 +++++++++++++++----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 79e956af..12efd984 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -506,14 +506,28 @@ def select_cols(
             ]
         )
 
-    def calculate_previous_period(period: Column, num_periods: Optional[int]=1) -> Column:
+    def calculate_previous_period(
+        period: Column, num_periods: Optional[int] = 1
+    ) -> Column:
         period = period.cast(IntegerType)
-        return (period-(num_periods + (num/_periods/12 + (period % 100 <= num_periods % 12).cast(IntegerType))*88)).cast(StringType)
-
+        return (
+            period
+            - num_periods
+            - 88
+            * (num_periods // 12 + (period % 100 <= num_periods % 12).cast(IntegerType))
+        ).cast(StringType)
 
-    def calculate_next_period(period: Column, num_periods: Optional[int]=1) -> Column:
+    def calculate_next_period(period: Column, num_periods: Optional[int] = 1) -> Column:
         period = period.cast(IntegerType)
-        return (period+ num_periods + ((num_periods//12 + ((period % 100) + (num_periods % 12) > 12).cast(IntegerType))*88)).cast(StringType)
+        return (
+            period
+            + num_periods
+            + 88
+            * (
+                num_periods // 12
+                + ((period % 100) + (num_periods % 12) > 12).cast(IntegerType)
+            )
+        ).cast(StringType)
 
     def filter_back_data(filter_col: Column) -> DataFrame:
         return prepared_back_data_df.filter(filter_col).localCheckpoint(eager=True)

From 6f2f5d67e4bfc526e15c258b14e8d8a25f8128f8 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 2 Mar 2023 16:26:21 +0000
Subject: [PATCH 112/531] Correct casting in new period calculations

---
 statistical_methods_library/imputation/engine.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 12efd984..a666cee2 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -10,7 +10,7 @@
 
 from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, lit, when
-from pyspark.sql.types import DecimalType, IntegerType, StringType
+from pyspark.sql.types import DecimalType, StringType
 
 from statistical_methods_library.utilities import validation
 
@@ -509,25 +509,25 @@ def select_cols(
     def calculate_previous_period(
         period: Column, num_periods: Optional[int] = 1
     ) -> Column:
-        period = period.cast(IntegerType)
+        period = period.cast("integer")
         return (
             period
             - num_periods
             - 88
-            * (num_periods // 12 + (period % 100 <= num_periods % 12).cast(IntegerType))
-        ).cast(StringType)
+            * (num_periods // 12 + (period % 100 <= num_periods % 12).cast("integer"))
+        ).cast("string")
 
     def calculate_next_period(period: Column, num_periods: Optional[int] = 1) -> Column:
-        period = period.cast(IntegerType)
+        period = period.cast("integer")
         return (
             period
             + num_periods
             + 88
             * (
                 num_periods // 12
-                + ((period % 100) + (num_periods % 12) > 12).cast(IntegerType)
+                + ((period % 100) + (num_periods % 12) > 12).cast("integer")
             )
-        ).cast(StringType)
+        ).cast("string")
 
     def filter_back_data(filter_col: Column) -> DataFrame:
         return prepared_back_data_df.filter(filter_col).localCheckpoint(eager=True)

From da703fdb7b8330202d0c0403de65c53a4a9c5222 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 2 Mar 2023 17:53:05 +0000
Subject: [PATCH 113/531] Use correct type since spec uses ceiling but >= on a
 decimal will have the same effect

---
 statistical_methods_library/imputation/mean_of_ratios.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 648a9002..fa70e2e2 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -56,13 +56,13 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
                     .select(
                         col("period"),
                         col("grouping"),
-                        (1 + (col("count_forward") * int(lower_trim) / 100)).alias(
+                        (col("count_forward") * decimal(lower_trim) / 100).alias(
                             "lower_forward"
                         ),
                         (col("count_forward") * (100 - int(upper_trim)) / 100).alias(
                             "upper_forward"
                         ),
-                        (1 + (col("count_backward") * int(lower_trim) / 100)).alias(
+                        (col("count_backward") * decimal(lower_trim) / 100).alias(
                             "lower_backward"
                         ),
                         (col("count_backward") * (100 - int(upper_trim)) / 100).alias(

From 21c2860b35d45b35c040504bbb5fd10ff94bf2ec Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Thu, 2 Mar 2023 17:56:53 +0000
Subject: [PATCH 114/531] Consistant

---
 statistical_methods_library/imputation/mean_of_ratios.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index fa70e2e2..77eb7960 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -59,13 +59,13 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
                         (col("count_forward") * decimal(lower_trim) / 100).alias(
                             "lower_forward"
                         ),
-                        (col("count_forward") * (100 - int(upper_trim)) / 100).alias(
+                        (col("count_forward") * (100 - decimal(upper_trim)) / 100).alias(
                             "upper_forward"
                         ),
                         (col("count_backward") * decimal(lower_trim) / 100).alias(
                             "lower_backward"
                         ),
-                        (col("count_backward") * (100 - int(upper_trim)) / 100).alias(
+                        (col("count_backward") * (100 - decimal(upper_trim)) / 100).alias(
                             "upper_backward"
                         ),
                     )

From 6405b744bb9099fcf0fd735cfb77fb292b664ed6 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Fri, 3 Mar 2023 10:24:19 +0000
Subject: [PATCH 115/531] Initial test data from Methodology

---
 .../mean_of_ratios/mor_test_data_case_1.csv   |  5 ++
 .../mean_of_ratios/mor_test_data_case_10.csv  | 16 +++++++
 .../mor_test_data_case_10_output.csv          | 16 +++++++
 .../mean_of_ratios/mor_test_data_case_11.csv  | 25 ++++++++++
 .../mor_test_data_case_11_output.csv          | 25 ++++++++++
 .../mean_of_ratios/mor_test_data_case_12.csv  | 21 ++++++++
 .../mor_test_data_case_12_output.csv          | 21 ++++++++
 .../mean_of_ratios/mor_test_data_case_13.csv  | 28 +++++++++++
 .../mor_test_data_case_13_output.csv          | 28 +++++++++++
 .../mean_of_ratios/mor_test_data_case_14.csv  | 28 +++++++++++
 .../mor_test_data_case_14_output.csv          | 28 +++++++++++
 .../mor_test_data_case_14_t_output_trial1.csv | 42 ++++++++++++++++
 .../mean_of_ratios/mor_test_data_case_15.csv  | 28 +++++++++++
 .../mor_test_data_case_15_output.csv          | 28 +++++++++++
 .../mean_of_ratios/mor_test_data_case_16.csv  | 28 +++++++++++
 .../mor_test_data_case_16_0.csv               | 35 ++++++++++++++
 .../mor_test_data_case_16_0_inc_output.csv    | 35 ++++++++++++++
 .../mor_test_data_case_16_0_output.csv        | 35 ++++++++++++++
 .../mor_test_data_case_16_output.csv          | 28 +++++++++++
 .../mean_of_ratios/mor_test_data_case_17.csv  | 15 ++++++
 .../mor_test_data_case_17_output.csv          | 15 ++++++
 .../mean_of_ratios/mor_test_data_case_18.csv  | 15 ++++++
 .../mor_test_data_case_18_output.csv          | 15 ++++++
 .../mean_of_ratios/mor_test_data_case_19.csv  | 25 ++++++++++
 .../mor_test_data_case_19_output.csv          | 25 ++++++++++
 .../mor_test_data_case_1_output.csv           |  5 ++
 .../mean_of_ratios/mor_test_data_case_2.csv   |  9 ++++
 .../mean_of_ratios/mor_test_data_case_20.csv  | 48 +++++++++++++++++++
 .../mor_test_data_case_20_output.csv          | 48 +++++++++++++++++++
 .../mean_of_ratios/mor_test_data_case_21.csv  | 16 +++++++
 .../mor_test_data_case_21_output.csv          | 16 +++++++
 .../mean_of_ratios/mor_test_data_case_22.csv  | 16 +++++++
 .../mor_test_data_case_22_output.csv          | 16 +++++++
 .../mean_of_ratios/mor_test_data_case_23.csv  | 16 +++++++
 .../mor_test_data_case_23_output.csv          | 16 +++++++
 .../mean_of_ratios/mor_test_data_case_24.csv  | 16 +++++++
 .../mor_test_data_case_24_output.csv          | 16 +++++++
 .../mean_of_ratios/mor_test_data_case_25.csv  | 22 +++++++++
 .../mor_test_data_case_25_output.csv          | 22 +++++++++
 .../mor_test_data_case_2_output.csv           |  9 ++++
 .../mean_of_ratios/mor_test_data_case_3.csv   | 13 +++++
 .../mor_test_data_case_3_output.csv           | 13 +++++
 .../mor_test_data_case_3_t_output.csv         | 37 ++++++++++++++
 .../mean_of_ratios/mor_test_data_case_4.csv   | 17 +++++++
 .../mor_test_data_case_4_output.csv           | 17 +++++++
 .../mean_of_ratios/mor_test_data_case_5.csv   | 21 ++++++++
 .../mor_test_data_case_5_output.csv           | 21 ++++++++
 .../mean_of_ratios/mor_test_data_case_6.csv   | 13 +++++
 .../mor_test_data_case_6_output.csv           | 13 +++++
 .../mean_of_ratios/mor_test_data_case_7.csv   | 29 +++++++++++
 .../mor_test_data_case_7_output.csv           | 29 +++++++++++
 .../mean_of_ratios/mor_test_data_case_8.csv   | 13 +++++
 .../mor_test_data_case_8_output.csv           | 13 +++++
 .../mean_of_ratios/mor_test_data_case_9.csv   | 12 +++++
 .../mor_test_data_case_9_output.csv           | 12 +++++
 55 files changed, 1174 insertions(+)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_t_output_trial1.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_inc_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_t_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1.csv
new file mode 100644
index 00000000..935a254b
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1.csv
@@ -0,0 +1,5 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+10001,202001,100,3892,1,,
+10002,202001,100,3873,75,,
+10003,202001,100,5397,13,,
+10004,202001,100,,71,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10.csv
new file mode 100644
index 00000000..87a7fec8
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+100001,202001,100,3074,26,,
+100001,202002,100,9529,26,,
+100001,202003,100,615,26,,
+100001,202004,100,3540,26,,
+100002,202001,100,8084,19,,
+100002,202002,100,2422,19,,
+100002,202003,100,3058,19,,
+100002,202004,100,5608,19,,
+100003,202001,100,5161,46,,
+100003,202002,100,3648,46,,
+100003,202003,100,205,46,,
+100003,202004,100,2594,46,,
+100004,202001,100,,86,,
+100004,202002,100,,86,,
+100004,202004,100,9352,86,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10_output.csv
new file mode 100644
index 00000000..6a9bbd4b
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10_output.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+100001,202001,100,3074,26,,,,0.322594186,,1.691693133,179.3296703,3074,R,,3,3
+100001,202002,100,9529,26,,,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,9529,R,3,3,3
+100001,202003,100,615,26,,,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,615,R,3,3,3
+100001,202004,100,3540,26,,,5.756097561,,6.74787815,,119.1751412,3540,R,3,,4
+100002,202001,100,8084,19,,,,3.337737407,,1.691693133,179.3296703,8084,R,,3,3
+100002,202002,100,2422,19,,,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,2422,R,3,3,3
+100002,202003,100,3058,19,,,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3058,R,3,3,3
+100002,202004,100,5608,19,,,1.833878352,,6.74787815,,119.1751412,5608,R,3,,4
+100003,202001,100,5161,46,,,,1.414747807,,1.691693133,179.3296703,5161,R,,3,3
+100003,202002,100,3648,46,,,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3648,R,3,3,3
+100003,202003,100,205,46,,,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,205,R,3,3,3
+100003,202004,100,2594,46,,,12.65365854,,6.74787815,,119.1751412,2594,R,3,,4
+100004,202001,100,,86,,,,,,1.691693133,179.3296703,15422.35165,C,,3,3
+100004,202002,100,,86,,,,,1.368771264,11.36048394,171.4175824,21109.67176,FIC,3,3,3
+100004,202004,100,9352,86,,,,,6.74787815,,119.1751412,9352,R,3,3,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11.csv
new file mode 100644
index 00000000..900e01c9
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+110001,202001,100,9244,89,,
+110001,202002,100,8916,89,,
+110001,202003,100,6194,89,,
+110002,202001,100,4826,83,,
+110002,202002,100,5903,83,,
+110002,202003,100,4743,83,,
+110003,202001,100,7586,4,,
+110003,202002,100,1016,4,,
+110003,202003,100,1429,4,,
+110004,202001,100,3975,76,,
+110004,202002,100,3044,76,,
+110004,202003,100,,76,,
+110005,202001,200,5217,27,,
+110005,202002,200,7016,27,,
+110005,202003,200,9940,27,,
+110006,202001,200,5325,42,,
+110006,202002,200,7747,42,,
+110006,202003,200,6685,42,,
+110007,202001,200,5496,19,,
+110007,202002,200,1010,19,,
+110007,202003,200,1235,19,,
+110008,202001,200,,43,,
+110008,202002,200,3913,43,,
+110008,202003,200,6013,43,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11_output.csv
new file mode 100644
index 00000000..8b316035
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11_output.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+110001,202001,100,9244,89,,,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
+110001,202002,100,8916,89,,,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
+110001,202003,100,6194,89,,,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
+110002,202001,100,4826,83,,,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
+110002,202002,100,5903,83,,,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
+110002,202003,100,4743,83,,,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
+110003,202001,100,7586,4,,,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
+110003,202002,100,1016,4,,,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
+110003,202003,100,1429,4,,,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
+110004,202001,100,3975,76,,,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
+110004,202002,100,3044,76,,,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
+110004,202003,100,,76,,,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
+110005,202001,200,5217,27,,,,0.743586089,,2.290844366,182.25,5217,R,,3,3
+110005,202002,200,7016,27,,,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,7016,R,3,4,4
+110005,202003,200,9940,27,,,1.416761688,,1.259780318,,182.2366412,9940,R,4,,4
+110006,202001,200,5325,42,,,,0.68736285,,2.290844366,182.25,5325,R,,3,3
+110006,202002,200,7747,42,,,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,7747,R,3,4,4
+110006,202003,200,6685,42,,,0.862914677,,1.259780318,,182.2366412,6685,R,4,,4
+110007,202001,200,5496,19,,,,5.441584158,,2.290844366,182.25,5496,R,,3,3
+110007,202002,200,1010,19,,,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1010,R,3,4,4
+110007,202003,200,1235,19,,,1.222772277,,1.259780318,,182.2366412,1235,R,4,,4
+110008,202001,200,,43,,,,,,2.290844366,182.25,8964.074003,BI,,3,3
+110008,202002,200,3913,43,,,,0.650756694,0.994479964,0.833317149,150.2748092,3913,R,3,4,4
+110008,202003,200,6013,43,,,1.53667263,,1.259780318,,182.2366412,6013,R,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12.csv
new file mode 100644
index 00000000..884d7071
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12.csv
@@ -0,0 +1,21 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+120001,202001,100,5240,50,,
+120001,202002,100,2490,50,,
+120001,202003,100,3382,50,,
+120001,202004,100,4475,50,,
+120001,202005,100,1316,50,,
+120002,202001,100,7410,78,,
+120002,202002,100,3602,78,,
+120002,202003,100,4972,78,,
+120002,202004,100,8838,78,,
+120002,202005,100,1535,78,,
+120003,202001,100,4530,94,,
+120003,202002,100,7451,94,,
+120003,202003,100,7586,94,,
+120003,202004,100,283,94,,
+120003,202005,100,4416,94,,
+120004,202001,100,,100,,
+120004,202002,100,,100,,
+120004,202003,100,,100,,
+120004,202004,100,,100,,
+120004,202005,100,,100,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12_output.csv
new file mode 100644
index 00000000..131e116f
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12_output.csv
@@ -0,0 +1,21 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+120001,202001,100,5240,50,,,,2.104417671,,1.589860068,77.38738739,5240,R,,3,3
+120001,202002,100,2490,50,,,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,2490,R,3,3,3
+120001,202003,100,3382,50,,,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3382,R,3,3,3
+120001,202004,100,4475,50,,,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,4475,R,3,3,3
+120001,202005,100,1316,50,,,0.294078212,,5.357333441,,32.73423423,1316,R,3,,3
+120002,202001,100,7410,78,,,,2.05719045,,1.589860068,77.38738739,7410,R,,3,3
+120002,202002,100,3602,78,,,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3602,R,3,3,3
+120002,202003,100,4972,78,,,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,4972,R,3,3,3
+120002,202004,100,8838,78,,,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,8838,R,3,3,3
+120002,202005,100,1535,78,,,0.173681828,,5.357333441,,32.73423423,1535,R,3,,3
+120003,202001,100,4530,94,,,,0.607972084,,1.589860068,77.38738739,4530,R,,3,3
+120003,202002,100,7451,94,,,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,7451,R,3,3,3
+120003,202003,100,7586,94,,,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,7586,R,3,3,3
+120003,202004,100,283,94,,,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,283,R,3,3,3
+120003,202005,100,4416,94,,,15.60424028,,5.357333441,,32.73423423,4416,R,3,,3
+120004,202001,100,,100,,,,,,1.589860068,77.38738739,7738.738739,C,,3,3
+120004,202002,100,,100,,,,,0.868701022,0.814303919,61.0045045,6722.650253,FIC,3,3,3
+120004,202003,100,,100,,,,,1.252231853,9.374659539,71.8018018,8418.316782,FIC,3,3,3
+120004,202004,100,,100,,,,,1.046013805,3.074065265,61.24324324,8805.675573,FIC,3,3,3
+120004,202005,100,,100,,,,,5.357333441,,32.73423423,47174.94022,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13.csv
new file mode 100644
index 00000000..ea43f34c
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13.csv
@@ -0,0 +1,28 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+130001,202001,100,6583,20,,
+130001,202002,100,3759,20,,
+130001,202003,100,8256,20,,
+130001,202004,100,6743,20,,
+130001,202005,100,6811,20,,
+130001,202006,100,9896,20,,
+130001,202007,100,3282,20,,
+130002,202001,100,687,69,,
+130002,202002,100,8987,69,,
+130002,202003,100,371,69,,
+130002,202004,100,3385,69,,
+130002,202005,100,6606,69,,
+130002,202006,100,5901,69,,
+130002,202007,100,9834,69,,
+130003,202001,100,7113,39,,
+130003,202002,100,8583,39,,
+130003,202003,100,5129,39,,
+130003,202004,100,2024,39,,
+130003,202005,100,9422,39,,
+130003,202006,100,8710,39,,
+130003,202007,100,6461,39,,
+130004,202001,100,2571,37,,
+130004,202002,100,,37,,
+130004,202003,100,,37,,
+130004,202005,100,,37,,
+130004,202006,100,,37,,
+130004,202007,100,6621,37,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13_output.csv
new file mode 100644
index 00000000..41be2f11
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13_output.csv
@@ -0,0 +1,28 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+130001,202001,100,6583,20,,,,1.751263634,,0.885479533,102.7515152,6583,R,,3,4
+130001,202002,100,3759,20,,,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3759,R,3,3,3
+130001,202003,100,8256,20,,,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,8256,R,3,3,3
+130001,202004,100,6743,20,,,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,6743,R,3,3,3
+130001,202005,100,6811,20,,,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,6811,R,3,3,3
+130001,202006,100,9896,20,,,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,9896,R,3,3,3
+130001,202007,100,3282,20,,,0.331649151,,0.913312467,,158.7757576,3282,R,3,,4
+130002,202001,100,687,69,,,,0.076443752,,0.885479533,102.7515152,687,R,,3,4
+130002,202002,100,8987,69,,,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,8987,R,3,3,3
+130002,202003,100,371,69,,,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,371,R,3,3,3
+130002,202004,100,3385,69,,,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3385,R,3,3,3
+130002,202005,100,6606,69,,,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,6606,R,3,3,3
+130002,202006,100,5901,69,,,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,5901,R,3,3,3
+130002,202007,100,9834,69,,,1.666497204,,0.913312467,,158.7757576,9834,R,3,,4
+130003,202001,100,7113,39,,,,0.828731213,,0.885479533,102.7515152,7113,R,,3,4
+130003,202002,100,8583,39,,,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,8583,R,3,3,3
+130003,202003,100,5129,39,,,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,5129,R,3,3,3
+130003,202004,100,2024,39,,,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,2024,R,3,3,3
+130003,202005,100,9422,39,,,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,9422,R,3,3,3
+130003,202006,100,8710,39,,,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,8710,R,3,3,3
+130003,202007,100,6461,39,,,0.741791045,,0.913312467,,158.7757576,6461,R,3,,4
+130004,202001,100,2571,37,,,,,,0.885479533,102.7515152,2571,R,,3,4
+130004,202002,100,,37,,,,,4.953064646,8.784150176,166.6328125,12734.3292,FIR,3,3,3
+130004,202003,100,,37,,,,,0.945062422,1.289357643,107.46875,12034.73601,FIR,3,3,3
+130004,202005,100,,37,,,,,2.538924611,0.963158093,178.4296875,10550.61563,BI,3,3,3
+130004,202006,100,,37,,,,,1.090218262,1.654461386,191.4609375,10954.18883,BI,3,3,3
+130004,202007,100,6621,37,,,,,0.913312467,,158.7757576,6621,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14.csv
new file mode 100644
index 00000000..dec72b37
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14.csv
@@ -0,0 +1,28 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+140001,202001,100,3582,27,,
+140001,202002,100,4533,27,,
+140001,202003,100,4471,27,,
+140001,202004,100,3040,27,,
+140001,202005,100,8519,27,,
+140001,202006,100,8690,27,,
+140001,202007,100,9979,27,,
+140002,202001,100,5359,83,,
+140002,202002,100,7091,83,,
+140002,202003,100,7098,83,,
+140002,202004,100,7408,83,,
+140002,202005,100,1937,83,,
+140002,202006,100,6711,83,,
+140002,202007,100,1052,83,,
+140003,202001,100,439,89,,
+140003,202002,100,7783,89,,
+140003,202003,100,897,89,,
+140003,202004,100,8477,89,,
+140003,202005,100,2207,89,,
+140003,202006,100,9889,89,,
+140003,202007,100,2528,89,,
+140004,202001,100,,28,,
+140004,202002,100,,28,,
+140004,202003,100,,28,,
+140004,202005,100,,28,,
+140004,202006,100,,28,,
+140004,202007,100,7243,28,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_output.csv
new file mode 100644
index 00000000..9122440f
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_output.csv
@@ -0,0 +1,28 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+140001,202001,100,3582,27,,,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3
+140001,202002,100,4533,27,,,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3
+140001,202003,100,4471,27,,,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3
+140001,202004,100,3040,27,,,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3
+140001,202005,100,8519,27,,,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3
+140001,202006,100,8690,27,,,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3
+140001,202007,100,9979,27,,,1.148331415,,0.520242185,,91.63876652,9979,R,3,,4
+140002,202001,100,5359,83,,,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3
+140002,202002,100,7091,83,,,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3
+140002,202003,100,7098,83,,,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3
+140002,202004,100,7408,83,,,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3
+140002,202005,100,1937,83,,,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3
+140002,202006,100,6711,83,,,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3
+140002,202007,100,1052,83,,,0.156757562,,0.520242185,,91.63876652,1052,R,3,,4
+140003,202001,100,439,89,,,,0.056404985,,0.534118956,47.13567839,439,R,,3,3
+140003,202002,100,7783,89,,,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3
+140003,202003,100,897,89,,,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3
+140003,202004,100,8477,89,,,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3
+140003,202005,100,2207,89,,,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3
+140003,202006,100,9889,89,,,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3
+140003,202007,100,2528,89,,,0.255637577,,0.520242185,,91.63876652,2528,R,3,,4
+140004,202001,100,,28,,,,,,0.534118956,47.13567839,1319.798995,C,,3,3
+140004,202002,100,,28,,,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3
+140004,202003,100,,28,,,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3
+140004,202005,100,,28,,,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3
+140004,202006,100,,28,,,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3
+140004,202007,100,7243,28,,,,,0.520242185,,91.63876652,7243,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_t_output_trial1.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_t_output_trial1.csv
new file mode 100644
index 00000000..a2ca6328
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_t_output_trial1.csv
@@ -0,0 +1,42 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fr_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+140001,202001,100,3582,27,,,,0.790205162,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3
+140001,202002,100,4533,27,,,1.265494137,1.013867144,1.265494137,1.013867144,6.772539381,3.563193687,97.52261307,4533,R,3,3,3
+140001,202003,100,4471,27,,,0.986322524,1.470723684,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3
+140001,202004,100,3040,27,,,0.679937374,0.356849395,0.679937374,,3.104984977,2.674093602,95.10050251,3040,R,3,3,3
+140001,202005,100,8519,27,,,2.802302632,0.980322209,,,0.865602079,0.497376695,63.63316583,8519,R,3,3,3
+140001,202006,100,8690,27,,,1.020072778,0.87082874,,0.87082874,3.05648882,3.720631427,127.0854271,8690,R,3,3,3
+140001,202007,100,9979,27,,,1.148331415,,1.148331415,,0.557462816,,91.63876652,9979,R,3,,4
+140002,202001,100,5359,83,,,,0.755746721,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3
+140002,202002,100,7091,83,,,1.323194626,0.999013807,1.323194626,0.999013807,6.772539381,3.563193687,97.52261307,7091,R,3,3,3
+140002,202003,100,7098,83,,,1.000987167,0.958153348,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3
+140002,202004,100,7408,83,,,1.043674274,3.824470831,1.043674274,3.824470831,3.104984977,2.674093602,95.10050251,7408,R,3,3,3
+140002,202005,100,1937,83,,,0.261474082,0.288630606,0.261474082,0.288630606,0.865602079,0.497376695,63.63316583,1937,R,3,3,3
+140002,202006,100,6711,83,,,3.464636035,6.379277567,3.464636035,,3.05648882,3.720631427,127.0854271,6711,R,3,3,3
+140002,202007,100,1052,83,,,0.156757562,,,,0.557462816,,91.63876652,1052,R,3,,4
+140003,202001,100,439,89,,,,0.056404985,,0.056404985,,0.534118956,47.13567839,439,R,,3,3
+140003,202002,100,7783,89,,,17.72892938,8.676700111,17.72892938,8.676700111,6.772539381,3.563193687,97.52261307,7783,R,3,3,3
+140003,202003,100,897,89,,,0.115251188,0.105815737,0.115251188,,0.700853626,0.84489759,62.64321608,897,R,3,3,3
+140003,202004,100,8477,89,,,9.45039019,3.84096058,,,3.104984977,2.674093602,95.10050251,8477,R,3,3,3
+140003,202005,100,2207,89,,,0.260351539,0.223177268,,0.223177268,0.865602079,0.497376695,63.63316583,2207,R,3,3,3
+140003,202006,100,9889,89,,,4.48074309,3.911787975,4.48074309,3.911787975,3.05648882,3.720631427,127.0854271,9889,R,3,3,3
+140003,202007,100,2528,89,,,0.255637577,,0.255637577,,0.557462816,,91.63876652,2528,R,3,,4
+140004,202001,100,2866,23,,,,0.842885506,,,,,,,R,,,
+140004,202002,100,3400,23,,,1.186400754,0.844889287,,,6.772539381,,,,R,,,
+140004,202003,100,4024,23,,,1.183587028,1.946546053,,,0.700853626,,,,R,,,
+140004,202004,100,2067,23,,,0.51373046,0.485315178,,0.485315178,3.104984977,,,,R,,,
+140004,202005,100,4260,23,,,2.060516641,0.816935175,2.060516641,0.816935175,0.865602079,,,,R,,,
+140004,202006,100,5214,23,,,1.224087334,0.549997099,1.224087334,0.549997099,3.05648882,,,,R,,,
+140004,202007,100,9480,23,,,1.818191408,,,,0.557462816,,,,R,,,
+140005,202001,100,483,94,,,,0.05304195,,0.05304195,,,,,R,,,
+140005,202002,100,9106,94,,,18.85300207,9.060696517,,9.060696517,6.772539381,,,,R,,,
+140005,202003,100,1005,94,,,0.110366791,0.131728992,,0.131728992,0.700853626,,,,R,,,
+140005,202004,100,7629,94,,,7.591343284,3.63880476,7.591343284,3.63880476,3.104984977,,,,R,,,
+140005,202005,100,2097,94,,,0.274815514,0.176682004,0.274815514,0.176682004,0.865602079,,,,R,,,
+140005,202006,100,11867,94,,,5.659886009,3.725512357,,3.725512357,3.05648882,,,,R,,,
+140005,202007,100,3185,94,,,0.268419456,,0.268419456,,0.557462816,,,,R,,,
+140006,202001,100,,28,,,,,,,,0.534118956,47.13567839,1319.798995,C,,3,3
+140006,202002,100,,28,,,,,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3
+140006,202003,100,,28,,,,,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3
+140006,202005,100,,28,,,,,,,0.865602079,0.497376695,63.63316583,13403.57248,BI,3,3,3
+140006,202006,100,,28,,,,,,,3.05648882,3.720631427,127.0854271,26948.53343,BI,3,3,3
+140006,202007,100,7243,28,,,,,,,0.557462816,,91.63876652,7243,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15.csv
new file mode 100644
index 00000000..1eeb18ea
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15.csv
@@ -0,0 +1,28 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+150001,202001,100,5891,15,,
+150001,202002,100,4581,15,,
+150001,202003,100,4741,15,,
+150001,202004,100,8092,15,,
+150001,202005,100,2727,15,,
+150001,202006,100,2363,15,,
+150001,202007,100,9549,15,,
+150002,202001,100,8611,5,,
+150002,202002,100,9383,5,,
+150002,202003,100,1064,5,,
+150002,202004,100,7419,5,,
+150002,202005,100,9967,5,,
+150002,202006,100,1393,5,,
+150002,202007,100,2593,5,,
+150003,202001,100,3426,79,,
+150003,202002,100,6246,79,,
+150003,202003,100,8402,79,,
+150003,202004,100,3891,79,,
+150003,202005,100,5463,79,,
+150003,202006,100,6852,79,,
+150003,202007,100,2959,79,,
+150004,202001,100,,69,,
+150004,202002,100,,69,,
+150004,202003,100,4208,69,,
+150004,202005,100,2818,69,,
+150004,202006,100,,69,,
+150004,202007,100,,69,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15_output.csv
new file mode 100644
index 00000000..a7cbfda8
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15_output.csv
@@ -0,0 +1,28 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+150001,202001,100,5891,15,,,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3
+150001,202002,100,4581,15,,,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3
+150001,202003,100,4741,15,,,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4
+150001,202004,100,8092,15,,,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3
+150001,202005,100,2727,15,,,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,2727,R,3,3,4
+150001,202006,100,2363,15,,,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3
+150001,202007,100,9549,15,,,4.041049513,,2.111448113,,152.5353535,9549,R,3,,3
+150002,202001,100,8611,5,,,,0.917723543,,0.917399451,181.0909091,8611,R,,3,3
+150002,202002,100,9383,5,,,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3
+150002,202003,100,1064,5,,,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4
+150002,202004,100,7419,5,,,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3
+150002,202005,100,9967,5,,,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,9967,R,3,3,4
+150002,202006,100,1393,5,,,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3
+150002,202007,100,2593,5,,,1.861450108,,2.111448113,,152.5353535,2593,R,3,,3
+150003,202001,100,3426,79,,,,0.548511047,,0.917399451,181.0909091,3426,R,,3,3
+150003,202002,100,6246,79,,,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3
+150003,202003,100,8402,79,,,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4
+150003,202004,100,3891,79,,,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3
+150003,202005,100,5463,79,,,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,5463,R,3,3,4
+150003,202006,100,6852,79,,,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3
+150003,202007,100,2959,79,,,0.431844717,,2.111448113,,152.5353535,2959,R,3,,3
+150004,202001,100,,69,,,,,,0.917399451,181.0909091,13547.81819,BI,,3,3
+150004,202002,100,,69,,,,,1.230132332,3.509418433,204.1414141,14767.63276,BI,3,3,3
+150004,202003,100,4208,69,,,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4
+150004,202005,100,2818,69,,,,,1.028150423,3.035462652,124.8511905,2818,R,3,3,4
+150004,202006,100,,69,,,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3
+150004,202007,100,,69,,,,,2.111448113,,152.5353535,4483.444383,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16.csv
new file mode 100644
index 00000000..da3da70a
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16.csv
@@ -0,0 +1,28 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+160001,202001,100,2086,76,,
+160001,202002,100,4154,76,,
+160001,202003,100,1610,76,,
+160001,202004,100,3600,76,,
+160001,202005,100,6317,76,,
+160001,202006,100,5703,76,,
+160001,202007,100,1666,76,,
+160002,202001,100,430,32,,
+160002,202002,100,9669,32,,
+160002,202003,100,1748,32,,
+160002,202004,100,2380,32,,
+160002,202005,100,7871,32,,
+160002,202006,100,8806,32,,
+160002,202007,100,2678,32,,
+160003,202001,100,3232,85,,
+160003,202002,100,6342,85,,
+160003,202003,100,2988,85,,
+160003,202004,100,860,85,,
+160003,202005,100,9227,85,,
+160003,202006,100,2393,85,,
+160003,202007,100,9508,85,,
+160004,202001,100,,33,,
+160004,202002,100,,33,,
+160004,202003,100,1129,33,,
+160004,202005,100,,33,,
+160004,202006,100,,33,,
+160004,202007,100,,33,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0.csv
new file mode 100644
index 00000000..27cf50be
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0.csv
@@ -0,0 +1,35 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+160001,202001,100,2086,76,,
+160001,202002,100,4154,76,,
+160001,202003,100,1610,76,,
+160001,202004,100,3600,76,,
+160001,202005,100,6317,76,,
+160001,202006,100,5703,76,,
+160001,202007,100,1666,76,,
+160002,202001,100,430,32,,
+160002,202002,100,9669,32,,
+160002,202003,100,1748,32,,
+160002,202004,100,2380,32,,
+160002,202005,100,7871,32,,
+160002,202006,100,8806,32,,
+160002,202007,100,2678,32,,
+160003,202001,100,3232,85,,
+160003,202002,100,6342,85,,
+160003,202003,100,2988,85,,
+160003,202004,100,860,85,,
+160003,202005,100,9227,85,,
+160003,202006,100,2393,85,,
+160003,202007,100,9508,85,,
+160004,202001,100,0,42,,
+160004,202002,100,0,42,,
+160004,202003,100,0,42,,
+160004,202004,100,0,42,,
+160004,202005,100,0,42,,
+160004,202006,100,0,42,,
+160004,202007,100,0,42,,
+160005,202001,100,,33,,
+160005,202002,100,,33,,
+160005,202003,100,1129,33,,
+160005,202005,100,,33,,
+160005,202006,100,,33,,
+160005,202007,100,,33,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_inc_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_inc_output.csv
new file mode 100644
index 00000000..93edc9fb
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_inc_output.csv
@@ -0,0 +1,35 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+160001,202001,100,2086,76,,,,0.502166586,,0.514064257,24.45957447,2086,R,,4,4
+160001,202002,100,4154,76,,,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4154,R,4,4,4
+160001,202003,100,1610,76,,,0.387578238,0.447222222,0.509876734,1.414023652,30.00746269,1610,R,4,4,5
+160001,202004,100,3600,76,,,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,3600,R,4,4,4
+160001,202005,100,6317,76,,,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,6317,R,4,4,4
+160001,202006,100,5703,76,,,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,5703,R,4,4,4
+160001,202007,100,1666,76,,,0.292126951,,1.392373278,,58.94468085,1666,R,4,,4
+160002,202001,100,430,32,,,,0.044472024,,0.514064257,24.45957447,430,R,,4,4
+160002,202002,100,9669,32,,,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,9669,R,4,4,4
+160002,202003,100,1748,32,,,0.180783949,0.734453782,0.509876734,1.414023652,30.00746269,1748,R,4,4,5
+160002,202004,100,2380,32,,,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,2380,R,4,4,4
+160002,202005,100,7871,32,,,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,7871,R,4,4,4
+160002,202006,100,8806,32,,,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,8806,R,4,4,4
+160002,202007,100,2678,32,,,0.304110834,,1.392373278,,58.94468085,2678,R,4,,4
+160003,202001,100,3232,85,,,,0.509618417,,0.514064257,24.45957447,3232,R,,4,4
+160003,202002,100,6342,85,,,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,6342,R,4,4,4
+160003,202003,100,2988,85,,,0.471144749,3.474418605,0.509876734,1.414023652,30.00746269,2988,R,4,4,5
+160003,202004,100,860,85,,,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,860,R,4,4,4
+160003,202005,100,9227,85,,,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,9227,R,4,4,4
+160003,202006,100,2393,85,,,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,2393,R,4,4,4
+160003,202007,100,9508,85,,,3.973255328,,1.392373278,,58.94468085,9508,R,4,,4
+160004,202001,100,0,42,,,,1,,0.514064257,24.45957447,0,R,,4,4
+160004,202002,100,0,42,,,1,1,6.859917508,2.808519679,85.80851064,0,R,4,4,4
+160004,202003,100,567,42,,,1,1,0.509876734,1.414023652,30.00746269,567,R,4,4,5
+160004,202004,100,0,42,,,1,1,1.221349712,0.491367827,29.10638298,0,R,4,4,4
+160004,202005,100,0,42,,,1,1,4.197733712,1.714328633,99.63829787,0,R,4,4,4
+160004,202006,100,0,42,,,1,1,0.820235007,1.990781723,71.92340426,0,R,4,4,4
+160004,202007,100,0,42,,,1,,1.392373278,,58.94468085,0,R,4,,4
+160005,202001,100,,33,,,,,,0.514064257,24.45957447,1630.004567,BI,,4,4
+160005,202002,100,,33,,,,,6.859917508,2.808519679,85.80851064,3170.818717,BI,4,4,4
+160005,202003,100,1129,33,,,,,0.509876734,1.414023652,30.00746269,1129,R,4,4,5
+160005,202005,100,,33,,,,,4.197733712,1.714328633,99.63829787,3288.06383,C,4,4,4
+160005,202006,100,,33,,,,,0.820235007,1.990781723,71.92340426,2696.985058,FIC,4,4,4
+160005,202007,100,,33,,,,,1.392373278,,58.94468085,3755.209926,FIC,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_output.csv
new file mode 100644
index 00000000..d4a9f482
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_output.csv
@@ -0,0 +1,35 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+160001,202001,100,2086,76,,,,0.502166586,,0.352085676,24.45957447,2086,R,,3,4
+160001,202002,100,4154,76,,,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,4154,R,3,3,4
+160001,202003,100,1610,76,,,0.387578238,0.447222222,0.346502312,1.552031536,30.00746269,1610,R,3,3,5
+160001,202004,100,3600,76,,,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3600,R,3,3,4
+160001,202005,100,6317,76,,,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,6317,R,3,3,4
+160001,202006,100,5703,76,,,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,5703,R,3,3,4
+160001,202007,100,1666,76,,,0.292126951,,1.523164371,,58.94468085,1666,R,3,,4
+160002,202001,100,430,32,,,,0.044472024,,0.352085676,24.45957447,430,R,,3,4
+160002,202002,100,9669,32,,,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,9669,R,3,3,4
+160002,202003,100,1748,32,,,0.180783949,0.734453782,0.346502312,1.552031536,30.00746269,1748,R,3,3,5
+160002,202004,100,2380,32,,,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,2380,R,3,3,4
+160002,202005,100,7871,32,,,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,7871,R,3,3,4
+160002,202006,100,8806,32,,,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,8806,R,3,3,4
+160002,202007,100,2678,32,,,0.304110834,,1.523164371,,58.94468085,2678,R,3,,4
+160003,202001,100,3232,85,,,,0.509618417,,0.352085676,24.45957447,3232,R,,3,4
+160003,202002,100,6342,85,,,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,6342,R,3,3,4
+160003,202003,100,2988,85,,,0.471144749,3.474418605,0.346502312,1.552031536,30.00746269,2988,R,3,3,5
+160003,202004,100,860,85,,,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,860,R,3,3,4
+160003,202005,100,9227,85,,,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,9227,R,3,3,4
+160003,202006,100,2393,85,,,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,2393,R,3,3,4
+160003,202007,100,9508,85,,,3.973255328,,1.523164371,,58.94468085,9508,R,3,,4
+160004,202001,100,0,42,,,,,,0.352085676,24.45957447,0,R,,3,4
+160004,202002,100,0,42,,,,,8.813223343,3.411359572,85.80851064,0,R,3,3,4
+160004,202003,100,567,42,,,,,0.346502312,1.552031536,30.00746269,567,R,3,3,5
+160004,202004,100,0,42,,,,,1.295132949,0.321823769,29.10638298,0,R,3,3,4
+160004,202005,100,0,42,,,,,5.26364495,1.952438177,99.63829787,0,R,3,3,4
+160004,202006,100,0,42,,,,,0.760313342,2.321042298,71.92340426,0,R,3,3,4
+160004,202007,100,0,42,,,,,1.523164371,,58.94468085,0,R,3,,4
+160005,202001,100,,33,,,,,,0.352085676,24.45957447,1356.031558,BI,,3,4
+160005,202002,100,,33,,,,,8.813223343,3.411359572,85.80851064,3851.424956,BI,3,3,4
+160005,202003,100,1129,33,,,,,0.346502312,1.552031536,30.00746269,1129,R,3,3,5
+160005,202005,100,,33,,,,,5.26364495,1.952438177,99.63829787,3288.06383,C,3,3,4
+160005,202006,100,,33,,,,,0.760313342,2.321042298,71.92340426,2499.9588,FIC,3,3,4
+160005,202007,100,,33,,,,,1.523164371,,58.94468085,3807.848172,FIC,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_output.csv
new file mode 100644
index 00000000..b71bd5a6
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_output.csv
@@ -0,0 +1,28 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+160001,202001,100,2086,76,,,,0.502166586,,0.352085676,29.78238342,2086,R,,3,3
+160001,202002,100,4154,76,,,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,4154,R,3,3,3
+160001,202003,100,1610,76,,,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,1610,R,3,3,4
+160001,202004,100,3600,76,,,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3600,R,3,3,3
+160001,202005,100,6317,76,,,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,6317,R,3,3,3
+160001,202006,100,5703,76,,,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,5703,R,3,3,3
+160001,202007,100,1666,76,,,0.292126951,,1.523164371,,71.77202073,1666,R,3,,3
+160002,202001,100,430,32,,,,0.044472024,,0.352085676,29.78238342,430,R,,3,3
+160002,202002,100,9669,32,,,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,9669,R,3,3,3
+160002,202003,100,1748,32,,,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,1748,R,3,3,4
+160002,202004,100,2380,32,,,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,2380,R,3,3,3
+160002,202005,100,7871,32,,,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,7871,R,3,3,3
+160002,202006,100,8806,32,,,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,8806,R,3,3,3
+160002,202007,100,2678,32,,,0.304110834,,1.523164371,,71.77202073,2678,R,3,,3
+160003,202001,100,3232,85,,,,0.509618417,,0.352085676,29.78238342,3232,R,,3,3
+160003,202002,100,6342,85,,,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,6342,R,3,3,3
+160003,202003,100,2988,85,,,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,2988,R,3,3,4
+160003,202004,100,860,85,,,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,860,R,3,3,3
+160003,202005,100,9227,85,,,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,9227,R,3,3,3
+160003,202006,100,2393,85,,,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,2393,R,3,3,3
+160003,202007,100,9508,85,,,3.973255328,,1.523164371,,71.77202073,9508,R,3,,3
+160004,202001,100,,33,,,,,,0.352085676,29.78238342,1356.031558,BI,,3,3
+160004,202002,100,,33,,,,,8.813223344,3.411359571,104.4818653,3851.424956,BI,3,3,3
+160004,202003,100,1129,33,,,,,0.346502312,1.552031536,33.07522124,1129,R,3,3,4
+160004,202005,100,,33,,,,,5.263644949,1.952438177,121.3212435,4003.601036,C,3,3,3
+160004,202006,100,,33,,,,,0.760313342,2.321042298,87.57512953,3043.991285,FIC,3,3,3
+160004,202007,100,,33,,,,,1.523164371,,71.77202073,4636.49907,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17.csv
new file mode 100644
index 00000000..943f7e4b
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17.csv
@@ -0,0 +1,15 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+170001,202001,100,6480,69,,
+170001,202002,100,9912,69,,
+170001,202003,100,603,69,,
+170001,202004,100,7120,69,,
+170002,202001,100,449,62,,
+170002,202002,100,3692,62,,
+170002,202003,100,8401,62,,
+170002,202004,100,6745,62,,
+170003,202001,100,1961,81,,
+170003,202002,100,7833,81,,
+170003,202003,100,9761,81,,
+170003,202004,100,9250,81,,
+170004,202002,100,3913,9,,
+170004,202003,100,,9,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17_output.csv
new file mode 100644
index 00000000..6a95df5d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17_output.csv
@@ -0,0 +1,15 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+170001,202001,100,6480,69,,,,0.653753027,,0.341906136,41.93396226,6480,R,,3,3
+170001,202002,100,9912,69,,,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,9912,R,3,3,4
+170001,202003,100,603,69,,,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,603,R,3,3,3
+170001,202004,100,7120,69,,,11.80762852,,4.51938598,,109.0330189,7120,R,3,,3
+170002,202001,100,449,62,,,,0.121614301,,0.341906136,41.93396226,449,R,,3,3
+170002,202002,100,3692,62,,,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3692,R,3,3,4
+170002,202003,100,8401,62,,,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,8401,R,3,3,3
+170002,202004,100,6745,62,,,0.802880609,,4.51938598,,109.0330189,6745,R,3,,3
+170003,202001,100,1961,81,,,,0.250351079,,0.341906136,41.93396226,1961,R,,3,3
+170003,202002,100,7833,81,,,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,7833,R,3,3,4
+170003,202003,100,9761,81,,,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,9761,R,3,3,3
+170003,202004,100,9250,81,,,0.947648806,,4.51938598,,109.0330189,9250,R,3,,3
+170004,202002,100,3913,9,,,,,4.582245799,5.893253897,114.7058824,3913,R,3,3,4
+170004,202003,100,,9,,,,,1.194144647,0.795149817,88.51415094,3914.194145,FIR,3,3,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18.csv
new file mode 100644
index 00000000..ee161ddb
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18.csv
@@ -0,0 +1,15 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+180001,202001,100,9188,91,,
+180001,202002,100,6853,91,,
+180001,202003,100,2418,91,,
+180001,202004,100,9291,91,,
+180002,202001,100,3829,26,,
+180002,202002,100,7588,26,,
+180002,202003,100,7335,26,,
+180002,202004,100,8415,26,,
+180003,202001,100,3774,19,,
+180003,202002,100,8136,19,,
+180003,202003,100,4209,19,,
+180003,202004,100,6168,19,,
+180004,202002,100,,26,,
+180004,202003,100,6099,26,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18_output.csv
new file mode 100644
index 00000000..1254c705
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18_output.csv
@@ -0,0 +1,15 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+180001,202001,100,9188,91,,,,1.340726689,,0.769734514,123.4632353,9188,R,,3,3
+180001,202002,100,6853,91,,,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,6853,R,3,3,3
+180001,202003,100,2418,91,,,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,2418,R,3,3,4
+180001,202004,100,9291,91,,,3.842431762,,2.151700748,,175.5441176,9291,R,3,,3
+180002,202001,100,3829,26,,,,0.504612546,,0.769734514,123.4632353,3829,R,,3,3
+180002,202002,100,7588,26,,,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,7588,R,3,3,3
+180002,202003,100,7335,26,,,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,7335,R,3,3,4
+180002,202004,100,8415,26,,,1.147239264,,2.151700748,,175.5441176,8415,R,3,,3
+180003,202001,100,3774,19,,,,0.463864307,,0.769734514,123.4632353,3774,R,,3,3
+180003,202002,100,8136,19,,,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,8136,R,3,3,3
+180003,202003,100,4209,19,,,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,4209,R,3,3,4
+180003,202004,100,6168,19,,,1.465431219,,2.151700748,,175.5441176,6168,R,3,,3
+180004,202002,100,,26,,,,,1.627795166,1.933884446,166.0073529,11794.76123,BI,3,3,3
+180004,202003,100,6099,26,,,,,0.612275479,0.604767536,123.8333333,6099,R,3,3,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19.csv
new file mode 100644
index 00000000..a7a81066
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,forward_link,backward_link,construction_link
+190001,202001,100,9261,95,,,,0.9214,50.3694
+190001,202002,100,4996,95,,,0.8521,1.5274,121.4187
+190001,202003,100,1480,95,,,0.9685,1.8795,89.3761
+190001,202004,100,4350,95,,,1.113,,110.5473
+190002,202001,100,2433,17,,,,0.9214,50.3694
+190002,202002,100,4324,17,,,0.8521,1.5274,121.4187
+190002,202003,100,6598,17,,,0.9685,1.8795,89.3761
+190002,202004,100,700,17,,,1.113,,110.5473
+190003,202001,100,7888,64,,,,0.9214,50.3694
+190003,202002,100,4218,64,,,0.8521,1.5274,121.4187
+190003,202003,100,7591,64,,,0.9685,1.8795,89.3761
+190003,202004,100,4077,64,,,1.113,,110.5473
+190004,202001,100,2247,51,,,,0.9214,50.3694
+190004,202002,100,,51,,,0.8521,1.5274,121.4187
+190004,202003,100,,51,,,0.9685,1.8795,89.3761
+190004,202004,100,8608,51,,,1.113,,110.5473
+190005,202001,100,,34,,,,0.9214,50.3694
+190005,202002,100,,34,,,0.8521,1.5274,121.4187
+190005,202003,100,4456,34,,,0.9685,1.8795,89.3761
+190005,202004,100,5134,34,,,1.113,,110.5473
+190006,202001,100,,8,,,,0.9214,50.3694
+190006,202002,100,,8,,,0.8521,1.5274,121.4187
+190006,202003,100,,8,,,0.9685,1.8795,89.3761
+190006,202004,100,,8,,,1.113,,110.5473
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19_output.csv
new file mode 100644
index 00000000..16058275
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19_output.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,calc_fi,calc_bi,calc_cons
+190001,202001,100,9261,95,,,,1.853682946,,0.9214,50.3694,9261,R,,3,4,,1.428812335,96.16299559
+190001,202002,100,4996,95,,,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,3,3,3,0.86670161,1.528894599,76.92045455
+190001,202003,100,1480,95,,,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,3,4,4,0.733999278,3.123947916,95.83333333
+190001,202004,100,4350,95,,,2.939189189,,1.113,,110.5473,4350,R,4,,5,3.974249601,,87.62068966
+190002,202001,100,2433,17,,,,0.562673451,,0.9214,50.3694,2433,R,,3,4,,1.428812335,96.16299559
+190002,202002,100,4324,17,,,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,3,3,3,0.86670161,1.528894599,76.92045455
+190002,202003,100,6598,17,,,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,3,4,4,0.733999278,3.123947916,95.83333333
+190002,202004,100,700,17,,,11.26857143,,1.113,,110.5473,700,R,4,,5,3.974249601,,87.62068966
+190003,202001,100,7888,64,,,,1.870080607,,0.9214,50.3694,7888,R,,3,4,,1.428812335,96.16299559
+190003,202002,100,4218,64,,,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,3,3,3,0.86670161,1.528894599,76.92045455
+190003,202003,100,7591,64,,,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,3,4,4,0.733999278,3.123947916,95.83333333
+190003,202004,100,4077,64,,,0.537083388,,1.113,,110.5473,4077,R,4,,5,3.974249601,,87.62068966
+190004,202001,100,2247,51,,,,,,0.9214,50.3694,2247,R,,3,4,,1.428812335,96.16299559
+190004,202002,100,,51,,,,,0.8521,1.5274,121.4187,1914.6687,FIR,3,3,3,0.86670161,1.528894599,76.92045455
+190004,202003,100,,51,,,,,0.9685,1.8795,89.3761,1854.356636,FIR,3,4,4,0.733999278,3.123947916,95.83333333
+190004,202004,100,8608,51,,,,,1.113,,110.5473,8608,R,4,,5,3.974249601,,87.62068966
+190005,202001,100,,34,,,,,,0.9214,50.3694,6271.13538,BI,,3,4,,1.428812335,96.16299559
+190005,202002,100,,34,,,,,0.8521,1.5274,121.4187,6806.0944,BI,3,3,3,0.86670161,1.528894599,76.92045455
+190005,202003,100,4456,34,,,,0.867939229,0.9685,1.8795,89.3761,4456,R,3,4,4,0.733999278,3.123947916,95.83333333
+190005,202004,100,5134,34,,,1.152154399,,1.113,,110.5473,5134,R,4,,5,3.974249601,,87.62068966
+190006,202001,100,,8,,,,,,0.9214,50.3694,402.9552,C,,3,4,,1.428812335,96.16299559
+190006,202002,100,,8,,,,,0.8521,1.5274,121.4187,343.3581259,FIC,3,3,3,0.86670161,1.528894599,76.92045455
+190006,202003,100,,8,,,,,0.9685,1.8795,89.3761,332.542345,FIC,3,4,4,0.733999278,3.123947916,95.83333333
+190006,202004,100,,8,,,,,1.113,,110.5473,370.1196299,FIC,4,,5,3.974249601,,87.62068966
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1_output.csv
new file mode 100644
index 00000000..0387c2de
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1_output.csv
@@ -0,0 +1,5 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+10001,202001,100,,1,,,,,,,147.8876404,3892,R,,,3
+10002,202001,100,,75,,,,,,,147.8876404,3873,R,,,3
+10003,202001,100,,13,,,,,,,147.8876404,5397,R,,,3
+10004,202001,100,,71,,,,,,,147.8876404,10500.02247,C,,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2.csv
new file mode 100644
index 00000000..1c9a179e
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2.csv
@@ -0,0 +1,9 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+20001,202001,100,2536,35,,
+20001,202002,100,8283,35,,
+20002,202001,100,9113,72,,
+20002,202002,100,2970,72,,
+20003,202001,100,5644,77,,
+20003,202002,100,989,77,,
+20004,202001,100,,30,,
+20004,202002,100,,30,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20.csv
new file mode 100644
index 00000000..27d229a1
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20.csv
@@ -0,0 +1,48 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+200001,202001,100,7788,56,,
+200001,202002,100,6169,56,,
+200001,202003,100,6156,56,,
+200001,202004,100,1577,56,,
+200002,202001,100,6533,75,,
+200002,202002,100,8103,75,,
+200002,202003,100,5860,75,,
+200002,202004,100,2575,75,,
+200003,202001,100,56,10,,
+200003,202002,100,4978,10,,
+200003,202003,100,8777,10,,
+200003,202004,100,906,10,,
+200004,202001,100,1884,86,,
+200004,202002,100,6075,86,,
+200004,202003,100,,86,,
+200004,202004,100,,86,,
+200005,202001,100,,6,,
+200005,202002,100,,6,,
+200005,202003,100,,6,,
+200005,202004,100,,6,,
+200006,202001,100,,41,,
+200006,202002,100,,41,,
+200006,202003,100,8882,41,,
+200006,202004,100,2711,41,,
+200007,202001,200,2439,4,,
+200007,202002,200,9675,4,,
+200007,202003,200,7003,4,,
+200007,202004,200,595,4,,
+200008,202001,200,1849,4,,
+200008,202002,200,6436,4,,
+200008,202003,200,9709,4,,
+200008,202004,200,2727,4,,
+200009,202001,200,8742,45,,
+200009,202002,200,1469,45,,
+200009,202003,200,8602,45,,
+200009,202004,200,1945,45,,
+200010,202001,200,,85,,
+200010,202002,200,6489,85,,
+200010,202003,200,1796,85,,
+200010,202004,200,,85,,
+200011,202001,200,,79,,
+200011,202002,200,1926,79,,
+200011,202004,200,,79,,
+200012,202001,200,5495,87,,
+200012,202002,200,,87,,
+200012,202003,200,,87,,
+200012,202004,200,,87,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20_output.csv
new file mode 100644
index 00000000..5625e3c2
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20_output.csv
@@ -0,0 +1,48 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+200001,202001,100,7788,56,,,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4
+200001,202002,100,6169,56,,,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4
+200001,202003,100,6156,56,,,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4
+200001,202004,100,1577,56,,,0.25617284,,0.276010255,,42.68681319,1577,R,4,,4
+200002,202001,100,6533,75,,,,0.806244601,,0.597514698,71.63436123,6533,R,,4,4
+200002,202002,100,8103,75,,,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4
+200002,202003,100,5860,75,,,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4
+200002,202004,100,2575,75,,,0.439419795,,0.276010255,,42.68681319,2575,R,4,,4
+200003,202001,100,56,10,,,,0.011249498,,0.597514698,71.63436123,56,R,,4,4
+200003,202002,100,4978,10,,,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4
+200003,202003,100,8777,10,,,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4
+200003,202004,100,906,10,,,0.103224336,,0.276010255,,42.68681319,906,R,4,,4
+200004,202001,100,1884,86,,,,0.310123457,,0.597514698,71.63436123,1884,R,,4,4
+200004,202002,100,6075,86,,,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4
+200004,202003,100,,86,,,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4
+200004,202004,100,,86,,,,,0.276010255,,42.68681319,1947.413826,FIR,4,,4
+200005,202001,100,,6,,,,,,0.597514698,71.63436123,429.8061674,C,,4,4
+200005,202002,100,,6,,,,,23.53745347,0.984013482,111.5638767,10116.54267,FIC,4,3,4
+200005,202003,100,,6,,,,,1.161413175,4.785815599,163.0494505,11749.48594,FIC,3,4,4
+200005,202004,100,,6,,,,,0.276010255,,42.68681319,3242.978611,FIC,4,,4
+200006,202001,100,,41,,,,,,0.597514698,71.63436123,8740.605259,BI,,4,4
+200006,202002,100,,41,,,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4
+200006,202003,100,8882,41,,,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4
+200006,202004,100,2711,41,,,0.305224049,,0.276010255,,42.68681319,2711,R,4,,4
+200007,202001,200,2439,4,,,,0.252093023,,2.163456777,132.3214286,2439,R,,3,4
+200007,202002,200,9675,4,,,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5
+200007,202003,200,7003,4,,,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4
+200007,202004,200,595,4,,,0.084963587,,0.197315737,,99.37735849,595,R,3,,3
+200008,202001,200,1849,4,,,,0.287290242,,2.163456777,132.3214286,1849,R,,3,4
+200008,202002,200,6436,4,,,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5
+200008,202003,200,9709,4,,,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4
+200008,202004,200,2727,4,,,0.280873416,,0.197315737,,99.37735849,2727,R,3,,3
+200009,202001,200,8742,45,,,,5.950987066,,2.163456777,132.3214286,8742,R,,3,4
+200009,202002,200,1469,45,,,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5
+200009,202003,200,8602,45,,,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4
+200009,202004,200,1945,45,,,0.226110207,,0.197315737,,99.37735849,1945,R,3,,3
+200010,202001,200,,85,,,,,,2.163456777,132.3214286,14038.67103,BI,,3,4
+200010,202002,200,6489,85,,,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5
+200010,202003,200,1796,85,,,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4
+200010,202004,200,,85,,,,,0.197315737,,99.37735849,354.3790633,FIR,3,,3
+200011,202001,200,,79,,,,,,2.163456777,132.3214286,4166.817753,BI,,3,4
+200011,202002,200,1926,79,,,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5
+200011,202004,200,,79,,,,,0.197315737,,99.37735849,7850.811321,C,3,,3
+200012,202001,200,5495,87,,,,,,2.163456777,132.3214286,5495,R,,3,4
+200012,202002,200,,87,,,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5
+200012,202003,200,,87,,,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4
+200012,202004,200,,87,,,,,0.197315737,,99.37735849,5755.871742,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21.csv
new file mode 100644
index 00000000..5a0aa6f1
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+210001,202001,1,547,10,,
+210001,202002,1,362,10,,
+210001,202003,1,895,10,,
+210002,202001,1,381,50,,
+210002,202002,1,573,50,,
+210002,202003,1,214,50,,
+210003,202001,2,961,12,,
+210003,202002,2,267,12,,
+210003,202003,2,314,12,,
+210004,202001,2,555,9,,
+210004,202002,2,628,9,,
+210004,202003,2,736,9,,
+210005,202001,1,100,18,,
+210005,202002,2,,18,,
+210005,202003,2,,18,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21_output.csv
new file mode 100644
index 00000000..b4ad5629
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21_output.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+210001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
+210001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
+210001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
+210002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
+210002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
+210002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
+210003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
+210003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
+210003,202003,2,314,12,,,1.176029963,,1.174002242,,50,314,R,2,,2
+210004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
+210004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
+210004,202003,2,736,9,,,1.171974522,,1.174002242,,50,736,R,2,,2
+210005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
+210005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,767.1428572,C,2,2,2
+210005,202003,2,,18,,,,,1.174002242,,50,900.6274342,FIC,2,,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22.csv
new file mode 100644
index 00000000..9dd3eeac
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+220001,202001,1,547,10,,
+220001,202002,1,362,10,,
+220001,202003,1,895,10,,
+220002,202001,1,381,50,,
+220002,202002,1,573,50,,
+220002,202003,1,214,50,,
+220003,202001,2,961,12,,
+220003,202002,2,267,12,,
+220003,202003,2,314,12,,
+220004,202001,2,555,9,,
+220004,202002,2,628,9,,
+220004,202003,2,736,9,,
+220005,202001,1,,18,,
+220005,202002,2,,18,,
+220005,202003,2,100,18,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22_output.csv
new file mode 100644
index 00000000..c4273e94
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22_output.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+220001,202001,1,547,10,,,,1.511049724,,1.087985595,15.46666667,547,R,,2,2
+220001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
+220001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,
+220002,202001,1,381,50,,,,0.664921466,,1.087985595,15.46666667,381,R,,2,2
+220002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
+220002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
+220003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
+220003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
+220003,202003,2,314,12,,,1.176029963,,1.174002242,,29.48717949,314,R,2,,3
+220004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
+220004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
+220004,202003,2,736,9,,,1.171974522,,1.174002242,,29.48717949,736,R,2,,3
+220005,202001,1,,18,,,,,,1.087985595,15.46666667,278.4,C,,2,2
+220005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,85.17896705,BI,2,2,2
+220005,202003,2,100,18,,,,,1.174002242,,29.48717949,100,R,2,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23.csv
new file mode 100644
index 00000000..7795046e
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+230001,202001,1,547,10,,
+230001,202002,1,362,10,,
+230001,202003,1,895,10,,
+230002,202001,1,381,50,,
+230002,202002,1,573,50,,
+230002,202003,1,214,50,,
+230003,202001,2,961,12,,
+230003,202002,2,267,12,,
+230003,202003,2,314,12,,
+230004,202001,2,555,9,,
+230004,202002,2,628,9,,
+230004,202003,2,736,9,,
+230005,202001,1,,18,,
+230005,202002,2,,18,,
+230005,202003,2,,18,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23_output.csv
new file mode 100644
index 00000000..98e3316c
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23_output.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+230001,202001,1,547,10,,,,1.511049724,,1.087985595,15.46666667,547,R,,2,2
+230001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
+230001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
+230002,202001,1,381,50,,,,0.664921466,,1.087985595,15.46666667,381,R,,2,2
+230002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
+230002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
+230003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
+230003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
+230003,202003,2,314,12,,,1.176029963,,1.174002242,,50,314,R,2,,2
+230004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
+230004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
+230004,202003,2,736,9,,,1.171974522,,1.174002242,,50,736,R,2,,2
+230005,202001,1,,18,,,,,,1.087985595,15.46666667,278.4,C,,2,2
+230005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2
+230005,202003,2,,18,,,,,1.174002242,,50,900.6274345,FIC,2,,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24.csv
new file mode 100644
index 00000000..5129dba1
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+240001,202001,1,547,10,,
+240001,202002,1,362,10,,
+240001,202003,1,895,10,,
+240002,202001,1,381,50,,
+240002,202002,1,573,50,,
+240002,202003,1,214,50,,
+240003,202001,2,961,12,,
+240003,202002,2,267,12,,
+240003,202003,2,314,12,,
+240004,202001,2,555,9,,
+240004,202002,2,628,9,,
+240004,202003,2,736,9,,
+240005,202001,1,100,18,,
+240005,202002,2,,18,,
+240005,202003,2,150,18,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24_output.csv
new file mode 100644
index 00000000..e3d3009d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24_output.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+240001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
+240001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
+240001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
+240002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
+240002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
+240002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
+240003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
+240003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
+240003,202003,2,314,12,,,1.176029963,,1.174002242,,30.76923077,314,R,2,,3
+240004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
+240004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
+240004,202003,2,736,9,,,1.171974522,,1.174002242,,30.76923077,736,R,2,,3
+240005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
+240005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,127.7684506,BI,2,2,2
+240005,202003,2,150,18,,,,,1.174002242,,30.76923077,150,R,2,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25.csv
new file mode 100644
index 00000000..836f6af8
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25.csv
@@ -0,0 +1,22 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+250001,202001,1,547,10,,
+250001,202002,1,362,10,,
+250001,202003,1,895,10,,
+250002,202001,1,381,50,,
+250002,202002,1,573,50,,
+250002,202003,1,214,50,,
+250003,202001,2,961,12,,
+250003,202002,2,267,12,,
+250003,202003,2,314,12,,
+250004,202001,2,555,9,,
+250004,202002,2,628,9,,
+250004,202003,2,736,9,,
+250005,202001,1,100,18,,
+250005,202002,2,310,18,,
+250005,202003,2,240,18,,
+250006,202001,1,,22,,
+250006,202002,1,,22,,
+250006,202003,1,,22,,
+250007,202001,2,,52,,
+250007,202002,2,,52,,
+250007,202003,2,,52,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25_output.csv
new file mode 100644
index 00000000..7d3608a3
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25_output.csv
@@ -0,0 +1,22 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+250001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
+250001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
+250001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
+250002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
+250002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
+250002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
+250003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
+250003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,267,R,2,3,3
+250003,202003,2,314,12,,,1.176029963,,1.040732678,,33.07692308,314,R,3,,3
+250004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
+250004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,628,R,2,3,3
+250004,202003,2,736,9,,,1.171974522,,1.040732678,,33.07692308,736,R,3,,3
+250005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
+250005,202002,2,310,18,,,,1.291666667,0.70468356,0.998415336,30.8974359,310,R,2,3,3
+250005,202003,2,240,18,,,0.774193548,,1.040732678,,33.07692308,240,R,3,,3
+250006,202001,1,,22,,,,,,1.087985595,13.17948718,289.9487179,C,,2,3
+250006,202002,1,,22,,,,,1.082864299,1.541019684,15.58333333,313.9751153,FIC,2,2,2
+250006,202003,1,,22,,,,,1.42292432,,18.48333333,446.7628274,FIC,2,,2
+250007,202001,2,,52,,,,,,2.241504449,72.19047619,3753.904762,C,,2,2
+250007,202002,2,,52,,,,,0.70468356,0.998415336,30.8974359,2645.314971,FIC,2,3,3
+250007,202003,2,,52,,,,,1.040732678,,33.07692308,2753.065733,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2_output.csv
new file mode 100644
index 00000000..b384987f
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2_output.csv
@@ -0,0 +1,9 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+20001,202001,100,2536,35,,,,0.306169262,,3.027097983,93.98369565,2536,R,,3,3
+20001,202002,100,8283,35,,,3.266167192,,1.255768523,,66.5326087,8283,R,3,,3
+20002,202001,100,9113,72,,,,3.068350168,,3.027097983,93.98369565,9113,R,,3,3
+20002,202002,100,2970,72,,,0.325908043,,1.255768523,,66.5326087,2970,R,3,,3
+20003,202001,100,5644,77,,,,5.70677452,,3.027097983,93.98369565,5644,R,,3,3
+20003,202002,100,989,77,,,0.175230333,,1.255768523,,66.5326087,989,R,3,,3
+20004,202001,100,,30,,,,,,3.027097983,93.98369565,2819.51087,C,,3,3
+20004,202002,100,,30,,,,,1.255768523,,66.5326087,3540.653,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3.csv
new file mode 100644
index 00000000..6d2c5e41
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+30001,202001,100,8444,51,,
+30001,202002,100,7476,51,,
+30001,202003,100,2003,51,,
+30002,202001,100,9343,72,,
+30002,202002,100,7818,72,,
+30002,202003,100,4897,72,,
+30003,202001,100,7511,7,,
+30003,202002,100,1761,7,,
+30003,202003,100,6492,7,,
+30004,202001,100,64,81,,
+30004,202002,100,2113,81,,
+30004,202003,100,,81,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_output.csv
new file mode 100644
index 00000000..b31ae869
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_output.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c
+30001,202001,100,8444,51,,,,1.129481006,,1.655006,120.1991,8444,R,,4,4
+30001,202002,100,7476,51,,,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7476,R,4,3,4
+30001,202003,100,2003,51,,,0.267924024,,1.526947,,103.0154,2003,R,3,,3
+30002,202001,100,9343,72,,,,1.195062676,,1.655006,120.1991,9343,R,,4,4
+30002,202002,100,7818,72,,,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7818,R,4,3,4
+30002,202003,100,4897,72,,,0.626375032,,1.526947,,103.0154,4897,R,3,,3
+30003,202001,100,7511,7,,,,4.265190233,,1.655006,120.1991,7511,R,,4,4
+30003,202002,100,1761,7,,,0.234456131,0.271256932,8.743054929,1.407609,90.8436,1761,R,4,3,4
+30003,202003,100,6492,7,,,3.686541738,,1.526947,,103.0154,6492,R,3,,3
+30004,202001,100,64,81,,,,0.030288689,,1.655006,120.1991,64,R,,4,4
+30004,202002,100,2113,81,,,33.015625,,8.743054929,1.407609,90.8436,2113,R,4,3,4
+30004,202003,100,,81,,,,,1.526947,,103.0154,3226.439011,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_t_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_t_output.csv
new file mode 100644
index 00000000..3fcab0bf
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_t_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c
+30001,202001,100,8444,51,,,,1.129481006,,1.655006,120.1991,8444,R,,4,4
+30001,202002,100,7476,51,,,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7476,R,4,3,4
+30001,202003,100,2003,51,,,0.267924024,,1.526947,,103.0154,2003,R,3,,3
+30002,202001,100,9343,72,,,,1.195062676,,1.655006,120.1991,9343,R,,4,4
+30002,202002,100,7818,72,,,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7818,R,4,3,4
+30002,202003,100,4897,72,,,0.626375032,,1.526947,,103.0154,4897,R,3,,3
+30003,202001,100,7511,7,,,,4.265190233,,1.655006,120.1991,7511,R,,4,4
+30003,202002,100,1761,7,,,0.234456131,0.271256932,8.743054929,1.407609,90.8436,1761,R,4,3,4
+30003,202003,100,6492,7,,,3.686541738,,1.526947,,103.0154,6492,R,3,,3
+30004,202001,100,64,81,,,,0.030288689,,1.655006,120.1991,64,R,,4,4
+30004,202002,100,2113,81,,,33.015625,11.42162162,8.743054929,1.407609,90.8436,2113,R,4,3,4
+30004,202003,100,185,81,,,0.087553242,,1.526947,,103.0154,3226.439011,R,3,,3
+30005,202001,100,844,5,,,,0.941234172,,,,,R,,,
+30005,202002,100,897,5,,,1.062434865,3.199201198,,,,,R,,,
+30005,202003,100,280,5,,,0.312578027,,,,,,R,,,
+30006,202001,100,1869,14,,,,0.995885563,,,,,R,,,
+30006,202002,100,1876,14,,,1.004131435,1.368417982,,,,,R,,,
+30006,202003,100,1371,14,,,0.730770871,,,,,,R,,,
+30007,202001,100,12769,12,,,,4.475816911,,,,,R,,,
+30007,202002,100,2853,12,,,0.223422901,0.248269056,,,,,R,,,
+30007,202003,100,11491,12,,,4.027888195,,,,,,R,,,
+30008,202001,100,141,162,,,,0.023463069,,,,,R,,,
+30008,202002,100,6001,162,,,42.62017045,13.86213906,,,,,R,,,
+30008,202003,100,433,162,,,0.072138939,,,,,,R,,,
+30009,202001,100,6417,26,,,,1.589639934,,,,,R,,,
+30009,202002,100,4037,26,,,0.629073275,3.053782962,,,,,R,,,
+30009,202003,100,1322,26,,,0.327462695,,,,,,R,,,
+30010,202001,100,28963,144,,,,1.332623847,,,,,R,,,
+30010,202002,100,21734,144,,,0.750399298,2.064295653,,,,,R,,,
+30010,202003,100,10529,144,,,0.484426733,,,,,,R,,,
+30011,202001,100,6009,5,,,,5.249464902,,,,,R,,,
+30011,202002,100,1145,5,,,0.190495606,0.226047443,,,,,R,,,
+30011,202003,100,5064,5,,,4.423850085,,,,,,R,,,
+30012,202001,100,256,275,,,,0.034032235,,,,,R,,,
+30012,202002,100,7522,275,,,29.38390625,,,,,,R,,,
+30012,202003,100,,275,,,,,,,,,FIR,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4.csv
new file mode 100644
index 00000000..edb201c0
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4.csv
@@ -0,0 +1,17 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+40001,202001,100,9491,35,,
+40001,202002,100,4783,35,,
+40001,202003,100,7902,35,,
+40001,202004,100,4911,35,,
+40002,202001,100,2095,63,,
+40002,202002,100,442,63,,
+40002,202003,100,3136,63,,
+40002,202004,100,2115,63,,
+40003,202001,100,7863,16,,
+40003,202002,100,8121,16,,
+40003,202003,100,2151,16,,
+40003,202004,100,1377,16,,
+40004,202001,100,5131,78,,
+40004,202002,100,9836,78,,
+40004,202003,100,,78,,
+40004,202004,100,,78,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4_output.csv
new file mode 100644
index 00000000..13aa4125
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4_output.csv
@@ -0,0 +1,17 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+40001,202001,100,9491,35,,,,1.984319465,,2.053506032,128.0208333,9491,R,,4,4
+40001,202002,100,4783,35,,,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4783,R,4,3,4
+40001,202003,100,7902,35,,,1.652101192,1.609040929,3.003997558,1.551291583,115.6929825,7902,R,3,3,3
+40001,202004,100,4911,35,,,0.621488231,,0.645360538,,73.71052632,4911,R,3,,3
+40002,202001,100,2095,63,,,,4.739819005,,2.053506032,128.0208333,2095,R,,4,4
+40002,202002,100,442,63,,,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,442,R,4,3,4
+40002,202003,100,3136,63,,,7.095022624,1.482742317,3.003997558,1.551291583,115.6929825,3136,R,3,3,3
+40002,202004,100,2115,63,,,0.67442602,,0.645360538,,73.71052632,2115,R,3,,3
+40003,202001,100,7863,16,,,,0.968230513,,2.053506032,128.0208333,7863,R,,4,4
+40003,202002,100,8121,16,,,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,8121,R,4,3,4
+40003,202003,100,2151,16,,,0.264868859,1.562091503,3.003997558,1.551291583,115.6929825,2151,R,3,3,3
+40003,202004,100,1377,16,,,0.640167364,,0.645360538,,73.71052632,1377,R,3,,3
+40004,202001,100,5131,78,,,,0.521655144,,2.053506032,128.0208333,5131,R,,4,4
+40004,202002,100,9836,78,,,1.916975248,,0.916179196,1.507228985,120.7395833,9836,R,4,3,4
+40004,202003,100,,78,,,,,3.003997558,1.551291583,115.6929825,29547.31998,FIR,3,3,3
+40004,202004,100,,78,,,,,0.645360538,,73.71052632,19068.67433,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5.csv
new file mode 100644
index 00000000..40a567d3
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5.csv
@@ -0,0 +1,21 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+50001,202001,100,6362,59,,
+50001,202002,100,8542,59,,
+50001,202003,100,5623,59,,
+50001,202004,100,7769,59,,
+50001,202005,100,4687,59,,
+50002,202001,100,4851,36,,
+50002,202002,100,8894,36,,
+50002,202003,100,3372,36,,
+50002,202004,100,3522,36,,
+50002,202005,100,2327,36,,
+50003,202001,100,2238,76,,
+50003,202002,100,769,76,,
+50003,202003,100,7722,76,,
+50003,202004,100,6445,76,,
+50003,202005,100,1521,76,,
+50004,202001,100,688,30,,
+50004,202002,100,3245,30,,
+50004,202003,100,,30,,
+50004,202004,100,,30,,
+50004,202005,100,,30,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5_output.csv
new file mode 100644
index 00000000..7dbba393
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5_output.csv
@@ -0,0 +1,21 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+50001,202001,100,6362,59,,,,0.744790447,,1.103126475,70.34328358,6362,R,,4,4
+50001,202002,100,8542,59,,,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,8542,R,4,3,4
+50001,202003,100,5623,59,,,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,5623,R,3,3,3
+50001,202004,100,7769,59,,,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,7769,R,3,3,3
+50001,202005,100,4687,59,,,0.603295147,,0.49999873,,49.9122807,4687,R,3,,3
+50002,202001,100,4851,36,,,,0.545423881,,1.103126475,70.34328358,4851,R,,4,4
+50002,202002,100,8894,36,,,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,8894,R,4,3,4
+50002,202003,100,3372,36,,,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3372,R,3,3,3
+50002,202004,100,3522,36,,,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3522,R,3,3,3
+50002,202005,100,2327,36,,,0.660704145,,0.49999873,,49.9122807,2327,R,3,,3
+50003,202001,100,2238,76,,,,2.910273082,,1.103126475,70.34328358,2238,R,,4,4
+50003,202002,100,769,76,,,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,769,R,4,3,4
+50003,202003,100,7722,76,,,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,7722,R,3,3,3
+50003,202004,100,6445,76,,,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,6445,R,3,3,3
+50003,202005,100,1521,76,,,0.235996897,,0.49999873,,49.9122807,1521,R,3,,3
+50004,202001,100,688,30,,,,0.21201849,,1.103126475,70.34328358,688,R,,4,4
+50004,202002,100,3245,30,,,4.716569767,,2.05906902,1.418769101,106.7164179,3245,R,4,3,4
+50004,202003,100,,30,,,,,3.693007078,0.959774209,97.76023392,11983.80797,FIR,3,3,3
+50004,202004,100,,30,,,,,1.086919709,2.469481356,103.7192982,13025.43707,FIR,3,3,3
+50004,202005,100,,30,,,,,0.49999873,,49.9122807,6512.701992,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6.csv
new file mode 100644
index 00000000..db160fc8
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+60001,202001,100,5077,15,,
+60001,202002,100,7830,15,,
+60001,202003,100,1046,15,,
+60002,202001,100,1588,71,,
+60002,202002,100,1213,71,,
+60002,202003,100,3807,71,,
+60003,202001,100,6541,26,,
+60003,202002,100,336,26,,
+60003,202003,100,6351,26,,
+60004,202001,100,,3,,
+60004,202002,100,,3,,
+60004,202003,100,401,3,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6_output.csv
new file mode 100644
index 00000000..2ad6fa96
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6_output.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+60001,202001,100,5077,15,,,,0.648403576,,7.141605449,117.9107143,5077,R,,3,3
+60001,202002,100,7830,15,,,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,7830,R,3,3,3
+60001,202003,100,1046,15,,,0.133588761,,7.391291354,,100.9130435,1046,R,3,,4
+60002,202001,100,1588,71,,,,1.309150866,,7.141605449,117.9107143,1588,R,,3,3
+60002,202002,100,1213,71,,,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,1213,R,3,3,3
+60002,202003,100,3807,71,,,3.138499588,,7.391291354,,100.9130435,3807,R,3,,4
+60003,202001,100,6541,26,,,,19.4672619,,7.141605449,117.9107143,6541,R,,3,3
+60003,202002,100,336,26,,,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,336,R,3,3,3
+60003,202003,100,6351,26,,,18.90178571,,7.391291354,,100.9130435,6351,R,3,,4
+60004,202001,100,,3,,,,,,7.141605449,117.9107143,7500.429481,BI,,3,3
+60004,202002,100,,3,,,,,0.785823852,2.619062766,83.74107143,1050.244169,BI,3,3,3
+60004,202003,100,401,3,,,,,7.391291354,,100.9130435,401,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7.csv
new file mode 100644
index 00000000..c684dae4
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7.csv
@@ -0,0 +1,29 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+70001,202001,100,5951,39,,
+70001,202002,100,1814,39,,
+70001,202003,100,734,39,,
+70001,202004,100,96,39,,
+70001,202005,100,9086,39,,
+70001,202006,100,3949,39,,
+70001,202007,100,49,39,,
+70002,202001,100,6705,94,,
+70002,202002,100,48,94,,
+70002,202003,100,5361,94,,
+70002,202004,100,8767,94,,
+70002,202005,100,9214,94,,
+70002,202006,100,7467,94,,
+70002,202007,100,3475,94,,
+70003,202001,100,6153,42,,
+70003,202002,100,7711,42,,
+70003,202003,100,5403,42,,
+70003,202004,100,7445,42,,
+70003,202005,100,7092,42,,
+70003,202006,100,2038,42,,
+70003,202007,100,8768,42,,
+70004,202001,100,,6,,
+70004,202002,100,,6,,
+70004,202003,100,6288,6,,
+70004,202004,100,,6,,
+70004,202005,100,,6,,
+70004,202006,100,5875,6,,
+70004,202007,100,,6,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7_output.csv
new file mode 100644
index 00000000..ce9f6ff5
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7_output.csv
@@ -0,0 +1,29 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+70001,202001,100,5951,39,,,,3.280595369,,47.92201545,107.48,5951,R,,3,3
+70001,202002,100,1814,39,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
+70001,202003,100,734,39,,,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,734,R,3,3,4
+70001,202004,100,96,39,,,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,96,R,3,3,3
+70001,202005,100,9086,39,,,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,9086,R,3,3,3
+70001,202006,100,3949,39,,,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3949,R,3,3,4
+70001,202007,100,49,39,,,0.012408205,,1.593348776,,70.24,49,R,3,,3
+70002,202001,100,6705,94,,,,139.6875,,47.92201545,107.48,6705,R,,3,3
+70002,202002,100,48,94,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,48,R,3,3,3
+70002,202003,100,5361,94,,,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,5361,R,3,3,4
+70002,202004,100,8767,94,,,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,8767,R,3,3,3
+70002,202005,100,9214,94,,,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,9214,R,3,3,3
+70002,202006,100,7467,94,,,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,7467,R,3,3,4
+70002,202007,100,3475,94,,,0.46538101,,1.593348776,,70.24,3475,R,3,,3
+70003,202001,100,6153,42,,,,0.797950979,,47.92201545,107.48,6153,R,,3,3
+70003,202002,100,7711,42,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
+70003,202003,100,5403,42,,,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,5403,R,3,3,4
+70003,202004,100,7445,42,,,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,7445,R,3,3,3
+70003,202005,100,7092,42,,,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,7092,R,3,3,3
+70003,202006,100,2038,42,,,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,2038,R,3,3,4
+70003,202007,100,8768,42,,,4.302257115,,1.593348776,,70.24,8768,R,3,,3
+70004,202001,100,,6,,,,,,47.92201545,107.48,392488.3921,BI,,3,3
+70004,202002,100,,6,,,,,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
+70004,202003,100,6288,6,,,,,37.59760599,2.994350985,98.26519337,6288,R,3,3,4
+70004,202004,100,,6,,,,,1.048019201,0.670608989,93.18857143,6589.944736,FIR,3,3,3
+70004,202005,100,,6,,,,,32.21646854,2.338226887,145.0971429,212304.7472,FIR,3,3,3
+70004,202006,100,5875,6,,,,,0.510795988,27.65768328,106.7900552,5875,R,3,3,4
+70004,202007,100,,6,,,,,1.593348776,,70.24,9360.924061,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8.csv
new file mode 100644
index 00000000..035d605a
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+80001,202001,100,4042,91,,
+80001,202002,100,2805,91,,
+80001,202003,100,644,91,,
+80002,202001,100,7138,85,,
+80002,202002,100,1970,85,,
+80002,202003,100,2746,85,,
+80003,202001,100,2846,41,,
+80003,202002,100,3552,41,,
+80003,202003,100,9015,41,,
+80004,202001,100,5820,70,,
+80004,202002,100,3729,70,,
+80004,202003,100,8233,70,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8_output.csv
new file mode 100644
index 00000000..5598aea3
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8_output.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+80001,202001,100,4042,91,,,,1.440998217,,1.856581839,69.14982578,4042,R,,4,4
+80001,202002,100,2805,91,,,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,2805,R,4,4,4
+80001,202003,100,644,91,,,0.229590018,,1.59233398,,71.90940767,644,R,4,,4
+80002,202001,100,7138,85,,,,3.623350254,,1.856581839,69.14982578,7138,R,,4,4
+80002,202002,100,1970,85,,,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,1970,R,4,4,4
+80002,202003,100,2746,85,,,1.393908629,,1.59233398,,71.90940767,2746,R,4,,4
+80003,202001,100,2846,41,,,,0.801238739,,1.856581839,69.14982578,2846,R,,4,4
+80003,202002,100,3552,41,,,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,3552,R,4,4,4
+80003,202003,100,9015,41,,,2.538006757,,1.59233398,,71.90940767,9015,R,4,,4
+80004,202001,100,5820,70,,,,1.560740145,,1.856581839,69.14982578,5820,R,,4,4
+80004,202002,100,3729,70,,,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,3729,R,4,4,4
+80004,202003,100,8233,70,,,2.207830518,,1.59233398,,71.90940767,8233,R,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9.csv
new file mode 100644
index 00000000..de1a34a3
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9.csv
@@ -0,0 +1,12 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+90001,202001,100,2417,66,,
+90001,202002,100,7928,66,,
+90001,202003,100,7319,66,,
+90002,202001,100,1706,27,,
+90002,202002,100,1481,27,,
+90002,202003,100,8390,27,,
+90003,202001,100,1069,14,,
+90003,202002,100,8228,14,,
+90003,202003,100,2415,14,,
+90004,202001,100,7728,73,,
+90004,202003,100,,73,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9_output.csv
new file mode 100644
index 00000000..0b2a70fb
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9_output.csv
@@ -0,0 +1,12 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+90001,202001,100,2417,66,,,,0.304868819,,0.528905137,71.77777778,2417,R,,3,4
+90001,202002,100,7928,66,,,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,7928,R,3,3,3
+90001,202003,100,7319,66,,,0.923183653,,2.293928258,,169.3831776,7319,R,3,,3
+90002,202001,100,1706,27,,,,1.151924375,,0.528905137,71.77777778,1706,R,,3,4
+90002,202002,100,1481,27,,,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,1481,R,3,3,3
+90002,202003,100,8390,27,,,5.665091155,,2.293928258,,169.3831776,8390,R,3,,3
+90003,202001,100,1069,14,,,,0.129922217,,0.528905137,71.77777778,1069,R,,3,4
+90003,202002,100,8228,14,,,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,8228,R,3,3,3
+90003,202003,100,2415,14,,,0.293509966,,2.293928258,,169.3831776,2415,R,3,,3
+90004,202001,100,7728,73,,,,,,,71.77777778,7728,R,,,4
+90004,202003,100,,73,,,,,,,169.3831776,12364.97196,C,,,3

From f645774b1b218a1cec48ae906cb34d02675ddd48 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 3 Mar 2023 13:35:22 +0000
Subject: [PATCH 116/531] Small fixes and initial test data renamed

---
 .../imputation/mean_of_ratios.py              |  8 +-
 .../01_C_input.csv}                           | 10 +-
 .../01_C_output.csv}                          | 10 +-
 .../02_C_FI_input.csv}                        | 18 ++--
 .../02_C_FI_output.csv}                       | 18 ++--
 .../03_R_R_FI_input.csv}                      | 26 ++---
 .../03_R_R_FI_output.csv}                     | 26 ++---
 .../04_R_R_FI_FI_input.csv}                   | 34 +++----
 .../04_R_R_FI_FI_output.csv}                  | 34 +++----
 .../05_R_R_FI_FI_FI_input.csv}                | 42 ++++----
 .../05_R_R_FI_FI_FI_output.csv}               | 42 ++++----
 .../06_BI_BI_R_input.csv}                     | 26 ++---
 .../06_BI_BI_R_output.csv}                    | 26 ++---
 .../07_BI_BI_R_FI_FI_R_FI_input.csv}          | 58 +++++------
 .../07_BI_BI_R_FI_FI_R_FI_output.csv}         | 58 +++++------
 .../08_R_R_R_input.csv}                       | 26 ++---
 .../08_R_R_R_output.csv}                      | 26 ++---
 .../09_R_NS_C_input.csv}                      | 24 ++---
 .../09_R_NS_C_output.csv}                     | 24 ++---
 .../10_C_FI_NS_R_input.csv}                   | 32 +++----
 .../10_C_FI_NS_R_output.csv}                  | 32 +++----
 .../11_R_R_FI-BI_R_R_input.csv}               | 50 +++++-----
 .../11_R_R_FI-BI_R_R_output.csv}              | 50 +++++-----
 .../12_C_FI_FI_FI_FI_input.csv}               | 42 ++++----
 .../12_C_FI_FI_FI_FI_output.csv}              | 42 ++++----
 .../13_R_FI_FI_NS_BI_BI_R_input.csv}          | 56 +++++------
 .../13_R_FI_FI_NS_BI_BI_R_output.csv}         | 56 +++++------
 .../14_C_FI_FI_NS_BI_BI_R_input.csv}          | 56 +++++------
 .../14_C_FI_FI_NS_BI_BI_R_output.csv}         | 56 +++++------
 .../15_BI_BI_R_NS_R_FI_FI_input.csv}          | 56 +++++------
 .../15_BI_BI_R_NS_R_FI_FI_output.csv}         | 56 +++++------
 ..._BI_R_NS_C_FI_FI_zeros_excluded_input.csv} | 70 +++++++-------
 ...BI_R_NS_C_FI_FI_zeros_excluded_output.csv} | 70 +++++++-------
 ...I_BI_R_NS_C_FI_FI_zeros_included_input.csv | 35 +++++++
 ...BI_R_NS_C_FI_FI_zeros_included_output.csv} | 70 +++++++-------
 .../16_BI_BI_R_NS_C_FI_FI_input.csv}          | 56 +++++------
 .../16_BI_BI_R_NS_C_FI_FI_output.csv}         | 56 +++++------
 .../17_NS_R_FI_NS_input.csv}                  | 30 +++---
 .../17_NS_R_FI_NS_output.csv}                 | 30 +++---
 .../18_NS_BI_R_NS_input.csv}                  | 30 +++---
 .../18_NS_BI_R_NS_output.csv}                 | 30 +++---
 .../19_link_columns_input.csv}                | 50 +++++-----
 .../19_link_columns_output.csv}               | 50 +++++-----
 .../20_mixed_data_input.csv}                  | 96 +++++++++----------
 .../20_mixed_data_output.csv}                 | 96 +++++++++----------
 .../21_class_change_R_C_FI_input.csv}         | 32 +++----
 .../21_class_change_R_C_FI_output.csv}        | 32 +++----
 .../22_class_change_C_BI_R_input.csv}         | 32 +++----
 .../22_class_change_C_BI_R_output.csv}        | 32 +++----
 .../23_class_change_C_C_FI_input.csv}         | 32 +++----
 .../23_class_change_C_C_FI_output.csv}        | 32 +++----
 .../24_class_change_R_BI_R_input.csv}         | 32 +++----
 .../24_class_change_R_BI_R_output.csv}        | 32 +++----
 .../25_class_change_C_FI_FI_input.csv}        | 44 ++++-----
 .../25_class_change_C_FI_FI_output.csv}       | 44 ++++-----
 .../mor_test_data_case_14_t_output_trial1.csv | 42 --------
 .../mor_test_data_case_3_t_output.csv         | 37 -------
 57 files changed, 1134 insertions(+), 1178 deletions(-)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_1.csv => methodology_scenarios/01_C_input.csv} (53%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_1_output.csv => methodology_scenarios/01_C_output.csv} (53%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_2.csv => methodology_scenarios/02_C_FI_input.csv} (69%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_2_output.csv => methodology_scenarios/02_C_FI_output.csv} (76%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_3.csv => methodology_scenarios/03_R_R_FI_input.csv} (76%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_3_output.csv => methodology_scenarios/03_R_R_FI_output.csv} (83%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_4.csv => methodology_scenarios/04_R_R_FI_FI_input.csv} (80%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_4_output.csv => methodology_scenarios/04_R_R_FI_FI_output.csv} (87%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_5.csv => methodology_scenarios/05_R_R_FI_FI_FI_input.csv} (83%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_5_output.csv => methodology_scenarios/05_R_R_FI_FI_FI_output.csv} (90%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_6.csv => methodology_scenarios/06_BI_BI_R_input.csv} (76%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_6_output.csv => methodology_scenarios/06_BI_BI_R_output.csv} (84%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_7.csv => methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_input.csv} (86%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_7_output.csv => methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv} (92%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_8.csv => methodology_scenarios/08_R_R_R_input.csv} (76%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_8_output.csv => methodology_scenarios/08_R_R_R_output.csv} (84%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_9.csv => methodology_scenarios/09_R_NS_C_input.csv} (75%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_9_output.csv => methodology_scenarios/09_R_NS_C_output.csv} (82%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_10.csv => methodology_scenarios/10_C_FI_NS_R_input.csv} (80%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_10_output.csv => methodology_scenarios/10_C_FI_NS_R_output.csv} (87%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_11.csv => methodology_scenarios/11_R_R_FI-BI_R_R_input.csv} (85%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_11_output.csv => methodology_scenarios/11_R_R_FI-BI_R_R_output.csv} (91%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_12.csv => methodology_scenarios/12_C_FI_FI_FI_FI_input.csv} (83%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_12_output.csv => methodology_scenarios/12_C_FI_FI_FI_FI_output.csv} (90%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_13.csv => methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_input.csv} (86%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_13_output.csv => methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv} (92%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_14.csv => methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_input.csv} (86%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_14_output.csv => methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv} (92%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_15.csv => methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_input.csv} (86%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_15_output.csv => methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv} (92%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_16_0.csv => methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv} (88%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_16_0_output.csv => methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv} (93%)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_16_0_inc_output.csv => methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv} (93%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_16.csv => methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv} (86%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_16_output.csv => methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv} (92%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_17.csv => methodology_scenarios/17_NS_R_FI_NS_input.csv} (79%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_17_output.csv => methodology_scenarios/17_NS_R_FI_NS_output.csv} (86%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_18.csv => methodology_scenarios/18_NS_BI_R_NS_input.csv} (79%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_18_output.csv => methodology_scenarios/18_NS_BI_R_NS_output.csv} (87%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_19.csv => methodology_scenarios/19_link_columns_input.csv} (87%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_19_output.csv => methodology_scenarios/19_link_columns_output.csv} (91%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_20.csv => methodology_scenarios/20_mixed_data_input.csv} (90%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_20_output.csv => methodology_scenarios/20_mixed_data_output.csv} (94%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_21.csv => methodology_scenarios/21_class_change_R_C_FI_input.csv} (78%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_21_output.csv => methodology_scenarios/21_class_change_R_C_FI_output.csv} (86%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_22.csv => methodology_scenarios/22_class_change_C_BI_R_input.csv} (78%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_22_output.csv => methodology_scenarios/22_class_change_C_BI_R_output.csv} (86%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_23.csv => methodology_scenarios/23_class_change_C_C_FI_input.csv} (78%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_23_output.csv => methodology_scenarios/23_class_change_C_C_FI_output.csv} (86%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_24.csv => methodology_scenarios/24_class_change_R_BI_R_input.csv} (78%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_24_output.csv => methodology_scenarios/24_class_change_R_BI_R_output.csv} (86%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_25.csv => methodology_scenarios/25_class_change_C_FI_FI_input.csv} (82%)
 rename tests/fixture_data/imputation/mean_of_ratios/{mor_test_data_case_25_output.csv => methodology_scenarios/25_class_change_C_FI_FI_output.csv} (89%)
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_t_output_trial1.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_t_output.csv

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 77eb7960..cafd6a4a 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -24,13 +24,13 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
             """CASE
                 WHEN previous.output = 0
                 THEN 1
-                ELSE current.output/previous.output AS growth_forward
-            END""",
+                ELSE current.output/previous.output
+            END AS growth_forward""",
             """CASE
                 WHEN next.output = 0
                 THEN 1
-                ELSE current.output/next.output AS growth_backward
-            END""",
+                ELSE current.output/next.output
+            END AS growth_backward""",
         )
 
         ratio_df = (
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_input.csv
similarity index 53%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_input.csv
index 935a254b..4cd2840e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_input.csv
@@ -1,5 +1,5 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-10001,202001,100,3892,1,,
-10002,202001,100,3873,75,,
-10003,202001,100,5397,13,,
-10004,202001,100,,71,,
+identifier,date,group,question,other,lower_trim,upper_trim
+10001,202001,100,3892,1,,
+10002,202001,100,3873,75,,
+10003,202001,100,5397,13,,
+10004,202001,100,,71,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
similarity index 53%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index 0387c2de..f4f6bee6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_1_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-10001,202001,100,,1,,,,,,,147.8876404,3892,R,,,3
-10002,202001,100,,75,,,,,,,147.8876404,3873,R,,,3
-10003,202001,100,,13,,,,,,,147.8876404,5397,R,,,3
-10004,202001,100,,71,,,,,,,147.8876404,10500.02247,C,,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+10001,202001,100,,1,,,,,,,147.8876404,3892,R,,,3
+10002,202001,100,,75,,,,,,,147.8876404,3873,R,,,3
+10003,202001,100,,13,,,,,,,147.8876404,5397,R,,,3
+10004,202001,100,,71,,,,,,,147.8876404,10500.02247,C,,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_input.csv
similarity index 69%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_input.csv
index 1c9a179e..36e08ba0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_input.csv
@@ -1,9 +1,9 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-20001,202001,100,2536,35,,
-20001,202002,100,8283,35,,
-20002,202001,100,9113,72,,
-20002,202002,100,2970,72,,
-20003,202001,100,5644,77,,
-20003,202002,100,989,77,,
-20004,202001,100,,30,,
-20004,202002,100,,30,,
+identifier,date,group,question,other,lower_trim,upper_trim
+20001,202001,100,2536,35,,
+20001,202002,100,8283,35,,
+20002,202001,100,9113,72,,
+20002,202002,100,2970,72,,
+20003,202001,100,5644,77,,
+20003,202002,100,989,77,,
+20004,202001,100,,30,,
+20004,202002,100,,30,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
similarity index 76%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index b384987f..1bedc9e6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_2_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-20001,202001,100,2536,35,,,,0.306169262,,3.027097983,93.98369565,2536,R,,3,3
-20001,202002,100,8283,35,,,3.266167192,,1.255768523,,66.5326087,8283,R,3,,3
-20002,202001,100,9113,72,,,,3.068350168,,3.027097983,93.98369565,9113,R,,3,3
-20002,202002,100,2970,72,,,0.325908043,,1.255768523,,66.5326087,2970,R,3,,3
-20003,202001,100,5644,77,,,,5.70677452,,3.027097983,93.98369565,5644,R,,3,3
-20003,202002,100,989,77,,,0.175230333,,1.255768523,,66.5326087,989,R,3,,3
-20004,202001,100,,30,,,,,,3.027097983,93.98369565,2819.51087,C,,3,3
-20004,202002,100,,30,,,,,1.255768523,,66.5326087,3540.653,FIC,3,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+20001,202001,100,2536,35,,,,0.306169262,,3.027097983,93.98369565,2536,R,,3,3
+20001,202002,100,8283,35,,,3.266167192,,1.255768523,,66.5326087,8283,R,3,,3
+20002,202001,100,9113,72,,,,3.068350168,,3.027097983,93.98369565,9113,R,,3,3
+20002,202002,100,2970,72,,,0.325908043,,1.255768523,,66.5326087,2970,R,3,,3
+20003,202001,100,5644,77,,,,5.70677452,,3.027097983,93.98369565,5644,R,,3,3
+20003,202002,100,989,77,,,0.175230333,,1.255768523,,66.5326087,989,R,3,,3
+20004,202001,100,,30,,,,,,3.027097983,93.98369565,2819.51087,C,,3,3
+20004,202002,100,,30,,,,,1.255768523,,66.5326087,3540.653,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_input.csv
similarity index 76%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_input.csv
index 6d2c5e41..3db17d5a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_input.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-30001,202001,100,8444,51,,
-30001,202002,100,7476,51,,
-30001,202003,100,2003,51,,
-30002,202001,100,9343,72,,
-30002,202002,100,7818,72,,
-30002,202003,100,4897,72,,
-30003,202001,100,7511,7,,
-30003,202002,100,1761,7,,
-30003,202003,100,6492,7,,
-30004,202001,100,64,81,,
-30004,202002,100,2113,81,,
-30004,202003,100,,81,,
+identifier,date,group,question,other,lower_trim,upper_trim
+30001,202001,100,8444,51,,
+30001,202002,100,7476,51,,
+30001,202003,100,2003,51,,
+30002,202001,100,9343,72,,
+30002,202002,100,7818,72,,
+30002,202003,100,4897,72,,
+30003,202001,100,7511,7,,
+30003,202002,100,1761,7,,
+30003,202003,100,6492,7,,
+30004,202001,100,64,81,,
+30004,202002,100,2113,81,,
+30004,202003,100,,81,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
similarity index 83%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index b31ae869..045c3b7e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c
-30001,202001,100,8444,51,,,,1.129481006,,1.655006,120.1991,8444,R,,4,4
-30001,202002,100,7476,51,,,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7476,R,4,3,4
-30001,202003,100,2003,51,,,0.267924024,,1.526947,,103.0154,2003,R,3,,3
-30002,202001,100,9343,72,,,,1.195062676,,1.655006,120.1991,9343,R,,4,4
-30002,202002,100,7818,72,,,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7818,R,4,3,4
-30002,202003,100,4897,72,,,0.626375032,,1.526947,,103.0154,4897,R,3,,3
-30003,202001,100,7511,7,,,,4.265190233,,1.655006,120.1991,7511,R,,4,4
-30003,202002,100,1761,7,,,0.234456131,0.271256932,8.743054929,1.407609,90.8436,1761,R,4,3,4
-30003,202003,100,6492,7,,,3.686541738,,1.526947,,103.0154,6492,R,3,,3
-30004,202001,100,64,81,,,,0.030288689,,1.655006,120.1991,64,R,,4,4
-30004,202002,100,2113,81,,,33.015625,,8.743054929,1.407609,90.8436,2113,R,4,3,4
-30004,202003,100,,81,,,,,1.526947,,103.0154,3226.439011,FIR,3,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,8444,51,,,,1.129481006,,1.655006,120.1991,8444,R,,4,4
+30001,202002,100,7476,51,,,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7476,R,4,3,4
+30001,202003,100,2003,51,,,0.267924024,,1.526947,,103.0154,2003,R,3,,3
+30002,202001,100,9343,72,,,,1.195062676,,1.655006,120.1991,9343,R,,4,4
+30002,202002,100,7818,72,,,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7818,R,4,3,4
+30002,202003,100,4897,72,,,0.626375032,,1.526947,,103.0154,4897,R,3,,3
+30003,202001,100,7511,7,,,,4.265190233,,1.655006,120.1991,7511,R,,4,4
+30003,202002,100,1761,7,,,0.234456131,0.271256932,8.743054929,1.407609,90.8436,1761,R,4,3,4
+30003,202003,100,6492,7,,,3.686541738,,1.526947,,103.0154,6492,R,3,,3
+30004,202001,100,64,81,,,,0.030288689,,1.655006,120.1991,64,R,,4,4
+30004,202002,100,2113,81,,,33.015625,,8.743054929,1.407609,90.8436,2113,R,4,3,4
+30004,202003,100,,81,,,,,1.526947,,103.0154,3226.439011,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_input.csv
similarity index 80%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_input.csv
index edb201c0..5aa86188 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_input.csv
@@ -1,17 +1,17 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-40001,202001,100,9491,35,,
-40001,202002,100,4783,35,,
-40001,202003,100,7902,35,,
-40001,202004,100,4911,35,,
-40002,202001,100,2095,63,,
-40002,202002,100,442,63,,
-40002,202003,100,3136,63,,
-40002,202004,100,2115,63,,
-40003,202001,100,7863,16,,
-40003,202002,100,8121,16,,
-40003,202003,100,2151,16,,
-40003,202004,100,1377,16,,
-40004,202001,100,5131,78,,
-40004,202002,100,9836,78,,
-40004,202003,100,,78,,
-40004,202004,100,,78,,
+identifier,date,group,question,other,lower_trim,upper_trim
+40001,202001,100,9491,35,,
+40001,202002,100,4783,35,,
+40001,202003,100,7902,35,,
+40001,202004,100,4911,35,,
+40002,202001,100,2095,63,,
+40002,202002,100,442,63,,
+40002,202003,100,3136,63,,
+40002,202004,100,2115,63,,
+40003,202001,100,7863,16,,
+40003,202002,100,8121,16,,
+40003,202003,100,2151,16,,
+40003,202004,100,1377,16,,
+40004,202001,100,5131,78,,
+40004,202002,100,9836,78,,
+40004,202003,100,,78,,
+40004,202004,100,,78,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
similarity index 87%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index 13aa4125..7d5b5eba 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_4_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-40001,202001,100,9491,35,,,,1.984319465,,2.053506032,128.0208333,9491,R,,4,4
-40001,202002,100,4783,35,,,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4783,R,4,3,4
-40001,202003,100,7902,35,,,1.652101192,1.609040929,3.003997558,1.551291583,115.6929825,7902,R,3,3,3
-40001,202004,100,4911,35,,,0.621488231,,0.645360538,,73.71052632,4911,R,3,,3
-40002,202001,100,2095,63,,,,4.739819005,,2.053506032,128.0208333,2095,R,,4,4
-40002,202002,100,442,63,,,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,442,R,4,3,4
-40002,202003,100,3136,63,,,7.095022624,1.482742317,3.003997558,1.551291583,115.6929825,3136,R,3,3,3
-40002,202004,100,2115,63,,,0.67442602,,0.645360538,,73.71052632,2115,R,3,,3
-40003,202001,100,7863,16,,,,0.968230513,,2.053506032,128.0208333,7863,R,,4,4
-40003,202002,100,8121,16,,,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,8121,R,4,3,4
-40003,202003,100,2151,16,,,0.264868859,1.562091503,3.003997558,1.551291583,115.6929825,2151,R,3,3,3
-40003,202004,100,1377,16,,,0.640167364,,0.645360538,,73.71052632,1377,R,3,,3
-40004,202001,100,5131,78,,,,0.521655144,,2.053506032,128.0208333,5131,R,,4,4
-40004,202002,100,9836,78,,,1.916975248,,0.916179196,1.507228985,120.7395833,9836,R,4,3,4
-40004,202003,100,,78,,,,,3.003997558,1.551291583,115.6929825,29547.31998,FIR,3,3,3
-40004,202004,100,,78,,,,,0.645360538,,73.71052632,19068.67433,FIR,3,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+40001,202001,100,9491,35,,,,1.984319465,,2.053506032,128.0208333,9491,R,,4,4
+40001,202002,100,4783,35,,,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4783,R,4,3,4
+40001,202003,100,7902,35,,,1.652101192,1.609040929,3.003997558,1.551291583,115.6929825,7902,R,3,3,3
+40001,202004,100,4911,35,,,0.621488231,,0.645360538,,73.71052632,4911,R,3,,3
+40002,202001,100,2095,63,,,,4.739819005,,2.053506032,128.0208333,2095,R,,4,4
+40002,202002,100,442,63,,,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,442,R,4,3,4
+40002,202003,100,3136,63,,,7.095022624,1.482742317,3.003997558,1.551291583,115.6929825,3136,R,3,3,3
+40002,202004,100,2115,63,,,0.67442602,,0.645360538,,73.71052632,2115,R,3,,3
+40003,202001,100,7863,16,,,,0.968230513,,2.053506032,128.0208333,7863,R,,4,4
+40003,202002,100,8121,16,,,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,8121,R,4,3,4
+40003,202003,100,2151,16,,,0.264868859,1.562091503,3.003997558,1.551291583,115.6929825,2151,R,3,3,3
+40003,202004,100,1377,16,,,0.640167364,,0.645360538,,73.71052632,1377,R,3,,3
+40004,202001,100,5131,78,,,,0.521655144,,2.053506032,128.0208333,5131,R,,4,4
+40004,202002,100,9836,78,,,1.916975248,,0.916179196,1.507228985,120.7395833,9836,R,4,3,4
+40004,202003,100,,78,,,,,3.003997558,1.551291583,115.6929825,29547.31998,FIR,3,3,3
+40004,202004,100,,78,,,,,0.645360538,,73.71052632,19068.67433,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
similarity index 83%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
index 40a567d3..508a0c89 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
@@ -1,21 +1,21 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-50001,202001,100,6362,59,,
-50001,202002,100,8542,59,,
-50001,202003,100,5623,59,,
-50001,202004,100,7769,59,,
-50001,202005,100,4687,59,,
-50002,202001,100,4851,36,,
-50002,202002,100,8894,36,,
-50002,202003,100,3372,36,,
-50002,202004,100,3522,36,,
-50002,202005,100,2327,36,,
-50003,202001,100,2238,76,,
-50003,202002,100,769,76,,
-50003,202003,100,7722,76,,
-50003,202004,100,6445,76,,
-50003,202005,100,1521,76,,
-50004,202001,100,688,30,,
-50004,202002,100,3245,30,,
-50004,202003,100,,30,,
-50004,202004,100,,30,,
-50004,202005,100,,30,,
+identifier,date,group,question,other,lower_trim,upper_trim
+50001,202001,100,6362,59,,
+50001,202002,100,8542,59,,
+50001,202003,100,5623,59,,
+50001,202004,100,7769,59,,
+50001,202005,100,4687,59,,
+50002,202001,100,4851,36,,
+50002,202002,100,8894,36,,
+50002,202003,100,3372,36,,
+50002,202004,100,3522,36,,
+50002,202005,100,2327,36,,
+50003,202001,100,2238,76,,
+50003,202002,100,769,76,,
+50003,202003,100,7722,76,,
+50003,202004,100,6445,76,,
+50003,202005,100,1521,76,,
+50004,202001,100,688,30,,
+50004,202002,100,3245,30,,
+50004,202003,100,,30,,
+50004,202004,100,,30,,
+50004,202005,100,,30,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
similarity index 90%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
index 7dbba393..b5391be9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_5_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-50001,202001,100,6362,59,,,,0.744790447,,1.103126475,70.34328358,6362,R,,4,4
-50001,202002,100,8542,59,,,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,8542,R,4,3,4
-50001,202003,100,5623,59,,,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,5623,R,3,3,3
-50001,202004,100,7769,59,,,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,7769,R,3,3,3
-50001,202005,100,4687,59,,,0.603295147,,0.49999873,,49.9122807,4687,R,3,,3
-50002,202001,100,4851,36,,,,0.545423881,,1.103126475,70.34328358,4851,R,,4,4
-50002,202002,100,8894,36,,,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,8894,R,4,3,4
-50002,202003,100,3372,36,,,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3372,R,3,3,3
-50002,202004,100,3522,36,,,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3522,R,3,3,3
-50002,202005,100,2327,36,,,0.660704145,,0.49999873,,49.9122807,2327,R,3,,3
-50003,202001,100,2238,76,,,,2.910273082,,1.103126475,70.34328358,2238,R,,4,4
-50003,202002,100,769,76,,,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,769,R,4,3,4
-50003,202003,100,7722,76,,,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,7722,R,3,3,3
-50003,202004,100,6445,76,,,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,6445,R,3,3,3
-50003,202005,100,1521,76,,,0.235996897,,0.49999873,,49.9122807,1521,R,3,,3
-50004,202001,100,688,30,,,,0.21201849,,1.103126475,70.34328358,688,R,,4,4
-50004,202002,100,3245,30,,,4.716569767,,2.05906902,1.418769101,106.7164179,3245,R,4,3,4
-50004,202003,100,,30,,,,,3.693007078,0.959774209,97.76023392,11983.80797,FIR,3,3,3
-50004,202004,100,,30,,,,,1.086919709,2.469481356,103.7192982,13025.43707,FIR,3,3,3
-50004,202005,100,,30,,,,,0.49999873,,49.9122807,6512.701992,FIR,3,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+50001,202001,100,6362,59,,,,0.744790447,,1.103126475,70.34328358,6362,R,,4,4
+50001,202002,100,8542,59,,,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,8542,R,4,3,4
+50001,202003,100,5623,59,,,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,5623,R,3,3,3
+50001,202004,100,7769,59,,,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,7769,R,3,3,3
+50001,202005,100,4687,59,,,0.603295147,,0.49999873,,49.9122807,4687,R,3,,3
+50002,202001,100,4851,36,,,,0.545423881,,1.103126475,70.34328358,4851,R,,4,4
+50002,202002,100,8894,36,,,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,8894,R,4,3,4
+50002,202003,100,3372,36,,,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3372,R,3,3,3
+50002,202004,100,3522,36,,,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3522,R,3,3,3
+50002,202005,100,2327,36,,,0.660704145,,0.49999873,,49.9122807,2327,R,3,,3
+50003,202001,100,2238,76,,,,2.910273082,,1.103126475,70.34328358,2238,R,,4,4
+50003,202002,100,769,76,,,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,769,R,4,3,4
+50003,202003,100,7722,76,,,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,7722,R,3,3,3
+50003,202004,100,6445,76,,,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,6445,R,3,3,3
+50003,202005,100,1521,76,,,0.235996897,,0.49999873,,49.9122807,1521,R,3,,3
+50004,202001,100,688,30,,,,0.21201849,,1.103126475,70.34328358,688,R,,4,4
+50004,202002,100,3245,30,,,4.716569767,,2.05906902,1.418769101,106.7164179,3245,R,4,3,4
+50004,202003,100,,30,,,,,3.693007078,0.959774209,97.76023392,11983.80797,FIR,3,3,3
+50004,202004,100,,30,,,,,1.086919709,2.469481356,103.7192982,13025.43707,FIR,3,3,3
+50004,202005,100,,30,,,,,0.49999873,,49.9122807,6512.701992,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_input.csv
similarity index 76%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_input.csv
index db160fc8..56049684 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_input.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-60001,202001,100,5077,15,,
-60001,202002,100,7830,15,,
-60001,202003,100,1046,15,,
-60002,202001,100,1588,71,,
-60002,202002,100,1213,71,,
-60002,202003,100,3807,71,,
-60003,202001,100,6541,26,,
-60003,202002,100,336,26,,
-60003,202003,100,6351,26,,
-60004,202001,100,,3,,
-60004,202002,100,,3,,
-60004,202003,100,401,3,,
+identifier,date,group,question,other,lower_trim,upper_trim
+60001,202001,100,5077,15,,
+60001,202002,100,7830,15,,
+60001,202003,100,1046,15,,
+60002,202001,100,1588,71,,
+60002,202002,100,1213,71,,
+60002,202003,100,3807,71,,
+60003,202001,100,6541,26,,
+60003,202002,100,336,26,,
+60003,202003,100,6351,26,,
+60004,202001,100,,3,,
+60004,202002,100,,3,,
+60004,202003,100,401,3,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
similarity index 84%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index 2ad6fa96..8ce992de 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_6_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-60001,202001,100,5077,15,,,,0.648403576,,7.141605449,117.9107143,5077,R,,3,3
-60001,202002,100,7830,15,,,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,7830,R,3,3,3
-60001,202003,100,1046,15,,,0.133588761,,7.391291354,,100.9130435,1046,R,3,,4
-60002,202001,100,1588,71,,,,1.309150866,,7.141605449,117.9107143,1588,R,,3,3
-60002,202002,100,1213,71,,,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,1213,R,3,3,3
-60002,202003,100,3807,71,,,3.138499588,,7.391291354,,100.9130435,3807,R,3,,4
-60003,202001,100,6541,26,,,,19.4672619,,7.141605449,117.9107143,6541,R,,3,3
-60003,202002,100,336,26,,,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,336,R,3,3,3
-60003,202003,100,6351,26,,,18.90178571,,7.391291354,,100.9130435,6351,R,3,,4
-60004,202001,100,,3,,,,,,7.141605449,117.9107143,7500.429481,BI,,3,3
-60004,202002,100,,3,,,,,0.785823852,2.619062766,83.74107143,1050.244169,BI,3,3,3
-60004,202003,100,401,3,,,,,7.391291354,,100.9130435,401,R,3,,4
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+60001,202001,100,5077,15,,,,0.648403576,,7.141605449,117.9107143,5077,R,,3,3
+60001,202002,100,7830,15,,,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,7830,R,3,3,3
+60001,202003,100,1046,15,,,0.133588761,,7.391291354,,100.9130435,1046,R,3,,4
+60002,202001,100,1588,71,,,,1.309150866,,7.141605449,117.9107143,1588,R,,3,3
+60002,202002,100,1213,71,,,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,1213,R,3,3,3
+60002,202003,100,3807,71,,,3.138499588,,7.391291354,,100.9130435,3807,R,3,,4
+60003,202001,100,6541,26,,,,19.4672619,,7.141605449,117.9107143,6541,R,,3,3
+60003,202002,100,336,26,,,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,336,R,3,3,3
+60003,202003,100,6351,26,,,18.90178571,,7.391291354,,100.9130435,6351,R,3,,4
+60004,202001,100,,3,,,,,,7.141605449,117.9107143,7500.429481,BI,,3,3
+60004,202002,100,,3,,,,,0.785823852,2.619062766,83.74107143,1050.244169,BI,3,3,3
+60004,202003,100,401,3,,,,,7.391291354,,100.9130435,401,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_input.csv
similarity index 86%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_input.csv
index c684dae4..79ddb0fb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_input.csv
@@ -1,29 +1,29 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-70001,202001,100,5951,39,,
-70001,202002,100,1814,39,,
-70001,202003,100,734,39,,
-70001,202004,100,96,39,,
-70001,202005,100,9086,39,,
-70001,202006,100,3949,39,,
-70001,202007,100,49,39,,
-70002,202001,100,6705,94,,
-70002,202002,100,48,94,,
-70002,202003,100,5361,94,,
-70002,202004,100,8767,94,,
-70002,202005,100,9214,94,,
-70002,202006,100,7467,94,,
-70002,202007,100,3475,94,,
-70003,202001,100,6153,42,,
-70003,202002,100,7711,42,,
-70003,202003,100,5403,42,,
-70003,202004,100,7445,42,,
-70003,202005,100,7092,42,,
-70003,202006,100,2038,42,,
-70003,202007,100,8768,42,,
-70004,202001,100,,6,,
-70004,202002,100,,6,,
-70004,202003,100,6288,6,,
-70004,202004,100,,6,,
-70004,202005,100,,6,,
-70004,202006,100,5875,6,,
-70004,202007,100,,6,,
+identifier,date,group,question,other,lower_trim,upper_trim
+70001,202001,100,5951,39,,
+70001,202002,100,1814,39,,
+70001,202003,100,734,39,,
+70001,202004,100,96,39,,
+70001,202005,100,9086,39,,
+70001,202006,100,3949,39,,
+70001,202007,100,49,39,,
+70002,202001,100,6705,94,,
+70002,202002,100,48,94,,
+70002,202003,100,5361,94,,
+70002,202004,100,8767,94,,
+70002,202005,100,9214,94,,
+70002,202006,100,7467,94,,
+70002,202007,100,3475,94,,
+70003,202001,100,6153,42,,
+70003,202002,100,7711,42,,
+70003,202003,100,5403,42,,
+70003,202004,100,7445,42,,
+70003,202005,100,7092,42,,
+70003,202006,100,2038,42,,
+70003,202007,100,8768,42,,
+70004,202001,100,,6,,
+70004,202002,100,,6,,
+70004,202003,100,6288,6,,
+70004,202004,100,,6,,
+70004,202005,100,,6,,
+70004,202006,100,5875,6,,
+70004,202007,100,,6,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
similarity index 92%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index ce9f6ff5..7e8a1655 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_7_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-70001,202001,100,5951,39,,,,3.280595369,,47.92201545,107.48,5951,R,,3,3
-70001,202002,100,1814,39,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
-70001,202003,100,734,39,,,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,734,R,3,3,4
-70001,202004,100,96,39,,,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,96,R,3,3,3
-70001,202005,100,9086,39,,,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,9086,R,3,3,3
-70001,202006,100,3949,39,,,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3949,R,3,3,4
-70001,202007,100,49,39,,,0.012408205,,1.593348776,,70.24,49,R,3,,3
-70002,202001,100,6705,94,,,,139.6875,,47.92201545,107.48,6705,R,,3,3
-70002,202002,100,48,94,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,48,R,3,3,3
-70002,202003,100,5361,94,,,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,5361,R,3,3,4
-70002,202004,100,8767,94,,,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,8767,R,3,3,3
-70002,202005,100,9214,94,,,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,9214,R,3,3,3
-70002,202006,100,7467,94,,,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,7467,R,3,3,4
-70002,202007,100,3475,94,,,0.46538101,,1.593348776,,70.24,3475,R,3,,3
-70003,202001,100,6153,42,,,,0.797950979,,47.92201545,107.48,6153,R,,3,3
-70003,202002,100,7711,42,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
-70003,202003,100,5403,42,,,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,5403,R,3,3,4
-70003,202004,100,7445,42,,,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,7445,R,3,3,3
-70003,202005,100,7092,42,,,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,7092,R,3,3,3
-70003,202006,100,2038,42,,,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,2038,R,3,3,4
-70003,202007,100,8768,42,,,4.302257115,,1.593348776,,70.24,8768,R,3,,3
-70004,202001,100,,6,,,,,,47.92201545,107.48,392488.3921,BI,,3,3
-70004,202002,100,,6,,,,,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
-70004,202003,100,6288,6,,,,,37.59760599,2.994350985,98.26519337,6288,R,3,3,4
-70004,202004,100,,6,,,,,1.048019201,0.670608989,93.18857143,6589.944736,FIR,3,3,3
-70004,202005,100,,6,,,,,32.21646854,2.338226887,145.0971429,212304.7472,FIR,3,3,3
-70004,202006,100,5875,6,,,,,0.510795988,27.65768328,106.7900552,5875,R,3,3,4
-70004,202007,100,,6,,,,,1.593348776,,70.24,9360.924061,FIR,3,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+70001,202001,100,5951,39,,,,3.280595369,,47.92201545,107.48,5951,R,,3,3
+70001,202002,100,1814,39,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
+70001,202003,100,734,39,,,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,734,R,3,3,4
+70001,202004,100,96,39,,,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,96,R,3,3,3
+70001,202005,100,9086,39,,,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,9086,R,3,3,3
+70001,202006,100,3949,39,,,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3949,R,3,3,4
+70001,202007,100,49,39,,,0.012408205,,1.593348776,,70.24,49,R,3,,3
+70002,202001,100,6705,94,,,,139.6875,,47.92201545,107.48,6705,R,,3,3
+70002,202002,100,48,94,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,48,R,3,3,3
+70002,202003,100,5361,94,,,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,5361,R,3,3,4
+70002,202004,100,8767,94,,,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,8767,R,3,3,3
+70002,202005,100,9214,94,,,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,9214,R,3,3,3
+70002,202006,100,7467,94,,,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,7467,R,3,3,4
+70002,202007,100,3475,94,,,0.46538101,,1.593348776,,70.24,3475,R,3,,3
+70003,202001,100,6153,42,,,,0.797950979,,47.92201545,107.48,6153,R,,3,3
+70003,202002,100,7711,42,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
+70003,202003,100,5403,42,,,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,5403,R,3,3,4
+70003,202004,100,7445,42,,,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,7445,R,3,3,3
+70003,202005,100,7092,42,,,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,7092,R,3,3,3
+70003,202006,100,2038,42,,,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,2038,R,3,3,4
+70003,202007,100,8768,42,,,4.302257115,,1.593348776,,70.24,8768,R,3,,3
+70004,202001,100,,6,,,,,,47.92201545,107.48,392488.3921,BI,,3,3
+70004,202002,100,,6,,,,,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
+70004,202003,100,6288,6,,,,,37.59760599,2.994350985,98.26519337,6288,R,3,3,4
+70004,202004,100,,6,,,,,1.048019201,0.670608989,93.18857143,6589.944736,FIR,3,3,3
+70004,202005,100,,6,,,,,32.21646854,2.338226887,145.0971429,212304.7472,FIR,3,3,3
+70004,202006,100,5875,6,,,,,0.510795988,27.65768328,106.7900552,5875,R,3,3,4
+70004,202007,100,,6,,,,,1.593348776,,70.24,9360.924061,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_input.csv
similarity index 76%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_input.csv
index 035d605a..e0c1c37c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_input.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-80001,202001,100,4042,91,,
-80001,202002,100,2805,91,,
-80001,202003,100,644,91,,
-80002,202001,100,7138,85,,
-80002,202002,100,1970,85,,
-80002,202003,100,2746,85,,
-80003,202001,100,2846,41,,
-80003,202002,100,3552,41,,
-80003,202003,100,9015,41,,
-80004,202001,100,5820,70,,
-80004,202002,100,3729,70,,
-80004,202003,100,8233,70,,
+identifier,date,group,question,other,lower_trim,upper_trim
+80001,202001,100,4042,91,,
+80001,202002,100,2805,91,,
+80001,202003,100,644,91,,
+80002,202001,100,7138,85,,
+80002,202002,100,1970,85,,
+80002,202003,100,2746,85,,
+80003,202001,100,2846,41,,
+80003,202002,100,3552,41,,
+80003,202003,100,9015,41,,
+80004,202001,100,5820,70,,
+80004,202002,100,3729,70,,
+80004,202003,100,8233,70,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
similarity index 84%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index 5598aea3..605dad04 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_8_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-80001,202001,100,4042,91,,,,1.440998217,,1.856581839,69.14982578,4042,R,,4,4
-80001,202002,100,2805,91,,,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,2805,R,4,4,4
-80001,202003,100,644,91,,,0.229590018,,1.59233398,,71.90940767,644,R,4,,4
-80002,202001,100,7138,85,,,,3.623350254,,1.856581839,69.14982578,7138,R,,4,4
-80002,202002,100,1970,85,,,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,1970,R,4,4,4
-80002,202003,100,2746,85,,,1.393908629,,1.59233398,,71.90940767,2746,R,4,,4
-80003,202001,100,2846,41,,,,0.801238739,,1.856581839,69.14982578,2846,R,,4,4
-80003,202002,100,3552,41,,,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,3552,R,4,4,4
-80003,202003,100,9015,41,,,2.538006757,,1.59233398,,71.90940767,9015,R,4,,4
-80004,202001,100,5820,70,,,,1.560740145,,1.856581839,69.14982578,5820,R,,4,4
-80004,202002,100,3729,70,,,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,3729,R,4,4,4
-80004,202003,100,8233,70,,,2.207830518,,1.59233398,,71.90940767,8233,R,4,,4
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+80001,202001,100,4042,91,,,,1.440998217,,1.856581839,69.14982578,4042,R,,4,4
+80001,202002,100,2805,91,,,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,2805,R,4,4,4
+80001,202003,100,644,91,,,0.229590018,,1.59233398,,71.90940767,644,R,4,,4
+80002,202001,100,7138,85,,,,3.623350254,,1.856581839,69.14982578,7138,R,,4,4
+80002,202002,100,1970,85,,,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,1970,R,4,4,4
+80002,202003,100,2746,85,,,1.393908629,,1.59233398,,71.90940767,2746,R,4,,4
+80003,202001,100,2846,41,,,,0.801238739,,1.856581839,69.14982578,2846,R,,4,4
+80003,202002,100,3552,41,,,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,3552,R,4,4,4
+80003,202003,100,9015,41,,,2.538006757,,1.59233398,,71.90940767,9015,R,4,,4
+80004,202001,100,5820,70,,,,1.560740145,,1.856581839,69.14982578,5820,R,,4,4
+80004,202002,100,3729,70,,,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,3729,R,4,4,4
+80004,202003,100,8233,70,,,2.207830518,,1.59233398,,71.90940767,8233,R,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_input.csv
similarity index 75%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_input.csv
index de1a34a3..f873f7b9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_input.csv
@@ -1,12 +1,12 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-90001,202001,100,2417,66,,
-90001,202002,100,7928,66,,
-90001,202003,100,7319,66,,
-90002,202001,100,1706,27,,
-90002,202002,100,1481,27,,
-90002,202003,100,8390,27,,
-90003,202001,100,1069,14,,
-90003,202002,100,8228,14,,
-90003,202003,100,2415,14,,
-90004,202001,100,7728,73,,
-90004,202003,100,,73,,
+identifier,date,group,question,other,lower_trim,upper_trim
+90001,202001,100,2417,66,,
+90001,202002,100,7928,66,,
+90001,202003,100,7319,66,,
+90002,202001,100,1706,27,,
+90002,202002,100,1481,27,,
+90002,202003,100,8390,27,,
+90003,202001,100,1069,14,,
+90003,202002,100,8228,14,,
+90003,202003,100,2415,14,,
+90004,202001,100,7728,73,,
+90004,202003,100,,73,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
similarity index 82%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 0b2a70fb..aa9412ac 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_9_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-90001,202001,100,2417,66,,,,0.304868819,,0.528905137,71.77777778,2417,R,,3,4
-90001,202002,100,7928,66,,,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,7928,R,3,3,3
-90001,202003,100,7319,66,,,0.923183653,,2.293928258,,169.3831776,7319,R,3,,3
-90002,202001,100,1706,27,,,,1.151924375,,0.528905137,71.77777778,1706,R,,3,4
-90002,202002,100,1481,27,,,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,1481,R,3,3,3
-90002,202003,100,8390,27,,,5.665091155,,2.293928258,,169.3831776,8390,R,3,,3
-90003,202001,100,1069,14,,,,0.129922217,,0.528905137,71.77777778,1069,R,,3,4
-90003,202002,100,8228,14,,,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,8228,R,3,3,3
-90003,202003,100,2415,14,,,0.293509966,,2.293928258,,169.3831776,2415,R,3,,3
-90004,202001,100,7728,73,,,,,,,71.77777778,7728,R,,,4
-90004,202003,100,,73,,,,,,,169.3831776,12364.97196,C,,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+90001,202001,100,2417,66,,,,0.304868819,,0.528905137,71.77777778,2417,R,,3,4
+90001,202002,100,7928,66,,,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,7928,R,3,3,3
+90001,202003,100,7319,66,,,0.923183653,,2.293928258,,169.3831776,7319,R,3,,3
+90002,202001,100,1706,27,,,,1.151924375,,0.528905137,71.77777778,1706,R,,3,4
+90002,202002,100,1481,27,,,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,1481,R,3,3,3
+90002,202003,100,8390,27,,,5.665091155,,2.293928258,,169.3831776,8390,R,3,,3
+90003,202001,100,1069,14,,,,0.129922217,,0.528905137,71.77777778,1069,R,,3,4
+90003,202002,100,8228,14,,,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,8228,R,3,3,3
+90003,202003,100,2415,14,,,0.293509966,,2.293928258,,169.3831776,2415,R,3,,3
+90004,202001,100,7728,73,,,,,,,71.77777778,7728,R,,,4
+90004,202003,100,,73,,,,,,,169.3831776,12364.97196,C,,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_input.csv
similarity index 80%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_input.csv
index 87a7fec8..72cd926e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_input.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-100001,202001,100,3074,26,,
-100001,202002,100,9529,26,,
-100001,202003,100,615,26,,
-100001,202004,100,3540,26,,
-100002,202001,100,8084,19,,
-100002,202002,100,2422,19,,
-100002,202003,100,3058,19,,
-100002,202004,100,5608,19,,
-100003,202001,100,5161,46,,
-100003,202002,100,3648,46,,
-100003,202003,100,205,46,,
-100003,202004,100,2594,46,,
-100004,202001,100,,86,,
-100004,202002,100,,86,,
-100004,202004,100,9352,86,,
+identifier,date,group,question,other,lower_trim,upper_trim
+100001,202001,100,3074,26,,
+100001,202002,100,9529,26,,
+100001,202003,100,615,26,,
+100001,202004,100,3540,26,,
+100002,202001,100,8084,19,,
+100002,202002,100,2422,19,,
+100002,202003,100,3058,19,,
+100002,202004,100,5608,19,,
+100003,202001,100,5161,46,,
+100003,202002,100,3648,46,,
+100003,202003,100,205,46,,
+100003,202004,100,2594,46,,
+100004,202001,100,,86,,
+100004,202002,100,,86,,
+100004,202004,100,9352,86,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
similarity index 87%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index 6a9bbd4b..bfcd5939 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_10_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-100001,202001,100,3074,26,,,,0.322594186,,1.691693133,179.3296703,3074,R,,3,3
-100001,202002,100,9529,26,,,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,9529,R,3,3,3
-100001,202003,100,615,26,,,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,615,R,3,3,3
-100001,202004,100,3540,26,,,5.756097561,,6.74787815,,119.1751412,3540,R,3,,4
-100002,202001,100,8084,19,,,,3.337737407,,1.691693133,179.3296703,8084,R,,3,3
-100002,202002,100,2422,19,,,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,2422,R,3,3,3
-100002,202003,100,3058,19,,,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3058,R,3,3,3
-100002,202004,100,5608,19,,,1.833878352,,6.74787815,,119.1751412,5608,R,3,,4
-100003,202001,100,5161,46,,,,1.414747807,,1.691693133,179.3296703,5161,R,,3,3
-100003,202002,100,3648,46,,,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3648,R,3,3,3
-100003,202003,100,205,46,,,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,205,R,3,3,3
-100003,202004,100,2594,46,,,12.65365854,,6.74787815,,119.1751412,2594,R,3,,4
-100004,202001,100,,86,,,,,,1.691693133,179.3296703,15422.35165,C,,3,3
-100004,202002,100,,86,,,,,1.368771264,11.36048394,171.4175824,21109.67176,FIC,3,3,3
-100004,202004,100,9352,86,,,,,6.74787815,,119.1751412,9352,R,3,3,4
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+100001,202001,100,3074,26,,,,0.322594186,,1.691693133,179.3296703,3074,R,,3,3
+100001,202002,100,9529,26,,,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,9529,R,3,3,3
+100001,202003,100,615,26,,,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,615,R,3,3,3
+100001,202004,100,3540,26,,,5.756097561,,6.74787815,,119.1751412,3540,R,3,,4
+100002,202001,100,8084,19,,,,3.337737407,,1.691693133,179.3296703,8084,R,,3,3
+100002,202002,100,2422,19,,,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,2422,R,3,3,3
+100002,202003,100,3058,19,,,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3058,R,3,3,3
+100002,202004,100,5608,19,,,1.833878352,,6.74787815,,119.1751412,5608,R,3,,4
+100003,202001,100,5161,46,,,,1.414747807,,1.691693133,179.3296703,5161,R,,3,3
+100003,202002,100,3648,46,,,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3648,R,3,3,3
+100003,202003,100,205,46,,,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,205,R,3,3,3
+100003,202004,100,2594,46,,,12.65365854,,6.74787815,,119.1751412,2594,R,3,,4
+100004,202001,100,,86,,,,,,1.691693133,179.3296703,15422.35165,C,,3,3
+100004,202002,100,,86,,,,,1.368771264,11.36048394,171.4175824,21109.67176,FIC,3,3,3
+100004,202004,100,9352,86,,,,,6.74787815,,119.1751412,9352,R,3,3,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_input.csv
similarity index 85%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_input.csv
index 900e01c9..1199473d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_input.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-110001,202001,100,9244,89,,
-110001,202002,100,8916,89,,
-110001,202003,100,6194,89,,
-110002,202001,100,4826,83,,
-110002,202002,100,5903,83,,
-110002,202003,100,4743,83,,
-110003,202001,100,7586,4,,
-110003,202002,100,1016,4,,
-110003,202003,100,1429,4,,
-110004,202001,100,3975,76,,
-110004,202002,100,3044,76,,
-110004,202003,100,,76,,
-110005,202001,200,5217,27,,
-110005,202002,200,7016,27,,
-110005,202003,200,9940,27,,
-110006,202001,200,5325,42,,
-110006,202002,200,7747,42,,
-110006,202003,200,6685,42,,
-110007,202001,200,5496,19,,
-110007,202002,200,1010,19,,
-110007,202003,200,1235,19,,
-110008,202001,200,,43,,
-110008,202002,200,3913,43,,
-110008,202003,200,6013,43,,
+identifier,date,group,question,other,lower_trim,upper_trim
+110001,202001,100,9244,89,,
+110001,202002,100,8916,89,,
+110001,202003,100,6194,89,,
+110002,202001,100,4826,83,,
+110002,202002,100,5903,83,,
+110002,202003,100,4743,83,,
+110003,202001,100,7586,4,,
+110003,202002,100,1016,4,,
+110003,202003,100,1429,4,,
+110004,202001,100,3975,76,,
+110004,202002,100,3044,76,,
+110004,202003,100,,76,,
+110005,202001,200,5217,27,,
+110005,202002,200,7016,27,,
+110005,202003,200,9940,27,,
+110006,202001,200,5325,42,,
+110006,202002,200,7747,42,,
+110006,202003,200,6685,42,,
+110007,202001,200,5496,19,,
+110007,202002,200,1010,19,,
+110007,202003,200,1235,19,,
+110008,202001,200,,43,,
+110008,202002,200,3913,43,,
+110008,202003,200,6013,43,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
similarity index 91%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 8b316035..46f570de 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_11_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-110001,202001,100,9244,89,,,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
-110001,202002,100,8916,89,,,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
-110001,202003,100,6194,89,,,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
-110002,202001,100,4826,83,,,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
-110002,202002,100,5903,83,,,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
-110002,202003,100,4743,83,,,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
-110003,202001,100,7586,4,,,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
-110003,202002,100,1016,4,,,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
-110003,202003,100,1429,4,,,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
-110004,202001,100,3975,76,,,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
-110004,202002,100,3044,76,,,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
-110004,202003,100,,76,,,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
-110005,202001,200,5217,27,,,,0.743586089,,2.290844366,182.25,5217,R,,3,3
-110005,202002,200,7016,27,,,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,7016,R,3,4,4
-110005,202003,200,9940,27,,,1.416761688,,1.259780318,,182.2366412,9940,R,4,,4
-110006,202001,200,5325,42,,,,0.68736285,,2.290844366,182.25,5325,R,,3,3
-110006,202002,200,7747,42,,,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,7747,R,3,4,4
-110006,202003,200,6685,42,,,0.862914677,,1.259780318,,182.2366412,6685,R,4,,4
-110007,202001,200,5496,19,,,,5.441584158,,2.290844366,182.25,5496,R,,3,3
-110007,202002,200,1010,19,,,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1010,R,3,4,4
-110007,202003,200,1235,19,,,1.222772277,,1.259780318,,182.2366412,1235,R,4,,4
-110008,202001,200,,43,,,,,,2.290844366,182.25,8964.074003,BI,,3,3
-110008,202002,200,3913,43,,,,0.650756694,0.994479964,0.833317149,150.2748092,3913,R,3,4,4
-110008,202003,200,6013,43,,,1.53667263,,1.259780318,,182.2366412,6013,R,4,,4
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,9244,89,,,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
+110001,202002,100,8916,89,,,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
+110001,202003,100,6194,89,,,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
+110002,202001,100,4826,83,,,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
+110002,202002,100,5903,83,,,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
+110002,202003,100,4743,83,,,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
+110003,202001,100,7586,4,,,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
+110003,202002,100,1016,4,,,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
+110003,202003,100,1429,4,,,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
+110004,202001,100,3975,76,,,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
+110004,202002,100,3044,76,,,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
+110004,202003,100,,76,,,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
+110005,202001,200,5217,27,,,,0.743586089,,2.290844366,182.25,5217,R,,3,3
+110005,202002,200,7016,27,,,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,7016,R,3,4,4
+110005,202003,200,9940,27,,,1.416761688,,1.259780318,,182.2366412,9940,R,4,,4
+110006,202001,200,5325,42,,,,0.68736285,,2.290844366,182.25,5325,R,,3,3
+110006,202002,200,7747,42,,,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,7747,R,3,4,4
+110006,202003,200,6685,42,,,0.862914677,,1.259780318,,182.2366412,6685,R,4,,4
+110007,202001,200,5496,19,,,,5.441584158,,2.290844366,182.25,5496,R,,3,3
+110007,202002,200,1010,19,,,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1010,R,3,4,4
+110007,202003,200,1235,19,,,1.222772277,,1.259780318,,182.2366412,1235,R,4,,4
+110008,202001,200,,43,,,,,,2.290844366,182.25,8964.074003,BI,,3,3
+110008,202002,200,3913,43,,,,0.650756694,0.994479964,0.833317149,150.2748092,3913,R,3,4,4
+110008,202003,200,6013,43,,,1.53667263,,1.259780318,,182.2366412,6013,R,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_input.csv
similarity index 83%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_input.csv
index 884d7071..62597ee5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_input.csv
@@ -1,21 +1,21 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-120001,202001,100,5240,50,,
-120001,202002,100,2490,50,,
-120001,202003,100,3382,50,,
-120001,202004,100,4475,50,,
-120001,202005,100,1316,50,,
-120002,202001,100,7410,78,,
-120002,202002,100,3602,78,,
-120002,202003,100,4972,78,,
-120002,202004,100,8838,78,,
-120002,202005,100,1535,78,,
-120003,202001,100,4530,94,,
-120003,202002,100,7451,94,,
-120003,202003,100,7586,94,,
-120003,202004,100,283,94,,
-120003,202005,100,4416,94,,
-120004,202001,100,,100,,
-120004,202002,100,,100,,
-120004,202003,100,,100,,
-120004,202004,100,,100,,
-120004,202005,100,,100,,
+identifier,date,group,question,other,lower_trim,upper_trim
+120001,202001,100,5240,50,,
+120001,202002,100,2490,50,,
+120001,202003,100,3382,50,,
+120001,202004,100,4475,50,,
+120001,202005,100,1316,50,,
+120002,202001,100,7410,78,,
+120002,202002,100,3602,78,,
+120002,202003,100,4972,78,,
+120002,202004,100,8838,78,,
+120002,202005,100,1535,78,,
+120003,202001,100,4530,94,,
+120003,202002,100,7451,94,,
+120003,202003,100,7586,94,,
+120003,202004,100,283,94,,
+120003,202005,100,4416,94,,
+120004,202001,100,,100,,
+120004,202002,100,,100,,
+120004,202003,100,,100,,
+120004,202004,100,,100,,
+120004,202005,100,,100,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
similarity index 90%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 131e116f..294ad378 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_12_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-120001,202001,100,5240,50,,,,2.104417671,,1.589860068,77.38738739,5240,R,,3,3
-120001,202002,100,2490,50,,,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,2490,R,3,3,3
-120001,202003,100,3382,50,,,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3382,R,3,3,3
-120001,202004,100,4475,50,,,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,4475,R,3,3,3
-120001,202005,100,1316,50,,,0.294078212,,5.357333441,,32.73423423,1316,R,3,,3
-120002,202001,100,7410,78,,,,2.05719045,,1.589860068,77.38738739,7410,R,,3,3
-120002,202002,100,3602,78,,,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3602,R,3,3,3
-120002,202003,100,4972,78,,,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,4972,R,3,3,3
-120002,202004,100,8838,78,,,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,8838,R,3,3,3
-120002,202005,100,1535,78,,,0.173681828,,5.357333441,,32.73423423,1535,R,3,,3
-120003,202001,100,4530,94,,,,0.607972084,,1.589860068,77.38738739,4530,R,,3,3
-120003,202002,100,7451,94,,,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,7451,R,3,3,3
-120003,202003,100,7586,94,,,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,7586,R,3,3,3
-120003,202004,100,283,94,,,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,283,R,3,3,3
-120003,202005,100,4416,94,,,15.60424028,,5.357333441,,32.73423423,4416,R,3,,3
-120004,202001,100,,100,,,,,,1.589860068,77.38738739,7738.738739,C,,3,3
-120004,202002,100,,100,,,,,0.868701022,0.814303919,61.0045045,6722.650253,FIC,3,3,3
-120004,202003,100,,100,,,,,1.252231853,9.374659539,71.8018018,8418.316782,FIC,3,3,3
-120004,202004,100,,100,,,,,1.046013805,3.074065265,61.24324324,8805.675573,FIC,3,3,3
-120004,202005,100,,100,,,,,5.357333441,,32.73423423,47174.94022,FIC,3,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+120001,202001,100,5240,50,,,,2.104417671,,1.589860068,77.38738739,5240,R,,3,3
+120001,202002,100,2490,50,,,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,2490,R,3,3,3
+120001,202003,100,3382,50,,,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3382,R,3,3,3
+120001,202004,100,4475,50,,,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,4475,R,3,3,3
+120001,202005,100,1316,50,,,0.294078212,,5.357333441,,32.73423423,1316,R,3,,3
+120002,202001,100,7410,78,,,,2.05719045,,1.589860068,77.38738739,7410,R,,3,3
+120002,202002,100,3602,78,,,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3602,R,3,3,3
+120002,202003,100,4972,78,,,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,4972,R,3,3,3
+120002,202004,100,8838,78,,,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,8838,R,3,3,3
+120002,202005,100,1535,78,,,0.173681828,,5.357333441,,32.73423423,1535,R,3,,3
+120003,202001,100,4530,94,,,,0.607972084,,1.589860068,77.38738739,4530,R,,3,3
+120003,202002,100,7451,94,,,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,7451,R,3,3,3
+120003,202003,100,7586,94,,,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,7586,R,3,3,3
+120003,202004,100,283,94,,,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,283,R,3,3,3
+120003,202005,100,4416,94,,,15.60424028,,5.357333441,,32.73423423,4416,R,3,,3
+120004,202001,100,,100,,,,,,1.589860068,77.38738739,7738.738739,C,,3,3
+120004,202002,100,,100,,,,,0.868701022,0.814303919,61.0045045,6722.650253,FIC,3,3,3
+120004,202003,100,,100,,,,,1.252231853,9.374659539,71.8018018,8418.316782,FIC,3,3,3
+120004,202004,100,,100,,,,,1.046013805,3.074065265,61.24324324,8805.675573,FIC,3,3,3
+120004,202005,100,,100,,,,,5.357333441,,32.73423423,47174.94022,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_input.csv
similarity index 86%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_input.csv
index ea43f34c..8c65643a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_input.csv
@@ -1,28 +1,28 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-130001,202001,100,6583,20,,
-130001,202002,100,3759,20,,
-130001,202003,100,8256,20,,
-130001,202004,100,6743,20,,
-130001,202005,100,6811,20,,
-130001,202006,100,9896,20,,
-130001,202007,100,3282,20,,
-130002,202001,100,687,69,,
-130002,202002,100,8987,69,,
-130002,202003,100,371,69,,
-130002,202004,100,3385,69,,
-130002,202005,100,6606,69,,
-130002,202006,100,5901,69,,
-130002,202007,100,9834,69,,
-130003,202001,100,7113,39,,
-130003,202002,100,8583,39,,
-130003,202003,100,5129,39,,
-130003,202004,100,2024,39,,
-130003,202005,100,9422,39,,
-130003,202006,100,8710,39,,
-130003,202007,100,6461,39,,
-130004,202001,100,2571,37,,
-130004,202002,100,,37,,
-130004,202003,100,,37,,
-130004,202005,100,,37,,
-130004,202006,100,,37,,
-130004,202007,100,6621,37,,
+identifier,date,group,question,other,lower_trim,upper_trim
+130001,202001,100,6583,20,,
+130001,202002,100,3759,20,,
+130001,202003,100,8256,20,,
+130001,202004,100,6743,20,,
+130001,202005,100,6811,20,,
+130001,202006,100,9896,20,,
+130001,202007,100,3282,20,,
+130002,202001,100,687,69,,
+130002,202002,100,8987,69,,
+130002,202003,100,371,69,,
+130002,202004,100,3385,69,,
+130002,202005,100,6606,69,,
+130002,202006,100,5901,69,,
+130002,202007,100,9834,69,,
+130003,202001,100,7113,39,,
+130003,202002,100,8583,39,,
+130003,202003,100,5129,39,,
+130003,202004,100,2024,39,,
+130003,202005,100,9422,39,,
+130003,202006,100,8710,39,,
+130003,202007,100,6461,39,,
+130004,202001,100,2571,37,,
+130004,202002,100,,37,,
+130004,202003,100,,37,,
+130004,202005,100,,37,,
+130004,202006,100,,37,,
+130004,202007,100,6621,37,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
similarity index 92%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 41be2f11..5e53fb72 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_13_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-130001,202001,100,6583,20,,,,1.751263634,,0.885479533,102.7515152,6583,R,,3,4
-130001,202002,100,3759,20,,,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3759,R,3,3,3
-130001,202003,100,8256,20,,,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,8256,R,3,3,3
-130001,202004,100,6743,20,,,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,6743,R,3,3,3
-130001,202005,100,6811,20,,,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,6811,R,3,3,3
-130001,202006,100,9896,20,,,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,9896,R,3,3,3
-130001,202007,100,3282,20,,,0.331649151,,0.913312467,,158.7757576,3282,R,3,,4
-130002,202001,100,687,69,,,,0.076443752,,0.885479533,102.7515152,687,R,,3,4
-130002,202002,100,8987,69,,,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,8987,R,3,3,3
-130002,202003,100,371,69,,,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,371,R,3,3,3
-130002,202004,100,3385,69,,,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3385,R,3,3,3
-130002,202005,100,6606,69,,,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,6606,R,3,3,3
-130002,202006,100,5901,69,,,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,5901,R,3,3,3
-130002,202007,100,9834,69,,,1.666497204,,0.913312467,,158.7757576,9834,R,3,,4
-130003,202001,100,7113,39,,,,0.828731213,,0.885479533,102.7515152,7113,R,,3,4
-130003,202002,100,8583,39,,,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,8583,R,3,3,3
-130003,202003,100,5129,39,,,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,5129,R,3,3,3
-130003,202004,100,2024,39,,,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,2024,R,3,3,3
-130003,202005,100,9422,39,,,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,9422,R,3,3,3
-130003,202006,100,8710,39,,,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,8710,R,3,3,3
-130003,202007,100,6461,39,,,0.741791045,,0.913312467,,158.7757576,6461,R,3,,4
-130004,202001,100,2571,37,,,,,,0.885479533,102.7515152,2571,R,,3,4
-130004,202002,100,,37,,,,,4.953064646,8.784150176,166.6328125,12734.3292,FIR,3,3,3
-130004,202003,100,,37,,,,,0.945062422,1.289357643,107.46875,12034.73601,FIR,3,3,3
-130004,202005,100,,37,,,,,2.538924611,0.963158093,178.4296875,10550.61563,BI,3,3,3
-130004,202006,100,,37,,,,,1.090218262,1.654461386,191.4609375,10954.18883,BI,3,3,3
-130004,202007,100,6621,37,,,,,0.913312467,,158.7757576,6621,R,3,,4
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+130001,202001,100,6583,20,,,,1.751263634,,0.885479533,102.7515152,6583,R,,3,4
+130001,202002,100,3759,20,,,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3759,R,3,3,3
+130001,202003,100,8256,20,,,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,8256,R,3,3,3
+130001,202004,100,6743,20,,,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,6743,R,3,3,3
+130001,202005,100,6811,20,,,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,6811,R,3,3,3
+130001,202006,100,9896,20,,,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,9896,R,3,3,3
+130001,202007,100,3282,20,,,0.331649151,,0.913312467,,158.7757576,3282,R,3,,4
+130002,202001,100,687,69,,,,0.076443752,,0.885479533,102.7515152,687,R,,3,4
+130002,202002,100,8987,69,,,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,8987,R,3,3,3
+130002,202003,100,371,69,,,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,371,R,3,3,3
+130002,202004,100,3385,69,,,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3385,R,3,3,3
+130002,202005,100,6606,69,,,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,6606,R,3,3,3
+130002,202006,100,5901,69,,,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,5901,R,3,3,3
+130002,202007,100,9834,69,,,1.666497204,,0.913312467,,158.7757576,9834,R,3,,4
+130003,202001,100,7113,39,,,,0.828731213,,0.885479533,102.7515152,7113,R,,3,4
+130003,202002,100,8583,39,,,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,8583,R,3,3,3
+130003,202003,100,5129,39,,,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,5129,R,3,3,3
+130003,202004,100,2024,39,,,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,2024,R,3,3,3
+130003,202005,100,9422,39,,,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,9422,R,3,3,3
+130003,202006,100,8710,39,,,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,8710,R,3,3,3
+130003,202007,100,6461,39,,,0.741791045,,0.913312467,,158.7757576,6461,R,3,,4
+130004,202001,100,2571,37,,,,,,0.885479533,102.7515152,2571,R,,3,4
+130004,202002,100,,37,,,,,4.953064646,8.784150176,166.6328125,12734.3292,FIR,3,3,3
+130004,202003,100,,37,,,,,0.945062422,1.289357643,107.46875,12034.73601,FIR,3,3,3
+130004,202005,100,,37,,,,,2.538924611,0.963158093,178.4296875,10550.61563,BI,3,3,3
+130004,202006,100,,37,,,,,1.090218262,1.654461386,191.4609375,10954.18883,BI,3,3,3
+130004,202007,100,6621,37,,,,,0.913312467,,158.7757576,6621,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_input.csv
similarity index 86%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_input.csv
index dec72b37..beb2e119 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_input.csv
@@ -1,28 +1,28 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-140001,202001,100,3582,27,,
-140001,202002,100,4533,27,,
-140001,202003,100,4471,27,,
-140001,202004,100,3040,27,,
-140001,202005,100,8519,27,,
-140001,202006,100,8690,27,,
-140001,202007,100,9979,27,,
-140002,202001,100,5359,83,,
-140002,202002,100,7091,83,,
-140002,202003,100,7098,83,,
-140002,202004,100,7408,83,,
-140002,202005,100,1937,83,,
-140002,202006,100,6711,83,,
-140002,202007,100,1052,83,,
-140003,202001,100,439,89,,
-140003,202002,100,7783,89,,
-140003,202003,100,897,89,,
-140003,202004,100,8477,89,,
-140003,202005,100,2207,89,,
-140003,202006,100,9889,89,,
-140003,202007,100,2528,89,,
-140004,202001,100,,28,,
-140004,202002,100,,28,,
-140004,202003,100,,28,,
-140004,202005,100,,28,,
-140004,202006,100,,28,,
-140004,202007,100,7243,28,,
+identifier,date,group,question,other,lower_trim,upper_trim
+140001,202001,100,3582,27,,
+140001,202002,100,4533,27,,
+140001,202003,100,4471,27,,
+140001,202004,100,3040,27,,
+140001,202005,100,8519,27,,
+140001,202006,100,8690,27,,
+140001,202007,100,9979,27,,
+140002,202001,100,5359,83,,
+140002,202002,100,7091,83,,
+140002,202003,100,7098,83,,
+140002,202004,100,7408,83,,
+140002,202005,100,1937,83,,
+140002,202006,100,6711,83,,
+140002,202007,100,1052,83,,
+140003,202001,100,439,89,,
+140003,202002,100,7783,89,,
+140003,202003,100,897,89,,
+140003,202004,100,8477,89,,
+140003,202005,100,2207,89,,
+140003,202006,100,9889,89,,
+140003,202007,100,2528,89,,
+140004,202001,100,,28,,
+140004,202002,100,,28,,
+140004,202003,100,,28,,
+140004,202005,100,,28,,
+140004,202006,100,,28,,
+140004,202007,100,7243,28,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
similarity index 92%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 9122440f..19a787eb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-140001,202001,100,3582,27,,,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3
-140001,202002,100,4533,27,,,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3
-140001,202003,100,4471,27,,,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3
-140001,202004,100,3040,27,,,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3
-140001,202005,100,8519,27,,,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3
-140001,202006,100,8690,27,,,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3
-140001,202007,100,9979,27,,,1.148331415,,0.520242185,,91.63876652,9979,R,3,,4
-140002,202001,100,5359,83,,,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3
-140002,202002,100,7091,83,,,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3
-140002,202003,100,7098,83,,,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3
-140002,202004,100,7408,83,,,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3
-140002,202005,100,1937,83,,,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3
-140002,202006,100,6711,83,,,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3
-140002,202007,100,1052,83,,,0.156757562,,0.520242185,,91.63876652,1052,R,3,,4
-140003,202001,100,439,89,,,,0.056404985,,0.534118956,47.13567839,439,R,,3,3
-140003,202002,100,7783,89,,,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3
-140003,202003,100,897,89,,,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3
-140003,202004,100,8477,89,,,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3
-140003,202005,100,2207,89,,,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3
-140003,202006,100,9889,89,,,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3
-140003,202007,100,2528,89,,,0.255637577,,0.520242185,,91.63876652,2528,R,3,,4
-140004,202001,100,,28,,,,,,0.534118956,47.13567839,1319.798995,C,,3,3
-140004,202002,100,,28,,,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3
-140004,202003,100,,28,,,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3
-140004,202005,100,,28,,,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3
-140004,202006,100,,28,,,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3
-140004,202007,100,7243,28,,,,,0.520242185,,91.63876652,7243,R,3,,4
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+140001,202001,100,3582,27,,,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3
+140001,202002,100,4533,27,,,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3
+140001,202003,100,4471,27,,,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3
+140001,202004,100,3040,27,,,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3
+140001,202005,100,8519,27,,,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3
+140001,202006,100,8690,27,,,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3
+140001,202007,100,9979,27,,,1.148331415,,0.520242185,,91.63876652,9979,R,3,,4
+140002,202001,100,5359,83,,,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3
+140002,202002,100,7091,83,,,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3
+140002,202003,100,7098,83,,,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3
+140002,202004,100,7408,83,,,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3
+140002,202005,100,1937,83,,,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3
+140002,202006,100,6711,83,,,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3
+140002,202007,100,1052,83,,,0.156757562,,0.520242185,,91.63876652,1052,R,3,,4
+140003,202001,100,439,89,,,,0.056404985,,0.534118956,47.13567839,439,R,,3,3
+140003,202002,100,7783,89,,,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3
+140003,202003,100,897,89,,,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3
+140003,202004,100,8477,89,,,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3
+140003,202005,100,2207,89,,,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3
+140003,202006,100,9889,89,,,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3
+140003,202007,100,2528,89,,,0.255637577,,0.520242185,,91.63876652,2528,R,3,,4
+140004,202001,100,,28,,,,,,0.534118956,47.13567839,1319.798995,C,,3,3
+140004,202002,100,,28,,,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3
+140004,202003,100,,28,,,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3
+140004,202005,100,,28,,,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3
+140004,202006,100,,28,,,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3
+140004,202007,100,7243,28,,,,,0.520242185,,91.63876652,7243,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_input.csv
similarity index 86%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_input.csv
index 1eeb18ea..ac04a110 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_input.csv
@@ -1,28 +1,28 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-150001,202001,100,5891,15,,
-150001,202002,100,4581,15,,
-150001,202003,100,4741,15,,
-150001,202004,100,8092,15,,
-150001,202005,100,2727,15,,
-150001,202006,100,2363,15,,
-150001,202007,100,9549,15,,
-150002,202001,100,8611,5,,
-150002,202002,100,9383,5,,
-150002,202003,100,1064,5,,
-150002,202004,100,7419,5,,
-150002,202005,100,9967,5,,
-150002,202006,100,1393,5,,
-150002,202007,100,2593,5,,
-150003,202001,100,3426,79,,
-150003,202002,100,6246,79,,
-150003,202003,100,8402,79,,
-150003,202004,100,3891,79,,
-150003,202005,100,5463,79,,
-150003,202006,100,6852,79,,
-150003,202007,100,2959,79,,
-150004,202001,100,,69,,
-150004,202002,100,,69,,
-150004,202003,100,4208,69,,
-150004,202005,100,2818,69,,
-150004,202006,100,,69,,
-150004,202007,100,,69,,
+identifier,date,group,question,other,lower_trim,upper_trim
+150001,202001,100,5891,15,,
+150001,202002,100,4581,15,,
+150001,202003,100,4741,15,,
+150001,202004,100,8092,15,,
+150001,202005,100,2727,15,,
+150001,202006,100,2363,15,,
+150001,202007,100,9549,15,,
+150002,202001,100,8611,5,,
+150002,202002,100,9383,5,,
+150002,202003,100,1064,5,,
+150002,202004,100,7419,5,,
+150002,202005,100,9967,5,,
+150002,202006,100,1393,5,,
+150002,202007,100,2593,5,,
+150003,202001,100,3426,79,,
+150003,202002,100,6246,79,,
+150003,202003,100,8402,79,,
+150003,202004,100,3891,79,,
+150003,202005,100,5463,79,,
+150003,202006,100,6852,79,,
+150003,202007,100,2959,79,,
+150004,202001,100,,69,,
+150004,202002,100,,69,,
+150004,202003,100,4208,69,,
+150004,202005,100,2818,69,,
+150004,202006,100,,69,,
+150004,202007,100,,69,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
similarity index 92%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index a7cbfda8..6ab59ef8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_15_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-150001,202001,100,5891,15,,,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3
-150001,202002,100,4581,15,,,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3
-150001,202003,100,4741,15,,,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4
-150001,202004,100,8092,15,,,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3
-150001,202005,100,2727,15,,,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,2727,R,3,3,4
-150001,202006,100,2363,15,,,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3
-150001,202007,100,9549,15,,,4.041049513,,2.111448113,,152.5353535,9549,R,3,,3
-150002,202001,100,8611,5,,,,0.917723543,,0.917399451,181.0909091,8611,R,,3,3
-150002,202002,100,9383,5,,,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3
-150002,202003,100,1064,5,,,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4
-150002,202004,100,7419,5,,,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3
-150002,202005,100,9967,5,,,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,9967,R,3,3,4
-150002,202006,100,1393,5,,,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3
-150002,202007,100,2593,5,,,1.861450108,,2.111448113,,152.5353535,2593,R,3,,3
-150003,202001,100,3426,79,,,,0.548511047,,0.917399451,181.0909091,3426,R,,3,3
-150003,202002,100,6246,79,,,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3
-150003,202003,100,8402,79,,,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4
-150003,202004,100,3891,79,,,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3
-150003,202005,100,5463,79,,,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,5463,R,3,3,4
-150003,202006,100,6852,79,,,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3
-150003,202007,100,2959,79,,,0.431844717,,2.111448113,,152.5353535,2959,R,3,,3
-150004,202001,100,,69,,,,,,0.917399451,181.0909091,13547.81819,BI,,3,3
-150004,202002,100,,69,,,,,1.230132332,3.509418433,204.1414141,14767.63276,BI,3,3,3
-150004,202003,100,4208,69,,,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4
-150004,202005,100,2818,69,,,,,1.028150423,3.035462652,124.8511905,2818,R,3,3,4
-150004,202006,100,,69,,,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3
-150004,202007,100,,69,,,,,2.111448113,,152.5353535,4483.444383,FIR,3,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+150001,202001,100,5891,15,,,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3
+150001,202002,100,4581,15,,,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3
+150001,202003,100,4741,15,,,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4
+150001,202004,100,8092,15,,,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3
+150001,202005,100,2727,15,,,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,2727,R,3,3,4
+150001,202006,100,2363,15,,,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3
+150001,202007,100,9549,15,,,4.041049513,,2.111448113,,152.5353535,9549,R,3,,3
+150002,202001,100,8611,5,,,,0.917723543,,0.917399451,181.0909091,8611,R,,3,3
+150002,202002,100,9383,5,,,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3
+150002,202003,100,1064,5,,,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4
+150002,202004,100,7419,5,,,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3
+150002,202005,100,9967,5,,,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,9967,R,3,3,4
+150002,202006,100,1393,5,,,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3
+150002,202007,100,2593,5,,,1.861450108,,2.111448113,,152.5353535,2593,R,3,,3
+150003,202001,100,3426,79,,,,0.548511047,,0.917399451,181.0909091,3426,R,,3,3
+150003,202002,100,6246,79,,,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3
+150003,202003,100,8402,79,,,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4
+150003,202004,100,3891,79,,,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3
+150003,202005,100,5463,79,,,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,5463,R,3,3,4
+150003,202006,100,6852,79,,,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3
+150003,202007,100,2959,79,,,0.431844717,,2.111448113,,152.5353535,2959,R,3,,3
+150004,202001,100,,69,,,,,,0.917399451,181.0909091,13547.81819,BI,,3,3
+150004,202002,100,,69,,,,,1.230132332,3.509418433,204.1414141,14767.63276,BI,3,3,3
+150004,202003,100,4208,69,,,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4
+150004,202005,100,2818,69,,,,,1.028150423,3.035462652,124.8511905,2818,R,3,3,4
+150004,202006,100,,69,,,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3
+150004,202007,100,,69,,,,,2.111448113,,152.5353535,4483.444383,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
similarity index 88%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
index 27cf50be..4698b1a4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
@@ -1,35 +1,35 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-160001,202001,100,2086,76,,
-160001,202002,100,4154,76,,
-160001,202003,100,1610,76,,
-160001,202004,100,3600,76,,
-160001,202005,100,6317,76,,
-160001,202006,100,5703,76,,
-160001,202007,100,1666,76,,
-160002,202001,100,430,32,,
-160002,202002,100,9669,32,,
-160002,202003,100,1748,32,,
-160002,202004,100,2380,32,,
-160002,202005,100,7871,32,,
-160002,202006,100,8806,32,,
-160002,202007,100,2678,32,,
-160003,202001,100,3232,85,,
-160003,202002,100,6342,85,,
-160003,202003,100,2988,85,,
-160003,202004,100,860,85,,
-160003,202005,100,9227,85,,
-160003,202006,100,2393,85,,
-160003,202007,100,9508,85,,
-160004,202001,100,0,42,,
-160004,202002,100,0,42,,
-160004,202003,100,0,42,,
-160004,202004,100,0,42,,
-160004,202005,100,0,42,,
-160004,202006,100,0,42,,
-160004,202007,100,0,42,,
-160005,202001,100,,33,,
-160005,202002,100,,33,,
-160005,202003,100,1129,33,,
-160005,202005,100,,33,,
-160005,202006,100,,33,,
-160005,202007,100,,33,,
+identifier,date,group,question,other,lower_trim,upper_trim
+160001,202001,100,2086,76,,
+160001,202002,100,4154,76,,
+160001,202003,100,1610,76,,
+160001,202004,100,3600,76,,
+160001,202005,100,6317,76,,
+160001,202006,100,5703,76,,
+160001,202007,100,1666,76,,
+160002,202001,100,430,32,,
+160002,202002,100,9669,32,,
+160002,202003,100,1748,32,,
+160002,202004,100,2380,32,,
+160002,202005,100,7871,32,,
+160002,202006,100,8806,32,,
+160002,202007,100,2678,32,,
+160003,202001,100,3232,85,,
+160003,202002,100,6342,85,,
+160003,202003,100,2988,85,,
+160003,202004,100,860,85,,
+160003,202005,100,9227,85,,
+160003,202006,100,2393,85,,
+160003,202007,100,9508,85,,
+160004,202001,100,0,42,,
+160004,202002,100,0,42,,
+160004,202003,100,0,42,,
+160004,202004,100,0,42,,
+160004,202005,100,0,42,,
+160004,202006,100,0,42,,
+160004,202007,100,0,42,,
+160005,202001,100,,33,,
+160005,202002,100,,33,,
+160005,202003,100,1129,33,,
+160005,202005,100,,33,,
+160005,202006,100,,33,,
+160005,202007,100,,33,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
similarity index 93%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index d4a9f482..0142df9a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-160001,202001,100,2086,76,,,,0.502166586,,0.352085676,24.45957447,2086,R,,3,4
-160001,202002,100,4154,76,,,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,4154,R,3,3,4
-160001,202003,100,1610,76,,,0.387578238,0.447222222,0.346502312,1.552031536,30.00746269,1610,R,3,3,5
-160001,202004,100,3600,76,,,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3600,R,3,3,4
-160001,202005,100,6317,76,,,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,6317,R,3,3,4
-160001,202006,100,5703,76,,,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,5703,R,3,3,4
-160001,202007,100,1666,76,,,0.292126951,,1.523164371,,58.94468085,1666,R,3,,4
-160002,202001,100,430,32,,,,0.044472024,,0.352085676,24.45957447,430,R,,3,4
-160002,202002,100,9669,32,,,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,9669,R,3,3,4
-160002,202003,100,1748,32,,,0.180783949,0.734453782,0.346502312,1.552031536,30.00746269,1748,R,3,3,5
-160002,202004,100,2380,32,,,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,2380,R,3,3,4
-160002,202005,100,7871,32,,,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,7871,R,3,3,4
-160002,202006,100,8806,32,,,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,8806,R,3,3,4
-160002,202007,100,2678,32,,,0.304110834,,1.523164371,,58.94468085,2678,R,3,,4
-160003,202001,100,3232,85,,,,0.509618417,,0.352085676,24.45957447,3232,R,,3,4
-160003,202002,100,6342,85,,,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,6342,R,3,3,4
-160003,202003,100,2988,85,,,0.471144749,3.474418605,0.346502312,1.552031536,30.00746269,2988,R,3,3,5
-160003,202004,100,860,85,,,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,860,R,3,3,4
-160003,202005,100,9227,85,,,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,9227,R,3,3,4
-160003,202006,100,2393,85,,,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,2393,R,3,3,4
-160003,202007,100,9508,85,,,3.973255328,,1.523164371,,58.94468085,9508,R,3,,4
-160004,202001,100,0,42,,,,,,0.352085676,24.45957447,0,R,,3,4
-160004,202002,100,0,42,,,,,8.813223343,3.411359572,85.80851064,0,R,3,3,4
-160004,202003,100,567,42,,,,,0.346502312,1.552031536,30.00746269,567,R,3,3,5
-160004,202004,100,0,42,,,,,1.295132949,0.321823769,29.10638298,0,R,3,3,4
-160004,202005,100,0,42,,,,,5.26364495,1.952438177,99.63829787,0,R,3,3,4
-160004,202006,100,0,42,,,,,0.760313342,2.321042298,71.92340426,0,R,3,3,4
-160004,202007,100,0,42,,,,,1.523164371,,58.94468085,0,R,3,,4
-160005,202001,100,,33,,,,,,0.352085676,24.45957447,1356.031558,BI,,3,4
-160005,202002,100,,33,,,,,8.813223343,3.411359572,85.80851064,3851.424956,BI,3,3,4
-160005,202003,100,1129,33,,,,,0.346502312,1.552031536,30.00746269,1129,R,3,3,5
-160005,202005,100,,33,,,,,5.26364495,1.952438177,99.63829787,3288.06383,C,3,3,4
-160005,202006,100,,33,,,,,0.760313342,2.321042298,71.92340426,2499.9588,FIC,3,3,4
-160005,202007,100,,33,,,,,1.523164371,,58.94468085,3807.848172,FIC,3,,4
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+160001,202001,100,2086,76,,,,0.502166586,,0.352085676,24.45957447,2086,R,,3,4
+160001,202002,100,4154,76,,,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,4154,R,3,3,4
+160001,202003,100,1610,76,,,0.387578238,0.447222222,0.346502312,1.552031536,30.00746269,1610,R,3,3,5
+160001,202004,100,3600,76,,,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3600,R,3,3,4
+160001,202005,100,6317,76,,,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,6317,R,3,3,4
+160001,202006,100,5703,76,,,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,5703,R,3,3,4
+160001,202007,100,1666,76,,,0.292126951,,1.523164371,,58.94468085,1666,R,3,,4
+160002,202001,100,430,32,,,,0.044472024,,0.352085676,24.45957447,430,R,,3,4
+160002,202002,100,9669,32,,,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,9669,R,3,3,4
+160002,202003,100,1748,32,,,0.180783949,0.734453782,0.346502312,1.552031536,30.00746269,1748,R,3,3,5
+160002,202004,100,2380,32,,,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,2380,R,3,3,4
+160002,202005,100,7871,32,,,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,7871,R,3,3,4
+160002,202006,100,8806,32,,,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,8806,R,3,3,4
+160002,202007,100,2678,32,,,0.304110834,,1.523164371,,58.94468085,2678,R,3,,4
+160003,202001,100,3232,85,,,,0.509618417,,0.352085676,24.45957447,3232,R,,3,4
+160003,202002,100,6342,85,,,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,6342,R,3,3,4
+160003,202003,100,2988,85,,,0.471144749,3.474418605,0.346502312,1.552031536,30.00746269,2988,R,3,3,5
+160003,202004,100,860,85,,,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,860,R,3,3,4
+160003,202005,100,9227,85,,,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,9227,R,3,3,4
+160003,202006,100,2393,85,,,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,2393,R,3,3,4
+160003,202007,100,9508,85,,,3.973255328,,1.523164371,,58.94468085,9508,R,3,,4
+160004,202001,100,0,42,,,,,,0.352085676,24.45957447,0,R,,3,4
+160004,202002,100,0,42,,,,,8.813223343,3.411359572,85.80851064,0,R,3,3,4
+160004,202003,100,567,42,,,,,0.346502312,1.552031536,30.00746269,567,R,3,3,5
+160004,202004,100,0,42,,,,,1.295132949,0.321823769,29.10638298,0,R,3,3,4
+160004,202005,100,0,42,,,,,5.26364495,1.952438177,99.63829787,0,R,3,3,4
+160004,202006,100,0,42,,,,,0.760313342,2.321042298,71.92340426,0,R,3,3,4
+160004,202007,100,0,42,,,,,1.523164371,,58.94468085,0,R,3,,4
+160005,202001,100,,33,,,,,,0.352085676,24.45957447,1356.031558,BI,,3,4
+160005,202002,100,,33,,,,,8.813223343,3.411359572,85.80851064,3851.424956,BI,3,3,4
+160005,202003,100,1129,33,,,,,0.346502312,1.552031536,30.00746269,1129,R,3,3,5
+160005,202005,100,,33,,,,,5.26364495,1.952438177,99.63829787,3288.06383,C,3,3,4
+160005,202006,100,,33,,,,,0.760313342,2.321042298,71.92340426,2499.9588,FIC,3,3,4
+160005,202007,100,,33,,,,,1.523164371,,58.94468085,3807.848172,FIC,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
new file mode 100644
index 00000000..4698b1a4
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
@@ -0,0 +1,35 @@
+identifier,date,group,question,other,lower_trim,upper_trim
+160001,202001,100,2086,76,,
+160001,202002,100,4154,76,,
+160001,202003,100,1610,76,,
+160001,202004,100,3600,76,,
+160001,202005,100,6317,76,,
+160001,202006,100,5703,76,,
+160001,202007,100,1666,76,,
+160002,202001,100,430,32,,
+160002,202002,100,9669,32,,
+160002,202003,100,1748,32,,
+160002,202004,100,2380,32,,
+160002,202005,100,7871,32,,
+160002,202006,100,8806,32,,
+160002,202007,100,2678,32,,
+160003,202001,100,3232,85,,
+160003,202002,100,6342,85,,
+160003,202003,100,2988,85,,
+160003,202004,100,860,85,,
+160003,202005,100,9227,85,,
+160003,202006,100,2393,85,,
+160003,202007,100,9508,85,,
+160004,202001,100,0,42,,
+160004,202002,100,0,42,,
+160004,202003,100,0,42,,
+160004,202004,100,0,42,,
+160004,202005,100,0,42,,
+160004,202006,100,0,42,,
+160004,202007,100,0,42,,
+160005,202001,100,,33,,
+160005,202002,100,,33,,
+160005,202003,100,1129,33,,
+160005,202005,100,,33,,
+160005,202006,100,,33,,
+160005,202007,100,,33,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_inc_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
similarity index 93%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_inc_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index 93edc9fb..e9c49786 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_0_inc_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-160001,202001,100,2086,76,,,,0.502166586,,0.514064257,24.45957447,2086,R,,4,4
-160001,202002,100,4154,76,,,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4154,R,4,4,4
-160001,202003,100,1610,76,,,0.387578238,0.447222222,0.509876734,1.414023652,30.00746269,1610,R,4,4,5
-160001,202004,100,3600,76,,,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,3600,R,4,4,4
-160001,202005,100,6317,76,,,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,6317,R,4,4,4
-160001,202006,100,5703,76,,,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,5703,R,4,4,4
-160001,202007,100,1666,76,,,0.292126951,,1.392373278,,58.94468085,1666,R,4,,4
-160002,202001,100,430,32,,,,0.044472024,,0.514064257,24.45957447,430,R,,4,4
-160002,202002,100,9669,32,,,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,9669,R,4,4,4
-160002,202003,100,1748,32,,,0.180783949,0.734453782,0.509876734,1.414023652,30.00746269,1748,R,4,4,5
-160002,202004,100,2380,32,,,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,2380,R,4,4,4
-160002,202005,100,7871,32,,,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,7871,R,4,4,4
-160002,202006,100,8806,32,,,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,8806,R,4,4,4
-160002,202007,100,2678,32,,,0.304110834,,1.392373278,,58.94468085,2678,R,4,,4
-160003,202001,100,3232,85,,,,0.509618417,,0.514064257,24.45957447,3232,R,,4,4
-160003,202002,100,6342,85,,,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,6342,R,4,4,4
-160003,202003,100,2988,85,,,0.471144749,3.474418605,0.509876734,1.414023652,30.00746269,2988,R,4,4,5
-160003,202004,100,860,85,,,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,860,R,4,4,4
-160003,202005,100,9227,85,,,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,9227,R,4,4,4
-160003,202006,100,2393,85,,,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,2393,R,4,4,4
-160003,202007,100,9508,85,,,3.973255328,,1.392373278,,58.94468085,9508,R,4,,4
-160004,202001,100,0,42,,,,1,,0.514064257,24.45957447,0,R,,4,4
-160004,202002,100,0,42,,,1,1,6.859917508,2.808519679,85.80851064,0,R,4,4,4
-160004,202003,100,567,42,,,1,1,0.509876734,1.414023652,30.00746269,567,R,4,4,5
-160004,202004,100,0,42,,,1,1,1.221349712,0.491367827,29.10638298,0,R,4,4,4
-160004,202005,100,0,42,,,1,1,4.197733712,1.714328633,99.63829787,0,R,4,4,4
-160004,202006,100,0,42,,,1,1,0.820235007,1.990781723,71.92340426,0,R,4,4,4
-160004,202007,100,0,42,,,1,,1.392373278,,58.94468085,0,R,4,,4
-160005,202001,100,,33,,,,,,0.514064257,24.45957447,1630.004567,BI,,4,4
-160005,202002,100,,33,,,,,6.859917508,2.808519679,85.80851064,3170.818717,BI,4,4,4
-160005,202003,100,1129,33,,,,,0.509876734,1.414023652,30.00746269,1129,R,4,4,5
-160005,202005,100,,33,,,,,4.197733712,1.714328633,99.63829787,3288.06383,C,4,4,4
-160005,202006,100,,33,,,,,0.820235007,1.990781723,71.92340426,2696.985058,FIC,4,4,4
-160005,202007,100,,33,,,,,1.392373278,,58.94468085,3755.209926,FIC,4,,4
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+160001,202001,100,2086,76,,,,0.502166586,,0.514064257,24.45957447,2086,R,,4,4
+160001,202002,100,4154,76,,,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4154,R,4,4,4
+160001,202003,100,1610,76,,,0.387578238,0.447222222,0.509876734,1.414023652,30.00746269,1610,R,4,4,5
+160001,202004,100,3600,76,,,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,3600,R,4,4,4
+160001,202005,100,6317,76,,,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,6317,R,4,4,4
+160001,202006,100,5703,76,,,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,5703,R,4,4,4
+160001,202007,100,1666,76,,,0.292126951,,1.392373278,,58.94468085,1666,R,4,,4
+160002,202001,100,430,32,,,,0.044472024,,0.514064257,24.45957447,430,R,,4,4
+160002,202002,100,9669,32,,,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,9669,R,4,4,4
+160002,202003,100,1748,32,,,0.180783949,0.734453782,0.509876734,1.414023652,30.00746269,1748,R,4,4,5
+160002,202004,100,2380,32,,,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,2380,R,4,4,4
+160002,202005,100,7871,32,,,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,7871,R,4,4,4
+160002,202006,100,8806,32,,,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,8806,R,4,4,4
+160002,202007,100,2678,32,,,0.304110834,,1.392373278,,58.94468085,2678,R,4,,4
+160003,202001,100,3232,85,,,,0.509618417,,0.514064257,24.45957447,3232,R,,4,4
+160003,202002,100,6342,85,,,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,6342,R,4,4,4
+160003,202003,100,2988,85,,,0.471144749,3.474418605,0.509876734,1.414023652,30.00746269,2988,R,4,4,5
+160003,202004,100,860,85,,,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,860,R,4,4,4
+160003,202005,100,9227,85,,,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,9227,R,4,4,4
+160003,202006,100,2393,85,,,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,2393,R,4,4,4
+160003,202007,100,9508,85,,,3.973255328,,1.392373278,,58.94468085,9508,R,4,,4
+160004,202001,100,0,42,,,,1,,0.514064257,24.45957447,0,R,,4,4
+160004,202002,100,0,42,,,1,1,6.859917508,2.808519679,85.80851064,0,R,4,4,4
+160004,202003,100,567,42,,,1,1,0.509876734,1.414023652,30.00746269,567,R,4,4,5
+160004,202004,100,0,42,,,1,1,1.221349712,0.491367827,29.10638298,0,R,4,4,4
+160004,202005,100,0,42,,,1,1,4.197733712,1.714328633,99.63829787,0,R,4,4,4
+160004,202006,100,0,42,,,1,1,0.820235007,1.990781723,71.92340426,0,R,4,4,4
+160004,202007,100,0,42,,,1,,1.392373278,,58.94468085,0,R,4,,4
+160005,202001,100,,33,,,,,,0.514064257,24.45957447,1630.004567,BI,,4,4
+160005,202002,100,,33,,,,,6.859917508,2.808519679,85.80851064,3170.818717,BI,4,4,4
+160005,202003,100,1129,33,,,,,0.509876734,1.414023652,30.00746269,1129,R,4,4,5
+160005,202005,100,,33,,,,,4.197733712,1.714328633,99.63829787,3288.06383,C,4,4,4
+160005,202006,100,,33,,,,,0.820235007,1.990781723,71.92340426,2696.985058,FIC,4,4,4
+160005,202007,100,,33,,,,,1.392373278,,58.94468085,3755.209926,FIC,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv
similarity index 86%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv
index da3da70a..2a16421e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv
@@ -1,28 +1,28 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-160001,202001,100,2086,76,,
-160001,202002,100,4154,76,,
-160001,202003,100,1610,76,,
-160001,202004,100,3600,76,,
-160001,202005,100,6317,76,,
-160001,202006,100,5703,76,,
-160001,202007,100,1666,76,,
-160002,202001,100,430,32,,
-160002,202002,100,9669,32,,
-160002,202003,100,1748,32,,
-160002,202004,100,2380,32,,
-160002,202005,100,7871,32,,
-160002,202006,100,8806,32,,
-160002,202007,100,2678,32,,
-160003,202001,100,3232,85,,
-160003,202002,100,6342,85,,
-160003,202003,100,2988,85,,
-160003,202004,100,860,85,,
-160003,202005,100,9227,85,,
-160003,202006,100,2393,85,,
-160003,202007,100,9508,85,,
-160004,202001,100,,33,,
-160004,202002,100,,33,,
-160004,202003,100,1129,33,,
-160004,202005,100,,33,,
-160004,202006,100,,33,,
-160004,202007,100,,33,,
+identifier,date,group,question,other,lower_trim,upper_trim
+160001,202001,100,2086,76,,
+160001,202002,100,4154,76,,
+160001,202003,100,1610,76,,
+160001,202004,100,3600,76,,
+160001,202005,100,6317,76,,
+160001,202006,100,5703,76,,
+160001,202007,100,1666,76,,
+160002,202001,100,430,32,,
+160002,202002,100,9669,32,,
+160002,202003,100,1748,32,,
+160002,202004,100,2380,32,,
+160002,202005,100,7871,32,,
+160002,202006,100,8806,32,,
+160002,202007,100,2678,32,,
+160003,202001,100,3232,85,,
+160003,202002,100,6342,85,,
+160003,202003,100,2988,85,,
+160003,202004,100,860,85,,
+160003,202005,100,9227,85,,
+160003,202006,100,2393,85,,
+160003,202007,100,9508,85,,
+160004,202001,100,,33,,
+160004,202002,100,,33,,
+160004,202003,100,1129,33,,
+160004,202005,100,,33,,
+160004,202006,100,,33,,
+160004,202007,100,,33,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
similarity index 92%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index b71bd5a6..0656a699 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_16_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-160001,202001,100,2086,76,,,,0.502166586,,0.352085676,29.78238342,2086,R,,3,3
-160001,202002,100,4154,76,,,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,4154,R,3,3,3
-160001,202003,100,1610,76,,,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,1610,R,3,3,4
-160001,202004,100,3600,76,,,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3600,R,3,3,3
-160001,202005,100,6317,76,,,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,6317,R,3,3,3
-160001,202006,100,5703,76,,,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,5703,R,3,3,3
-160001,202007,100,1666,76,,,0.292126951,,1.523164371,,71.77202073,1666,R,3,,3
-160002,202001,100,430,32,,,,0.044472024,,0.352085676,29.78238342,430,R,,3,3
-160002,202002,100,9669,32,,,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,9669,R,3,3,3
-160002,202003,100,1748,32,,,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,1748,R,3,3,4
-160002,202004,100,2380,32,,,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,2380,R,3,3,3
-160002,202005,100,7871,32,,,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,7871,R,3,3,3
-160002,202006,100,8806,32,,,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,8806,R,3,3,3
-160002,202007,100,2678,32,,,0.304110834,,1.523164371,,71.77202073,2678,R,3,,3
-160003,202001,100,3232,85,,,,0.509618417,,0.352085676,29.78238342,3232,R,,3,3
-160003,202002,100,6342,85,,,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,6342,R,3,3,3
-160003,202003,100,2988,85,,,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,2988,R,3,3,4
-160003,202004,100,860,85,,,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,860,R,3,3,3
-160003,202005,100,9227,85,,,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,9227,R,3,3,3
-160003,202006,100,2393,85,,,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,2393,R,3,3,3
-160003,202007,100,9508,85,,,3.973255328,,1.523164371,,71.77202073,9508,R,3,,3
-160004,202001,100,,33,,,,,,0.352085676,29.78238342,1356.031558,BI,,3,3
-160004,202002,100,,33,,,,,8.813223344,3.411359571,104.4818653,3851.424956,BI,3,3,3
-160004,202003,100,1129,33,,,,,0.346502312,1.552031536,33.07522124,1129,R,3,3,4
-160004,202005,100,,33,,,,,5.263644949,1.952438177,121.3212435,4003.601036,C,3,3,3
-160004,202006,100,,33,,,,,0.760313342,2.321042298,87.57512953,3043.991285,FIC,3,3,3
-160004,202007,100,,33,,,,,1.523164371,,71.77202073,4636.49907,FIC,3,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+160001,202001,100,2086,76,,,,0.502166586,,0.352085676,29.78238342,2086,R,,3,3
+160001,202002,100,4154,76,,,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,4154,R,3,3,3
+160001,202003,100,1610,76,,,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,1610,R,3,3,4
+160001,202004,100,3600,76,,,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3600,R,3,3,3
+160001,202005,100,6317,76,,,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,6317,R,3,3,3
+160001,202006,100,5703,76,,,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,5703,R,3,3,3
+160001,202007,100,1666,76,,,0.292126951,,1.523164371,,71.77202073,1666,R,3,,3
+160002,202001,100,430,32,,,,0.044472024,,0.352085676,29.78238342,430,R,,3,3
+160002,202002,100,9669,32,,,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,9669,R,3,3,3
+160002,202003,100,1748,32,,,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,1748,R,3,3,4
+160002,202004,100,2380,32,,,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,2380,R,3,3,3
+160002,202005,100,7871,32,,,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,7871,R,3,3,3
+160002,202006,100,8806,32,,,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,8806,R,3,3,3
+160002,202007,100,2678,32,,,0.304110834,,1.523164371,,71.77202073,2678,R,3,,3
+160003,202001,100,3232,85,,,,0.509618417,,0.352085676,29.78238342,3232,R,,3,3
+160003,202002,100,6342,85,,,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,6342,R,3,3,3
+160003,202003,100,2988,85,,,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,2988,R,3,3,4
+160003,202004,100,860,85,,,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,860,R,3,3,3
+160003,202005,100,9227,85,,,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,9227,R,3,3,3
+160003,202006,100,2393,85,,,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,2393,R,3,3,3
+160003,202007,100,9508,85,,,3.973255328,,1.523164371,,71.77202073,9508,R,3,,3
+160004,202001,100,,33,,,,,,0.352085676,29.78238342,1356.031558,BI,,3,3
+160004,202002,100,,33,,,,,8.813223344,3.411359571,104.4818653,3851.424956,BI,3,3,3
+160004,202003,100,1129,33,,,,,0.346502312,1.552031536,33.07522124,1129,R,3,3,4
+160004,202005,100,,33,,,,,5.263644949,1.952438177,121.3212435,4003.601036,C,3,3,3
+160004,202006,100,,33,,,,,0.760313342,2.321042298,87.57512953,3043.991285,FIC,3,3,3
+160004,202007,100,,33,,,,,1.523164371,,71.77202073,4636.49907,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_input.csv
similarity index 79%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_input.csv
index 943f7e4b..853337da 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_input.csv
@@ -1,15 +1,15 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-170001,202001,100,6480,69,,
-170001,202002,100,9912,69,,
-170001,202003,100,603,69,,
-170001,202004,100,7120,69,,
-170002,202001,100,449,62,,
-170002,202002,100,3692,62,,
-170002,202003,100,8401,62,,
-170002,202004,100,6745,62,,
-170003,202001,100,1961,81,,
-170003,202002,100,7833,81,,
-170003,202003,100,9761,81,,
-170003,202004,100,9250,81,,
-170004,202002,100,3913,9,,
-170004,202003,100,,9,,
+identifier,date,group,question,other,lower_trim,upper_trim
+170001,202001,100,6480,69,,
+170001,202002,100,9912,69,,
+170001,202003,100,603,69,,
+170001,202004,100,7120,69,,
+170002,202001,100,449,62,,
+170002,202002,100,3692,62,,
+170002,202003,100,8401,62,,
+170002,202004,100,6745,62,,
+170003,202001,100,1961,81,,
+170003,202002,100,7833,81,,
+170003,202003,100,9761,81,,
+170003,202004,100,9250,81,,
+170004,202002,100,3913,9,,
+170004,202003,100,,9,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
similarity index 86%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 6a95df5d..c4181854 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_17_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-170001,202001,100,6480,69,,,,0.653753027,,0.341906136,41.93396226,6480,R,,3,3
-170001,202002,100,9912,69,,,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,9912,R,3,3,4
-170001,202003,100,603,69,,,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,603,R,3,3,3
-170001,202004,100,7120,69,,,11.80762852,,4.51938598,,109.0330189,7120,R,3,,3
-170002,202001,100,449,62,,,,0.121614301,,0.341906136,41.93396226,449,R,,3,3
-170002,202002,100,3692,62,,,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3692,R,3,3,4
-170002,202003,100,8401,62,,,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,8401,R,3,3,3
-170002,202004,100,6745,62,,,0.802880609,,4.51938598,,109.0330189,6745,R,3,,3
-170003,202001,100,1961,81,,,,0.250351079,,0.341906136,41.93396226,1961,R,,3,3
-170003,202002,100,7833,81,,,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,7833,R,3,3,4
-170003,202003,100,9761,81,,,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,9761,R,3,3,3
-170003,202004,100,9250,81,,,0.947648806,,4.51938598,,109.0330189,9250,R,3,,3
-170004,202002,100,3913,9,,,,,4.582245799,5.893253897,114.7058824,3913,R,3,3,4
-170004,202003,100,,9,,,,,1.194144647,0.795149817,88.51415094,3914.194145,FIR,3,3,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+170001,202001,100,6480,69,,,,0.653753027,,0.341906136,41.93396226,6480,R,,3,3
+170001,202002,100,9912,69,,,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,9912,R,3,3,4
+170001,202003,100,603,69,,,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,603,R,3,3,3
+170001,202004,100,7120,69,,,11.80762852,,4.51938598,,109.0330189,7120,R,3,,3
+170002,202001,100,449,62,,,,0.121614301,,0.341906136,41.93396226,449,R,,3,3
+170002,202002,100,3692,62,,,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3692,R,3,3,4
+170002,202003,100,8401,62,,,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,8401,R,3,3,3
+170002,202004,100,6745,62,,,0.802880609,,4.51938598,,109.0330189,6745,R,3,,3
+170003,202001,100,1961,81,,,,0.250351079,,0.341906136,41.93396226,1961,R,,3,3
+170003,202002,100,7833,81,,,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,7833,R,3,3,4
+170003,202003,100,9761,81,,,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,9761,R,3,3,3
+170003,202004,100,9250,81,,,0.947648806,,4.51938598,,109.0330189,9250,R,3,,3
+170004,202002,100,3913,9,,,,,4.582245799,5.893253897,114.7058824,3913,R,3,3,4
+170004,202003,100,,9,,,,,1.194144647,0.795149817,88.51415094,3914.194145,FIR,3,3,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_input.csv
similarity index 79%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_input.csv
index ee161ddb..3a3dffb6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_input.csv
@@ -1,15 +1,15 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-180001,202001,100,9188,91,,
-180001,202002,100,6853,91,,
-180001,202003,100,2418,91,,
-180001,202004,100,9291,91,,
-180002,202001,100,3829,26,,
-180002,202002,100,7588,26,,
-180002,202003,100,7335,26,,
-180002,202004,100,8415,26,,
-180003,202001,100,3774,19,,
-180003,202002,100,8136,19,,
-180003,202003,100,4209,19,,
-180003,202004,100,6168,19,,
-180004,202002,100,,26,,
-180004,202003,100,6099,26,,
+identifier,date,group,question,other,lower_trim,upper_trim
+180001,202001,100,9188,91,,
+180001,202002,100,6853,91,,
+180001,202003,100,2418,91,,
+180001,202004,100,9291,91,,
+180002,202001,100,3829,26,,
+180002,202002,100,7588,26,,
+180002,202003,100,7335,26,,
+180002,202004,100,8415,26,,
+180003,202001,100,3774,19,,
+180003,202002,100,8136,19,,
+180003,202003,100,4209,19,,
+180003,202004,100,6168,19,,
+180004,202002,100,,26,,
+180004,202003,100,6099,26,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
similarity index 87%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 1254c705..3dea9cd1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_18_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-180001,202001,100,9188,91,,,,1.340726689,,0.769734514,123.4632353,9188,R,,3,3
-180001,202002,100,6853,91,,,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,6853,R,3,3,3
-180001,202003,100,2418,91,,,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,2418,R,3,3,4
-180001,202004,100,9291,91,,,3.842431762,,2.151700748,,175.5441176,9291,R,3,,3
-180002,202001,100,3829,26,,,,0.504612546,,0.769734514,123.4632353,3829,R,,3,3
-180002,202002,100,7588,26,,,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,7588,R,3,3,3
-180002,202003,100,7335,26,,,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,7335,R,3,3,4
-180002,202004,100,8415,26,,,1.147239264,,2.151700748,,175.5441176,8415,R,3,,3
-180003,202001,100,3774,19,,,,0.463864307,,0.769734514,123.4632353,3774,R,,3,3
-180003,202002,100,8136,19,,,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,8136,R,3,3,3
-180003,202003,100,4209,19,,,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,4209,R,3,3,4
-180003,202004,100,6168,19,,,1.465431219,,2.151700748,,175.5441176,6168,R,3,,3
-180004,202002,100,,26,,,,,1.627795166,1.933884446,166.0073529,11794.76123,BI,3,3,3
-180004,202003,100,6099,26,,,,,0.612275479,0.604767536,123.8333333,6099,R,3,3,4
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+180001,202001,100,9188,91,,,,1.340726689,,0.769734514,123.4632353,9188,R,,3,3
+180001,202002,100,6853,91,,,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,6853,R,3,3,3
+180001,202003,100,2418,91,,,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,2418,R,3,3,4
+180001,202004,100,9291,91,,,3.842431762,,2.151700748,,175.5441176,9291,R,3,,3
+180002,202001,100,3829,26,,,,0.504612546,,0.769734514,123.4632353,3829,R,,3,3
+180002,202002,100,7588,26,,,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,7588,R,3,3,3
+180002,202003,100,7335,26,,,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,7335,R,3,3,4
+180002,202004,100,8415,26,,,1.147239264,,2.151700748,,175.5441176,8415,R,3,,3
+180003,202001,100,3774,19,,,,0.463864307,,0.769734514,123.4632353,3774,R,,3,3
+180003,202002,100,8136,19,,,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,8136,R,3,3,3
+180003,202003,100,4209,19,,,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,4209,R,3,3,4
+180003,202004,100,6168,19,,,1.465431219,,2.151700748,,175.5441176,6168,R,3,,3
+180004,202002,100,,26,,,,,1.627795166,1.933884446,166.0073529,11794.76123,BI,3,3,3
+180004,202003,100,6099,26,,,,,0.612275479,0.604767536,123.8333333,6099,R,3,3,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
similarity index 87%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
index a7a81066..ae036a0d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,forward_link,backward_link,construction_link
-190001,202001,100,9261,95,,,,0.9214,50.3694
-190001,202002,100,4996,95,,,0.8521,1.5274,121.4187
-190001,202003,100,1480,95,,,0.9685,1.8795,89.3761
-190001,202004,100,4350,95,,,1.113,,110.5473
-190002,202001,100,2433,17,,,,0.9214,50.3694
-190002,202002,100,4324,17,,,0.8521,1.5274,121.4187
-190002,202003,100,6598,17,,,0.9685,1.8795,89.3761
-190002,202004,100,700,17,,,1.113,,110.5473
-190003,202001,100,7888,64,,,,0.9214,50.3694
-190003,202002,100,4218,64,,,0.8521,1.5274,121.4187
-190003,202003,100,7591,64,,,0.9685,1.8795,89.3761
-190003,202004,100,4077,64,,,1.113,,110.5473
-190004,202001,100,2247,51,,,,0.9214,50.3694
-190004,202002,100,,51,,,0.8521,1.5274,121.4187
-190004,202003,100,,51,,,0.9685,1.8795,89.3761
-190004,202004,100,8608,51,,,1.113,,110.5473
-190005,202001,100,,34,,,,0.9214,50.3694
-190005,202002,100,,34,,,0.8521,1.5274,121.4187
-190005,202003,100,4456,34,,,0.9685,1.8795,89.3761
-190005,202004,100,5134,34,,,1.113,,110.5473
-190006,202001,100,,8,,,,0.9214,50.3694
-190006,202002,100,,8,,,0.8521,1.5274,121.4187
-190006,202003,100,,8,,,0.9685,1.8795,89.3761
-190006,202004,100,,8,,,1.113,,110.5473
+identifier,date,group,question,other,lower_trim,upper_trim,forward,backward,construction
+190001,202001,100,9261,95,,,,0.9214,50.3694
+190001,202002,100,4996,95,,,0.8521,1.5274,121.4187
+190001,202003,100,1480,95,,,0.9685,1.8795,89.3761
+190001,202004,100,4350,95,,,1.113,,110.5473
+190002,202001,100,2433,17,,,,0.9214,50.3694
+190002,202002,100,4324,17,,,0.8521,1.5274,121.4187
+190002,202003,100,6598,17,,,0.9685,1.8795,89.3761
+190002,202004,100,700,17,,,1.113,,110.5473
+190003,202001,100,7888,64,,,,0.9214,50.3694
+190003,202002,100,4218,64,,,0.8521,1.5274,121.4187
+190003,202003,100,7591,64,,,0.9685,1.8795,89.3761
+190003,202004,100,4077,64,,,1.113,,110.5473
+190004,202001,100,2247,51,,,,0.9214,50.3694
+190004,202002,100,,51,,,0.8521,1.5274,121.4187
+190004,202003,100,,51,,,0.9685,1.8795,89.3761
+190004,202004,100,8608,51,,,1.113,,110.5473
+190005,202001,100,,34,,,,0.9214,50.3694
+190005,202002,100,,34,,,0.8521,1.5274,121.4187
+190005,202003,100,4456,34,,,0.9685,1.8795,89.3761
+190005,202004,100,5134,34,,,1.113,,110.5473
+190006,202001,100,,8,,,,0.9214,50.3694
+190006,202002,100,,8,,,0.8521,1.5274,121.4187
+190006,202003,100,,8,,,0.9685,1.8795,89.3761
+190006,202004,100,,8,,,1.113,,110.5473
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
similarity index 91%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index 16058275..e725b27a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_19_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,calc_fi,calc_bi,calc_cons
-190001,202001,100,9261,95,,,,1.853682946,,0.9214,50.3694,9261,R,,3,4,,1.428812335,96.16299559
-190001,202002,100,4996,95,,,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,3,3,3,0.86670161,1.528894599,76.92045455
-190001,202003,100,1480,95,,,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,3,4,4,0.733999278,3.123947916,95.83333333
-190001,202004,100,4350,95,,,2.939189189,,1.113,,110.5473,4350,R,4,,5,3.974249601,,87.62068966
-190002,202001,100,2433,17,,,,0.562673451,,0.9214,50.3694,2433,R,,3,4,,1.428812335,96.16299559
-190002,202002,100,4324,17,,,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,3,3,3,0.86670161,1.528894599,76.92045455
-190002,202003,100,6598,17,,,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,3,4,4,0.733999278,3.123947916,95.83333333
-190002,202004,100,700,17,,,11.26857143,,1.113,,110.5473,700,R,4,,5,3.974249601,,87.62068966
-190003,202001,100,7888,64,,,,1.870080607,,0.9214,50.3694,7888,R,,3,4,,1.428812335,96.16299559
-190003,202002,100,4218,64,,,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,3,3,3,0.86670161,1.528894599,76.92045455
-190003,202003,100,7591,64,,,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,3,4,4,0.733999278,3.123947916,95.83333333
-190003,202004,100,4077,64,,,0.537083388,,1.113,,110.5473,4077,R,4,,5,3.974249601,,87.62068966
-190004,202001,100,2247,51,,,,,,0.9214,50.3694,2247,R,,3,4,,1.428812335,96.16299559
-190004,202002,100,,51,,,,,0.8521,1.5274,121.4187,1914.6687,FIR,3,3,3,0.86670161,1.528894599,76.92045455
-190004,202003,100,,51,,,,,0.9685,1.8795,89.3761,1854.356636,FIR,3,4,4,0.733999278,3.123947916,95.83333333
-190004,202004,100,8608,51,,,,,1.113,,110.5473,8608,R,4,,5,3.974249601,,87.62068966
-190005,202001,100,,34,,,,,,0.9214,50.3694,6271.13538,BI,,3,4,,1.428812335,96.16299559
-190005,202002,100,,34,,,,,0.8521,1.5274,121.4187,6806.0944,BI,3,3,3,0.86670161,1.528894599,76.92045455
-190005,202003,100,4456,34,,,,0.867939229,0.9685,1.8795,89.3761,4456,R,3,4,4,0.733999278,3.123947916,95.83333333
-190005,202004,100,5134,34,,,1.152154399,,1.113,,110.5473,5134,R,4,,5,3.974249601,,87.62068966
-190006,202001,100,,8,,,,,,0.9214,50.3694,402.9552,C,,3,4,,1.428812335,96.16299559
-190006,202002,100,,8,,,,,0.8521,1.5274,121.4187,343.3581259,FIC,3,3,3,0.86670161,1.528894599,76.92045455
-190006,202003,100,,8,,,,,0.9685,1.8795,89.3761,332.542345,FIC,3,4,4,0.733999278,3.123947916,95.83333333
-190006,202004,100,,8,,,,,1.113,,110.5473,370.1196299,FIC,4,,5,3.974249601,,87.62068966
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+190001,202001,100,9261,95,,,,1.853682946,,0.9214,50.3694,9261,R,,3,4,,1.428812335,96.16299559
+190001,202002,100,4996,95,,,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,3,3,3,0.86670161,1.528894599,76.92045455
+190001,202003,100,1480,95,,,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,3,4,4,0.733999278,3.123947916,95.83333333
+190001,202004,100,4350,95,,,2.939189189,,1.113,,110.5473,4350,R,4,,5,3.974249601,,87.62068966
+190002,202001,100,2433,17,,,,0.562673451,,0.9214,50.3694,2433,R,,3,4,,1.428812335,96.16299559
+190002,202002,100,4324,17,,,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,3,3,3,0.86670161,1.528894599,76.92045455
+190002,202003,100,6598,17,,,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,3,4,4,0.733999278,3.123947916,95.83333333
+190002,202004,100,700,17,,,11.26857143,,1.113,,110.5473,700,R,4,,5,3.974249601,,87.62068966
+190003,202001,100,7888,64,,,,1.870080607,,0.9214,50.3694,7888,R,,3,4,,1.428812335,96.16299559
+190003,202002,100,4218,64,,,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,3,3,3,0.86670161,1.528894599,76.92045455
+190003,202003,100,7591,64,,,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,3,4,4,0.733999278,3.123947916,95.83333333
+190003,202004,100,4077,64,,,0.537083388,,1.113,,110.5473,4077,R,4,,5,3.974249601,,87.62068966
+190004,202001,100,2247,51,,,,,,0.9214,50.3694,2247,R,,3,4,,1.428812335,96.16299559
+190004,202002,100,,51,,,,,0.8521,1.5274,121.4187,1914.6687,FIR,3,3,3,0.86670161,1.528894599,76.92045455
+190004,202003,100,,51,,,,,0.9685,1.8795,89.3761,1854.356636,FIR,3,4,4,0.733999278,3.123947916,95.83333333
+190004,202004,100,8608,51,,,,,1.113,,110.5473,8608,R,4,,5,3.974249601,,87.62068966
+190005,202001,100,,34,,,,,,0.9214,50.3694,6271.13538,BI,,3,4,,1.428812335,96.16299559
+190005,202002,100,,34,,,,,0.8521,1.5274,121.4187,6806.0944,BI,3,3,3,0.86670161,1.528894599,76.92045455
+190005,202003,100,4456,34,,,,0.867939229,0.9685,1.8795,89.3761,4456,R,3,4,4,0.733999278,3.123947916,95.83333333
+190005,202004,100,5134,34,,,1.152154399,,1.113,,110.5473,5134,R,4,,5,3.974249601,,87.62068966
+190006,202001,100,,8,,,,,,0.9214,50.3694,402.9552,C,,3,4,,1.428812335,96.16299559
+190006,202002,100,,8,,,,,0.8521,1.5274,121.4187,343.3581259,FIC,3,3,3,0.86670161,1.528894599,76.92045455
+190006,202003,100,,8,,,,,0.9685,1.8795,89.3761,332.542345,FIC,3,4,4,0.733999278,3.123947916,95.83333333
+190006,202004,100,,8,,,,,1.113,,110.5473,370.1196299,FIC,4,,5,3.974249601,,87.62068966
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_input.csv
similarity index 90%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_input.csv
index 27d229a1..e023da16 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_input.csv
@@ -1,48 +1,48 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-200001,202001,100,7788,56,,
-200001,202002,100,6169,56,,
-200001,202003,100,6156,56,,
-200001,202004,100,1577,56,,
-200002,202001,100,6533,75,,
-200002,202002,100,8103,75,,
-200002,202003,100,5860,75,,
-200002,202004,100,2575,75,,
-200003,202001,100,56,10,,
-200003,202002,100,4978,10,,
-200003,202003,100,8777,10,,
-200003,202004,100,906,10,,
-200004,202001,100,1884,86,,
-200004,202002,100,6075,86,,
-200004,202003,100,,86,,
-200004,202004,100,,86,,
-200005,202001,100,,6,,
-200005,202002,100,,6,,
-200005,202003,100,,6,,
-200005,202004,100,,6,,
-200006,202001,100,,41,,
-200006,202002,100,,41,,
-200006,202003,100,8882,41,,
-200006,202004,100,2711,41,,
-200007,202001,200,2439,4,,
-200007,202002,200,9675,4,,
-200007,202003,200,7003,4,,
-200007,202004,200,595,4,,
-200008,202001,200,1849,4,,
-200008,202002,200,6436,4,,
-200008,202003,200,9709,4,,
-200008,202004,200,2727,4,,
-200009,202001,200,8742,45,,
-200009,202002,200,1469,45,,
-200009,202003,200,8602,45,,
-200009,202004,200,1945,45,,
-200010,202001,200,,85,,
-200010,202002,200,6489,85,,
-200010,202003,200,1796,85,,
-200010,202004,200,,85,,
-200011,202001,200,,79,,
-200011,202002,200,1926,79,,
-200011,202004,200,,79,,
-200012,202001,200,5495,87,,
-200012,202002,200,,87,,
-200012,202003,200,,87,,
-200012,202004,200,,87,,
+identifier,date,group,question,other,lower_trim,upper_trim
+200001,202001,100,7788,56,,
+200001,202002,100,6169,56,,
+200001,202003,100,6156,56,,
+200001,202004,100,1577,56,,
+200002,202001,100,6533,75,,
+200002,202002,100,8103,75,,
+200002,202003,100,5860,75,,
+200002,202004,100,2575,75,,
+200003,202001,100,56,10,,
+200003,202002,100,4978,10,,
+200003,202003,100,8777,10,,
+200003,202004,100,906,10,,
+200004,202001,100,1884,86,,
+200004,202002,100,6075,86,,
+200004,202003,100,,86,,
+200004,202004,100,,86,,
+200005,202001,100,,6,,
+200005,202002,100,,6,,
+200005,202003,100,,6,,
+200005,202004,100,,6,,
+200006,202001,100,,41,,
+200006,202002,100,,41,,
+200006,202003,100,8882,41,,
+200006,202004,100,2711,41,,
+200007,202001,200,2439,4,,
+200007,202002,200,9675,4,,
+200007,202003,200,7003,4,,
+200007,202004,200,595,4,,
+200008,202001,200,1849,4,,
+200008,202002,200,6436,4,,
+200008,202003,200,9709,4,,
+200008,202004,200,2727,4,,
+200009,202001,200,8742,45,,
+200009,202002,200,1469,45,,
+200009,202003,200,8602,45,,
+200009,202004,200,1945,45,,
+200010,202001,200,,85,,
+200010,202002,200,6489,85,,
+200010,202003,200,1796,85,,
+200010,202004,200,,85,,
+200011,202001,200,,79,,
+200011,202002,200,1926,79,,
+200011,202004,200,,79,,
+200012,202001,200,5495,87,,
+200012,202002,200,,87,,
+200012,202003,200,,87,,
+200012,202004,200,,87,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
similarity index 94%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index 5625e3c2..1e50ba40 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_20_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-200001,202001,100,7788,56,,,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4
-200001,202002,100,6169,56,,,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4
-200001,202003,100,6156,56,,,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4
-200001,202004,100,1577,56,,,0.25617284,,0.276010255,,42.68681319,1577,R,4,,4
-200002,202001,100,6533,75,,,,0.806244601,,0.597514698,71.63436123,6533,R,,4,4
-200002,202002,100,8103,75,,,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4
-200002,202003,100,5860,75,,,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4
-200002,202004,100,2575,75,,,0.439419795,,0.276010255,,42.68681319,2575,R,4,,4
-200003,202001,100,56,10,,,,0.011249498,,0.597514698,71.63436123,56,R,,4,4
-200003,202002,100,4978,10,,,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4
-200003,202003,100,8777,10,,,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4
-200003,202004,100,906,10,,,0.103224336,,0.276010255,,42.68681319,906,R,4,,4
-200004,202001,100,1884,86,,,,0.310123457,,0.597514698,71.63436123,1884,R,,4,4
-200004,202002,100,6075,86,,,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4
-200004,202003,100,,86,,,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4
-200004,202004,100,,86,,,,,0.276010255,,42.68681319,1947.413826,FIR,4,,4
-200005,202001,100,,6,,,,,,0.597514698,71.63436123,429.8061674,C,,4,4
-200005,202002,100,,6,,,,,23.53745347,0.984013482,111.5638767,10116.54267,FIC,4,3,4
-200005,202003,100,,6,,,,,1.161413175,4.785815599,163.0494505,11749.48594,FIC,3,4,4
-200005,202004,100,,6,,,,,0.276010255,,42.68681319,3242.978611,FIC,4,,4
-200006,202001,100,,41,,,,,,0.597514698,71.63436123,8740.605259,BI,,4,4
-200006,202002,100,,41,,,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4
-200006,202003,100,8882,41,,,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4
-200006,202004,100,2711,41,,,0.305224049,,0.276010255,,42.68681319,2711,R,4,,4
-200007,202001,200,2439,4,,,,0.252093023,,2.163456777,132.3214286,2439,R,,3,4
-200007,202002,200,9675,4,,,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5
-200007,202003,200,7003,4,,,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4
-200007,202004,200,595,4,,,0.084963587,,0.197315737,,99.37735849,595,R,3,,3
-200008,202001,200,1849,4,,,,0.287290242,,2.163456777,132.3214286,1849,R,,3,4
-200008,202002,200,6436,4,,,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5
-200008,202003,200,9709,4,,,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4
-200008,202004,200,2727,4,,,0.280873416,,0.197315737,,99.37735849,2727,R,3,,3
-200009,202001,200,8742,45,,,,5.950987066,,2.163456777,132.3214286,8742,R,,3,4
-200009,202002,200,1469,45,,,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5
-200009,202003,200,8602,45,,,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4
-200009,202004,200,1945,45,,,0.226110207,,0.197315737,,99.37735849,1945,R,3,,3
-200010,202001,200,,85,,,,,,2.163456777,132.3214286,14038.67103,BI,,3,4
-200010,202002,200,6489,85,,,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5
-200010,202003,200,1796,85,,,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4
-200010,202004,200,,85,,,,,0.197315737,,99.37735849,354.3790633,FIR,3,,3
-200011,202001,200,,79,,,,,,2.163456777,132.3214286,4166.817753,BI,,3,4
-200011,202002,200,1926,79,,,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5
-200011,202004,200,,79,,,,,0.197315737,,99.37735849,7850.811321,C,3,,3
-200012,202001,200,5495,87,,,,,,2.163456777,132.3214286,5495,R,,3,4
-200012,202002,200,,87,,,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5
-200012,202003,200,,87,,,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4
-200012,202004,200,,87,,,,,0.197315737,,99.37735849,5755.871742,FIR,3,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+200001,202001,100,7788,56,,,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4
+200001,202002,100,6169,56,,,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4
+200001,202003,100,6156,56,,,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4
+200001,202004,100,1577,56,,,0.25617284,,0.276010255,,42.68681319,1577,R,4,,4
+200002,202001,100,6533,75,,,,0.806244601,,0.597514698,71.63436123,6533,R,,4,4
+200002,202002,100,8103,75,,,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4
+200002,202003,100,5860,75,,,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4
+200002,202004,100,2575,75,,,0.439419795,,0.276010255,,42.68681319,2575,R,4,,4
+200003,202001,100,56,10,,,,0.011249498,,0.597514698,71.63436123,56,R,,4,4
+200003,202002,100,4978,10,,,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4
+200003,202003,100,8777,10,,,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4
+200003,202004,100,906,10,,,0.103224336,,0.276010255,,42.68681319,906,R,4,,4
+200004,202001,100,1884,86,,,,0.310123457,,0.597514698,71.63436123,1884,R,,4,4
+200004,202002,100,6075,86,,,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4
+200004,202003,100,,86,,,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4
+200004,202004,100,,86,,,,,0.276010255,,42.68681319,1947.413826,FIR,4,,4
+200005,202001,100,,6,,,,,,0.597514698,71.63436123,429.8061674,C,,4,4
+200005,202002,100,,6,,,,,23.53745347,0.984013482,111.5638767,10116.54267,FIC,4,3,4
+200005,202003,100,,6,,,,,1.161413175,4.785815599,163.0494505,11749.48594,FIC,3,4,4
+200005,202004,100,,6,,,,,0.276010255,,42.68681319,3242.978611,FIC,4,,4
+200006,202001,100,,41,,,,,,0.597514698,71.63436123,8740.605259,BI,,4,4
+200006,202002,100,,41,,,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4
+200006,202003,100,8882,41,,,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4
+200006,202004,100,2711,41,,,0.305224049,,0.276010255,,42.68681319,2711,R,4,,4
+200007,202001,200,2439,4,,,,0.252093023,,2.163456777,132.3214286,2439,R,,3,4
+200007,202002,200,9675,4,,,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5
+200007,202003,200,7003,4,,,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4
+200007,202004,200,595,4,,,0.084963587,,0.197315737,,99.37735849,595,R,3,,3
+200008,202001,200,1849,4,,,,0.287290242,,2.163456777,132.3214286,1849,R,,3,4
+200008,202002,200,6436,4,,,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5
+200008,202003,200,9709,4,,,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4
+200008,202004,200,2727,4,,,0.280873416,,0.197315737,,99.37735849,2727,R,3,,3
+200009,202001,200,8742,45,,,,5.950987066,,2.163456777,132.3214286,8742,R,,3,4
+200009,202002,200,1469,45,,,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5
+200009,202003,200,8602,45,,,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4
+200009,202004,200,1945,45,,,0.226110207,,0.197315737,,99.37735849,1945,R,3,,3
+200010,202001,200,,85,,,,,,2.163456777,132.3214286,14038.67103,BI,,3,4
+200010,202002,200,6489,85,,,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5
+200010,202003,200,1796,85,,,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4
+200010,202004,200,,85,,,,,0.197315737,,99.37735849,354.3790633,FIR,3,,3
+200011,202001,200,,79,,,,,,2.163456777,132.3214286,4166.817753,BI,,3,4
+200011,202002,200,1926,79,,,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5
+200011,202004,200,,79,,,,,0.197315737,,99.37735849,7850.811321,C,3,,3
+200012,202001,200,5495,87,,,,,,2.163456777,132.3214286,5495,R,,3,4
+200012,202002,200,,87,,,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5
+200012,202003,200,,87,,,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4
+200012,202004,200,,87,,,,,0.197315737,,99.37735849,5755.871742,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_input.csv
similarity index 78%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_input.csv
index 5a0aa6f1..dc4f10ab 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_input.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-210001,202001,1,547,10,,
-210001,202002,1,362,10,,
-210001,202003,1,895,10,,
-210002,202001,1,381,50,,
-210002,202002,1,573,50,,
-210002,202003,1,214,50,,
-210003,202001,2,961,12,,
-210003,202002,2,267,12,,
-210003,202003,2,314,12,,
-210004,202001,2,555,9,,
-210004,202002,2,628,9,,
-210004,202003,2,736,9,,
-210005,202001,1,100,18,,
-210005,202002,2,,18,,
-210005,202003,2,,18,,
+identifier,date,group,question,other,lower_trim,upper_trim
+210001,202001,1,547,10,,
+210001,202002,1,362,10,,
+210001,202003,1,895,10,,
+210002,202001,1,381,50,,
+210002,202002,1,573,50,,
+210002,202003,1,214,50,,
+210003,202001,2,961,12,,
+210003,202002,2,267,12,,
+210003,202003,2,314,12,,
+210004,202001,2,555,9,,
+210004,202002,2,628,9,,
+210004,202003,2,736,9,,
+210005,202001,1,100,18,,
+210005,202002,2,,18,,
+210005,202003,2,,18,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
similarity index 86%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index b4ad5629..6d76d7a8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_21_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-210001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
-210001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
-210001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
-210002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
-210002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
-210002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
-210003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
-210003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
-210003,202003,2,314,12,,,1.176029963,,1.174002242,,50,314,R,2,,2
-210004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
-210004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
-210004,202003,2,736,9,,,1.171974522,,1.174002242,,50,736,R,2,,2
-210005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
-210005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,767.1428572,C,2,2,2
-210005,202003,2,,18,,,,,1.174002242,,50,900.6274342,FIC,2,,2
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+210001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
+210001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
+210001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
+210002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
+210002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
+210002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
+210003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
+210003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
+210003,202003,2,314,12,,,1.176029963,,1.174002242,,50,314,R,2,,2
+210004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
+210004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
+210004,202003,2,736,9,,,1.171974522,,1.174002242,,50,736,R,2,,2
+210005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
+210005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,767.1428572,C,2,2,2
+210005,202003,2,,18,,,,,1.174002242,,50,900.6274342,FIC,2,,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_input.csv
similarity index 78%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_input.csv
index 9dd3eeac..5be5ff20 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_input.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-220001,202001,1,547,10,,
-220001,202002,1,362,10,,
-220001,202003,1,895,10,,
-220002,202001,1,381,50,,
-220002,202002,1,573,50,,
-220002,202003,1,214,50,,
-220003,202001,2,961,12,,
-220003,202002,2,267,12,,
-220003,202003,2,314,12,,
-220004,202001,2,555,9,,
-220004,202002,2,628,9,,
-220004,202003,2,736,9,,
-220005,202001,1,,18,,
-220005,202002,2,,18,,
-220005,202003,2,100,18,,
+identifier,date,group,question,other,lower_trim,upper_trim
+220001,202001,1,547,10,,
+220001,202002,1,362,10,,
+220001,202003,1,895,10,,
+220002,202001,1,381,50,,
+220002,202002,1,573,50,,
+220002,202003,1,214,50,,
+220003,202001,2,961,12,,
+220003,202002,2,267,12,,
+220003,202003,2,314,12,,
+220004,202001,2,555,9,,
+220004,202002,2,628,9,,
+220004,202003,2,736,9,,
+220005,202001,1,,18,,
+220005,202002,2,,18,,
+220005,202003,2,100,18,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
similarity index 86%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index c4273e94..6e38a6c7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_22_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-220001,202001,1,547,10,,,,1.511049724,,1.087985595,15.46666667,547,R,,2,2
-220001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
-220001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,
-220002,202001,1,381,50,,,,0.664921466,,1.087985595,15.46666667,381,R,,2,2
-220002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
-220002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
-220003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
-220003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
-220003,202003,2,314,12,,,1.176029963,,1.174002242,,29.48717949,314,R,2,,3
-220004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
-220004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
-220004,202003,2,736,9,,,1.171974522,,1.174002242,,29.48717949,736,R,2,,3
-220005,202001,1,,18,,,,,,1.087985595,15.46666667,278.4,C,,2,2
-220005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,85.17896705,BI,2,2,2
-220005,202003,2,100,18,,,,,1.174002242,,29.48717949,100,R,2,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+220001,202001,1,547,10,,,,1.511049724,,1.087985595,15.46666667,547,R,,2,2
+220001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
+220001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,
+220002,202001,1,381,50,,,,0.664921466,,1.087985595,15.46666667,381,R,,2,2
+220002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
+220002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
+220003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
+220003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
+220003,202003,2,314,12,,,1.176029963,,1.174002242,,29.48717949,314,R,2,,3
+220004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
+220004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
+220004,202003,2,736,9,,,1.171974522,,1.174002242,,29.48717949,736,R,2,,3
+220005,202001,1,,18,,,,,,1.087985595,15.46666667,278.4,C,,2,2
+220005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,85.17896705,BI,2,2,2
+220005,202003,2,100,18,,,,,1.174002242,,29.48717949,100,R,2,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_input.csv
similarity index 78%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_input.csv
index 7795046e..8fa66f24 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_input.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-230001,202001,1,547,10,,
-230001,202002,1,362,10,,
-230001,202003,1,895,10,,
-230002,202001,1,381,50,,
-230002,202002,1,573,50,,
-230002,202003,1,214,50,,
-230003,202001,2,961,12,,
-230003,202002,2,267,12,,
-230003,202003,2,314,12,,
-230004,202001,2,555,9,,
-230004,202002,2,628,9,,
-230004,202003,2,736,9,,
-230005,202001,1,,18,,
-230005,202002,2,,18,,
-230005,202003,2,,18,,
+identifier,date,group,question,other,lower_trim,upper_trim
+230001,202001,1,547,10,,
+230001,202002,1,362,10,,
+230001,202003,1,895,10,,
+230002,202001,1,381,50,,
+230002,202002,1,573,50,,
+230002,202003,1,214,50,,
+230003,202001,2,961,12,,
+230003,202002,2,267,12,,
+230003,202003,2,314,12,,
+230004,202001,2,555,9,,
+230004,202002,2,628,9,,
+230004,202003,2,736,9,,
+230005,202001,1,,18,,
+230005,202002,2,,18,,
+230005,202003,2,,18,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
similarity index 86%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 98e3316c..14c506eb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_23_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-230001,202001,1,547,10,,,,1.511049724,,1.087985595,15.46666667,547,R,,2,2
-230001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
-230001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
-230002,202001,1,381,50,,,,0.664921466,,1.087985595,15.46666667,381,R,,2,2
-230002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
-230002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
-230003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
-230003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
-230003,202003,2,314,12,,,1.176029963,,1.174002242,,50,314,R,2,,2
-230004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
-230004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
-230004,202003,2,736,9,,,1.171974522,,1.174002242,,50,736,R,2,,2
-230005,202001,1,,18,,,,,,1.087985595,15.46666667,278.4,C,,2,2
-230005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2
-230005,202003,2,,18,,,,,1.174002242,,50,900.6274345,FIC,2,,2
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+230001,202001,1,547,10,,,,1.511049724,,1.087985595,15.46666667,547,R,,2,2
+230001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
+230001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
+230002,202001,1,381,50,,,,0.664921466,,1.087985595,15.46666667,381,R,,2,2
+230002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
+230002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
+230003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
+230003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
+230003,202003,2,314,12,,,1.176029963,,1.174002242,,50,314,R,2,,2
+230004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
+230004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
+230004,202003,2,736,9,,,1.171974522,,1.174002242,,50,736,R,2,,2
+230005,202001,1,,18,,,,,,1.087985595,15.46666667,278.4,C,,2,2
+230005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2
+230005,202003,2,,18,,,,,1.174002242,,50,900.6274345,FIC,2,,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_input.csv
similarity index 78%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_input.csv
index 5129dba1..7c3d0e06 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_input.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-240001,202001,1,547,10,,
-240001,202002,1,362,10,,
-240001,202003,1,895,10,,
-240002,202001,1,381,50,,
-240002,202002,1,573,50,,
-240002,202003,1,214,50,,
-240003,202001,2,961,12,,
-240003,202002,2,267,12,,
-240003,202003,2,314,12,,
-240004,202001,2,555,9,,
-240004,202002,2,628,9,,
-240004,202003,2,736,9,,
-240005,202001,1,100,18,,
-240005,202002,2,,18,,
-240005,202003,2,150,18,,
+identifier,date,group,question,other,lower_trim,upper_trim
+240001,202001,1,547,10,,
+240001,202002,1,362,10,,
+240001,202003,1,895,10,,
+240002,202001,1,381,50,,
+240002,202002,1,573,50,,
+240002,202003,1,214,50,,
+240003,202001,2,961,12,,
+240003,202002,2,267,12,,
+240003,202003,2,314,12,,
+240004,202001,2,555,9,,
+240004,202002,2,628,9,,
+240004,202003,2,736,9,,
+240005,202001,1,100,18,,
+240005,202002,2,,18,,
+240005,202003,2,150,18,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
similarity index 86%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index e3d3009d..4c950c96 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_24_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-240001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
-240001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
-240001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
-240002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
-240002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
-240002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
-240003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
-240003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
-240003,202003,2,314,12,,,1.176029963,,1.174002242,,30.76923077,314,R,2,,3
-240004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
-240004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
-240004,202003,2,736,9,,,1.171974522,,1.174002242,,30.76923077,736,R,2,,3
-240005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
-240005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,127.7684506,BI,2,2,2
-240005,202003,2,150,18,,,,,1.174002242,,30.76923077,150,R,2,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+240001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
+240001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
+240001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
+240002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
+240002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
+240002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
+240003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
+240003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
+240003,202003,2,314,12,,,1.176029963,,1.174002242,,30.76923077,314,R,2,,3
+240004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
+240004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
+240004,202003,2,736,9,,,1.171974522,,1.174002242,,30.76923077,736,R,2,,3
+240005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
+240005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,127.7684506,BI,2,2,2
+240005,202003,2,150,18,,,,,1.174002242,,30.76923077,150,R,2,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_input.csv
similarity index 82%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_input.csv
index 836f6af8..b9a994d5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_input.csv
@@ -1,22 +1,22 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-250001,202001,1,547,10,,
-250001,202002,1,362,10,,
-250001,202003,1,895,10,,
-250002,202001,1,381,50,,
-250002,202002,1,573,50,,
-250002,202003,1,214,50,,
-250003,202001,2,961,12,,
-250003,202002,2,267,12,,
-250003,202003,2,314,12,,
-250004,202001,2,555,9,,
-250004,202002,2,628,9,,
-250004,202003,2,736,9,,
-250005,202001,1,100,18,,
-250005,202002,2,310,18,,
-250005,202003,2,240,18,,
-250006,202001,1,,22,,
-250006,202002,1,,22,,
-250006,202003,1,,22,,
-250007,202001,2,,52,,
-250007,202002,2,,52,,
-250007,202003,2,,52,,
+identifier,date,group,question,other,lower_trim,upper_trim
+250001,202001,1,547,10,,
+250001,202002,1,362,10,,
+250001,202003,1,895,10,,
+250002,202001,1,381,50,,
+250002,202002,1,573,50,,
+250002,202003,1,214,50,,
+250003,202001,2,961,12,,
+250003,202002,2,267,12,,
+250003,202003,2,314,12,,
+250004,202001,2,555,9,,
+250004,202002,2,628,9,,
+250004,202003,2,736,9,,
+250005,202001,1,100,18,,
+250005,202002,2,310,18,,
+250005,202003,2,240,18,,
+250006,202001,1,,22,,
+250006,202002,1,,22,,
+250006,202003,1,,22,,
+250007,202001,2,,52,,
+250007,202002,2,,52,,
+250007,202003,2,,52,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
similarity index 89%
rename from tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 7d3608a3..84f757d4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_25_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-250001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
-250001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
-250001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
-250002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
-250002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
-250002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
-250003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
-250003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,267,R,2,3,3
-250003,202003,2,314,12,,,1.176029963,,1.040732678,,33.07692308,314,R,3,,3
-250004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
-250004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,628,R,2,3,3
-250004,202003,2,736,9,,,1.171974522,,1.040732678,,33.07692308,736,R,3,,3
-250005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
-250005,202002,2,310,18,,,,1.291666667,0.70468356,0.998415336,30.8974359,310,R,2,3,3
-250005,202003,2,240,18,,,0.774193548,,1.040732678,,33.07692308,240,R,3,,3
-250006,202001,1,,22,,,,,,1.087985595,13.17948718,289.9487179,C,,2,3
-250006,202002,1,,22,,,,,1.082864299,1.541019684,15.58333333,313.9751153,FIC,2,2,2
-250006,202003,1,,22,,,,,1.42292432,,18.48333333,446.7628274,FIC,2,,2
-250007,202001,2,,52,,,,,,2.241504449,72.19047619,3753.904762,C,,2,2
-250007,202002,2,,52,,,,,0.70468356,0.998415336,30.8974359,2645.314971,FIC,2,3,3
-250007,202003,2,,52,,,,,1.040732678,,33.07692308,2753.065733,FIC,3,,3
+identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+250001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
+250001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
+250001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
+250002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
+250002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
+250002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
+250003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
+250003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,267,R,2,3,3
+250003,202003,2,314,12,,,1.176029963,,1.040732678,,33.07692308,314,R,3,,3
+250004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
+250004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,628,R,2,3,3
+250004,202003,2,736,9,,,1.171974522,,1.040732678,,33.07692308,736,R,3,,3
+250005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
+250005,202002,2,310,18,,,,1.291666667,0.70468356,0.998415336,30.8974359,310,R,2,3,3
+250005,202003,2,240,18,,,0.774193548,,1.040732678,,33.07692308,240,R,3,,3
+250006,202001,1,,22,,,,,,1.087985595,13.17948718,289.9487179,C,,2,3
+250006,202002,1,,22,,,,,1.082864299,1.541019684,15.58333333,313.9751153,FIC,2,2,2
+250006,202003,1,,22,,,,,1.42292432,,18.48333333,446.7628274,FIC,2,,2
+250007,202001,2,,52,,,,,,2.241504449,72.19047619,3753.904762,C,,2,2
+250007,202002,2,,52,,,,,0.70468356,0.998415336,30.8974359,2645.314971,FIC,2,3,3
+250007,202003,2,,52,,,,,1.040732678,,33.07692308,2753.065733,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_t_output_trial1.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_t_output_trial1.csv
deleted file mode 100644
index a2ca6328..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_14_t_output_trial1.csv
+++ /dev/null
@@ -1,42 +0,0 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fr_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-140001,202001,100,3582,27,,,,0.790205162,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3
-140001,202002,100,4533,27,,,1.265494137,1.013867144,1.265494137,1.013867144,6.772539381,3.563193687,97.52261307,4533,R,3,3,3
-140001,202003,100,4471,27,,,0.986322524,1.470723684,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3
-140001,202004,100,3040,27,,,0.679937374,0.356849395,0.679937374,,3.104984977,2.674093602,95.10050251,3040,R,3,3,3
-140001,202005,100,8519,27,,,2.802302632,0.980322209,,,0.865602079,0.497376695,63.63316583,8519,R,3,3,3
-140001,202006,100,8690,27,,,1.020072778,0.87082874,,0.87082874,3.05648882,3.720631427,127.0854271,8690,R,3,3,3
-140001,202007,100,9979,27,,,1.148331415,,1.148331415,,0.557462816,,91.63876652,9979,R,3,,4
-140002,202001,100,5359,83,,,,0.755746721,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3
-140002,202002,100,7091,83,,,1.323194626,0.999013807,1.323194626,0.999013807,6.772539381,3.563193687,97.52261307,7091,R,3,3,3
-140002,202003,100,7098,83,,,1.000987167,0.958153348,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3
-140002,202004,100,7408,83,,,1.043674274,3.824470831,1.043674274,3.824470831,3.104984977,2.674093602,95.10050251,7408,R,3,3,3
-140002,202005,100,1937,83,,,0.261474082,0.288630606,0.261474082,0.288630606,0.865602079,0.497376695,63.63316583,1937,R,3,3,3
-140002,202006,100,6711,83,,,3.464636035,6.379277567,3.464636035,,3.05648882,3.720631427,127.0854271,6711,R,3,3,3
-140002,202007,100,1052,83,,,0.156757562,,,,0.557462816,,91.63876652,1052,R,3,,4
-140003,202001,100,439,89,,,,0.056404985,,0.056404985,,0.534118956,47.13567839,439,R,,3,3
-140003,202002,100,7783,89,,,17.72892938,8.676700111,17.72892938,8.676700111,6.772539381,3.563193687,97.52261307,7783,R,3,3,3
-140003,202003,100,897,89,,,0.115251188,0.105815737,0.115251188,,0.700853626,0.84489759,62.64321608,897,R,3,3,3
-140003,202004,100,8477,89,,,9.45039019,3.84096058,,,3.104984977,2.674093602,95.10050251,8477,R,3,3,3
-140003,202005,100,2207,89,,,0.260351539,0.223177268,,0.223177268,0.865602079,0.497376695,63.63316583,2207,R,3,3,3
-140003,202006,100,9889,89,,,4.48074309,3.911787975,4.48074309,3.911787975,3.05648882,3.720631427,127.0854271,9889,R,3,3,3
-140003,202007,100,2528,89,,,0.255637577,,0.255637577,,0.557462816,,91.63876652,2528,R,3,,4
-140004,202001,100,2866,23,,,,0.842885506,,,,,,,R,,,
-140004,202002,100,3400,23,,,1.186400754,0.844889287,,,6.772539381,,,,R,,,
-140004,202003,100,4024,23,,,1.183587028,1.946546053,,,0.700853626,,,,R,,,
-140004,202004,100,2067,23,,,0.51373046,0.485315178,,0.485315178,3.104984977,,,,R,,,
-140004,202005,100,4260,23,,,2.060516641,0.816935175,2.060516641,0.816935175,0.865602079,,,,R,,,
-140004,202006,100,5214,23,,,1.224087334,0.549997099,1.224087334,0.549997099,3.05648882,,,,R,,,
-140004,202007,100,9480,23,,,1.818191408,,,,0.557462816,,,,R,,,
-140005,202001,100,483,94,,,,0.05304195,,0.05304195,,,,,R,,,
-140005,202002,100,9106,94,,,18.85300207,9.060696517,,9.060696517,6.772539381,,,,R,,,
-140005,202003,100,1005,94,,,0.110366791,0.131728992,,0.131728992,0.700853626,,,,R,,,
-140005,202004,100,7629,94,,,7.591343284,3.63880476,7.591343284,3.63880476,3.104984977,,,,R,,,
-140005,202005,100,2097,94,,,0.274815514,0.176682004,0.274815514,0.176682004,0.865602079,,,,R,,,
-140005,202006,100,11867,94,,,5.659886009,3.725512357,,3.725512357,3.05648882,,,,R,,,
-140005,202007,100,3185,94,,,0.268419456,,0.268419456,,0.557462816,,,,R,,,
-140006,202001,100,,28,,,,,,,,0.534118956,47.13567839,1319.798995,C,,3,3
-140006,202002,100,,28,,,,,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3
-140006,202003,100,,28,,,,,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3
-140006,202005,100,,28,,,,,,,0.865602079,0.497376695,63.63316583,13403.57248,BI,3,3,3
-140006,202006,100,,28,,,,,,,3.05648882,3.720631427,127.0854271,26948.53343,BI,3,3,3
-140006,202007,100,7243,28,,,,,,,0.557462816,,91.63876652,7243,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_t_output.csv b/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_t_output.csv
deleted file mode 100644
index 3fcab0bf..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/mor_test_data_case_3_t_output.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c
-30001,202001,100,8444,51,,,,1.129481006,,1.655006,120.1991,8444,R,,4,4
-30001,202002,100,7476,51,,,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7476,R,4,3,4
-30001,202003,100,2003,51,,,0.267924024,,1.526947,,103.0154,2003,R,3,,3
-30002,202001,100,9343,72,,,,1.195062676,,1.655006,120.1991,9343,R,,4,4
-30002,202002,100,7818,72,,,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7818,R,4,3,4
-30002,202003,100,4897,72,,,0.626375032,,1.526947,,103.0154,4897,R,3,,3
-30003,202001,100,7511,7,,,,4.265190233,,1.655006,120.1991,7511,R,,4,4
-30003,202002,100,1761,7,,,0.234456131,0.271256932,8.743054929,1.407609,90.8436,1761,R,4,3,4
-30003,202003,100,6492,7,,,3.686541738,,1.526947,,103.0154,6492,R,3,,3
-30004,202001,100,64,81,,,,0.030288689,,1.655006,120.1991,64,R,,4,4
-30004,202002,100,2113,81,,,33.015625,11.42162162,8.743054929,1.407609,90.8436,2113,R,4,3,4
-30004,202003,100,185,81,,,0.087553242,,1.526947,,103.0154,3226.439011,R,3,,3
-30005,202001,100,844,5,,,,0.941234172,,,,,R,,,
-30005,202002,100,897,5,,,1.062434865,3.199201198,,,,,R,,,
-30005,202003,100,280,5,,,0.312578027,,,,,,R,,,
-30006,202001,100,1869,14,,,,0.995885563,,,,,R,,,
-30006,202002,100,1876,14,,,1.004131435,1.368417982,,,,,R,,,
-30006,202003,100,1371,14,,,0.730770871,,,,,,R,,,
-30007,202001,100,12769,12,,,,4.475816911,,,,,R,,,
-30007,202002,100,2853,12,,,0.223422901,0.248269056,,,,,R,,,
-30007,202003,100,11491,12,,,4.027888195,,,,,,R,,,
-30008,202001,100,141,162,,,,0.023463069,,,,,R,,,
-30008,202002,100,6001,162,,,42.62017045,13.86213906,,,,,R,,,
-30008,202003,100,433,162,,,0.072138939,,,,,,R,,,
-30009,202001,100,6417,26,,,,1.589639934,,,,,R,,,
-30009,202002,100,4037,26,,,0.629073275,3.053782962,,,,,R,,,
-30009,202003,100,1322,26,,,0.327462695,,,,,,R,,,
-30010,202001,100,28963,144,,,,1.332623847,,,,,R,,,
-30010,202002,100,21734,144,,,0.750399298,2.064295653,,,,,R,,,
-30010,202003,100,10529,144,,,0.484426733,,,,,,R,,,
-30011,202001,100,6009,5,,,,5.249464902,,,,,R,,,
-30011,202002,100,1145,5,,,0.190495606,0.226047443,,,,,R,,,
-30011,202003,100,5064,5,,,4.423850085,,,,,,R,,,
-30012,202001,100,256,275,,,,0.034032235,,,,,R,,,
-30012,202002,100,7522,275,,,29.38390625,,,,,,R,,,
-30012,202003,100,,275,,,,,,,,,FIR,,,

From 1be5ccce1e2a3376eb5b29d3ba9decc4b9223b7a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 3 Mar 2023 13:37:22 +0000
Subject: [PATCH 117/531] Initial Test File

---
 tests/imputation/test_mean_of_ratios.py | 221 ++++++++++++++++++++++++
 1 file changed, 221 insertions(+)
 create mode 100644 tests/imputation/test_mean_of_ratios.py

diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
new file mode 100644
index 00000000..e5b0c1ca
--- /dev/null
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -0,0 +1,221 @@
+import glob
+import os
+import pathlib
+
+import pytest
+from chispa.dataframe_comparer import assert_df_equality
+from pyspark.sql.functions import bround, col, lit
+from pyspark.sql.types import DecimalType, LongType, StringType
+
+from statistical_methods_library.imputation import mean_of_ratios
+from statistical_methods_library.utilities.exceptions import ValidationError
+
+auxiliary_col = "other"
+backward_col = "backward"
+forward_col = "forward"
+marker_col = "marker"
+output_col = "output"
+period_col = "date"
+reference_col = "identifier"
+grouping_col = "group"
+target_col = "question"
+construction_col = "construction"
+count_forward_col = "count_forward"
+count_backward_col = "count_backward"
+count_construction_col = "count_construction"
+exclude_col = "exclude"
+
+decimal_type = DecimalType(15, 6)
+
+reference_type = StringType()
+period_type = StringType()
+grouping_type = StringType()
+target_type = decimal_type
+auxiliary_type = decimal_type
+min_accuracy = decimal_type
+marker_type = StringType()
+backward_type = decimal_type
+forward_type = decimal_type
+construction_type = decimal_type
+count_forward_type = LongType()
+count_backward_type = LongType()
+count_construction_type = LongType()
+exclude_type = StringType()
+
+# Columns we expect in either our input or output test dataframes and their
+# respective types
+dataframe_columns = (
+    reference_col,
+    period_col,
+    grouping_col,
+    target_col,
+    auxiliary_col,
+    output_col,
+    marker_col,
+    forward_col,
+    backward_col,
+    construction_col,
+    count_forward_col,
+    count_backward_col,
+    count_construction_col,
+    exclude_col,
+)
+
+dataframe_types = {
+    reference_col: reference_type,
+    period_col: period_type,
+    grouping_col: grouping_type,
+    target_col: target_type,
+    auxiliary_col: auxiliary_type,
+    output_col: min_accuracy,
+    marker_col: marker_type,
+    backward_col: backward_type,
+    forward_col: forward_type,
+    construction_col: construction_type,
+    count_forward_col: count_forward_type,
+    count_backward_col: count_backward_type,
+    count_construction_col: count_construction_type,
+    exclude_col: exclude_type,
+}
+
+bad_dataframe_types = dataframe_types.copy()
+bad_dataframe_types[target_col] = reference_type
+
+# Params used when calling impute
+params = {
+    "reference_col": reference_col,
+    "period_col": period_col,
+    "grouping_col": grouping_col,
+    "target_col": target_col,
+    "auxiliary_col": auxiliary_col,
+    "output_col": output_col,
+    "marker_col": marker_col,
+}
+
+test_scenarios = [
+
+]
+
+scenario_path_prefix = pathlib.Path(
+    "tests", "fixture_data", "imputation", "mean_of_ratios"
+)
+for scenario_category in ("dev", "methodology"):
+    scenario_type = f"{scenario_category}_scenarios"
+    test_files = glob.glob(str(scenario_path_prefix / scenario_type / "*_input.csv"))
+    test_scenarios += sorted(
+        (
+            (scenario_type, os.path.basename(f).replace("_input.csv", ""))
+            for f in test_files
+        ),
+        key=lambda t: t[1],
+    )
+
+test_scenarios += [
+    (f"back_data_{scenario_type}", scenario_file)
+    for scenario_type, scenario_file in test_scenarios
+    if scenario_type.split("_", 1)[0] in ("dev", "methodology")
+]
+
+
+# --- Test type validation on the input dataframe(s) ---
+
+@pytest.mark.parametrize(
+    "scenario_type, scenario",
+    test_scenarios,
+)
+def test_calculations(fxt_load_test_csv, scenario_type, scenario):
+    scenario_file_type = scenario_type.replace("back_data_", "")
+    scenario_input = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "mean_of_ratios",
+        scenario_file_type,
+        f"{scenario}_input",
+    )
+    scenario_expected_output = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "mean_of_ratios",
+        scenario_file_type,
+        f"{scenario}_output",
+    )
+    imputation_kwargs = params.copy()
+    if forward_col in scenario_input.columns:
+        imputation_kwargs.update(
+            {
+                "forward_link_col": forward_col,
+                "backward_link_col": backward_col,
+                "construction_link_col": construction_col,
+            }
+        )
+
+    if scenario.endswith("filtered"):
+        if "dev" in scenario_type:
+            imputation_kwargs["link_filter"] = "(" + exclude_col + ' == "N")'
+        else:
+            imputation_kwargs["link_filter"] = (
+                "(" + auxiliary_col + " != 71) and (" + target_col + " < 100000)"
+            )
+
+    if scenario_type.startswith("back_data"):
+        min_period_df = scenario_expected_output.selectExpr("min(" + period_col + ")")
+
+        back_data_df = scenario_expected_output.join(
+            min_period_df, [col(period_col) == col("min(" + period_col + ")")]
+        )
+
+        if scenario.endswith("filtered"):
+            if "dev" in scenario_type:
+                back_data_df = back_data_df.join(
+                    scenario_input.select(reference_col, period_col, exclude_col),
+                    [reference_col, period_col],
+                )
+            else:
+                back_data_df = back_data_df.withColumn(target_col, col(output_col))
+
+        imputation_kwargs["back_data_df"] = back_data_df
+
+        scenario_input = scenario_input.join(
+            min_period_df,
+            [col(period_col) == col("min(" + period_col + ")")],
+            "leftanti",
+        ).drop("min(" + period_col + ")")
+
+        scenario_expected_output = scenario_expected_output.join(
+            min_period_df,
+            [col(period_col) == col("min(" + period_col + ")")],
+            "leftanti",
+        ).drop("min(" + period_col + ")")
+
+    # We need to drop our grouping and auxiliary columns from our output now
+    # we've potentially set up our back data as these must not come out of
+    # imputation.
+    scenario_expected_output = scenario_expected_output.drop(
+        grouping_col,
+        auxiliary_col,
+    )
+    scenario_actual_output = mean_of_ratios.impute(
+        input_df=scenario_input, **imputation_kwargs
+    )
+    scenario_actual_output = scenario_actual_output.withColumn(
+        output_col, bround(col(output_col), 6)
+    )
+    scenario_actual_output = scenario_actual_output.withColumn(
+        forward_col, bround(col(forward_col), 6)
+    )
+    scenario_actual_output = scenario_actual_output.withColumn(
+        backward_col, bround(col(backward_col).cast(decimal_type), 6)
+    )
+    scenario_actual_output = scenario_actual_output.withColumn(
+        construction_col, bround(col(construction_col).cast(decimal_type), 6)
+    )
+    select_cols = list(set(dataframe_columns) & set(scenario_expected_output.columns))
+    assert isinstance(scenario_actual_output, type(scenario_input))
+    sort_col_list = [reference_col, period_col]
+    assert_df_equality(
+        scenario_actual_output.sort(sort_col_list).select(select_cols),
+        scenario_expected_output.sort(sort_col_list).select(select_cols),
+        ignore_nullable=True,
+    )

From 03b261bd013d9d24ebe63e8abc62b792d911162b Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 3 Mar 2023 13:42:45 +0000
Subject: [PATCH 118/531] Unit Tests Not Needed

---
 .../unit/imputation_link_counts_input.csv     | 26 -------------------
 .../unit/imputation_link_counts_output.csv    | 26 -------------------
 .../unit/ratio_calculation_input.csv          | 26 -------------------
 .../unit/ratio_calculation_output.csv         | 26 -------------------
 tests/imputation/test_mean_of_ratios.py       |  4 +--
 tests/imputation/test_ratio_of_means.py       |  5 +---
 6 files changed, 2 insertions(+), 111 deletions(-)
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/unit/imputation_link_counts_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/unit/imputation_link_counts_output.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/unit/ratio_calculation_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/unit/ratio_calculation_output.csv

diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/imputation_link_counts_input.csv b/tests/fixture_data/imputation/ratio_of_means/unit/imputation_link_counts_input.csv
deleted file mode 100644
index 78a65784..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/unit/imputation_link_counts_input.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,question,other
-1111,"202105","9000",1464.1,2
-1111,"202104","9000",,2
-1111,"202103","9000",,2
-1111,"202102","9000",1100,2
-1111,"202101","9000",1000,2
-2222,"202105","9000",2928.2,2
-2222,"202104","9000",2662,2
-2222,"202103","9000",2420,2
-2222,"202102","9000",2200,2
-2222,"202101","9000",2000,2
-3333,"202105","9000",4392.3,2
-3333,"202104","9000",3993,2
-3333,"202103","9000",3630,2
-3333,"202102","9000",3300,2
-3333,"202101","9000",3000,2
-4444,"202105","9000",5856.4,2
-4444,"202104","9000",5324,2
-4444,"202103","9000",4840,2
-4444,"202102","9000",4400,2
-4444,"202101","9000",,2
-5555,"202105","9000",7320.5,2
-5555,"202104","9000",6655,2
-5555,"202103","9000",6050,2
-5555,"202102","9000",,2
-5555,"202101","9000",,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/imputation_link_counts_output.csv b/tests/fixture_data/imputation/ratio_of_means/unit/imputation_link_counts_output.csv
deleted file mode 100644
index 5205c15f..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/unit/imputation_link_counts_output.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,count_construction,count_forward,count_backward
-2222,202102,4,3,3
-4444,202101,3,,3
-4444,202102,4,3,3
-5555,202101,3,,3
-3333,202101,3,,3
-4444,202105,5,4,
-5555,202103,4,3,4
-3333,202105,5,4,
-1111,202105,5,4,
-2222,202104,4,4,4
-5555,202102,4,3,3
-1111,202101,3,,3
-4444,202103,4,3,4
-2222,202105,5,4,
-4444,202104,4,4,4
-3333,202103,4,3,4
-2222,202101,3,,3
-1111,202102,4,3,3
-3333,202104,4,4,4
-5555,202104,4,4,4
-2222,202103,4,3,4
-1111,202103,4,3,4
-1111,202104,4,4,4
-5555,202105,5,4,
-3333,202102,4,3,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/ratio_calculation_input.csv b/tests/fixture_data/imputation/ratio_of_means/unit/ratio_calculation_input.csv
deleted file mode 100644
index 9c56cd53..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/unit/ratio_calculation_input.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,question,other
-1111,"202105","9000",1464.1,2
-1111,"202104","9000",1331,2
-1111,"202103","9000",,2
-1111,"202102","9000",1100,2
-1111,"202101","9000",1000,2
-2222,"202105","9000",2928.2,2
-2222,"202104","9000",2662,2
-2222,"202103","9000",2420,2
-2222,"202102","9000",2200,2
-2222,"202101","9000",2000,2
-3333,"202105","9000",4392.3,2
-3333,"202104","9000",3993,2
-3333,"202103","9000",3630,2
-3333,"202102","9000",3300,2
-3333,"202101","9000",3000,2
-4444,"202105","9000",,2
-4444,"202104","9000",5324,2
-4444,"202103","9000",4840,2
-4444,"202102","9000",4400,2
-4444,"202101","9000",4000,2
-5555,"202105","9000",7320.5,2
-5555,"202104","9000",6655,2
-5555,"202103","9000",6050,2
-5555,"202102","9000",5500,2
-5555,"202101","9000",,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/ratio_calculation_output.csv b/tests/fixture_data/imputation/ratio_of_means/unit/ratio_calculation_output.csv
deleted file mode 100644
index fd4e7201..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/unit/ratio_calculation_output.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,other,output,marker,forward,backward,construction
-1111,202101,9000,2.0,1000.0,R,1.0,0.9090909090909091,1250.0
-1111,202102,9000,2.0,1100.0,R,1.1,0.9090909090909091,1650.0
-1111,202103,9000,2.0,1210.0,FIR,1.1,0.9090909090909091,2117.5
-1111,202104,9000,2.0,1331.0,R,1.1,0.9090909090909092,1996.5
-1111,202105,9000,2.0,1464.1,R,1.0999999999999999,1.0,2013.1374999999998
-2222,202101,9000,2.0,2000.0,R,1.0,0.9090909090909091,1250.0
-2222,202102,9000,2.0,2200.0,R,1.1,0.9090909090909091,1650.0
-2222,202103,9000,2.0,2420.0,R,1.1,0.9090909090909091,2117.5
-2222,202104,9000,2.0,2662.0,R,1.1,0.9090909090909092,1996.5
-2222,202105,9000,2.0,2928.2,R,1.0999999999999999,1.0,2013.1374999999998
-3333,202101,9000,2.0,3000.0,R,1.0,0.9090909090909091,1250.0
-3333,202102,9000,2.0,3300.0,R,1.1,0.9090909090909091,1650.0
-3333,202103,9000,2.0,3630.0,R,1.1,0.9090909090909091,2117.5
-3333,202104,9000,2.0,3993.0,R,1.1,0.9090909090909092,1996.5
-3333,202105,9000,2.0,4392.3,R,1.0999999999999999,1.0,2013.1374999999998
-4444,202101,9000,2.0,4000.0,R,1.0,0.9090909090909091,1250.0
-4444,202102,9000,2.0,4400.0,R,1.1,0.9090909090909091,1650.0
-4444,202103,9000,2.0,4840.0,R,1.1,0.9090909090909091,2117.5
-4444,202104,9000,2.0,5324.0,R,1.1,0.9090909090909092,1996.5
-4444,202105,9000,2.0,5856.4,FIR,1.0999999999999999,1.0,2013.1374999999998
-5555,202101,9000,2.0,5000.0,BI,1.0,0.9090909090909091,1250.0
-5555,202102,9000,2.0,5500.0,R,1.1,0.9090909090909091,1650.0
-5555,202103,9000,2.0,6050.0,R,1.1,0.9090909090909091,2117.5
-5555,202104,9000,2.0,6655.0,R,1.1,0.9090909090909092,1996.5
-5555,202105,9000,2.0,7320.5,R,1.0999999999999999,1.0,2013.1374999999998
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index e5b0c1ca..ba3861c7 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -92,9 +92,7 @@
     "marker_col": marker_col,
 }
 
-test_scenarios = [
-
-]
+test_scenarios = []
 
 scenario_path_prefix = pathlib.Path(
     "tests", "fixture_data", "imputation", "mean_of_ratios"
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index bed314dd..8415a90b 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -92,10 +92,7 @@
     "marker_col": marker_col,
 }
 
-test_scenarios = [
-    ("unit", "ratio_calculation"),
-    ("unit", "imputation_link_counts"),
-]
+test_scenarios = []
 
 scenario_path_prefix = pathlib.Path(
     "tests", "fixture_data", "imputation", "ratio_of_means"

From 796e9ef56069d47ac5cc85731bda00f370f4376c Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 3 Mar 2023 14:29:14 +0000
Subject: [PATCH 119/531] Fix mean of ratios input data

---
 .../methodology_scenarios/01_C_input.csv      | 10 +-
 .../methodology_scenarios/02_C_FI_input.csv   | 18 ++--
 .../methodology_scenarios/03_R_R_FI_input.csv | 26 ++---
 .../04_R_R_FI_FI_input.csv                    | 34 +++----
 .../05_R_R_FI_FI_FI_input.csv                 | 42 ++++----
 .../06_BI_BI_R_input.csv                      | 26 ++---
 .../07_BI_BI_R_FI_FI_R_FI_input.csv           | 58 +++++------
 .../methodology_scenarios/08_R_R_R_input.csv  | 26 ++---
 .../methodology_scenarios/09_R_NS_C_input.csv | 24 ++---
 .../10_C_FI_NS_R_input.csv                    | 32 +++----
 .../11_R_R_FI-BI_R_R_input.csv                | 50 +++++-----
 .../12_C_FI_FI_FI_FI_input.csv                | 42 ++++----
 .../13_R_FI_FI_NS_BI_BI_R_input.csv           | 56 +++++------
 .../14_C_FI_FI_NS_BI_BI_R_input.csv           | 56 +++++------
 .../15_BI_BI_R_NS_R_FI_FI_input.csv           | 56 +++++------
 ...I_BI_R_NS_C_FI_FI_zeros_excluded_input.csv | 70 +++++++-------
 ...I_BI_R_NS_C_FI_FI_zeros_included_input.csv | 70 +++++++-------
 .../16_BI_BI_R_NS_C_FI_FI_input.csv           | 56 +++++------
 .../17_NS_R_FI_NS_input.csv                   | 30 +++---
 .../18_NS_BI_R_NS_input.csv                   | 30 +++---
 .../19_link_columns_input.csv                 | 50 +++++-----
 .../20_mixed_data_input.csv                   | 96 +++++++++----------
 .../21_class_change_R_C_FI_input.csv          | 32 +++----
 .../22_class_change_C_BI_R_input.csv          | 32 +++----
 .../23_class_change_C_C_FI_input.csv          | 32 +++----
 .../24_class_change_R_BI_R_input.csv          | 32 +++----
 .../25_class_change_C_FI_FI_input.csv         | 44 ++++-----
 27 files changed, 565 insertions(+), 565 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_input.csv
index 4cd2840e..99626a53 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_input.csv
@@ -1,5 +1,5 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-10001,202001,100,3892,1,,
-10002,202001,100,3873,75,,
-10003,202001,100,5397,13,,
-10004,202001,100,,71,,
+identifier,date,group,question,other
+10001,202001,100,3892,1
+10002,202001,100,3873,75
+10003,202001,100,5397,13
+10004,202001,100,,71
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_input.csv
index 36e08ba0..eeeef1a9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_input.csv
@@ -1,9 +1,9 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-20001,202001,100,2536,35,,
-20001,202002,100,8283,35,,
-20002,202001,100,9113,72,,
-20002,202002,100,2970,72,,
-20003,202001,100,5644,77,,
-20003,202002,100,989,77,,
-20004,202001,100,,30,,
-20004,202002,100,,30,,
+identifier,date,group,question,other
+20001,202001,100,2536,35
+20001,202002,100,8283,35
+20002,202001,100,9113,72
+20002,202002,100,2970,72
+20003,202001,100,5644,77
+20003,202002,100,989,77
+20004,202001,100,,30
+20004,202002,100,,30
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_input.csv
index 3db17d5a..2fd5ae2a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-30001,202001,100,8444,51,,
-30001,202002,100,7476,51,,
-30001,202003,100,2003,51,,
-30002,202001,100,9343,72,,
-30002,202002,100,7818,72,,
-30002,202003,100,4897,72,,
-30003,202001,100,7511,7,,
-30003,202002,100,1761,7,,
-30003,202003,100,6492,7,,
-30004,202001,100,64,81,,
-30004,202002,100,2113,81,,
-30004,202003,100,,81,,
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,,81
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_input.csv
index 5aa86188..1afb33ba 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_input.csv
@@ -1,17 +1,17 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-40001,202001,100,9491,35,,
-40001,202002,100,4783,35,,
-40001,202003,100,7902,35,,
-40001,202004,100,4911,35,,
-40002,202001,100,2095,63,,
-40002,202002,100,442,63,,
-40002,202003,100,3136,63,,
-40002,202004,100,2115,63,,
-40003,202001,100,7863,16,,
-40003,202002,100,8121,16,,
-40003,202003,100,2151,16,,
-40003,202004,100,1377,16,,
-40004,202001,100,5131,78,,
-40004,202002,100,9836,78,,
-40004,202003,100,,78,,
-40004,202004,100,,78,,
+identifier,date,group,question,other
+40001,202001,100,9491,35
+40001,202002,100,4783,35
+40001,202003,100,7902,35
+40001,202004,100,4911,35
+40002,202001,100,2095,63
+40002,202002,100,442,63
+40002,202003,100,3136,63
+40002,202004,100,2115,63
+40003,202001,100,7863,16
+40003,202002,100,8121,16
+40003,202003,100,2151,16
+40003,202004,100,1377,16
+40004,202001,100,5131,78
+40004,202002,100,9836,78
+40004,202003,100,,78
+40004,202004,100,,78
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
index 508a0c89..8220bd06 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
@@ -1,21 +1,21 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-50001,202001,100,6362,59,,
-50001,202002,100,8542,59,,
-50001,202003,100,5623,59,,
-50001,202004,100,7769,59,,
-50001,202005,100,4687,59,,
-50002,202001,100,4851,36,,
-50002,202002,100,8894,36,,
-50002,202003,100,3372,36,,
-50002,202004,100,3522,36,,
-50002,202005,100,2327,36,,
-50003,202001,100,2238,76,,
-50003,202002,100,769,76,,
-50003,202003,100,7722,76,,
-50003,202004,100,6445,76,,
-50003,202005,100,1521,76,,
-50004,202001,100,688,30,,
-50004,202002,100,3245,30,,
-50004,202003,100,,30,,
-50004,202004,100,,30,,
-50004,202005,100,,30,,
+identifier,date,group,question,other
+50001,202001,100,6362,59
+50001,202002,100,8542,59
+50001,202003,100,5623,59
+50001,202004,100,7769,59
+50001,202005,100,4687,59
+50002,202001,100,4851,36
+50002,202002,100,8894,36
+50002,202003,100,3372,36
+50002,202004,100,3522,36
+50002,202005,100,2327,36
+50003,202001,100,2238,76
+50003,202002,100,769,76
+50003,202003,100,7722,76
+50003,202004,100,6445,76
+50003,202005,100,1521,76
+50004,202001,100,688,30
+50004,202002,100,3245,30
+50004,202003,100,,30
+50004,202004,100,,30
+50004,202005,100,,30
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_input.csv
index 56049684..dd22608a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-60001,202001,100,5077,15,,
-60001,202002,100,7830,15,,
-60001,202003,100,1046,15,,
-60002,202001,100,1588,71,,
-60002,202002,100,1213,71,,
-60002,202003,100,3807,71,,
-60003,202001,100,6541,26,,
-60003,202002,100,336,26,,
-60003,202003,100,6351,26,,
-60004,202001,100,,3,,
-60004,202002,100,,3,,
-60004,202003,100,401,3,,
+identifier,date,group,question,other
+60001,202001,100,5077,15
+60001,202002,100,7830,15
+60001,202003,100,1046,15
+60002,202001,100,1588,71
+60002,202002,100,1213,71
+60002,202003,100,3807,71
+60003,202001,100,6541,26
+60003,202002,100,336,26
+60003,202003,100,6351,26
+60004,202001,100,,3
+60004,202002,100,,3
+60004,202003,100,401,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_input.csv
index 79ddb0fb..04eceefa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_input.csv
@@ -1,29 +1,29 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-70001,202001,100,5951,39,,
-70001,202002,100,1814,39,,
-70001,202003,100,734,39,,
-70001,202004,100,96,39,,
-70001,202005,100,9086,39,,
-70001,202006,100,3949,39,,
-70001,202007,100,49,39,,
-70002,202001,100,6705,94,,
-70002,202002,100,48,94,,
-70002,202003,100,5361,94,,
-70002,202004,100,8767,94,,
-70002,202005,100,9214,94,,
-70002,202006,100,7467,94,,
-70002,202007,100,3475,94,,
-70003,202001,100,6153,42,,
-70003,202002,100,7711,42,,
-70003,202003,100,5403,42,,
-70003,202004,100,7445,42,,
-70003,202005,100,7092,42,,
-70003,202006,100,2038,42,,
-70003,202007,100,8768,42,,
-70004,202001,100,,6,,
-70004,202002,100,,6,,
-70004,202003,100,6288,6,,
-70004,202004,100,,6,,
-70004,202005,100,,6,,
-70004,202006,100,5875,6,,
-70004,202007,100,,6,,
+identifier,date,group,question,other
+70001,202001,100,5951,39
+70001,202002,100,1814,39
+70001,202003,100,734,39
+70001,202004,100,96,39
+70001,202005,100,9086,39
+70001,202006,100,3949,39
+70001,202007,100,49,39
+70002,202001,100,6705,94
+70002,202002,100,48,94
+70002,202003,100,5361,94
+70002,202004,100,8767,94
+70002,202005,100,9214,94
+70002,202006,100,7467,94
+70002,202007,100,3475,94
+70003,202001,100,6153,42
+70003,202002,100,7711,42
+70003,202003,100,5403,42
+70003,202004,100,7445,42
+70003,202005,100,7092,42
+70003,202006,100,2038,42
+70003,202007,100,8768,42
+70004,202001,100,,6
+70004,202002,100,,6
+70004,202003,100,6288,6
+70004,202004,100,,6
+70004,202005,100,,6
+70004,202006,100,5875,6
+70004,202007,100,,6
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_input.csv
index e0c1c37c..d962416d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-80001,202001,100,4042,91,,
-80001,202002,100,2805,91,,
-80001,202003,100,644,91,,
-80002,202001,100,7138,85,,
-80002,202002,100,1970,85,,
-80002,202003,100,2746,85,,
-80003,202001,100,2846,41,,
-80003,202002,100,3552,41,,
-80003,202003,100,9015,41,,
-80004,202001,100,5820,70,,
-80004,202002,100,3729,70,,
-80004,202003,100,8233,70,,
+identifier,date,group,question,other
+80001,202001,100,4042,91
+80001,202002,100,2805,91
+80001,202003,100,644,91
+80002,202001,100,7138,85
+80002,202002,100,1970,85
+80002,202003,100,2746,85
+80003,202001,100,2846,41
+80003,202002,100,3552,41
+80003,202003,100,9015,41
+80004,202001,100,5820,70
+80004,202002,100,3729,70
+80004,202003,100,8233,70
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_input.csv
index f873f7b9..67bb269f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_input.csv
@@ -1,12 +1,12 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-90001,202001,100,2417,66,,
-90001,202002,100,7928,66,,
-90001,202003,100,7319,66,,
-90002,202001,100,1706,27,,
-90002,202002,100,1481,27,,
-90002,202003,100,8390,27,,
-90003,202001,100,1069,14,,
-90003,202002,100,8228,14,,
-90003,202003,100,2415,14,,
-90004,202001,100,7728,73,,
-90004,202003,100,,73,,
+identifier,date,group,question,other
+90001,202001,100,2417,66
+90001,202002,100,7928,66
+90001,202003,100,7319,66
+90002,202001,100,1706,27
+90002,202002,100,1481,27
+90002,202003,100,8390,27
+90003,202001,100,1069,14
+90003,202002,100,8228,14
+90003,202003,100,2415,14
+90004,202001,100,7728,73
+90004,202003,100,,73
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_input.csv
index 72cd926e..da7963f6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_input.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-100001,202001,100,3074,26,,
-100001,202002,100,9529,26,,
-100001,202003,100,615,26,,
-100001,202004,100,3540,26,,
-100002,202001,100,8084,19,,
-100002,202002,100,2422,19,,
-100002,202003,100,3058,19,,
-100002,202004,100,5608,19,,
-100003,202001,100,5161,46,,
-100003,202002,100,3648,46,,
-100003,202003,100,205,46,,
-100003,202004,100,2594,46,,
-100004,202001,100,,86,,
-100004,202002,100,,86,,
-100004,202004,100,9352,86,,
+identifier,date,group,question,other
+100001,202001,100,3074,26
+100001,202002,100,9529,26
+100001,202003,100,615,26
+100001,202004,100,3540,26
+100002,202001,100,8084,19
+100002,202002,100,2422,19
+100002,202003,100,3058,19
+100002,202004,100,5608,19
+100003,202001,100,5161,46
+100003,202002,100,3648,46
+100003,202003,100,205,46
+100003,202004,100,2594,46
+100004,202001,100,,86
+100004,202002,100,,86
+100004,202004,100,9352,86
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_input.csv
index 1199473d..97acb466 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_input.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-110001,202001,100,9244,89,,
-110001,202002,100,8916,89,,
-110001,202003,100,6194,89,,
-110002,202001,100,4826,83,,
-110002,202002,100,5903,83,,
-110002,202003,100,4743,83,,
-110003,202001,100,7586,4,,
-110003,202002,100,1016,4,,
-110003,202003,100,1429,4,,
-110004,202001,100,3975,76,,
-110004,202002,100,3044,76,,
-110004,202003,100,,76,,
-110005,202001,200,5217,27,,
-110005,202002,200,7016,27,,
-110005,202003,200,9940,27,,
-110006,202001,200,5325,42,,
-110006,202002,200,7747,42,,
-110006,202003,200,6685,42,,
-110007,202001,200,5496,19,,
-110007,202002,200,1010,19,,
-110007,202003,200,1235,19,,
-110008,202001,200,,43,,
-110008,202002,200,3913,43,,
-110008,202003,200,6013,43,,
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,,76
+110005,202001,200,5217,27
+110005,202002,200,7016,27
+110005,202003,200,9940,27
+110006,202001,200,5325,42
+110006,202002,200,7747,42
+110006,202003,200,6685,42
+110007,202001,200,5496,19
+110007,202002,200,1010,19
+110007,202003,200,1235,19
+110008,202001,200,,43
+110008,202002,200,3913,43
+110008,202003,200,6013,43
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_input.csv
index 62597ee5..17e4f1a9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_input.csv
@@ -1,21 +1,21 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-120001,202001,100,5240,50,,
-120001,202002,100,2490,50,,
-120001,202003,100,3382,50,,
-120001,202004,100,4475,50,,
-120001,202005,100,1316,50,,
-120002,202001,100,7410,78,,
-120002,202002,100,3602,78,,
-120002,202003,100,4972,78,,
-120002,202004,100,8838,78,,
-120002,202005,100,1535,78,,
-120003,202001,100,4530,94,,
-120003,202002,100,7451,94,,
-120003,202003,100,7586,94,,
-120003,202004,100,283,94,,
-120003,202005,100,4416,94,,
-120004,202001,100,,100,,
-120004,202002,100,,100,,
-120004,202003,100,,100,,
-120004,202004,100,,100,,
-120004,202005,100,,100,,
+identifier,date,group,question,other
+120001,202001,100,5240,50
+120001,202002,100,2490,50
+120001,202003,100,3382,50
+120001,202004,100,4475,50
+120001,202005,100,1316,50
+120002,202001,100,7410,78
+120002,202002,100,3602,78
+120002,202003,100,4972,78
+120002,202004,100,8838,78
+120002,202005,100,1535,78
+120003,202001,100,4530,94
+120003,202002,100,7451,94
+120003,202003,100,7586,94
+120003,202004,100,283,94
+120003,202005,100,4416,94
+120004,202001,100,,100
+120004,202002,100,,100
+120004,202003,100,,100
+120004,202004,100,,100
+120004,202005,100,,100
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_input.csv
index 8c65643a..4c3bc9e7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_input.csv
@@ -1,28 +1,28 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-130001,202001,100,6583,20,,
-130001,202002,100,3759,20,,
-130001,202003,100,8256,20,,
-130001,202004,100,6743,20,,
-130001,202005,100,6811,20,,
-130001,202006,100,9896,20,,
-130001,202007,100,3282,20,,
-130002,202001,100,687,69,,
-130002,202002,100,8987,69,,
-130002,202003,100,371,69,,
-130002,202004,100,3385,69,,
-130002,202005,100,6606,69,,
-130002,202006,100,5901,69,,
-130002,202007,100,9834,69,,
-130003,202001,100,7113,39,,
-130003,202002,100,8583,39,,
-130003,202003,100,5129,39,,
-130003,202004,100,2024,39,,
-130003,202005,100,9422,39,,
-130003,202006,100,8710,39,,
-130003,202007,100,6461,39,,
-130004,202001,100,2571,37,,
-130004,202002,100,,37,,
-130004,202003,100,,37,,
-130004,202005,100,,37,,
-130004,202006,100,,37,,
-130004,202007,100,6621,37,,
+identifier,date,group,question,other
+130001,202001,100,6583,20
+130001,202002,100,3759,20
+130001,202003,100,8256,20
+130001,202004,100,6743,20
+130001,202005,100,6811,20
+130001,202006,100,9896,20
+130001,202007,100,3282,20
+130002,202001,100,687,69
+130002,202002,100,8987,69
+130002,202003,100,371,69
+130002,202004,100,3385,69
+130002,202005,100,6606,69
+130002,202006,100,5901,69
+130002,202007,100,9834,69
+130003,202001,100,7113,39
+130003,202002,100,8583,39
+130003,202003,100,5129,39
+130003,202004,100,2024,39
+130003,202005,100,9422,39
+130003,202006,100,8710,39
+130003,202007,100,6461,39
+130004,202001,100,2571,37
+130004,202002,100,,37
+130004,202003,100,,37
+130004,202005,100,,37
+130004,202006,100,,37
+130004,202007,100,6621,37
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_input.csv
index beb2e119..06cd3aa5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_input.csv
@@ -1,28 +1,28 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-140001,202001,100,3582,27,,
-140001,202002,100,4533,27,,
-140001,202003,100,4471,27,,
-140001,202004,100,3040,27,,
-140001,202005,100,8519,27,,
-140001,202006,100,8690,27,,
-140001,202007,100,9979,27,,
-140002,202001,100,5359,83,,
-140002,202002,100,7091,83,,
-140002,202003,100,7098,83,,
-140002,202004,100,7408,83,,
-140002,202005,100,1937,83,,
-140002,202006,100,6711,83,,
-140002,202007,100,1052,83,,
-140003,202001,100,439,89,,
-140003,202002,100,7783,89,,
-140003,202003,100,897,89,,
-140003,202004,100,8477,89,,
-140003,202005,100,2207,89,,
-140003,202006,100,9889,89,,
-140003,202007,100,2528,89,,
-140004,202001,100,,28,,
-140004,202002,100,,28,,
-140004,202003,100,,28,,
-140004,202005,100,,28,,
-140004,202006,100,,28,,
-140004,202007,100,7243,28,,
+identifier,date,group,question,other
+140001,202001,100,3582,27
+140001,202002,100,4533,27
+140001,202003,100,4471,27
+140001,202004,100,3040,27
+140001,202005,100,8519,27
+140001,202006,100,8690,27
+140001,202007,100,9979,27
+140002,202001,100,5359,83
+140002,202002,100,7091,83
+140002,202003,100,7098,83
+140002,202004,100,7408,83
+140002,202005,100,1937,83
+140002,202006,100,6711,83
+140002,202007,100,1052,83
+140003,202001,100,439,89
+140003,202002,100,7783,89
+140003,202003,100,897,89
+140003,202004,100,8477,89
+140003,202005,100,2207,89
+140003,202006,100,9889,89
+140003,202007,100,2528,89
+140004,202001,100,,28
+140004,202002,100,,28
+140004,202003,100,,28
+140004,202005,100,,28
+140004,202006,100,,28
+140004,202007,100,7243,28
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_input.csv
index ac04a110..6a4e0f23 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_input.csv
@@ -1,28 +1,28 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-150001,202001,100,5891,15,,
-150001,202002,100,4581,15,,
-150001,202003,100,4741,15,,
-150001,202004,100,8092,15,,
-150001,202005,100,2727,15,,
-150001,202006,100,2363,15,,
-150001,202007,100,9549,15,,
-150002,202001,100,8611,5,,
-150002,202002,100,9383,5,,
-150002,202003,100,1064,5,,
-150002,202004,100,7419,5,,
-150002,202005,100,9967,5,,
-150002,202006,100,1393,5,,
-150002,202007,100,2593,5,,
-150003,202001,100,3426,79,,
-150003,202002,100,6246,79,,
-150003,202003,100,8402,79,,
-150003,202004,100,3891,79,,
-150003,202005,100,5463,79,,
-150003,202006,100,6852,79,,
-150003,202007,100,2959,79,,
-150004,202001,100,,69,,
-150004,202002,100,,69,,
-150004,202003,100,4208,69,,
-150004,202005,100,2818,69,,
-150004,202006,100,,69,,
-150004,202007,100,,69,,
+identifier,date,group,question,other
+150001,202001,100,5891,15
+150001,202002,100,4581,15
+150001,202003,100,4741,15
+150001,202004,100,8092,15
+150001,202005,100,2727,15
+150001,202006,100,2363,15
+150001,202007,100,9549,15
+150002,202001,100,8611,5
+150002,202002,100,9383,5
+150002,202003,100,1064,5
+150002,202004,100,7419,5
+150002,202005,100,9967,5
+150002,202006,100,1393,5
+150002,202007,100,2593,5
+150003,202001,100,3426,79
+150003,202002,100,6246,79
+150003,202003,100,8402,79
+150003,202004,100,3891,79
+150003,202005,100,5463,79
+150003,202006,100,6852,79
+150003,202007,100,2959,79
+150004,202001,100,,69
+150004,202002,100,,69
+150004,202003,100,4208,69
+150004,202005,100,2818,69
+150004,202006,100,,69
+150004,202007,100,,69
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
index 4698b1a4..5e7011a8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
@@ -1,35 +1,35 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-160001,202001,100,2086,76,,
-160001,202002,100,4154,76,,
-160001,202003,100,1610,76,,
-160001,202004,100,3600,76,,
-160001,202005,100,6317,76,,
-160001,202006,100,5703,76,,
-160001,202007,100,1666,76,,
-160002,202001,100,430,32,,
-160002,202002,100,9669,32,,
-160002,202003,100,1748,32,,
-160002,202004,100,2380,32,,
-160002,202005,100,7871,32,,
-160002,202006,100,8806,32,,
-160002,202007,100,2678,32,,
-160003,202001,100,3232,85,,
-160003,202002,100,6342,85,,
-160003,202003,100,2988,85,,
-160003,202004,100,860,85,,
-160003,202005,100,9227,85,,
-160003,202006,100,2393,85,,
-160003,202007,100,9508,85,,
-160004,202001,100,0,42,,
-160004,202002,100,0,42,,
-160004,202003,100,0,42,,
-160004,202004,100,0,42,,
-160004,202005,100,0,42,,
-160004,202006,100,0,42,,
-160004,202007,100,0,42,,
-160005,202001,100,,33,,
-160005,202002,100,,33,,
-160005,202003,100,1129,33,,
-160005,202005,100,,33,,
-160005,202006,100,,33,,
-160005,202007,100,,33,,
+identifier,date,group,question,other
+160001,202001,100,2086,76
+160001,202002,100,4154,76
+160001,202003,100,1610,76
+160001,202004,100,3600,76
+160001,202005,100,6317,76
+160001,202006,100,5703,76
+160001,202007,100,1666,76
+160002,202001,100,430,32
+160002,202002,100,9669,32
+160002,202003,100,1748,32
+160002,202004,100,2380,32
+160002,202005,100,7871,32
+160002,202006,100,8806,32
+160002,202007,100,2678,32
+160003,202001,100,3232,85
+160003,202002,100,6342,85
+160003,202003,100,2988,85
+160003,202004,100,860,85
+160003,202005,100,9227,85
+160003,202006,100,2393,85
+160003,202007,100,9508,85
+160004,202001,100,0,42
+160004,202002,100,0,42
+160004,202003,100,0,42
+160004,202004,100,0,42
+160004,202005,100,0,42
+160004,202006,100,0,42
+160004,202007,100,0,42
+160005,202001,100,,33
+160005,202002,100,,33
+160005,202003,100,1129,33
+160005,202005,100,,33
+160005,202006,100,,33
+160005,202007,100,,33
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
index 4698b1a4..5e7011a8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
@@ -1,35 +1,35 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-160001,202001,100,2086,76,,
-160001,202002,100,4154,76,,
-160001,202003,100,1610,76,,
-160001,202004,100,3600,76,,
-160001,202005,100,6317,76,,
-160001,202006,100,5703,76,,
-160001,202007,100,1666,76,,
-160002,202001,100,430,32,,
-160002,202002,100,9669,32,,
-160002,202003,100,1748,32,,
-160002,202004,100,2380,32,,
-160002,202005,100,7871,32,,
-160002,202006,100,8806,32,,
-160002,202007,100,2678,32,,
-160003,202001,100,3232,85,,
-160003,202002,100,6342,85,,
-160003,202003,100,2988,85,,
-160003,202004,100,860,85,,
-160003,202005,100,9227,85,,
-160003,202006,100,2393,85,,
-160003,202007,100,9508,85,,
-160004,202001,100,0,42,,
-160004,202002,100,0,42,,
-160004,202003,100,0,42,,
-160004,202004,100,0,42,,
-160004,202005,100,0,42,,
-160004,202006,100,0,42,,
-160004,202007,100,0,42,,
-160005,202001,100,,33,,
-160005,202002,100,,33,,
-160005,202003,100,1129,33,,
-160005,202005,100,,33,,
-160005,202006,100,,33,,
-160005,202007,100,,33,,
+identifier,date,group,question,other
+160001,202001,100,2086,76
+160001,202002,100,4154,76
+160001,202003,100,1610,76
+160001,202004,100,3600,76
+160001,202005,100,6317,76
+160001,202006,100,5703,76
+160001,202007,100,1666,76
+160002,202001,100,430,32
+160002,202002,100,9669,32
+160002,202003,100,1748,32
+160002,202004,100,2380,32
+160002,202005,100,7871,32
+160002,202006,100,8806,32
+160002,202007,100,2678,32
+160003,202001,100,3232,85
+160003,202002,100,6342,85
+160003,202003,100,2988,85
+160003,202004,100,860,85
+160003,202005,100,9227,85
+160003,202006,100,2393,85
+160003,202007,100,9508,85
+160004,202001,100,0,42
+160004,202002,100,0,42
+160004,202003,100,0,42
+160004,202004,100,0,42
+160004,202005,100,0,42
+160004,202006,100,0,42
+160004,202007,100,0,42
+160005,202001,100,,33
+160005,202002,100,,33
+160005,202003,100,1129,33
+160005,202005,100,,33
+160005,202006,100,,33
+160005,202007,100,,33
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv
index 2a16421e..2e4136e4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv
@@ -1,28 +1,28 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-160001,202001,100,2086,76,,
-160001,202002,100,4154,76,,
-160001,202003,100,1610,76,,
-160001,202004,100,3600,76,,
-160001,202005,100,6317,76,,
-160001,202006,100,5703,76,,
-160001,202007,100,1666,76,,
-160002,202001,100,430,32,,
-160002,202002,100,9669,32,,
-160002,202003,100,1748,32,,
-160002,202004,100,2380,32,,
-160002,202005,100,7871,32,,
-160002,202006,100,8806,32,,
-160002,202007,100,2678,32,,
-160003,202001,100,3232,85,,
-160003,202002,100,6342,85,,
-160003,202003,100,2988,85,,
-160003,202004,100,860,85,,
-160003,202005,100,9227,85,,
-160003,202006,100,2393,85,,
-160003,202007,100,9508,85,,
-160004,202001,100,,33,,
-160004,202002,100,,33,,
-160004,202003,100,1129,33,,
-160004,202005,100,,33,,
-160004,202006,100,,33,,
-160004,202007,100,,33,,
+identifier,date,group,question,other
+160001,202001,100,2086,76
+160001,202002,100,4154,76
+160001,202003,100,1610,76
+160001,202004,100,3600,76
+160001,202005,100,6317,76
+160001,202006,100,5703,76
+160001,202007,100,1666,76
+160002,202001,100,430,32
+160002,202002,100,9669,32
+160002,202003,100,1748,32
+160002,202004,100,2380,32
+160002,202005,100,7871,32
+160002,202006,100,8806,32
+160002,202007,100,2678,32
+160003,202001,100,3232,85
+160003,202002,100,6342,85
+160003,202003,100,2988,85
+160003,202004,100,860,85
+160003,202005,100,9227,85
+160003,202006,100,2393,85
+160003,202007,100,9508,85
+160004,202001,100,,33
+160004,202002,100,,33
+160004,202003,100,1129,33
+160004,202005,100,,33
+160004,202006,100,,33
+160004,202007,100,,33
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_input.csv
index 853337da..8518320c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_input.csv
@@ -1,15 +1,15 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-170001,202001,100,6480,69,,
-170001,202002,100,9912,69,,
-170001,202003,100,603,69,,
-170001,202004,100,7120,69,,
-170002,202001,100,449,62,,
-170002,202002,100,3692,62,,
-170002,202003,100,8401,62,,
-170002,202004,100,6745,62,,
-170003,202001,100,1961,81,,
-170003,202002,100,7833,81,,
-170003,202003,100,9761,81,,
-170003,202004,100,9250,81,,
-170004,202002,100,3913,9,,
-170004,202003,100,,9,,
+identifier,date,group,question,other
+170001,202001,100,6480,69
+170001,202002,100,9912,69
+170001,202003,100,603,69
+170001,202004,100,7120,69
+170002,202001,100,449,62
+170002,202002,100,3692,62
+170002,202003,100,8401,62
+170002,202004,100,6745,62
+170003,202001,100,1961,81
+170003,202002,100,7833,81
+170003,202003,100,9761,81
+170003,202004,100,9250,81
+170004,202002,100,3913,9
+170004,202003,100,,9
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_input.csv
index 3a3dffb6..eb581494 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_input.csv
@@ -1,15 +1,15 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-180001,202001,100,9188,91,,
-180001,202002,100,6853,91,,
-180001,202003,100,2418,91,,
-180001,202004,100,9291,91,,
-180002,202001,100,3829,26,,
-180002,202002,100,7588,26,,
-180002,202003,100,7335,26,,
-180002,202004,100,8415,26,,
-180003,202001,100,3774,19,,
-180003,202002,100,8136,19,,
-180003,202003,100,4209,19,,
-180003,202004,100,6168,19,,
-180004,202002,100,,26,,
-180004,202003,100,6099,26,,
+identifier,date,group,question,other
+180001,202001,100,9188,91
+180001,202002,100,6853,91
+180001,202003,100,2418,91
+180001,202004,100,9291,91
+180002,202001,100,3829,26
+180002,202002,100,7588,26
+180002,202003,100,7335,26
+180002,202004,100,8415,26
+180003,202001,100,3774,19
+180003,202002,100,8136,19
+180003,202003,100,4209,19
+180003,202004,100,6168,19
+180004,202002,100,,26
+180004,202003,100,6099,26
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
index ae036a0d..1b34ed38 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,lower_trim,upper_trim,forward,backward,construction
-190001,202001,100,9261,95,,,,0.9214,50.3694
-190001,202002,100,4996,95,,,0.8521,1.5274,121.4187
-190001,202003,100,1480,95,,,0.9685,1.8795,89.3761
-190001,202004,100,4350,95,,,1.113,,110.5473
-190002,202001,100,2433,17,,,,0.9214,50.3694
-190002,202002,100,4324,17,,,0.8521,1.5274,121.4187
-190002,202003,100,6598,17,,,0.9685,1.8795,89.3761
-190002,202004,100,700,17,,,1.113,,110.5473
-190003,202001,100,7888,64,,,,0.9214,50.3694
-190003,202002,100,4218,64,,,0.8521,1.5274,121.4187
-190003,202003,100,7591,64,,,0.9685,1.8795,89.3761
-190003,202004,100,4077,64,,,1.113,,110.5473
-190004,202001,100,2247,51,,,,0.9214,50.3694
-190004,202002,100,,51,,,0.8521,1.5274,121.4187
-190004,202003,100,,51,,,0.9685,1.8795,89.3761
-190004,202004,100,8608,51,,,1.113,,110.5473
-190005,202001,100,,34,,,,0.9214,50.3694
-190005,202002,100,,34,,,0.8521,1.5274,121.4187
-190005,202003,100,4456,34,,,0.9685,1.8795,89.3761
-190005,202004,100,5134,34,,,1.113,,110.5473
-190006,202001,100,,8,,,,0.9214,50.3694
-190006,202002,100,,8,,,0.8521,1.5274,121.4187
-190006,202003,100,,8,,,0.9685,1.8795,89.3761
-190006,202004,100,,8,,,1.113,,110.5473
+identifier,date,group,question,other
+190001,202001,100,9261,95
+190001,202002,100,4996,95
+190001,202003,100,1480,95
+190001,202004,100,4350,95
+190002,202001,100,2433,17
+190002,202002,100,4324,17
+190002,202003,100,6598,17
+190002,202004,100,700,17
+190003,202001,100,7888,64
+190003,202002,100,4218,64
+190003,202003,100,7591,64
+190003,202004,100,4077,64
+190004,202001,100,2247,51
+190004,202002,100,,51
+190004,202003,100,,51
+190004,202004,100,8608,51
+190005,202001,100,,34
+190005,202002,100,,34
+190005,202003,100,4456,34
+190005,202004,100,5134,34
+190006,202001,100,,8
+190006,202002,100,,8
+190006,202003,100,,8
+190006,202004,100,,8
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_input.csv
index e023da16..fd7a4707 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_input.csv
@@ -1,48 +1,48 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-200001,202001,100,7788,56,,
-200001,202002,100,6169,56,,
-200001,202003,100,6156,56,,
-200001,202004,100,1577,56,,
-200002,202001,100,6533,75,,
-200002,202002,100,8103,75,,
-200002,202003,100,5860,75,,
-200002,202004,100,2575,75,,
-200003,202001,100,56,10,,
-200003,202002,100,4978,10,,
-200003,202003,100,8777,10,,
-200003,202004,100,906,10,,
-200004,202001,100,1884,86,,
-200004,202002,100,6075,86,,
-200004,202003,100,,86,,
-200004,202004,100,,86,,
-200005,202001,100,,6,,
-200005,202002,100,,6,,
-200005,202003,100,,6,,
-200005,202004,100,,6,,
-200006,202001,100,,41,,
-200006,202002,100,,41,,
-200006,202003,100,8882,41,,
-200006,202004,100,2711,41,,
-200007,202001,200,2439,4,,
-200007,202002,200,9675,4,,
-200007,202003,200,7003,4,,
-200007,202004,200,595,4,,
-200008,202001,200,1849,4,,
-200008,202002,200,6436,4,,
-200008,202003,200,9709,4,,
-200008,202004,200,2727,4,,
-200009,202001,200,8742,45,,
-200009,202002,200,1469,45,,
-200009,202003,200,8602,45,,
-200009,202004,200,1945,45,,
-200010,202001,200,,85,,
-200010,202002,200,6489,85,,
-200010,202003,200,1796,85,,
-200010,202004,200,,85,,
-200011,202001,200,,79,,
-200011,202002,200,1926,79,,
-200011,202004,200,,79,,
-200012,202001,200,5495,87,,
-200012,202002,200,,87,,
-200012,202003,200,,87,,
-200012,202004,200,,87,,
+identifier,date,group,question,other
+200001,202001,100,7788,56
+200001,202002,100,6169,56
+200001,202003,100,6156,56
+200001,202004,100,1577,56
+200002,202001,100,6533,75
+200002,202002,100,8103,75
+200002,202003,100,5860,75
+200002,202004,100,2575,75
+200003,202001,100,56,10
+200003,202002,100,4978,10
+200003,202003,100,8777,10
+200003,202004,100,906,10
+200004,202001,100,1884,86
+200004,202002,100,6075,86
+200004,202003,100,,86
+200004,202004,100,,86
+200005,202001,100,,6
+200005,202002,100,,6
+200005,202003,100,,6
+200005,202004,100,,6
+200006,202001,100,,41
+200006,202002,100,,41
+200006,202003,100,8882,41
+200006,202004,100,2711,41
+200007,202001,200,2439,4
+200007,202002,200,9675,4
+200007,202003,200,7003,4
+200007,202004,200,595,4
+200008,202001,200,1849,4
+200008,202002,200,6436,4
+200008,202003,200,9709,4
+200008,202004,200,2727,4
+200009,202001,200,8742,45
+200009,202002,200,1469,45
+200009,202003,200,8602,45
+200009,202004,200,1945,45
+200010,202001,200,,85
+200010,202002,200,6489,85
+200010,202003,200,1796,85
+200010,202004,200,,85
+200011,202001,200,,79
+200011,202002,200,1926,79
+200011,202004,200,,79
+200012,202001,200,5495,87
+200012,202002,200,,87
+200012,202003,200,,87
+200012,202004,200,,87
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_input.csv
index dc4f10ab..f8a0a4ad 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_input.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-210001,202001,1,547,10,,
-210001,202002,1,362,10,,
-210001,202003,1,895,10,,
-210002,202001,1,381,50,,
-210002,202002,1,573,50,,
-210002,202003,1,214,50,,
-210003,202001,2,961,12,,
-210003,202002,2,267,12,,
-210003,202003,2,314,12,,
-210004,202001,2,555,9,,
-210004,202002,2,628,9,,
-210004,202003,2,736,9,,
-210005,202001,1,100,18,,
-210005,202002,2,,18,,
-210005,202003,2,,18,,
+identifier,date,group,question,other
+210001,202001,1,547,10
+210001,202002,1,362,10
+210001,202003,1,895,10
+210002,202001,1,381,50
+210002,202002,1,573,50
+210002,202003,1,214,50
+210003,202001,2,961,12
+210003,202002,2,267,12
+210003,202003,2,314,12
+210004,202001,2,555,9
+210004,202002,2,628,9
+210004,202003,2,736,9
+210005,202001,1,100,18
+210005,202002,2,,18
+210005,202003,2,,18
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_input.csv
index 5be5ff20..19b0ef27 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_input.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-220001,202001,1,547,10,,
-220001,202002,1,362,10,,
-220001,202003,1,895,10,,
-220002,202001,1,381,50,,
-220002,202002,1,573,50,,
-220002,202003,1,214,50,,
-220003,202001,2,961,12,,
-220003,202002,2,267,12,,
-220003,202003,2,314,12,,
-220004,202001,2,555,9,,
-220004,202002,2,628,9,,
-220004,202003,2,736,9,,
-220005,202001,1,,18,,
-220005,202002,2,,18,,
-220005,202003,2,100,18,,
+identifier,date,group,question,other
+220001,202001,1,547,10
+220001,202002,1,362,10
+220001,202003,1,895,10
+220002,202001,1,381,50
+220002,202002,1,573,50
+220002,202003,1,214,50
+220003,202001,2,961,12
+220003,202002,2,267,12
+220003,202003,2,314,12
+220004,202001,2,555,9
+220004,202002,2,628,9
+220004,202003,2,736,9
+220005,202001,1,,18
+220005,202002,2,,18
+220005,202003,2,100,18
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_input.csv
index 8fa66f24..83af97d0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_input.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-230001,202001,1,547,10,,
-230001,202002,1,362,10,,
-230001,202003,1,895,10,,
-230002,202001,1,381,50,,
-230002,202002,1,573,50,,
-230002,202003,1,214,50,,
-230003,202001,2,961,12,,
-230003,202002,2,267,12,,
-230003,202003,2,314,12,,
-230004,202001,2,555,9,,
-230004,202002,2,628,9,,
-230004,202003,2,736,9,,
-230005,202001,1,,18,,
-230005,202002,2,,18,,
-230005,202003,2,,18,,
+identifier,date,group,question,other
+230001,202001,1,547,10
+230001,202002,1,362,10
+230001,202003,1,895,10
+230002,202001,1,381,50
+230002,202002,1,573,50
+230002,202003,1,214,50
+230003,202001,2,961,12
+230003,202002,2,267,12
+230003,202003,2,314,12
+230004,202001,2,555,9
+230004,202002,2,628,9
+230004,202003,2,736,9
+230005,202001,1,,18
+230005,202002,2,,18
+230005,202003,2,,18
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_input.csv
index 7c3d0e06..5914e262 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_input.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-240001,202001,1,547,10,,
-240001,202002,1,362,10,,
-240001,202003,1,895,10,,
-240002,202001,1,381,50,,
-240002,202002,1,573,50,,
-240002,202003,1,214,50,,
-240003,202001,2,961,12,,
-240003,202002,2,267,12,,
-240003,202003,2,314,12,,
-240004,202001,2,555,9,,
-240004,202002,2,628,9,,
-240004,202003,2,736,9,,
-240005,202001,1,100,18,,
-240005,202002,2,,18,,
-240005,202003,2,150,18,,
+identifier,date,group,question,other
+240001,202001,1,547,10
+240001,202002,1,362,10
+240001,202003,1,895,10
+240002,202001,1,381,50
+240002,202002,1,573,50
+240002,202003,1,214,50
+240003,202001,2,961,12
+240003,202002,2,267,12
+240003,202003,2,314,12
+240004,202001,2,555,9
+240004,202002,2,628,9
+240004,202003,2,736,9
+240005,202001,1,100,18
+240005,202002,2,,18
+240005,202003,2,150,18
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_input.csv
index b9a994d5..ec8eda09 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_input.csv
@@ -1,22 +1,22 @@
-identifier,date,group,question,other,lower_trim,upper_trim
-250001,202001,1,547,10,,
-250001,202002,1,362,10,,
-250001,202003,1,895,10,,
-250002,202001,1,381,50,,
-250002,202002,1,573,50,,
-250002,202003,1,214,50,,
-250003,202001,2,961,12,,
-250003,202002,2,267,12,,
-250003,202003,2,314,12,,
-250004,202001,2,555,9,,
-250004,202002,2,628,9,,
-250004,202003,2,736,9,,
-250005,202001,1,100,18,,
-250005,202002,2,310,18,,
-250005,202003,2,240,18,,
-250006,202001,1,,22,,
-250006,202002,1,,22,,
-250006,202003,1,,22,,
-250007,202001,2,,52,,
-250007,202002,2,,52,,
-250007,202003,2,,52,,
+identifier,date,group,question,other
+250001,202001,1,547,10
+250001,202002,1,362,10
+250001,202003,1,895,10
+250002,202001,1,381,50
+250002,202002,1,573,50
+250002,202003,1,214,50
+250003,202001,2,961,12
+250003,202002,2,267,12
+250003,202003,2,314,12
+250004,202001,2,555,9
+250004,202002,2,628,9
+250004,202003,2,736,9
+250005,202001,1,100,18
+250005,202002,2,310,18
+250005,202003,2,240,18
+250006,202001,1,,22
+250006,202002,1,,22
+250006,202003,1,,22
+250007,202001,2,,52
+250007,202002,2,,52
+250007,202003,2,,52

From 044fd2e99c2c67592b3a2687c647b663838e64f8 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 3 Mar 2023 14:30:45 +0000
Subject: [PATCH 120/531] Mean of ratios method fixes

---
 .../imputation/mean_of_ratios.py              | 190 ++++++++++--------
 1 file changed, 109 insertions(+), 81 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index cafd6a4a..4c3d6787 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -1,6 +1,7 @@
 # For Copyright information, please see LICENCE.
-
-from typing import List, Number, Optional
+from decimal import Decimal
+from numbers import Number
+from typing import List, Optional
 
 from pyspark.sql import DataFrame
 from pyspark.sql.functions import col, expr, when
@@ -16,11 +17,12 @@ def impute(
     **kwargs
 ) -> DataFrame:
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        growth_df = df.selectExpr(
+        working_df = df.selectExpr(
             "period",
             "grouping",
             "ref",
             "aux",
+            "current.output",
             """CASE
                 WHEN previous.output = 0
                 THEN 1
@@ -33,99 +35,125 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
             END AS growth_backward""",
         )
 
-        ratio_df = (
-            growth_df.join(
-                (
-                    growth_df.groupBy("period", "grouping")
-                    .agg(
-                        expr(
+        if lower_trim is not None:
+            trimmed_df = (
+                working_df.join(
+                    (
+                        working_df.groupBy("period", "grouping")
+                        .agg(
+                            expr(
+                                """
+                                sum(
+                                    cast(growth_forward IS NOT NULL AS integer)
+                                ) AS count_forward
                             """
-                            sum(
-                                cast(growth_forward IS NOT NULL AS integer)
-                            ) AS count_forward
-                        """
-                        ),
-                        expr(
+                            ),
+                            expr(
+                                """
+                                sum(
+                                    cast(growth_backward IS NOT NULL AS integer)
+                                ) AS count_backward
                             """
-                            sum(
-                                cast(growth_backward IS NOT NULL AS integer)
-                            ) AS count_backward
+                            ),
+                        )
+                        .select(
+                            col("period"),
+                            col("grouping"),
+                            (col("count_forward") * Decimal(lower_trim) / 100).alias(
+                                "lower_forward"
+                            ),
+                            (col("count_forward") * (100 - Decimal(upper_trim)) / 100).alias(
+                                "upper_forward"
+                            ),
+                            (col("count_backward") * Decimal(lower_trim) / 100).alias(
+                                "lower_backward"
+                            ),
+                            (col("count_backward") * (100 - Decimal(upper_trim)) / 100).alias(
+                                "upper_backward"
+                            ),
+                        )
+                    ),
+                    ["period", "grouping"],
+                )
+                .withColumn(
+                    "num_forward",
+                    expr(
                         """
-                        ),
-                    )
-                    .select(
-                        col("period"),
-                        col("grouping"),
-                        (col("count_forward") * decimal(lower_trim) / 100).alias(
-                            "lower_forward"
-                        ),
-                        (col("count_forward") * (100 - decimal(upper_trim)) / 100).alias(
-                            "upper_forward"
-                        ),
-                        (col("count_backward") * decimal(lower_trim) / 100).alias(
-                            "lower_backward"
-                        ),
-                        (col("count_backward") * (100 - decimal(upper_trim)) / 100).alias(
-                            "upper_backward"
-                        ),
-                    )
-                ),
-                ["period", "grouping"],
-            )
-            .withColumn(
-                "num_forward",
-                expr(
-                    """
-                    row_number() OVER (
-                        PARTITION BY period, grouping
-                        ORDER BY growth_forward ASC
-                    )
-                """
-                ),
-            )
-            .withColumn(
-                "num_backward",
-                expr(
-                    """
-                    row_number() OVER (
-                        PARTITION BY period, grouping
-                        ORDER BY growth_backward ASC
-                    )
-                """
-                ),
-            )
-            .select(
-                col("period"),
-                col("grouping"),
-                when(
-                    (
-                        col("num_forward").between(
-                            col("lower_forward"), col("upper_forward")
+                        row_number() OVER (
+                            PARTITION BY period, grouping
+                            ORDER BY growth_forward ASC
                         )
-                        | trim_threshold
-                        >= col("count_forward")
+                    """
                     ),
-                    col("growth_forward"),
-                ).alias("trimmed_forward"),
-                when(
-                    (
-                        col("num_backward").between(
-                            col("lower_backward"), col("upper_backward")
+                )
+                .withColumn(
+                    "num_backward",
+                    expr(
+                        """
+                        row_number() OVER (
+                            PARTITION BY period, grouping
+                            ORDER BY growth_backward ASC
                         )
-                        | trim_threshold
-                        >= col("count_backward")
+                    """
                     ),
-                    col("growth_backward"),
-                ).alias("trimmed_backward"),
+                )
+                .select(
+                    col("period"),
+                    col("grouping"),
+                    when(
+                        (
+                            col("num_forward").between(
+                                col("lower_forward"), col("upper_forward")
+                            )
+                            | trim_threshold
+                            >= col("count_forward")
+                        ),
+                        col("growth_forward"),
+                    ).alias("trimmed_forward"),
+                    when(
+                        (
+                            col("num_backward").between(
+                                col("lower_backward"), col("upper_backward")
+                            )
+                            | trim_threshold
+                            >= col("count_backward")
+                        ),
+                        col("growth_backward"),
+                    ).alias("trimmed_backward"),
+                )
             )
-            .groupBy("period", "grouping")
+
+        else:
+            trimmed_df = (
+                working_df.withColumn(
+                    "trimmed_forward",
+                    col("growth_forward")
+                )
+                .withColumn(
+                    "trimmed_backward",
+                    col("growth_backward")
+                )
+            )
+
+        ratio_df = (
+            trimmed_df.groupBy("period", "grouping")
             .agg(
                 expr("mean(trimmed_forward) AS forward"),
                 expr("mean(trimmed_backward) AS backward"),
                 expr("sum(current.output)/sum(aux) AS construction"),
+                expr("count(trimmed_forward) AS count_forward"),
+                expr("count(trimmed_backward) AS count_backward"),
+                expr("count(current.output) AS count_construction"),
             )
         )
 
+        growth_df = working_df.select(
+            "ref",
+            "period",
+            "grouping",
+            "growth_forward",
+            "growth_backward"
+        )
         return [
             engine.RatioCalculationResult(
                 data=growth_df,

From 940d5782c32ed7cfaf974dae5f952a8c762a157f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 3 Mar 2023 14:41:29 +0000
Subject: [PATCH 121/531] Fix output data for mean of ratio

---
 .../methodology_scenarios/01_C_output.csv     | 10 +-
 .../methodology_scenarios/02_C_FI_output.csv  | 18 ++--
 .../03_R_R_FI_output.csv                      | 26 ++---
 .../04_R_R_FI_FI_output.csv                   | 34 +++----
 .../05_R_R_FI_FI_FI_output.csv                | 42 ++++----
 .../06_BI_BI_R_output.csv                     | 26 ++---
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          | 58 +++++------
 .../methodology_scenarios/08_R_R_R_output.csv | 26 ++---
 .../09_R_NS_C_output.csv                      | 24 ++---
 .../10_C_FI_NS_R_output.csv                   | 32 +++----
 .../11_R_R_FI-BI_R_R_output.csv               | 50 +++++-----
 .../12_C_FI_FI_FI_FI_output.csv               | 42 ++++----
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          | 56 +++++------
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          | 56 +++++------
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          | 56 +++++------
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv | 70 +++++++-------
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv | 70 +++++++-------
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          | 56 +++++------
 .../17_NS_R_FI_NS_output.csv                  | 30 +++---
 .../18_NS_BI_R_NS_output.csv                  | 30 +++---
 .../19_link_columns_output.csv                | 50 +++++-----
 .../20_mixed_data_output.csv                  | 96 +++++++++----------
 .../21_class_change_R_C_FI_output.csv         | 32 +++----
 .../22_class_change_C_BI_R_output.csv         | 32 +++----
 .../23_class_change_C_C_FI_output.csv         | 32 +++----
 .../24_class_change_R_BI_R_output.csv         | 32 +++----
 .../25_class_change_C_FI_FI_output.csv        | 44 ++++-----
 27 files changed, 565 insertions(+), 565 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index f4f6bee6..2d3f6cd3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,100,,1,,,,,,,147.8876404,3892,R,,,3
-10002,202001,100,,75,,,,,,,147.8876404,3873,R,,,3
-10003,202001,100,,13,,,,,,,147.8876404,5397,R,,,3
-10004,202001,100,,71,,,,,,,147.8876404,10500.02247,C,,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+10001,202001,100,1,3892,,,,,147.8876404,,,3,R
+10002,202001,100,75,3873,,,,,147.8876404,,,3,R
+10003,202001,100,13,5397,,,,,147.8876404,,,3,R
+10004,202001,100,71,10500.02247,,,,,147.8876404,,,3,C
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 1bedc9e6..b96d633d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-20001,202001,100,2536,35,,,,0.306169262,,3.027097983,93.98369565,2536,R,,3,3
-20001,202002,100,8283,35,,,3.266167192,,1.255768523,,66.5326087,8283,R,3,,3
-20002,202001,100,9113,72,,,,3.068350168,,3.027097983,93.98369565,9113,R,,3,3
-20002,202002,100,2970,72,,,0.325908043,,1.255768523,,66.5326087,2970,R,3,,3
-20003,202001,100,5644,77,,,,5.70677452,,3.027097983,93.98369565,5644,R,,3,3
-20003,202002,100,989,77,,,0.175230333,,1.255768523,,66.5326087,989,R,3,,3
-20004,202001,100,,30,,,,,,3.027097983,93.98369565,2819.51087,C,,3,3
-20004,202002,100,,30,,,,,1.255768523,,66.5326087,3540.653,FIC,3,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+20001,202001,100,35,2536,,0.306169262,,3.027097983,93.98369565,,3,3,R
+20001,202002,100,35,8283,3.266167192,,1.255768523,,66.5326087,3,,3,R
+20002,202001,100,72,9113,,3.068350168,,3.027097983,93.98369565,,3,3,R
+20002,202002,100,72,2970,0.325908043,,1.255768523,,66.5326087,3,,3,R
+20003,202001,100,77,5644,,5.70677452,,3.027097983,93.98369565,,3,3,R
+20003,202002,100,77,989,0.175230333,,1.255768523,,66.5326087,3,,3,R
+20004,202001,100,30,2819.51087,,,,3.027097983,93.98369565,,3,3,C
+20004,202002,100,30,3540.653,,,1.255768523,,66.5326087,3,,3,FIC
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 045c3b7e..2048b9d6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,8444,51,,,,1.129481006,,1.655006,120.1991,8444,R,,4,4
-30001,202002,100,7476,51,,,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7476,R,4,3,4
-30001,202003,100,2003,51,,,0.267924024,,1.526947,,103.0154,2003,R,3,,3
-30002,202001,100,9343,72,,,,1.195062676,,1.655006,120.1991,9343,R,,4,4
-30002,202002,100,7818,72,,,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7818,R,4,3,4
-30002,202003,100,4897,72,,,0.626375032,,1.526947,,103.0154,4897,R,3,,3
-30003,202001,100,7511,7,,,,4.265190233,,1.655006,120.1991,7511,R,,4,4
-30003,202002,100,1761,7,,,0.234456131,0.271256932,8.743054929,1.407609,90.8436,1761,R,4,3,4
-30003,202003,100,6492,7,,,3.686541738,,1.526947,,103.0154,6492,R,3,,3
-30004,202001,100,64,81,,,,0.030288689,,1.655006,120.1991,64,R,,4,4
-30004,202002,100,2113,81,,,33.015625,,8.743054929,1.407609,90.8436,2113,R,4,3,4
-30004,202003,100,,81,,,,,1.526947,,103.0154,3226.439011,FIR,3,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+30001,202001,100,51,8444,,1.129481006,,1.655006,120.1991,,4,4,R
+30001,202002,100,51,7476,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4,3,4,R
+30001,202003,100,51,2003,0.267924024,,1.526947,,103.0154,3,,3,R
+30002,202001,100,72,9343,,1.195062676,,1.655006,120.1991,,4,4,R
+30002,202002,100,72,7818,0.836776196,1.596487645,8.743054929,1.407609,90.8436,4,3,4,R
+30002,202003,100,72,4897,0.626375032,,1.526947,,103.0154,3,,3,R
+30003,202001,100,7,7511,,4.265190233,,1.655006,120.1991,,4,4,R
+30003,202002,100,7,1761,0.234456131,0.271256932,8.743054929,1.407609,90.8436,4,3,4,R
+30003,202003,100,7,6492,3.686541738,,1.526947,,103.0154,3,,3,R
+30004,202001,100,81,64,,0.030288689,,1.655006,120.1991,,4,4,R
+30004,202002,100,81,2113,33.015625,,8.743054929,1.407609,90.8436,4,3,4,R
+30004,202003,100,81,3226.439011,,,1.526947,,103.0154,3,,3,FIR
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index 7d5b5eba..f6d9fdc9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-40001,202001,100,9491,35,,,,1.984319465,,2.053506032,128.0208333,9491,R,,4,4
-40001,202002,100,4783,35,,,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4783,R,4,3,4
-40001,202003,100,7902,35,,,1.652101192,1.609040929,3.003997558,1.551291583,115.6929825,7902,R,3,3,3
-40001,202004,100,4911,35,,,0.621488231,,0.645360538,,73.71052632,4911,R,3,,3
-40002,202001,100,2095,63,,,,4.739819005,,2.053506032,128.0208333,2095,R,,4,4
-40002,202002,100,442,63,,,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,442,R,4,3,4
-40002,202003,100,3136,63,,,7.095022624,1.482742317,3.003997558,1.551291583,115.6929825,3136,R,3,3,3
-40002,202004,100,2115,63,,,0.67442602,,0.645360538,,73.71052632,2115,R,3,,3
-40003,202001,100,7863,16,,,,0.968230513,,2.053506032,128.0208333,7863,R,,4,4
-40003,202002,100,8121,16,,,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,8121,R,4,3,4
-40003,202003,100,2151,16,,,0.264868859,1.562091503,3.003997558,1.551291583,115.6929825,2151,R,3,3,3
-40003,202004,100,1377,16,,,0.640167364,,0.645360538,,73.71052632,1377,R,3,,3
-40004,202001,100,5131,78,,,,0.521655144,,2.053506032,128.0208333,5131,R,,4,4
-40004,202002,100,9836,78,,,1.916975248,,0.916179196,1.507228985,120.7395833,9836,R,4,3,4
-40004,202003,100,,78,,,,,3.003997558,1.551291583,115.6929825,29547.31998,FIR,3,3,3
-40004,202004,100,,78,,,,,0.645360538,,73.71052632,19068.67433,FIR,3,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+40001,202001,100,35,9491,,1.984319465,,2.053506032,128.0208333,,4,4,R
+40001,202002,100,35,4783,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,R
+40001,202003,100,35,7902,1.652101192,1.609040929,3.003997558,1.551291583,115.6929825,3,3,3,R
+40001,202004,100,35,4911,0.621488231,,0.645360538,,73.71052632,3,,3,R
+40002,202001,100,63,2095,,4.739819005,,2.053506032,128.0208333,,4,4,R
+40002,202002,100,63,442,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,R
+40002,202003,100,63,3136,7.095022624,1.482742317,3.003997558,1.551291583,115.6929825,3,3,3,R
+40002,202004,100,63,2115,0.67442602,,0.645360538,,73.71052632,3,,3,R
+40003,202001,100,16,7863,,0.968230513,,2.053506032,128.0208333,,4,4,R
+40003,202002,100,16,8121,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,R
+40003,202003,100,16,2151,0.264868859,1.562091503,3.003997558,1.551291583,115.6929825,3,3,3,R
+40003,202004,100,16,1377,0.640167364,,0.645360538,,73.71052632,3,,3,R
+40004,202001,100,78,5131,,0.521655144,,2.053506032,128.0208333,,4,4,R
+40004,202002,100,78,9836,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,R
+40004,202003,100,78,29547.31998,,,3.003997558,1.551291583,115.6929825,3,3,3,FIR
+40004,202004,100,78,19068.67433,,,0.645360538,,73.71052632,3,,3,FIR
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
index b5391be9..8d62e190 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-50001,202001,100,6362,59,,,,0.744790447,,1.103126475,70.34328358,6362,R,,4,4
-50001,202002,100,8542,59,,,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,8542,R,4,3,4
-50001,202003,100,5623,59,,,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,5623,R,3,3,3
-50001,202004,100,7769,59,,,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,7769,R,3,3,3
-50001,202005,100,4687,59,,,0.603295147,,0.49999873,,49.9122807,4687,R,3,,3
-50002,202001,100,4851,36,,,,0.545423881,,1.103126475,70.34328358,4851,R,,4,4
-50002,202002,100,8894,36,,,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,8894,R,4,3,4
-50002,202003,100,3372,36,,,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3372,R,3,3,3
-50002,202004,100,3522,36,,,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3522,R,3,3,3
-50002,202005,100,2327,36,,,0.660704145,,0.49999873,,49.9122807,2327,R,3,,3
-50003,202001,100,2238,76,,,,2.910273082,,1.103126475,70.34328358,2238,R,,4,4
-50003,202002,100,769,76,,,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,769,R,4,3,4
-50003,202003,100,7722,76,,,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,7722,R,3,3,3
-50003,202004,100,6445,76,,,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,6445,R,3,3,3
-50003,202005,100,1521,76,,,0.235996897,,0.49999873,,49.9122807,1521,R,3,,3
-50004,202001,100,688,30,,,,0.21201849,,1.103126475,70.34328358,688,R,,4,4
-50004,202002,100,3245,30,,,4.716569767,,2.05906902,1.418769101,106.7164179,3245,R,4,3,4
-50004,202003,100,,30,,,,,3.693007078,0.959774209,97.76023392,11983.80797,FIR,3,3,3
-50004,202004,100,,30,,,,,1.086919709,2.469481356,103.7192982,13025.43707,FIR,3,3,3
-50004,202005,100,,30,,,,,0.49999873,,49.9122807,6512.701992,FIR,3,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+50001,202001,100,59,6362,,0.744790447,,1.103126475,70.34328358,,4,4,R
+50001,202002,100,59,8542,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,R
+50001,202003,100,59,5623,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,R
+50001,202004,100,59,7769,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,R
+50001,202005,100,59,4687,0.603295147,,0.49999873,,49.9122807,3,,3,R
+50002,202001,100,36,4851,,0.545423881,,1.103126475,70.34328358,,4,4,R
+50002,202002,100,36,8894,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,R
+50002,202003,100,36,3372,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,R
+50002,202004,100,36,3522,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,R
+50002,202005,100,36,2327,0.660704145,,0.49999873,,49.9122807,3,,3,R
+50003,202001,100,76,2238,,2.910273082,,1.103126475,70.34328358,,4,4,R
+50003,202002,100,76,769,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,R
+50003,202003,100,76,7722,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,R
+50003,202004,100,76,6445,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,R
+50003,202005,100,76,1521,0.235996897,,0.49999873,,49.9122807,3,,3,R
+50004,202001,100,30,688,,0.21201849,,1.103126475,70.34328358,,4,4,R
+50004,202002,100,30,3245,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,R
+50004,202003,100,30,11983.80797,,,3.693007078,0.959774209,97.76023392,3,3,3,FIR
+50004,202004,100,30,13025.43707,,,1.086919709,2.469481356,103.7192982,3,3,3,FIR
+50004,202005,100,30,6512.701992,,,0.49999873,,49.9122807,3,,3,FIR
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index 8ce992de..3b1cb9b5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-60001,202001,100,5077,15,,,,0.648403576,,7.141605449,117.9107143,5077,R,,3,3
-60001,202002,100,7830,15,,,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,7830,R,3,3,3
-60001,202003,100,1046,15,,,0.133588761,,7.391291354,,100.9130435,1046,R,3,,4
-60002,202001,100,1588,71,,,,1.309150866,,7.141605449,117.9107143,1588,R,,3,3
-60002,202002,100,1213,71,,,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,1213,R,3,3,3
-60002,202003,100,3807,71,,,3.138499588,,7.391291354,,100.9130435,3807,R,3,,4
-60003,202001,100,6541,26,,,,19.4672619,,7.141605449,117.9107143,6541,R,,3,3
-60003,202002,100,336,26,,,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,336,R,3,3,3
-60003,202003,100,6351,26,,,18.90178571,,7.391291354,,100.9130435,6351,R,3,,4
-60004,202001,100,,3,,,,,,7.141605449,117.9107143,7500.429481,BI,,3,3
-60004,202002,100,,3,,,,,0.785823852,2.619062766,83.74107143,1050.244169,BI,3,3,3
-60004,202003,100,401,3,,,,,7.391291354,,100.9130435,401,R,3,,4
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+60001,202001,100,15,5077,,0.648403576,,7.141605449,117.9107143,,3,3,R
+60001,202002,100,15,7830,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,R
+60001,202003,100,15,1046,0.133588761,,7.391291354,,100.9130435,3,,4,R
+60002,202001,100,71,1588,,1.309150866,,7.141605449,117.9107143,,3,3,R
+60002,202002,100,71,1213,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,R
+60002,202003,100,71,3807,3.138499588,,7.391291354,,100.9130435,3,,4,R
+60003,202001,100,26,6541,,19.4672619,,7.141605449,117.9107143,,3,3,R
+60003,202002,100,26,336,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,R
+60003,202003,100,26,6351,18.90178571,,7.391291354,,100.9130435,3,,4,R
+60004,202001,100,3,7500.429481,,,,7.141605449,117.9107143,,3,3,BI
+60004,202002,100,3,1050.244169,,,0.785823852,2.619062766,83.74107143,3,3,3,BI
+60004,202003,100,3,401,,,7.391291354,,100.9130435,3,,4,R
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 7e8a1655..8f076107 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-70001,202001,100,5951,39,,,,3.280595369,,47.92201545,107.48,5951,R,,3,3
-70001,202002,100,1814,39,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
-70001,202003,100,734,39,,,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,734,R,3,3,4
-70001,202004,100,96,39,,,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,96,R,3,3,3
-70001,202005,100,9086,39,,,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,9086,R,3,3,3
-70001,202006,100,3949,39,,,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3949,R,3,3,4
-70001,202007,100,49,39,,,0.012408205,,1.593348776,,70.24,49,R,3,,3
-70002,202001,100,6705,94,,,,139.6875,,47.92201545,107.48,6705,R,,3,3
-70002,202002,100,48,94,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,48,R,3,3,3
-70002,202003,100,5361,94,,,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,5361,R,3,3,4
-70002,202004,100,8767,94,,,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,8767,R,3,3,3
-70002,202005,100,9214,94,,,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,9214,R,3,3,3
-70002,202006,100,7467,94,,,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,7467,R,3,3,4
-70002,202007,100,3475,94,,,0.46538101,,1.593348776,,70.24,3475,R,3,,3
-70003,202001,100,6153,42,,,,0.797950979,,47.92201545,107.48,6153,R,,3,3
-70003,202002,100,7711,42,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
-70003,202003,100,5403,42,,,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,5403,R,3,3,4
-70003,202004,100,7445,42,,,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,7445,R,3,3,3
-70003,202005,100,7092,42,,,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,7092,R,3,3,3
-70003,202006,100,2038,42,,,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,2038,R,3,3,4
-70003,202007,100,8768,42,,,4.302257115,,1.593348776,,70.24,8768,R,3,,3
-70004,202001,100,,6,,,,,,47.92201545,107.48,392488.3921,BI,,3,3
-70004,202002,100,,6,,,,,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
-70004,202003,100,6288,6,,,,,37.59760599,2.994350985,98.26519337,6288,R,3,3,4
-70004,202004,100,,6,,,,,1.048019201,0.670608989,93.18857143,6589.944736,FIR,3,3,3
-70004,202005,100,,6,,,,,32.21646854,2.338226887,145.0971429,212304.7472,FIR,3,3,3
-70004,202006,100,5875,6,,,,,0.510795988,27.65768328,106.7900552,5875,R,3,3,4
-70004,202007,100,,6,,,,,1.593348776,,70.24,9360.924061,FIR,3,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+70001,202001,100,39,5951,,3.280595369,,47.92201545,107.48,,3,3,R
+70001,202002,100,39,1814,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,R
+70001,202003,100,39,734,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,R
+70001,202004,100,39,96,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,R
+70001,202005,100,39,9086,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,R
+70001,202006,100,39,3949,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,R
+70001,202007,100,39,49,0.012408205,,1.593348776,,70.24,3,,3,R
+70002,202001,100,94,6705,,139.6875,,47.92201545,107.48,,3,3,R
+70002,202002,100,94,48,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,R
+70002,202003,100,94,5361,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,R
+70002,202004,100,94,8767,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,R
+70002,202005,100,94,9214,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,R
+70002,202006,100,94,7467,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,R
+70002,202007,100,94,3475,0.46538101,,1.593348776,,70.24,3,,3,R
+70003,202001,100,42,6153,,0.797950979,,47.92201545,107.48,,3,3,R
+70003,202002,100,42,7711,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,R
+70003,202003,100,42,5403,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,R
+70003,202004,100,42,7445,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,R
+70003,202005,100,42,7092,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,R
+70003,202006,100,42,2038,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,R
+70003,202007,100,42,8768,4.302257115,,1.593348776,,70.24,3,,3,R
+70004,202001,100,6,392488.3921,,,,47.92201545,107.48,,3,3,BI
+70004,202002,100,6,8190.147856,,,0.521730457,1.30250443,54.70285714,3,3,3,BI
+70004,202003,100,6,6288,,,37.59760599,2.994350985,98.26519337,3,3,4,R
+70004,202004,100,6,6589.944736,,,1.048019201,0.670608989,93.18857143,3,3,3,FIR
+70004,202005,100,6,212304.7472,,,32.21646854,2.338226887,145.0971429,3,3,3,FIR
+70004,202006,100,6,5875,,,0.510795988,27.65768328,106.7900552,3,3,4,R
+70004,202007,100,6,9360.924061,,,1.593348776,,70.24,3,,3,FIR
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index 605dad04..fa7582cf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-80001,202001,100,4042,91,,,,1.440998217,,1.856581839,69.14982578,4042,R,,4,4
-80001,202002,100,2805,91,,,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,2805,R,4,4,4
-80001,202003,100,644,91,,,0.229590018,,1.59233398,,71.90940767,644,R,4,,4
-80002,202001,100,7138,85,,,,3.623350254,,1.856581839,69.14982578,7138,R,,4,4
-80002,202002,100,1970,85,,,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,1970,R,4,4,4
-80002,202003,100,2746,85,,,1.393908629,,1.59233398,,71.90940767,2746,R,4,,4
-80003,202001,100,2846,41,,,,0.801238739,,1.856581839,69.14982578,2846,R,,4,4
-80003,202002,100,3552,41,,,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,3552,R,4,4,4
-80003,202003,100,9015,41,,,2.538006757,,1.59233398,,71.90940767,9015,R,4,,4
-80004,202001,100,5820,70,,,,1.560740145,,1.856581839,69.14982578,5820,R,,4,4
-80004,202002,100,3729,70,,,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,3729,R,4,4,4
-80004,202003,100,8233,70,,,2.207830518,,1.59233398,,71.90940767,8233,R,4,,4
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+80001,202001,100,91,4042,,1.440998217,,1.856581839,69.14982578,,4,4,R
+80001,202002,100,91,2805,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,R
+80001,202003,100,91,644,0.229590018,,1.59233398,,71.90940767,4,,4,R
+80002,202001,100,85,7138,,3.623350254,,1.856581839,69.14982578,,4,4,R
+80002,202002,100,85,1970,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,R
+80002,202003,100,85,2746,1.393908629,,1.59233398,,71.90940767,4,,4,R
+80003,202001,100,41,2846,,0.801238739,,1.856581839,69.14982578,,4,4,R
+80003,202002,100,41,3552,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,R
+80003,202003,100,41,9015,2.538006757,,1.59233398,,71.90940767,4,,4,R
+80004,202001,100,70,5820,,1.560740145,,1.856581839,69.14982578,,4,4,R
+80004,202002,100,70,3729,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,R
+80004,202003,100,70,8233,2.207830518,,1.59233398,,71.90940767,4,,4,R
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index aa9412ac..3d6e80c8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-90001,202001,100,2417,66,,,,0.304868819,,0.528905137,71.77777778,2417,R,,3,4
-90001,202002,100,7928,66,,,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,7928,R,3,3,3
-90001,202003,100,7319,66,,,0.923183653,,2.293928258,,169.3831776,7319,R,3,,3
-90002,202001,100,1706,27,,,,1.151924375,,0.528905137,71.77777778,1706,R,,3,4
-90002,202002,100,1481,27,,,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,1481,R,3,3,3
-90002,202003,100,8390,27,,,5.665091155,,2.293928258,,169.3831776,8390,R,3,,3
-90003,202001,100,1069,14,,,,0.129922217,,0.528905137,71.77777778,1069,R,,3,4
-90003,202002,100,8228,14,,,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,8228,R,3,3,3
-90003,202003,100,2415,14,,,0.293509966,,2.293928258,,169.3831776,2415,R,3,,3
-90004,202001,100,7728,73,,,,,,,71.77777778,7728,R,,,4
-90004,202003,100,,73,,,,,,,169.3831776,12364.97196,C,,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+90001,202001,100,66,2417,,0.304868819,,0.528905137,71.77777778,,3,4,R
+90001,202002,100,66,7928,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,R
+90001,202003,100,66,7319,0.923183653,,2.293928258,,169.3831776,3,,3,R
+90002,202001,100,27,1706,,1.151924375,,0.528905137,71.77777778,,3,4,R
+90002,202002,100,27,1481,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,R
+90002,202003,100,27,8390,5.665091155,,2.293928258,,169.3831776,3,,3,R
+90003,202001,100,14,1069,,0.129922217,,0.528905137,71.77777778,,3,4,R
+90003,202002,100,14,8228,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,R
+90003,202003,100,14,2415,0.293509966,,2.293928258,,169.3831776,3,,3,R
+90004,202001,100,73,7728,,,,,71.77777778,,,4,R
+90004,202003,100,73,12364.97196,,,,,169.3831776,,,3,C
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index bfcd5939..4ed5311a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-100001,202001,100,3074,26,,,,0.322594186,,1.691693133,179.3296703,3074,R,,3,3
-100001,202002,100,9529,26,,,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,9529,R,3,3,3
-100001,202003,100,615,26,,,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,615,R,3,3,3
-100001,202004,100,3540,26,,,5.756097561,,6.74787815,,119.1751412,3540,R,3,,4
-100002,202001,100,8084,19,,,,3.337737407,,1.691693133,179.3296703,8084,R,,3,3
-100002,202002,100,2422,19,,,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,2422,R,3,3,3
-100002,202003,100,3058,19,,,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3058,R,3,3,3
-100002,202004,100,5608,19,,,1.833878352,,6.74787815,,119.1751412,5608,R,3,,4
-100003,202001,100,5161,46,,,,1.414747807,,1.691693133,179.3296703,5161,R,,3,3
-100003,202002,100,3648,46,,,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3648,R,3,3,3
-100003,202003,100,205,46,,,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,205,R,3,3,3
-100003,202004,100,2594,46,,,12.65365854,,6.74787815,,119.1751412,2594,R,3,,4
-100004,202001,100,,86,,,,,,1.691693133,179.3296703,15422.35165,C,,3,3
-100004,202002,100,,86,,,,,1.368771264,11.36048394,171.4175824,21109.67176,FIC,3,3,3
-100004,202004,100,9352,86,,,,,6.74787815,,119.1751412,9352,R,3,3,4
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+100001,202001,100,26,3074,,0.322594186,,1.691693133,179.3296703,,3,3,R
+100001,202002,100,26,9529,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,R
+100001,202003,100,26,615,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,R
+100001,202004,100,26,3540,5.756097561,,6.74787815,,119.1751412,3,,4,R
+100002,202001,100,19,8084,,3.337737407,,1.691693133,179.3296703,,3,3,R
+100002,202002,100,19,2422,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,R
+100002,202003,100,19,3058,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,R
+100002,202004,100,19,5608,1.833878352,,6.74787815,,119.1751412,3,,4,R
+100003,202001,100,46,5161,,1.414747807,,1.691693133,179.3296703,,3,3,R
+100003,202002,100,46,3648,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,R
+100003,202003,100,46,205,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,R
+100003,202004,100,46,2594,12.65365854,,6.74787815,,119.1751412,3,,4,R
+100004,202001,100,86,15422.35165,,,,1.691693133,179.3296703,,3,3,C
+100004,202002,100,86,21109.67176,,,1.368771264,11.36048394,171.4175824,3,3,3,FIC
+100004,202004,100,86,9352,,,6.74787815,,119.1751412,3,3,4,R
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 46f570de..1e5099f9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,9244,89,,,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
-110001,202002,100,8916,89,,,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
-110001,202003,100,6194,89,,,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
-110002,202001,100,4826,83,,,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
-110002,202002,100,5903,83,,,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
-110002,202003,100,4743,83,,,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
-110003,202001,100,7586,4,,,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
-110003,202002,100,1016,4,,,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
-110003,202003,100,1429,4,,,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
-110004,202001,100,3975,76,,,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
-110004,202002,100,3044,76,,,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
-110004,202003,100,,76,,,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
-110005,202001,200,5217,27,,,,0.743586089,,2.290844366,182.25,5217,R,,3,3
-110005,202002,200,7016,27,,,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,7016,R,3,4,4
-110005,202003,200,9940,27,,,1.416761688,,1.259780318,,182.2366412,9940,R,4,,4
-110006,202001,200,5325,42,,,,0.68736285,,2.290844366,182.25,5325,R,,3,3
-110006,202002,200,7747,42,,,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,7747,R,3,4,4
-110006,202003,200,6685,42,,,0.862914677,,1.259780318,,182.2366412,6685,R,4,,4
-110007,202001,200,5496,19,,,,5.441584158,,2.290844366,182.25,5496,R,,3,3
-110007,202002,200,1010,19,,,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1010,R,3,4,4
-110007,202003,200,1235,19,,,1.222772277,,1.259780318,,182.2366412,1235,R,4,,4
-110008,202001,200,,43,,,,,,2.290844366,182.25,8964.074003,BI,,3,3
-110008,202002,200,3913,43,,,,0.650756694,0.994479964,0.833317149,150.2748092,3913,R,3,4,4
-110008,202003,200,6013,43,,,1.53667263,,1.259780318,,182.2366412,6013,R,4,,4
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+110001,202001,100,89,9244,,1.036787797,,2.656680299,101.7103175,,4,4,R
+110001,202002,100,89,8916,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,R
+110001,202003,100,89,6194,0.694706146,,0.968230653,,70.26136364,3,,3,R
+110002,202001,100,83,4826,,0.817550398,,2.656680299,101.7103175,,4,4,R
+110002,202002,100,83,5903,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,R
+110002,202003,100,83,4743,0.803489751,,0.968230653,,70.26136364,3,,3,R
+110003,202001,100,4,7586,,7.466535433,,2.656680299,101.7103175,,4,4,R
+110003,202002,100,4,1016,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,R
+110003,202003,100,4,1429,1.406496063,,0.968230653,,70.26136364,3,,3,R
+110004,202001,100,76,3975,,1.305847569,,2.656680299,101.7103175,,4,4,R
+110004,202002,100,76,3044,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,R
+110004,202003,100,76,2947.294109,,,0.968230653,,70.26136364,3,,3,FIR
+110005,202001,200,27,5217,,0.743586089,,2.290844366,182.25,,3,3,R
+110005,202002,200,27,7016,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,R
+110005,202003,200,27,9940,1.416761688,,1.259780318,,182.2366412,4,,4,R
+110006,202001,200,42,5325,,0.68736285,,2.290844366,182.25,,3,3,R
+110006,202002,200,42,7747,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,R
+110006,202003,200,42,6685,0.862914677,,1.259780318,,182.2366412,4,,4,R
+110007,202001,200,19,5496,,5.441584158,,2.290844366,182.25,,3,3,R
+110007,202002,200,19,1010,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,R
+110007,202003,200,19,1235,1.222772277,,1.259780318,,182.2366412,4,,4,R
+110008,202001,200,43,8964.074003,,,,2.290844366,182.25,,3,3,BI
+110008,202002,200,43,3913,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,R
+110008,202003,200,43,6013,1.53667263,,1.259780318,,182.2366412,4,,4,R
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 294ad378..2b915a10 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-120001,202001,100,5240,50,,,,2.104417671,,1.589860068,77.38738739,5240,R,,3,3
-120001,202002,100,2490,50,,,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,2490,R,3,3,3
-120001,202003,100,3382,50,,,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3382,R,3,3,3
-120001,202004,100,4475,50,,,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,4475,R,3,3,3
-120001,202005,100,1316,50,,,0.294078212,,5.357333441,,32.73423423,1316,R,3,,3
-120002,202001,100,7410,78,,,,2.05719045,,1.589860068,77.38738739,7410,R,,3,3
-120002,202002,100,3602,78,,,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3602,R,3,3,3
-120002,202003,100,4972,78,,,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,4972,R,3,3,3
-120002,202004,100,8838,78,,,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,8838,R,3,3,3
-120002,202005,100,1535,78,,,0.173681828,,5.357333441,,32.73423423,1535,R,3,,3
-120003,202001,100,4530,94,,,,0.607972084,,1.589860068,77.38738739,4530,R,,3,3
-120003,202002,100,7451,94,,,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,7451,R,3,3,3
-120003,202003,100,7586,94,,,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,7586,R,3,3,3
-120003,202004,100,283,94,,,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,283,R,3,3,3
-120003,202005,100,4416,94,,,15.60424028,,5.357333441,,32.73423423,4416,R,3,,3
-120004,202001,100,,100,,,,,,1.589860068,77.38738739,7738.738739,C,,3,3
-120004,202002,100,,100,,,,,0.868701022,0.814303919,61.0045045,6722.650253,FIC,3,3,3
-120004,202003,100,,100,,,,,1.252231853,9.374659539,71.8018018,8418.316782,FIC,3,3,3
-120004,202004,100,,100,,,,,1.046013805,3.074065265,61.24324324,8805.675573,FIC,3,3,3
-120004,202005,100,,100,,,,,5.357333441,,32.73423423,47174.94022,FIC,3,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+120001,202001,100,50,5240,,2.104417671,,1.589860068,77.38738739,,3,3,R
+120001,202002,100,50,2490,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,R
+120001,202003,100,50,3382,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,R
+120001,202004,100,50,4475,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,R
+120001,202005,100,50,1316,0.294078212,,5.357333441,,32.73423423,3,,3,R
+120002,202001,100,78,7410,,2.05719045,,1.589860068,77.38738739,,3,3,R
+120002,202002,100,78,3602,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,R
+120002,202003,100,78,4972,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,R
+120002,202004,100,78,8838,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,R
+120002,202005,100,78,1535,0.173681828,,5.357333441,,32.73423423,3,,3,R
+120003,202001,100,94,4530,,0.607972084,,1.589860068,77.38738739,,3,3,R
+120003,202002,100,94,7451,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,R
+120003,202003,100,94,7586,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,R
+120003,202004,100,94,283,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,R
+120003,202005,100,94,4416,15.60424028,,5.357333441,,32.73423423,3,,3,R
+120004,202001,100,100,7738.738739,,,,1.589860068,77.38738739,,3,3,C
+120004,202002,100,100,6722.650253,,,0.868701022,0.814303919,61.0045045,3,3,3,FIC
+120004,202003,100,100,8418.316782,,,1.252231853,9.374659539,71.8018018,3,3,3,FIC
+120004,202004,100,100,8805.675573,,,1.046013805,3.074065265,61.24324324,3,3,3,FIC
+120004,202005,100,100,47174.94022,,,5.357333441,,32.73423423,3,,3,FIC
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 5e53fb72..18a11e08 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-130001,202001,100,6583,20,,,,1.751263634,,0.885479533,102.7515152,6583,R,,3,4
-130001,202002,100,3759,20,,,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3759,R,3,3,3
-130001,202003,100,8256,20,,,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,8256,R,3,3,3
-130001,202004,100,6743,20,,,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,6743,R,3,3,3
-130001,202005,100,6811,20,,,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,6811,R,3,3,3
-130001,202006,100,9896,20,,,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,9896,R,3,3,3
-130001,202007,100,3282,20,,,0.331649151,,0.913312467,,158.7757576,3282,R,3,,4
-130002,202001,100,687,69,,,,0.076443752,,0.885479533,102.7515152,687,R,,3,4
-130002,202002,100,8987,69,,,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,8987,R,3,3,3
-130002,202003,100,371,69,,,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,371,R,3,3,3
-130002,202004,100,3385,69,,,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3385,R,3,3,3
-130002,202005,100,6606,69,,,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,6606,R,3,3,3
-130002,202006,100,5901,69,,,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,5901,R,3,3,3
-130002,202007,100,9834,69,,,1.666497204,,0.913312467,,158.7757576,9834,R,3,,4
-130003,202001,100,7113,39,,,,0.828731213,,0.885479533,102.7515152,7113,R,,3,4
-130003,202002,100,8583,39,,,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,8583,R,3,3,3
-130003,202003,100,5129,39,,,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,5129,R,3,3,3
-130003,202004,100,2024,39,,,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,2024,R,3,3,3
-130003,202005,100,9422,39,,,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,9422,R,3,3,3
-130003,202006,100,8710,39,,,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,8710,R,3,3,3
-130003,202007,100,6461,39,,,0.741791045,,0.913312467,,158.7757576,6461,R,3,,4
-130004,202001,100,2571,37,,,,,,0.885479533,102.7515152,2571,R,,3,4
-130004,202002,100,,37,,,,,4.953064646,8.784150176,166.6328125,12734.3292,FIR,3,3,3
-130004,202003,100,,37,,,,,0.945062422,1.289357643,107.46875,12034.73601,FIR,3,3,3
-130004,202005,100,,37,,,,,2.538924611,0.963158093,178.4296875,10550.61563,BI,3,3,3
-130004,202006,100,,37,,,,,1.090218262,1.654461386,191.4609375,10954.18883,BI,3,3,3
-130004,202007,100,6621,37,,,,,0.913312467,,158.7757576,6621,R,3,,4
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+130001,202001,100,20,6583,,1.751263634,,0.885479533,102.7515152,,3,4,R
+130001,202002,100,20,3759,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,R
+130001,202003,100,20,8256,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,R
+130001,202004,100,20,6743,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,R
+130001,202005,100,20,6811,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,R
+130001,202006,100,20,9896,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,R
+130001,202007,100,20,3282,0.331649151,,0.913312467,,158.7757576,3,,4,R
+130002,202001,100,69,687,,0.076443752,,0.885479533,102.7515152,,3,4,R
+130002,202002,100,69,8987,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,R
+130002,202003,100,69,371,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,R
+130002,202004,100,69,3385,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,R
+130002,202005,100,69,6606,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,R
+130002,202006,100,69,5901,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,R
+130002,202007,100,69,9834,1.666497204,,0.913312467,,158.7757576,3,,4,R
+130003,202001,100,39,7113,,0.828731213,,0.885479533,102.7515152,,3,4,R
+130003,202002,100,39,8583,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,R
+130003,202003,100,39,5129,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,R
+130003,202004,100,39,2024,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,R
+130003,202005,100,39,9422,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,R
+130003,202006,100,39,8710,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,R
+130003,202007,100,39,6461,0.741791045,,0.913312467,,158.7757576,3,,4,R
+130004,202001,100,37,2571,,,,0.885479533,102.7515152,,3,4,R
+130004,202002,100,37,12734.3292,,,4.953064646,8.784150176,166.6328125,3,3,3,FIR
+130004,202003,100,37,12034.73601,,,0.945062422,1.289357643,107.46875,3,3,3,FIR
+130004,202005,100,37,10550.61563,,,2.538924611,0.963158093,178.4296875,3,3,3,BI
+130004,202006,100,37,10954.18883,,,1.090218262,1.654461386,191.4609375,3,3,3,BI
+130004,202007,100,37,6621,,,0.913312467,,158.7757576,3,,4,R
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 19a787eb..1ac88c5e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-140001,202001,100,3582,27,,,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3
-140001,202002,100,4533,27,,,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3
-140001,202003,100,4471,27,,,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3
-140001,202004,100,3040,27,,,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3
-140001,202005,100,8519,27,,,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3
-140001,202006,100,8690,27,,,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3
-140001,202007,100,9979,27,,,1.148331415,,0.520242185,,91.63876652,9979,R,3,,4
-140002,202001,100,5359,83,,,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3
-140002,202002,100,7091,83,,,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3
-140002,202003,100,7098,83,,,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3
-140002,202004,100,7408,83,,,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3
-140002,202005,100,1937,83,,,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3
-140002,202006,100,6711,83,,,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3
-140002,202007,100,1052,83,,,0.156757562,,0.520242185,,91.63876652,1052,R,3,,4
-140003,202001,100,439,89,,,,0.056404985,,0.534118956,47.13567839,439,R,,3,3
-140003,202002,100,7783,89,,,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3
-140003,202003,100,897,89,,,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3
-140003,202004,100,8477,89,,,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3
-140003,202005,100,2207,89,,,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3
-140003,202006,100,9889,89,,,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3
-140003,202007,100,2528,89,,,0.255637577,,0.520242185,,91.63876652,2528,R,3,,4
-140004,202001,100,,28,,,,,,0.534118956,47.13567839,1319.798995,C,,3,3
-140004,202002,100,,28,,,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3
-140004,202003,100,,28,,,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3
-140004,202005,100,,28,,,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3
-140004,202006,100,,28,,,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3
-140004,202007,100,7243,28,,,,,0.520242185,,91.63876652,7243,R,3,,4
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+140001,202001,100,27,3582,,0.790205162,,0.534118956,47.13567839,,3,3,R
+140001,202002,100,27,4533,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,R
+140001,202003,100,27,4471,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,R
+140001,202004,100,27,3040,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,R
+140001,202005,100,27,8519,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,R
+140001,202006,100,27,8690,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,R
+140001,202007,100,27,9979,1.148331415,,0.520242185,,91.63876652,3,,4,R
+140002,202001,100,83,5359,,0.755746721,,0.534118956,47.13567839,,3,3,R
+140002,202002,100,83,7091,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,R
+140002,202003,100,83,7098,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,R
+140002,202004,100,83,7408,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,R
+140002,202005,100,83,1937,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,R
+140002,202006,100,83,6711,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,R
+140002,202007,100,83,1052,0.156757562,,0.520242185,,91.63876652,3,,4,R
+140003,202001,100,89,439,,0.056404985,,0.534118956,47.13567839,,3,3,R
+140003,202002,100,89,7783,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,R
+140003,202003,100,89,897,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,R
+140003,202004,100,89,8477,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,R
+140003,202005,100,89,2207,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,R
+140003,202006,100,89,9889,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,R
+140003,202007,100,89,2528,0.255637577,,0.520242185,,91.63876652,3,,4,R
+140004,202001,100,28,1319.798995,,,,0.534118956,47.13567839,,3,3,C
+140004,202002,100,28,8938.390671,,,6.772539383,3.563193687,97.52261307,3,3,3,FIC
+140004,202003,100,28,6264.503515,,,0.700853626,0.84489759,62.64321608,3,3,3,FIC
+140004,202005,100,28,13403.57248,,,1.108042751,0.497376695,63.63316583,3,3,3,BI
+140004,202006,100,28,26948.53343,,,2.988483968,3.720631427,127.0854271,3,3,3,BI
+140004,202007,100,28,7243,,,0.520242185,,91.63876652,3,,4,R
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 6ab59ef8..842cfc0c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-150001,202001,100,5891,15,,,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3
-150001,202002,100,4581,15,,,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3
-150001,202003,100,4741,15,,,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4
-150001,202004,100,8092,15,,,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3
-150001,202005,100,2727,15,,,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,2727,R,3,3,4
-150001,202006,100,2363,15,,,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3
-150001,202007,100,9549,15,,,4.041049513,,2.111448113,,152.5353535,9549,R,3,,3
-150002,202001,100,8611,5,,,,0.917723543,,0.917399451,181.0909091,8611,R,,3,3
-150002,202002,100,9383,5,,,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3
-150002,202003,100,1064,5,,,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4
-150002,202004,100,7419,5,,,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3
-150002,202005,100,9967,5,,,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,9967,R,3,3,4
-150002,202006,100,1393,5,,,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3
-150002,202007,100,2593,5,,,1.861450108,,2.111448113,,152.5353535,2593,R,3,,3
-150003,202001,100,3426,79,,,,0.548511047,,0.917399451,181.0909091,3426,R,,3,3
-150003,202002,100,6246,79,,,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3
-150003,202003,100,8402,79,,,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4
-150003,202004,100,3891,79,,,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3
-150003,202005,100,5463,79,,,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,5463,R,3,3,4
-150003,202006,100,6852,79,,,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3
-150003,202007,100,2959,79,,,0.431844717,,2.111448113,,152.5353535,2959,R,3,,3
-150004,202001,100,,69,,,,,,0.917399451,181.0909091,13547.81819,BI,,3,3
-150004,202002,100,,69,,,,,1.230132332,3.509418433,204.1414141,14767.63276,BI,3,3,3
-150004,202003,100,4208,69,,,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4
-150004,202005,100,2818,69,,,,,1.028150423,3.035462652,124.8511905,2818,R,3,3,4
-150004,202006,100,,69,,,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3
-150004,202007,100,,69,,,,,2.111448113,,152.5353535,4483.444383,FIR,3,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+150001,202001,100,15,5891,,1.285963763,,0.917399451,181.0909091,,3,3,R
+150001,202002,100,15,4581,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,R
+150001,202003,100,15,4741,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,R
+150001,202004,100,15,8092,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,R
+150001,202005,100,15,2727,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,3,3,4,R
+150001,202006,100,15,2363,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,R
+150001,202007,100,15,9549,4.041049513,,2.111448113,,152.5353535,3,,3,R
+150002,202001,100,5,8611,,0.917723543,,0.917399451,181.0909091,,3,3,R
+150002,202002,100,5,9383,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,R
+150002,202003,100,5,1064,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,R
+150002,202004,100,5,7419,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,R
+150002,202005,100,5,9967,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,3,3,4,R
+150002,202006,100,5,1393,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,R
+150002,202007,100,5,2593,1.861450108,,2.111448113,,152.5353535,3,,3,R
+150003,202001,100,79,3426,,0.548511047,,0.917399451,181.0909091,,3,3,R
+150003,202002,100,79,6246,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,R
+150003,202003,100,79,8402,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,R
+150003,202004,100,79,3891,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,R
+150003,202005,100,79,5463,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,3,3,4,R
+150003,202006,100,79,6852,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,R
+150003,202007,100,79,2959,0.431844717,,2.111448113,,152.5353535,3,,3,R
+150004,202001,100,69,13547.81819,,,,0.917399451,181.0909091,,3,3,BI
+150004,202002,100,69,14767.63276,,,1.230132332,3.509418433,204.1414141,3,3,3,BI
+150004,202003,100,69,4208,,,0.831168119,0.962881641,109.6130952,3,3,4,R
+150004,202005,100,69,2818,,,1.028150423,3.035462652,124.8511905,3,3,4,R
+150004,202006,100,69,2123.39785,,,0.753512367,1.033441075,107.1515152,3,3,3,FIR
+150004,202007,100,69,4483.444383,,,2.111448113,,152.5353535,3,,3,FIR
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index 0142df9a..481eb746 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-160001,202001,100,2086,76,,,,0.502166586,,0.352085676,24.45957447,2086,R,,3,4
-160001,202002,100,4154,76,,,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,4154,R,3,3,4
-160001,202003,100,1610,76,,,0.387578238,0.447222222,0.346502312,1.552031536,30.00746269,1610,R,3,3,5
-160001,202004,100,3600,76,,,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3600,R,3,3,4
-160001,202005,100,6317,76,,,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,6317,R,3,3,4
-160001,202006,100,5703,76,,,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,5703,R,3,3,4
-160001,202007,100,1666,76,,,0.292126951,,1.523164371,,58.94468085,1666,R,3,,4
-160002,202001,100,430,32,,,,0.044472024,,0.352085676,24.45957447,430,R,,3,4
-160002,202002,100,9669,32,,,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,9669,R,3,3,4
-160002,202003,100,1748,32,,,0.180783949,0.734453782,0.346502312,1.552031536,30.00746269,1748,R,3,3,5
-160002,202004,100,2380,32,,,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,2380,R,3,3,4
-160002,202005,100,7871,32,,,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,7871,R,3,3,4
-160002,202006,100,8806,32,,,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,8806,R,3,3,4
-160002,202007,100,2678,32,,,0.304110834,,1.523164371,,58.94468085,2678,R,3,,4
-160003,202001,100,3232,85,,,,0.509618417,,0.352085676,24.45957447,3232,R,,3,4
-160003,202002,100,6342,85,,,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,6342,R,3,3,4
-160003,202003,100,2988,85,,,0.471144749,3.474418605,0.346502312,1.552031536,30.00746269,2988,R,3,3,5
-160003,202004,100,860,85,,,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,860,R,3,3,4
-160003,202005,100,9227,85,,,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,9227,R,3,3,4
-160003,202006,100,2393,85,,,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,2393,R,3,3,4
-160003,202007,100,9508,85,,,3.973255328,,1.523164371,,58.94468085,9508,R,3,,4
-160004,202001,100,0,42,,,,,,0.352085676,24.45957447,0,R,,3,4
-160004,202002,100,0,42,,,,,8.813223343,3.411359572,85.80851064,0,R,3,3,4
-160004,202003,100,567,42,,,,,0.346502312,1.552031536,30.00746269,567,R,3,3,5
-160004,202004,100,0,42,,,,,1.295132949,0.321823769,29.10638298,0,R,3,3,4
-160004,202005,100,0,42,,,,,5.26364495,1.952438177,99.63829787,0,R,3,3,4
-160004,202006,100,0,42,,,,,0.760313342,2.321042298,71.92340426,0,R,3,3,4
-160004,202007,100,0,42,,,,,1.523164371,,58.94468085,0,R,3,,4
-160005,202001,100,,33,,,,,,0.352085676,24.45957447,1356.031558,BI,,3,4
-160005,202002,100,,33,,,,,8.813223343,3.411359572,85.80851064,3851.424956,BI,3,3,4
-160005,202003,100,1129,33,,,,,0.346502312,1.552031536,30.00746269,1129,R,3,3,5
-160005,202005,100,,33,,,,,5.26364495,1.952438177,99.63829787,3288.06383,C,3,3,4
-160005,202006,100,,33,,,,,0.760313342,2.321042298,71.92340426,2499.9588,FIC,3,3,4
-160005,202007,100,,33,,,,,1.523164371,,58.94468085,3807.848172,FIC,3,,4
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+160001,202001,100,76,2086,,0.502166586,,0.352085676,24.45957447,,3,4,R
+160001,202002,100,76,4154,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,R
+160001,202003,100,76,1610,0.387578238,0.447222222,0.346502312,1.552031536,30.00746269,3,3,5,R
+160001,202004,100,76,3600,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,R
+160001,202005,100,76,6317,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,R
+160001,202006,100,76,5703,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,R
+160001,202007,100,76,1666,0.292126951,,1.523164371,,58.94468085,3,,4,R
+160002,202001,100,32,430,,0.044472024,,0.352085676,24.45957447,,3,4,R
+160002,202002,100,32,9669,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,R
+160002,202003,100,32,1748,0.180783949,0.734453782,0.346502312,1.552031536,30.00746269,3,3,5,R
+160002,202004,100,32,2380,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,R
+160002,202005,100,32,7871,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,R
+160002,202006,100,32,8806,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,R
+160002,202007,100,32,2678,0.304110834,,1.523164371,,58.94468085,3,,4,R
+160003,202001,100,85,3232,,0.509618417,,0.352085676,24.45957447,,3,4,R
+160003,202002,100,85,6342,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,R
+160003,202003,100,85,2988,0.471144749,3.474418605,0.346502312,1.552031536,30.00746269,3,3,5,R
+160003,202004,100,85,860,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,R
+160003,202005,100,85,9227,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,R
+160003,202006,100,85,2393,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,R
+160003,202007,100,85,9508,3.973255328,,1.523164371,,58.94468085,3,,4,R
+160004,202001,100,42,0,,,,0.352085676,24.45957447,,3,4,R
+160004,202002,100,42,0,,,8.813223343,3.411359572,85.80851064,3,3,4,R
+160004,202003,100,42,567,,,0.346502312,1.552031536,30.00746269,3,3,5,R
+160004,202004,100,42,0,,,1.295132949,0.321823769,29.10638298,3,3,4,R
+160004,202005,100,42,0,,,5.26364495,1.952438177,99.63829787,3,3,4,R
+160004,202006,100,42,0,,,0.760313342,2.321042298,71.92340426,3,3,4,R
+160004,202007,100,42,0,,,1.523164371,,58.94468085,3,,4,R
+160005,202001,100,33,1356.031558,,,,0.352085676,24.45957447,,3,4,BI
+160005,202002,100,33,3851.424956,,,8.813223343,3.411359572,85.80851064,3,3,4,BI
+160005,202003,100,33,1129,,,0.346502312,1.552031536,30.00746269,3,3,5,R
+160005,202005,100,33,3288.06383,,,5.26364495,1.952438177,99.63829787,3,3,4,C
+160005,202006,100,33,2499.9588,,,0.760313342,2.321042298,71.92340426,3,3,4,FIC
+160005,202007,100,33,3807.848172,,,1.523164371,,58.94468085,3,,4,FIC
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index e9c49786..1a933d3c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-160001,202001,100,2086,76,,,,0.502166586,,0.514064257,24.45957447,2086,R,,4,4
-160001,202002,100,4154,76,,,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4154,R,4,4,4
-160001,202003,100,1610,76,,,0.387578238,0.447222222,0.509876734,1.414023652,30.00746269,1610,R,4,4,5
-160001,202004,100,3600,76,,,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,3600,R,4,4,4
-160001,202005,100,6317,76,,,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,6317,R,4,4,4
-160001,202006,100,5703,76,,,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,5703,R,4,4,4
-160001,202007,100,1666,76,,,0.292126951,,1.392373278,,58.94468085,1666,R,4,,4
-160002,202001,100,430,32,,,,0.044472024,,0.514064257,24.45957447,430,R,,4,4
-160002,202002,100,9669,32,,,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,9669,R,4,4,4
-160002,202003,100,1748,32,,,0.180783949,0.734453782,0.509876734,1.414023652,30.00746269,1748,R,4,4,5
-160002,202004,100,2380,32,,,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,2380,R,4,4,4
-160002,202005,100,7871,32,,,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,7871,R,4,4,4
-160002,202006,100,8806,32,,,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,8806,R,4,4,4
-160002,202007,100,2678,32,,,0.304110834,,1.392373278,,58.94468085,2678,R,4,,4
-160003,202001,100,3232,85,,,,0.509618417,,0.514064257,24.45957447,3232,R,,4,4
-160003,202002,100,6342,85,,,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,6342,R,4,4,4
-160003,202003,100,2988,85,,,0.471144749,3.474418605,0.509876734,1.414023652,30.00746269,2988,R,4,4,5
-160003,202004,100,860,85,,,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,860,R,4,4,4
-160003,202005,100,9227,85,,,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,9227,R,4,4,4
-160003,202006,100,2393,85,,,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,2393,R,4,4,4
-160003,202007,100,9508,85,,,3.973255328,,1.392373278,,58.94468085,9508,R,4,,4
-160004,202001,100,0,42,,,,1,,0.514064257,24.45957447,0,R,,4,4
-160004,202002,100,0,42,,,1,1,6.859917508,2.808519679,85.80851064,0,R,4,4,4
-160004,202003,100,567,42,,,1,1,0.509876734,1.414023652,30.00746269,567,R,4,4,5
-160004,202004,100,0,42,,,1,1,1.221349712,0.491367827,29.10638298,0,R,4,4,4
-160004,202005,100,0,42,,,1,1,4.197733712,1.714328633,99.63829787,0,R,4,4,4
-160004,202006,100,0,42,,,1,1,0.820235007,1.990781723,71.92340426,0,R,4,4,4
-160004,202007,100,0,42,,,1,,1.392373278,,58.94468085,0,R,4,,4
-160005,202001,100,,33,,,,,,0.514064257,24.45957447,1630.004567,BI,,4,4
-160005,202002,100,,33,,,,,6.859917508,2.808519679,85.80851064,3170.818717,BI,4,4,4
-160005,202003,100,1129,33,,,,,0.509876734,1.414023652,30.00746269,1129,R,4,4,5
-160005,202005,100,,33,,,,,4.197733712,1.714328633,99.63829787,3288.06383,C,4,4,4
-160005,202006,100,,33,,,,,0.820235007,1.990781723,71.92340426,2696.985058,FIC,4,4,4
-160005,202007,100,,33,,,,,1.392373278,,58.94468085,3755.209926,FIC,4,,4
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+160001,202001,100,76,2086,,0.502166586,,0.514064257,24.45957447,,4,4,R
+160001,202002,100,76,4154,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,R
+160001,202003,100,76,1610,0.387578238,0.447222222,0.509876734,1.414023652,30.00746269,4,4,5,R
+160001,202004,100,76,3600,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,R
+160001,202005,100,76,6317,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,R
+160001,202006,100,76,5703,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,R
+160001,202007,100,76,1666,0.292126951,,1.392373278,,58.94468085,4,,4,R
+160002,202001,100,32,430,,0.044472024,,0.514064257,24.45957447,,4,4,R
+160002,202002,100,32,9669,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,R
+160002,202003,100,32,1748,0.180783949,0.734453782,0.509876734,1.414023652,30.00746269,4,4,5,R
+160002,202004,100,32,2380,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,R
+160002,202005,100,32,7871,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,R
+160002,202006,100,32,8806,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,R
+160002,202007,100,32,2678,0.304110834,,1.392373278,,58.94468085,4,,4,R
+160003,202001,100,85,3232,,0.509618417,,0.514064257,24.45957447,,4,4,R
+160003,202002,100,85,6342,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,R
+160003,202003,100,85,2988,0.471144749,3.474418605,0.509876734,1.414023652,30.00746269,4,4,5,R
+160003,202004,100,85,860,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,R
+160003,202005,100,85,9227,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,R
+160003,202006,100,85,2393,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,R
+160003,202007,100,85,9508,3.973255328,,1.392373278,,58.94468085,4,,4,R
+160004,202001,100,42,0,,1,,0.514064257,24.45957447,,4,4,R
+160004,202002,100,42,0,1,1,6.859917508,2.808519679,85.80851064,4,4,4,R
+160004,202003,100,42,567,1,1,0.509876734,1.414023652,30.00746269,4,4,5,R
+160004,202004,100,42,0,1,1,1.221349712,0.491367827,29.10638298,4,4,4,R
+160004,202005,100,42,0,1,1,4.197733712,1.714328633,99.63829787,4,4,4,R
+160004,202006,100,42,0,1,1,0.820235007,1.990781723,71.92340426,4,4,4,R
+160004,202007,100,42,0,1,,1.392373278,,58.94468085,4,,4,R
+160005,202001,100,33,1630.004567,,,,0.514064257,24.45957447,,4,4,BI
+160005,202002,100,33,3170.818717,,,6.859917508,2.808519679,85.80851064,4,4,4,BI
+160005,202003,100,33,1129,,,0.509876734,1.414023652,30.00746269,4,4,5,R
+160005,202005,100,33,3288.06383,,,4.197733712,1.714328633,99.63829787,4,4,4,C
+160005,202006,100,33,2696.985058,,,0.820235007,1.990781723,71.92340426,4,4,4,FIC
+160005,202007,100,33,3755.209926,,,1.392373278,,58.94468085,4,,4,FIC
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 0656a699..74ebb8c8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-160001,202001,100,2086,76,,,,0.502166586,,0.352085676,29.78238342,2086,R,,3,3
-160001,202002,100,4154,76,,,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,4154,R,3,3,3
-160001,202003,100,1610,76,,,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,1610,R,3,3,4
-160001,202004,100,3600,76,,,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3600,R,3,3,3
-160001,202005,100,6317,76,,,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,6317,R,3,3,3
-160001,202006,100,5703,76,,,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,5703,R,3,3,3
-160001,202007,100,1666,76,,,0.292126951,,1.523164371,,71.77202073,1666,R,3,,3
-160002,202001,100,430,32,,,,0.044472024,,0.352085676,29.78238342,430,R,,3,3
-160002,202002,100,9669,32,,,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,9669,R,3,3,3
-160002,202003,100,1748,32,,,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,1748,R,3,3,4
-160002,202004,100,2380,32,,,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,2380,R,3,3,3
-160002,202005,100,7871,32,,,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,7871,R,3,3,3
-160002,202006,100,8806,32,,,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,8806,R,3,3,3
-160002,202007,100,2678,32,,,0.304110834,,1.523164371,,71.77202073,2678,R,3,,3
-160003,202001,100,3232,85,,,,0.509618417,,0.352085676,29.78238342,3232,R,,3,3
-160003,202002,100,6342,85,,,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,6342,R,3,3,3
-160003,202003,100,2988,85,,,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,2988,R,3,3,4
-160003,202004,100,860,85,,,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,860,R,3,3,3
-160003,202005,100,9227,85,,,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,9227,R,3,3,3
-160003,202006,100,2393,85,,,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,2393,R,3,3,3
-160003,202007,100,9508,85,,,3.973255328,,1.523164371,,71.77202073,9508,R,3,,3
-160004,202001,100,,33,,,,,,0.352085676,29.78238342,1356.031558,BI,,3,3
-160004,202002,100,,33,,,,,8.813223344,3.411359571,104.4818653,3851.424956,BI,3,3,3
-160004,202003,100,1129,33,,,,,0.346502312,1.552031536,33.07522124,1129,R,3,3,4
-160004,202005,100,,33,,,,,5.263644949,1.952438177,121.3212435,4003.601036,C,3,3,3
-160004,202006,100,,33,,,,,0.760313342,2.321042298,87.57512953,3043.991285,FIC,3,3,3
-160004,202007,100,,33,,,,,1.523164371,,71.77202073,4636.49907,FIC,3,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+160001,202001,100,76,2086,,0.502166586,,0.352085676,29.78238342,,3,3,R
+160001,202002,100,76,4154,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,R
+160001,202003,100,76,1610,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,R
+160001,202004,100,76,3600,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,R
+160001,202005,100,76,6317,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,R
+160001,202006,100,76,5703,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,R
+160001,202007,100,76,1666,0.292126951,,1.523164371,,71.77202073,3,,3,R
+160002,202001,100,32,430,,0.044472024,,0.352085676,29.78238342,,3,3,R
+160002,202002,100,32,9669,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,R
+160002,202003,100,32,1748,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,R
+160002,202004,100,32,2380,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,R
+160002,202005,100,32,7871,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,R
+160002,202006,100,32,8806,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,R
+160002,202007,100,32,2678,0.304110834,,1.523164371,,71.77202073,3,,3,R
+160003,202001,100,85,3232,,0.509618417,,0.352085676,29.78238342,,3,3,R
+160003,202002,100,85,6342,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,R
+160003,202003,100,85,2988,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,R
+160003,202004,100,85,860,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,R
+160003,202005,100,85,9227,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,R
+160003,202006,100,85,2393,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,R
+160003,202007,100,85,9508,3.973255328,,1.523164371,,71.77202073,3,,3,R
+160004,202001,100,33,1356.031558,,,,0.352085676,29.78238342,,3,3,BI
+160004,202002,100,33,3851.424956,,,8.813223344,3.411359571,104.4818653,3,3,3,BI
+160004,202003,100,33,1129,,,0.346502312,1.552031536,33.07522124,3,3,4,R
+160004,202005,100,33,4003.601036,,,5.263644949,1.952438177,121.3212435,3,3,3,C
+160004,202006,100,33,3043.991285,,,0.760313342,2.321042298,87.57512953,3,3,3,FIC
+160004,202007,100,33,4636.49907,,,1.523164371,,71.77202073,3,,3,FIC
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index c4181854..581f6cea 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-170001,202001,100,6480,69,,,,0.653753027,,0.341906136,41.93396226,6480,R,,3,3
-170001,202002,100,9912,69,,,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,9912,R,3,3,4
-170001,202003,100,603,69,,,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,603,R,3,3,3
-170001,202004,100,7120,69,,,11.80762852,,4.51938598,,109.0330189,7120,R,3,,3
-170002,202001,100,449,62,,,,0.121614301,,0.341906136,41.93396226,449,R,,3,3
-170002,202002,100,3692,62,,,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3692,R,3,3,4
-170002,202003,100,8401,62,,,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,8401,R,3,3,3
-170002,202004,100,6745,62,,,0.802880609,,4.51938598,,109.0330189,6745,R,3,,3
-170003,202001,100,1961,81,,,,0.250351079,,0.341906136,41.93396226,1961,R,,3,3
-170003,202002,100,7833,81,,,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,7833,R,3,3,4
-170003,202003,100,9761,81,,,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,9761,R,3,3,3
-170003,202004,100,9250,81,,,0.947648806,,4.51938598,,109.0330189,9250,R,3,,3
-170004,202002,100,3913,9,,,,,4.582245799,5.893253897,114.7058824,3913,R,3,3,4
-170004,202003,100,,9,,,,,1.194144647,0.795149817,88.51415094,3914.194145,FIR,3,3,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+170001,202001,100,69,6480,,0.653753027,,0.341906136,41.93396226,,3,3,R
+170001,202002,100,69,9912,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,R
+170001,202003,100,69,603,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,R
+170001,202004,100,69,7120,11.80762852,,4.51938598,,109.0330189,3,,3,R
+170002,202001,100,62,449,,0.121614301,,0.341906136,41.93396226,,3,3,R
+170002,202002,100,62,3692,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,R
+170002,202003,100,62,8401,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,R
+170002,202004,100,62,6745,0.802880609,,4.51938598,,109.0330189,3,,3,R
+170003,202001,100,81,1961,,0.250351079,,0.341906136,41.93396226,,3,3,R
+170003,202002,100,81,7833,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,R
+170003,202003,100,81,9761,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,R
+170003,202004,100,81,9250,0.947648806,,4.51938598,,109.0330189,3,,3,R
+170004,202002,100,9,3913,,,4.582245799,5.893253897,114.7058824,3,3,4,R
+170004,202003,100,9,3914.194145,,,1.194144647,0.795149817,88.51415094,3,3,3,FIR
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 3dea9cd1..046dc9f6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-180001,202001,100,9188,91,,,,1.340726689,,0.769734514,123.4632353,9188,R,,3,3
-180001,202002,100,6853,91,,,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,6853,R,3,3,3
-180001,202003,100,2418,91,,,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,2418,R,3,3,4
-180001,202004,100,9291,91,,,3.842431762,,2.151700748,,175.5441176,9291,R,3,,3
-180002,202001,100,3829,26,,,,0.504612546,,0.769734514,123.4632353,3829,R,,3,3
-180002,202002,100,7588,26,,,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,7588,R,3,3,3
-180002,202003,100,7335,26,,,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,7335,R,3,3,4
-180002,202004,100,8415,26,,,1.147239264,,2.151700748,,175.5441176,8415,R,3,,3
-180003,202001,100,3774,19,,,,0.463864307,,0.769734514,123.4632353,3774,R,,3,3
-180003,202002,100,8136,19,,,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,8136,R,3,3,3
-180003,202003,100,4209,19,,,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,4209,R,3,3,4
-180003,202004,100,6168,19,,,1.465431219,,2.151700748,,175.5441176,6168,R,3,,3
-180004,202002,100,,26,,,,,1.627795166,1.933884446,166.0073529,11794.76123,BI,3,3,3
-180004,202003,100,6099,26,,,,,0.612275479,0.604767536,123.8333333,6099,R,3,3,4
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+180001,202001,100,91,9188,,1.340726689,,0.769734514,123.4632353,,3,3,R
+180001,202002,100,91,6853,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,R
+180001,202003,100,91,2418,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,R
+180001,202004,100,91,9291,3.842431762,,2.151700748,,175.5441176,3,,3,R
+180002,202001,100,26,3829,,0.504612546,,0.769734514,123.4632353,,3,3,R
+180002,202002,100,26,7588,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,R
+180002,202003,100,26,7335,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,R
+180002,202004,100,26,8415,1.147239264,,2.151700748,,175.5441176,3,,3,R
+180003,202001,100,19,3774,,0.463864307,,0.769734514,123.4632353,,3,3,R
+180003,202002,100,19,8136,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,R
+180003,202003,100,19,4209,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,R
+180003,202004,100,19,6168,1.465431219,,2.151700748,,175.5441176,3,,3,R
+180004,202002,100,26,11794.76123,,,1.627795166,1.933884446,166.0073529,3,3,3,BI
+180004,202003,100,26,6099,,,0.612275479,0.604767536,123.8333333,3,3,4,R
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index e725b27a..56992f3e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-190001,202001,100,9261,95,,,,1.853682946,,0.9214,50.3694,9261,R,,3,4,,1.428812335,96.16299559
-190001,202002,100,4996,95,,,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,3,3,3,0.86670161,1.528894599,76.92045455
-190001,202003,100,1480,95,,,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,3,4,4,0.733999278,3.123947916,95.83333333
-190001,202004,100,4350,95,,,2.939189189,,1.113,,110.5473,4350,R,4,,5,3.974249601,,87.62068966
-190002,202001,100,2433,17,,,,0.562673451,,0.9214,50.3694,2433,R,,3,4,,1.428812335,96.16299559
-190002,202002,100,4324,17,,,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,3,3,3,0.86670161,1.528894599,76.92045455
-190002,202003,100,6598,17,,,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,3,4,4,0.733999278,3.123947916,95.83333333
-190002,202004,100,700,17,,,11.26857143,,1.113,,110.5473,700,R,4,,5,3.974249601,,87.62068966
-190003,202001,100,7888,64,,,,1.870080607,,0.9214,50.3694,7888,R,,3,4,,1.428812335,96.16299559
-190003,202002,100,4218,64,,,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,3,3,3,0.86670161,1.528894599,76.92045455
-190003,202003,100,7591,64,,,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,3,4,4,0.733999278,3.123947916,95.83333333
-190003,202004,100,4077,64,,,0.537083388,,1.113,,110.5473,4077,R,4,,5,3.974249601,,87.62068966
-190004,202001,100,2247,51,,,,,,0.9214,50.3694,2247,R,,3,4,,1.428812335,96.16299559
-190004,202002,100,,51,,,,,0.8521,1.5274,121.4187,1914.6687,FIR,3,3,3,0.86670161,1.528894599,76.92045455
-190004,202003,100,,51,,,,,0.9685,1.8795,89.3761,1854.356636,FIR,3,4,4,0.733999278,3.123947916,95.83333333
-190004,202004,100,8608,51,,,,,1.113,,110.5473,8608,R,4,,5,3.974249601,,87.62068966
-190005,202001,100,,34,,,,,,0.9214,50.3694,6271.13538,BI,,3,4,,1.428812335,96.16299559
-190005,202002,100,,34,,,,,0.8521,1.5274,121.4187,6806.0944,BI,3,3,3,0.86670161,1.528894599,76.92045455
-190005,202003,100,4456,34,,,,0.867939229,0.9685,1.8795,89.3761,4456,R,3,4,4,0.733999278,3.123947916,95.83333333
-190005,202004,100,5134,34,,,1.152154399,,1.113,,110.5473,5134,R,4,,5,3.974249601,,87.62068966
-190006,202001,100,,8,,,,,,0.9214,50.3694,402.9552,C,,3,4,,1.428812335,96.16299559
-190006,202002,100,,8,,,,,0.8521,1.5274,121.4187,343.3581259,FIC,3,3,3,0.86670161,1.528894599,76.92045455
-190006,202003,100,,8,,,,,0.9685,1.8795,89.3761,332.542345,FIC,3,4,4,0.733999278,3.123947916,95.83333333
-190006,202004,100,,8,,,,,1.113,,110.5473,370.1196299,FIC,4,,5,3.974249601,,87.62068966
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+190001,202001,100,95,9261,,1.853682946,,0.9214,50.3694,,3,4,R
+190001,202002,100,95,4996,0.53946658,3.375675676,0.8521,1.5274,121.4187,3,3,3,R
+190001,202003,100,95,1480,0.29623699,0.340229885,0.9685,1.8795,89.3761,3,4,4,R
+190001,202004,100,95,4350,2.939189189,,1.113,,110.5473,4,,5,R
+190002,202001,100,17,2433,,0.562673451,,0.9214,50.3694,,3,4,R
+190002,202002,100,17,4324,1.525901943,0.655350106,0.8521,1.5274,121.4187,3,3,3,R
+190002,202003,100,17,6598,0.106092755,9.425714286,0.9685,1.8795,89.3761,3,4,4,R
+190002,202004,100,17,700,11.26857143,,1.113,,110.5473,4,,5,R
+190003,202001,100,64,7888,,1.870080607,,0.9214,50.3694,,3,4,R
+190003,202002,100,64,4218,0.534736308,0.555658016,0.8521,1.5274,121.4187,3,3,3,R
+190003,202003,100,64,7591,1.799668089,1.861908266,0.9685,1.8795,89.3761,3,4,4,R
+190003,202004,100,64,4077,0.537083388,,1.113,,110.5473,4,,5,R
+190004,202001,100,51,2247,,,,0.9214,50.3694,,3,4,R
+190004,202002,100,51,1914.6687,,,0.8521,1.5274,121.4187,3,3,3,FIR
+190004,202003,100,51,1854.356636,,,0.9685,1.8795,89.3761,3,4,4,FIR
+190004,202004,100,51,8608,,,1.113,,110.5473,4,,5,R
+190005,202001,100,34,6271.13538,,,,0.9214,50.3694,,3,4,BI
+190005,202002,100,34,6806.0944,,,0.8521,1.5274,121.4187,3,3,3,BI
+190005,202003,100,34,4456,,0.867939229,0.9685,1.8795,89.3761,3,4,4,R
+190005,202004,100,34,5134,1.152154399,,1.113,,110.5473,4,,5,R
+190006,202001,100,8,402.9552,,,,0.9214,50.3694,,3,4,C
+190006,202002,100,8,343.3581259,,,0.8521,1.5274,121.4187,3,3,3,FIC
+190006,202003,100,8,332.542345,,,0.9685,1.8795,89.3761,3,4,4,FIC
+190006,202004,100,8,370.1196299,,,1.113,,110.5473,4,,5,FIC
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index 1e50ba40..285c002a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-200001,202001,100,7788,56,,,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4
-200001,202002,100,6169,56,,,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4
-200001,202003,100,6156,56,,,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4
-200001,202004,100,1577,56,,,0.25617284,,0.276010255,,42.68681319,1577,R,4,,4
-200002,202001,100,6533,75,,,,0.806244601,,0.597514698,71.63436123,6533,R,,4,4
-200002,202002,100,8103,75,,,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4
-200002,202003,100,5860,75,,,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4
-200002,202004,100,2575,75,,,0.439419795,,0.276010255,,42.68681319,2575,R,4,,4
-200003,202001,100,56,10,,,,0.011249498,,0.597514698,71.63436123,56,R,,4,4
-200003,202002,100,4978,10,,,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4
-200003,202003,100,8777,10,,,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4
-200003,202004,100,906,10,,,0.103224336,,0.276010255,,42.68681319,906,R,4,,4
-200004,202001,100,1884,86,,,,0.310123457,,0.597514698,71.63436123,1884,R,,4,4
-200004,202002,100,6075,86,,,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4
-200004,202003,100,,86,,,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4
-200004,202004,100,,86,,,,,0.276010255,,42.68681319,1947.413826,FIR,4,,4
-200005,202001,100,,6,,,,,,0.597514698,71.63436123,429.8061674,C,,4,4
-200005,202002,100,,6,,,,,23.53745347,0.984013482,111.5638767,10116.54267,FIC,4,3,4
-200005,202003,100,,6,,,,,1.161413175,4.785815599,163.0494505,11749.48594,FIC,3,4,4
-200005,202004,100,,6,,,,,0.276010255,,42.68681319,3242.978611,FIC,4,,4
-200006,202001,100,,41,,,,,,0.597514698,71.63436123,8740.605259,BI,,4,4
-200006,202002,100,,41,,,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4
-200006,202003,100,8882,41,,,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4
-200006,202004,100,2711,41,,,0.305224049,,0.276010255,,42.68681319,2711,R,4,,4
-200007,202001,200,2439,4,,,,0.252093023,,2.163456777,132.3214286,2439,R,,3,4
-200007,202002,200,9675,4,,,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5
-200007,202003,200,7003,4,,,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4
-200007,202004,200,595,4,,,0.084963587,,0.197315737,,99.37735849,595,R,3,,3
-200008,202001,200,1849,4,,,,0.287290242,,2.163456777,132.3214286,1849,R,,3,4
-200008,202002,200,6436,4,,,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5
-200008,202003,200,9709,4,,,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4
-200008,202004,200,2727,4,,,0.280873416,,0.197315737,,99.37735849,2727,R,3,,3
-200009,202001,200,8742,45,,,,5.950987066,,2.163456777,132.3214286,8742,R,,3,4
-200009,202002,200,1469,45,,,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5
-200009,202003,200,8602,45,,,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4
-200009,202004,200,1945,45,,,0.226110207,,0.197315737,,99.37735849,1945,R,3,,3
-200010,202001,200,,85,,,,,,2.163456777,132.3214286,14038.67103,BI,,3,4
-200010,202002,200,6489,85,,,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5
-200010,202003,200,1796,85,,,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4
-200010,202004,200,,85,,,,,0.197315737,,99.37735849,354.3790633,FIR,3,,3
-200011,202001,200,,79,,,,,,2.163456777,132.3214286,4166.817753,BI,,3,4
-200011,202002,200,1926,79,,,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5
-200011,202004,200,,79,,,,,0.197315737,,99.37735849,7850.811321,C,3,,3
-200012,202001,200,5495,87,,,,,,2.163456777,132.3214286,5495,R,,3,4
-200012,202002,200,,87,,,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5
-200012,202003,200,,87,,,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4
-200012,202004,200,,87,,,,,0.197315737,,99.37735849,5755.871742,FIR,3,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+200001,202001,100,56,7788,,1.262441238,,0.597514698,71.63436123,,4,4,R
+200001,202002,100,56,6169,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,R
+200001,202003,100,56,6156,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,R
+200001,202004,100,56,1577,0.25617284,,0.276010255,,42.68681319,4,,4,R
+200002,202001,100,75,6533,,0.806244601,,0.597514698,71.63436123,,4,4,R
+200002,202002,100,75,8103,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,R
+200002,202003,100,75,5860,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,R
+200002,202004,100,75,2575,0.439419795,,0.276010255,,42.68681319,4,,4,R
+200003,202001,100,10,56,,0.011249498,,0.597514698,71.63436123,,4,4,R
+200003,202002,100,10,4978,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,R
+200003,202003,100,10,8777,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,R
+200003,202004,100,10,906,0.103224336,,0.276010255,,42.68681319,4,,4,R
+200004,202001,100,86,1884,,0.310123457,,0.597514698,71.63436123,,4,4,R
+200004,202002,100,86,6075,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,R
+200004,202003,100,86,7055.585041,,,1.161413175,4.785815599,163.0494505,3,4,4,FIR
+200004,202004,100,86,1947.413826,,,0.276010255,,42.68681319,4,,4,FIR
+200005,202001,100,6,429.8061674,,,,0.597514698,71.63436123,,4,4,C
+200005,202002,100,6,10116.54267,,,23.53745347,0.984013482,111.5638767,4,3,4,FIC
+200005,202003,100,6,11749.48594,,,1.161413175,4.785815599,163.0494505,3,4,4,FIC
+200005,202004,100,6,3242.978611,,,0.276010255,,42.68681319,4,,4,FIC
+200006,202001,100,41,8740.605259,,,,0.597514698,71.63436123,,4,4,BI
+200006,202002,100,41,8740.007744,,,23.53745347,0.984013482,111.5638767,4,3,4,BI
+200006,202003,100,41,8882,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,R
+200006,202004,100,41,2711,0.305224049,,0.276010255,,42.68681319,4,,4,R
+200007,202001,200,4,2439,,0.252093023,,2.163456777,132.3214286,,3,4,R
+200007,202002,200,4,9675,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,R
+200007,202003,200,4,7003,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,R
+200007,202004,200,4,595,0.084963587,,0.197315737,,99.37735849,3,,3,R
+200008,202001,200,4,1849,,0.287290242,,2.163456777,132.3214286,,3,4,R
+200008,202002,200,4,6436,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,R
+200008,202003,200,4,9709,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,R
+200008,202004,200,4,2727,0.280873416,,0.197315737,,99.37735849,3,,3,R
+200009,202001,200,45,8742,,5.950987066,,2.163456777,132.3214286,,3,4,R
+200009,202002,200,45,1469,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,R
+200009,202003,200,45,8602,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,R
+200009,202004,200,45,1945,0.226110207,,0.197315737,,99.37735849,3,,3,R
+200010,202001,200,85,14038.67103,,,,2.163456777,132.3214286,,3,4,BI
+200010,202002,200,85,6489,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,R
+200010,202003,200,85,1796,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,R
+200010,202004,200,85,354.3790633,,,0.197315737,,99.37735849,3,,3,FIR
+200011,202001,200,79,4166.817753,,,,2.163456777,132.3214286,,3,4,BI
+200011,202002,200,79,1926,,,2.53854315,1.457061014,119.7926267,3,4,5,R
+200011,202004,200,79,7850.811321,,,0.197315737,,99.37735849,3,,3,C
+200012,202001,200,87,5495,,,,2.163456777,132.3214286,,3,4,R
+200012,202002,200,87,13949.29461,,,2.53854315,1.457061014,119.7926267,3,4,5,FIR
+200012,202003,200,87,29170.87018,,,2.091207548,6.584230902,196.4492754,4,3,4,FIR
+200012,202004,200,87,5755.871742,,,0.197315737,,99.37735849,3,,3,FIR
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 6d76d7a8..0937c7d8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-210001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
-210001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
-210001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
-210002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
-210002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
-210002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
-210003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
-210003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
-210003,202003,2,314,12,,,1.176029963,,1.174002242,,50,314,R,2,,2
-210004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
-210004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
-210004,202003,2,736,9,,,1.171974522,,1.174002242,,50,736,R,2,,2
-210005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
-210005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,767.1428572,C,2,2,2
-210005,202003,2,,18,,,,,1.174002242,,50,900.6274342,FIC,2,,2
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+210001,202001,1,10,547,,1.511049724,,1.087985595,13.17948718,,2,3,R
+210001,202002,1,10,362,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,R
+210001,202003,1,10,895,2.472375691,,1.42292432,,18.48333333,2,,2,R
+210002,202001,1,50,381,,0.664921466,,1.087985595,13.17948718,,2,3,R
+210002,202002,1,50,573,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,R
+210002,202003,1,50,214,0.373472949,,1.42292432,,18.48333333,2,,2,R
+210003,202001,2,12,961,,3.599250936,,2.241504449,72.19047619,,2,2,R
+210003,202002,2,12,267,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,R
+210003,202003,2,12,314,1.176029963,,1.174002242,,50,2,,2,R
+210004,202001,2,9,555,,0.883757962,,2.241504449,72.19047619,,2,2,R
+210004,202002,2,9,628,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,R
+210004,202003,2,9,736,1.171974522,,1.174002242,,50,2,,2,R
+210005,202001,1,18,100,,,,1.087985595,13.17948718,,2,3,R
+210005,202002,2,18,767.1428572,,,0.70468356,0.85178967,42.61904762,2,2,2,C
+210005,202003,2,18,900.6274342,,,1.174002242,,50,2,,2,FIC
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 6e38a6c7..49ea86a7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-220001,202001,1,547,10,,,,1.511049724,,1.087985595,15.46666667,547,R,,2,2
-220001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
-220001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,
-220002,202001,1,381,50,,,,0.664921466,,1.087985595,15.46666667,381,R,,2,2
-220002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
-220002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
-220003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
-220003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
-220003,202003,2,314,12,,,1.176029963,,1.174002242,,29.48717949,314,R,2,,3
-220004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
-220004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
-220004,202003,2,736,9,,,1.171974522,,1.174002242,,29.48717949,736,R,2,,3
-220005,202001,1,,18,,,,,,1.087985595,15.46666667,278.4,C,,2,2
-220005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,85.17896705,BI,2,2,2
-220005,202003,2,100,18,,,,,1.174002242,,29.48717949,100,R,2,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+220001,202001,1,10,547,,1.511049724,,1.087985595,15.46666667,,2,2,R
+220001,202002,1,10,362,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,R
+220001,202003,1,10,895,2.472375691,,1.42292432,,18.48333333,2,,,R
+220002,202001,1,50,381,,0.664921466,,1.087985595,15.46666667,,2,2,R
+220002,202002,1,50,573,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,R
+220002,202003,1,50,214,0.373472949,,1.42292432,,18.48333333,2,,2,R
+220003,202001,2,12,961,,3.599250936,,2.241504449,72.19047619,,2,2,R
+220003,202002,2,12,267,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,R
+220003,202003,2,12,314,1.176029963,,1.174002242,,29.48717949,2,,3,R
+220004,202001,2,9,555,,0.883757962,,2.241504449,72.19047619,,2,2,R
+220004,202002,2,9,628,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,R
+220004,202003,2,9,736,1.171974522,,1.174002242,,29.48717949,2,,3,R
+220005,202001,1,18,278.4,,,,1.087985595,15.46666667,,2,2,C
+220005,202002,2,18,85.17896705,,,0.70468356,0.85178967,42.61904762,2,2,2,BI
+220005,202003,2,18,100,,,1.174002242,,29.48717949,2,,3,R
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 14c506eb..8e638f12 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-230001,202001,1,547,10,,,,1.511049724,,1.087985595,15.46666667,547,R,,2,2
-230001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
-230001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
-230002,202001,1,381,50,,,,0.664921466,,1.087985595,15.46666667,381,R,,2,2
-230002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
-230002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
-230003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
-230003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
-230003,202003,2,314,12,,,1.176029963,,1.174002242,,50,314,R,2,,2
-230004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
-230004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
-230004,202003,2,736,9,,,1.171974522,,1.174002242,,50,736,R,2,,2
-230005,202001,1,,18,,,,,,1.087985595,15.46666667,278.4,C,,2,2
-230005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2
-230005,202003,2,,18,,,,,1.174002242,,50,900.6274345,FIC,2,,2
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+230001,202001,1,10,547,,1.511049724,,1.087985595,15.46666667,,2,2,R
+230001,202002,1,10,362,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,R
+230001,202003,1,10,895,2.472375691,,1.42292432,,18.48333333,2,,2,R
+230002,202001,1,50,381,,0.664921466,,1.087985595,15.46666667,,2,2,R
+230002,202002,1,50,573,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,R
+230002,202003,1,50,214,0.373472949,,1.42292432,,18.48333333,2,,2,R
+230003,202001,2,12,961,,3.599250936,,2.241504449,72.19047619,,2,2,R
+230003,202002,2,12,267,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,R
+230003,202003,2,12,314,1.176029963,,1.174002242,,50,2,,2,R
+230004,202001,2,9,555,,0.883757962,,2.241504449,72.19047619,,2,2,R
+230004,202002,2,9,628,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,R
+230004,202003,2,9,736,1.171974522,,1.174002242,,50,2,,2,R
+230005,202001,1,18,278.4,,,,1.087985595,15.46666667,,2,2,C
+230005,202002,2,18,767.1428571,,,0.70468356,0.85178967,42.61904762,2,2,2,C
+230005,202003,2,18,900.6274345,,,1.174002242,,50,2,,2,FIC
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 4c950c96..49a1fb60 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-240001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
-240001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
-240001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
-240002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
-240002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
-240002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
-240003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
-240003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2
-240003,202003,2,314,12,,,1.176029963,,1.174002242,,30.76923077,314,R,2,,3
-240004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
-240004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2
-240004,202003,2,736,9,,,1.171974522,,1.174002242,,30.76923077,736,R,2,,3
-240005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
-240005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,127.7684506,BI,2,2,2
-240005,202003,2,150,18,,,,,1.174002242,,30.76923077,150,R,2,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+240001,202001,1,10,547,,1.511049724,,1.087985595,13.17948718,,2,3,R
+240001,202002,1,10,362,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,R
+240001,202003,1,10,895,2.472375691,,1.42292432,,18.48333333,2,,2,R
+240002,202001,1,50,381,,0.664921466,,1.087985595,13.17948718,,2,3,R
+240002,202002,1,50,573,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,R
+240002,202003,1,50,214,0.373472949,,1.42292432,,18.48333333,2,,2,R
+240003,202001,2,12,961,,3.599250936,,2.241504449,72.19047619,,2,2,R
+240003,202002,2,12,267,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,R
+240003,202003,2,12,314,1.176029963,,1.174002242,,30.76923077,2,,3,R
+240004,202001,2,9,555,,0.883757962,,2.241504449,72.19047619,,2,2,R
+240004,202002,2,9,628,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,R
+240004,202003,2,9,736,1.171974522,,1.174002242,,30.76923077,2,,3,R
+240005,202001,1,18,100,,,,1.087985595,13.17948718,,2,3,R
+240005,202002,2,18,127.7684506,,,0.70468356,0.85178967,42.61904762,2,2,2,BI
+240005,202003,2,18,150,,,1.174002242,,30.76923077,2,,3,R
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 84f757d4..cf2db4dd 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,question,other,lower_trim,upper_trim,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-250001,202001,1,547,10,,,,1.511049724,,1.087985595,13.17948718,547,R,,2,3
-250001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2
-250001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2
-250002,202001,1,381,50,,,,0.664921466,,1.087985595,13.17948718,381,R,,2,3
-250002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2
-250002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2
-250003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2
-250003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,267,R,2,3,3
-250003,202003,2,314,12,,,1.176029963,,1.040732678,,33.07692308,314,R,3,,3
-250004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2
-250004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,628,R,2,3,3
-250004,202003,2,736,9,,,1.171974522,,1.040732678,,33.07692308,736,R,3,,3
-250005,202001,1,100,18,,,,,,1.087985595,13.17948718,100,R,,2,3
-250005,202002,2,310,18,,,,1.291666667,0.70468356,0.998415336,30.8974359,310,R,2,3,3
-250005,202003,2,240,18,,,0.774193548,,1.040732678,,33.07692308,240,R,3,,3
-250006,202001,1,,22,,,,,,1.087985595,13.17948718,289.9487179,C,,2,3
-250006,202002,1,,22,,,,,1.082864299,1.541019684,15.58333333,313.9751153,FIC,2,2,2
-250006,202003,1,,22,,,,,1.42292432,,18.48333333,446.7628274,FIC,2,,2
-250007,202001,2,,52,,,,,,2.241504449,72.19047619,3753.904762,C,,2,2
-250007,202002,2,,52,,,,,0.70468356,0.998415336,30.8974359,2645.314971,FIC,2,3,3
-250007,202003,2,,52,,,,,1.040732678,,33.07692308,2753.065733,FIC,3,,3
+identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
+250001,202001,1,10,547,,1.511049724,,1.087985595,13.17948718,,2,3,R
+250001,202002,1,10,362,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,R
+250001,202003,1,10,895,2.472375691,,1.42292432,,18.48333333,2,,2,R
+250002,202001,1,50,381,,0.664921466,,1.087985595,13.17948718,,2,3,R
+250002,202002,1,50,573,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,R
+250002,202003,1,50,214,0.373472949,,1.42292432,,18.48333333,2,,2,R
+250003,202001,2,12,961,,3.599250936,,2.241504449,72.19047619,,2,2,R
+250003,202002,2,12,267,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,R
+250003,202003,2,12,314,1.176029963,,1.040732678,,33.07692308,3,,3,R
+250004,202001,2,9,555,,0.883757962,,2.241504449,72.19047619,,2,2,R
+250004,202002,2,9,628,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,R
+250004,202003,2,9,736,1.171974522,,1.040732678,,33.07692308,3,,3,R
+250005,202001,1,18,100,,,,1.087985595,13.17948718,,2,3,R
+250005,202002,2,18,310,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,R
+250005,202003,2,18,240,0.774193548,,1.040732678,,33.07692308,3,,3,R
+250006,202001,1,22,289.9487179,,,,1.087985595,13.17948718,,2,3,C
+250006,202002,1,22,313.9751153,,,1.082864299,1.541019684,15.58333333,2,2,2,FIC
+250006,202003,1,22,446.7628274,,,1.42292432,,18.48333333,2,,2,FIC
+250007,202001,2,52,3753.904762,,,,2.241504449,72.19047619,,2,2,C
+250007,202002,2,52,2645.314971,,,0.70468356,0.998415336,30.8974359,2,3,3,FIC
+250007,202003,2,52,2753.065733,,,1.040732678,,33.07692308,3,,3,FIC

From 6998e83d3f3b27c7a4919c313aad7ad2850395e6 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 3 Mar 2023 16:25:22 +0000
Subject: [PATCH 122/531] Filled test data

---
 .../methodology_scenarios/01_C_output.csv     | 10 +-
 .../methodology_scenarios/02_C_FI_output.csv  | 18 ++--
 .../03_R_R_FI_output.csv                      | 26 ++---
 .../04_R_R_FI_FI_output.csv                   | 34 +++----
 .../05_R_R_FI_FI_FI_output.csv                | 42 ++++----
 .../06_BI_BI_R_output.csv                     | 26 ++---
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          | 58 +++++------
 .../methodology_scenarios/08_R_R_R_output.csv | 26 ++---
 .../09_R_NS_C_output.csv                      | 24 ++---
 .../10_C_FI_NS_R_output.csv                   | 32 +++----
 .../11_R_R_FI-BI_R_R_output.csv               | 50 +++++-----
 .../12_C_FI_FI_FI_FI_output.csv               | 42 ++++----
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          | 56 +++++------
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          | 56 +++++------
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          | 56 +++++------
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv | 70 +++++++-------
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv | 70 +++++++-------
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          | 56 +++++------
 .../17_NS_R_FI_NS_output.csv                  | 30 +++---
 .../18_NS_BI_R_NS_output.csv                  | 30 +++---
 .../19_link_columns_output.csv                | 50 +++++-----
 .../20_mixed_data_output.csv                  | 96 +++++++++----------
 .../21_class_change_R_C_FI_output.csv         | 32 +++----
 .../22_class_change_C_BI_R_output.csv         | 32 +++----
 .../23_class_change_C_C_FI_output.csv         | 32 +++----
 .../24_class_change_R_BI_R_output.csv         | 32 +++----
 .../25_class_change_C_FI_FI_output.csv        | 44 ++++-----
 27 files changed, 565 insertions(+), 565 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index 2d3f6cd3..7171f9d9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-10001,202001,100,1,3892,,,,,147.8876404,,,3,R
-10002,202001,100,75,3873,,,,,147.8876404,,,3,R
-10003,202001,100,13,5397,,,,,147.8876404,,,3,R
-10004,202001,100,71,10500.02247,,,,,147.8876404,,,3,C
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+10001,202001,100,1,3892,R,,,1.0,1.0,147.8876404,0,0,3
+10002,202001,100,75,3873,R,,,1.0,1.0,147.8876404,0,0,3
+10003,202001,100,13,5397,R,,,1.0,1.0,147.8876404,0,0,3
+10004,202001,100,71,10500.02247,C,,,1.0,1.0,147.8876404,0,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index b96d633d..1021392e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-20001,202001,100,35,2536,,0.306169262,,3.027097983,93.98369565,,3,3,R
-20001,202002,100,35,8283,3.266167192,,1.255768523,,66.5326087,3,,3,R
-20002,202001,100,72,9113,,3.068350168,,3.027097983,93.98369565,,3,3,R
-20002,202002,100,72,2970,0.325908043,,1.255768523,,66.5326087,3,,3,R
-20003,202001,100,77,5644,,5.70677452,,3.027097983,93.98369565,,3,3,R
-20003,202002,100,77,989,0.175230333,,1.255768523,,66.5326087,3,,3,R
-20004,202001,100,30,2819.51087,,,,3.027097983,93.98369565,,3,3,C
-20004,202002,100,30,3540.653,,,1.255768523,,66.5326087,3,,3,FIC
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+20001,202001,100,35,2536,R,,0.306169262,1.0,3.027097983,93.98369565,0,3,3
+20001,202002,100,35,8283,R,3.266167192,,1.255768523,1.0,66.5326087,3,0,3
+20002,202001,100,72,9113,R,,3.068350168,1.0,3.027097983,93.98369565,0,3,3
+20002,202002,100,72,2970,R,0.325908043,,1.255768523,1.0,66.5326087,3,0,3
+20003,202001,100,77,5644,R,,5.70677452,1.0,3.027097983,93.98369565,0,3,3
+20003,202002,100,77,989,R,0.175230333,,1.255768523,1.0,66.5326087,3,0,3
+20004,202001,100,30,2819.51087,C,,,1.0,3.027097983,93.98369565,0,3,3
+20004,202002,100,30,3540.653,FIC,,,1.255768523,1.0,66.5326087,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 2048b9d6..53b865c3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-30001,202001,100,51,8444,,1.129481006,,1.655006,120.1991,,4,4,R
-30001,202002,100,51,7476,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4,3,4,R
-30001,202003,100,51,2003,0.267924024,,1.526947,,103.0154,3,,3,R
-30002,202001,100,72,9343,,1.195062676,,1.655006,120.1991,,4,4,R
-30002,202002,100,72,7818,0.836776196,1.596487645,8.743054929,1.407609,90.8436,4,3,4,R
-30002,202003,100,72,4897,0.626375032,,1.526947,,103.0154,3,,3,R
-30003,202001,100,7,7511,,4.265190233,,1.655006,120.1991,,4,4,R
-30003,202002,100,7,1761,0.234456131,0.271256932,8.743054929,1.407609,90.8436,4,3,4,R
-30003,202003,100,7,6492,3.686541738,,1.526947,,103.0154,3,,3,R
-30004,202001,100,81,64,,0.030288689,,1.655006,120.1991,,4,4,R
-30004,202002,100,81,2113,33.015625,,8.743054929,1.407609,90.8436,4,3,4,R
-30004,202003,100,81,3226.439011,,,1.526947,,103.0154,3,,3,FIR
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+30001,202001,100,51,8444,R,,1.129481006,1.0,1.655006,120.1991,0,4,4
+30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4,3,4
+30001,202003,100,51,2003,R,0.267924024,,1.526947,1.0,103.0154,3,0,3
+30002,202001,100,72,9343,R,,1.195062676,1.0,1.655006,120.1991,0,4,4
+30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.407609,90.8436,4,3,4
+30002,202003,100,72,4897,R,0.626375032,,1.526947,1.0,103.0154,3,0,3
+30003,202001,100,7,7511,R,,4.265190233,1.0,1.655006,120.1991,0,4,4
+30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.407609,90.8436,4,3,4
+30003,202003,100,7,6492,R,3.686541738,,1.526947,1.0,103.0154,3,0,3
+30004,202001,100,81,64,R,,0.030288689,1.0,1.655006,120.1991,0,4,4
+30004,202002,100,81,2113,R,33.015625,,8.743054929,1.407609,90.8436,4,3,4
+30004,202003,100,81,3226.439011,FIR,,,1.526947,1.0,103.0154,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index f6d9fdc9..8d503bad 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-40001,202001,100,35,9491,,1.984319465,,2.053506032,128.0208333,,4,4,R
-40001,202002,100,35,4783,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,R
-40001,202003,100,35,7902,1.652101192,1.609040929,3.003997558,1.551291583,115.6929825,3,3,3,R
-40001,202004,100,35,4911,0.621488231,,0.645360538,,73.71052632,3,,3,R
-40002,202001,100,63,2095,,4.739819005,,2.053506032,128.0208333,,4,4,R
-40002,202002,100,63,442,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,R
-40002,202003,100,63,3136,7.095022624,1.482742317,3.003997558,1.551291583,115.6929825,3,3,3,R
-40002,202004,100,63,2115,0.67442602,,0.645360538,,73.71052632,3,,3,R
-40003,202001,100,16,7863,,0.968230513,,2.053506032,128.0208333,,4,4,R
-40003,202002,100,16,8121,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,R
-40003,202003,100,16,2151,0.264868859,1.562091503,3.003997558,1.551291583,115.6929825,3,3,3,R
-40003,202004,100,16,1377,0.640167364,,0.645360538,,73.71052632,3,,3,R
-40004,202001,100,78,5131,,0.521655144,,2.053506032,128.0208333,,4,4,R
-40004,202002,100,78,9836,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,R
-40004,202003,100,78,29547.31998,,,3.003997558,1.551291583,115.6929825,3,3,3,FIR
-40004,202004,100,78,19068.67433,,,0.645360538,,73.71052632,3,,3,FIR
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+40001,202001,100,35,9491,R,,1.984319465,1.0,2.053506032,128.0208333,0,4,4
+40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4
+40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.6929825,3,3,3
+40001,202004,100,35,4911,R,0.621488231,,0.645360538,1.0,73.71052632,3,0,3
+40002,202001,100,63,2095,R,,4.739819005,1.0,2.053506032,128.0208333,0,4,4
+40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4
+40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.6929825,3,3,3
+40002,202004,100,63,2115,R,0.67442602,,0.645360538,1.0,73.71052632,3,0,3
+40003,202001,100,16,7863,R,,0.968230513,1.0,2.053506032,128.0208333,0,4,4
+40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4
+40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.6929825,3,3,3
+40003,202004,100,16,1377,R,0.640167364,,0.645360538,1.0,73.71052632,3,0,3
+40004,202001,100,78,5131,R,,0.521655144,1.0,2.053506032,128.0208333,0,4,4
+40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4
+40004,202003,100,78,29547.31998,FIR,,,3.003997558,1.551291583,115.6929825,3,3,3
+40004,202004,100,78,19068.67433,FIR,,,0.645360538,1.0,73.71052632,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
index 8d62e190..960618f7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-50001,202001,100,59,6362,,0.744790447,,1.103126475,70.34328358,,4,4,R
-50001,202002,100,59,8542,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,R
-50001,202003,100,59,5623,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,R
-50001,202004,100,59,7769,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,R
-50001,202005,100,59,4687,0.603295147,,0.49999873,,49.9122807,3,,3,R
-50002,202001,100,36,4851,,0.545423881,,1.103126475,70.34328358,,4,4,R
-50002,202002,100,36,8894,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,R
-50002,202003,100,36,3372,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,R
-50002,202004,100,36,3522,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,R
-50002,202005,100,36,2327,0.660704145,,0.49999873,,49.9122807,3,,3,R
-50003,202001,100,76,2238,,2.910273082,,1.103126475,70.34328358,,4,4,R
-50003,202002,100,76,769,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,R
-50003,202003,100,76,7722,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,R
-50003,202004,100,76,6445,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,R
-50003,202005,100,76,1521,0.235996897,,0.49999873,,49.9122807,3,,3,R
-50004,202001,100,30,688,,0.21201849,,1.103126475,70.34328358,,4,4,R
-50004,202002,100,30,3245,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,R
-50004,202003,100,30,11983.80797,,,3.693007078,0.959774209,97.76023392,3,3,3,FIR
-50004,202004,100,30,13025.43707,,,1.086919709,2.469481356,103.7192982,3,3,3,FIR
-50004,202005,100,30,6512.701992,,,0.49999873,,49.9122807,3,,3,FIR
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+50001,202001,100,59,6362,R,,0.744790447,1.0,1.103126475,70.34328358,0,4,4
+50001,202002,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4
+50001,202003,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3
+50001,202004,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3
+50001,202005,100,59,4687,R,0.603295147,,0.49999873,1.0,49.9122807,3,0,3
+50002,202001,100,36,4851,R,,0.545423881,1.0,1.103126475,70.34328358,0,4,4
+50002,202002,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4
+50002,202003,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3
+50002,202004,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3
+50002,202005,100,36,2327,R,0.660704145,,0.49999873,1.0,49.9122807,3,0,3
+50003,202001,100,76,2238,R,,2.910273082,1.0,1.103126475,70.34328358,0,4,4
+50003,202002,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4
+50003,202003,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3
+50003,202004,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3
+50003,202005,100,76,1521,R,0.235996897,,0.49999873,1.0,49.9122807,3,0,3
+50004,202001,100,30,688,R,,0.21201849,1.0,1.103126475,70.34328358,0,4,4
+50004,202002,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4
+50004,202003,100,30,11983.80797,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3
+50004,202004,100,30,13025.43707,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3
+50004,202005,100,30,6512.701992,FIR,,,0.49999873,1.0,49.9122807,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index 3b1cb9b5..df455434 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-60001,202001,100,15,5077,,0.648403576,,7.141605449,117.9107143,,3,3,R
-60001,202002,100,15,7830,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,R
-60001,202003,100,15,1046,0.133588761,,7.391291354,,100.9130435,3,,4,R
-60002,202001,100,71,1588,,1.309150866,,7.141605449,117.9107143,,3,3,R
-60002,202002,100,71,1213,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,R
-60002,202003,100,71,3807,3.138499588,,7.391291354,,100.9130435,3,,4,R
-60003,202001,100,26,6541,,19.4672619,,7.141605449,117.9107143,,3,3,R
-60003,202002,100,26,336,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,R
-60003,202003,100,26,6351,18.90178571,,7.391291354,,100.9130435,3,,4,R
-60004,202001,100,3,7500.429481,,,,7.141605449,117.9107143,,3,3,BI
-60004,202002,100,3,1050.244169,,,0.785823852,2.619062766,83.74107143,3,3,3,BI
-60004,202003,100,3,401,,,7.391291354,,100.9130435,3,,4,R
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+60001,202001,100,15,5077,R,,0.648403576,1.0,7.141605449,117.9107143,0,3,3
+60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3
+60001,202003,100,15,1046,R,0.133588761,,7.391291354,1.0,100.9130435,3,0,4
+60002,202001,100,71,1588,R,,1.309150866,1.0,7.141605449,117.9107143,0,3,3
+60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3
+60002,202003,100,71,3807,R,3.138499588,,7.391291354,1.0,100.9130435,3,0,4
+60003,202001,100,26,6541,R,,19.4672619,1.0,7.141605449,117.9107143,0,3,3
+60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3
+60003,202003,100,26,6351,R,18.90178571,,7.391291354,1.0,100.9130435,3,0,4
+60004,202001,100,3,7500.429481,BI,,,1.0,7.141605449,117.9107143,0,3,3
+60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3
+60004,202003,100,3,401,R,,,7.391291354,1.0,100.9130435,3,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 8f076107..af6ab9a1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-70001,202001,100,39,5951,,3.280595369,,47.92201545,107.48,,3,3,R
-70001,202002,100,39,1814,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,R
-70001,202003,100,39,734,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,R
-70001,202004,100,39,96,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,R
-70001,202005,100,39,9086,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,R
-70001,202006,100,39,3949,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,R
-70001,202007,100,39,49,0.012408205,,1.593348776,,70.24,3,,3,R
-70002,202001,100,94,6705,,139.6875,,47.92201545,107.48,,3,3,R
-70002,202002,100,94,48,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,R
-70002,202003,100,94,5361,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,R
-70002,202004,100,94,8767,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,R
-70002,202005,100,94,9214,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,R
-70002,202006,100,94,7467,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,R
-70002,202007,100,94,3475,0.46538101,,1.593348776,,70.24,3,,3,R
-70003,202001,100,42,6153,,0.797950979,,47.92201545,107.48,,3,3,R
-70003,202002,100,42,7711,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,R
-70003,202003,100,42,5403,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,R
-70003,202004,100,42,7445,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,R
-70003,202005,100,42,7092,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,R
-70003,202006,100,42,2038,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,R
-70003,202007,100,42,8768,4.302257115,,1.593348776,,70.24,3,,3,R
-70004,202001,100,6,392488.3921,,,,47.92201545,107.48,,3,3,BI
-70004,202002,100,6,8190.147856,,,0.521730457,1.30250443,54.70285714,3,3,3,BI
-70004,202003,100,6,6288,,,37.59760599,2.994350985,98.26519337,3,3,4,R
-70004,202004,100,6,6589.944736,,,1.048019201,0.670608989,93.18857143,3,3,3,FIR
-70004,202005,100,6,212304.7472,,,32.21646854,2.338226887,145.0971429,3,3,3,FIR
-70004,202006,100,6,5875,,,0.510795988,27.65768328,106.7900552,3,3,4,R
-70004,202007,100,6,9360.924061,,,1.593348776,,70.24,3,,3,FIR
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+70001,202001,100,39,5951,R,,3.280595369,1.0,47.92201545,107.48,0,3,3
+70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3
+70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4
+70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3
+70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3
+70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4
+70001,202007,100,39,49,R,0.012408205,,1.593348776,1.0,70.24,3,0,3
+70002,202001,100,94,6705,R,,139.6875,1.0,47.92201545,107.48,0,3,3
+70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3
+70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4
+70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3
+70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3
+70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4
+70002,202007,100,94,3475,R,0.46538101,,1.593348776,1.0,70.24,3,0,3
+70003,202001,100,42,6153,R,,0.797950979,1.0,47.92201545,107.48,0,3,3
+70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3
+70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4
+70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3
+70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3
+70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4
+70003,202007,100,42,8768,R,4.302257115,,1.593348776,1.0,70.24,3,0,3
+70004,202001,100,6,392488.3921,BI,,,1.0,47.92201545,107.48,0,3,3
+70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3
+70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4
+70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3
+70004,202005,100,6,212304.7472,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3
+70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4
+70004,202007,100,6,9360.924061,FIR,,,1.593348776,1.0,70.24,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index fa7582cf..b9076029 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-80001,202001,100,91,4042,,1.440998217,,1.856581839,69.14982578,,4,4,R
-80001,202002,100,91,2805,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,R
-80001,202003,100,91,644,0.229590018,,1.59233398,,71.90940767,4,,4,R
-80002,202001,100,85,7138,,3.623350254,,1.856581839,69.14982578,,4,4,R
-80002,202002,100,85,1970,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,R
-80002,202003,100,85,2746,1.393908629,,1.59233398,,71.90940767,4,,4,R
-80003,202001,100,41,2846,,0.801238739,,1.856581839,69.14982578,,4,4,R
-80003,202002,100,41,3552,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,R
-80003,202003,100,41,9015,2.538006757,,1.59233398,,71.90940767,4,,4,R
-80004,202001,100,70,5820,,1.560740145,,1.856581839,69.14982578,,4,4,R
-80004,202002,100,70,3729,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,R
-80004,202003,100,70,8233,2.207830518,,1.59233398,,71.90940767,4,,4,R
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+80001,202001,100,91,4042,R,,1.440998217,1.0,1.856581839,69.14982578,0,4,4
+80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4
+80001,202003,100,91,644,R,0.229590018,,1.59233398,1.0,71.90940767,4,0,4
+80002,202001,100,85,7138,R,,3.623350254,1.0,1.856581839,69.14982578,0,4,4
+80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4
+80002,202003,100,85,2746,R,1.393908629,,1.59233398,1.0,71.90940767,4,0,4
+80003,202001,100,41,2846,R,,0.801238739,1.0,1.856581839,69.14982578,0,4,4
+80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4
+80003,202003,100,41,9015,R,2.538006757,,1.59233398,1.0,71.90940767,4,0,4
+80004,202001,100,70,5820,R,,1.560740145,1.0,1.856581839,69.14982578,0,4,4
+80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4
+80004,202003,100,70,8233,R,2.207830518,,1.59233398,1.0,71.90940767,4,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 3d6e80c8..fb56b0c5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-90001,202001,100,66,2417,,0.304868819,,0.528905137,71.77777778,,3,4,R
-90001,202002,100,66,7928,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,R
-90001,202003,100,66,7319,0.923183653,,2.293928258,,169.3831776,3,,3,R
-90002,202001,100,27,1706,,1.151924375,,0.528905137,71.77777778,,3,4,R
-90002,202002,100,27,1481,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,R
-90002,202003,100,27,8390,5.665091155,,2.293928258,,169.3831776,3,,3,R
-90003,202001,100,14,1069,,0.129922217,,0.528905137,71.77777778,,3,4,R
-90003,202002,100,14,8228,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,R
-90003,202003,100,14,2415,0.293509966,,2.293928258,,169.3831776,3,,3,R
-90004,202001,100,73,7728,,,,,71.77777778,,,4,R
-90004,202003,100,73,12364.97196,,,,,169.3831776,,,3,C
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+90001,202001,100,66,2417,R,,0.304868819,1.0,0.528905137,71.77777778,0,3,4
+90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3
+90001,202003,100,66,7319,R,0.923183653,,2.293928258,1.0,169.3831776,3,0,3
+90002,202001,100,27,1706,R,,1.151924375,1.0,0.528905137,71.77777778,0,3,4
+90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3
+90002,202003,100,27,8390,R,5.665091155,,2.293928258,1.0,169.3831776,3,0,3
+90003,202001,100,14,1069,R,,0.129922217,1.0,0.528905137,71.77777778,0,3,4
+90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3
+90003,202003,100,14,2415,R,0.293509966,,2.293928258,1.0,169.3831776,3,0,3
+90004,202001,100,73,7728,R,,,1.0,1.0,71.77777778,0,0,4
+90004,202003,100,73,12364.97196,C,,,1.0,1.0,169.3831776,0,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index 4ed5311a..31fd6c7a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-100001,202001,100,26,3074,,0.322594186,,1.691693133,179.3296703,,3,3,R
-100001,202002,100,26,9529,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,R
-100001,202003,100,26,615,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,R
-100001,202004,100,26,3540,5.756097561,,6.74787815,,119.1751412,3,,4,R
-100002,202001,100,19,8084,,3.337737407,,1.691693133,179.3296703,,3,3,R
-100002,202002,100,19,2422,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,R
-100002,202003,100,19,3058,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,R
-100002,202004,100,19,5608,1.833878352,,6.74787815,,119.1751412,3,,4,R
-100003,202001,100,46,5161,,1.414747807,,1.691693133,179.3296703,,3,3,R
-100003,202002,100,46,3648,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,R
-100003,202003,100,46,205,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,R
-100003,202004,100,46,2594,12.65365854,,6.74787815,,119.1751412,3,,4,R
-100004,202001,100,86,15422.35165,,,,1.691693133,179.3296703,,3,3,C
-100004,202002,100,86,21109.67176,,,1.368771264,11.36048394,171.4175824,3,3,3,FIC
-100004,202004,100,86,9352,,,6.74787815,,119.1751412,3,3,4,R
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+100001,202001,100,26,3074,R,,0.322594186,1.0,1.691693133,179.3296703,0,3,3
+100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3
+100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3
+100001,202004,100,26,3540,R,5.756097561,,6.74787815,1.0,119.1751412,3,0,4
+100002,202001,100,19,8084,R,,3.337737407,1.0,1.691693133,179.3296703,0,3,3
+100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3
+100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3
+100002,202004,100,19,5608,R,1.833878352,,6.74787815,1.0,119.1751412,3,0,4
+100003,202001,100,46,5161,R,,1.414747807,1.0,1.691693133,179.3296703,0,3,3
+100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3
+100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3
+100003,202004,100,46,2594,R,12.65365854,,6.74787815,1.0,119.1751412,3,0,4
+100004,202001,100,86,15422.35165,C,,,1.0,1.691693133,179.3296703,0,3,3
+100004,202002,100,86,21109.67176,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3
+100004,202004,100,86,9352,R,,,6.74787815,1.0,119.1751412,3,3,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 1e5099f9..8d919c26 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-110001,202001,100,89,9244,,1.036787797,,2.656680299,101.7103175,,4,4,R
-110001,202002,100,89,8916,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,R
-110001,202003,100,89,6194,0.694706146,,0.968230653,,70.26136364,3,,3,R
-110002,202001,100,83,4826,,0.817550398,,2.656680299,101.7103175,,4,4,R
-110002,202002,100,83,5903,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,R
-110002,202003,100,83,4743,0.803489751,,0.968230653,,70.26136364,3,,3,R
-110003,202001,100,4,7586,,7.466535433,,2.656680299,101.7103175,,4,4,R
-110003,202002,100,4,1016,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,R
-110003,202003,100,4,1429,1.406496063,,0.968230653,,70.26136364,3,,3,R
-110004,202001,100,76,3975,,1.305847569,,2.656680299,101.7103175,,4,4,R
-110004,202002,100,76,3044,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,R
-110004,202003,100,76,2947.294109,,,0.968230653,,70.26136364,3,,3,FIR
-110005,202001,200,27,5217,,0.743586089,,2.290844366,182.25,,3,3,R
-110005,202002,200,27,7016,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,R
-110005,202003,200,27,9940,1.416761688,,1.259780318,,182.2366412,4,,4,R
-110006,202001,200,42,5325,,0.68736285,,2.290844366,182.25,,3,3,R
-110006,202002,200,42,7747,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,R
-110006,202003,200,42,6685,0.862914677,,1.259780318,,182.2366412,4,,4,R
-110007,202001,200,19,5496,,5.441584158,,2.290844366,182.25,,3,3,R
-110007,202002,200,19,1010,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,R
-110007,202003,200,19,1235,1.222772277,,1.259780318,,182.2366412,4,,4,R
-110008,202001,200,43,8964.074003,,,,2.290844366,182.25,,3,3,BI
-110008,202002,200,43,3913,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,R
-110008,202003,200,43,6013,1.53667263,,1.259780318,,182.2366412,4,,4,R
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+110001,202001,100,89,9244,R,,1.036787797,1.0,2.656680299,101.7103175,0,4,4
+110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4
+110001,202003,100,89,6194,R,0.694706146,,0.968230653,1.0,70.26136364,3,0,3
+110002,202001,100,83,4826,R,,0.817550398,1.0,2.656680299,101.7103175,0,4,4
+110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4
+110002,202003,100,83,4743,R,0.803489751,,0.968230653,1.0,70.26136364,3,0,3
+110003,202001,100,4,7586,R,,7.466535433,1.0,2.656680299,101.7103175,0,4,4
+110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4
+110003,202003,100,4,1429,R,1.406496063,,0.968230653,1.0,70.26136364,3,0,3
+110004,202001,100,76,3975,R,,1.305847569,1.0,2.656680299,101.7103175,0,4,4
+110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4
+110004,202003,100,76,2947.294109,FIR,,,0.968230653,1.0,70.26136364,3,0,3
+110005,202001,200,27,5217,R,,0.743586089,1.0,2.290844366,182.25,0,3,3
+110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4
+110005,202003,200,27,9940,R,1.416761688,,1.259780318,1.0,182.2366412,4,0,4
+110006,202001,200,42,5325,R,,0.68736285,1.0,2.290844366,182.25,0,3,3
+110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4
+110006,202003,200,42,6685,R,0.862914677,,1.259780318,1.0,182.2366412,4,0,4
+110007,202001,200,19,5496,R,,5.441584158,1.0,2.290844366,182.25,0,3,3
+110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4
+110007,202003,200,19,1235,R,1.222772277,,1.259780318,1.0,182.2366412,4,0,4
+110008,202001,200,43,8964.074003,BI,,,1.0,2.290844366,182.25,0,3,3
+110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4
+110008,202003,200,43,6013,R,1.53667263,,1.259780318,1.0,182.2366412,4,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 2b915a10..02481a49 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-120001,202001,100,50,5240,,2.104417671,,1.589860068,77.38738739,,3,3,R
-120001,202002,100,50,2490,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,R
-120001,202003,100,50,3382,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,R
-120001,202004,100,50,4475,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,R
-120001,202005,100,50,1316,0.294078212,,5.357333441,,32.73423423,3,,3,R
-120002,202001,100,78,7410,,2.05719045,,1.589860068,77.38738739,,3,3,R
-120002,202002,100,78,3602,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,R
-120002,202003,100,78,4972,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,R
-120002,202004,100,78,8838,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,R
-120002,202005,100,78,1535,0.173681828,,5.357333441,,32.73423423,3,,3,R
-120003,202001,100,94,4530,,0.607972084,,1.589860068,77.38738739,,3,3,R
-120003,202002,100,94,7451,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,R
-120003,202003,100,94,7586,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,R
-120003,202004,100,94,283,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,R
-120003,202005,100,94,4416,15.60424028,,5.357333441,,32.73423423,3,,3,R
-120004,202001,100,100,7738.738739,,,,1.589860068,77.38738739,,3,3,C
-120004,202002,100,100,6722.650253,,,0.868701022,0.814303919,61.0045045,3,3,3,FIC
-120004,202003,100,100,8418.316782,,,1.252231853,9.374659539,71.8018018,3,3,3,FIC
-120004,202004,100,100,8805.675573,,,1.046013805,3.074065265,61.24324324,3,3,3,FIC
-120004,202005,100,100,47174.94022,,,5.357333441,,32.73423423,3,,3,FIC
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+120001,202001,100,50,5240,R,,2.104417671,1.0,1.589860068,77.38738739,0,3,3
+120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3
+120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3
+120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3
+120001,202005,100,50,1316,R,0.294078212,,5.357333441,1.0,32.73423423,3,0,3
+120002,202001,100,78,7410,R,,2.05719045,1.0,1.589860068,77.38738739,0,3,3
+120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3
+120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3
+120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3
+120002,202005,100,78,1535,R,0.173681828,,5.357333441,1.0,32.73423423,3,0,3
+120003,202001,100,94,4530,R,,0.607972084,1.0,1.589860068,77.38738739,0,3,3
+120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3
+120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3
+120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3
+120003,202005,100,94,4416,R,15.60424028,,5.357333441,1.0,32.73423423,3,0,3
+120004,202001,100,100,7738.738739,C,,,1.0,1.589860068,77.38738739,0,3,3
+120004,202002,100,100,6722.650253,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3
+120004,202003,100,100,8418.316782,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3
+120004,202004,100,100,8805.675573,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3
+120004,202005,100,100,47174.94022,FIC,,,5.357333441,1.0,32.73423423,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 18a11e08..9b67fd2d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-130001,202001,100,20,6583,,1.751263634,,0.885479533,102.7515152,,3,4,R
-130001,202002,100,20,3759,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,R
-130001,202003,100,20,8256,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,R
-130001,202004,100,20,6743,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,R
-130001,202005,100,20,6811,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,R
-130001,202006,100,20,9896,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,R
-130001,202007,100,20,3282,0.331649151,,0.913312467,,158.7757576,3,,4,R
-130002,202001,100,69,687,,0.076443752,,0.885479533,102.7515152,,3,4,R
-130002,202002,100,69,8987,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,R
-130002,202003,100,69,371,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,R
-130002,202004,100,69,3385,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,R
-130002,202005,100,69,6606,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,R
-130002,202006,100,69,5901,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,R
-130002,202007,100,69,9834,1.666497204,,0.913312467,,158.7757576,3,,4,R
-130003,202001,100,39,7113,,0.828731213,,0.885479533,102.7515152,,3,4,R
-130003,202002,100,39,8583,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,R
-130003,202003,100,39,5129,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,R
-130003,202004,100,39,2024,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,R
-130003,202005,100,39,9422,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,R
-130003,202006,100,39,8710,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,R
-130003,202007,100,39,6461,0.741791045,,0.913312467,,158.7757576,3,,4,R
-130004,202001,100,37,2571,,,,0.885479533,102.7515152,,3,4,R
-130004,202002,100,37,12734.3292,,,4.953064646,8.784150176,166.6328125,3,3,3,FIR
-130004,202003,100,37,12034.73601,,,0.945062422,1.289357643,107.46875,3,3,3,FIR
-130004,202005,100,37,10550.61563,,,2.538924611,0.963158093,178.4296875,3,3,3,BI
-130004,202006,100,37,10954.18883,,,1.090218262,1.654461386,191.4609375,3,3,3,BI
-130004,202007,100,37,6621,,,0.913312467,,158.7757576,3,,4,R
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+130001,202001,100,20,6583,R,,1.751263634,1.0,0.885479533,102.7515152,0,3,4
+130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3
+130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3
+130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3
+130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3
+130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3
+130001,202007,100,20,3282,R,0.331649151,,0.913312467,1.0,158.7757576,3,0,4
+130002,202001,100,69,687,R,,0.076443752,1.0,0.885479533,102.7515152,0,3,4
+130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3
+130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3
+130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3
+130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3
+130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3
+130002,202007,100,69,9834,R,1.666497204,,0.913312467,1.0,158.7757576,3,0,4
+130003,202001,100,39,7113,R,,0.828731213,1.0,0.885479533,102.7515152,0,3,4
+130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3
+130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3
+130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3
+130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3
+130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3
+130003,202007,100,39,6461,R,0.741791045,,0.913312467,1.0,158.7757576,3,0,4
+130004,202001,100,37,2571,R,,,1.0,0.885479533,102.7515152,0,3,4
+130004,202002,100,37,12734.3292,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3
+130004,202003,100,37,12034.73601,FIR,,,0.945062422,1.289357643,107.46875,3,3,3
+130004,202005,100,37,10550.61563,BI,,,2.538924611,0.963158093,178.4296875,3,3,3
+130004,202006,100,37,10954.18883,BI,,,1.090218262,1.654461386,191.4609375,3,3,3
+130004,202007,100,37,6621,R,,,0.913312467,1.0,158.7757576,3,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 1ac88c5e..b6a4c3c4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-140001,202001,100,27,3582,,0.790205162,,0.534118956,47.13567839,,3,3,R
-140001,202002,100,27,4533,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,R
-140001,202003,100,27,4471,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,R
-140001,202004,100,27,3040,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,R
-140001,202005,100,27,8519,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,R
-140001,202006,100,27,8690,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,R
-140001,202007,100,27,9979,1.148331415,,0.520242185,,91.63876652,3,,4,R
-140002,202001,100,83,5359,,0.755746721,,0.534118956,47.13567839,,3,3,R
-140002,202002,100,83,7091,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,R
-140002,202003,100,83,7098,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,R
-140002,202004,100,83,7408,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,R
-140002,202005,100,83,1937,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,R
-140002,202006,100,83,6711,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,R
-140002,202007,100,83,1052,0.156757562,,0.520242185,,91.63876652,3,,4,R
-140003,202001,100,89,439,,0.056404985,,0.534118956,47.13567839,,3,3,R
-140003,202002,100,89,7783,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,R
-140003,202003,100,89,897,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,R
-140003,202004,100,89,8477,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,R
-140003,202005,100,89,2207,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,R
-140003,202006,100,89,9889,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,R
-140003,202007,100,89,2528,0.255637577,,0.520242185,,91.63876652,3,,4,R
-140004,202001,100,28,1319.798995,,,,0.534118956,47.13567839,,3,3,C
-140004,202002,100,28,8938.390671,,,6.772539383,3.563193687,97.52261307,3,3,3,FIC
-140004,202003,100,28,6264.503515,,,0.700853626,0.84489759,62.64321608,3,3,3,FIC
-140004,202005,100,28,13403.57248,,,1.108042751,0.497376695,63.63316583,3,3,3,BI
-140004,202006,100,28,26948.53343,,,2.988483968,3.720631427,127.0854271,3,3,3,BI
-140004,202007,100,28,7243,,,0.520242185,,91.63876652,3,,4,R
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+140001,202001,100,27,3582,R,,0.790205162,1.0,0.534118956,47.13567839,0,3,3
+140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3
+140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3
+140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3
+140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3
+140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3
+140001,202007,100,27,9979,R,1.148331415,,0.520242185,1.0,91.63876652,3,0,4
+140002,202001,100,83,5359,R,,0.755746721,1.0,0.534118956,47.13567839,0,3,3
+140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3
+140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3
+140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3
+140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3
+140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3
+140002,202007,100,83,1052,R,0.156757562,,0.520242185,1.0,91.63876652,3,0,4
+140003,202001,100,89,439,R,,0.056404985,1.0,0.534118956,47.13567839,0,3,3
+140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3
+140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3
+140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3
+140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3
+140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3
+140003,202007,100,89,2528,R,0.255637577,,0.520242185,1.0,91.63876652,3,0,4
+140004,202001,100,28,1319.798995,C,,,1.0,0.534118956,47.13567839,0,3,3
+140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3
+140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3
+140004,202005,100,28,13403.57248,BI,,,1.108042751,0.497376695,63.63316583,3,3,3
+140004,202006,100,28,26948.53343,BI,,,2.988483968,3.720631427,127.0854271,3,3,3
+140004,202007,100,28,7243,R,,,0.520242185,1.0,91.63876652,3,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 842cfc0c..dfad8aa5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-150001,202001,100,15,5891,,1.285963763,,0.917399451,181.0909091,,3,3,R
-150001,202002,100,15,4581,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,R
-150001,202003,100,15,4741,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,R
-150001,202004,100,15,8092,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,R
-150001,202005,100,15,2727,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,3,3,4,R
-150001,202006,100,15,2363,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,R
-150001,202007,100,15,9549,4.041049513,,2.111448113,,152.5353535,3,,3,R
-150002,202001,100,5,8611,,0.917723543,,0.917399451,181.0909091,,3,3,R
-150002,202002,100,5,9383,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,R
-150002,202003,100,5,1064,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,R
-150002,202004,100,5,7419,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,R
-150002,202005,100,5,9967,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,3,3,4,R
-150002,202006,100,5,1393,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,R
-150002,202007,100,5,2593,1.861450108,,2.111448113,,152.5353535,3,,3,R
-150003,202001,100,79,3426,,0.548511047,,0.917399451,181.0909091,,3,3,R
-150003,202002,100,79,6246,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,R
-150003,202003,100,79,8402,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,R
-150003,202004,100,79,3891,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,R
-150003,202005,100,79,5463,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,3,3,4,R
-150003,202006,100,79,6852,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,R
-150003,202007,100,79,2959,0.431844717,,2.111448113,,152.5353535,3,,3,R
-150004,202001,100,69,13547.81819,,,,0.917399451,181.0909091,,3,3,BI
-150004,202002,100,69,14767.63276,,,1.230132332,3.509418433,204.1414141,3,3,3,BI
-150004,202003,100,69,4208,,,0.831168119,0.962881641,109.6130952,3,3,4,R
-150004,202005,100,69,2818,,,1.028150423,3.035462652,124.8511905,3,3,4,R
-150004,202006,100,69,2123.39785,,,0.753512367,1.033441075,107.1515152,3,3,3,FIR
-150004,202007,100,69,4483.444383,,,2.111448113,,152.5353535,3,,3,FIR
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+150001,202001,100,15,5891,R,,1.285963763,1.0,0.917399451,181.0909091,0,3,3
+150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3
+150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4
+150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3
+150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,3,3,4
+150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3
+150001,202007,100,15,9549,R,4.041049513,,2.111448113,1.0,152.5353535,3,0,3
+150002,202001,100,5,8611,R,,0.917723543,1.0,0.917399451,181.0909091,0,3,3
+150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3
+150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4
+150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3
+150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,3,3,4
+150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3
+150002,202007,100,5,2593,R,1.861450108,,2.111448113,1.0,152.5353535,3,0,3
+150003,202001,100,79,3426,R,,0.548511047,1.0,0.917399451,181.0909091,0,3,3
+150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3
+150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4
+150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3
+150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,3,3,4
+150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3
+150003,202007,100,79,2959,R,0.431844717,,2.111448113,1.0,152.5353535,3,0,3
+150004,202001,100,69,13547.81819,BI,,,1.0,0.917399451,181.0909091,0,3,3
+150004,202002,100,69,14767.63276,BI,,,1.230132332,3.509418433,204.1414141,3,3,3
+150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4
+150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.8511905,3,3,4
+150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3
+150004,202007,100,69,4483.444383,FIR,,,2.111448113,1.0,152.5353535,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index 481eb746..ccba463d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-160001,202001,100,76,2086,,0.502166586,,0.352085676,24.45957447,,3,4,R
-160001,202002,100,76,4154,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,R
-160001,202003,100,76,1610,0.387578238,0.447222222,0.346502312,1.552031536,30.00746269,3,3,5,R
-160001,202004,100,76,3600,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,R
-160001,202005,100,76,6317,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,R
-160001,202006,100,76,5703,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,R
-160001,202007,100,76,1666,0.292126951,,1.523164371,,58.94468085,3,,4,R
-160002,202001,100,32,430,,0.044472024,,0.352085676,24.45957447,,3,4,R
-160002,202002,100,32,9669,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,R
-160002,202003,100,32,1748,0.180783949,0.734453782,0.346502312,1.552031536,30.00746269,3,3,5,R
-160002,202004,100,32,2380,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,R
-160002,202005,100,32,7871,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,R
-160002,202006,100,32,8806,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,R
-160002,202007,100,32,2678,0.304110834,,1.523164371,,58.94468085,3,,4,R
-160003,202001,100,85,3232,,0.509618417,,0.352085676,24.45957447,,3,4,R
-160003,202002,100,85,6342,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,R
-160003,202003,100,85,2988,0.471144749,3.474418605,0.346502312,1.552031536,30.00746269,3,3,5,R
-160003,202004,100,85,860,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,R
-160003,202005,100,85,9227,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,R
-160003,202006,100,85,2393,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,R
-160003,202007,100,85,9508,3.973255328,,1.523164371,,58.94468085,3,,4,R
-160004,202001,100,42,0,,,,0.352085676,24.45957447,,3,4,R
-160004,202002,100,42,0,,,8.813223343,3.411359572,85.80851064,3,3,4,R
-160004,202003,100,42,567,,,0.346502312,1.552031536,30.00746269,3,3,5,R
-160004,202004,100,42,0,,,1.295132949,0.321823769,29.10638298,3,3,4,R
-160004,202005,100,42,0,,,5.26364495,1.952438177,99.63829787,3,3,4,R
-160004,202006,100,42,0,,,0.760313342,2.321042298,71.92340426,3,3,4,R
-160004,202007,100,42,0,,,1.523164371,,58.94468085,3,,4,R
-160005,202001,100,33,1356.031558,,,,0.352085676,24.45957447,,3,4,BI
-160005,202002,100,33,3851.424956,,,8.813223343,3.411359572,85.80851064,3,3,4,BI
-160005,202003,100,33,1129,,,0.346502312,1.552031536,30.00746269,3,3,5,R
-160005,202005,100,33,3288.06383,,,5.26364495,1.952438177,99.63829787,3,3,4,C
-160005,202006,100,33,2499.9588,,,0.760313342,2.321042298,71.92340426,3,3,4,FIC
-160005,202007,100,33,3807.848172,,,1.523164371,,58.94468085,3,,4,FIC
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+160001,202001,100,76,2086,R,,0.502166586,1.0,0.352085676,24.45957447,0,3,4
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,30.00746269,3,3,5
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1.0,58.94468085,3,0,4
+160002,202001,100,32,430,R,,0.044472024,1.0,0.352085676,24.45957447,0,3,4
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,30.00746269,3,3,5
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1.0,58.94468085,3,0,4
+160003,202001,100,85,3232,R,,0.509618417,1.0,0.352085676,24.45957447,0,3,4
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,30.00746269,3,3,5
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1.0,58.94468085,3,0,4
+160004,202001,100,42,0,R,,,1.0,0.352085676,24.45957447,0,3,4
+160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4
+160004,202003,100,42,567,R,,,0.346502312,1.552031536,30.00746269,3,3,5
+160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4
+160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4
+160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4
+160004,202007,100,42,0,R,,,1.523164371,1.0,58.94468085,3,0,4
+160005,202001,100,33,1356.031558,BI,,,1.0,0.352085676,24.45957447,0,3,4
+160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4
+160005,202003,100,33,1129,R,,,0.346502312,1.552031536,30.00746269,3,3,5
+160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4
+160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4
+160005,202007,100,33,3807.848172,FIC,,,1.523164371,1.0,58.94468085,3,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index 1a933d3c..a0d4e34a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-160001,202001,100,76,2086,,0.502166586,,0.514064257,24.45957447,,4,4,R
-160001,202002,100,76,4154,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,R
-160001,202003,100,76,1610,0.387578238,0.447222222,0.509876734,1.414023652,30.00746269,4,4,5,R
-160001,202004,100,76,3600,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,R
-160001,202005,100,76,6317,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,R
-160001,202006,100,76,5703,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,R
-160001,202007,100,76,1666,0.292126951,,1.392373278,,58.94468085,4,,4,R
-160002,202001,100,32,430,,0.044472024,,0.514064257,24.45957447,,4,4,R
-160002,202002,100,32,9669,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,R
-160002,202003,100,32,1748,0.180783949,0.734453782,0.509876734,1.414023652,30.00746269,4,4,5,R
-160002,202004,100,32,2380,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,R
-160002,202005,100,32,7871,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,R
-160002,202006,100,32,8806,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,R
-160002,202007,100,32,2678,0.304110834,,1.392373278,,58.94468085,4,,4,R
-160003,202001,100,85,3232,,0.509618417,,0.514064257,24.45957447,,4,4,R
-160003,202002,100,85,6342,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,R
-160003,202003,100,85,2988,0.471144749,3.474418605,0.509876734,1.414023652,30.00746269,4,4,5,R
-160003,202004,100,85,860,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,R
-160003,202005,100,85,9227,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,R
-160003,202006,100,85,2393,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,R
-160003,202007,100,85,9508,3.973255328,,1.392373278,,58.94468085,4,,4,R
-160004,202001,100,42,0,,1,,0.514064257,24.45957447,,4,4,R
-160004,202002,100,42,0,1,1,6.859917508,2.808519679,85.80851064,4,4,4,R
-160004,202003,100,42,567,1,1,0.509876734,1.414023652,30.00746269,4,4,5,R
-160004,202004,100,42,0,1,1,1.221349712,0.491367827,29.10638298,4,4,4,R
-160004,202005,100,42,0,1,1,4.197733712,1.714328633,99.63829787,4,4,4,R
-160004,202006,100,42,0,1,1,0.820235007,1.990781723,71.92340426,4,4,4,R
-160004,202007,100,42,0,1,,1.392373278,,58.94468085,4,,4,R
-160005,202001,100,33,1630.004567,,,,0.514064257,24.45957447,,4,4,BI
-160005,202002,100,33,3170.818717,,,6.859917508,2.808519679,85.80851064,4,4,4,BI
-160005,202003,100,33,1129,,,0.509876734,1.414023652,30.00746269,4,4,5,R
-160005,202005,100,33,3288.06383,,,4.197733712,1.714328633,99.63829787,4,4,4,C
-160005,202006,100,33,2696.985058,,,0.820235007,1.990781723,71.92340426,4,4,4,FIC
-160005,202007,100,33,3755.209926,,,1.392373278,,58.94468085,4,,4,FIC
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+160001,202001,100,76,2086,R,,0.502166586,1.0,0.514064257,24.45957447,0,4,4
+160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,30.00746269,4,4,5
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4
+160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4
+160001,202007,100,76,1666,R,0.292126951,,1.392373278,1.0,58.94468085,4,0,4
+160002,202001,100,32,430,R,,0.044472024,1.0,0.514064257,24.45957447,0,4,4
+160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,30.00746269,4,4,5
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4
+160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4
+160002,202007,100,32,2678,R,0.304110834,,1.392373278,1.0,58.94468085,4,0,4
+160003,202001,100,85,3232,R,,0.509618417,1.0,0.514064257,24.45957447,0,4,4
+160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,30.00746269,4,4,5
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4
+160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4
+160003,202007,100,85,9508,R,3.973255328,,1.392373278,1.0,58.94468085,4,0,4
+160004,202001,100,42,0,R,,1,1.0,0.514064257,24.45957447,0,4,4
+160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4
+160004,202003,100,42,567,R,1,1,0.509876734,1.414023652,30.00746269,4,4,5
+160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4
+160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4
+160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4
+160004,202007,100,42,0,R,1,,1.392373278,1.0,58.94468085,4,0,4
+160005,202001,100,33,1630.004567,BI,,,1.0,0.514064257,24.45957447,0,4,4
+160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4
+160005,202003,100,33,1129,R,,,0.509876734,1.414023652,30.00746269,4,4,5
+160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4
+160005,202006,100,33,2696.985058,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4
+160005,202007,100,33,3755.209926,FIC,,,1.392373278,1.0,58.94468085,4,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 74ebb8c8..0cc21d28 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-160001,202001,100,76,2086,,0.502166586,,0.352085676,29.78238342,,3,3,R
-160001,202002,100,76,4154,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,R
-160001,202003,100,76,1610,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,R
-160001,202004,100,76,3600,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,R
-160001,202005,100,76,6317,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,R
-160001,202006,100,76,5703,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,R
-160001,202007,100,76,1666,0.292126951,,1.523164371,,71.77202073,3,,3,R
-160002,202001,100,32,430,,0.044472024,,0.352085676,29.78238342,,3,3,R
-160002,202002,100,32,9669,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,R
-160002,202003,100,32,1748,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,R
-160002,202004,100,32,2380,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,R
-160002,202005,100,32,7871,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,R
-160002,202006,100,32,8806,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,R
-160002,202007,100,32,2678,0.304110834,,1.523164371,,71.77202073,3,,3,R
-160003,202001,100,85,3232,,0.509618417,,0.352085676,29.78238342,,3,3,R
-160003,202002,100,85,6342,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,R
-160003,202003,100,85,2988,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,R
-160003,202004,100,85,860,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,R
-160003,202005,100,85,9227,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,R
-160003,202006,100,85,2393,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,R
-160003,202007,100,85,9508,3.973255328,,1.523164371,,71.77202073,3,,3,R
-160004,202001,100,33,1356.031558,,,,0.352085676,29.78238342,,3,3,BI
-160004,202002,100,33,3851.424956,,,8.813223344,3.411359571,104.4818653,3,3,3,BI
-160004,202003,100,33,1129,,,0.346502312,1.552031536,33.07522124,3,3,4,R
-160004,202005,100,33,4003.601036,,,5.263644949,1.952438177,121.3212435,3,3,3,C
-160004,202006,100,33,3043.991285,,,0.760313342,2.321042298,87.57512953,3,3,3,FIC
-160004,202007,100,33,4636.49907,,,1.523164371,,71.77202073,3,,3,FIC
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+160001,202001,100,76,2086,R,,0.502166586,1.0,0.352085676,29.78238342,0,3,3
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1.0,71.77202073,3,0,3
+160002,202001,100,32,430,R,,0.044472024,1.0,0.352085676,29.78238342,0,3,3
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1.0,71.77202073,3,0,3
+160003,202001,100,85,3232,R,,0.509618417,1.0,0.352085676,29.78238342,0,3,3
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1.0,71.77202073,3,0,3
+160004,202001,100,33,1356.031558,BI,,,1.0,0.352085676,29.78238342,0,3,3
+160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3
+160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4
+160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3
+160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3
+160004,202007,100,33,4636.49907,FIC,,,1.523164371,1.0,71.77202073,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 581f6cea..aabbecb1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-170001,202001,100,69,6480,,0.653753027,,0.341906136,41.93396226,,3,3,R
-170001,202002,100,69,9912,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,R
-170001,202003,100,69,603,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,R
-170001,202004,100,69,7120,11.80762852,,4.51938598,,109.0330189,3,,3,R
-170002,202001,100,62,449,,0.121614301,,0.341906136,41.93396226,,3,3,R
-170002,202002,100,62,3692,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,R
-170002,202003,100,62,8401,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,R
-170002,202004,100,62,6745,0.802880609,,4.51938598,,109.0330189,3,,3,R
-170003,202001,100,81,1961,,0.250351079,,0.341906136,41.93396226,,3,3,R
-170003,202002,100,81,7833,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,R
-170003,202003,100,81,9761,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,R
-170003,202004,100,81,9250,0.947648806,,4.51938598,,109.0330189,3,,3,R
-170004,202002,100,9,3913,,,4.582245799,5.893253897,114.7058824,3,3,4,R
-170004,202003,100,9,3914.194145,,,1.194144647,0.795149817,88.51415094,3,3,3,FIR
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+170001,202001,100,69,6480,R,,0.653753027,1.0,0.341906136,41.93396226,0,3,3
+170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4
+170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3
+170001,202004,100,69,7120,R,11.80762852,,4.51938598,1.0,109.0330189,3,0,3
+170002,202001,100,62,449,R,,0.121614301,1.0,0.341906136,41.93396226,0,3,3
+170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4
+170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3
+170002,202004,100,62,6745,R,0.802880609,,4.51938598,1.0,109.0330189,3,0,3
+170003,202001,100,81,1961,R,,0.250351079,1.0,0.341906136,41.93396226,0,3,3
+170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4
+170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3
+170003,202004,100,81,9250,R,0.947648806,,4.51938598,1.0,109.0330189,3,0,3
+170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4
+170004,202003,100,9,3914.194145,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 046dc9f6..71cb97ef 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-180001,202001,100,91,9188,,1.340726689,,0.769734514,123.4632353,,3,3,R
-180001,202002,100,91,6853,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,R
-180001,202003,100,91,2418,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,R
-180001,202004,100,91,9291,3.842431762,,2.151700748,,175.5441176,3,,3,R
-180002,202001,100,26,3829,,0.504612546,,0.769734514,123.4632353,,3,3,R
-180002,202002,100,26,7588,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,R
-180002,202003,100,26,7335,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,R
-180002,202004,100,26,8415,1.147239264,,2.151700748,,175.5441176,3,,3,R
-180003,202001,100,19,3774,,0.463864307,,0.769734514,123.4632353,,3,3,R
-180003,202002,100,19,8136,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,R
-180003,202003,100,19,4209,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,R
-180003,202004,100,19,6168,1.465431219,,2.151700748,,175.5441176,3,,3,R
-180004,202002,100,26,11794.76123,,,1.627795166,1.933884446,166.0073529,3,3,3,BI
-180004,202003,100,26,6099,,,0.612275479,0.604767536,123.8333333,3,3,4,R
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+180001,202001,100,91,9188,R,,1.340726689,1.0,0.769734514,123.4632353,0,3,3
+180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3
+180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4
+180001,202004,100,91,9291,R,3.842431762,,2.151700748,1.0,175.5441176,3,0,3
+180002,202001,100,26,3829,R,,0.504612546,1.0,0.769734514,123.4632353,0,3,3
+180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3
+180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4
+180002,202004,100,26,8415,R,1.147239264,,2.151700748,1.0,175.5441176,3,0,3
+180003,202001,100,19,3774,R,,0.463864307,1.0,0.769734514,123.4632353,0,3,3
+180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3
+180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4
+180003,202004,100,19,6168,R,1.465431219,,2.151700748,1.0,175.5441176,3,0,3
+180004,202002,100,26,11794.76123,BI,,,1.627795166,1.933884446,166.0073529,3,3,3
+180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index 56992f3e..5a5a9f8e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-190001,202001,100,95,9261,,1.853682946,,0.9214,50.3694,,3,4,R
-190001,202002,100,95,4996,0.53946658,3.375675676,0.8521,1.5274,121.4187,3,3,3,R
-190001,202003,100,95,1480,0.29623699,0.340229885,0.9685,1.8795,89.3761,3,4,4,R
-190001,202004,100,95,4350,2.939189189,,1.113,,110.5473,4,,5,R
-190002,202001,100,17,2433,,0.562673451,,0.9214,50.3694,,3,4,R
-190002,202002,100,17,4324,1.525901943,0.655350106,0.8521,1.5274,121.4187,3,3,3,R
-190002,202003,100,17,6598,0.106092755,9.425714286,0.9685,1.8795,89.3761,3,4,4,R
-190002,202004,100,17,700,11.26857143,,1.113,,110.5473,4,,5,R
-190003,202001,100,64,7888,,1.870080607,,0.9214,50.3694,,3,4,R
-190003,202002,100,64,4218,0.534736308,0.555658016,0.8521,1.5274,121.4187,3,3,3,R
-190003,202003,100,64,7591,1.799668089,1.861908266,0.9685,1.8795,89.3761,3,4,4,R
-190003,202004,100,64,4077,0.537083388,,1.113,,110.5473,4,,5,R
-190004,202001,100,51,2247,,,,0.9214,50.3694,,3,4,R
-190004,202002,100,51,1914.6687,,,0.8521,1.5274,121.4187,3,3,3,FIR
-190004,202003,100,51,1854.356636,,,0.9685,1.8795,89.3761,3,4,4,FIR
-190004,202004,100,51,8608,,,1.113,,110.5473,4,,5,R
-190005,202001,100,34,6271.13538,,,,0.9214,50.3694,,3,4,BI
-190005,202002,100,34,6806.0944,,,0.8521,1.5274,121.4187,3,3,3,BI
-190005,202003,100,34,4456,,0.867939229,0.9685,1.8795,89.3761,3,4,4,R
-190005,202004,100,34,5134,1.152154399,,1.113,,110.5473,4,,5,R
-190006,202001,100,8,402.9552,,,,0.9214,50.3694,,3,4,C
-190006,202002,100,8,343.3581259,,,0.8521,1.5274,121.4187,3,3,3,FIC
-190006,202003,100,8,332.542345,,,0.9685,1.8795,89.3761,3,4,4,FIC
-190006,202004,100,8,370.1196299,,,1.113,,110.5473,4,,5,FIC
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+190001,202001,100,95,9261,R,,1.853682946,1.0,0.9214,50.3694,0,3,4
+190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,3,3,3
+190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,3,4,4
+190001,202004,100,95,4350,R,2.939189189,,1.113,1.0,110.5473,4,0,5
+190002,202001,100,17,2433,R,,0.562673451,1.0,0.9214,50.3694,0,3,4
+190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,3,3,3
+190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,3,4,4
+190002,202004,100,17,700,R,11.26857143,,1.113,1.0,110.5473,4,0,5
+190003,202001,100,64,7888,R,,1.870080607,1.0,0.9214,50.3694,0,3,4
+190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,3,3,3
+190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,3,4,4
+190003,202004,100,64,4077,R,0.537083388,,1.113,1.0,110.5473,4,0,5
+190004,202001,100,51,2247,R,,,1.0,0.9214,50.3694,0,3,4
+190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,3,3,3
+190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,3,4,4
+190004,202004,100,51,8608,R,,,1.113,1.0,110.5473,4,0,5
+190005,202001,100,34,6271.13538,BI,,,1.0,0.9214,50.3694,0,3,4
+190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,3,3,3
+190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,3,4,4
+190005,202004,100,34,5134,R,1.152154399,,1.113,1.0,110.5473,4,0,5
+190006,202001,100,8,402.9552,C,,,1.0,0.9214,50.3694,0,3,4
+190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,3,3,3
+190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,3,4,4
+190006,202004,100,8,370.1196299,FIC,,,1.113,1.0,110.5473,4,0,5
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index 285c002a..89c712f6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-200001,202001,100,56,7788,,1.262441238,,0.597514698,71.63436123,,4,4,R
-200001,202002,100,56,6169,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,R
-200001,202003,100,56,6156,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,R
-200001,202004,100,56,1577,0.25617284,,0.276010255,,42.68681319,4,,4,R
-200002,202001,100,75,6533,,0.806244601,,0.597514698,71.63436123,,4,4,R
-200002,202002,100,75,8103,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,R
-200002,202003,100,75,5860,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,R
-200002,202004,100,75,2575,0.439419795,,0.276010255,,42.68681319,4,,4,R
-200003,202001,100,10,56,,0.011249498,,0.597514698,71.63436123,,4,4,R
-200003,202002,100,10,4978,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,R
-200003,202003,100,10,8777,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,R
-200003,202004,100,10,906,0.103224336,,0.276010255,,42.68681319,4,,4,R
-200004,202001,100,86,1884,,0.310123457,,0.597514698,71.63436123,,4,4,R
-200004,202002,100,86,6075,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,R
-200004,202003,100,86,7055.585041,,,1.161413175,4.785815599,163.0494505,3,4,4,FIR
-200004,202004,100,86,1947.413826,,,0.276010255,,42.68681319,4,,4,FIR
-200005,202001,100,6,429.8061674,,,,0.597514698,71.63436123,,4,4,C
-200005,202002,100,6,10116.54267,,,23.53745347,0.984013482,111.5638767,4,3,4,FIC
-200005,202003,100,6,11749.48594,,,1.161413175,4.785815599,163.0494505,3,4,4,FIC
-200005,202004,100,6,3242.978611,,,0.276010255,,42.68681319,4,,4,FIC
-200006,202001,100,41,8740.605259,,,,0.597514698,71.63436123,,4,4,BI
-200006,202002,100,41,8740.007744,,,23.53745347,0.984013482,111.5638767,4,3,4,BI
-200006,202003,100,41,8882,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,R
-200006,202004,100,41,2711,0.305224049,,0.276010255,,42.68681319,4,,4,R
-200007,202001,200,4,2439,,0.252093023,,2.163456777,132.3214286,,3,4,R
-200007,202002,200,4,9675,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,R
-200007,202003,200,4,7003,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,R
-200007,202004,200,4,595,0.084963587,,0.197315737,,99.37735849,3,,3,R
-200008,202001,200,4,1849,,0.287290242,,2.163456777,132.3214286,,3,4,R
-200008,202002,200,4,6436,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,R
-200008,202003,200,4,9709,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,R
-200008,202004,200,4,2727,0.280873416,,0.197315737,,99.37735849,3,,3,R
-200009,202001,200,45,8742,,5.950987066,,2.163456777,132.3214286,,3,4,R
-200009,202002,200,45,1469,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,R
-200009,202003,200,45,8602,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,R
-200009,202004,200,45,1945,0.226110207,,0.197315737,,99.37735849,3,,3,R
-200010,202001,200,85,14038.67103,,,,2.163456777,132.3214286,,3,4,BI
-200010,202002,200,85,6489,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,R
-200010,202003,200,85,1796,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,R
-200010,202004,200,85,354.3790633,,,0.197315737,,99.37735849,3,,3,FIR
-200011,202001,200,79,4166.817753,,,,2.163456777,132.3214286,,3,4,BI
-200011,202002,200,79,1926,,,2.53854315,1.457061014,119.7926267,3,4,5,R
-200011,202004,200,79,7850.811321,,,0.197315737,,99.37735849,3,,3,C
-200012,202001,200,87,5495,,,,2.163456777,132.3214286,,3,4,R
-200012,202002,200,87,13949.29461,,,2.53854315,1.457061014,119.7926267,3,4,5,FIR
-200012,202003,200,87,29170.87018,,,2.091207548,6.584230902,196.4492754,4,3,4,FIR
-200012,202004,200,87,5755.871742,,,0.197315737,,99.37735849,3,,3,FIR
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+200001,202001,100,56,7788,R,,1.262441238,1.0,0.597514698,71.63436123,0,4,4
+200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4
+200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4
+200001,202004,100,56,1577,R,0.25617284,,0.276010255,1.0,42.68681319,4,0,4
+200002,202001,100,75,6533,R,,0.806244601,1.0,0.597514698,71.63436123,0,4,4
+200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4
+200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4
+200002,202004,100,75,2575,R,0.439419795,,0.276010255,1.0,42.68681319,4,0,4
+200003,202001,100,10,56,R,,0.011249498,1.0,0.597514698,71.63436123,0,4,4
+200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4
+200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4
+200003,202004,100,10,906,R,0.103224336,,0.276010255,1.0,42.68681319,4,0,4
+200004,202001,100,86,1884,R,,0.310123457,1.0,0.597514698,71.63436123,0,4,4
+200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4
+200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4
+200004,202004,100,86,1947.413826,FIR,,,0.276010255,1.0,42.68681319,4,0,4
+200005,202001,100,6,429.8061674,C,,,1.0,0.597514698,71.63436123,0,4,4
+200005,202002,100,6,10116.54267,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4
+200005,202003,100,6,11749.48594,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4
+200005,202004,100,6,3242.978611,FIC,,,0.276010255,1.0,42.68681319,4,0,4
+200006,202001,100,41,8740.605259,BI,,,1.0,0.597514698,71.63436123,0,4,4
+200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4
+200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4
+200006,202004,100,41,2711,R,0.305224049,,0.276010255,1.0,42.68681319,4,0,4
+200007,202001,200,4,2439,R,,0.252093023,1.0,2.163456777,132.3214286,0,3,4
+200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5
+200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4
+200007,202004,200,4,595,R,0.084963587,,0.197315737,1.0,99.37735849,3,0,3
+200008,202001,200,4,1849,R,,0.287290242,1.0,2.163456777,132.3214286,0,3,4
+200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5
+200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4
+200008,202004,200,4,2727,R,0.280873416,,0.197315737,1.0,99.37735849,3,0,3
+200009,202001,200,45,8742,R,,5.950987066,1.0,2.163456777,132.3214286,0,3,4
+200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5
+200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4
+200009,202004,200,45,1945,R,0.226110207,,0.197315737,1.0,99.37735849,3,0,3
+200010,202001,200,85,14038.67103,BI,,,1.0,2.163456777,132.3214286,0,3,4
+200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5
+200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4
+200010,202004,200,85,354.3790633,FIR,,,0.197315737,1.0,99.37735849,3,0,3
+200011,202001,200,79,4166.817753,BI,,,1.0,2.163456777,132.3214286,0,3,4
+200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5
+200011,202004,200,79,7850.811321,C,,,0.197315737,1.0,99.37735849,3,0,3
+200012,202001,200,87,5495,R,,,1.0,2.163456777,132.3214286,0,3,4
+200012,202002,200,87,13949.29461,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5
+200012,202003,200,87,29170.87018,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4
+200012,202004,200,87,5755.871742,FIR,,,0.197315737,1.0,99.37735849,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 0937c7d8..db2b0573 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-210001,202001,1,10,547,,1.511049724,,1.087985595,13.17948718,,2,3,R
-210001,202002,1,10,362,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,R
-210001,202003,1,10,895,2.472375691,,1.42292432,,18.48333333,2,,2,R
-210002,202001,1,50,381,,0.664921466,,1.087985595,13.17948718,,2,3,R
-210002,202002,1,50,573,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,R
-210002,202003,1,50,214,0.373472949,,1.42292432,,18.48333333,2,,2,R
-210003,202001,2,12,961,,3.599250936,,2.241504449,72.19047619,,2,2,R
-210003,202002,2,12,267,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,R
-210003,202003,2,12,314,1.176029963,,1.174002242,,50,2,,2,R
-210004,202001,2,9,555,,0.883757962,,2.241504449,72.19047619,,2,2,R
-210004,202002,2,9,628,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,R
-210004,202003,2,9,736,1.171974522,,1.174002242,,50,2,,2,R
-210005,202001,1,18,100,,,,1.087985595,13.17948718,,2,3,R
-210005,202002,2,18,767.1428572,,,0.70468356,0.85178967,42.61904762,2,2,2,C
-210005,202003,2,18,900.6274342,,,1.174002242,,50,2,,2,FIC
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+210001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,13.17948718,0,2,3
+210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
+210001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,2
+210002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,13.17948718,0,2,3
+210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
+210002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
+210003,202001,2,12,961,R,,3.599250936,1.0,2.241504449,72.19047619,0,2,2
+210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2
+210003,202003,2,12,314,R,1.176029963,,1.174002242,1.0,50,2,0,2
+210004,202001,2,9,555,R,,0.883757962,1.0,2.241504449,72.19047619,0,2,2
+210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2
+210004,202003,2,9,736,R,1.171974522,,1.174002242,1.0,50,2,0,2
+210005,202001,1,18,100,R,,,1.0,1.087985595,13.17948718,0,2,3
+210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2
+210005,202003,2,18,900.6274342,FIC,,,1.174002242,1.0,50,2,0,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 49ea86a7..c4854814 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-220001,202001,1,10,547,,1.511049724,,1.087985595,15.46666667,,2,2,R
-220001,202002,1,10,362,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,R
-220001,202003,1,10,895,2.472375691,,1.42292432,,18.48333333,2,,,R
-220002,202001,1,50,381,,0.664921466,,1.087985595,15.46666667,,2,2,R
-220002,202002,1,50,573,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,R
-220002,202003,1,50,214,0.373472949,,1.42292432,,18.48333333,2,,2,R
-220003,202001,2,12,961,,3.599250936,,2.241504449,72.19047619,,2,2,R
-220003,202002,2,12,267,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,R
-220003,202003,2,12,314,1.176029963,,1.174002242,,29.48717949,2,,3,R
-220004,202001,2,9,555,,0.883757962,,2.241504449,72.19047619,,2,2,R
-220004,202002,2,9,628,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,R
-220004,202003,2,9,736,1.171974522,,1.174002242,,29.48717949,2,,3,R
-220005,202001,1,18,278.4,,,,1.087985595,15.46666667,,2,2,C
-220005,202002,2,18,85.17896705,,,0.70468356,0.85178967,42.61904762,2,2,2,BI
-220005,202003,2,18,100,,,1.174002242,,29.48717949,2,,3,R
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+220001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,15.46666667,0,2,2
+220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
+220001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,0
+220002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,15.46666667,0,2,2
+220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
+220002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
+220003,202001,2,12,961,R,,3.599250936,1.0,2.241504449,72.19047619,0,2,2
+220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2
+220003,202003,2,12,314,R,1.176029963,,1.174002242,1.0,29.48717949,2,0,3
+220004,202001,2,9,555,R,,0.883757962,1.0,2.241504449,72.19047619,0,2,2
+220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2
+220004,202003,2,9,736,R,1.171974522,,1.174002242,1.0,29.48717949,2,0,3
+220005,202001,1,18,278.4,C,,,1.0,1.087985595,15.46666667,0,2,2
+220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2
+220005,202003,2,18,100,R,,,1.174002242,1.0,29.48717949,2,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 8e638f12..66038304 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-230001,202001,1,10,547,,1.511049724,,1.087985595,15.46666667,,2,2,R
-230001,202002,1,10,362,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,R
-230001,202003,1,10,895,2.472375691,,1.42292432,,18.48333333,2,,2,R
-230002,202001,1,50,381,,0.664921466,,1.087985595,15.46666667,,2,2,R
-230002,202002,1,50,573,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,R
-230002,202003,1,50,214,0.373472949,,1.42292432,,18.48333333,2,,2,R
-230003,202001,2,12,961,,3.599250936,,2.241504449,72.19047619,,2,2,R
-230003,202002,2,12,267,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,R
-230003,202003,2,12,314,1.176029963,,1.174002242,,50,2,,2,R
-230004,202001,2,9,555,,0.883757962,,2.241504449,72.19047619,,2,2,R
-230004,202002,2,9,628,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,R
-230004,202003,2,9,736,1.171974522,,1.174002242,,50,2,,2,R
-230005,202001,1,18,278.4,,,,1.087985595,15.46666667,,2,2,C
-230005,202002,2,18,767.1428571,,,0.70468356,0.85178967,42.61904762,2,2,2,C
-230005,202003,2,18,900.6274345,,,1.174002242,,50,2,,2,FIC
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+230001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,15.46666667,0,2,2
+230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
+230001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,2
+230002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,15.46666667,0,2,2
+230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
+230002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
+230003,202001,2,12,961,R,,3.599250936,1.0,2.241504449,72.19047619,0,2,2
+230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2
+230003,202003,2,12,314,R,1.176029963,,1.174002242,1.0,50,2,0,2
+230004,202001,2,9,555,R,,0.883757962,1.0,2.241504449,72.19047619,0,2,2
+230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2
+230004,202003,2,9,736,R,1.171974522,,1.174002242,1.0,50,2,0,2
+230005,202001,1,18,278.4,C,,,1.0,1.087985595,15.46666667,0,2,2
+230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2
+230005,202003,2,18,900.6274345,FIC,,,1.174002242,1.0,50,2,0,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 49a1fb60..74189c71 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-240001,202001,1,10,547,,1.511049724,,1.087985595,13.17948718,,2,3,R
-240001,202002,1,10,362,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,R
-240001,202003,1,10,895,2.472375691,,1.42292432,,18.48333333,2,,2,R
-240002,202001,1,50,381,,0.664921466,,1.087985595,13.17948718,,2,3,R
-240002,202002,1,50,573,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,R
-240002,202003,1,50,214,0.373472949,,1.42292432,,18.48333333,2,,2,R
-240003,202001,2,12,961,,3.599250936,,2.241504449,72.19047619,,2,2,R
-240003,202002,2,12,267,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,R
-240003,202003,2,12,314,1.176029963,,1.174002242,,30.76923077,2,,3,R
-240004,202001,2,9,555,,0.883757962,,2.241504449,72.19047619,,2,2,R
-240004,202002,2,9,628,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,R
-240004,202003,2,9,736,1.171974522,,1.174002242,,30.76923077,2,,3,R
-240005,202001,1,18,100,,,,1.087985595,13.17948718,,2,3,R
-240005,202002,2,18,127.7684506,,,0.70468356,0.85178967,42.61904762,2,2,2,BI
-240005,202003,2,18,150,,,1.174002242,,30.76923077,2,,3,R
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+240001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,13.17948718,0,2,3
+240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
+240001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,2
+240002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,13.17948718,0,2,3
+240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
+240002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
+240003,202001,2,12,961,R,,3.599250936,1.0,2.241504449,72.19047619,0,2,2
+240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2
+240003,202003,2,12,314,R,1.176029963,,1.174002242,1.0,30.76923077,2,0,3
+240004,202001,2,9,555,R,,0.883757962,1.0,2.241504449,72.19047619,0,2,2
+240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2
+240004,202003,2,9,736,R,1.171974522,,1.174002242,1.0,30.76923077,2,0,3
+240005,202001,1,18,100,R,,,1.0,1.087985595,13.17948718,0,2,3
+240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2
+240005,202003,2,18,150,R,,,1.174002242,1.0,30.76923077,2,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index cf2db4dd..c3de706b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,output,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,marker
-250001,202001,1,10,547,,1.511049724,,1.087985595,13.17948718,,2,3,R
-250001,202002,1,10,362,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,R
-250001,202003,1,10,895,2.472375691,,1.42292432,,18.48333333,2,,2,R
-250002,202001,1,50,381,,0.664921466,,1.087985595,13.17948718,,2,3,R
-250002,202002,1,50,573,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,R
-250002,202003,1,50,214,0.373472949,,1.42292432,,18.48333333,2,,2,R
-250003,202001,2,12,961,,3.599250936,,2.241504449,72.19047619,,2,2,R
-250003,202002,2,12,267,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,R
-250003,202003,2,12,314,1.176029963,,1.040732678,,33.07692308,3,,3,R
-250004,202001,2,9,555,,0.883757962,,2.241504449,72.19047619,,2,2,R
-250004,202002,2,9,628,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,R
-250004,202003,2,9,736,1.171974522,,1.040732678,,33.07692308,3,,3,R
-250005,202001,1,18,100,,,,1.087985595,13.17948718,,2,3,R
-250005,202002,2,18,310,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,R
-250005,202003,2,18,240,0.774193548,,1.040732678,,33.07692308,3,,3,R
-250006,202001,1,22,289.9487179,,,,1.087985595,13.17948718,,2,3,C
-250006,202002,1,22,313.9751153,,,1.082864299,1.541019684,15.58333333,2,2,2,FIC
-250006,202003,1,22,446.7628274,,,1.42292432,,18.48333333,2,,2,FIC
-250007,202001,2,52,3753.904762,,,,2.241504449,72.19047619,,2,2,C
-250007,202002,2,52,2645.314971,,,0.70468356,0.998415336,30.8974359,2,3,3,FIC
-250007,202003,2,52,2753.065733,,,1.040732678,,33.07692308,3,,3,FIC
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+250001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,13.17948718,0,2,3
+250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
+250001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,2
+250002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,13.17948718,0,2,3
+250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
+250002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
+250003,202001,2,12,961,R,,3.599250936,1.0,2.241504449,72.19047619,0,2,2
+250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3
+250003,202003,2,12,314,R,1.176029963,,1.040732678,1.0,33.07692308,3,0,3
+250004,202001,2,9,555,R,,0.883757962,1.0,2.241504449,72.19047619,0,2,2
+250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3
+250004,202003,2,9,736,R,1.171974522,,1.040732678,1.0,33.07692308,3,0,3
+250005,202001,1,18,100,R,,,1.0,1.087985595,13.17948718,0,2,3
+250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3
+250005,202003,2,18,240,R,0.774193548,,1.040732678,1.0,33.07692308,3,0,3
+250006,202001,1,22,289.9487179,C,,,1.0,1.087985595,13.17948718,0,2,3
+250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2
+250006,202003,1,22,446.7628274,FIC,,,1.42292432,1.0,18.48333333,2,0,2
+250007,202001,2,52,3753.904762,C,,,1.0,2.241504449,72.19047619,0,2,2
+250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3
+250007,202003,2,52,2753.065733,FIC,,,1.040732678,1.0,33.07692308,3,0,3

From 93346a8c8724d9017a8e41f2cd6b37ad934c14af Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 14:02:21 +0000
Subject: [PATCH 123/531] add zeros filter

---
 .../imputation/mean_of_ratios.py              | 72 +++++++++----------
 1 file changed, 33 insertions(+), 39 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 4c3d6787..60d6ade2 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -14,14 +14,20 @@ def impute(
     trim_threshold: Optional[Number] = None,
     lower_trim: Optional[Number] = None,
     upper_trim: Optional[Number] = None,
+    include_zeros: Optional[Boolean] = False,
     **kwargs
 ) -> DataFrame:
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        working_df = df.selectExpr(
-            "period",
-            "grouping",
-            "ref",
-            "aux",
+        common_cols = ["period", "grouping", "ref", "aux"]
+        if not include_zeros:
+            df = df.select(common_cols).join(
+                df.filter("0 NOT IN (previous.output, current.output, next.output)"),
+                common_cols,
+                "left",
+            )
+
+        df = df.selectExpr(
+            *common_cols,
             "current.output",
             """CASE
                 WHEN previous.output = 0
@@ -37,9 +43,9 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
 
         if lower_trim is not None:
             trimmed_df = (
-                working_df.join(
+                df.join(
                     (
-                        working_df.groupBy("period", "grouping")
+                        df.groupBy("period", "grouping")
                         .agg(
                             expr(
                                 """
@@ -62,15 +68,17 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
                             (col("count_forward") * Decimal(lower_trim) / 100).alias(
                                 "lower_forward"
                             ),
-                            (col("count_forward") * (100 - Decimal(upper_trim)) / 100).alias(
-                                "upper_forward"
-                            ),
+                            (
+                                col("count_forward") * (100 - Decimal(upper_trim)) / 100
+                            ).alias("upper_forward"),
                             (col("count_backward") * Decimal(lower_trim) / 100).alias(
                                 "lower_backward"
                             ),
-                            (col("count_backward") * (100 - Decimal(upper_trim)) / 100).alias(
-                                "upper_backward"
-                            ),
+                            (
+                                col("count_backward")
+                                * (100 - Decimal(upper_trim))
+                                / 100
+                            ).alias("upper_backward"),
                         )
                     ),
                     ["period", "grouping"],
@@ -124,35 +132,21 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
             )
 
         else:
-            trimmed_df = (
-                working_df.withColumn(
-                    "trimmed_forward",
-                    col("growth_forward")
-                )
-                .withColumn(
-                    "trimmed_backward",
-                    col("growth_backward")
-                )
-            )
+            trimmed_df = df.withColumn(
+                "trimmed_forward", col("growth_forward")
+            ).withColumn("trimmed_backward", col("growth_backward"))
 
-        ratio_df = (
-            trimmed_df.groupBy("period", "grouping")
-            .agg(
-                expr("mean(trimmed_forward) AS forward"),
-                expr("mean(trimmed_backward) AS backward"),
-                expr("sum(current.output)/sum(aux) AS construction"),
-                expr("count(trimmed_forward) AS count_forward"),
-                expr("count(trimmed_backward) AS count_backward"),
-                expr("count(current.output) AS count_construction"),
-            )
+        ratio_df = trimmed_df.groupBy("period", "grouping").agg(
+            expr("mean(trimmed_forward) AS forward"),
+            expr("mean(trimmed_backward) AS backward"),
+            expr("sum(current.output)/sum(aux) AS construction"),
+            expr("count(trimmed_forward) AS count_forward"),
+            expr("count(trimmed_backward) AS count_backward"),
+            expr("count(current.output) AS count_construction"),
         )
 
-        growth_df = working_df.select(
-            "ref",
-            "period",
-            "grouping",
-            "growth_forward",
-            "growth_backward"
+        growth_df = df.select(
+            "ref", "period", "grouping", "growth_forward", "growth_backward"
         )
         return [
             engine.RatioCalculationResult(

From 9d063356ff6773858b2470ce989edbc4336c4cde Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 15:09:38 +0000
Subject: [PATCH 124/531] Fix zeros inclusion filter

---
 .../imputation/mean_of_ratios.py                     | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 60d6ade2..34635c14 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -18,16 +18,16 @@ def impute(
     **kwargs
 ) -> DataFrame:
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        common_cols = ["period", "grouping", "ref", "aux"]
         if not include_zeros:
-            df = df.select(common_cols).join(
-                df.filter("0 NOT IN (previous.output, current.output, next.output)"),
-                common_cols,
-                "left",
+            df = df.filter(
+                "0 NOT IN (previous.output, current.output, next.output)"
             )
 
         df = df.selectExpr(
-            *common_cols,
+            "period",
+            "grouping",
+            "ref",
+            "aux",
             "current.output",
             """CASE
                 WHEN previous.output = 0

From fe9d67735ed3917ab7d56316faefcf69430589be Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 6 Mar 2023 15:50:41 +0000
Subject: [PATCH 125/531] Data Corrections

---
 .../methodology_scenarios/01_C_output.csv     |  2 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  2 +-
 .../03_R_R_FI_output.csv                      | 24 ++++-----
 .../04_R_R_FI_FI_output.csv                   | 10 ++--
 .../05_R_R_FI_FI_FI_output.csv                |  4 +-
 .../06_BI_BI_R_output.csv                     |  8 +--
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  4 +-
 .../09_R_NS_C_output.csv                      |  4 +-
 .../10_C_FI_NS_R_output.csv                   |  6 +--
 .../11_R_R_FI-BI_R_R_output.csv               |  8 +--
 .../12_C_FI_FI_FI_FI_output.csv               |  8 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  8 +--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  4 +-
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          | 12 ++---
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv |  2 +-
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv | 14 +++---
 .../17_NS_R_FI_NS_output.csv                  |  2 +-
 .../18_NS_BI_R_NS_output.csv                  |  2 +-
 .../19_link_columns_input.csv                 | 50 +++++++++----------
 .../19_link_columns_output.csv                | 48 +++++++++---------
 .../20_mixed_data_output.csv                  | 14 +++---
 .../22_class_change_C_BI_R_output.csv         |  2 +-
 .../23_class_change_C_C_FI_output.csv         |  2 +-
 23 files changed, 120 insertions(+), 120 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index 7171f9d9..55672d8b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -2,4 +2,4 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 10001,202001,100,1,3892,R,,,1.0,1.0,147.8876404,0,0,3
 10002,202001,100,75,3873,R,,,1.0,1.0,147.8876404,0,0,3
 10003,202001,100,13,5397,R,,,1.0,1.0,147.8876404,0,0,3
-10004,202001,100,71,10500.02247,C,,,1.0,1.0,147.8876404,0,0,3
+10004,202001,100,71,10500.022472,C,,,1.0,1.0,147.8876404,0,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 1021392e..38330bda 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -6,4 +6,4 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 20003,202001,100,77,5644,R,,5.70677452,1.0,3.027097983,93.98369565,0,3,3
 20003,202002,100,77,989,R,0.175230333,,1.255768523,1.0,66.5326087,3,0,3
 20004,202001,100,30,2819.51087,C,,,1.0,3.027097983,93.98369565,0,3,3
-20004,202002,100,30,3540.653,FIC,,,1.255768523,1.0,66.5326087,3,0,3
+20004,202002,100,30,3540.653001,FIC,,,1.255768523,1.0,66.5326087,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 53b865c3..d3060c09 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-30001,202001,100,51,8444,R,,1.129481006,1.0,1.655006,120.1991,0,4,4
-30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4,3,4
-30001,202003,100,51,2003,R,0.267924024,,1.526947,1.0,103.0154,3,0,3
-30002,202001,100,72,9343,R,,1.195062676,1.0,1.655006,120.1991,0,4,4
-30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.407609,90.8436,4,3,4
-30002,202003,100,72,4897,R,0.626375032,,1.526947,1.0,103.0154,3,0,3
-30003,202001,100,7,7511,R,,4.265190233,1.0,1.655006,120.1991,0,4,4
-30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.407609,90.8436,4,3,4
-30003,202003,100,7,6492,R,3.686541738,,1.526947,1.0,103.0154,3,0,3
-30004,202001,100,81,64,R,,0.030288689,1.0,1.655006,120.1991,0,4,4
-30004,202002,100,81,2113,R,33.015625,,8.743054929,1.407609,90.8436,4,3,4
-30004,202003,100,81,3226.439011,FIR,,,1.526947,1.0,103.0154,3,0,3
+30001,202001,100,51,8444,R,,1.129481006,1.0,1.655006,120.199052,0,4,4
+30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4
+30001,202003,100,51,2003,R,0.267924024,,1.526947,1.0,103.015385,3,0,3
+30002,202001,100,72,9343,R,,1.195062676,1.0,1.655006,120.199052,0,4,4
+30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4
+30002,202003,100,72,4897,R,0.626375032,,1.526947,1.0,103.015385,3,0,3
+30003,202001,100,7,7511,R,,4.265190233,1.0,1.655006,120.199052,0,4,4
+30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4
+30003,202003,100,7,6492,R,3.686541738,,1.526947,1.0,103.015385,3,0,3
+30004,202001,100,81,64,R,,0.030288689,1.0,1.655006,120.199052,0,4,4
+30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4
+30004,202003,100,81,3226.438865,FIR,,,1.526947,1.0,103.015385,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index 8d503bad..ce41bb22 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
 40001,202001,100,35,9491,R,,1.984319465,1.0,2.053506032,128.0208333,0,4,4
 40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4
-40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.6929825,3,3,3
+40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3
 40001,202004,100,35,4911,R,0.621488231,,0.645360538,1.0,73.71052632,3,0,3
 40002,202001,100,63,2095,R,,4.739819005,1.0,2.053506032,128.0208333,0,4,4
 40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4
-40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.6929825,3,3,3
+40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3
 40002,202004,100,63,2115,R,0.67442602,,0.645360538,1.0,73.71052632,3,0,3
 40003,202001,100,16,7863,R,,0.968230513,1.0,2.053506032,128.0208333,0,4,4
 40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4
-40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.6929825,3,3,3
+40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3
 40003,202004,100,16,1377,R,0.640167364,,0.645360538,1.0,73.71052632,3,0,3
 40004,202001,100,78,5131,R,,0.521655144,1.0,2.053506032,128.0208333,0,4,4
 40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4
-40004,202003,100,78,29547.31998,FIR,,,3.003997558,1.551291583,115.6929825,3,3,3
-40004,202004,100,78,19068.67433,FIR,,,0.645360538,1.0,73.71052632,3,0,3
+40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3
+40004,202004,100,78,19068.674333,FIR,,,0.645360538,1.0,73.71052632,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
index 960618f7..71e81d10 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
@@ -16,6 +16,6 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 50003,202005,100,76,1521,R,0.235996897,,0.49999873,1.0,49.9122807,3,0,3
 50004,202001,100,30,688,R,,0.21201849,1.0,1.103126475,70.34328358,0,4,4
 50004,202002,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4
-50004,202003,100,30,11983.80797,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3
-50004,202004,100,30,13025.43707,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3
+50004,202003,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3
+50004,202004,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3
 50004,202005,100,30,6512.701992,FIR,,,0.49999873,1.0,49.9122807,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index df455434..c38f888d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
 60001,202001,100,15,5077,R,,0.648403576,1.0,7.141605449,117.9107143,0,3,3
 60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3
-60001,202003,100,15,1046,R,0.133588761,,7.391291354,1.0,100.9130435,3,0,4
+60001,202003,100,15,1046,R,0.133588761,,7.391291354,1.0,100.913043,3,0,4
 60002,202001,100,71,1588,R,,1.309150866,1.0,7.141605449,117.9107143,0,3,3
 60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3
-60002,202003,100,71,3807,R,3.138499588,,7.391291354,1.0,100.9130435,3,0,4
+60002,202003,100,71,3807,R,3.138499588,,7.391291354,1.0,100.913043,3,0,4
 60003,202001,100,26,6541,R,,19.4672619,1.0,7.141605449,117.9107143,0,3,3
 60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3
-60003,202003,100,26,6351,R,18.90178571,,7.391291354,1.0,100.9130435,3,0,4
+60003,202003,100,26,6351,R,18.90178571,,7.391291354,1.0,100.913043,3,0,4
 60004,202001,100,3,7500.429481,BI,,,1.0,7.141605449,117.9107143,0,3,3
 60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3
-60004,202003,100,3,401,R,,,7.391291354,1.0,100.9130435,3,0,4
+60004,202003,100,3,401,R,,,7.391291354,1.0,100.913043,3,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index af6ab9a1..af68e919 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -20,10 +20,10 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3
 70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4
 70003,202007,100,42,8768,R,4.302257115,,1.593348776,1.0,70.24,3,0,3
-70004,202001,100,6,392488.3921,BI,,,1.0,47.92201545,107.48,0,3,3
+70004,202001,100,6,392488.392089,BI,,,1.0,47.92201545,107.48,0,3,3
 70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3
 70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4
 70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3
-70004,202005,100,6,212304.7472,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3
+70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3
 70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4
 70004,202007,100,6,9360.924061,FIR,,,1.593348776,1.0,70.24,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index fb56b0c5..d08651e1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -8,5 +8,5 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 90003,202001,100,14,1069,R,,0.129922217,1.0,0.528905137,71.77777778,0,3,4
 90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3
 90003,202003,100,14,2415,R,0.293509966,,2.293928258,1.0,169.3831776,3,0,3
-90004,202001,100,73,7728,R,,,1.0,1.0,71.77777778,0,0,4
-90004,202003,100,73,12364.97196,C,,,1.0,1.0,169.3831776,0,0,3
+90004,202001,100,73,7728,R,,,1.0,0.528905137,71.77777778,0,3,4
+90004,202003,100,73,12364.971963,C,,,2.293928258,1.0,169.3831776,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index 31fd6c7a..8bd1728d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -11,6 +11,6 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3
 100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3
 100003,202004,100,46,2594,R,12.65365854,,6.74787815,1.0,119.1751412,3,0,4
-100004,202001,100,86,15422.35165,C,,,1.0,1.691693133,179.3296703,0,3,3
-100004,202002,100,86,21109.67176,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3
-100004,202004,100,86,9352,R,,,6.74787815,1.0,119.1751412,3,3,4
+100004,202001,100,86,15422.351648,C,,,1.0,1.691693133,179.3296703,0,3,3
+100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3
+100004,202004,100,86,9352,R,,,6.74787815,1.0,119.1751412,3,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 8d919c26..b4bc65af 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,14 +1,14 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-110001,202001,100,89,9244,R,,1.036787797,1.0,2.656680299,101.7103175,0,4,4
+110001,202001,100,89,9244,R,,1.036787797,1.0,2.656680299,101.710317,0,4,4
 110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4
 110001,202003,100,89,6194,R,0.694706146,,0.968230653,1.0,70.26136364,3,0,3
-110002,202001,100,83,4826,R,,0.817550398,1.0,2.656680299,101.7103175,0,4,4
+110002,202001,100,83,4826,R,,0.817550398,1.0,2.656680299,101.710317,0,4,4
 110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4
 110002,202003,100,83,4743,R,0.803489751,,0.968230653,1.0,70.26136364,3,0,3
-110003,202001,100,4,7586,R,,7.466535433,1.0,2.656680299,101.7103175,0,4,4
+110003,202001,100,4,7586,R,,7.466535433,1.0,2.656680299,101.710317,0,4,4
 110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4
 110003,202003,100,4,1429,R,1.406496063,,0.968230653,1.0,70.26136364,3,0,3
-110004,202001,100,76,3975,R,,1.305847569,1.0,2.656680299,101.7103175,0,4,4
+110004,202001,100,76,3975,R,,1.305847569,1.0,2.656680299,101.710317,0,4,4
 110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4
 110004,202003,100,76,2947.294109,FIR,,,0.968230653,1.0,70.26136364,3,0,3
 110005,202001,200,27,5217,R,,0.743586089,1.0,2.290844366,182.25,0,3,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 02481a49..be126926 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -15,7 +15,7 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3
 120003,202005,100,94,4416,R,15.60424028,,5.357333441,1.0,32.73423423,3,0,3
 120004,202001,100,100,7738.738739,C,,,1.0,1.589860068,77.38738739,0,3,3
-120004,202002,100,100,6722.650253,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3
-120004,202003,100,100,8418.316782,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3
-120004,202004,100,100,8805.675573,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3
-120004,202005,100,100,47174.94022,FIC,,,5.357333441,1.0,32.73423423,3,0,3
+120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3
+120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3
+120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3
+120004,202005,100,100,47174.940224,FIC,,,5.357333441,1.0,32.73423423,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 9b67fd2d..346b1b1d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -21,8 +21,8 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3
 130003,202007,100,39,6461,R,0.741791045,,0.913312467,1.0,158.7757576,3,0,4
 130004,202001,100,37,2571,R,,,1.0,0.885479533,102.7515152,0,3,4
-130004,202002,100,37,12734.3292,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3
-130004,202003,100,37,12034.73601,FIR,,,0.945062422,1.289357643,107.46875,3,3,3
-130004,202005,100,37,10550.61563,BI,,,2.538924611,0.963158093,178.4296875,3,3,3
-130004,202006,100,37,10954.18883,BI,,,1.090218262,1.654461386,191.4609375,3,3,3
+130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3
+130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3
+130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3
+130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3
 130004,202007,100,37,6621,R,,,0.913312467,1.0,158.7757576,3,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index b6a4c3c4..5ffa2976 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -23,6 +23,6 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 140004,202001,100,28,1319.798995,C,,,1.0,0.534118956,47.13567839,0,3,3
 140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3
 140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3
-140004,202005,100,28,13403.57248,BI,,,1.108042751,0.497376695,63.63316583,3,3,3
-140004,202006,100,28,26948.53343,BI,,,2.988483968,3.720631427,127.0854271,3,3,3
+140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3
+140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3
 140004,202007,100,28,7243,R,,,0.520242185,1.0,91.63876652,3,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index dfad8aa5..7f53bb1f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -3,26 +3,26 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3
 150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4
 150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3
-150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,3,3,4
+150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.851190,3,3,4
 150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3
 150001,202007,100,15,9549,R,4.041049513,,2.111448113,1.0,152.5353535,3,0,3
 150002,202001,100,5,8611,R,,0.917723543,1.0,0.917399451,181.0909091,0,3,3
 150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3
 150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4
 150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3
-150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,3,3,4
+150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.851190,3,3,4
 150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3
 150002,202007,100,5,2593,R,1.861450108,,2.111448113,1.0,152.5353535,3,0,3
 150003,202001,100,79,3426,R,,0.548511047,1.0,0.917399451,181.0909091,0,3,3
 150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3
 150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4
 150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3
-150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,3,3,4
+150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.851190,3,3,4
 150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3
 150003,202007,100,79,2959,R,0.431844717,,2.111448113,1.0,152.5353535,3,0,3
-150004,202001,100,69,13547.81819,BI,,,1.0,0.917399451,181.0909091,0,3,3
-150004,202002,100,69,14767.63276,BI,,,1.230132332,3.509418433,204.1414141,3,3,3
+150004,202001,100,69,13547.818191,BI,,,1.0,0.917399451,181.0909091,0,3,3
+150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3
 150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4
-150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.8511905,3,3,4
+150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.851190,3,3,4
 150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3
 150004,202007,100,69,4483.444383,FIR,,,2.111448113,1.0,152.5353535,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index ccba463d..abd63869 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -22,7 +22,7 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 160003,202007,100,85,9508,R,3.973255328,,1.523164371,1.0,58.94468085,3,0,4
 160004,202001,100,42,0,R,,,1.0,0.352085676,24.45957447,0,3,4
 160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4
-160004,202003,100,42,567,R,,,0.346502312,1.552031536,30.00746269,3,3,5
+160004,202003,100,42,0,R,,,0.346502312,1.552031536,30.00746269,3,3,5
 160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4
 160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4
 160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index a0d4e34a..f8db5e58 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
 160001,202001,100,76,2086,R,,0.502166586,1.0,0.514064257,24.45957447,0,4,4
 160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,30.00746269,4,4,5
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5
 160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4
 160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4
 160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4
 160001,202007,100,76,1666,R,0.292126951,,1.392373278,1.0,58.94468085,4,0,4
 160002,202001,100,32,430,R,,0.044472024,1.0,0.514064257,24.45957447,0,4,4
 160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,30.00746269,4,4,5
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5
 160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4
 160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4
 160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4
 160002,202007,100,32,2678,R,0.304110834,,1.392373278,1.0,58.94468085,4,0,4
 160003,202001,100,85,3232,R,,0.509618417,1.0,0.514064257,24.45957447,0,4,4
 160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,30.00746269,4,4,5
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5
 160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4
 160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4
 160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4
 160003,202007,100,85,9508,R,3.973255328,,1.392373278,1.0,58.94468085,4,0,4
 160004,202001,100,42,0,R,,1,1.0,0.514064257,24.45957447,0,4,4
 160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4
-160004,202003,100,42,567,R,1,1,0.509876734,1.414023652,30.00746269,4,4,5
+160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5
 160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4
 160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4
 160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4
 160004,202007,100,42,0,R,1,,1.392373278,1.0,58.94468085,4,0,4
 160005,202001,100,33,1630.004567,BI,,,1.0,0.514064257,24.45957447,0,4,4
 160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4
-160005,202003,100,33,1129,R,,,0.509876734,1.414023652,30.00746269,4,4,5
+160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5
 160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4
-160005,202006,100,33,2696.985058,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4
-160005,202007,100,33,3755.209926,FIC,,,1.392373278,1.0,58.94468085,4,0,4
+160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4
+160005,202007,100,33,3755.209925,FIC,,,1.392373278,1.0,58.94468085,4,0,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index aabbecb1..45277645 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -12,4 +12,4 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3
 170003,202004,100,81,9250,R,0.947648806,,4.51938598,1.0,109.0330189,3,0,3
 170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4
-170004,202003,100,9,3914.194145,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3
+170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 71cb97ef..34a88e9a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -11,5 +11,5 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3
 180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4
 180003,202004,100,19,6168,R,1.465431219,,2.151700748,1.0,175.5441176,3,0,3
-180004,202002,100,26,11794.76123,BI,,,1.627795166,1.933884446,166.0073529,3,3,3
+180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3
 180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
index 1b34ed38..669b20b6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other
-190001,202001,100,9261,95
-190001,202002,100,4996,95
-190001,202003,100,1480,95
-190001,202004,100,4350,95
-190002,202001,100,2433,17
-190002,202002,100,4324,17
-190002,202003,100,6598,17
-190002,202004,100,700,17
-190003,202001,100,7888,64
-190003,202002,100,4218,64
-190003,202003,100,7591,64
-190003,202004,100,4077,64
-190004,202001,100,2247,51
-190004,202002,100,,51
-190004,202003,100,,51
-190004,202004,100,8608,51
-190005,202001,100,,34
-190005,202002,100,,34
-190005,202003,100,4456,34
-190005,202004,100,5134,34
-190006,202001,100,,8
-190006,202002,100,,8
-190006,202003,100,,8
-190006,202004,100,,8
+identifier,date,group,question,other,forward,backward,construction
+190001,202001,100,9261,95,1,0.9214,50.3694
+190001,202002,100,4996,95,0.8521,1.5274,121.4187
+190001,202003,100,1480,95,0.9685,1.8795,89.3761
+190001,202004,100,4350,95,1.113,1,110.5473
+190002,202001,100,2433,17,1,0.9214,50.3694
+190002,202002,100,4324,17,0.8521,1.5274,121.4187
+190002,202003,100,6598,17,0.9685,1.8795,89.3761
+190002,202004,100,700,17,1.113,1,110.5473
+190003,202001,100,7888,64,1,0.9214,50.3694
+190003,202002,100,4218,64,0.8521,1.5274,121.4187
+190003,202003,100,7591,64,0.9685,1.8795,89.3761
+190003,202004,100,4077,64,1.113,1,110.5473
+190004,202001,100,2247,51,1,0.9214,50.3694
+190004,202002,100,,51,0.8521,1.5274,121.4187
+190004,202003,100,,51,0.9685,1.8795,89.3761
+190004,202004,100,8608,51,1.113,1,110.5473
+190005,202001,100,,34,1,0.9214,50.3694
+190005,202002,100,,34,0.8521,1.5274,121.4187
+190005,202003,100,4456,34,0.9685,1.8795,89.3761
+190005,202004,100,5134,34,1.113,1,110.5473
+190006,202001,100,,8,1,0.9214,50.3694
+190006,202002,100,,8,0.8521,1.5274,121.4187
+190006,202003,100,,8,0.9685,1.8795,89.3761
+190006,202004,100,,8,1.113,1,110.5473
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index 5a5a9f8e..230189a0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-190001,202001,100,95,9261,R,,1.853682946,1.0,0.9214,50.3694,0,3,4
-190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,3,3,3
-190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,3,4,4
-190001,202004,100,95,4350,R,2.939189189,,1.113,1.0,110.5473,4,0,5
-190002,202001,100,17,2433,R,,0.562673451,1.0,0.9214,50.3694,0,3,4
-190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,3,3,3
-190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,3,4,4
-190002,202004,100,17,700,R,11.26857143,,1.113,1.0,110.5473,4,0,5
-190003,202001,100,64,7888,R,,1.870080607,1.0,0.9214,50.3694,0,3,4
-190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,3,3,3
-190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,3,4,4
-190003,202004,100,64,4077,R,0.537083388,,1.113,1.0,110.5473,4,0,5
-190004,202001,100,51,2247,R,,,1.0,0.9214,50.3694,0,3,4
-190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,3,3,3
-190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,3,4,4
-190004,202004,100,51,8608,R,,,1.113,1.0,110.5473,4,0,5
-190005,202001,100,34,6271.13538,BI,,,1.0,0.9214,50.3694,0,3,4
-190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,3,3,3
-190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,3,4,4
-190005,202004,100,34,5134,R,1.152154399,,1.113,1.0,110.5473,4,0,5
-190006,202001,100,8,402.9552,C,,,1.0,0.9214,50.3694,0,3,4
-190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,3,3,3
-190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,3,4,4
-190006,202004,100,8,370.1196299,FIC,,,1.113,1.0,110.5473,4,0,5
+190001,202001,100,95,9261,R,,1.853682946,1.0,0.9214,50.3694,,,
+190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,,,
+190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,,,
+190001,202004,100,95,4350,R,2.939189189,,1.113,1.0,110.5473,,,
+190002,202001,100,17,2433,R,,0.562673451,1.0,0.9214,50.3694,,,
+190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,,,
+190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,,,
+190002,202004,100,17,700,R,11.26857143,,1.113,1.0,110.5473,,,
+190003,202001,100,64,7888,R,,1.870080607,1.0,0.9214,50.3694,,,
+190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,,,
+190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,,,
+190003,202004,100,64,4077,R,0.537083388,,1.113,1.0,110.5473,,,
+190004,202001,100,51,2247,R,,,1.0,0.9214,50.3694,,,
+190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,,,
+190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,,,
+190004,202004,100,51,8608,R,,,1.113,1.0,110.5473,,,
+190005,202001,100,34,6271.13538,BI,,,1.0,0.9214,50.3694,,,
+190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,,,
+190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,,,
+190005,202004,100,34,5134,R,1.152154399,,1.113,1.0,110.5473,,,
+190006,202001,100,8,402.9552,C,,,1.0,0.9214,50.3694,,,
+190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,,,
+190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,,,
+190006,202004,100,8,370.1196299,FIC,,,1.113,1.0,110.5473,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index 89c712f6..085269c9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -16,10 +16,10 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4
 200004,202004,100,86,1947.413826,FIR,,,0.276010255,1.0,42.68681319,4,0,4
 200005,202001,100,6,429.8061674,C,,,1.0,0.597514698,71.63436123,0,4,4
-200005,202002,100,6,10116.54267,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4
-200005,202003,100,6,11749.48594,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4
-200005,202004,100,6,3242.978611,FIC,,,0.276010255,1.0,42.68681319,4,0,4
-200006,202001,100,41,8740.605259,BI,,,1.0,0.597514698,71.63436123,0,4,4
+200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4
+200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4
+200005,202004,100,6,3242.978608,FIC,,,0.276010255,1.0,42.68681319,4,0,4
+200006,202001,100,41,5222.283092,BI,,,1.0,0.597514698,71.63436123,0,4,4
 200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4
 200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4
 200006,202004,100,41,2711,R,0.305224049,,0.276010255,1.0,42.68681319,4,0,4
@@ -35,7 +35,7 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5
 200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4
 200009,202004,200,45,1945,R,0.226110207,,0.197315737,1.0,99.37735849,3,0,3
-200010,202001,200,85,14038.67103,BI,,,1.0,2.163456777,132.3214286,0,3,4
+200010,202001,200,85,14038.671027,BI,,,1.0,2.163456777,132.3214286,0,3,4
 200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5
 200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4
 200010,202004,200,85,354.3790633,FIR,,,0.197315737,1.0,99.37735849,3,0,3
@@ -43,6 +43,6 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5
 200011,202004,200,79,7850.811321,C,,,0.197315737,1.0,99.37735849,3,0,3
 200012,202001,200,87,5495,R,,,1.0,2.163456777,132.3214286,0,3,4
-200012,202002,200,87,13949.29461,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5
-200012,202003,200,87,29170.87018,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4
+200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5
+200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4
 200012,202004,200,87,5755.871742,FIR,,,0.197315737,1.0,99.37735849,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index c4854814..79f0cf4a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,7 +1,7 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
 220001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,15.46666667,0,2,2
 220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
-220001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,0
+220001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,2
 220002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,15.46666667,0,2,2
 220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
 220002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 66038304..b133409d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -13,4 +13,4 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 230004,202003,2,9,736,R,1.171974522,,1.174002242,1.0,50,2,0,2
 230005,202001,1,18,278.4,C,,,1.0,1.087985595,15.46666667,0,2,2
 230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2
-230005,202003,2,18,900.6274345,FIC,,,1.174002242,1.0,50,2,0,2
+230005,202003,2,18,900.627434,FIC,,,1.174002242,1.0,50,2,0,2

From 9ce6e13dc94db23876d116410a0a8834e77ba9a2 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 6 Mar 2023 15:51:38 +0000
Subject: [PATCH 126/531] Zero Included Initial corrections and prep for growth
 being output and tested

---
 .../imputation/mean_of_ratios.py                      |  2 +-
 tests/imputation/test_mean_of_ratios.py               | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 34635c14..5f3abba7 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -14,7 +14,7 @@ def impute(
     trim_threshold: Optional[Number] = None,
     lower_trim: Optional[Number] = None,
     upper_trim: Optional[Number] = None,
-    include_zeros: Optional[Boolean] = False,
+    include_zeros: Optional[bool] = False,
     **kwargs
 ) -> DataFrame:
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index ba3861c7..3ae73198 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -24,6 +24,8 @@
 count_backward_col = "count_backward"
 count_construction_col = "count_construction"
 exclude_col = "exclude"
+# forward_growth_col = "growth_forward"
+# backward_growth_col = "growth_backward"
 
 decimal_type = DecimalType(15, 6)
 
@@ -41,6 +43,8 @@
 count_backward_type = LongType()
 count_construction_type = LongType()
 exclude_type = StringType()
+# forward_growth_type = decimal_type
+# backward_growth_type = decimal_type
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -59,6 +63,8 @@
     count_backward_col,
     count_construction_col,
     exclude_col,
+    # forward_growth_col,
+    # backward_growth_col,
 )
 
 dataframe_types = {
@@ -76,6 +82,8 @@
     count_backward_col: count_backward_type,
     count_construction_col: count_construction_type,
     exclude_col: exclude_type,
+    # forward_growth_col: forward_growth_type,
+    # backward_growth_col: backward_growth_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()
@@ -149,6 +157,9 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
             }
         )
 
+    if "zeros_included" in scenario:
+        imputation_kwargs.update({"include_zeros": True})
+
     if scenario.endswith("filtered"):
         if "dev" in scenario_type:
             imputation_kwargs["link_filter"] = "(" + exclude_col + ' == "N")'

From bf7f1fc60cf759e7a851a0a4eda0ee87107c8062 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 16:03:26 +0000
Subject: [PATCH 127/531] another attempt at zero filter

---
 .../imputation/mean_of_ratios.py                    | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 5f3abba7..e0c4ab65 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -18,16 +18,17 @@ def impute(
     **kwargs
 ) -> DataFrame:
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
+        common_cols = ["period", "grouping", "ref", "aux"]
         if not include_zeros:
-            df = df.filter(
-                "0 NOT IN (previous.output, current.output, next.output)"
+            df = df.selectExpr(
+                *common_cols,
+                "CASE WHEN previous.output <> 0 THEN previous.output END AS previous.output",
+                "CASE WHEN current.output <> 0 THEN current.output END AS current.output",
+                "CASE WHEN next.output <> 0 THEN next.output END AS next.output",
             )
 
         df = df.selectExpr(
-            "period",
-            "grouping",
-            "ref",
-            "aux",
+            *common_cols,
             "current.output",
             """CASE
                 WHEN previous.output = 0

From 8e5fafa743f3b7afd7de67982c4eb20a97829729 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 16:45:23 +0000
Subject: [PATCH 128/531] New version of zerio inclusion code

---
 .../imputation/mean_of_ratios.py              | 28 ++++++++++++-------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index e0c4ab65..62bce3b5 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -22,23 +22,31 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
         if not include_zeros:
             df = df.selectExpr(
                 *common_cols,
-                "CASE WHEN previous.output <> 0 THEN previous.output END AS previous.output",
-                "CASE WHEN current.output <> 0 THEN current.output END AS current.output",
-                "CASE WHEN next.output <> 0 THEN next.output END AS next.output",
+                "CASE WHEN previous.output != 0 THEN previous.output END AS previous_output",
+                "CASE WHEN current.output != 0 THEN current.output END AS current_output",
+                "CASE WHEN next.output != 0 THEN next.output END AS next_output",
+            )
+
+        else:
+            df.selectExpr(
+                *common_cols,
+                "previous.output AS previous_output",
+                "current.output AS current_output",
+                "next.output AS next_output"
             )
 
         df = df.selectExpr(
             *common_cols,
-            "current.output",
+            "current_output",
             """CASE
-                WHEN previous.output = 0
+                WHEN previous_output = 0
                 THEN 1
-                ELSE current.output/previous.output
+                ELSE current_output/previous_output
             END AS growth_forward""",
             """CASE
-                WHEN next.output = 0
+                WHEN next_output = 0
                 THEN 1
-                ELSE current.output/next.output
+                ELSE current_output/next_output
             END AS growth_backward""",
         )
 
@@ -140,10 +148,10 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
         ratio_df = trimmed_df.groupBy("period", "grouping").agg(
             expr("mean(trimmed_forward) AS forward"),
             expr("mean(trimmed_backward) AS backward"),
-            expr("sum(current.output)/sum(aux) AS construction"),
+            expr("sum(current_output)/sum(aux) AS construction"),
             expr("count(trimmed_forward) AS count_forward"),
             expr("count(trimmed_backward) AS count_backward"),
-            expr("count(current.output) AS count_construction"),
+            expr("count(current_output) AS count_construction"),
         )
 
         growth_df = df.select(

From e2ca84705a1f6602ac2d25c1f4da8cd0f85b8a5a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 6 Mar 2023 16:47:48 +0000
Subject: [PATCH 129/531] Output Growth and Test

---
 .../imputation/engine.py                      |  3 +++
 .../imputation/mean_of_ratios.py              |  2 ++
 tests/imputation/test_mean_of_ratios.py       | 22 ++++++++++++-------
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index a666cee2..7828b53b 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -63,6 +63,7 @@ def impute(
     count_backward_col: Optional[str] = "count_backward",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
+    additional_outputs: Optional[dict] = None,
 ) -> DataFrame:
     # --- Validate params ---
     link_cols = [forward_link_col, backward_link_col, construction_link_col]
@@ -486,6 +487,8 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
     def create_output(df: DataFrame) -> DataFrame:
         del full_col_mapping["aux"]
         del full_col_mapping["grouping"]
+        if additional_outputs is not None:
+            full_col_mapping.update(additional_outputs)
         return select_cols(
             df.filter(col("period") != lit(prior_period)), reversed=False
         ).withColumnRenamed("output", output_col)
diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 62bce3b5..85abad62 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -170,5 +170,7 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
         ]
 
     kwargs["ratio_calculation_function"] = mean_of_ratios
+    kwargs["additional_outputs"] = {"growth_forward":"growth_forward","growth_backward":"growth_backward"}
+
 
     return engine.impute(**kwargs)
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 3ae73198..2b3aa1a4 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -24,8 +24,8 @@
 count_backward_col = "count_backward"
 count_construction_col = "count_construction"
 exclude_col = "exclude"
-# forward_growth_col = "growth_forward"
-# backward_growth_col = "growth_backward"
+forward_growth_col = "growth_forward"
+backward_growth_col = "growth_backward"
 
 decimal_type = DecimalType(15, 6)
 
@@ -43,8 +43,8 @@
 count_backward_type = LongType()
 count_construction_type = LongType()
 exclude_type = StringType()
-# forward_growth_type = decimal_type
-# backward_growth_type = decimal_type
+forward_growth_type = decimal_type
+backward_growth_type = decimal_type
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -63,8 +63,8 @@
     count_backward_col,
     count_construction_col,
     exclude_col,
-    # forward_growth_col,
-    # backward_growth_col,
+    forward_growth_col,
+    backward_growth_col,
 )
 
 dataframe_types = {
@@ -82,8 +82,8 @@
     count_backward_col: count_backward_type,
     count_construction_col: count_construction_type,
     exclude_col: exclude_type,
-    # forward_growth_col: forward_growth_type,
-    # backward_growth_col: backward_growth_type,
+    forward_growth_col: forward_growth_type,
+    backward_growth_col: backward_growth_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()
@@ -220,6 +220,12 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     scenario_actual_output = scenario_actual_output.withColumn(
         construction_col, bround(col(construction_col).cast(decimal_type), 6)
     )
+    scenario_actual_output = scenario_actual_output.withColumn(
+        forward_growth_col, bround(col(forward_growth_col).cast(decimal_type), 6)
+    )
+    scenario_actual_output = scenario_actual_output.withColumn(
+        backward_growth_col, bround(col(backward_growth_col).cast(decimal_type), 6)
+    )
     select_cols = list(set(dataframe_columns) & set(scenario_expected_output.columns))
     assert isinstance(scenario_actual_output, type(scenario_input))
     sort_col_list = [reference_col, period_col]

From f978d85e6df6b8f108eb212187a85188ec57193d Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 16:53:53 +0000
Subject: [PATCH 130/531] Allow pass in of growth col names

---
 .../imputation/mean_of_ratios.py                       | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index 85abad62..e771b9e9 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -15,6 +15,8 @@ def impute(
     lower_trim: Optional[Number] = None,
     upper_trim: Optional[Number] = None,
     include_zeros: Optional[bool] = False,
+    growth_forward_col: Optional[str] = "growth_forward",
+    growth_backward_col: Optional[str] = "growth_backward",
     **kwargs
 ) -> DataFrame:
     def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
@@ -32,7 +34,7 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
                 *common_cols,
                 "previous.output AS previous_output",
                 "current.output AS current_output",
-                "next.output AS next_output"
+                "next.output AS next_output",
             )
 
         df = df.selectExpr(
@@ -170,7 +172,9 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
         ]
 
     kwargs["ratio_calculation_function"] = mean_of_ratios
-    kwargs["additional_outputs"] = {"growth_forward":"growth_forward","growth_backward":"growth_backward"}
-
+    kwargs["additional_outputs"] = {
+        "growth_forward": growth_forward_col,
+        "growth_backward": growth_backward_col,
+    }
 
     return engine.impute(**kwargs)

From d98046f5ca479d17916417155a4e44fd2accfd07 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 6 Mar 2023 16:57:05 +0000
Subject: [PATCH 131/531] Renamed

---
 ...I_R_NS_C_FI_FI_input.csv => 16.1_BI_BI_R_NS_C_FI_FI_input.csv} | 0
 ...R_NS_C_FI_FI_output.csv => 16.1_BI_BI_R_NS_C_FI_FI_output.csv} | 0
 ...input.csv => 16.2_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv} | 0
 ...tput.csv => 16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv} | 0
 4 files changed, 0 insertions(+), 0 deletions(-)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{16_BI_BI_R_NS_C_FI_FI_input.csv => 16.1_BI_BI_R_NS_C_FI_FI_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{16_BI_BI_R_NS_C_FI_FI_output.csv => 16.1_BI_BI_R_NS_C_FI_FI_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv => 16.2_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv => 16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv} (100%)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.6_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv

From bf784c606766b026845e0d45cc3badd16998717b Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 6 Mar 2023 17:05:00 +0000
Subject: [PATCH 132/531] Have nulled current creating a bad count. Count aux
 instead.

---
 statistical_methods_library/imputation/mean_of_ratios.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index e771b9e9..d65571ca 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -153,7 +153,7 @@ def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
             expr("sum(current_output)/sum(aux) AS construction"),
             expr("count(trimmed_forward) AS count_forward"),
             expr("count(trimmed_backward) AS count_backward"),
-            expr("count(current_output) AS count_construction"),
+            expr("count(aux) AS count_construction"),
         )
 
         growth_df = df.select(

From 16b0244cf7d1f7b73b93e5e12891f3b0d78de226 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 6 Mar 2023 17:16:42 +0000
Subject: [PATCH 133/531] Correcting data not Zero exclusion works.

---
 ...16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index abd63869..594cc2da 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
 160001,202001,100,76,2086,R,,0.502166586,1.0,0.352085676,24.45957447,0,3,4
 160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,30.00746269,3,3,5
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5
 160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4
 160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4
 160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4
 160001,202007,100,76,1666,R,0.292126951,,1.523164371,1.0,58.94468085,3,0,4
 160002,202001,100,32,430,R,,0.044472024,1.0,0.352085676,24.45957447,0,3,4
 160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,30.00746269,3,3,5
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5
 160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4
 160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4
 160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4
 160002,202007,100,32,2678,R,0.304110834,,1.523164371,1.0,58.94468085,3,0,4
 160003,202001,100,85,3232,R,,0.509618417,1.0,0.352085676,24.45957447,0,3,4
 160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,30.00746269,3,3,5
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5
 160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4
 160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4
 160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4
 160003,202007,100,85,9508,R,3.973255328,,1.523164371,1.0,58.94468085,3,0,4
 160004,202001,100,42,0,R,,,1.0,0.352085676,24.45957447,0,3,4
 160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4
-160004,202003,100,42,0,R,,,0.346502312,1.552031536,30.00746269,3,3,5
+160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5
 160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4
 160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4
 160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4
 160004,202007,100,42,0,R,,,1.523164371,1.0,58.94468085,3,0,4
 160005,202001,100,33,1356.031558,BI,,,1.0,0.352085676,24.45957447,0,3,4
 160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4
-160005,202003,100,33,1129,R,,,0.346502312,1.552031536,30.00746269,3,3,5
+160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5
 160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4
 160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4
-160005,202007,100,33,3807.848172,FIC,,,1.523164371,1.0,58.94468085,3,0,4
+160005,202007,100,33,3807.848173,FIC,,,1.523164371,1.0,58.94468085,3,0,4

From 427aa7453e510e3770ab3de569b77bdd17ef2da6 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 17:42:28 +0000
Subject: [PATCH 134/531] New api, factory functions for ratio calculator
 callbacks

---
 .../imputation/mean_of_ratios.py              | 180 -------------
 .../imputation/ratio_calculators.py           | 244 ++++++++++++++++++
 .../imputation/ratio_of_means.py              | 173 -------------
 3 files changed, 244 insertions(+), 353 deletions(-)
 create mode 100644 statistical_methods_library/imputation/ratio_calculators.py
 delete mode 100644 statistical_methods_library/imputation/ratio_of_means.py

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
index d65571ca..e69de29b 100644
--- a/statistical_methods_library/imputation/mean_of_ratios.py
+++ b/statistical_methods_library/imputation/mean_of_ratios.py
@@ -1,180 +0,0 @@
-# For Copyright information, please see LICENCE.
-from decimal import Decimal
-from numbers import Number
-from typing import List, Optional
-
-from pyspark.sql import DataFrame
-from pyspark.sql.functions import col, expr, when
-
-from . import engine
-
-
-def impute(
-    *,
-    trim_threshold: Optional[Number] = None,
-    lower_trim: Optional[Number] = None,
-    upper_trim: Optional[Number] = None,
-    include_zeros: Optional[bool] = False,
-    growth_forward_col: Optional[str] = "growth_forward",
-    growth_backward_col: Optional[str] = "growth_backward",
-    **kwargs
-) -> DataFrame:
-    def mean_of_ratios(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        common_cols = ["period", "grouping", "ref", "aux"]
-        if not include_zeros:
-            df = df.selectExpr(
-                *common_cols,
-                "CASE WHEN previous.output != 0 THEN previous.output END AS previous_output",
-                "CASE WHEN current.output != 0 THEN current.output END AS current_output",
-                "CASE WHEN next.output != 0 THEN next.output END AS next_output",
-            )
-
-        else:
-            df.selectExpr(
-                *common_cols,
-                "previous.output AS previous_output",
-                "current.output AS current_output",
-                "next.output AS next_output",
-            )
-
-        df = df.selectExpr(
-            *common_cols,
-            "current_output",
-            """CASE
-                WHEN previous_output = 0
-                THEN 1
-                ELSE current_output/previous_output
-            END AS growth_forward""",
-            """CASE
-                WHEN next_output = 0
-                THEN 1
-                ELSE current_output/next_output
-            END AS growth_backward""",
-        )
-
-        if lower_trim is not None:
-            trimmed_df = (
-                df.join(
-                    (
-                        df.groupBy("period", "grouping")
-                        .agg(
-                            expr(
-                                """
-                                sum(
-                                    cast(growth_forward IS NOT NULL AS integer)
-                                ) AS count_forward
-                            """
-                            ),
-                            expr(
-                                """
-                                sum(
-                                    cast(growth_backward IS NOT NULL AS integer)
-                                ) AS count_backward
-                            """
-                            ),
-                        )
-                        .select(
-                            col("period"),
-                            col("grouping"),
-                            (col("count_forward") * Decimal(lower_trim) / 100).alias(
-                                "lower_forward"
-                            ),
-                            (
-                                col("count_forward") * (100 - Decimal(upper_trim)) / 100
-                            ).alias("upper_forward"),
-                            (col("count_backward") * Decimal(lower_trim) / 100).alias(
-                                "lower_backward"
-                            ),
-                            (
-                                col("count_backward")
-                                * (100 - Decimal(upper_trim))
-                                / 100
-                            ).alias("upper_backward"),
-                        )
-                    ),
-                    ["period", "grouping"],
-                )
-                .withColumn(
-                    "num_forward",
-                    expr(
-                        """
-                        row_number() OVER (
-                            PARTITION BY period, grouping
-                            ORDER BY growth_forward ASC
-                        )
-                    """
-                    ),
-                )
-                .withColumn(
-                    "num_backward",
-                    expr(
-                        """
-                        row_number() OVER (
-                            PARTITION BY period, grouping
-                            ORDER BY growth_backward ASC
-                        )
-                    """
-                    ),
-                )
-                .select(
-                    col("period"),
-                    col("grouping"),
-                    when(
-                        (
-                            col("num_forward").between(
-                                col("lower_forward"), col("upper_forward")
-                            )
-                            | trim_threshold
-                            >= col("count_forward")
-                        ),
-                        col("growth_forward"),
-                    ).alias("trimmed_forward"),
-                    when(
-                        (
-                            col("num_backward").between(
-                                col("lower_backward"), col("upper_backward")
-                            )
-                            | trim_threshold
-                            >= col("count_backward")
-                        ),
-                        col("growth_backward"),
-                    ).alias("trimmed_backward"),
-                )
-            )
-
-        else:
-            trimmed_df = df.withColumn(
-                "trimmed_forward", col("growth_forward")
-            ).withColumn("trimmed_backward", col("growth_backward"))
-
-        ratio_df = trimmed_df.groupBy("period", "grouping").agg(
-            expr("mean(trimmed_forward) AS forward"),
-            expr("mean(trimmed_backward) AS backward"),
-            expr("sum(current_output)/sum(aux) AS construction"),
-            expr("count(trimmed_forward) AS count_forward"),
-            expr("count(trimmed_backward) AS count_backward"),
-            expr("count(aux) AS count_construction"),
-        )
-
-        growth_df = df.select(
-            "ref", "period", "grouping", "growth_forward", "growth_backward"
-        )
-        return [
-            engine.RatioCalculationResult(
-                data=growth_df,
-                join_columns=["period", "grouping", "ref"],
-            ),
-            engine.RatioCalculationResult(
-                data=ratio_df,
-                join_columns=["period", "grouping"],
-                fill_columns=["forward", "backward", "construction"],
-            ),
-        ]
-
-    kwargs["ratio_calculation_function"] = mean_of_ratios
-    kwargs["additional_outputs"] = {
-        "growth_forward": growth_forward_col,
-        "growth_backward": growth_backward_col,
-    }
-
-    return engine.impute(**kwargs)
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
new file mode 100644
index 00000000..b44e2c45
--- /dev/null
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -0,0 +1,244 @@
+# For Copyright information, please see LICENCE.
+from decimal import Decimal
+from numbers import Number
+from typing import List, Optional
+
+from pyspark.sql import DataFrame
+from pyspark.sql.functions import col, expr, when
+
+from .engine import RatioCalculationResult
+
+
+def mean_of_ratios(
+    *,
+    trim_threshold: Optional[Number] = None,
+    lower_trim: Optional[Number] = None,
+    upper_trim: Optional[Number] = None,
+    include_zeros: Optional[bool] = False,
+    growth_forward_col: Optional[str] = "growth_forward",
+    growth_backward_col: Optional[str] = "growth_backward",
+    **_kwargs,
+):
+    def calculate(df: DataFrame) -> List[RatioCalculationResult]:
+        common_cols = ["period", "grouping", "ref", "aux"]
+        if not include_zeros:
+            df = df.selectExpr(
+                *common_cols,
+                "CASE WHEN previous.output != 0 THEN previous.output END AS previous_output",
+                "CASE WHEN current.output != 0 THEN current.output END AS current_output",
+                "CASE WHEN next.output != 0 THEN next.output END AS next_output",
+            )
+
+        else:
+            df.selectExpr(
+                *common_cols,
+                "previous.output AS previous_output",
+                "current.output AS current_output",
+                "next.output AS next_output",
+            )
+
+        df = df.selectExpr(
+            *common_cols,
+            "current_output",
+            """CASE
+                WHEN previous_output = 0
+                THEN 1
+                ELSE current_output/previous_output
+            END AS growth_forward""",
+            """CASE
+                WHEN next_output = 0
+                THEN 1
+                ELSE current_output/next_output
+            END AS growth_backward""",
+        )
+
+        if lower_trim is not None:
+            trimmed_df = (
+                df.join(
+                    (
+                        df.groupBy("period", "grouping")
+                        .agg(
+                            expr(
+                                """
+                                sum(
+                                    cast(growth_forward IS NOT NULL AS integer)
+                                ) AS count_forward
+                            """
+                            ),
+                            expr(
+                                """
+                                sum(
+                                    cast(growth_backward IS NOT NULL AS integer)
+                                ) AS count_backward
+                            """
+                            ),
+                        )
+                        .select(
+                            col("period"),
+                            col("grouping"),
+                            (col("count_forward") * Decimal(lower_trim) / 100).alias(
+                                "lower_forward"
+                            ),
+                            (
+                                col("count_forward") * (100 - Decimal(upper_trim)) / 100
+                            ).alias("upper_forward"),
+                            (col("count_backward") * Decimal(lower_trim) / 100).alias(
+                                "lower_backward"
+                            ),
+                            (
+                                col("count_backward")
+                                * (100 - Decimal(upper_trim))
+                                / 100
+                            ).alias("upper_backward"),
+                        )
+                    ),
+                    ["period", "grouping"],
+                )
+                .withColumn(
+                    "num_forward",
+                    expr(
+                        """
+                        row_number() OVER (
+                            PARTITION BY period, grouping
+                            ORDER BY growth_forward ASC
+                        )
+                    """
+                    ),
+                )
+                .withColumn(
+                    "num_backward",
+                    expr(
+                        """
+                        row_number() OVER (
+                            PARTITION BY period, grouping
+                            ORDER BY growth_backward ASC
+                        )
+                    """
+                    ),
+                )
+                .select(
+                    col("period"),
+                    col("grouping"),
+                    when(
+                        (
+                            col("num_forward").between(
+                                col("lower_forward"), col("upper_forward")
+                            )
+                            | trim_threshold
+                            >= col("count_forward")
+                        ),
+                        col("growth_forward"),
+                    ).alias("trimmed_forward"),
+                    when(
+                        (
+                            col("num_backward").between(
+                                col("lower_backward"), col("upper_backward")
+                            )
+                            | trim_threshold
+                            >= col("count_backward")
+                        ),
+                        col("growth_backward"),
+                    ).alias("trimmed_backward"),
+                )
+            )
+
+        else:
+            trimmed_df = df.withColumn(
+                "trimmed_forward", col("growth_forward")
+            ).withColumn("trimmed_backward", col("growth_backward"))
+
+        ratio_df = trimmed_df.groupBy("period", "grouping").agg(
+            expr("mean(trimmed_forward) AS forward"),
+            expr("mean(trimmed_backward) AS backward"),
+            expr("sum(current_output)/sum(aux) AS construction"),
+            expr("count(trimmed_forward) AS count_forward"),
+            expr("count(trimmed_backward) AS count_backward"),
+            expr("count(aux) AS count_construction"),
+        )
+
+        growth_df = df.select(
+            "ref", "period", "grouping", "growth_forward", "growth_backward"
+        )
+        return [
+            RatioCalculationResult(
+                data=growth_df,
+                join_columns=["period", "grouping", "ref"],
+            ),
+            RatioCalculationResult(
+                data=ratio_df,
+                join_columns=["period", "grouping"],
+                fill_columns=["forward", "backward", "construction"],
+            ),
+        ]
+
+    additional_outputs = {
+        "growth_forward": growth_forward_col,
+        "growth_backward": growth_backward_col,
+    }
+
+    return calculate, additional_outputs
+
+def ratio_of_means(*, **_kwargs):
+    def calculate(df: DataFrame) -> List[RatioCalculationResult]:
+        df = df.groupBy("period", "grouping").agg(
+            expr(
+                """
+                    sum(
+                        CASE
+                            WHEN previous.output IS NOT NULL
+                            THEN current.output
+                        END
+                    )/sum(previous.output) AS forward
+                """
+            ),
+            expr(
+                """
+                    sum(
+                        CASE
+                            WHEN next.output IS NOT NULL
+                            THEN current.output
+                        END
+                    )/sum(next.output) AS backward
+                """
+            ),
+            expr("sum(current.output)/sum(aux) AS construction"),
+            expr(
+                """
+                    CASE
+                        WHEN sum(previous.output) = 0
+                        THEN 0
+                        WHEN sum(previous.output) IS NOT NULL
+                        THEN sum(cast(previous.output IS NOT NULL AS integer))
+                    END AS count_forward
+                """
+            ),
+            expr(
+                """
+                    CASE
+                        WHEN sum(next.output) = 0
+                        THEN 0
+                        WHEN sum(next.output) IS NOT NULL
+                        THEN sum(cast(next.output IS NOT NULL AS integer))
+                    END AS count_backward
+                """
+            ),
+            expr(
+                """
+                    CASE
+                        WHEN sum(aux) = 0
+                        THEN 0
+                        ELSE count(current.output)
+                    END AS count_construction
+                """
+            ),
+        )
+        return [
+            RatioCalculationResult(
+                data=df,
+                join_columns=["period", "grouping"],
+                fill_columns=["forward", "backward", "construction"],
+            )
+        ]
+    return calculate, {}
+
+
diff --git a/statistical_methods_library/imputation/ratio_of_means.py b/statistical_methods_library/imputation/ratio_of_means.py
deleted file mode 100644
index f910c48b..00000000
--- a/statistical_methods_library/imputation/ratio_of_means.py
+++ /dev/null
@@ -1,173 +0,0 @@
-# For Copyright information, please see LICENCE.
-
-from typing import List
-
-from pyspark.sql import DataFrame
-from pyspark.sql.functions import expr
-
-from . import engine
-
-
-def impute(**kwargs) -> DataFrame:
-    """
-    Perform Ratio of means (also known as Ratio of Sums) imputation on a
-    dataframe.
-
-    ###Arguments
-    * `input_df`: The input dataframe
-    * `reference_col`: The name of the column to reference a unique
-      contributor.
-    * `period_col`: The name of the column containing the period
-      information for the contributor.
-    * `grouping_col`: The Name of the column containing the grouping information
-      for the contributor.
-    * `target_col`: The name of the column containing the target
-      variable.
-    * `auxiliary_col`: The name of the column containing the auxiliary
-      variable.
-    * `output_col`: The name of the column which will contain the
-      output. Defaults to `imputed`.
-    * `marker_col`: The name of the column which will contain the marker
-      information for a given value. Defaults to `imputation_marker`.
-    * `forward_link_col`: If specified, the name of an existing column
-      containing forward ratio (or link) information. Defaults to None which
-      means that a default column name of `forward` will be created and the
-      forward ratios will be calculated.
-    * `backward_link_col`: If specified, the name of an existing column
-      containing backward ratio (or link) information. Defaults to None which
-      means that a default column name of `backward` will be created and the
-      backward ratios will be calculated.
-    * `construction_link_col`: If specified, the name of an existing column
-      containing construction ratio (or link) information. Defaults to None
-      which means that a default column name of `construction` will be created
-      and the construction ratios will be calculated.
-    * `count_construction_col`: If specified, the name of the column that will
-      hold the count of matched pairs for construction.
-      Defaults to 'count_construction'
-    * `count_forward_col`: If specified, the name of the column that will
-      hold the count of matched pairs for forward imputation.
-      Defaults to 'count_forward'
-    * `count_backward_col`: If specified, the name of the column that will
-      hold the count of matched pairs for forward imputation.
-      Defaults to 'count_forward'
-    * `back_data_df`: If specified, will use this to base the initial imputation
-      calculations on.
-    * `link_filter`: A filter compatible with the pyspark DataFrame.filter
-      method. Only responses that match the filter conditions will be included
-      in link calculations.
-      This will not prevent non responses from being imputed for.
-
-    ###Returns
-    A new dataframe containing:
-
-    * `reference_col`
-    * `period_col`
-    * `output_col`
-    * `marker_col`
-    * `forward_col`
-    * `backward_col`
-    * `construction_col`
-    * `construction_count_col`
-    * `forward_count_col`
-    * `backward_count_col`
-
-    No other columns are created. In particular, no other columns
-    will be passed through from the input since it is expected that the
-    information in the output dataframe will be sufficient to join on any
-    other required input data.
-
-    ###Notes
-    If no Imputation needs to take place, the forward, backward and
-    construction columns returned will still be calculated if they are not
-    passed in.
-
-    The existence of `output_col` and `marker_col` in the input data is
-    an error.
-
-    All or none of `forward_link_col`, `backward_link_col` and
-    `construction_link_col` must be specified.
-
-    `marker_col` will contain one of the marker constants defined in the
-    `Marker` enum.
-
-    This method implements rolling imputation, that is imputed values chain
-    together until either a return is present or the contributor is not present
-    in the sample. Values either side of such a gap do not interact (i.e.
-    ratios and imputes will not take into account values for a contributor
-    from before or after periods where they were dropped from the sample). In
-    the case of rolling imputation, the markers will be the same for chains of
-    imputed values.
-
-    If `back_data_df` is provided it must contain the following columns:
-        *`reference_col`
-        *`period_col`
-        *`grouping_col`
-        *`auxiliary_col`
-        *`output_col`
-        *`marker_col`
-    """
-
-    def ratio_of_means(df: DataFrame) -> List[engine.RatioCalculationResult]:
-        df = df.groupBy("period", "grouping").agg(
-            expr(
-                """
-                    sum(
-                        CASE
-                            WHEN previous.output IS NOT NULL
-                            THEN current.output
-                        END
-                    )/sum(previous.output) AS forward
-                """
-            ),
-            expr(
-                """
-                    sum(
-                        CASE
-                            WHEN next.output IS NOT NULL
-                            THEN current.output
-                        END
-                    )/sum(next.output) AS backward
-                """
-            ),
-            expr("sum(current.output)/sum(aux) AS construction"),
-            expr(
-                """
-                    CASE
-                        WHEN sum(previous.output) = 0
-                        THEN 0
-                        WHEN sum(previous.output) IS NOT NULL
-                        THEN sum(cast(previous.output IS NOT NULL AS integer))
-                    END AS count_forward
-                """
-            ),
-            expr(
-                """
-                    CASE
-                        WHEN sum(next.output) = 0
-                        THEN 0
-                        WHEN sum(next.output) IS NOT NULL
-                        THEN sum(cast(next.output IS NOT NULL AS integer))
-                    END AS count_backward
-                """
-            ),
-            expr(
-                """
-                    CASE
-                        WHEN sum(aux) = 0
-                        THEN 0
-                        ELSE count(current.output)
-                    END AS count_construction
-                """
-            ),
-        )
-        return [
-            engine.RatioCalculationResult(
-                data=df,
-                join_columns=["period", "grouping"],
-                fill_columns=["forward", "backward", "construction"],
-            )
-        ]
-
-    kwargs["ratio_calculation_function"] = ratio_of_means
-
-    return engine.impute(**kwargs)

From 6fc72b25577474f15bb752071e999e6d9441168c Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 18:15:57 +0000
Subject: [PATCH 135/531] Finish new api for imputation

---
 .../imputation/engine.py                      | 25 +++++++----------
 .../imputation/ratio_calculators.py           | 27 ++++++++++++++-----
 2 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 7828b53b..2eba76e6 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -1,17 +1,16 @@
 """
 Perform imputation on a data frame.
 
-Currently only Ratio of Means (or Ratio of Sums) imputation is implemented.
 For Copyright information, please see LICENCE.
 """
-from dataclasses import dataclass
+
 from enum import Enum
-from typing import Callable, Iterable, List, Optional, Union
+from typing import Any, Callable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, lit, when
 from pyspark.sql.types import DecimalType, StringType
-
+from .ratio_calculators import RatioCalculator, RatioCalculationResult
 from statistical_methods_library.utilities import validation
 
 # --- Marker constants ---
@@ -37,13 +36,6 @@ class Marker(Enum):
     """The value has been forward imputed from a constructed value."""
 
 
-@dataclass
-class RatioCalculationResult:
-    data: DataFrame
-    join_columns: List[Union[str, Column]]
-    fill_columns: List[Union[str, Column]] = None
-
-
 def impute(
     *,
     input_df: DataFrame,
@@ -52,7 +44,7 @@ def impute(
     grouping_col: str,
     target_col: str,
     auxiliary_col: str,
-    ratio_calculation_function: Callable[[DataFrame], Iterable[RatioCalculationResult]],
+    ratio_calculator_factory: Callable[[Any], RatioCalculator],
     output_col: Optional[str] = "imputed",
     marker_col: Optional[str] = "imputation_marker",
     forward_link_col: Optional[str] = None,
@@ -63,8 +55,9 @@ def impute(
     count_backward_col: Optional[str] = "count_backward",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
-    additional_outputs: Optional[dict] = None,
+    **kwargs,
 ) -> DataFrame:
+    ratio_calculator = ratio_calculator_factory(**kwargs)
     # --- Validate params ---
     link_cols = [forward_link_col, backward_link_col, construction_link_col]
     if any(link_cols) and not all(link_cols):
@@ -293,7 +286,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         # Join the grouping ratios onto the input such that each contributor has
         # a set of ratios.
         all_fill_cols = []
-        for result in ratio_calculation_function(working_df):
+        for result in ratio_calculator.calculate(working_df):
             df = df.join(result.data, result.join_columns, "left")
             if result.fill_columns:
                 all_fill_cols += result.fill_columns
@@ -487,8 +480,8 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
     def create_output(df: DataFrame) -> DataFrame:
         del full_col_mapping["aux"]
         del full_col_mapping["grouping"]
-        if additional_outputs is not None:
-            full_col_mapping.update(additional_outputs)
+        if ratio_calculator.additional_outputs is not None:
+            full_col_mapping.update(ratio_calculator.additional_outputs)
         return select_cols(
             df.filter(col("period") != lit(prior_period)), reversed=False
         ).withColumnRenamed("output", output_col)
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index b44e2c45..5e6d292b 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -1,12 +1,25 @@
 # For Copyright information, please see LICENCE.
 from decimal import Decimal
 from numbers import Number
-from typing import List, Optional
+from typing import Callable, Dict, Iterable, List, Optional, Union
 
-from pyspark.sql import DataFrame
+from pyspark.sql import DataFrame, Column
 from pyspark.sql.functions import col, expr, when
+from dataclasses import dataclass
+
+
+@dataclass
+class RatioCalculationResult:
+    data: DataFrame
+    join_columns: List[Union[str, Column]]
+    fill_columns: List[Union[str, Column]] = None
+
+
+@dataclass
+class RatioCalculator:
+    calculate: Callable[[DataFrame], Iterable[RatioCalculationResult]]
+    additional_outputs: Optional[Dict[str, str]] = None
 
-from .engine import RatioCalculationResult
 
 
 def mean_of_ratios(
@@ -18,7 +31,7 @@ def mean_of_ratios(
     growth_forward_col: Optional[str] = "growth_forward",
     growth_backward_col: Optional[str] = "growth_backward",
     **_kwargs,
-):
+) -> RatioCalculator:
     def calculate(df: DataFrame) -> List[RatioCalculationResult]:
         common_cols = ["period", "grouping", "ref", "aux"]
         if not include_zeros:
@@ -176,9 +189,9 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
         "growth_backward": growth_backward_col,
     }
 
-    return calculate, additional_outputs
+    return RatioCalculator(calculate, additional_outputs)
 
-def ratio_of_means(*, **_kwargs):
+def ratio_of_means(**_kw) -> RatioCalculator:
     def calculate(df: DataFrame) -> List[RatioCalculationResult]:
         df = df.groupBy("period", "grouping").agg(
             expr(
@@ -239,6 +252,6 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
                 fill_columns=["forward", "backward", "construction"],
             )
         ]
-    return calculate, {}
+    return RatioCalculator(calculate)
 
 

From 5785bc9de22a364219832c3a48a2024b5d45184b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 18:16:11 +0000
Subject: [PATCH 136/531] Adjust tests for new imputation API

---
 tests/imputation/test_mean_of_ratios.py |  7 +++--
 tests/imputation/test_ratio_of_means.py | 40 +++++++++++++------------
 2 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 2b3aa1a4..786c3960 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -7,7 +7,9 @@
 from pyspark.sql.functions import bround, col, lit
 from pyspark.sql.types import DecimalType, LongType, StringType
 
-from statistical_methods_library.imputation import mean_of_ratios
+from statistical_methods_library.imputation.ratio_calculators import mean_of_ratios
+
+from statistical_methods_library.imputation.engine import impute
 from statistical_methods_library.utilities.exceptions import ValidationError
 
 auxiliary_col = "other"
@@ -98,6 +100,7 @@
     "auxiliary_col": auxiliary_col,
     "output_col": output_col,
     "marker_col": marker_col,
+    "ratio_calculator_factory": mean_of_ratios
 }
 
 test_scenarios = []
@@ -205,7 +208,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         grouping_col,
         auxiliary_col,
     )
-    scenario_actual_output = mean_of_ratios.impute(
+    scenario_actual_output = impute(
         input_df=scenario_input, **imputation_kwargs
     )
     scenario_actual_output = scenario_actual_output.withColumn(
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 8415a90b..2c9f9960 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -7,7 +7,8 @@
 from pyspark.sql.functions import bround, col, lit
 from pyspark.sql.types import DecimalType, LongType, StringType
 
-from statistical_methods_library.imputation import ratio_of_means
+from statistical_methods_library.imputation.engine import impute
+from statistical_methods_library.imputation.ratio_calculators import ratio_of_means
 from statistical_methods_library.utilities.exceptions import ValidationError
 
 auxiliary_col = "other"
@@ -90,6 +91,7 @@
     "auxiliary_col": auxiliary_col,
     "output_col": output_col,
     "marker_col": marker_col,
+    "ratio_calculator_factory": ratio_of_means
 }
 
 test_scenarios = []
@@ -122,7 +124,7 @@
 def test_input_not_a_dataframe():
     with pytest.raises(TypeError):
         # noinspection PyTypeChecker
-        ratio_of_means.impute(input_df="not_a_dataframe", **params)
+        impute(input_df="not_a_dataframe", **params)
 
 
 # --- Test type validation on the back_data dataframe(s) ---
@@ -140,7 +142,7 @@ def test_back_data_not_a_dataframe(fxt_load_test_csv):
     )
     with pytest.raises(TypeError):
         # noinspection PyTypeChecker
-        ratio_of_means.impute(
+        impute(
             input_df=test_dataframe, **params, back_data_df="not_a_dataframe"
         )
 
@@ -160,7 +162,7 @@ def test_dataframe_column_missing(fxt_load_test_csv):
     )
     bad_dataframe = test_dataframe.drop(grouping_col)
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(input_df=bad_dataframe, **params)
+        impute(input_df=bad_dataframe, **params)
 
 
 # --- Test if dataframe has duplicate rows ---
@@ -177,7 +179,7 @@ def test_dataframe_duplicate_rows(fxt_load_test_csv):
         "duplicate_rows",
     )
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(input_df=test_dataframe, **params)
+        impute(input_df=test_dataframe, **params)
 
 
 # --- Test if target missing from input dataframe(s) ---
@@ -195,7 +197,7 @@ def test_dataframe_target_missing(fxt_load_test_csv):
     )
     bad_dataframe = test_dataframe.drop(target_col)
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(input_df=bad_dataframe, **params)
+        impute(input_df=bad_dataframe, **params)
 
 
 # --- Test if params null ---
@@ -214,7 +216,7 @@ def test_params_none(fxt_load_test_csv):
     bad_params = params.copy()
     bad_params["target_col"] = None
     with pytest.raises(TypeError):
-        ratio_of_means.impute(input_df=test_dataframe, **bad_params)
+        impute(input_df=test_dataframe, **bad_params)
 
 
 @pytest.mark.dependency()
@@ -230,7 +232,7 @@ def test_params_empty_string(fxt_load_test_csv):
     bad_params = params.copy()
     bad_params["target_col"] = ""
     with pytest.raises(ValueError):
-        ratio_of_means.impute(input_df=test_dataframe, **bad_params)
+        impute(input_df=test_dataframe, **bad_params)
 
 
 @pytest.mark.dependency()
@@ -244,7 +246,7 @@ def test_params_missing_link_column(fxt_load_test_csv):
         "basic_functionality",
     )
     with pytest.raises(TypeError):
-        ratio_of_means.impute(
+        impute(
             input_df=test_dataframe, **params, construction_link_col=construction_col
         )
 
@@ -262,7 +264,7 @@ def test_params_not_string(fxt_load_test_csv):
     bad_params = params.copy()
     bad_params["reference_col"] = 23
     with pytest.raises(TypeError):
-        ratio_of_means.impute(input_df=test_dataframe, **bad_params)
+        impute(input_df=test_dataframe, **bad_params)
 
 
 # --- Test if output contents are as expected, both new columns and data ---
@@ -280,7 +282,7 @@ def test_dataframe_returned_as_expected(fxt_spark_session, fxt_load_test_csv):
     )
     # Make sure that no extra columns pass through.
     test_dataframe = test_dataframe.withColumn("bonus_column", lit(0))
-    ret_val = ratio_of_means.impute(input_df=test_dataframe, **params)
+    ret_val = impute(input_df=test_dataframe, **params)
     assert isinstance(ret_val, type(test_dataframe))
     ret_cols = ret_val.columns
     assert "bonus_column" not in ret_cols
@@ -306,7 +308,7 @@ def test_back_data_missing_column(fxt_load_test_csv, fxt_spark_session):
         "back_data_missing_column",
     )
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(
+        impute(
             input_df=test_dataframe, **params, back_data_df=bad_back_data
         )
 
@@ -331,7 +333,7 @@ def test_back_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
     )
 
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(
+        impute(
             input_df=test_dataframe, **params, back_data_df=bad_back_data
         )
 
@@ -363,7 +365,7 @@ def test_back_data_without_output_is_invalid(fxt_load_test_csv, fxt_spark_sessio
     )
 
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(
+        impute(
             input_df=test_dataframe, **params, back_data_df=bad_back_data
         )
 
@@ -390,7 +392,7 @@ def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_ses
         "back_data_with_link_cols",
     )
 
-    ret_val = ratio_of_means.impute(
+    ret_val = impute(
         input_df=test_dataframe, **params, back_data_df=back_data
     )
 
@@ -432,7 +434,7 @@ def test_input_has_link_cols_and_back_data_does_not_have_link_cols(
         }
     )
 
-    ret_val = ratio_of_means.impute(**imputation_kwargs)
+    ret_val = impute(**imputation_kwargs)
 
     assert ret_val.count() == 1
 
@@ -449,7 +451,7 @@ def test_incorrect_column_types(fxt_load_test_csv):
         "basic_functionality",
     )
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(input_df=test_dataframe, **params)
+        impute(input_df=test_dataframe, **params)
 
 
 @pytest.mark.dependency()
@@ -464,7 +466,7 @@ def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
     )
 
     with pytest.raises(ValidationError):
-        ratio_of_means.impute(input_df=test_dataframe, **params)
+        impute(input_df=test_dataframe, **params)
 
 
 # --- Test Scenarios.
@@ -566,7 +568,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         grouping_col,
         auxiliary_col,
     )
-    scenario_actual_output = ratio_of_means.impute(
+    scenario_actual_output = impute(
         input_df=scenario_input, **imputation_kwargs
     )
     scenario_actual_output = scenario_actual_output.withColumn(

From 1811354adae5c32fae4e195a36f3445657d86149 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 18:39:36 +0000
Subject: [PATCH 137/531] Remove unnecessary object and thus adjust new
 imputation api

---
 .../imputation/engine.py                      | 11 +++++----
 .../imputation/ratio_calculators.py           | 23 ++++++++-----------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 2eba76e6..96bb127f 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -10,7 +10,7 @@
 from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, lit, when
 from pyspark.sql.types import DecimalType, StringType
-from .ratio_calculators import RatioCalculator, RatioCalculationResult
+from .ratio_calculators import RatioCalculatorFactory, RatioCalculationResult
 from statistical_methods_library.utilities import validation
 
 # --- Marker constants ---
@@ -44,7 +44,7 @@ def impute(
     grouping_col: str,
     target_col: str,
     auxiliary_col: str,
-    ratio_calculator_factory: Callable[[Any], RatioCalculator],
+    ratio_calculator_factory: RatioCalculatorFactory,
     output_col: Optional[str] = "imputed",
     marker_col: Optional[str] = "imputation_marker",
     forward_link_col: Optional[str] = None,
@@ -58,6 +58,7 @@ def impute(
     **kwargs,
 ) -> DataFrame:
     ratio_calculator = ratio_calculator_factory(**kwargs)
+    additional_outputs = {}
     # --- Validate params ---
     link_cols = [forward_link_col, backward_link_col, construction_link_col]
     if any(link_cols) and not all(link_cols):
@@ -286,10 +287,12 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         # Join the grouping ratios onto the input such that each contributor has
         # a set of ratios.
         all_fill_cols = []
-        for result in ratio_calculator.calculate(working_df):
+        for result in ratio_calculator(working_df):
             df = df.join(result.data, result.join_columns, "left")
             if result.fill_columns:
                 all_fill_cols += result.fill_columns
+            if result.additional_outputs:
+                additional_outputs.update(result.additional_outputs)
 
         if all_fill_cols:
             df = df.fillna(1.0, all_fill_cols)
@@ -480,7 +483,7 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
     def create_output(df: DataFrame) -> DataFrame:
         del full_col_mapping["aux"]
         del full_col_mapping["grouping"]
-        if ratio_calculator.additional_outputs is not None:
+        if additional_outputs:
             full_col_mapping.update(ratio_calculator.additional_outputs)
         return select_cols(
             df.filter(col("period") != lit(prior_period)), reversed=False
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 5e6d292b..15084ea4 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -1,7 +1,7 @@
 # For Copyright information, please see LICENCE.
 from decimal import Decimal
 from numbers import Number
-from typing import Callable, Dict, Iterable, List, Optional, Union
+from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
 from pyspark.sql import DataFrame, Column
 from pyspark.sql.functions import col, expr, when
@@ -13,13 +13,10 @@ class RatioCalculationResult:
     data: DataFrame
     join_columns: List[Union[str, Column]]
     fill_columns: List[Union[str, Column]] = None
-
-
-@dataclass
-class RatioCalculator:
-    calculate: Callable[[DataFrame], Iterable[RatioCalculationResult]]
     additional_outputs: Optional[Dict[str, str]] = None
 
+RatioCalculator = Callable[[DataFrame], Iterable[RatioCalculationResult]]
+RatioCalculatorFactory = Callable[[Any], RatioCalculator]
 
 
 def mean_of_ratios(
@@ -172,10 +169,15 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
         growth_df = df.select(
             "ref", "period", "grouping", "growth_forward", "growth_backward"
         )
+
         return [
             RatioCalculationResult(
                 data=growth_df,
                 join_columns=["period", "grouping", "ref"],
+                additional_outputs = {
+                    "growth_forward": growth_forward_col,
+                    "growth_backward": growth_backward_col,
+                }
             ),
             RatioCalculationResult(
                 data=ratio_df,
@@ -184,12 +186,7 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
             ),
         ]
 
-    additional_outputs = {
-        "growth_forward": growth_forward_col,
-        "growth_backward": growth_backward_col,
-    }
-
-    return RatioCalculator(calculate, additional_outputs)
+    return calculate
 
 def ratio_of_means(**_kw) -> RatioCalculator:
     def calculate(df: DataFrame) -> List[RatioCalculationResult]:
@@ -252,6 +249,6 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
                 fill_columns=["forward", "backward", "construction"],
             )
         ]
-    return RatioCalculator(calculate)
+    return calculate
 
 

From 6a3ca7fc447612a078d937afb530562de8a35234 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 18:43:35 +0000
Subject: [PATCH 138/531] Format using Black and Isort

---
 statistical_methods_library/imputation/engine.py    |  4 +++-
 .../imputation/ratio_calculators.py                 | 13 +++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 96bb127f..2ed9a6d8 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -10,9 +10,11 @@
 from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, lit, when
 from pyspark.sql.types import DecimalType, StringType
-from .ratio_calculators import RatioCalculatorFactory, RatioCalculationResult
+
 from statistical_methods_library.utilities import validation
 
+from .ratio_calculators import RatioCalculationResult, RatioCalculatorFactory
+
 # --- Marker constants ---
 
 
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 15084ea4..6498511c 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -1,11 +1,11 @@
 # For Copyright information, please see LICENCE.
+from dataclasses import dataclass
 from decimal import Decimal
 from numbers import Number
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
-from pyspark.sql import DataFrame, Column
+from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, expr, when
-from dataclasses import dataclass
 
 
 @dataclass
@@ -15,6 +15,7 @@ class RatioCalculationResult:
     fill_columns: List[Union[str, Column]] = None
     additional_outputs: Optional[Dict[str, str]] = None
 
+
 RatioCalculator = Callable[[DataFrame], Iterable[RatioCalculationResult]]
 RatioCalculatorFactory = Callable[[Any], RatioCalculator]
 
@@ -174,10 +175,10 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
             RatioCalculationResult(
                 data=growth_df,
                 join_columns=["period", "grouping", "ref"],
-                additional_outputs = {
+                additional_outputs={
                     "growth_forward": growth_forward_col,
                     "growth_backward": growth_backward_col,
-                }
+                },
             ),
             RatioCalculationResult(
                 data=ratio_df,
@@ -188,6 +189,7 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
 
     return calculate
 
+
 def ratio_of_means(**_kw) -> RatioCalculator:
     def calculate(df: DataFrame) -> List[RatioCalculationResult]:
         df = df.groupBy("period", "grouping").agg(
@@ -249,6 +251,5 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
                 fill_columns=["forward", "backward", "construction"],
             )
         ]
-    return calculate
-
 
+    return calculate

From ffdae1e07de2e3cdba0bc7c7356d8bbbfc1cd135 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 18:45:49 +0000
Subject: [PATCH 139/531] Delete empty file

---
 statistical_methods_library/imputation/mean_of_ratios.py | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 statistical_methods_library/imputation/mean_of_ratios.py

diff --git a/statistical_methods_library/imputation/mean_of_ratios.py b/statistical_methods_library/imputation/mean_of_ratios.py
deleted file mode 100644
index e69de29b..00000000

From fb0c64fc9fece2a297288264d2c4c988dd427c66 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 18:53:36 +0000
Subject: [PATCH 140/531] Fix incorrect use of additional output and remove
 unnecessary logic

---
 statistical_methods_library/imputation/engine.py |  9 +++------
 .../imputation/ratio_calculators.py              | 16 ++++++++++++----
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 2ed9a6d8..8edf8463 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -291,10 +291,8 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         all_fill_cols = []
         for result in ratio_calculator(working_df):
             df = df.join(result.data, result.join_columns, "left")
-            if result.fill_columns:
-                all_fill_cols += result.fill_columns
-            if result.additional_outputs:
-                additional_outputs.update(result.additional_outputs)
+            all_fill_cols += result.fill_columns
+            additional_outputs.update(result.additional_outputs)
 
         if all_fill_cols:
             df = df.fillna(1.0, all_fill_cols)
@@ -485,8 +483,7 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
     def create_output(df: DataFrame) -> DataFrame:
         del full_col_mapping["aux"]
         del full_col_mapping["grouping"]
-        if additional_outputs:
-            full_col_mapping.update(ratio_calculator.additional_outputs)
+        full_col_mapping.update(additional_outputs)
         return select_cols(
             df.filter(col("period") != lit(prior_period)), reversed=False
         ).withColumnRenamed("output", output_col)
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 6498511c..e0c68b67 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -12,8 +12,8 @@
 class RatioCalculationResult:
     data: DataFrame
     join_columns: List[Union[str, Column]]
-    fill_columns: List[Union[str, Column]] = None
-    additional_outputs: Optional[Dict[str, str]] = None
+    fill_columns: List[Union[str, Column]] = []
+    additional_outputs: Optional[Dict[str, str]] = {}
 
 
 RatioCalculator = Callable[[DataFrame], Iterable[RatioCalculationResult]]
@@ -35,8 +35,16 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
         if not include_zeros:
             df = df.selectExpr(
                 *common_cols,
-                "CASE WHEN previous.output != 0 THEN previous.output END AS previous_output",
-                "CASE WHEN current.output != 0 THEN current.output END AS current_output",
+                """
+                    CASE 
+                        WHEN previous.output != 0 THEN previous.output
+                    END AS previous_output
+                """,
+                """
+                    CASE
+                        WHEN current.output != 0 THEN current.output
+                    END AS current_output
+                """,
                 "CASE WHEN next.output != 0 THEN next.output END AS next_output",
             )
 

From ef617271f35ab443dd5fdb07273794af270543d3 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 18:57:55 +0000
Subject: [PATCH 141/531] Reformat tests with isort and black

---
 tests/imputation/test_mean_of_ratios.py | 10 ++++------
 tests/imputation/test_ratio_of_means.py | 26 +++++++------------------
 2 files changed, 11 insertions(+), 25 deletions(-)

diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 786c3960..52e2eba7 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -7,9 +7,8 @@
 from pyspark.sql.functions import bround, col, lit
 from pyspark.sql.types import DecimalType, LongType, StringType
 
-from statistical_methods_library.imputation.ratio_calculators import mean_of_ratios
-
 from statistical_methods_library.imputation.engine import impute
+from statistical_methods_library.imputation.ratio_calculators import mean_of_ratios
 from statistical_methods_library.utilities.exceptions import ValidationError
 
 auxiliary_col = "other"
@@ -100,7 +99,7 @@
     "auxiliary_col": auxiliary_col,
     "output_col": output_col,
     "marker_col": marker_col,
-    "ratio_calculator_factory": mean_of_ratios
+    "ratio_calculator_factory": mean_of_ratios,
 }
 
 test_scenarios = []
@@ -128,6 +127,7 @@
 
 # --- Test type validation on the input dataframe(s) ---
 
+
 @pytest.mark.parametrize(
     "scenario_type, scenario",
     test_scenarios,
@@ -208,9 +208,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         grouping_col,
         auxiliary_col,
     )
-    scenario_actual_output = impute(
-        input_df=scenario_input, **imputation_kwargs
-    )
+    scenario_actual_output = impute(input_df=scenario_input, **imputation_kwargs)
     scenario_actual_output = scenario_actual_output.withColumn(
         output_col, bround(col(output_col), 6)
     )
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 2c9f9960..8dd6eee2 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -91,7 +91,7 @@
     "auxiliary_col": auxiliary_col,
     "output_col": output_col,
     "marker_col": marker_col,
-    "ratio_calculator_factory": ratio_of_means
+    "ratio_calculator_factory": ratio_of_means,
 }
 
 test_scenarios = []
@@ -142,9 +142,7 @@ def test_back_data_not_a_dataframe(fxt_load_test_csv):
     )
     with pytest.raises(TypeError):
         # noinspection PyTypeChecker
-        impute(
-            input_df=test_dataframe, **params, back_data_df="not_a_dataframe"
-        )
+        impute(input_df=test_dataframe, **params, back_data_df="not_a_dataframe")
 
 
 # --- Test if cols missing from input dataframe(s) ---
@@ -308,9 +306,7 @@ def test_back_data_missing_column(fxt_load_test_csv, fxt_spark_session):
         "back_data_missing_column",
     )
     with pytest.raises(ValidationError):
-        impute(
-            input_df=test_dataframe, **params, back_data_df=bad_back_data
-        )
+        impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
 
 
 @pytest.mark.dependency()
@@ -333,9 +329,7 @@ def test_back_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
     )
 
     with pytest.raises(ValidationError):
-        impute(
-            input_df=test_dataframe, **params, back_data_df=bad_back_data
-        )
+        impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
 
 
 @pytest.mark.dependency()
@@ -365,9 +359,7 @@ def test_back_data_without_output_is_invalid(fxt_load_test_csv, fxt_spark_sessio
     )
 
     with pytest.raises(ValidationError):
-        impute(
-            input_df=test_dataframe, **params, back_data_df=bad_back_data
-        )
+        impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
 
 
 # Test if when the back data input has link cols and the main data input does not
@@ -392,9 +384,7 @@ def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_ses
         "back_data_with_link_cols",
     )
 
-    ret_val = impute(
-        input_df=test_dataframe, **params, back_data_df=back_data
-    )
+    ret_val = impute(input_df=test_dataframe, **params, back_data_df=back_data)
 
     assert ret_val.count() == 1
 
@@ -568,9 +558,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         grouping_col,
         auxiliary_col,
     )
-    scenario_actual_output = impute(
-        input_df=scenario_input, **imputation_kwargs
-    )
+    scenario_actual_output = impute(input_df=scenario_input, **imputation_kwargs)
     scenario_actual_output = scenario_actual_output.withColumn(
         output_col, bround(col(output_col), 6)
     )

From c8b833abe4757f922417d93792c41b6344fbe1b5 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 6 Mar 2023 18:59:34 +0000
Subject: [PATCH 142/531] Linted

---
 statistical_methods_library/imputation/engine.py            | 4 ++--
 statistical_methods_library/imputation/ratio_calculators.py | 2 +-
 tests/imputation/test_mean_of_ratios.py                     | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 8edf8463..06708e3f 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -5,7 +5,7 @@
 """
 
 from enum import Enum
-from typing import Any, Callable, List, Optional, Union
+from typing import Optional, Union
 
 from pyspark.sql import Column, DataFrame
 from pyspark.sql.functions import col, lit, when
@@ -13,7 +13,7 @@
 
 from statistical_methods_library.utilities import validation
 
-from .ratio_calculators import RatioCalculationResult, RatioCalculatorFactory
+from .ratio_calculators import RatioCalculatorFactory
 
 # --- Marker constants ---
 
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index e0c68b67..35699058 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -36,7 +36,7 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
             df = df.selectExpr(
                 *common_cols,
                 """
-                    CASE 
+                    CASE
                         WHEN previous.output != 0 THEN previous.output
                     END AS previous_output
                 """,
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 52e2eba7..213f8d72 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -4,12 +4,11 @@
 
 import pytest
 from chispa.dataframe_comparer import assert_df_equality
-from pyspark.sql.functions import bround, col, lit
+from pyspark.sql.functions import bround, col
 from pyspark.sql.types import DecimalType, LongType, StringType
 
 from statistical_methods_library.imputation.engine import impute
 from statistical_methods_library.imputation.ratio_calculators import mean_of_ratios
-from statistical_methods_library.utilities.exceptions import ValidationError
 
 auxiliary_col = "other"
 backward_col = "backward"

From b4e8091df4693aaaab0f8c65e50bbe4e20e8e805 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 19:04:27 +0000
Subject: [PATCH 143/531] Fix incorrect usage of mutable defaults in
 RatioCalculationResult dataclass

---
 statistical_methods_library/imputation/ratio_calculators.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 35699058..00377c43 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -1,5 +1,5 @@
 # For Copyright information, please see LICENCE.
-from dataclasses import dataclass
+from dataclasses import dataclass, field
 from decimal import Decimal
 from numbers import Number
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
@@ -12,8 +12,8 @@
 class RatioCalculationResult:
     data: DataFrame
     join_columns: List[Union[str, Column]]
-    fill_columns: List[Union[str, Column]] = []
-    additional_outputs: Optional[Dict[str, str]] = {}
+    fill_columns: List[Union[str, Column]] = field(default_factory=list)
+    additional_outputs: Optional[Dict[str, str]] = field(default_factory=dict)
 
 
 RatioCalculator = Callable[[DataFrame], Iterable[RatioCalculationResult]]

From 49bf2c193209b555f65eb5d312a13bb6e8714555 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 6 Mar 2023 19:11:57 +0000
Subject: [PATCH 144/531] Actually assign the aliased result when we do not
 exclude zeros

---
 statistical_methods_library/imputation/ratio_calculators.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 00377c43..b4e43a0f 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -49,7 +49,7 @@ def calculate(df: DataFrame) -> List[RatioCalculationResult]:
             )
 
         else:
-            df.selectExpr(
+            df = df.selectExpr(
                 *common_cols,
                 "previous.output AS previous_output",
                 "current.output AS current_output",

From d40da1e34c0920afb49aef40663cafcced27ac19 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 7 Mar 2023 10:36:24 +0000
Subject: [PATCH 145/531] When links provided. Growth Ratios are not
 calculated.

---
 tests/imputation/test_mean_of_ratios.py | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 213f8d72..918cae62 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -220,12 +220,20 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     scenario_actual_output = scenario_actual_output.withColumn(
         construction_col, bround(col(construction_col).cast(decimal_type), 6)
     )
-    scenario_actual_output = scenario_actual_output.withColumn(
-        forward_growth_col, bround(col(forward_growth_col).cast(decimal_type), 6)
-    )
-    scenario_actual_output = scenario_actual_output.withColumn(
-        backward_growth_col, bround(col(backward_growth_col).cast(decimal_type), 6)
-    )
+
+    if "link_columns" in scenario:
+        scenario_expected_output = scenario_expected_output.drop(
+        forward_growth_col,
+        backward_growth_col,
+        )
+    else:
+        scenario_actual_output = scenario_actual_output.withColumn(
+            forward_growth_col, bround(col(forward_growth_col).cast(decimal_type), 6)
+        )
+        scenario_actual_output = scenario_actual_output.withColumn(
+            backward_growth_col, bround(col(backward_growth_col).cast(decimal_type), 6)
+        )
+
     select_cols = list(set(dataframe_columns) & set(scenario_expected_output.columns))
     assert isinstance(scenario_actual_output, type(scenario_input))
     sort_col_list = [reference_col, period_col]

From e63e9c20cc3972d642995c8844e99f187afaac01 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 7 Mar 2023 10:37:05 +0000
Subject: [PATCH 146/531] Linted

---
 tests/imputation/test_mean_of_ratios.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 918cae62..1a135c4c 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -223,8 +223,8 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
 
     if "link_columns" in scenario:
         scenario_expected_output = scenario_expected_output.drop(
-        forward_growth_col,
-        backward_growth_col,
+            forward_growth_col,
+            backward_growth_col,
         )
     else:
         scenario_actual_output = scenario_actual_output.withColumn(

From 7011f0d46eebfeb95f7333c371857f4cb05d7469 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 7 Mar 2023 13:57:23 +0000
Subject: [PATCH 147/531] Simplify imputaion imports:

- Import relevant parts of engine and the ratio calculator factories in main imputation module
- Expose imputation marker constant enum in main imputation module
---
 statistical_methods_library/imputation/__init__.py | 2 ++
 tests/imputation/test_mean_of_ratios.py            | 3 +--
 tests/imputation/test_ratio_of_means.py            | 3 +--
 3 files changed, 4 insertions(+), 4 deletions(-)
 create mode 100644 statistical_methods_library/imputation/__init__.py

diff --git a/statistical_methods_library/imputation/__init__.py b/statistical_methods_library/imputation/__init__.py
new file mode 100644
index 00000000..f57fe9c9
--- /dev/null
+++ b/statistical_methods_library/imputation/__init__.py
@@ -0,0 +1,2 @@
+from .engine import impute, Marker
+from .ratio_calculators import mean_of_ratios, ratio_of_means
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 1a135c4c..50a504b8 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -7,8 +7,7 @@
 from pyspark.sql.functions import bround, col
 from pyspark.sql.types import DecimalType, LongType, StringType
 
-from statistical_methods_library.imputation.engine import impute
-from statistical_methods_library.imputation.ratio_calculators import mean_of_ratios
+from statistical_methods_library.imputation import impute, mean_of_ratios
 
 auxiliary_col = "other"
 backward_col = "backward"
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 8dd6eee2..6f7538ee 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -7,8 +7,7 @@
 from pyspark.sql.functions import bround, col, lit
 from pyspark.sql.types import DecimalType, LongType, StringType
 
-from statistical_methods_library.imputation.engine import impute
-from statistical_methods_library.imputation.ratio_calculators import ratio_of_means
+from statistical_methods_library.imputation import impute, ratio_of_means
 from statistical_methods_library.utilities.exceptions import ValidationError
 
 auxiliary_col = "other"

From 0216f36a0ba6ac704559eb6e18e8de6b6a427f65 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 8 Mar 2023 14:38:33 +0000
Subject: [PATCH 148/531] Remove unnecessary factory function

---
 .../imputation/engine.py                      |   9 +-
 .../imputation/ratio_calculators.py           | 418 +++++++++---------
 2 files changed, 210 insertions(+), 217 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 06708e3f..fae90985 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -13,7 +13,7 @@
 
 from statistical_methods_library.utilities import validation
 
-from .ratio_calculators import RatioCalculatorFactory
+from .ratio_calculators import RatioCalculator
 
 # --- Marker constants ---
 
@@ -46,7 +46,7 @@ def impute(
     grouping_col: str,
     target_col: str,
     auxiliary_col: str,
-    ratio_calculator_factory: RatioCalculatorFactory,
+    ratio_calculator: RatioCalculator,
     output_col: Optional[str] = "imputed",
     marker_col: Optional[str] = "imputation_marker",
     forward_link_col: Optional[str] = None,
@@ -57,9 +57,8 @@ def impute(
     count_backward_col: Optional[str] = "count_backward",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
-    **kwargs,
+    **ratio_calculator_params,
 ) -> DataFrame:
-    ratio_calculator = ratio_calculator_factory(**kwargs)
     additional_outputs = {}
     # --- Validate params ---
     link_cols = [forward_link_col, backward_link_col, construction_link_col]
@@ -289,7 +288,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         # Join the grouping ratios onto the input such that each contributor has
         # a set of ratios.
         all_fill_cols = []
-        for result in ratio_calculator(working_df):
+        for result in ratio_calculator(df=working_df, **ratio_calculator_params):
             df = df.join(result.data, result.join_columns, "left")
             all_fill_cols += result.fill_columns
             additional_outputs.update(result.additional_outputs)
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index b4e43a0f..16cb4eef 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -16,12 +16,12 @@ class RatioCalculationResult:
     additional_outputs: Optional[Dict[str, str]] = field(default_factory=dict)
 
 
-RatioCalculator = Callable[[DataFrame], Iterable[RatioCalculationResult]]
-RatioCalculatorFactory = Callable[[Any], RatioCalculator]
+RatioCalculator = Callable[[DataFrame, Any], Iterable[RatioCalculationResult]]
 
 
 def mean_of_ratios(
     *,
+    df: DataFrame,
     trim_threshold: Optional[Number] = None,
     lower_trim: Optional[Number] = None,
     upper_trim: Optional[Number] = None,
@@ -29,235 +29,229 @@ def mean_of_ratios(
     growth_forward_col: Optional[str] = "growth_forward",
     growth_backward_col: Optional[str] = "growth_backward",
     **_kwargs,
-) -> RatioCalculator:
-    def calculate(df: DataFrame) -> List[RatioCalculationResult]:
-        common_cols = ["period", "grouping", "ref", "aux"]
-        if not include_zeros:
-            df = df.selectExpr(
-                *common_cols,
-                """
-                    CASE
-                        WHEN previous.output != 0 THEN previous.output
-                    END AS previous_output
-                """,
-                """
-                    CASE
-                        WHEN current.output != 0 THEN current.output
-                    END AS current_output
-                """,
-                "CASE WHEN next.output != 0 THEN next.output END AS next_output",
-            )
-
-        else:
-            df = df.selectExpr(
-                *common_cols,
-                "previous.output AS previous_output",
-                "current.output AS current_output",
-                "next.output AS next_output",
-            )
+) -> List[RatioCalculationResult]:
+    common_cols = ["period", "grouping", "ref", "aux"]
+    if not include_zeros:
+        df = df.selectExpr(
+            *common_cols,
+            """
+                CASE
+                    WHEN previous.output != 0 THEN previous.output
+                END AS previous_output
+            """,
+            """
+                CASE
+                    WHEN current.output != 0 THEN current.output
+                END AS current_output
+            """,
+            "CASE WHEN next.output != 0 THEN next.output END AS next_output",
+        )
 
+    else:
         df = df.selectExpr(
             *common_cols,
-            "current_output",
-            """CASE
-                WHEN previous_output = 0
-                THEN 1
-                ELSE current_output/previous_output
-            END AS growth_forward""",
-            """CASE
-                WHEN next_output = 0
-                THEN 1
-                ELSE current_output/next_output
-            END AS growth_backward""",
+            "previous.output AS previous_output",
+            "current.output AS current_output",
+            "next.output AS next_output",
         )
 
-        if lower_trim is not None:
-            trimmed_df = (
-                df.join(
-                    (
-                        df.groupBy("period", "grouping")
-                        .agg(
-                            expr(
-                                """
-                                sum(
-                                    cast(growth_forward IS NOT NULL AS integer)
-                                ) AS count_forward
+    df = df.selectExpr(
+        *common_cols,
+        "current_output",
+        """CASE
+            WHEN previous_output = 0
+            THEN 1
+            ELSE current_output/previous_output
+        END AS growth_forward""",
+        """CASE
+            WHEN next_output = 0
+            THEN 1
+            ELSE current_output/next_output
+        END AS growth_backward""",
+    )
+
+    if lower_trim is not None:
+        trimmed_df = (
+            df.join(
+                (
+                    df.groupBy("period", "grouping")
+                    .agg(
+                        expr(
                             """
-                            ),
-                            expr(
-                                """
-                                sum(
-                                    cast(growth_backward IS NOT NULL AS integer)
-                                ) AS count_backward
+                            sum(
+                                cast(growth_forward IS NOT NULL AS integer)
+                            ) AS count_forward
+                        """
+                        ),
+                        expr(
                             """
-                            ),
-                        )
-                        .select(
-                            col("period"),
-                            col("grouping"),
-                            (col("count_forward") * Decimal(lower_trim) / 100).alias(
-                                "lower_forward"
-                            ),
-                            (
-                                col("count_forward") * (100 - Decimal(upper_trim)) / 100
-                            ).alias("upper_forward"),
-                            (col("count_backward") * Decimal(lower_trim) / 100).alias(
-                                "lower_backward"
-                            ),
-                            (
-                                col("count_backward")
-                                * (100 - Decimal(upper_trim))
-                                / 100
-                            ).alias("upper_backward"),
-                        )
-                    ),
-                    ["period", "grouping"],
-                )
-                .withColumn(
-                    "num_forward",
-                    expr(
+                            sum(
+                                cast(growth_backward IS NOT NULL AS integer)
+                            ) AS count_backward
                         """
-                        row_number() OVER (
-                            PARTITION BY period, grouping
-                            ORDER BY growth_forward ASC
-                        )
+                        ),
+                    )
+                    .select(
+                        col("period"),
+                        col("grouping"),
+                        (col("count_forward") * Decimal(lower_trim) / 100).alias(
+                            "lower_forward"
+                        ),
+                        (
+                            col("count_forward") * (100 - Decimal(upper_trim)) / 100
+                        ).alias("upper_forward"),
+                        (col("count_backward") * Decimal(lower_trim) / 100).alias(
+                            "lower_backward"
+                        ),
+                        (
+                            col("count_backward")
+                            * (100 - Decimal(upper_trim))
+                            / 100
+                        ).alias("upper_backward"),
+                    )
+                ),
+                ["period", "grouping"],
+            )
+            .withColumn(
+                "num_forward",
+                expr(
                     """
+                    row_number() OVER (
+                        PARTITION BY period, grouping
+                        ORDER BY growth_forward ASC
+                    )
+                """
+                ),
+            )
+            .withColumn(
+                "num_backward",
+                expr(
+                    """
+                    row_number() OVER (
+                        PARTITION BY period, grouping
+                        ORDER BY growth_backward ASC
+                    )
+                """
+                ),
+            )
+            .select(
+                col("period"),
+                col("grouping"),
+                when(
+                    (
+                        col("num_forward").between(
+                            col("lower_forward"), col("upper_forward")
+                        )
+                        | trim_threshold
+                        >= col("count_forward")
                     ),
-                )
-                .withColumn(
-                    "num_backward",
-                    expr(
-                        """
-                        row_number() OVER (
-                            PARTITION BY period, grouping
-                            ORDER BY growth_backward ASC
+                    col("growth_forward"),
+                ).alias("trimmed_forward"),
+                when(
+                    (
+                        col("num_backward").between(
+                            col("lower_backward"), col("upper_backward")
                         )
-                    """
+                        | trim_threshold
+                        >= col("count_backward")
                     ),
-                )
-                .select(
-                    col("period"),
-                    col("grouping"),
-                    when(
-                        (
-                            col("num_forward").between(
-                                col("lower_forward"), col("upper_forward")
-                            )
-                            | trim_threshold
-                            >= col("count_forward")
-                        ),
-                        col("growth_forward"),
-                    ).alias("trimmed_forward"),
-                    when(
-                        (
-                            col("num_backward").between(
-                                col("lower_backward"), col("upper_backward")
-                            )
-                            | trim_threshold
-                            >= col("count_backward")
-                        ),
-                        col("growth_backward"),
-                    ).alias("trimmed_backward"),
-                )
+                    col("growth_backward"),
+                ).alias("trimmed_backward"),
             )
-
-        else:
-            trimmed_df = df.withColumn(
-                "trimmed_forward", col("growth_forward")
-            ).withColumn("trimmed_backward", col("growth_backward"))
-
-        ratio_df = trimmed_df.groupBy("period", "grouping").agg(
-            expr("mean(trimmed_forward) AS forward"),
-            expr("mean(trimmed_backward) AS backward"),
-            expr("sum(current_output)/sum(aux) AS construction"),
-            expr("count(trimmed_forward) AS count_forward"),
-            expr("count(trimmed_backward) AS count_backward"),
-            expr("count(aux) AS count_construction"),
         )
 
-        growth_df = df.select(
-            "ref", "period", "grouping", "growth_forward", "growth_backward"
-        )
+    else:
+        trimmed_df = df.withColumn(
+            "trimmed_forward", col("growth_forward")
+        ).withColumn("trimmed_backward", col("growth_backward"))
 
-        return [
-            RatioCalculationResult(
-                data=growth_df,
-                join_columns=["period", "grouping", "ref"],
-                additional_outputs={
-                    "growth_forward": growth_forward_col,
-                    "growth_backward": growth_backward_col,
-                },
-            ),
-            RatioCalculationResult(
-                data=ratio_df,
-                join_columns=["period", "grouping"],
-                fill_columns=["forward", "backward", "construction"],
-            ),
-        ]
+    ratio_df = trimmed_df.groupBy("period", "grouping").agg(
+        expr("mean(trimmed_forward) AS forward"),
+        expr("mean(trimmed_backward) AS backward"),
+        expr("sum(current_output)/sum(aux) AS construction"),
+        expr("count(trimmed_forward) AS count_forward"),
+        expr("count(trimmed_backward) AS count_backward"),
+        expr("count(aux) AS count_construction"),
+    )
 
-    return calculate
+    growth_df = df.select(
+        "ref", "period", "grouping", "growth_forward", "growth_backward"
+    )
 
+    return [
+        RatioCalculationResult(
+            data=growth_df,
+            join_columns=["period", "grouping", "ref"],
+            additional_outputs={
+                "growth_forward": growth_forward_col,
+                "growth_backward": growth_backward_col,
+            },
+        ),
+        RatioCalculationResult(
+            data=ratio_df,
+            join_columns=["period", "grouping"],
+            fill_columns=["forward", "backward", "construction"],
+        ),
+    ]
 
-def ratio_of_means(**_kw) -> RatioCalculator:
-    def calculate(df: DataFrame) -> List[RatioCalculationResult]:
-        df = df.groupBy("period", "grouping").agg(
-            expr(
-                """
-                    sum(
-                        CASE
-                            WHEN previous.output IS NOT NULL
-                            THEN current.output
-                        END
-                    )/sum(previous.output) AS forward
-                """
-            ),
-            expr(
-                """
-                    sum(
-                        CASE
-                            WHEN next.output IS NOT NULL
-                            THEN current.output
-                        END
-                    )/sum(next.output) AS backward
-                """
-            ),
-            expr("sum(current.output)/sum(aux) AS construction"),
-            expr(
-                """
-                    CASE
-                        WHEN sum(previous.output) = 0
-                        THEN 0
-                        WHEN sum(previous.output) IS NOT NULL
-                        THEN sum(cast(previous.output IS NOT NULL AS integer))
-                    END AS count_forward
-                """
-            ),
-            expr(
-                """
+
+def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
+    df = df.groupBy("period", "grouping").agg(
+        expr(
+            """
+                sum(
                     CASE
-                        WHEN sum(next.output) = 0
-                        THEN 0
-                        WHEN sum(next.output) IS NOT NULL
-                        THEN sum(cast(next.output IS NOT NULL AS integer))
-                    END AS count_backward
-                """
-            ),
-            expr(
-                """
+                        WHEN previous.output IS NOT NULL
+                        THEN current.output
+                    END
+                )/sum(previous.output) AS forward
+            """
+        ),
+        expr(
+            """
+                sum(
                     CASE
-                        WHEN sum(aux) = 0
-                        THEN 0
-                        ELSE count(current.output)
-                    END AS count_construction
-                """
-            ),
+                        WHEN next.output IS NOT NULL
+                        THEN current.output
+                    END
+                )/sum(next.output) AS backward
+            """
+        ),
+        expr("sum(current.output)/sum(aux) AS construction"),
+        expr(
+            """
+                CASE
+                    WHEN sum(previous.output) = 0
+                    THEN 0
+                    WHEN sum(previous.output) IS NOT NULL
+                    THEN sum(cast(previous.output IS NOT NULL AS integer))
+                END AS count_forward
+            """
+        ),
+        expr(
+            """
+                CASE
+                    WHEN sum(next.output) = 0
+                    THEN 0
+                    WHEN sum(next.output) IS NOT NULL
+                    THEN sum(cast(next.output IS NOT NULL AS integer))
+                END AS count_backward
+            """
+        ),
+        expr(
+            """
+                CASE
+                    WHEN sum(aux) = 0
+                    THEN 0
+                    ELSE count(current.output)
+                END AS count_construction
+            """
+        ),
+    )
+    return [
+        RatioCalculationResult(
+            data=df,
+            join_columns=["period", "grouping"],
+            fill_columns=["forward", "backward", "construction"],
         )
-        return [
-            RatioCalculationResult(
-                data=df,
-                join_columns=["period", "grouping"],
-                fill_columns=["forward", "backward", "construction"],
-            )
-        ]
-
-    return calculate
+    ]

From 77815d27c14c77dea3c251ae08bd46b17c05701f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 8 Mar 2023 14:39:35 +0000
Subject: [PATCH 149/531] Fix tests after factory function removal

---
 tests/imputation/test_mean_of_ratios.py | 2 +-
 tests/imputation/test_ratio_of_means.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 50a504b8..179d59c5 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -97,7 +97,7 @@
     "auxiliary_col": auxiliary_col,
     "output_col": output_col,
     "marker_col": marker_col,
-    "ratio_calculator_factory": mean_of_ratios,
+    "ratio_calculator": mean_of_ratios,
 }
 
 test_scenarios = []
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 6f7538ee..78d6f3b7 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -90,7 +90,7 @@
     "auxiliary_col": auxiliary_col,
     "output_col": output_col,
     "marker_col": marker_col,
-    "ratio_calculator_factory": ratio_of_means,
+    "ratio_calculator": ratio_of_means,
 }
 
 test_scenarios = []

From 58142c648ecf29ede08fd6fdef40924f6b44318d Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 8 Mar 2023 14:46:46 +0000
Subject: [PATCH 150/531] These tests are unneeded. Covered by Methodology
 Tests.

---
 .../backward_imputation_input.csv             | 26 -------------------
 .../backward_imputation_output.csv            | 26 -------------------
 .../construction_imputation_input.csv         | 26 -------------------
 .../construction_imputation_output.csv        | 26 -------------------
 .../dev_scenarios/construction_input.csv      | 22 ----------------
 .../dev_scenarios/construction_output.csv     | 22 ----------------
 .../forward_imputation_filtered_input.csv     | 26 -------------------
 .../forward_imputation_filtered_output.csv    | 26 -------------------
 .../forward_imputation_input.csv              | 26 -------------------
 .../forward_imputation_output.csv             | 26 -------------------
 10 files changed, 252 deletions(-)
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/backward_imputation_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/backward_imputation_output.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_imputation_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_imputation_output.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_output.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_filtered_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_filtered_output.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_output.csv

diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/backward_imputation_input.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/backward_imputation_input.csv
deleted file mode 100644
index 78a65784..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/backward_imputation_input.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,question,other
-1111,"202105","9000",1464.1,2
-1111,"202104","9000",,2
-1111,"202103","9000",,2
-1111,"202102","9000",1100,2
-1111,"202101","9000",1000,2
-2222,"202105","9000",2928.2,2
-2222,"202104","9000",2662,2
-2222,"202103","9000",2420,2
-2222,"202102","9000",2200,2
-2222,"202101","9000",2000,2
-3333,"202105","9000",4392.3,2
-3333,"202104","9000",3993,2
-3333,"202103","9000",3630,2
-3333,"202102","9000",3300,2
-3333,"202101","9000",3000,2
-4444,"202105","9000",5856.4,2
-4444,"202104","9000",5324,2
-4444,"202103","9000",4840,2
-4444,"202102","9000",4400,2
-4444,"202101","9000",,2
-5555,"202105","9000",7320.5,2
-5555,"202104","9000",6655,2
-5555,"202103","9000",6050,2
-5555,"202102","9000",,2
-5555,"202101","9000",,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/backward_imputation_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/backward_imputation_output.csv
deleted file mode 100644
index c8c98a5b..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/backward_imputation_output.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,other,output,marker,forward,backward,count_forward,count_backward
-1111,202101,9000,2.0,1000.0,R,1.0,0.9090909090909091,,3
-1111,202102,9000,2.0,1100.0,R,1.1,0.9090909090909091,3,3
-1111,202103,9000,2.0,1210.0,FIR,1.1,0.9090909090909091,3,4
-1111,202104,9000,2.0,1331.0,FIR,1.1,0.9090909090909091,4,4
-1111,202105,9000,2.0,1464.1,R,1.1,1.0,4,
-2222,202101,9000,2.0,2000.0,R,1.0,0.9090909090909091,,3
-2222,202102,9000,2.0,2200.0,R,1.1,0.9090909090909091,3,3
-2222,202103,9000,2.0,2420.0,R,1.1,0.9090909090909091,3,4
-2222,202104,9000,2.0,2662.0,R,1.1,0.9090909090909091,4,4
-2222,202105,9000,2.0,2928.2,R,1.1,1.0,4,
-3333,202101,9000,2.0,3000.0,R,1.0,0.9090909090909091,,3
-3333,202102,9000,2.0,3300.0,R,1.1,0.9090909090909091,3,3
-3333,202103,9000,2.0,3630.0,R,1.1,0.9090909090909091,3,4
-3333,202104,9000,2.0,3993.0,R,1.1,0.9090909090909091,4,4
-3333,202105,9000,2.0,4392.3,R,1.1,1.0,4,
-4444,202101,9000,2.0,4000.0,BI,1.0,0.9090909090909091,,3
-4444,202102,9000,2.0,4400.0,R,1.1,0.9090909090909091,3,3
-4444,202103,9000,2.0,4840.0,R,1.1,0.9090909090909091,3,4
-4444,202104,9000,2.0,5324.0,R,1.1,0.9090909090909091,4,4
-4444,202105,9000,2.0,5856.4,R,1.1,1.0,4,
-5555,202101,9000,2.0,5000.0,BI,1.0,0.9090909090909091,,3
-5555,202102,9000,2.0,5500.0,BI,1.1,0.9090909090909091,3,3
-5555,202103,9000,2.0,6050.0,R,1.1,0.9090909090909091,3,4
-5555,202104,9000,2.0,6655.0,R,1.1,0.9090909090909091,4,4
-5555,202105,9000,2.0,7320.5,R,1.1,1.0,4,
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_imputation_input.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_imputation_input.csv
deleted file mode 100644
index ba8bc9ea..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_imputation_input.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,question,other
-1111,"202105","9000",,2
-1111,"202104","9000",,2
-1111,"202103","9000",,2
-1111,"202102","9000",,2
-1111,"202101","9000",,2
-2222,"202105","9000",2928.2,2
-2222,"202104","9000",2662,2
-2222,"202103","9000",2420,2
-2222,"202102","9000",2200,2
-2222,"202101","9000",2000,2
-3333,"202105","9000",4392.3,2
-3333,"202104","9000",3993,2
-3333,"202103","9000",3630,2
-3333,"202102","9000",3300,2
-3333,"202101","9000",3000,2
-4444,"202105","9000",5808.4,2
-4444,"202104","9000",5324,2
-4444,"202103","9000",4840,2
-4444,"202102","9000",4400,2
-4444,"202101","9000",4000,2
-5555,"202105","9000",7320.5,2
-5555,"202104","9000",6655,2
-5555,"202103","9000",6050,2
-5555,"202102","9000",5500,2
-5555,"202101","9000",5000,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_imputation_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_imputation_output.csv
deleted file mode 100644
index 17e3fdac..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_imputation_output.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,other,construction,output,marker,count_construction
-1111,202105,9000,2,2556.175,5112.350000000002,FIC,4
-1111,202104,9000,2,2329.25,4658.500000000002,FIC,4
-1111,202103,9000,2,2117.5,4235.000000000001,FIC,4
-1111,202102,9000,2,1925.0,3850.0000000000005,FIC,4
-1111,202101,9000,2,1750.0,3500.0,C,4
-2222,202105,9000,2,2556.175,2928.2,R,4
-2222,202104,9000,2,2329.25,2662,R,4
-2222,202103,9000,2,2117.5,2420,R,4
-2222,202102,9000,2,1925.0,2200,R,4
-2222,202101,9000,2,1750.0,2000,R,4
-3333,202105,9000,2,2556.175,4392.3,R,4
-3333,202104,9000,2,2329.25,3993,R,4
-3333,202103,9000,2,2117.5,3630,R,4
-3333,202102,9000,2,1925.0,3300,R,4
-3333,202101,9000,2,1750.0,3000,R,4
-4444,202105,9000,2,2556.175,5808.4,R,4
-4444,202104,9000,2,2329.25,5324,R,4
-4444,202103,9000,2,2117.5,4840,R,4
-4444,202102,9000,2,1925.0,4400,R,4
-4444,202101,9000,2,1750.0,4000,R,4
-5555,202105,9000,2,2556.175,7320.5,R,4
-5555,202104,9000,2,2329.25,6655,R,4
-5555,202103,9000,2,2117.5,6050,R,4
-5555,202102,9000,2,1925.0,5500,R,4
-5555,202101,9000,2,1750.0,5000,R,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_input.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_input.csv
deleted file mode 100644
index 01aa19ce..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_input.csv
+++ /dev/null
@@ -1,22 +0,0 @@
-identifier,date,group,question,other
-1111,"202101","9000",,2
-2222,"202105","9000",2928.2,2
-2222,"202104","9000",2662,2
-2222,"202103","9000",2420,2
-2222,"202102","9000",2200,2
-2222,"202101","9000",2000,2
-3333,"202105","9000",4392.3,2
-3333,"202104","9000",3993,2
-3333,"202103","9000",3630,2
-3333,"202102","9000",3300,2
-3333,"202101","9000",3000,2
-4444,"202105","9000",5808.4,2
-4444,"202104","9000",5324,2
-4444,"202103","9000",4840,2
-4444,"202102","9000",4400,2
-4444,"202101","9000",4000,2
-5555,"202105","9000",7320.5,2
-5555,"202104","9000",6655,2
-5555,"202103","9000",6050,2
-5555,"202102","9000",5500,2
-5555,"202101","9000",5000,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_output.csv
deleted file mode 100644
index c170dc8e..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/construction_output.csv
+++ /dev/null
@@ -1,22 +0,0 @@
-identifier,date,group,other,construction,output,marker,count_construction
-1111,202101,9000,2,1750.0,3500.0,C,4
-2222,202105,9000,2,2556.175,2928.2,R,4
-2222,202104,9000,2,2329.25,2662,R,4
-2222,202103,9000,2,2117.5,2420,R,4
-2222,202102,9000,2,1925.0,2200,R,4
-2222,202101,9000,2,1750.0,2000,R,4
-3333,202105,9000,2,2556.175,4392.3,R,4
-3333,202104,9000,2,2329.25,3993,R,4
-3333,202103,9000,2,2117.5,3630,R,4
-3333,202102,9000,2,1925.0,3300,R,4
-3333,202101,9000,2,1750.0,3000,R,4
-4444,202105,9000,2,2556.175,5808.4,R,4
-4444,202104,9000,2,2329.25,5324,R,4
-4444,202103,9000,2,2117.5,4840,R,4
-4444,202102,9000,2,1925.0,4400,R,4
-4444,202101,9000,2,1750.0,4000,R,4
-5555,202105,9000,2,2556.175,7320.5,R,4
-5555,202104,9000,2,2329.25,6655,R,4
-5555,202103,9000,2,2117.5,6050,R,4
-5555,202102,9000,2,1925.0,5500,R,4
-5555,202101,9000,2,1750.0,5000,R,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_filtered_input.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_filtered_input.csv
deleted file mode 100644
index d1c934c3..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_filtered_input.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,question,other,exclude
-1111,"202105","9000",1464.1,2,N
-1111,"202104","9000",1331,2,N
-1111,"202103","9000",,2,N
-1111,"202102","9000",1100,2,N
-1111,"202101","9000",1000,2,N
-2222,"202105","9000",2928.2,2,N
-2222,"202104","9000",2662,2,N
-2222,"202103","9000",2420,2,N
-2222,"202102","9000",2200,2,N
-2222,"202101","9000",2000,2,N
-3333,"202105","9000",4392.3,2,N
-3333,"202104","9000",3993,2,N
-3333,"202103","9000",3630,2,N
-3333,"202102","9000",3300,2,Y
-3333,"202101","9000",3000,2,N
-4444,"202105","9000",,2,N
-4444,"202104","9000",5324,2,N
-4444,"202103","9000",4840,2,N
-4444,"202102","9000",4400,2,N
-4444,"202101","9000",4000,2,N
-5555,"202105","9000",,2,N
-5555,"202104","9000",,2,N
-5555,"202103","9000",6050,2,N
-5555,"202102","9000",5500,2,Y
-5555,"202101","9000",5000,2,N
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_filtered_output.csv
deleted file mode 100644
index bafa1f25..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_filtered_output.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,other,output,marker,forward,backward,count_forward,count_backward
-1111,"202101","9000",2.0,1000.0,R,1.0,0.9090909090909090,,3
-1111,"202102","9000",2.0,1100.0,R,1.1,0.9090909090909090,3,2
-1111,"202103","9000",2.0,1210.0,FIR,1.1,0.9090909090909091,2,3
-1111,"202104","9000",2.0,1331.0,R,1.1,0.9090909090909092,3,3
-1111,"202105","9000",2.0,1464.1,R,1.0999999999999999,1.0,3,
-2222,"202101","9000",2.0,2000.0,R,1.0,0.9090909090909090,,3
-2222,"202102","9000",2.0,2200.0,R,1.1,0.9090909090909090,3,2
-2222,"202103","9000",2.0,2420.0,R,1.1,0.9090909090909091,2,3
-2222,"202104","9000",2.0,2662.0,R,1.1,0.9090909090909092,3,3
-2222,"202105","9000",2.0,2928.2,R,1.0999999999999999,1.0,3,
-3333,"202101","9000",2.0,3000.0,R,1.0,0.9090909090909090,,3
-3333,"202102","9000",2.0,3300.0,R,1.1,0.9090909090909090,3,2
-3333,"202103","9000",2.0,3630.0,R,1.1,0.9090909090909091,2,3
-3333,"202104","9000",2.0,3993.0,R,1.1,0.9090909090909092,3,3
-3333,"202105","9000",2.0,4392.3,R,1.0999999999999999,1.0,3,
-4444,"202101","9000",2.0,4000.0,R,1.0,0.9090909090909090,,3
-4444,"202102","9000",2.0,4400.0,R,1.1,0.9090909090909090,3,2
-4444,"202103","9000",2.0,4840.0,R,1.1,0.9090909090909091,2,3
-4444,"202104","9000",2.0,5324.0,R,1.1,0.9090909090909092,3,3
-4444,"202105","9000",2.0,5856.4,FIR,1.0999999999999999,1.0,3,
-5555,"202101","9000",2.0,5000.0,R,1.0,0.9090909090909090,,3
-5555,"202102","9000",2.0,5500.0,R,1.1,0.9090909090909090,3,2
-5555,"202103","9000",2.0,6050.0,R,1.1,0.9090909090909091,2,3
-5555,"202104","9000",2.0,6655.0,FIR,1.1,0.9090909090909092,3,3
-5555,"202105","9000",2.0,7320.5,FIR,1.1,1.0,3,
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_input.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_input.csv
deleted file mode 100644
index 9412fb8b..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_input.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,question,other
-1111,"202105","9000",1464.1,2
-1111,"202104","9000",1331,2
-1111,"202103","9000",,2
-1111,"202102","9000",1100,2
-1111,"202101","9000",1000,2
-2222,"202105","9000",2928.2,2
-2222,"202104","9000",2662,2
-2222,"202103","9000",2420,2
-2222,"202102","9000",2200,2
-2222,"202101","9000",2000,2
-3333,"202105","9000",4392.3,2
-3333,"202104","9000",3993,2
-3333,"202103","9000",3630,2
-3333,"202102","9000",3300,2
-3333,"202101","9000",3000,2
-4444,"202105","9000",,2
-4444,"202104","9000",5324,2
-4444,"202103","9000",4840,2
-4444,"202102","9000",4400,2
-4444,"202101","9000",4000,2
-5555,"202105","9000",,2
-5555,"202104","9000",,2
-5555,"202103","9000",6050,2
-5555,"202102","9000",5500,2
-5555,"202101","9000",5000,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_output.csv
deleted file mode 100644
index c15bbbef..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/forward_imputation_output.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,other,output,marker,forward,backward,count_forward,count_backward
-1111,202101,9000,2.0,1000.0,R,1.0,0.9090909090909091,,5
-1111,202102,9000,2.0,1100.0,R,1.1,0.9090909090909091,5,4
-1111,202103,9000,2.0,1210.0,FIR,1.1,0.9090909090909091,4,3
-1111,202104,9000,2.0,1331.0,R,1.1,0.9090909090909092,3,3
-1111,202105,9000,2.0,1464.1,R,1.0999999999999999,1.0,3,
-2222,202101,9000,2.0,2000.0,R,1.0,0.9090909090909091,,5
-2222,202102,9000,2.0,2200.0,R,1.1,0.9090909090909091,5,4
-2222,202103,9000,2.0,2420.0,R,1.1,0.9090909090909091,4,3
-2222,202104,9000,2.0,2662.0,R,1.1,0.9090909090909092,3,3
-2222,202105,9000,2.0,2928.2,R,1.0999999999999999,1.0,3,
-3333,202101,9000,2.0,3000.0,R,1.0,0.9090909090909091,,5
-3333,202102,9000,2.0,3300.0,R,1.1,0.9090909090909091,5,4
-3333,202103,9000,2.0,3630.0,R,1.1,0.9090909090909091,4,3
-3333,202104,9000,2.0,3993.0,R,1.1,0.9090909090909092,3,3
-3333,202105,9000,2.0,4392.3,R,1.0999999999999999,1.0,3,
-4444,202101,9000,2.0,4000.0,R,1.0,0.9090909090909091,,5
-4444,202102,9000,2.0,4400.0,R,1.1,0.9090909090909091,5,4
-4444,202103,9000,2.0,4840.0,R,1.1,0.9090909090909091,4,3
-4444,202104,9000,2.0,5324.0,R,1.1,0.9090909090909092,3,3
-4444,202105,9000,2.0,5856.4,FIR,1.0999999999999999,1.0,3,
-5555,202101,9000,2.0,5000.0,R,1.0,0.9090909090909091,,5
-5555,202102,9000,2.0,5500.0,R,1.1,0.9090909090909091,5,4
-5555,202103,9000,2.0,6050.0,R,1.1,0.9090909090909091,4,3
-5555,202104,9000,2.0,6655.0,FIR,1.1,0.9090909090909092,3,3
-5555,202105,9000,2.0,7320.5,FIR,1.0999999999999999,1.0,3,

From 92b72be97330d7772024cf851c46ef2a916ec6f8 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 8 Mar 2023 15:17:05 +0000
Subject: [PATCH 151/531] Support variable periodicity (tests required for
 anything other than 1)

---
 .../imputation/engine.py                        | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index fae90985..6b59dae5 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -57,6 +57,7 @@ def impute(
     count_backward_col: Optional[str] = "count_backward",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
+    periodicity: Optional[int] = 1,
     **ratio_calculator_params,
 ) -> DataFrame:
     additional_outputs = {}
@@ -503,26 +504,24 @@ def select_cols(
             ]
         )
 
-    def calculate_previous_period(
-        period: Column, num_periods: Optional[int] = 1
-    ) -> Column:
+    def calculate_previous_period(period: Column) -> Column:
         period = period.cast("integer")
         return (
             period
-            - num_periods
+            - periodicity
             - 88
-            * (num_periods // 12 + (period % 100 <= num_periods % 12).cast("integer"))
+            * (periodicity // 12 + (period % 100 <= periodicity % 12).cast("integer"))
         ).cast("string")
 
-    def calculate_next_period(period: Column, num_periods: Optional[int] = 1) -> Column:
+    def calculate_next_period(period: Column) -> Column:
         period = period.cast("integer")
         return (
             period
-            + num_periods
+            + periodicity
             + 88
             * (
-                num_periods // 12
-                + ((period % 100) + (num_periods % 12) > 12).cast("integer")
+                periodicity // 12
+                + ((period % 100) + (periodicity % 12) > 12).cast("integer")
             )
         ).cast("string")
 

From b366608715b961fad7f28056b4a4044514cf488f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 16:55:16 +0000
Subject: [PATCH 152/531] Stopped checking types of grouping col in
 winsorisation

---
 statistical_methods_library/outliering/winsorisation.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index e14bbbe2..e9541945 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -117,7 +117,6 @@ def outlier(
     type_mapping = {
         "reference": StringType,
         "period": StringType,
-        "grouping": StringType,
         "target": DecimalType,
         "design": DecimalType,
         "l_value": DecimalType,

From 20a3045520cccae41acb7b381f43da4304e9bbff Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 16:58:42 +0000
Subject: [PATCH 153/531] Allow strata and calibration group columns to be of
 any type as they are just grouping

---
 statistical_methods_library/estimation/ht_ratio.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index 8ed22d0c..451cc5bd 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -148,12 +148,10 @@ def estimate(
     type_mapping = {
         "unique_identifier": StringType,
         "period": StringType,
-        "strata": StringType,
         "sample_marker": BooleanType,
         "adjustment_marker": StringType,
         "h_value": BooleanType,
         "auxiliary": DecimalType,
-        "calibration_group": StringType,
     }
 
     aliased_df = validation.validate_dataframe(

From 068ded210a752880e59702b2cbf8d98051bfd860 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 16:59:29 +0000
Subject: [PATCH 154/531] Strata is just a grouping col so allow it to be of
 any type

---
 statistical_methods_library/imputation/engine.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index b0658222..4b927ba1 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -118,7 +118,6 @@ def impute(
     type_mapping = {
         "ref": StringType,
         "period": StringType,
-        "strata": StringType,
         "target": DecimalType,
         "aux": DecimalType,
         "output": DecimalType,

From 74f16223f5b06be70c9fe5faf1dcae341e5e413b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 17:02:16 +0000
Subject: [PATCH 155/531] Allow for not all fields to be type mapped in
 validation

---
 statistical_methods_library/utilities/validation.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/utilities/validation.py b/statistical_methods_library/utilities/validation.py
index 6a114980..21b5234e 100644
--- a/statistical_methods_library/utilities/validation.py
+++ b/statistical_methods_library/utilities/validation.py
@@ -42,7 +42,8 @@ def validate_dataframe(
     wrong_types = [
         (field.name, field.dataType)
         for field in aliased_df.schema.fields
-        if not isinstance(field.dataType, type_mapping[field.name])
+        if field.name in type_mapping
+            and not isinstance(field.dataType, type_mapping[field.name])
     ]
     if wrong_types:
         raise ValidationError(

From efac9d2be0cd25e3fae6ce9635f5f591fe4094f8 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 17:43:05 +0000
Subject: [PATCH 156/531] Spelling correction

---
 statistical_methods_library/estimation/ht_ratio.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index 451cc5bd..86372e41 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -1,5 +1,5 @@
 """
-Estimates design weigths and calibration factors based on Expansion and Ratio estimation.
+Estimates design weights and calibration factors based on Expansion and Ratio estimation.
 For Copyright information, please see LICENCE.
 """
 

From 18592e94b57385362b45d8f8c2b0b6ae31479454 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 17:54:47 +0000
Subject: [PATCH 157/531] Add release notes

---
 docs/release-notes/11.0.1.md | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 docs/release-notes/11.0.1.md

diff --git a/docs/release-notes/11.0.1.md b/docs/release-notes/11.0.1.md
new file mode 100644
index 00000000..6207518c
--- /dev/null
+++ b/docs/release-notes/11.0.1.md
@@ -0,0 +1,25 @@
+# Statistical Methods Library 11.0.1
+
+Release date: 2023-03-08
+
+## Synopsis
+
+Remove type validation for columns which are only used for data grouping.
+
+## Changes
+
+Previously, columns only used for data grouping in methods were only allowed
+to contain data of StringType. This doesn't really make sense since these
+columns are only used in group by clauses and thus the type doesn't matter.
+This release removes these restrictions.
+
+## Notes
+
+The effected methods and associated columns (named by method parameter) are
+as follows:
+
+* Imputation - `grouping_col`
+* HT Ratio Estimation - `strata_col` and `calibration_group_col`
+* Winsorisation - `grouping_col`
+
+This release does not have any impact on method outputs.

From b798f0d4d431c0bdf2bd1f24c4a7b9fc9319a4b9 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 17:56:52 +0000
Subject: [PATCH 158/531] Bump version

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index bc3063fc..657ab103 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "11.0.0"
+version = "11.0.1"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 82f4e71501e60bf889e45a9f2a343df6dbe92d22 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 18:09:58 +0000
Subject: [PATCH 159/531] Stop type checking unique identifier columns

---
 statistical_methods_library/estimation/ht_ratio.py      | 1 -
 statistical_methods_library/imputation/engine.py        | 1 -
 statistical_methods_library/outliering/winsorisation.py | 1 -
 3 files changed, 3 deletions(-)

diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index 86372e41..edeb0f31 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -146,7 +146,6 @@ def estimate(
     input_params.update({k: v for k, v in optional_params.items() if v is not None})
 
     type_mapping = {
-        "unique_identifier": StringType,
         "period": StringType,
         "sample_marker": BooleanType,
         "adjustment_marker": StringType,
diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 4b927ba1..44d1af8d 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -116,7 +116,6 @@ def impute(
     }
 
     type_mapping = {
-        "ref": StringType,
         "period": StringType,
         "target": DecimalType,
         "aux": DecimalType,
diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index e9541945..8b627257 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -115,7 +115,6 @@ def outlier(
     input_params.update({k: v for k, v in optional_params.items() if v is not None})
 
     type_mapping = {
-        "reference": StringType,
         "period": StringType,
         "target": DecimalType,
         "design": DecimalType,

From f37833f66d0ba24aac2c1d087089c9b7b00e9354 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 18:10:16 +0000
Subject: [PATCH 160/531] Reformat validation

---
 statistical_methods_library/utilities/validation.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/utilities/validation.py b/statistical_methods_library/utilities/validation.py
index 21b5234e..3396246d 100644
--- a/statistical_methods_library/utilities/validation.py
+++ b/statistical_methods_library/utilities/validation.py
@@ -42,8 +42,10 @@ def validate_dataframe(
     wrong_types = [
         (field.name, field.dataType)
         for field in aliased_df.schema.fields
-        if field.name in type_mapping
+        if (
+            field.name in type_mapping
             and not isinstance(field.dataType, type_mapping[field.name])
+        )
     ]
     if wrong_types:
         raise ValidationError(

From c6101760faf1ccddbdcca37c16cab9bc13e69882 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 18:21:18 +0000
Subject: [PATCH 161/531] Correct release notes now we are not type checking
 identifier columns

---
 docs/release-notes/11.0.1.md | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/docs/release-notes/11.0.1.md b/docs/release-notes/11.0.1.md
index 6207518c..70bdd4c0 100644
--- a/docs/release-notes/11.0.1.md
+++ b/docs/release-notes/11.0.1.md
@@ -4,22 +4,24 @@ Release date: 2023-03-08
 
 ## Synopsis
 
-Remove type validation for columns which are only used for data grouping.
+Remove type validation for columns which are only used for data identification.
 
 ## Changes
 
-Previously, columns only used for data grouping in methods were only allowed
-to contain data of StringType. This doesn't really make sense since these
-columns are only used in group by clauses and thus the type doesn't matter.
-This release removes these restrictions.
+Previously, columns used for data identification (both individual
+contributors and data grouping) in methods were only allowed to contain
+strings. This doesn't really make sense since these identification columns
+are only used in contexts where the type doesn't matter. This release
+removes these restrictions.
 
 ## Notes
 
 The effected methods and associated columns (named by method parameter) are
 as follows:
 
-* Imputation - `grouping_col`
-* HT Ratio Estimation - `strata_col` and `calibration_group_col`
-* Winsorisation - `grouping_col`
+* Imputation - `reference_col` and `grouping_col`
+* HT Ratio Estimation - `unique_identifier_col`, `strata_col` and
+  `calibration_group_col`
+* Winsorisation - `reference_col` and `grouping_col`
 
 This release does not have any impact on method outputs.

From d8948f131e64995d33c81ba7aa3ee3b588a3874c Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 18:37:23 +0000
Subject: [PATCH 162/531] unique identifier is no longer type checked so change
 bad type test to check period in ht ratio estimation

---
 tests/estimation/test_ht_ratio.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/estimation/test_ht_ratio.py b/tests/estimation/test_ht_ratio.py
index 22df0f1c..ec890d7c 100644
--- a/tests/estimation/test_ht_ratio.py
+++ b/tests/estimation/test_ht_ratio.py
@@ -52,7 +52,7 @@
 }
 
 bad_dataframe_types = dataframe_types.copy()
-bad_dataframe_types[unique_identifier_col] = decimal_type
+bad_dataframe_types[period_col] = decimal_type
 
 params = {
     "unique_identifier_col": unique_identifier_col,

From fc61f6664cf15bc4d09c22afdb4a681a004d5da7 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 9 Mar 2023 18:54:01 +0000
Subject: [PATCH 163/531] Correct test for incorrect data types for
 Winsorisation

---
 tests/outliering/test_winsorisation.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index 7d481f4c..96001031 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -50,7 +50,7 @@
 }
 
 bad_dataframe_types = dataframe_types.copy()
-bad_dataframe_types[reference_col] = decimal_type
+bad_dataframe_types[period_col] = decimal_type
 
 params = (
     reference_col,

From 1f490300087e0d65af348c39d812cc9cc52f11c8 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 21 Mar 2023 11:40:26 +0000
Subject: [PATCH 164/531] Black/ISORT linting.

---
 statistical_methods_library/imputation/__init__.py     |  2 +-
 .../imputation/ratio_calculators.py                    | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/statistical_methods_library/imputation/__init__.py b/statistical_methods_library/imputation/__init__.py
index f57fe9c9..458991a3 100644
--- a/statistical_methods_library/imputation/__init__.py
+++ b/statistical_methods_library/imputation/__init__.py
@@ -1,2 +1,2 @@
-from .engine import impute, Marker
+from .engine import Marker, impute
 from .ratio_calculators import mean_of_ratios, ratio_of_means
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 16cb4eef..86afb124 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -104,9 +104,7 @@ def mean_of_ratios(
                             "lower_backward"
                         ),
                         (
-                            col("count_backward")
-                            * (100 - Decimal(upper_trim))
-                            / 100
+                            col("count_backward") * (100 - Decimal(upper_trim)) / 100
                         ).alias("upper_backward"),
                     )
                 ),
@@ -161,9 +159,9 @@ def mean_of_ratios(
         )
 
     else:
-        trimmed_df = df.withColumn(
-            "trimmed_forward", col("growth_forward")
-        ).withColumn("trimmed_backward", col("growth_backward"))
+        trimmed_df = df.withColumn("trimmed_forward", col("growth_forward")).withColumn(
+            "trimmed_backward", col("growth_backward")
+        )
 
     ratio_df = trimmed_df.groupBy("period", "grouping").agg(
         expr("mean(trimmed_forward) AS forward"),

From 5f3bbb98616004ceeca637cb225f44d2faa8c361 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 22 Mar 2023 12:36:30 +0000
Subject: [PATCH 165/531] growth ratios must be 1 if either numerator or
 denominator is 0

---
 statistical_methods_library/imputation/ratio_calculators.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 86afb124..9a2ffebe 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -59,12 +59,12 @@ def mean_of_ratios(
         *common_cols,
         "current_output",
         """CASE
-            WHEN previous_output = 0
+            WHEN 0 IN (previous_output, current_output)
             THEN 1
             ELSE current_output/previous_output
         END AS growth_forward""",
         """CASE
-            WHEN next_output = 0
+            WHEN 0 IN (next_output, current_output)
             THEN 1
             ELSE current_output/next_output
         END AS growth_backward""",

From 666e4a062d3a3c6f81bcd9ee31794f0abfa40ce8 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 22 Mar 2023 14:55:47 +0000
Subject: [PATCH 166/531] Corrected Case Statement)

---
 statistical_methods_library/imputation/ratio_calculators.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 9a2ffebe..d9fa3508 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -59,12 +59,12 @@ def mean_of_ratios(
         *common_cols,
         "current_output",
         """CASE
-            WHEN 0 IN (previous_output, current_output)
+            WHEN previous_output = 0 OR (current_output = 0 AND previous_output IS NOT NULL)
             THEN 1
             ELSE current_output/previous_output
         END AS growth_forward""",
         """CASE
-            WHEN 0 IN (next_output, current_output)
+            WHEN next_output = 0 OR (current_output = 0 AND next_output IS NOT NULL)
             THEN 1
             ELSE current_output/next_output
         END AS growth_backward""",

From 5eb69709eb31f6c2c76be8263540d8660914b621 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 22 Mar 2023 15:01:29 +0000
Subject: [PATCH 167/531] Split calculationover more than on eline.

---
 statistical_methods_library/imputation/ratio_calculators.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index d9fa3508..0f1b2c91 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -59,7 +59,8 @@ def mean_of_ratios(
         *common_cols,
         "current_output",
         """CASE
-            WHEN previous_output = 0 OR (current_output = 0 AND previous_output IS NOT NULL)
+            WHEN previous_output = 0 OR
+            (current_output = 0 AND previous_output IS NOT NULL)
             THEN 1
             ELSE current_output/previous_output
         END AS growth_forward""",

From 347b1a3a7f690d6207e0799e342555e87f524c85 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 22 Mar 2023 15:38:30 +0000
Subject: [PATCH 168/531] Suggested Correction to Trim boundary calculation

---
 .../imputation/ratio_calculators.py                    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 0f1b2c91..718b5f15 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -5,7 +5,7 @@
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
-from pyspark.sql.functions import col, expr, when
+from pyspark.sql.functions import ceil, col, expr, floor, when
 
 
 @dataclass
@@ -95,17 +95,17 @@ def mean_of_ratios(
                     .select(
                         col("period"),
                         col("grouping"),
-                        (col("count_forward") * Decimal(lower_trim) / 100).alias(
+                        ceil(col("count_forward") * Decimal(lower_trim) / 100).alias(
                             "lower_forward"
                         ),
                         (
-                            col("count_forward") * (100 - Decimal(upper_trim)) / 100
+                            1 + floor(col("count_forward") * (100 - Decimal(upper_trim)) / 100)
                         ).alias("upper_forward"),
-                        (col("count_backward") * Decimal(lower_trim) / 100).alias(
+                        ceil(col("count_backward") * Decimal(lower_trim) / 100).alias(
                             "lower_backward"
                         ),
                         (
-                            col("count_backward") * (100 - Decimal(upper_trim)) / 100
+                            1 + floor(col("count_backward") * (100 - Decimal(upper_trim)) / 100)
                         ).alias("upper_backward"),
                     )
                 ),

From 4ba6d5ede200fcf425b4c404ca3168b60e5ef9bb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 22 Mar 2023 15:40:02 +0000
Subject: [PATCH 169/531] Correct trimming calculations

---
 .../imputation/ratio_calculators.py            | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 718b5f15..1ab347f6 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -72,6 +72,8 @@ def mean_of_ratios(
     )
 
     if lower_trim is not None:
+        upper_bound = lambda c: (sql_ceil(c * lower_trim / 100))
+        lower_bound = lambda c: 1 + sql_floor(c * (100 - upper_trim) / 100)
         trimmed_df = (
             df.join(
                 (
@@ -95,18 +97,10 @@ def mean_of_ratios(
                     .select(
                         col("period"),
                         col("grouping"),
-                        ceil(col("count_forward") * Decimal(lower_trim) / 100).alias(
-                            "lower_forward"
-                        ),
-                        (
-                            1 + floor(col("count_forward") * (100 - Decimal(upper_trim)) / 100)
-                        ).alias("upper_forward"),
-                        ceil(col("count_backward") * Decimal(lower_trim) / 100).alias(
-                            "lower_backward"
-                        ),
-                        (
-                            1 + floor(col("count_backward") * (100 - Decimal(upper_trim)) / 100)
-                        ).alias("upper_backward"),
+                        lower_bound(col("count_forward")).alias("lower_forward"),
+                        upper_bound(col("count_forward")).alias("upper_forward"),
+                        lower_bound(col("count_backward")).alias"lower_backward"),
+                        upper_bound(col("count_backward")).alias("upper_backward"),
                     )
                 ),
                 ["period", "grouping"],

From e294de5fe831c79bb734f5a87c9fccfdc61f109b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 22 Mar 2023 15:44:18 +0000
Subject: [PATCH 170/531] Further trimming corrections

---
 .../imputation/ratio_calculators.py                        | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 1ab347f6..f1c64712 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -5,7 +5,8 @@
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
-from pyspark.sql.functions import ceil, col, expr, floor, when
+# Avoid shadowing builtin floor and ceil functions
+from pyspark.sql.functions import ceil as sql_ceil, col, expr, floor as sql_floor, when
 
 
 @dataclass
@@ -72,8 +73,8 @@ def mean_of_ratios(
     )
 
     if lower_trim is not None:
-        upper_bound = lambda c: (sql_ceil(c * lower_trim / 100))
-        lower_bound = lambda c: 1 + sql_floor(c * (100 - upper_trim) / 100)
+        upper_bound = lambda c: (sql_ceil(c * Decimal(lower_trim) / 100))
+        lower_bound = lambda c: 1 + sql_floor(c * (100 - Decimal(upper_trim)) / 100)
         trimmed_df = (
             df.join(
                 (

From 00edde38805eba0f0f7a9f900ffaafe8dc533fb1 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 22 Mar 2023 15:49:58 +0000
Subject: [PATCH 171/531] fix syntax and reformat with Black

---
 statistical_methods_library/imputation/ratio_calculators.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index f1c64712..6f498610 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -5,6 +5,7 @@
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
+
 # Avoid shadowing builtin floor and ceil functions
 from pyspark.sql.functions import ceil as sql_ceil, col, expr, floor as sql_floor, when
 
@@ -100,7 +101,7 @@ def mean_of_ratios(
                         col("grouping"),
                         lower_bound(col("count_forward")).alias("lower_forward"),
                         upper_bound(col("count_forward")).alias("upper_forward"),
-                        lower_bound(col("count_backward")).alias"lower_backward"),
+                        lower_bound(col("count_backward")).alias("lower_backward"),
                         upper_bound(col("count_backward")).alias("upper_backward"),
                     )
                 ),

From 891a5a92f8a9be1f2cf541ab288fc5d6b0409c38 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 22 Mar 2023 16:08:07 +0000
Subject: [PATCH 172/531] Fix flake8 errors

---
 statistical_methods_library/imputation/__init__.py       | 4 ++--
 .../imputation/ratio_calculators.py                      | 9 +++++++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/__init__.py b/statistical_methods_library/imputation/__init__.py
index 458991a3..018312b1 100644
--- a/statistical_methods_library/imputation/__init__.py
+++ b/statistical_methods_library/imputation/__init__.py
@@ -1,2 +1,2 @@
-from .engine import Marker, impute
-from .ratio_calculators import mean_of_ratios, ratio_of_means
+from .engine import Marker, impute  # noqa: F401
+from .ratio_calculators import mean_of_ratios, ratio_of_means  # noqa: F401
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 6f498610..84c048c1 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -74,8 +74,13 @@ def mean_of_ratios(
     )
 
     if lower_trim is not None:
-        upper_bound = lambda c: (sql_ceil(c * Decimal(lower_trim) / 100))
-        lower_bound = lambda c: 1 + sql_floor(c * (100 - Decimal(upper_trim)) / 100)
+
+        def upper_bound(c):
+            return sql_ceil(c * Decimal(lower_trim) / 100)
+
+        def lower_bound(c):
+            return 1 + sql_floor(c * (100 - Decimal(upper_trim)) / 100)
+
         trimmed_df = (
             df.join(
                 (

From d88978a9b681f8155e49cb40bf4da7f6909a7aef Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 22 Mar 2023 16:11:34 +0000
Subject: [PATCH 173/531] Fix isort errors

---
 statistical_methods_library/imputation/ratio_calculators.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 84c048c1..92fb6900 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -5,9 +5,11 @@
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
-
 # Avoid shadowing builtin floor and ceil functions
-from pyspark.sql.functions import ceil as sql_ceil, col, expr, floor as sql_floor, when
+from pyspark.sql.functions import ceil as sql_ceil
+from pyspark.sql.functions import col, expr
+from pyspark.sql.functions import floor as sql_floor
+from pyspark.sql.functions import when
 
 
 @dataclass

From 17fa8594e3ee4a0310c4a59cde043db831e9d0cc Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 31 Mar 2023 13:55:39 +0100
Subject: [PATCH 174/531] Update dependancies

---
 poetry.lock | 238 ++++++++++++++++++++++++++--------------------------
 1 file changed, 119 insertions(+), 119 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index d4db3dfd..a7cb5634 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -21,37 +21,37 @@ tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy
 
 [[package]]
 name = "black"
-version = "23.1.0"
+version = "23.3.0"
 description = "The uncompromising code formatter."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "black-23.1.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:b6a92a41ee34b883b359998f0c8e6eb8e99803aa8bf3123bf2b2e6fec505a221"},
-    {file = "black-23.1.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:57c18c5165c1dbe291d5306e53fb3988122890e57bd9b3dcb75f967f13411a26"},
-    {file = "black-23.1.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:9880d7d419bb7e709b37e28deb5e68a49227713b623c72b2b931028ea65f619b"},
-    {file = "black-23.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e6663f91b6feca5d06f2ccd49a10f254f9298cc1f7f49c46e498a0771b507104"},
-    {file = "black-23.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:9afd3f493666a0cd8f8df9a0200c6359ac53940cbde049dcb1a7eb6ee2dd7074"},
-    {file = "black-23.1.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:bfffba28dc52a58f04492181392ee380e95262af14ee01d4bc7bb1b1c6ca8d27"},
-    {file = "black-23.1.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:c1c476bc7b7d021321e7d93dc2cbd78ce103b84d5a4cf97ed535fbc0d6660648"},
-    {file = "black-23.1.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:382998821f58e5c8238d3166c492139573325287820963d2f7de4d518bd76958"},
-    {file = "black-23.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bf649fda611c8550ca9d7592b69f0637218c2369b7744694c5e4902873b2f3a"},
-    {file = "black-23.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:121ca7f10b4a01fd99951234abdbd97728e1240be89fde18480ffac16503d481"},
-    {file = "black-23.1.0-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:a8471939da5e824b891b25751955be52ee7f8a30a916d570a5ba8e0f2eb2ecad"},
-    {file = "black-23.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8178318cb74f98bc571eef19068f6ab5613b3e59d4f47771582f04e175570ed8"},
-    {file = "black-23.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:a436e7881d33acaf2536c46a454bb964a50eff59b21b51c6ccf5a40601fbef24"},
-    {file = "black-23.1.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:a59db0a2094d2259c554676403fa2fac3473ccf1354c1c63eccf7ae65aac8ab6"},
-    {file = "black-23.1.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:0052dba51dec07ed029ed61b18183942043e00008ec65d5028814afaab9a22fd"},
-    {file = "black-23.1.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:49f7b39e30f326a34b5c9a4213213a6b221d7ae9d58ec70df1c4a307cf2a1580"},
-    {file = "black-23.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:162e37d49e93bd6eb6f1afc3e17a3d23a823042530c37c3c42eeeaf026f38468"},
-    {file = "black-23.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b70eb40a78dfac24842458476135f9b99ab952dd3f2dab738c1881a9b38b753"},
-    {file = "black-23.1.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:a29650759a6a0944e7cca036674655c2f0f63806ddecc45ed40b7b8aa314b651"},
-    {file = "black-23.1.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:bb460c8561c8c1bec7824ecbc3ce085eb50005883a6203dcfb0122e95797ee06"},
-    {file = "black-23.1.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:c91dfc2c2a4e50df0026f88d2215e166616e0c80e86004d0003ece0488db2739"},
-    {file = "black-23.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a951cc83ab535d248c89f300eccbd625e80ab880fbcfb5ac8afb5f01a258ac9"},
-    {file = "black-23.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:0680d4380db3719ebcfb2613f34e86c8e6d15ffeabcf8ec59355c5e7b85bb555"},
-    {file = "black-23.1.0-py3-none-any.whl", hash = "sha256:7a0f701d314cfa0896b9001df70a530eb2472babb76086344e688829efd97d32"},
-    {file = "black-23.1.0.tar.gz", hash = "sha256:b0bd97bea8903f5a2ba7219257a44e3f1f9d00073d6cc1add68f0beec69692ac"},
+    {file = "black-23.3.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:0945e13506be58bf7db93ee5853243eb368ace1c08a24c65ce108986eac65915"},
+    {file = "black-23.3.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:67de8d0c209eb5b330cce2469503de11bca4085880d62f1628bd9972cc3366b9"},
+    {file = "black-23.3.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:7c3eb7cea23904399866c55826b31c1f55bbcd3890ce22ff70466b907b6775c2"},
+    {file = "black-23.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:32daa9783106c28815d05b724238e30718f34155653d4d6e125dc7daec8e260c"},
+    {file = "black-23.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:35d1381d7a22cc5b2be2f72c7dfdae4072a3336060635718cc7e1ede24221d6c"},
+    {file = "black-23.3.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:a8a968125d0a6a404842fa1bf0b349a568634f856aa08ffaff40ae0dfa52e7c6"},
+    {file = "black-23.3.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:c7ab5790333c448903c4b721b59c0d80b11fe5e9803d8703e84dcb8da56fec1b"},
+    {file = "black-23.3.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:a6f6886c9869d4daae2d1715ce34a19bbc4b95006d20ed785ca00fa03cba312d"},
+    {file = "black-23.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f3c333ea1dd6771b2d3777482429864f8e258899f6ff05826c3a4fcc5ce3f70"},
+    {file = "black-23.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:11c410f71b876f961d1de77b9699ad19f939094c3a677323f43d7a29855fe326"},
+    {file = "black-23.3.0-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:1d06691f1eb8de91cd1b322f21e3bfc9efe0c7ca1f0e1eb1db44ea367dff656b"},
+    {file = "black-23.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50cb33cac881766a5cd9913e10ff75b1e8eb71babf4c7104f2e9c52da1fb7de2"},
+    {file = "black-23.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:e114420bf26b90d4b9daa597351337762b63039752bdf72bf361364c1aa05925"},
+    {file = "black-23.3.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:48f9d345675bb7fbc3dd85821b12487e1b9a75242028adad0333ce36ed2a6d27"},
+    {file = "black-23.3.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:714290490c18fb0126baa0fca0a54ee795f7502b44177e1ce7624ba1c00f2331"},
+    {file = "black-23.3.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:064101748afa12ad2291c2b91c960be28b817c0c7eaa35bec09cc63aa56493c5"},
+    {file = "black-23.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:562bd3a70495facf56814293149e51aa1be9931567474993c7942ff7d3533961"},
+    {file = "black-23.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:e198cf27888ad6f4ff331ca1c48ffc038848ea9f031a3b40ba36aced7e22f2c8"},
+    {file = "black-23.3.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:3238f2aacf827d18d26db07524e44741233ae09a584273aa059066d644ca7b30"},
+    {file = "black-23.3.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:f0bd2f4a58d6666500542b26354978218a9babcdc972722f4bf90779524515f3"},
+    {file = "black-23.3.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:92c543f6854c28a3c7f39f4d9b7694f9a6eb9d3c5e2ece488c327b6e7ea9b266"},
+    {file = "black-23.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a150542a204124ed00683f0db1f5cf1c2aaaa9cc3495b7a3b5976fb136090ab"},
+    {file = "black-23.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:6b39abdfb402002b8a7d030ccc85cf5afff64ee90fa4c5aebc531e3ad0175ddb"},
+    {file = "black-23.3.0-py3-none-any.whl", hash = "sha256:ec751418022185b0c1bb7d7736e6933d40bbb14c14a0abcf9123d1b159f98dd4"},
+    {file = "black-23.3.0.tar.gz", hash = "sha256:1c7b8d606e728a41ea1ccbd7264677e494e87cf630e399262ced92d4a8dac940"},
 ]
 
 [package.dependencies]
@@ -112,63 +112,63 @@ files = [
 
 [[package]]
 name = "coverage"
-version = "7.0.5"
+version = "7.2.2"
 description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "coverage-7.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2a7f23bbaeb2a87f90f607730b45564076d870f1fb07b9318d0c21f36871932b"},
-    {file = "coverage-7.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c18d47f314b950dbf24a41787ced1474e01ca816011925976d90a88b27c22b89"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef14d75d86f104f03dea66c13188487151760ef25dd6b2dbd541885185f05f40"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66e50680e888840c0995f2ad766e726ce71ca682e3c5f4eee82272c7671d38a2"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9fed35ca8c6e946e877893bbac022e8563b94404a605af1d1e6accc7eb73289"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d8d04e755934195bdc1db45ba9e040b8d20d046d04d6d77e71b3b34a8cc002d0"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e109f1c9a3ece676597831874126555997c48f62bddbcace6ed17be3e372de8"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0a1890fca2962c4f1ad16551d660b46ea77291fba2cc21c024cd527b9d9c8809"},
-    {file = "coverage-7.0.5-cp310-cp310-win32.whl", hash = "sha256:be9fcf32c010da0ba40bf4ee01889d6c737658f4ddff160bd7eb9cac8f094b21"},
-    {file = "coverage-7.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:cbfcba14a3225b055a28b3199c3d81cd0ab37d2353ffd7f6fd64844cebab31ad"},
-    {file = "coverage-7.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30b5fec1d34cc932c1bc04017b538ce16bf84e239378b8f75220478645d11fca"},
-    {file = "coverage-7.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1caed2367b32cc80a2b7f58a9f46658218a19c6cfe5bc234021966dc3daa01f0"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d254666d29540a72d17cc0175746cfb03d5123db33e67d1020e42dae611dc196"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19245c249aa711d954623d94f23cc94c0fd65865661f20b7781210cb97c471c0"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b05ed4b35bf6ee790832f68932baf1f00caa32283d66cc4d455c9e9d115aafc"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:29de916ba1099ba2aab76aca101580006adfac5646de9b7c010a0f13867cba45"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e057e74e53db78122a3979f908973e171909a58ac20df05c33998d52e6d35757"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:411d4ff9d041be08fdfc02adf62e89c735b9468f6d8f6427f8a14b6bb0a85095"},
-    {file = "coverage-7.0.5-cp311-cp311-win32.whl", hash = "sha256:52ab14b9e09ce052237dfe12d6892dd39b0401690856bcfe75d5baba4bfe2831"},
-    {file = "coverage-7.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:1f66862d3a41674ebd8d1a7b6f5387fe5ce353f8719040a986551a545d7d83ea"},
-    {file = "coverage-7.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b69522b168a6b64edf0c33ba53eac491c0a8f5cc94fa4337f9c6f4c8f2f5296c"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436e103950d05b7d7f55e39beeb4d5be298ca3e119e0589c0227e6d0b01ee8c7"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8c56bec53d6e3154eaff6ea941226e7bd7cc0d99f9b3756c2520fc7a94e6d96"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a38362528a9115a4e276e65eeabf67dcfaf57698e17ae388599568a78dcb029"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f67472c09a0c7486e27f3275f617c964d25e35727af952869dd496b9b5b7f6a3"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:220e3fa77d14c8a507b2d951e463b57a1f7810a6443a26f9b7591ef39047b1b2"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ecb0f73954892f98611e183f50acdc9e21a4653f294dfbe079da73c6378a6f47"},
-    {file = "coverage-7.0.5-cp37-cp37m-win32.whl", hash = "sha256:d8f3e2e0a1d6777e58e834fd5a04657f66affa615dae61dd67c35d1568c38882"},
-    {file = "coverage-7.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9e662e6fc4f513b79da5d10a23edd2b87685815b337b1a30cd11307a6679148d"},
-    {file = "coverage-7.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:790e4433962c9f454e213b21b0fd4b42310ade9c077e8edcb5113db0818450cb"},
-    {file = "coverage-7.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49640bda9bda35b057b0e65b7c43ba706fa2335c9a9896652aebe0fa399e80e6"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d66187792bfe56f8c18ba986a0e4ae44856b1c645336bd2c776e3386da91e1dd"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:276f4cd0001cd83b00817c8db76730938b1ee40f4993b6a905f40a7278103b3a"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95304068686545aa368b35dfda1cdfbbdbe2f6fe43de4a2e9baa8ebd71be46e2"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:17e01dd8666c445025c29684d4aabf5a90dc6ef1ab25328aa52bedaa95b65ad7"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea76dbcad0b7b0deb265d8c36e0801abcddf6cc1395940a24e3595288b405ca0"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:50a6adc2be8edd7ee67d1abc3cd20678987c7b9d79cd265de55941e3d0d56499"},
-    {file = "coverage-7.0.5-cp38-cp38-win32.whl", hash = "sha256:e4ce984133b888cc3a46867c8b4372c7dee9cee300335e2925e197bcd45b9e16"},
-    {file = "coverage-7.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:4a950f83fd3f9bca23b77442f3a2b2ea4ac900944d8af9993743774c4fdc57af"},
-    {file = "coverage-7.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c2155943896ac78b9b0fd910fb381186d0c345911f5333ee46ac44c8f0e43ab"},
-    {file = "coverage-7.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:54f7e9705e14b2c9f6abdeb127c390f679f6dbe64ba732788d3015f7f76ef637"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ee30375b409d9a7ea0f30c50645d436b6f5dfee254edffd27e45a980ad2c7f4"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b78729038abea6a5df0d2708dce21e82073463b2d79d10884d7d591e0f385ded"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13250b1f0bd023e0c9f11838bdeb60214dd5b6aaf8e8d2f110c7e232a1bff83b"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c407b1950b2d2ffa091f4e225ca19a66a9bd81222f27c56bd12658fc5ca1209"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c76a3075e96b9c9ff00df8b5f7f560f5634dffd1658bafb79eb2682867e94f78"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f26648e1b3b03b6022b48a9b910d0ae209e2d51f50441db5dce5b530fad6d9b1"},
-    {file = "coverage-7.0.5-cp39-cp39-win32.whl", hash = "sha256:ba3027deb7abf02859aca49c865ece538aee56dcb4871b4cced23ba4d5088904"},
-    {file = "coverage-7.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:949844af60ee96a376aac1ded2a27e134b8c8d35cc006a52903fc06c24a3296f"},
-    {file = "coverage-7.0.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:b9727ac4f5cf2cbf87880a63870b5b9730a8ae3a4a360241a0fdaa2f71240ff0"},
-    {file = "coverage-7.0.5.tar.gz", hash = "sha256:051afcbd6d2ac39298d62d340f94dbb6a1f31de06dfaf6fcef7b759dd3860c45"},
+    {file = "coverage-7.2.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c90e73bdecb7b0d1cea65a08cb41e9d672ac6d7995603d6465ed4914b98b9ad7"},
+    {file = "coverage-7.2.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e2926b8abedf750c2ecf5035c07515770944acf02e1c46ab08f6348d24c5f94d"},
+    {file = "coverage-7.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:57b77b9099f172804e695a40ebaa374f79e4fb8b92f3e167f66facbf92e8e7f5"},
+    {file = "coverage-7.2.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:efe1c0adad110bf0ad7fb59f833880e489a61e39d699d37249bdf42f80590169"},
+    {file = "coverage-7.2.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2199988e0bc8325d941b209f4fd1c6fa007024b1442c5576f1a32ca2e48941e6"},
+    {file = "coverage-7.2.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:81f63e0fb74effd5be736cfe07d710307cc0a3ccb8f4741f7f053c057615a137"},
+    {file = "coverage-7.2.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:186e0fc9cf497365036d51d4d2ab76113fb74f729bd25da0975daab2e107fd90"},
+    {file = "coverage-7.2.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:420f94a35e3e00a2b43ad5740f935358e24478354ce41c99407cddd283be00d2"},
+    {file = "coverage-7.2.2-cp310-cp310-win32.whl", hash = "sha256:38004671848b5745bb05d4d621526fca30cee164db42a1f185615f39dc997292"},
+    {file = "coverage-7.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:0ce383d5f56d0729d2dd40e53fe3afeb8f2237244b0975e1427bfb2cf0d32bab"},
+    {file = "coverage-7.2.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3eb55b7b26389dd4f8ae911ba9bc8c027411163839dea4c8b8be54c4ee9ae10b"},
+    {file = "coverage-7.2.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d2b96123a453a2d7f3995ddb9f28d01fd112319a7a4d5ca99796a7ff43f02af5"},
+    {file = "coverage-7.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:299bc75cb2a41e6741b5e470b8c9fb78d931edbd0cd009c58e5c84de57c06731"},
+    {file = "coverage-7.2.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5e1df45c23d4230e3d56d04414f9057eba501f78db60d4eeecfcb940501b08fd"},
+    {file = "coverage-7.2.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:006ed5582e9cbc8115d2e22d6d2144a0725db542f654d9d4fda86793832f873d"},
+    {file = "coverage-7.2.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d683d230b5774816e7d784d7ed8444f2a40e7a450e5720d58af593cb0b94a212"},
+    {file = "coverage-7.2.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:8efb48fa743d1c1a65ee8787b5b552681610f06c40a40b7ef94a5b517d885c54"},
+    {file = "coverage-7.2.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4c752d5264053a7cf2fe81c9e14f8a4fb261370a7bb344c2a011836a96fb3f57"},
+    {file = "coverage-7.2.2-cp311-cp311-win32.whl", hash = "sha256:55272f33da9a5d7cccd3774aeca7a01e500a614eaea2a77091e9be000ecd401d"},
+    {file = "coverage-7.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:92ebc1619650409da324d001b3a36f14f63644c7f0a588e331f3b0f67491f512"},
+    {file = "coverage-7.2.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5afdad4cc4cc199fdf3e18088812edcf8f4c5a3c8e6cb69127513ad4cb7471a9"},
+    {file = "coverage-7.2.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0484d9dd1e6f481b24070c87561c8d7151bdd8b044c93ac99faafd01f695c78e"},
+    {file = "coverage-7.2.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d530191aa9c66ab4f190be8ac8cc7cfd8f4f3217da379606f3dd4e3d83feba69"},
+    {file = "coverage-7.2.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ac0f522c3b6109c4b764ffec71bf04ebc0523e926ca7cbe6c5ac88f84faced0"},
+    {file = "coverage-7.2.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ba279aae162b20444881fc3ed4e4f934c1cf8620f3dab3b531480cf602c76b7f"},
+    {file = "coverage-7.2.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:53d0fd4c17175aded9c633e319360d41a1f3c6e352ba94edcb0fa5167e2bad67"},
+    {file = "coverage-7.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c99cb7c26a3039a8a4ee3ca1efdde471e61b4837108847fb7d5be7789ed8fd9"},
+    {file = "coverage-7.2.2-cp37-cp37m-win32.whl", hash = "sha256:5cc0783844c84af2522e3a99b9b761a979a3ef10fb87fc4048d1ee174e18a7d8"},
+    {file = "coverage-7.2.2-cp37-cp37m-win_amd64.whl", hash = "sha256:817295f06eacdc8623dc4df7d8b49cea65925030d4e1e2a7c7218380c0072c25"},
+    {file = "coverage-7.2.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6146910231ece63facfc5984234ad1b06a36cecc9fd0c028e59ac7c9b18c38c6"},
+    {file = "coverage-7.2.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:387fb46cb8e53ba7304d80aadca5dca84a2fbf6fe3faf6951d8cf2d46485d1e5"},
+    {file = "coverage-7.2.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:046936ab032a2810dcaafd39cc4ef6dd295df1a7cbead08fe996d4765fca9fe4"},
+    {file = "coverage-7.2.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e627dee428a176ffb13697a2c4318d3f60b2ccdde3acdc9b3f304206ec130ccd"},
+    {file = "coverage-7.2.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4fa54fb483decc45f94011898727802309a109d89446a3c76387d016057d2c84"},
+    {file = "coverage-7.2.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:3668291b50b69a0c1ef9f462c7df2c235da3c4073f49543b01e7eb1dee7dd540"},
+    {file = "coverage-7.2.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7c20b731211261dc9739bbe080c579a1835b0c2d9b274e5fcd903c3a7821cf88"},
+    {file = "coverage-7.2.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5764e1f7471cb8f64b8cda0554f3d4c4085ae4b417bfeab236799863703e5de2"},
+    {file = "coverage-7.2.2-cp38-cp38-win32.whl", hash = "sha256:4f01911c010122f49a3e9bdc730eccc66f9b72bd410a3a9d3cb8448bb50d65d3"},
+    {file = "coverage-7.2.2-cp38-cp38-win_amd64.whl", hash = "sha256:c448b5c9e3df5448a362208b8d4b9ed85305528313fca1b479f14f9fe0d873b8"},
+    {file = "coverage-7.2.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bfe7085783cda55e53510482fa7b5efc761fad1abe4d653b32710eb548ebdd2d"},
+    {file = "coverage-7.2.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9d22e94e6dc86de981b1b684b342bec5e331401599ce652900ec59db52940005"},
+    {file = "coverage-7.2.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:507e4720791977934bba016101579b8c500fb21c5fa3cd4cf256477331ddd988"},
+    {file = "coverage-7.2.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bc4803779f0e4b06a2361f666e76f5c2e3715e8e379889d02251ec911befd149"},
+    {file = "coverage-7.2.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db8c2c5ace167fd25ab5dd732714c51d4633f58bac21fb0ff63b0349f62755a8"},
+    {file = "coverage-7.2.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4f68ee32d7c4164f1e2c8797535a6d0a3733355f5861e0f667e37df2d4b07140"},
+    {file = "coverage-7.2.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d52f0a114b6a58305b11a5cdecd42b2e7f1ec77eb20e2b33969d702feafdd016"},
+    {file = "coverage-7.2.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:797aad79e7b6182cb49c08cc5d2f7aa7b2128133b0926060d0a8889ac43843be"},
+    {file = "coverage-7.2.2-cp39-cp39-win32.whl", hash = "sha256:db45eec1dfccdadb179b0f9ca616872c6f700d23945ecc8f21bb105d74b1c5fc"},
+    {file = "coverage-7.2.2-cp39-cp39-win_amd64.whl", hash = "sha256:8dbe2647bf58d2c5a6c5bcc685f23b5f371909a5624e9f5cd51436d6a9f6c6ef"},
+    {file = "coverage-7.2.2-pp37.pp38.pp39-none-any.whl", hash = "sha256:872d6ce1f5be73f05bea4df498c140b9e7ee5418bfa2cc8204e7f9b817caa968"},
+    {file = "coverage-7.2.2.tar.gz", hash = "sha256:36dd42da34fe94ed98c39887b86db9d06777b1c8f860520e21126a75507024f2"},
 ]
 
 [package.dependencies]
@@ -179,14 +179,14 @@ toml = ["tomli"]
 
 [[package]]
 name = "exceptiongroup"
-version = "1.1.0"
+version = "1.1.1"
 description = "Backport of PEP 654 (exception groups)"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
-    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
+    {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"},
+    {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"},
 ]
 
 [package.extras]
@@ -232,31 +232,31 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517",
 
 [[package]]
 name = "iniconfig"
-version = "1.1.1"
-description = "iniconfig: brain-dead simple config-ini parsing"
+version = "2.0.0"
+description = "brain-dead simple config-ini parsing"
 category = "dev"
 optional = false
-python-versions = "*"
+python-versions = ">=3.7"
 files = [
-    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
-    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
+    {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"},
+    {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},
 ]
 
 [[package]]
 name = "isort"
-version = "5.11.4"
+version = "5.11.5"
 description = "A Python utility / library to sort Python imports."
 category = "dev"
 optional = false
 python-versions = ">=3.7.0"
 files = [
-    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
-    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
+    {file = "isort-5.11.5-py3-none-any.whl", hash = "sha256:ba1d72fb2595a01c7895a5128f9585a5cc4b6d395f1c8d514989b9a7eb2a8746"},
+    {file = "isort-5.11.5.tar.gz", hash = "sha256:6be1f76a507cb2ecf16c7cf14a37e41609ca082330be4e3436a18ef74add55db"},
 ]
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
-pipfile-deprecated-finder = ["pipreqs", "requirementslib"]
+pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"]
 plugins = ["setuptools"]
 requirements-deprecated-finder = ["pip-api", "pipreqs"]
 
@@ -274,58 +274,58 @@ files = [
 
 [[package]]
 name = "mypy-extensions"
-version = "0.4.3"
-description = "Experimental type system extensions for programs checked with the mypy typechecker."
+version = "1.0.0"
+description = "Type system extensions for programs checked with the mypy type checker."
 category = "dev"
 optional = false
-python-versions = "*"
+python-versions = ">=3.5"
 files = [
-    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
-    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
+    {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
+    {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
 ]
 
 [[package]]
 name = "packaging"
-version = "22.0"
+version = "23.0"
 description = "Core utilities for Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
-    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
+    {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"},
+    {file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"},
 ]
 
 [[package]]
 name = "pathspec"
-version = "0.10.3"
+version = "0.11.1"
 description = "Utility library for gitignore style pattern matching of file paths."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
-    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
+    {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"},
+    {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"},
 ]
 
 [[package]]
 name = "platformdirs"
-version = "2.6.2"
+version = "3.2.0"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
-    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
+    {file = "platformdirs-3.2.0-py3-none-any.whl", hash = "sha256:ebe11c0d7a805086e99506aa331612429a72ca7cd52a1f0d277dc4adc20cb10e"},
+    {file = "platformdirs-3.2.0.tar.gz", hash = "sha256:d5b638ca397f25f979350ff789db335903d7ea010ab28903f57b27e1b16c2b08"},
 ]
 
 [package.dependencies]
-typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""}
+typing-extensions = {version = ">=4.5", markers = "python_version < \"3.8\""}
 
 [package.extras]
-docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"]
-test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"]
+docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"]
+test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"]
 
 [[package]]
 name = "pluggy"
@@ -403,14 +403,14 @@ sql = ["pandas (>=0.23.2)", "pyarrow (>=1.0.0)"]
 
 [[package]]
 name = "pytest"
-version = "7.2.1"
+version = "7.2.2"
 description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
-    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
+    {file = "pytest-7.2.2-py3-none-any.whl", hash = "sha256:130328f552dcfac0b1cec75c12e3f005619dc5f874f0a06e8ff7263f0ee6225e"},
+    {file = "pytest-7.2.2.tar.gz", hash = "sha256:c99ab0c73aceb050f68929bc93af19ab6db0558791c6a0715723abe9d0ade9d4"},
 ]
 
 [package.dependencies]
@@ -476,7 +476,7 @@ pytest = ">=3.0"
 "tap.py" = ">=3.0,<4.0"
 
 [[package]]
-name = "tap.py"
+name = "tap-py"
 version = "3.1"
 description = "Test Anything Protocol (TAP) tools"
 category = "dev"
@@ -538,31 +538,31 @@ files = [
 
 [[package]]
 name = "typing-extensions"
-version = "4.4.0"
+version = "4.5.0"
 description = "Backported and Experimental Type Hints for Python 3.7+"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"},
-    {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"},
+    {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"},
+    {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"},
 ]
 
 [[package]]
 name = "zipp"
-version = "3.11.0"
+version = "3.15.0"
 description = "Backport of pathlib-compatible object wrapper for zip files"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"},
-    {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"},
+    {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"},
+    {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"},
 ]
 
 [package.extras]
-docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
-testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
+docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"]
+testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
 
 [metadata]
 lock-version = "2.0"

From 9dd2dad946a5b80f522e21d1c299226a14554dfd Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 31 Mar 2023 14:18:35 +0100
Subject: [PATCH 175/531] We need to record which refs match the filter for
 mean of ratios so just alter the global mechanism

---
 .../imputation/engine.py                      |  20 ++--
 .../imputation/ratio_calculators.py           | 103 +++++++++---------
 2 files changed, 67 insertions(+), 56 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index a4d3873f..1bb3d485 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -142,9 +142,9 @@ def impute(
         input_df = input_df.unionByName(back_data_df, allowMissingColumns=True)
 
     if link_filter:
-        filtered_refs = input_df.filter(link_filter).select(
+        filtered_refs = input_df.select(
             col(reference_col).alias("ref"), col(period_col).alias("period")
-        )
+        ).withColumn("match", when(link_filter, True).otherwise(False))
 
     # Store the value for the period prior to the start of imputation.
     # Stored as a value to avoid a join in output creation.
@@ -238,7 +238,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         if link_filter:
             filtered_df = df.join(filtered_refs, ["ref", "period"])
         else:
-            filtered_df = df
+            filtered_df = df.withColumn("match", True)
         filtered_df = filtered_df.filter(~df.output.isNull()).select(
             "ref",
             "period",
@@ -247,6 +247,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             "aux",
             "previous_period",
             "next_period",
+            "match",
         )
 
         # Put the values from the current and previous periods for a
@@ -254,9 +255,9 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         working_df = filtered_df.alias("current")
         working_df = (
             working_df.join(
-                filtered_df.select("ref", "period", "output", "grouping").alias(
-                    "previous"
-                ),
+                filtered_df.select(
+                    "ref", "period", "output", "grouping", "match"
+                ).alias("previous"),
                 [
                     col("current.ref") == col("previous.ref"),
                     col("current.previous_period") == col("previous.period"),
@@ -265,7 +266,9 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
                 "leftouter",
             )
             .join(
-                filtered_df.select("ref", "period", "output", "grouping").alias("next"),
+                filtered_df.select(
+                    "ref", "period", "output", "grouping", "match"
+                ).alias("next"),
                 [
                     col("current.ref") == col("next.ref"),
                     col("current.next_period") == col("next.period"),
@@ -279,8 +282,11 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
                 col("current.period").alias("period"),
                 col("current.aux").alias("aux"),
                 col("current.output"),
+                col("current.match"),
                 col("next.output"),
+                col("next.match"),
                 col("previous.output"),
+                col("previous.match"),
             )
         )
 
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 92fb6900..7ba68ca3 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -5,6 +5,7 @@
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
+
 # Avoid shadowing builtin floor and ceil functions
 from pyspark.sql.functions import ceil as sql_ceil
 from pyspark.sql.functions import col, expr
@@ -198,57 +199,61 @@ def lower_bound(c):
 
 
 def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
-    df = df.groupBy("period", "grouping").agg(
-        expr(
-            """
-                sum(
+    df = (
+        df.filter(col("match"))
+        .groupBy("period", "grouping")
+        .agg(
+            expr(
+                """
+                    sum(
+                        CASE
+                            WHEN previous.output IS NOT NULL
+                            THEN current.output
+                        END
+                    )/sum(previous.output) AS forward
+                """
+            ),
+            expr(
+                """
+                    sum(
+                        CASE
+                            WHEN next.output IS NOT NULL
+                            THEN current.output
+                        END
+                    )/sum(next.output) AS backward
+                """
+            ),
+            expr("sum(current.output)/sum(aux) AS construction"),
+            expr(
+                """
                     CASE
-                        WHEN previous.output IS NOT NULL
-                        THEN current.output
-                    END
-                )/sum(previous.output) AS forward
-            """
-        ),
-        expr(
-            """
-                sum(
+                        WHEN sum(previous.output) = 0
+                        THEN 0
+                        WHEN sum(previous.output) IS NOT NULL
+                        THEN sum(cast(previous.output IS NOT NULL AS integer))
+                    END AS count_forward
+                """
+            ),
+            expr(
+                """
                     CASE
-                        WHEN next.output IS NOT NULL
-                        THEN current.output
-                    END
-                )/sum(next.output) AS backward
-            """
-        ),
-        expr("sum(current.output)/sum(aux) AS construction"),
-        expr(
-            """
-                CASE
-                    WHEN sum(previous.output) = 0
-                    THEN 0
-                    WHEN sum(previous.output) IS NOT NULL
-                    THEN sum(cast(previous.output IS NOT NULL AS integer))
-                END AS count_forward
-            """
-        ),
-        expr(
-            """
-                CASE
-                    WHEN sum(next.output) = 0
-                    THEN 0
-                    WHEN sum(next.output) IS NOT NULL
-                    THEN sum(cast(next.output IS NOT NULL AS integer))
-                END AS count_backward
-            """
-        ),
-        expr(
-            """
-                CASE
-                    WHEN sum(aux) = 0
-                    THEN 0
-                    ELSE count(current.output)
-                END AS count_construction
-            """
-        ),
+                        WHEN sum(next.output) = 0
+                        THEN 0
+                        WHEN sum(next.output) IS NOT NULL
+                        THEN sum(cast(next.output IS NOT NULL AS integer))
+                    END AS count_backward
+                """
+            ),
+            expr(
+                """
+                    CASE
+                        WHEN sum(aux) = 0
+                        THEN 0
+                        ELSE count(current.output)
+                    END AS count_construction
+                """
+            ),
+        )
     )
     return [
         RatioCalculationResult(

From 92a929d73893b7851b6bb336b11abe28cd9d8c90 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 31 Mar 2023 15:55:01 +0100
Subject: [PATCH 176/531] Fix new filter implementation for ratio_of_means

---
 statistical_methods_library/imputation/engine.py   | 14 +++++++++-----
 .../imputation/ratio_calculators.py                |  2 +-
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 1bb3d485..a8dd1323 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -8,7 +8,7 @@
 from typing import Optional, Union
 
 from pyspark.sql import Column, DataFrame
-from pyspark.sql.functions import col, lit, when
+from pyspark.sql.functions import col, expr, lit, when
 from pyspark.sql.types import DecimalType, StringType
 
 from statistical_methods_library.utilities import validation
@@ -143,8 +143,12 @@ def impute(
 
     if link_filter:
         filtered_refs = input_df.select(
-            col(reference_col).alias("ref"), col(period_col).alias("period")
-        ).withColumn("match", when(link_filter, True).otherwise(False))
+            col(reference_col).alias("ref"),
+            col(period_col).alias("period"),
+            (expr(link_filter) if isinstance(link_filter, str) else link_filter).alias(
+                "match"
+            ),
+        )
 
     # Store the value for the period prior to the start of imputation.
     # Stored as a value to avoid a join in output creation.
@@ -238,8 +242,8 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         if link_filter:
             filtered_df = df.join(filtered_refs, ["ref", "period"])
         else:
-            filtered_df = df.withColumn("match", True)
-        filtered_df = filtered_df.filter(~df.output.isNull()).select(
+            filtered_df = df.withColumn("match", lit(True))
+        filtered_df = filtered_df.filter(~filtered_df.output.isNull()).select(
             "ref",
             "period",
             "grouping",
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 7ba68ca3..3064b3f3 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -200,7 +200,7 @@ def lower_bound(c):
 
 def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
     df = (
-        df.filter(col("match"))
+        df.filter(col("current.match"))
         .groupBy("period", "grouping")
         .agg(
             expr(

From 90f35c724232b42df98ff57d20e493abb50d319b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 3 Apr 2023 15:57:04 +0100
Subject: [PATCH 177/531] Trimming fixes and add filtering in mean of ratios

---
 .../imputation/ratio_calculators.py           | 114 ++++++++++++++----
 1 file changed, 88 insertions(+), 26 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 3064b3f3..601d8cce 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -33,12 +33,20 @@ def mean_of_ratios(
     include_zeros: Optional[bool] = False,
     growth_forward_col: Optional[str] = "growth_forward",
     growth_backward_col: Optional[str] = "growth_backward",
+    filtered_forward_col: Optional[str] = "filtered_forward",
+    filtered_backward_col: Optional[str] = "filtered_backward",
     **_kwargs,
 ) -> List[RatioCalculationResult]:
-    common_cols = ["period", "grouping", "ref", "aux"]
+    ratio_cols = [
+        "period",
+        "grouping",
+        "ref",
+        "aux",
+    ]
+    match_cols = ["previous.match", "current.match", "next.match"]
     if not include_zeros:
         df = df.selectExpr(
-            *common_cols,
+            *ratio_cols + match_cols,
             """
                 CASE
                     WHEN previous.output != 0 THEN previous.output
@@ -54,35 +62,54 @@ def mean_of_ratios(
 
     else:
         df = df.selectExpr(
-            *common_cols,
+            *ratio_cols + match_cols,
             "previous.output AS previous_output",
             "current.output AS current_output",
             "next.output AS next_output",
         )
 
     df = df.selectExpr(
-        *common_cols,
+        *ratio_cols,
+        "CASE WHEN previous.match THEN previous_output END AS previous_output",
+        "CASE WHEN current.match THEN current_output END AS current_output",
+        "CASE WHEN next.match THEN next_output END AS next_output",
+        """NOT (previous.match AND current.match) AND previous.match IS NOT NULL
+        AS filtered_forward""",
+        """NOT (next.match AND current.match) AND next.match IS NOT NULL
+        AS filtered_backward""",
+    )
+    df = df.selectExpr(
+        *ratio_cols,
         "current_output",
+        "filtered_forward",
+        "filtered_backward",
         """CASE
-            WHEN previous_output = 0 OR
-            (current_output = 0 AND previous_output IS NOT NULL)
-            THEN 1
-            ELSE current_output/previous_output
+            WHEN NOT filtered_forward THEN CASE
+                WHEN previous_output = 0 OR
+                (current_output = 0 AND previous_output IS NOT NULL)
+                THEN 1
+                ELSE current_output/previous_output
+            END
         END AS growth_forward""",
         """CASE
-            WHEN next_output = 0 OR (current_output = 0 AND next_output IS NOT NULL)
-            THEN 1
-            ELSE current_output/next_output
+            WHEN NOT filtered_backward
+            THEN CASE
+                WHEN
+                    next_output = 0
+                    OR (current_output = 0 AND next_output IS NOT NULL)
+                THEN 1
+                ELSE current_output/next_output
+            END
         END AS growth_backward""",
     )
 
     if lower_trim is not None:
 
-        def upper_bound(c):
-            return sql_ceil(c * Decimal(lower_trim) / 100)
-
         def lower_bound(c):
-            return 1 + sql_floor(c * (100 - Decimal(upper_trim)) / 100)
+            return sql_ceil(c * lower_trim / 100)
+
+        def upper_bound(c, f):
+            return 1 + sql_floor(c * (100 - upper_trim) / 100)
 
         trimmed_df = (
             df.join(
@@ -103,14 +130,34 @@ def lower_bound(c):
                             ) AS count_backward
                         """
                         ),
+                        expr(
+                            """
+                            sum(cast(filtered_forward AS integer))
+                            AS count_filtered_forward
+                        """
+                        ),
+                        expr(
+                            """
+                            sum(cast(filtered_backward AS integer))
+                            AS count_filtered_forward
+                        """
+                        ),
                     )
                     .select(
                         col("period"),
                         col("grouping"),
-                        lower_bound(col("count_forward")).alias("lower_forward"),
-                        upper_bound(col("count_forward")).alias("upper_forward"),
-                        lower_bound(col("count_backward")).alias("lower_backward"),
-                        upper_bound(col("count_backward")).alias("upper_backward"),
+                        lower_bound(
+                            col("count_forward"),
+                        ).alias("lower_forward"),
+                        upper_bound(
+                            col("count_forward"),
+                        ).alias("upper_forward"),
+                        lower_bound(
+                            col("count_backward"),
+                        ).alias("lower_backward"),
+                        upper_bound(
+                            col("count_backward"),
+                        ).alias("upper_backward"),
                     )
                 ),
                 ["period", "grouping"],
@@ -140,12 +187,14 @@ def lower_bound(c):
             .select(
                 col("period"),
                 col("grouping"),
+                col("aux"),
+                col("current_output"),
                 when(
                     (
                         col("num_forward").between(
                             col("lower_forward"), col("upper_forward")
                         )
-                        | trim_threshold
+                        | trim_threshold - col("count_filtered_forward")
                         >= col("count_forward")
                     ),
                     col("growth_forward"),
@@ -155,17 +204,22 @@ def lower_bound(c):
                         col("num_backward").between(
                             col("lower_backward"), col("upper_backward")
                         )
-                        | trim_threshold
+                        | trim_threshold - col("count_filtered_backward")
                         >= col("count_backward")
                     ),
                     col("growth_backward"),
                 ).alias("trimmed_backward"),
-            )
+            ),
         )
 
     else:
-        trimmed_df = df.withColumn("trimmed_forward", col("growth_forward")).withColumn(
-            "trimmed_backward", col("growth_backward")
+        trimmed_df = df.selectExpr(
+            "period",
+            "grouping",
+            "aux",
+            "current_output",
+            "growth_forward AS trimmed_forward",
+            "growth_backward AS trimmed_backward",
         )
 
     ratio_df = trimmed_df.groupBy("period", "grouping").agg(
@@ -174,11 +228,17 @@ def lower_bound(c):
         expr("sum(current_output)/sum(aux) AS construction"),
         expr("count(trimmed_forward) AS count_forward"),
         expr("count(trimmed_backward) AS count_backward"),
-        expr("count(aux) AS count_construction"),
+        expr("count(current_output) AS count_construction"),
     )
 
     growth_df = df.select(
-        "ref", "period", "grouping", "growth_forward", "growth_backward"
+        "ref",
+        "period",
+        "grouping",
+        "growth_forward",
+        "growth_backward",
+        "filtered_forward",
+        "filtered_backward",
     )
 
     return [
@@ -188,6 +248,8 @@ def lower_bound(c):
             additional_outputs={
                 "growth_forward": growth_forward_col,
                 "growth_backward": growth_backward_col,
+                "filtered_forward": filtered_forward_col,
+                "filtered_backward": filtered_backward_col,
             },
         ),
         RatioCalculationResult(

From 48d43d054979b7d5e70b66871abab6d8da182a2b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 3 Apr 2023 17:11:20 +0100
Subject: [PATCH 178/531] Zero inclusion and filtering fixes in mean of ratios

---
 .../imputation/ratio_calculators.py           | 100 ++++++++----------
 1 file changed, 45 insertions(+), 55 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 601d8cce..9a7e6eff 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -37,70 +37,60 @@ def mean_of_ratios(
     filtered_backward_col: Optional[str] = "filtered_backward",
     **_kwargs,
 ) -> List[RatioCalculationResult]:
-    ratio_cols = [
+    df = df.select(
         "period",
         "grouping",
         "ref",
-        "aux",
-    ]
-    match_cols = ["previous.match", "current.match", "next.match"]
-    if not include_zeros:
-        df = df.selectExpr(
-            *ratio_cols + match_cols,
-            """
-                CASE
-                    WHEN previous.output != 0 THEN previous.output
-                END AS previous_output
-            """,
+        when(col("current.match"), col("aux")).alias("aux"),
+        when(
+            col("previous.match")
+            & (lit(include_zeros) | (col(previous.output) != lit(0))),
+            col("previous.output").alias("previous_output"),
+        ),
+        when(
+            col("current_match")
+            & (lit(include_zeros) | (col(current.output) != lit(0))),
+            col("current.output").alias("current_output"),
+        ),
+        when(
+            col("next.match") & (lit(include_zeros) | (col(next.output) != lit(0))),
+            col("next.output").alias("next_output"),
+        ),
+        expr(
             """
-                CASE
-                    WHEN current.output != 0 THEN current.output
-                END AS current_output
-            """,
-            "CASE WHEN next.output != 0 THEN next.output END AS next_output",
-        )
-
-    else:
-        df = df.selectExpr(
-            *ratio_cols + match_cols,
-            "previous.output AS previous_output",
-            "current.output AS current_output",
-            "next.output AS next_output",
-        )
-
-    df = df.selectExpr(
-        *ratio_cols,
-        "CASE WHEN previous.match THEN previous_output END AS previous_output",
-        "CASE WHEN current.match THEN current_output END AS current_output",
-        "CASE WHEN next.match THEN next_output END AS next_output",
-        """NOT (previous.match AND current.match) AND previous.match IS NOT NULL
-        AS filtered_forward""",
-        """NOT (next.match AND current.match) AND next.match IS NOT NULL
-        AS filtered_backward""",
-    )
-    df = df.selectExpr(
-        *ratio_cols,
+            NOT (previous.match AND current.match) AND previous.match IS NOT NULL
+            AS filtered_forward"""
+        ),
+        expr(
+            """NOT (next.match AND current.match) AND next.match IS NOT NULL
+            AS filtered_backward"""
+        ),
+    ).selectExpr(
+        "period",
+        "grouping",
+        "ref",
+        "aux",
         "current_output",
         "filtered_forward",
         "filtered_backward",
         """CASE
-            WHEN NOT filtered_forward THEN CASE
-                WHEN previous_output = 0 OR
-                (current_output = 0 AND previous_output IS NOT NULL)
-                THEN 1
-                ELSE current_output/previous_output
-            END
-        END AS growth_forward""",
+                WHEN NOT filtered_forward THEN CASE
+                    WHEN previous_output = 0 OR
+                    (current_output = 0 AND previous_output IS NOT NULL)
+                    THEN 1
+                    ELSE current_output/previous_output
+                END
+            END AS growth_forward""",
         """CASE
-            WHEN NOT filtered_backward
-            THEN CASE
-                WHEN
-                    next_output = 0
-                    OR (current_output = 0 AND next_output IS NOT NULL)
-                THEN 1
-                ELSE current_output/next_output
-            END
-        END AS growth_backward""",
+                WHEN NOT filtered_backward
+                THEN CASE
+                    WHEN
+                        next_output = 0
+                        OR (current_output = 0 AND next_output IS NOT NULL)
+                    THEN 1
+                    ELSE current_output/next_output
+                END
+            END AS growth_backward""",
     )
 
     if lower_trim is not None:

From a4f24e03567c9cecda33819e422e169b0539fca3 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 3 Apr 2023 17:19:38 +0100
Subject: [PATCH 179/531] Fix incorrect order of closing when and aliasing

---
 .../imputation/ratio_calculators.py           | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 9a7e6eff..d199de48 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -10,7 +10,7 @@
 from pyspark.sql.functions import ceil as sql_ceil
 from pyspark.sql.functions import col, expr
 from pyspark.sql.functions import floor as sql_floor
-from pyspark.sql.functions import when
+from pyspark.sql.functions import lit, when
 
 
 @dataclass
@@ -44,18 +44,18 @@ def mean_of_ratios(
         when(col("current.match"), col("aux")).alias("aux"),
         when(
             col("previous.match")
-            & (lit(include_zeros) | (col(previous.output) != lit(0))),
-            col("previous.output").alias("previous_output"),
-        ),
+            & (lit(include_zeros) | (col("previous.output") != lit(0))),
+            col("previous.output"),
+        ).alias("previous_output"),
         when(
-            col("current_match")
-            & (lit(include_zeros) | (col(current.output) != lit(0))),
-            col("current.output").alias("current_output"),
-        ),
+            col("current.match")
+            & (lit(include_zeros) | (col("current.output") != lit(0))),
+            col("current.output"),
+        ).alias("current_output"),
         when(
-            col("next.match") & (lit(include_zeros) | (col(next.output) != lit(0))),
-            col("next.output").alias("next_output"),
-        ),
+            col("next.match") & (lit(include_zeros) | (col("next.output") != lit(0))),
+            col("next.output"),
+        ).alias("next_output"),
         expr(
             """
             NOT (previous.match AND current.match) AND previous.match IS NOT NULL

From c1bfd59f16105cacce68c2e48ae18af983cda391 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 3 Apr 2023 17:25:49 +0100
Subject: [PATCH 180/531] Fix construction count

---
 statistical_methods_library/imputation/ratio_calculators.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index d199de48..5129c70d 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -218,7 +218,7 @@ def upper_bound(c, f):
         expr("sum(current_output)/sum(aux) AS construction"),
         expr("count(trimmed_forward) AS count_forward"),
         expr("count(trimmed_backward) AS count_backward"),
-        expr("count(current_output) AS count_construction"),
+        expr("count(aux) AS count_construction"),
     )
 
     growth_df = df.select(

From d5b64e9b0fe014cbd0e7f535167ffbca4bedbe94 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 4 Apr 2023 11:58:04 +0100
Subject: [PATCH 181/531] Attempt at trimming with markers, currently fails
 tests

---
 .../imputation/ratio_calculators.py           | 81 ++++++++++---------
 1 file changed, 42 insertions(+), 39 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 5129c70d..aa3a566b 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -35,6 +35,8 @@ def mean_of_ratios(
     growth_backward_col: Optional[str] = "growth_backward",
     filtered_forward_col: Optional[str] = "filtered_forward",
     filtered_backward_col: Optional[str] = "filtered_backward",
+    trim_marker_forward_col: Optional[str] = "trim_marker_forward",
+    trim_marker_backward_col: Optional[str] = "trim_marker_backward",
     **_kwargs,
 ) -> List[RatioCalculationResult]:
     df = df.select(
@@ -101,7 +103,7 @@ def lower_bound(c):
         def upper_bound(c, f):
             return 1 + sql_floor(c * (100 - upper_trim) / 100)
 
-        trimmed_df = (
+        df = (
             df.join(
                 (
                     df.groupBy("period", "grouping")
@@ -174,50 +176,47 @@ def upper_bound(c, f):
                 """
                 ),
             )
-            .select(
-                col("period"),
-                col("grouping"),
-                col("aux"),
-                col("current_output"),
-                when(
-                    (
-                        col("num_forward").between(
-                            col("lower_forward"), col("upper_forward")
-                        )
-                        | trim_threshold - col("count_filtered_forward")
-                        >= col("count_forward")
-                    ),
-                    col("growth_forward"),
-                ).alias("trimmed_forward"),
-                when(
-                    (
-                        col("num_backward").between(
-                            col("lower_backward"), col("upper_backward")
-                        )
-                        | trim_threshold - col("count_filtered_backward")
-                        >= col("count_backward")
-                    ),
-                    col("growth_backward"),
-                ).alias("trimmed_backward"),
-            ),
+            .withColumn(
+                "trim_marker_forward",
+                ~(
+                    col("num_forward").between(
+                        col("lower_forward"), col("upper_forward")
+                    )
+                    | trim_threshold - col("count_filtered_forward")
+                    >= col("count_forward")
+                ),
+            )
+            .withColumn(
+                "trim_marker_backward",
+                ~(
+                    col("num_backward").between(
+                        col("lower_backward"), col("upper_backward")
+                    )
+                    | trim_threshold - col("count_filtered_backward")
+                    >= col("count_backward")
+                ),
+            )
         )
 
     else:
-        trimmed_df = df.selectExpr(
-            "period",
-            "grouping",
-            "aux",
-            "current_output",
-            "growth_forward AS trimmed_forward",
-            "growth_backward AS trimmed_backward",
+        df = df.withColumn("trim_marker_forward", lit(False)).withColumn(
+            "trim_marker_backward", lit(False)
         )
 
-    ratio_df = trimmed_df.groupBy("period", "grouping").agg(
-        expr("mean(trimmed_forward) AS forward"),
-        expr("mean(trimmed_backward) AS backward"),
+    ratio_df = df.groupBy("period", "grouping").agg(
+        expr(
+            """mean(
+                CASE WHEN NOT trim_marker_forward THEN growth_forward END
+            ) AS forward"""
+        ),
+        expr(
+            """mean(
+                CASE WHEN NOT trim_marker_backward THEN growth_backward END
+            ) AS backward"""
+        ),
         expr("sum(current_output)/sum(aux) AS construction"),
-        expr("count(trimmed_forward) AS count_forward"),
-        expr("count(trimmed_backward) AS count_backward"),
+        expr("sum(cast(NOT trim_marker_forward AS integer)) AS count_forward"),
+        expr("sum(cast(NOT trim_marker_backward AS integer)) AS count_backward"),
         expr("count(aux) AS count_construction"),
     )
 
@@ -229,6 +228,8 @@ def upper_bound(c, f):
         "growth_backward",
         "filtered_forward",
         "filtered_backward",
+        "trim_marker_forward",
+        "trim_marker_backward",
     )
 
     return [
@@ -240,6 +241,8 @@ def upper_bound(c, f):
                 "growth_backward": growth_backward_col,
                 "filtered_forward": filtered_forward_col,
                 "filtered_backward": filtered_backward_col,
+                "trim_marker_forward": "trim_marker_forward_col",
+                "trim_marker_backward": "trim_marker_backward_col",
             },
         ),
         RatioCalculationResult(

From 0a05c811de9d19c87fbb023f854a208e18d5d053 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 4 Apr 2023 12:10:42 +0100
Subject: [PATCH 182/531] Fix Count

---
 statistical_methods_library/imputation/ratio_calculators.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index aa3a566b..077d94d1 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -215,8 +215,8 @@ def upper_bound(c, f):
             ) AS backward"""
         ),
         expr("sum(current_output)/sum(aux) AS construction"),
-        expr("sum(cast(NOT trim_marker_forward AS integer)) AS count_forward"),
-        expr("sum(cast(NOT trim_marker_backward AS integer)) AS count_backward"),
+        expr("sum(cast(NOT trim_marker_forward AND growth_forward IS NOT NULL AS integer)) AS count_forward"),
+        expr("sum(cast(NOT trim_marker_backward AND growth_backward IS NOT NULL AS integer)) AS count_backward"),
         expr("count(aux) AS count_construction"),
     )
 

From 0fd15fae268035c326d57659d2c9b7481d9b86e6 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 4 Apr 2023 13:59:02 +0100
Subject: [PATCH 183/531] Updated Tests To Include Marker Columns.

---
 .../imputation/ratio_calculators.py           | 28 +++---
 .../methodology_scenarios/01_C_output.csv     | 10 +-
 .../methodology_scenarios/02_C_FI_output.csv  | 18 ++--
 .../03_R_R_FI_output.csv                      | 26 ++---
 .../04_R_R_FI_FI_output.csv                   | 34 +++----
 .../05_R_R_FI_FI_FI_output.csv                | 42 ++++----
 .../06_BI_BI_R_output.csv                     | 26 ++---
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          | 58 +++++------
 .../methodology_scenarios/08_R_R_R_output.csv | 26 ++---
 .../09_R_NS_C_output.csv                      | 24 ++---
 .../10_C_FI_NS_R_output.csv                   | 32 +++----
 .../11_R_R_FI-BI_R_R_output.csv               | 50 +++++-----
 .../12_C_FI_FI_FI_FI_output.csv               | 42 ++++----
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          | 56 +++++------
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          | 56 +++++------
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          | 56 +++++------
 .../16.1_BI_BI_R_NS_C_FI_FI_output.csv        | 56 +++++------
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv | 70 +++++++-------
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv | 70 +++++++-------
 .../17_NS_R_FI_NS_output.csv                  | 30 +++---
 .../18_NS_BI_R_NS_output.csv                  | 30 +++---
 .../19_link_columns_output.csv                | 50 +++++-----
 .../20_mixed_data_output.csv                  | 96 +++++++++----------
 .../21_class_change_R_C_FI_output.csv         | 32 +++----
 .../22_class_change_C_BI_R_output.csv         | 32 +++----
 .../23_class_change_C_C_FI_output.csv         | 32 +++----
 .../24_class_change_R_BI_R_output.csv         | 32 +++----
 .../25_class_change_C_FI_FI_output.csv        | 44 ++++-----
 tests/imputation/test_mean_of_ratios.py       | 18 +++-
 29 files changed, 596 insertions(+), 580 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 077d94d1..01d7414e 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -35,8 +35,8 @@ def mean_of_ratios(
     growth_backward_col: Optional[str] = "growth_backward",
     filtered_forward_col: Optional[str] = "filtered_forward",
     filtered_backward_col: Optional[str] = "filtered_backward",
-    trim_marker_forward_col: Optional[str] = "trim_marker_forward",
-    trim_marker_backward_col: Optional[str] = "trim_marker_backward",
+    trimmed_forward_col: Optional[str] = "trimmed_forward",
+    trimmed_backward_col: Optional[str] = "trimmed_backward",
     **_kwargs,
 ) -> List[RatioCalculationResult]:
     df = df.select(
@@ -177,7 +177,7 @@ def upper_bound(c, f):
                 ),
             )
             .withColumn(
-                "trim_marker_forward",
+                "trimmed_forward",
                 ~(
                     col("num_forward").between(
                         col("lower_forward"), col("upper_forward")
@@ -187,7 +187,7 @@ def upper_bound(c, f):
                 ),
             )
             .withColumn(
-                "trim_marker_backward",
+                "trimmed_backward",
                 ~(
                     col("num_backward").between(
                         col("lower_backward"), col("upper_backward")
@@ -199,24 +199,24 @@ def upper_bound(c, f):
         )
 
     else:
-        df = df.withColumn("trim_marker_forward", lit(False)).withColumn(
-            "trim_marker_backward", lit(False)
+        df = df.withColumn("trimmed_forward", lit(False)).withColumn(
+            "trimmed_backward", lit(False)
         )
 
     ratio_df = df.groupBy("period", "grouping").agg(
         expr(
             """mean(
-                CASE WHEN NOT trim_marker_forward THEN growth_forward END
+                CASE WHEN NOT trimmed_forward THEN growth_forward END
             ) AS forward"""
         ),
         expr(
             """mean(
-                CASE WHEN NOT trim_marker_backward THEN growth_backward END
+                CASE WHEN NOT trimmed_backward THEN growth_backward END
             ) AS backward"""
         ),
         expr("sum(current_output)/sum(aux) AS construction"),
-        expr("sum(cast(NOT trim_marker_forward AND growth_forward IS NOT NULL AS integer)) AS count_forward"),
-        expr("sum(cast(NOT trim_marker_backward AND growth_backward IS NOT NULL AS integer)) AS count_backward"),
+        expr("sum(cast(NOT trimmed_forward AND growth_forward IS NOT NULL AS integer)) AS count_forward"),
+        expr("sum(cast(NOT trimmed_backward AND growth_backward IS NOT NULL AS integer)) AS count_backward"),
         expr("count(aux) AS count_construction"),
     )
 
@@ -228,8 +228,8 @@ def upper_bound(c, f):
         "growth_backward",
         "filtered_forward",
         "filtered_backward",
-        "trim_marker_forward",
-        "trim_marker_backward",
+        "trimmed_forward",
+        "trimmed_backward",
     )
 
     return [
@@ -241,8 +241,8 @@ def upper_bound(c, f):
                 "growth_backward": growth_backward_col,
                 "filtered_forward": filtered_forward_col,
                 "filtered_backward": filtered_backward_col,
-                "trim_marker_forward": "trim_marker_forward_col",
-                "trim_marker_backward": "trim_marker_backward_col",
+                "trimmed_forward": trimmed_forward_col,
+                "trimmed_backward": trimmed_backward_col,
             },
         ),
         RatioCalculationResult(
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index 55672d8b..2757c1ef 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-10001,202001,100,1,3892,R,,,1.0,1.0,147.8876404,0,0,3
-10002,202001,100,75,3873,R,,,1.0,1.0,147.8876404,0,0,3
-10003,202001,100,13,5397,R,,,1.0,1.0,147.8876404,0,0,3
-10004,202001,100,71,10500.022472,C,,,1.0,1.0,147.8876404,0,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE
+10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE
+10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE
+10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 38330bda..0436a18f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-20001,202001,100,35,2536,R,,0.306169262,1.0,3.027097983,93.98369565,0,3,3
-20001,202002,100,35,8283,R,3.266167192,,1.255768523,1.0,66.5326087,3,0,3
-20002,202001,100,72,9113,R,,3.068350168,1.0,3.027097983,93.98369565,0,3,3
-20002,202002,100,72,2970,R,0.325908043,,1.255768523,1.0,66.5326087,3,0,3
-20003,202001,100,77,5644,R,,5.70677452,1.0,3.027097983,93.98369565,0,3,3
-20003,202002,100,77,989,R,0.175230333,,1.255768523,1.0,66.5326087,3,0,3
-20004,202001,100,30,2819.51087,C,,,1.0,3.027097983,93.98369565,0,3,3
-20004,202002,100,30,3540.653001,FIC,,,1.255768523,1.0,66.5326087,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,FALSE,FALSE,FALSE,FALSE
+20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,FALSE,FALSE,FALSE,FALSE
+20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,FALSE,FALSE,FALSE,FALSE
+20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,FALSE,FALSE,FALSE,FALSE
+20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,FALSE,FALSE,FALSE,FALSE
+20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,FALSE,FALSE,FALSE,FALSE
+20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,,,,
+20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index d3060c09..997ea7d8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-30001,202001,100,51,8444,R,,1.129481006,1.0,1.655006,120.199052,0,4,4
-30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4
-30001,202003,100,51,2003,R,0.267924024,,1.526947,1.0,103.015385,3,0,3
-30002,202001,100,72,9343,R,,1.195062676,1.0,1.655006,120.199052,0,4,4
-30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4
-30002,202003,100,72,4897,R,0.626375032,,1.526947,1.0,103.015385,3,0,3
-30003,202001,100,7,7511,R,,4.265190233,1.0,1.655006,120.199052,0,4,4
-30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4
-30003,202003,100,7,6492,R,3.686541738,,1.526947,1.0,103.015385,3,0,3
-30004,202001,100,81,64,R,,0.030288689,1.0,1.655006,120.199052,0,4,4
-30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4
-30004,202003,100,81,3226.438865,FIR,,,1.526947,1.0,103.015385,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,FALSE,FALSE,FALSE,FALSE
+30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,FALSE,FALSE,FALSE,FALSE
+30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,FALSE,FALSE,FALSE,FALSE
+30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,FALSE,FALSE,FALSE,FALSE
+30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,FALSE,FALSE,FALSE,FALSE
+30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,FALSE,FALSE,FALSE,FALSE
+30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,FALSE,FALSE,FALSE,FALSE
+30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,FALSE,FALSE,FALSE,FALSE
+30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,FALSE,FALSE,FALSE,FALSE
+30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,FALSE,FALSE,FALSE,FALSE
+30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,FALSE,FALSE,FALSE,FALSE
+30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index ce41bb22..0363b75f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-40001,202001,100,35,9491,R,,1.984319465,1.0,2.053506032,128.0208333,0,4,4
-40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4
-40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3
-40001,202004,100,35,4911,R,0.621488231,,0.645360538,1.0,73.71052632,3,0,3
-40002,202001,100,63,2095,R,,4.739819005,1.0,2.053506032,128.0208333,0,4,4
-40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4
-40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3
-40002,202004,100,63,2115,R,0.67442602,,0.645360538,1.0,73.71052632,3,0,3
-40003,202001,100,16,7863,R,,0.968230513,1.0,2.053506032,128.0208333,0,4,4
-40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4
-40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3
-40003,202004,100,16,1377,R,0.640167364,,0.645360538,1.0,73.71052632,3,0,3
-40004,202001,100,78,5131,R,,0.521655144,1.0,2.053506032,128.0208333,0,4,4
-40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4
-40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3
-40004,202004,100,78,19068.674333,FIR,,,0.645360538,1.0,73.71052632,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,FALSE,FALSE,FALSE,FALSE
+40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,FALSE,FALSE,FALSE,FALSE
+40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,FALSE,FALSE,FALSE,FALSE
+40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,FALSE,FALSE,FALSE,FALSE
+40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,FALSE,FALSE,FALSE,FALSE
+40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,FALSE,FALSE,FALSE,FALSE
+40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,FALSE,FALSE,FALSE,FALSE
+40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,FALSE,FALSE,FALSE,FALSE
+40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,FALSE,FALSE,FALSE,FALSE
+40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,FALSE,FALSE,FALSE,FALSE
+40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,FALSE,FALSE,FALSE,FALSE
+40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,FALSE,FALSE,FALSE,FALSE
+40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,FALSE,FALSE,FALSE,FALSE
+40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,FALSE,FALSE,FALSE,FALSE
+40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,,,,
+40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
index 71e81d10..77df9932 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-50001,202001,100,59,6362,R,,0.744790447,1.0,1.103126475,70.34328358,0,4,4
-50001,202002,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4
-50001,202003,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3
-50001,202004,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3
-50001,202005,100,59,4687,R,0.603295147,,0.49999873,1.0,49.9122807,3,0,3
-50002,202001,100,36,4851,R,,0.545423881,1.0,1.103126475,70.34328358,0,4,4
-50002,202002,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4
-50002,202003,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3
-50002,202004,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3
-50002,202005,100,36,2327,R,0.660704145,,0.49999873,1.0,49.9122807,3,0,3
-50003,202001,100,76,2238,R,,2.910273082,1.0,1.103126475,70.34328358,0,4,4
-50003,202002,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4
-50003,202003,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3
-50003,202004,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3
-50003,202005,100,76,1521,R,0.235996897,,0.49999873,1.0,49.9122807,3,0,3
-50004,202001,100,30,688,R,,0.21201849,1.0,1.103126475,70.34328358,0,4,4
-50004,202002,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4
-50004,202003,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3
-50004,202004,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3
-50004,202005,100,30,6512.701992,FIR,,,0.49999873,1.0,49.9122807,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+50001,202001,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
+50001,202002,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
+50001,202003,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
+50001,202004,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
+50001,202005,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
+50002,202001,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
+50002,202002,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
+50002,202003,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
+50002,202004,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
+50002,202005,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
+50003,202001,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
+50003,202002,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
+50003,202003,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
+50003,202004,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
+50003,202005,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
+50004,202001,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
+50004,202002,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
+50004,202003,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,,
+50004,202004,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,,
+50004,202005,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index c38f888d..83c1c5f5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-60001,202001,100,15,5077,R,,0.648403576,1.0,7.141605449,117.9107143,0,3,3
-60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3
-60001,202003,100,15,1046,R,0.133588761,,7.391291354,1.0,100.913043,3,0,4
-60002,202001,100,71,1588,R,,1.309150866,1.0,7.141605449,117.9107143,0,3,3
-60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3
-60002,202003,100,71,3807,R,3.138499588,,7.391291354,1.0,100.913043,3,0,4
-60003,202001,100,26,6541,R,,19.4672619,1.0,7.141605449,117.9107143,0,3,3
-60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3
-60003,202003,100,26,6351,R,18.90178571,,7.391291354,1.0,100.913043,3,0,4
-60004,202001,100,3,7500.429481,BI,,,1.0,7.141605449,117.9107143,0,3,3
-60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3
-60004,202003,100,3,401,R,,,7.391291354,1.0,100.913043,3,0,4
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,FALSE,FALSE,FALSE,FALSE
+60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,FALSE,FALSE,FALSE,FALSE
+60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,FALSE,FALSE,FALSE,FALSE
+60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,FALSE,FALSE,FALSE,FALSE
+60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,FALSE,FALSE,FALSE,FALSE
+60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,FALSE,FALSE,FALSE,FALSE
+60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,FALSE,FALSE,FALSE,FALSE
+60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,FALSE,FALSE,FALSE,FALSE
+60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,FALSE,FALSE,FALSE,FALSE
+60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,,,,
+60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,,,,
+60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,FALSE,FALSE,FALSE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index af68e919..56b6ae62 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-70001,202001,100,39,5951,R,,3.280595369,1.0,47.92201545,107.48,0,3,3
-70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3
-70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4
-70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3
-70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3
-70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4
-70001,202007,100,39,49,R,0.012408205,,1.593348776,1.0,70.24,3,0,3
-70002,202001,100,94,6705,R,,139.6875,1.0,47.92201545,107.48,0,3,3
-70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3
-70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4
-70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3
-70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3
-70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4
-70002,202007,100,94,3475,R,0.46538101,,1.593348776,1.0,70.24,3,0,3
-70003,202001,100,42,6153,R,,0.797950979,1.0,47.92201545,107.48,0,3,3
-70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3
-70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4
-70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3
-70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3
-70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4
-70003,202007,100,42,8768,R,4.302257115,,1.593348776,1.0,70.24,3,0,3
-70004,202001,100,6,392488.392089,BI,,,1.0,47.92201545,107.48,0,3,3
-70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3
-70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4
-70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3
-70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3
-70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4
-70004,202007,100,6,9360.924061,FIR,,,1.593348776,1.0,70.24,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,FALSE,FALSE,FALSE,FALSE
+70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,FALSE,FALSE,FALSE,FALSE
+70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,FALSE,FALSE,FALSE,FALSE
+70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,FALSE,FALSE,FALSE,FALSE
+70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,FALSE,FALSE,FALSE,FALSE
+70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,FALSE,FALSE,FALSE,FALSE
+70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,FALSE,FALSE,FALSE,FALSE
+70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,FALSE,FALSE,FALSE,FALSE
+70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,FALSE,FALSE,FALSE,FALSE
+70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,FALSE,FALSE,FALSE,FALSE
+70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,FALSE,FALSE,FALSE,FALSE
+70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,FALSE,FALSE,FALSE,FALSE
+70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,FALSE,FALSE,FALSE,FALSE
+70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,FALSE,FALSE,FALSE,FALSE
+70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,FALSE,FALSE,FALSE,FALSE
+70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,FALSE,FALSE,FALSE,FALSE
+70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,FALSE,FALSE,FALSE,FALSE
+70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,FALSE,FALSE,FALSE,FALSE
+70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,FALSE,FALSE,FALSE,FALSE
+70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,FALSE,FALSE,FALSE,FALSE
+70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,FALSE,FALSE,FALSE,FALSE
+70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,,,,
+70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,,,,
+70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,FALSE,FALSE,FALSE,FALSE
+70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,,,,
+70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,,,,
+70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,FALSE,FALSE,FALSE,FALSE
+70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index b9076029..5f7dc1aa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-80001,202001,100,91,4042,R,,1.440998217,1.0,1.856581839,69.14982578,0,4,4
-80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4
-80001,202003,100,91,644,R,0.229590018,,1.59233398,1.0,71.90940767,4,0,4
-80002,202001,100,85,7138,R,,3.623350254,1.0,1.856581839,69.14982578,0,4,4
-80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4
-80002,202003,100,85,2746,R,1.393908629,,1.59233398,1.0,71.90940767,4,0,4
-80003,202001,100,41,2846,R,,0.801238739,1.0,1.856581839,69.14982578,0,4,4
-80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4
-80003,202003,100,41,9015,R,2.538006757,,1.59233398,1.0,71.90940767,4,0,4
-80004,202001,100,70,5820,R,,1.560740145,1.0,1.856581839,69.14982578,0,4,4
-80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4
-80004,202003,100,70,8233,R,2.207830518,,1.59233398,1.0,71.90940767,4,0,4
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,FALSE,FALSE,FALSE,FALSE
+80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,FALSE,FALSE,FALSE,FALSE
+80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,FALSE,FALSE,FALSE,FALSE
+80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,FALSE,FALSE,FALSE,FALSE
+80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,FALSE,FALSE,FALSE,FALSE
+80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,FALSE,FALSE,FALSE,FALSE
+80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,FALSE,FALSE,FALSE,FALSE
+80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,FALSE,FALSE,FALSE,FALSE
+80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,FALSE,FALSE,FALSE,FALSE
+80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,FALSE,FALSE,FALSE,FALSE
+80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,FALSE,FALSE,FALSE,FALSE
+80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,FALSE,FALSE,FALSE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index d08651e1..374d7124 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-90001,202001,100,66,2417,R,,0.304868819,1.0,0.528905137,71.77777778,0,3,4
-90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3
-90001,202003,100,66,7319,R,0.923183653,,2.293928258,1.0,169.3831776,3,0,3
-90002,202001,100,27,1706,R,,1.151924375,1.0,0.528905137,71.77777778,0,3,4
-90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3
-90002,202003,100,27,8390,R,5.665091155,,2.293928258,1.0,169.3831776,3,0,3
-90003,202001,100,14,1069,R,,0.129922217,1.0,0.528905137,71.77777778,0,3,4
-90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3
-90003,202003,100,14,2415,R,0.293509966,,2.293928258,1.0,169.3831776,3,0,3
-90004,202001,100,73,7728,R,,,1.0,0.528905137,71.77777778,0,3,4
-90004,202003,100,73,12364.971963,C,,,2.293928258,1.0,169.3831776,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,FALSE,FALSE,FALSE,FALSE
+90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,FALSE,FALSE,FALSE,FALSE
+90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,FALSE,FALSE,FALSE,FALSE
+90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,FALSE,FALSE,FALSE,FALSE
+90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,FALSE,FALSE,FALSE,FALSE
+90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,FALSE,FALSE,FALSE,FALSE
+90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,FALSE,FALSE,FALSE,FALSE
+90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,FALSE,FALSE,FALSE,FALSE
+90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,FALSE,FALSE,FALSE,FALSE
+90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,FALSE,FALSE,FALSE,FALSE
+90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index 8bd1728d..82ad1fe8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-100001,202001,100,26,3074,R,,0.322594186,1.0,1.691693133,179.3296703,0,3,3
-100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3
-100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3
-100001,202004,100,26,3540,R,5.756097561,,6.74787815,1.0,119.1751412,3,0,4
-100002,202001,100,19,8084,R,,3.337737407,1.0,1.691693133,179.3296703,0,3,3
-100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3
-100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3
-100002,202004,100,19,5608,R,1.833878352,,6.74787815,1.0,119.1751412,3,0,4
-100003,202001,100,46,5161,R,,1.414747807,1.0,1.691693133,179.3296703,0,3,3
-100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3
-100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3
-100003,202004,100,46,2594,R,12.65365854,,6.74787815,1.0,119.1751412,3,0,4
-100004,202001,100,86,15422.351648,C,,,1.0,1.691693133,179.3296703,0,3,3
-100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3
-100004,202004,100,86,9352,R,,,6.74787815,1.0,119.1751412,3,0,4
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,FALSE,FALSE,FALSE,FALSE
+100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,FALSE,FALSE,FALSE,FALSE
+100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,FALSE,FALSE,FALSE,FALSE
+100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,FALSE,FALSE,FALSE,FALSE
+100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,FALSE,FALSE,FALSE,FALSE
+100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,FALSE,FALSE,FALSE,FALSE
+100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,FALSE,FALSE,FALSE,FALSE
+100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,FALSE,FALSE,FALSE,FALSE
+100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,FALSE,FALSE,FALSE,FALSE
+100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,FALSE,FALSE,FALSE,FALSE
+100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,FALSE,FALSE,FALSE,FALSE
+100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,FALSE,FALSE,FALSE,FALSE
+100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,,,,
+100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,,,,
+100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,FALSE,FALSE,FALSE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index b4bc65af..cbf76b30 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-110001,202001,100,89,9244,R,,1.036787797,1.0,2.656680299,101.710317,0,4,4
-110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4
-110001,202003,100,89,6194,R,0.694706146,,0.968230653,1.0,70.26136364,3,0,3
-110002,202001,100,83,4826,R,,0.817550398,1.0,2.656680299,101.710317,0,4,4
-110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4
-110002,202003,100,83,4743,R,0.803489751,,0.968230653,1.0,70.26136364,3,0,3
-110003,202001,100,4,7586,R,,7.466535433,1.0,2.656680299,101.710317,0,4,4
-110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4
-110003,202003,100,4,1429,R,1.406496063,,0.968230653,1.0,70.26136364,3,0,3
-110004,202001,100,76,3975,R,,1.305847569,1.0,2.656680299,101.710317,0,4,4
-110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4
-110004,202003,100,76,2947.294109,FIR,,,0.968230653,1.0,70.26136364,3,0,3
-110005,202001,200,27,5217,R,,0.743586089,1.0,2.290844366,182.25,0,3,3
-110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4
-110005,202003,200,27,9940,R,1.416761688,,1.259780318,1.0,182.2366412,4,0,4
-110006,202001,200,42,5325,R,,0.68736285,1.0,2.290844366,182.25,0,3,3
-110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4
-110006,202003,200,42,6685,R,0.862914677,,1.259780318,1.0,182.2366412,4,0,4
-110007,202001,200,19,5496,R,,5.441584158,1.0,2.290844366,182.25,0,3,3
-110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4
-110007,202003,200,19,1235,R,1.222772277,,1.259780318,1.0,182.2366412,4,0,4
-110008,202001,200,43,8964.074003,BI,,,1.0,2.290844366,182.25,0,3,3
-110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4
-110008,202003,200,43,6013,R,1.53667263,,1.259780318,1.0,182.2366412,4,0,4
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,FALSE,FALSE,FALSE,FALSE
+110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,FALSE,FALSE,FALSE,FALSE
+110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,FALSE,FALSE,FALSE,FALSE
+110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,FALSE,FALSE,FALSE,FALSE
+110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,FALSE,FALSE,FALSE,FALSE
+110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,FALSE,FALSE,FALSE,FALSE
+110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,FALSE,FALSE,FALSE,FALSE
+110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,FALSE,FALSE,FALSE,FALSE
+110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,FALSE,FALSE,FALSE,FALSE
+110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,FALSE,FALSE,FALSE,FALSE
+110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,FALSE,FALSE,FALSE,FALSE
+110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,,,,
+110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,FALSE,FALSE,FALSE,FALSE
+110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,FALSE,FALSE,FALSE,FALSE
+110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,FALSE,FALSE,FALSE,FALSE
+110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,FALSE,FALSE,FALSE,FALSE
+110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,FALSE,FALSE,FALSE,FALSE
+110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,FALSE,FALSE,FALSE,FALSE
+110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,FALSE,FALSE,FALSE,FALSE
+110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,FALSE,FALSE,FALSE,FALSE
+110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,FALSE,FALSE,FALSE,FALSE
+110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,,,,
+110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,FALSE,FALSE,FALSE,FALSE
+110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,FALSE,FALSE,FALSE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index be126926..0720ee74 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-120001,202001,100,50,5240,R,,2.104417671,1.0,1.589860068,77.38738739,0,3,3
-120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3
-120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3
-120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3
-120001,202005,100,50,1316,R,0.294078212,,5.357333441,1.0,32.73423423,3,0,3
-120002,202001,100,78,7410,R,,2.05719045,1.0,1.589860068,77.38738739,0,3,3
-120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3
-120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3
-120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3
-120002,202005,100,78,1535,R,0.173681828,,5.357333441,1.0,32.73423423,3,0,3
-120003,202001,100,94,4530,R,,0.607972084,1.0,1.589860068,77.38738739,0,3,3
-120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3
-120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3
-120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3
-120003,202005,100,94,4416,R,15.60424028,,5.357333441,1.0,32.73423423,3,0,3
-120004,202001,100,100,7738.738739,C,,,1.0,1.589860068,77.38738739,0,3,3
-120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3
-120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3
-120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3
-120004,202005,100,100,47174.940224,FIC,,,5.357333441,1.0,32.73423423,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,FALSE,FALSE,FALSE,FALSE
+120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,FALSE,FALSE,FALSE,FALSE
+120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,FALSE,FALSE,FALSE,FALSE
+120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,FALSE,FALSE,FALSE,FALSE
+120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,FALSE,FALSE,FALSE,FALSE
+120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,FALSE,FALSE,FALSE,FALSE
+120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,FALSE,FALSE,FALSE,FALSE
+120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,FALSE,FALSE,FALSE,FALSE
+120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,FALSE,FALSE,FALSE,FALSE
+120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,FALSE,FALSE,FALSE,FALSE
+120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,FALSE,FALSE,FALSE,FALSE
+120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,FALSE,FALSE,FALSE,FALSE
+120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,FALSE,FALSE,FALSE,FALSE
+120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,FALSE,FALSE,FALSE,FALSE
+120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,FALSE,FALSE,FALSE,FALSE
+120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,,,,
+120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,,,,
+120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,,,,
+120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,,,,
+120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 346b1b1d..f6890457 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-130001,202001,100,20,6583,R,,1.751263634,1.0,0.885479533,102.7515152,0,3,4
-130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3
-130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3
-130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3
-130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3
-130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3
-130001,202007,100,20,3282,R,0.331649151,,0.913312467,1.0,158.7757576,3,0,4
-130002,202001,100,69,687,R,,0.076443752,1.0,0.885479533,102.7515152,0,3,4
-130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3
-130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3
-130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3
-130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3
-130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3
-130002,202007,100,69,9834,R,1.666497204,,0.913312467,1.0,158.7757576,3,0,4
-130003,202001,100,39,7113,R,,0.828731213,1.0,0.885479533,102.7515152,0,3,4
-130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3
-130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3
-130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3
-130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3
-130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3
-130003,202007,100,39,6461,R,0.741791045,,0.913312467,1.0,158.7757576,3,0,4
-130004,202001,100,37,2571,R,,,1.0,0.885479533,102.7515152,0,3,4
-130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3
-130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3
-130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3
-130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3
-130004,202007,100,37,6621,R,,,0.913312467,1.0,158.7757576,3,0,4
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,FALSE,FALSE,FALSE,FALSE
+130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,FALSE,FALSE,FALSE,FALSE
+130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,FALSE,FALSE,FALSE,FALSE
+130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,FALSE,FALSE,FALSE,FALSE
+130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,FALSE,FALSE,FALSE,FALSE
+130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,FALSE,FALSE,FALSE,FALSE
+130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,FALSE,FALSE,FALSE,FALSE
+130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,FALSE,FALSE,FALSE,FALSE
+130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,FALSE,FALSE,FALSE,FALSE
+130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,FALSE,FALSE,FALSE,FALSE
+130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,FALSE,FALSE,FALSE,FALSE
+130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,FALSE,FALSE,FALSE,FALSE
+130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,FALSE,FALSE,FALSE,FALSE
+130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,FALSE,FALSE,FALSE,FALSE
+130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,FALSE,FALSE,FALSE,FALSE
+130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,FALSE,FALSE,FALSE,FALSE
+130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,FALSE,FALSE,FALSE,FALSE
+130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,FALSE,FALSE,FALSE,FALSE
+130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,FALSE,FALSE,FALSE,FALSE
+130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,FALSE,FALSE,FALSE,FALSE
+130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,FALSE,FALSE,FALSE,FALSE
+130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,FALSE,FALSE,FALSE,FALSE
+130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,,,,
+130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,,,,
+130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,,,,
+130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,,,,
+130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,FALSE,FALSE,FALSE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 5ffa2976..35e907ec 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-140001,202001,100,27,3582,R,,0.790205162,1.0,0.534118956,47.13567839,0,3,3
-140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3
-140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3
-140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3
-140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3
-140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3
-140001,202007,100,27,9979,R,1.148331415,,0.520242185,1.0,91.63876652,3,0,4
-140002,202001,100,83,5359,R,,0.755746721,1.0,0.534118956,47.13567839,0,3,3
-140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3
-140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3
-140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3
-140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3
-140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3
-140002,202007,100,83,1052,R,0.156757562,,0.520242185,1.0,91.63876652,3,0,4
-140003,202001,100,89,439,R,,0.056404985,1.0,0.534118956,47.13567839,0,3,3
-140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3
-140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3
-140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3
-140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3
-140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3
-140003,202007,100,89,2528,R,0.255637577,,0.520242185,1.0,91.63876652,3,0,4
-140004,202001,100,28,1319.798995,C,,,1.0,0.534118956,47.13567839,0,3,3
-140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3
-140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3
-140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3
-140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3
-140004,202007,100,28,7243,R,,,0.520242185,1.0,91.63876652,3,0,4
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,FALSE,FALSE,FALSE,FALSE
+140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,FALSE,FALSE,FALSE,FALSE
+140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,FALSE,FALSE,FALSE,FALSE
+140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,FALSE,FALSE,FALSE,FALSE
+140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,FALSE,FALSE,FALSE,FALSE
+140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,FALSE,FALSE,FALSE,FALSE
+140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,FALSE,FALSE,FALSE,FALSE
+140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,FALSE,FALSE,FALSE,FALSE
+140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,FALSE,FALSE,FALSE,FALSE
+140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,FALSE,FALSE,FALSE,FALSE
+140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,FALSE,FALSE,FALSE,FALSE
+140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,FALSE,FALSE,FALSE,FALSE
+140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,FALSE,FALSE,FALSE,FALSE
+140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,FALSE,FALSE,FALSE,FALSE
+140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,FALSE,FALSE,FALSE,FALSE
+140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,FALSE,FALSE,FALSE,FALSE
+140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,FALSE,FALSE,FALSE,FALSE
+140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,FALSE,FALSE,FALSE,FALSE
+140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,FALSE,FALSE,FALSE,FALSE
+140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,FALSE,FALSE,FALSE,FALSE
+140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,FALSE,FALSE,FALSE,FALSE
+140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,,,,
+140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,,,,
+140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,,,,
+140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,,,,
+140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,,,,
+140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,FALSE,FALSE,FALSE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 7f53bb1f..13301135 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-150001,202001,100,15,5891,R,,1.285963763,1.0,0.917399451,181.0909091,0,3,3
-150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3
-150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4
-150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3
-150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.851190,3,3,4
-150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3
-150001,202007,100,15,9549,R,4.041049513,,2.111448113,1.0,152.5353535,3,0,3
-150002,202001,100,5,8611,R,,0.917723543,1.0,0.917399451,181.0909091,0,3,3
-150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3
-150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4
-150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3
-150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.851190,3,3,4
-150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3
-150002,202007,100,5,2593,R,1.861450108,,2.111448113,1.0,152.5353535,3,0,3
-150003,202001,100,79,3426,R,,0.548511047,1.0,0.917399451,181.0909091,0,3,3
-150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3
-150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4
-150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3
-150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.851190,3,3,4
-150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3
-150003,202007,100,79,2959,R,0.431844717,,2.111448113,1.0,152.5353535,3,0,3
-150004,202001,100,69,13547.818191,BI,,,1.0,0.917399451,181.0909091,0,3,3
-150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3
-150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4
-150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.851190,3,3,4
-150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3
-150004,202007,100,69,4483.444383,FIR,,,2.111448113,1.0,152.5353535,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,FALSE,FALSE,FALSE,FALSE
+150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,FALSE,FALSE,FALSE,FALSE
+150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,FALSE,FALSE,FALSE,FALSE
+150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,FALSE,FALSE,FALSE,FALSE
+150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,FALSE,FALSE,FALSE,FALSE
+150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,FALSE,FALSE,FALSE,FALSE
+150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,FALSE,FALSE,FALSE,FALSE
+150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,FALSE,FALSE,FALSE,FALSE
+150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,FALSE,FALSE,FALSE,FALSE
+150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,FALSE,FALSE,FALSE,FALSE
+150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,FALSE,FALSE,FALSE,FALSE
+150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,FALSE,FALSE,FALSE,FALSE
+150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,FALSE,FALSE,FALSE,FALSE
+150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,FALSE,FALSE,FALSE,FALSE
+150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,FALSE,FALSE,FALSE,FALSE
+150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,FALSE,FALSE,FALSE,FALSE
+150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,FALSE,FALSE,FALSE,FALSE
+150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,FALSE,FALSE,FALSE,FALSE
+150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,FALSE,FALSE,FALSE,FALSE
+150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,FALSE,FALSE,FALSE,FALSE
+150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,FALSE,FALSE,FALSE,FALSE
+150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,,,,
+150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,,
+150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,FALSE,FALSE,FALSE,FALSE
+150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,FALSE,FALSE,FALSE,FALSE
+150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,,,,
+150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_output.csv
index 0cc21d28..5856b971 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-160001,202001,100,76,2086,R,,0.502166586,1.0,0.352085676,29.78238342,0,3,3
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1.0,71.77202073,3,0,3
-160002,202001,100,32,430,R,,0.044472024,1.0,0.352085676,29.78238342,0,3,3
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1.0,71.77202073,3,0,3
-160003,202001,100,85,3232,R,,0.509618417,1.0,0.352085676,29.78238342,0,3,3
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1.0,71.77202073,3,0,3
-160004,202001,100,33,1356.031558,BI,,,1.0,0.352085676,29.78238342,0,3,3
-160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3
-160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4
-160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3
-160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3
-160004,202007,100,33,4636.49907,FIC,,,1.523164371,1.0,71.77202073,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,FALSE,FALSE,FALSE,FALSE
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,FALSE,FALSE,FALSE,FALSE
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,FALSE,FALSE,FALSE,FALSE
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,FALSE,FALSE,FALSE,FALSE
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,FALSE,FALSE,FALSE,FALSE
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,FALSE,FALSE,FALSE,FALSE
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,FALSE,FALSE,FALSE,FALSE
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,FALSE,FALSE,FALSE,FALSE
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,FALSE,FALSE,FALSE,FALSE
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,FALSE,FALSE,FALSE,FALSE
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,FALSE,FALSE,FALSE,FALSE
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,FALSE,FALSE,FALSE,FALSE
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,FALSE,FALSE,FALSE,FALSE
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,FALSE,FALSE,FALSE,FALSE
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,FALSE,FALSE,FALSE,FALSE
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,FALSE,FALSE,FALSE,FALSE
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,FALSE,FALSE,FALSE,FALSE
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,FALSE,FALSE,FALSE,FALSE
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,FALSE,FALSE,FALSE,FALSE
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,FALSE,FALSE,FALSE,FALSE
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,FALSE,FALSE,FALSE,FALSE
+160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,,,,
+160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,,,,
+160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,FALSE,FALSE,FALSE,FALSE
+160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,,,,
+160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,,,,
+160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index f8db5e58..598f959e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-160001,202001,100,76,2086,R,,0.502166586,1.0,0.514064257,24.45957447,0,4,4
-160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4
-160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4
-160001,202007,100,76,1666,R,0.292126951,,1.392373278,1.0,58.94468085,4,0,4
-160002,202001,100,32,430,R,,0.044472024,1.0,0.514064257,24.45957447,0,4,4
-160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4
-160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4
-160002,202007,100,32,2678,R,0.304110834,,1.392373278,1.0,58.94468085,4,0,4
-160003,202001,100,85,3232,R,,0.509618417,1.0,0.514064257,24.45957447,0,4,4
-160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4
-160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4
-160003,202007,100,85,9508,R,3.973255328,,1.392373278,1.0,58.94468085,4,0,4
-160004,202001,100,42,0,R,,1,1.0,0.514064257,24.45957447,0,4,4
-160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4
-160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5
-160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4
-160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4
-160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4
-160004,202007,100,42,0,R,1,,1.392373278,1.0,58.94468085,4,0,4
-160005,202001,100,33,1630.004567,BI,,,1.0,0.514064257,24.45957447,0,4,4
-160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4
-160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5
-160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4
-160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4
-160005,202007,100,33,3755.209925,FIC,,,1.392373278,1.0,58.94468085,4,0,4
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,FALSE,FALSE,FALSE,FALSE
+160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,FALSE,FALSE,FALSE,FALSE
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,FALSE,FALSE,FALSE,FALSE
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,FALSE,FALSE,FALSE,FALSE
+160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,FALSE,FALSE,FALSE,FALSE
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,FALSE,FALSE,FALSE,FALSE
+160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,FALSE,FALSE,FALSE,FALSE
+160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,FALSE,FALSE,FALSE,FALSE
+160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,FALSE,FALSE,FALSE,FALSE
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,FALSE,FALSE,FALSE,FALSE
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,FALSE,FALSE,FALSE,FALSE
+160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,FALSE,FALSE,FALSE,FALSE
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,FALSE,FALSE,FALSE,FALSE
+160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,FALSE,FALSE,FALSE,FALSE
+160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,FALSE,FALSE,FALSE,FALSE
+160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,FALSE,FALSE,FALSE,FALSE
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,FALSE,FALSE,FALSE,FALSE
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,FALSE,FALSE,FALSE,FALSE
+160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,FALSE,FALSE,FALSE,FALSE
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,FALSE,FALSE,FALSE,FALSE
+160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,FALSE,FALSE,FALSE,FALSE
+160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,FALSE,FALSE,FALSE,FALSE
+160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,FALSE,FALSE,FALSE,FALSE
+160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,FALSE,FALSE,FALSE,FALSE
+160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,FALSE,FALSE,FALSE,FALSE
+160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,FALSE,FALSE,FALSE,FALSE
+160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,FALSE,FALSE,FALSE,FALSE
+160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,FALSE,FALSE,FALSE,FALSE
+160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,,,,
+160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,,,,
+160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,FALSE,FALSE,FALSE,FALSE
+160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,,,,
+160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,,,,
+160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index 594cc2da..562f0edf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-160001,202001,100,76,2086,R,,0.502166586,1.0,0.352085676,24.45957447,0,3,4
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1.0,58.94468085,3,0,4
-160002,202001,100,32,430,R,,0.044472024,1.0,0.352085676,24.45957447,0,3,4
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1.0,58.94468085,3,0,4
-160003,202001,100,85,3232,R,,0.509618417,1.0,0.352085676,24.45957447,0,3,4
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1.0,58.94468085,3,0,4
-160004,202001,100,42,0,R,,,1.0,0.352085676,24.45957447,0,3,4
-160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4
-160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5
-160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4
-160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4
-160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4
-160004,202007,100,42,0,R,,,1.523164371,1.0,58.94468085,3,0,4
-160005,202001,100,33,1356.031558,BI,,,1.0,0.352085676,24.45957447,0,3,4
-160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4
-160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5
-160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4
-160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4
-160005,202007,100,33,3807.848173,FIC,,,1.523164371,1.0,58.94468085,3,0,4
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,FALSE,FALSE,FALSE,FALSE
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,FALSE,FALSE,FALSE,FALSE
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,FALSE,FALSE,FALSE,FALSE
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,FALSE,FALSE,FALSE,FALSE
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,FALSE,FALSE,FALSE,FALSE
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,FALSE,FALSE,FALSE,FALSE
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,FALSE,FALSE,FALSE,FALSE
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,FALSE,FALSE,FALSE,FALSE
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,FALSE,FALSE,FALSE,FALSE
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,FALSE,FALSE,FALSE,FALSE
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,FALSE,FALSE,FALSE,FALSE
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,FALSE,FALSE,FALSE,FALSE
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,FALSE,FALSE,FALSE,FALSE
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,FALSE,FALSE,FALSE,FALSE
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,FALSE,FALSE,FALSE,FALSE
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,FALSE,FALSE,FALSE,FALSE
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,FALSE,FALSE,FALSE,FALSE
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,FALSE,FALSE,FALSE,FALSE
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,FALSE,FALSE,FALSE,FALSE
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,FALSE,FALSE,FALSE,FALSE
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,FALSE,FALSE,FALSE,FALSE
+160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,FALSE,FALSE,FALSE,FALSE
+160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,FALSE,FALSE,FALSE,FALSE
+160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,FALSE,FALSE,FALSE,FALSE
+160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,FALSE,FALSE,FALSE,FALSE
+160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,FALSE,FALSE,FALSE,FALSE
+160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,FALSE,FALSE,FALSE,FALSE
+160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,FALSE,FALSE,FALSE,FALSE
+160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,,,,
+160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,,,,
+160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,FALSE,FALSE,FALSE,FALSE
+160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,,,,
+160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,,,,
+160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 45277645..29c78ffb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-170001,202001,100,69,6480,R,,0.653753027,1.0,0.341906136,41.93396226,0,3,3
-170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4
-170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3
-170001,202004,100,69,7120,R,11.80762852,,4.51938598,1.0,109.0330189,3,0,3
-170002,202001,100,62,449,R,,0.121614301,1.0,0.341906136,41.93396226,0,3,3
-170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4
-170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3
-170002,202004,100,62,6745,R,0.802880609,,4.51938598,1.0,109.0330189,3,0,3
-170003,202001,100,81,1961,R,,0.250351079,1.0,0.341906136,41.93396226,0,3,3
-170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4
-170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3
-170003,202004,100,81,9250,R,0.947648806,,4.51938598,1.0,109.0330189,3,0,3
-170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4
-170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,FALSE,FALSE,FALSE,FALSE
+170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,FALSE,FALSE,FALSE,FALSE
+170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,FALSE,FALSE,FALSE,FALSE
+170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,FALSE,FALSE,FALSE,FALSE
+170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,FALSE,FALSE,FALSE,FALSE
+170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,FALSE,FALSE,FALSE,FALSE
+170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,FALSE,FALSE,FALSE,FALSE
+170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,FALSE,FALSE,FALSE,FALSE
+170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,FALSE,FALSE,FALSE,FALSE
+170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,FALSE,FALSE,FALSE,FALSE
+170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,FALSE,FALSE,FALSE,FALSE
+170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,FALSE,FALSE,FALSE,FALSE
+170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,FALSE,FALSE,FALSE,FALSE
+170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 34a88e9a..b7e46ba3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-180001,202001,100,91,9188,R,,1.340726689,1.0,0.769734514,123.4632353,0,3,3
-180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3
-180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4
-180001,202004,100,91,9291,R,3.842431762,,2.151700748,1.0,175.5441176,3,0,3
-180002,202001,100,26,3829,R,,0.504612546,1.0,0.769734514,123.4632353,0,3,3
-180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3
-180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4
-180002,202004,100,26,8415,R,1.147239264,,2.151700748,1.0,175.5441176,3,0,3
-180003,202001,100,19,3774,R,,0.463864307,1.0,0.769734514,123.4632353,0,3,3
-180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3
-180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4
-180003,202004,100,19,6168,R,1.465431219,,2.151700748,1.0,175.5441176,3,0,3
-180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3
-180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,FALSE,FALSE,FALSE,FALSE
+180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,FALSE,FALSE,FALSE,FALSE
+180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,FALSE,FALSE,FALSE,FALSE
+180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,FALSE,FALSE,FALSE,FALSE
+180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,FALSE,FALSE,FALSE,FALSE
+180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,FALSE,FALSE,FALSE,FALSE
+180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,FALSE,FALSE,FALSE,FALSE
+180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,FALSE,FALSE,FALSE,FALSE
+180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,FALSE,FALSE,FALSE,FALSE
+180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,FALSE,FALSE,FALSE,FALSE
+180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,FALSE,FALSE,FALSE,FALSE
+180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,FALSE,FALSE,FALSE,FALSE
+180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,,,,
+180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,FALSE,FALSE,FALSE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index 230189a0..d691bc48 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-190001,202001,100,95,9261,R,,1.853682946,1.0,0.9214,50.3694,,,
-190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,,,
-190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,,,
-190001,202004,100,95,4350,R,2.939189189,,1.113,1.0,110.5473,,,
-190002,202001,100,17,2433,R,,0.562673451,1.0,0.9214,50.3694,,,
-190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,,,
-190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,,,
-190002,202004,100,17,700,R,11.26857143,,1.113,1.0,110.5473,,,
-190003,202001,100,64,7888,R,,1.870080607,1.0,0.9214,50.3694,,,
-190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,,,
-190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,,,
-190003,202004,100,64,4077,R,0.537083388,,1.113,1.0,110.5473,,,
-190004,202001,100,51,2247,R,,,1.0,0.9214,50.3694,,,
-190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,,,
-190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,,,
-190004,202004,100,51,8608,R,,,1.113,1.0,110.5473,,,
-190005,202001,100,34,6271.13538,BI,,,1.0,0.9214,50.3694,,,
-190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,,,
-190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,,,
-190005,202004,100,34,5134,R,1.152154399,,1.113,1.0,110.5473,,,
-190006,202001,100,8,402.9552,C,,,1.0,0.9214,50.3694,,,
-190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,,,
-190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,,,
-190006,202004,100,8,370.1196299,FIC,,,1.113,1.0,110.5473,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,,,,,,,
+190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,,,,,,,
+190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,,,,,,,
+190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,,,,,,,
+190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,,,,,,,
+190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,,,,,,,
+190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,,,,,,,
+190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,,,,,,,
+190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,,,,,,,
+190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,,,,,,,
+190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,,,,,,,
+190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,,,,,,,
+190004,202001,100,51,2247,R,,,1,0.9214,50.3694,,,,,,,
+190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,,,,,,,
+190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,,,,,,,
+190004,202004,100,51,8608,R,,,1.113,1,110.5473,,,,,,,
+190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,,,,,,,
+190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,,,,,,,
+190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,,,,,,,
+190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,,,,,,,
+190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,,,,,,,
+190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,,,,,,,
+190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,,,,,,,
+190006,202004,100,8,370.1196299,FIC,,,1.113,1,110.5473,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index 085269c9..53bd5d95 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-200001,202001,100,56,7788,R,,1.262441238,1.0,0.597514698,71.63436123,0,4,4
-200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4
-200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4
-200001,202004,100,56,1577,R,0.25617284,,0.276010255,1.0,42.68681319,4,0,4
-200002,202001,100,75,6533,R,,0.806244601,1.0,0.597514698,71.63436123,0,4,4
-200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4
-200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4
-200002,202004,100,75,2575,R,0.439419795,,0.276010255,1.0,42.68681319,4,0,4
-200003,202001,100,10,56,R,,0.011249498,1.0,0.597514698,71.63436123,0,4,4
-200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4
-200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4
-200003,202004,100,10,906,R,0.103224336,,0.276010255,1.0,42.68681319,4,0,4
-200004,202001,100,86,1884,R,,0.310123457,1.0,0.597514698,71.63436123,0,4,4
-200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4
-200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4
-200004,202004,100,86,1947.413826,FIR,,,0.276010255,1.0,42.68681319,4,0,4
-200005,202001,100,6,429.8061674,C,,,1.0,0.597514698,71.63436123,0,4,4
-200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4
-200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4
-200005,202004,100,6,3242.978608,FIC,,,0.276010255,1.0,42.68681319,4,0,4
-200006,202001,100,41,5222.283092,BI,,,1.0,0.597514698,71.63436123,0,4,4
-200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4
-200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4
-200006,202004,100,41,2711,R,0.305224049,,0.276010255,1.0,42.68681319,4,0,4
-200007,202001,200,4,2439,R,,0.252093023,1.0,2.163456777,132.3214286,0,3,4
-200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5
-200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4
-200007,202004,200,4,595,R,0.084963587,,0.197315737,1.0,99.37735849,3,0,3
-200008,202001,200,4,1849,R,,0.287290242,1.0,2.163456777,132.3214286,0,3,4
-200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5
-200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4
-200008,202004,200,4,2727,R,0.280873416,,0.197315737,1.0,99.37735849,3,0,3
-200009,202001,200,45,8742,R,,5.950987066,1.0,2.163456777,132.3214286,0,3,4
-200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5
-200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4
-200009,202004,200,45,1945,R,0.226110207,,0.197315737,1.0,99.37735849,3,0,3
-200010,202001,200,85,14038.671027,BI,,,1.0,2.163456777,132.3214286,0,3,4
-200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5
-200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4
-200010,202004,200,85,354.3790633,FIR,,,0.197315737,1.0,99.37735849,3,0,3
-200011,202001,200,79,4166.817753,BI,,,1.0,2.163456777,132.3214286,0,3,4
-200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5
-200011,202004,200,79,7850.811321,C,,,0.197315737,1.0,99.37735849,3,0,3
-200012,202001,200,87,5495,R,,,1.0,2.163456777,132.3214286,0,3,4
-200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5
-200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4
-200012,202004,200,87,5755.871742,FIR,,,0.197315737,1.0,99.37735849,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,FALSE,FALSE,FALSE,FALSE
+200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,FALSE,FALSE,FALSE,FALSE
+200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,FALSE,FALSE,FALSE,FALSE
+200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,FALSE,FALSE,FALSE,FALSE
+200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,FALSE,FALSE,FALSE,FALSE
+200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,FALSE,FALSE,FALSE,FALSE
+200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,FALSE,FALSE,FALSE,FALSE
+200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,FALSE,FALSE,FALSE,FALSE
+200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,FALSE,FALSE,FALSE,FALSE
+200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,FALSE,FALSE,FALSE,FALSE
+200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,FALSE,FALSE,FALSE,FALSE
+200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,FALSE,FALSE,FALSE,FALSE
+200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,FALSE,FALSE,FALSE,FALSE
+200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,FALSE,FALSE,FALSE,FALSE
+200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,
+200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,,,,
+200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,,,,
+200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,
+200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,
+200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,,,,
+200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,,,,
+200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,
+200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,FALSE,FALSE,FALSE,FALSE
+200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,FALSE,FALSE,FALSE,FALSE
+200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,FALSE,FALSE,FALSE,FALSE
+200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,FALSE,FALSE,FALSE,FALSE
+200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,FALSE,FALSE,FALSE,FALSE
+200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,FALSE,FALSE,FALSE,FALSE
+200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,FALSE,FALSE,FALSE,FALSE
+200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,FALSE,FALSE,FALSE,FALSE
+200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,FALSE,FALSE,FALSE,FALSE
+200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,FALSE,FALSE,FALSE,FALSE
+200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,FALSE,FALSE,FALSE,FALSE
+200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,FALSE,FALSE,FALSE,FALSE
+200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,FALSE,FALSE,FALSE,FALSE
+200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,FALSE,FALSE,FALSE,FALSE
+200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,,,,
+200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,FALSE,FALSE,FALSE,FALSE
+200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,FALSE,FALSE,FALSE,FALSE
+200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,
+200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,,,,
+200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,FALSE,FALSE,FALSE,FALSE
+200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,,,,
+200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,FALSE,FALSE,FALSE,FALSE
+200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,,,,
+200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,,,,
+200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index db2b0573..d0c8fa99 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-210001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,13.17948718,0,2,3
-210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
-210001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,2
-210002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,13.17948718,0,2,3
-210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
-210002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
-210003,202001,2,12,961,R,,3.599250936,1.0,2.241504449,72.19047619,0,2,2
-210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2
-210003,202003,2,12,314,R,1.176029963,,1.174002242,1.0,50,2,0,2
-210004,202001,2,9,555,R,,0.883757962,1.0,2.241504449,72.19047619,0,2,2
-210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2
-210004,202003,2,9,736,R,1.171974522,,1.174002242,1.0,50,2,0,2
-210005,202001,1,18,100,R,,,1.0,1.087985595,13.17948718,0,2,3
-210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2
-210005,202003,2,18,900.6274342,FIC,,,1.174002242,1.0,50,2,0,2
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
+210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
+210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
+210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
+210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
+210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
+210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
+210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
+210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,FALSE,FALSE,FALSE,FALSE
+210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
+210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
+210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,FALSE,FALSE,FALSE,FALSE
+210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
+210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,
+210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 79f0cf4a..ab9def81 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-220001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,15.46666667,0,2,2
-220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
-220001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,2
-220002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,15.46666667,0,2,2
-220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
-220002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
-220003,202001,2,12,961,R,,3.599250936,1.0,2.241504449,72.19047619,0,2,2
-220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2
-220003,202003,2,12,314,R,1.176029963,,1.174002242,1.0,29.48717949,2,0,3
-220004,202001,2,9,555,R,,0.883757962,1.0,2.241504449,72.19047619,0,2,2
-220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2
-220004,202003,2,9,736,R,1.171974522,,1.174002242,1.0,29.48717949,2,0,3
-220005,202001,1,18,278.4,C,,,1.0,1.087985595,15.46666667,0,2,2
-220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2
-220005,202003,2,18,100,R,,,1.174002242,1.0,29.48717949,2,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,FALSE,FALSE,FALSE,FALSE
+220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
+220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
+220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,FALSE,FALSE,FALSE,FALSE
+220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
+220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
+220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
+220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
+220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,FALSE,FALSE,FALSE,FALSE
+220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
+220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
+220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,FALSE,FALSE,FALSE,FALSE
+220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,,
+220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,
+220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,FALSE,FALSE,FALSE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index b133409d..3edb4230 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-230001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,15.46666667,0,2,2
-230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
-230001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,2
-230002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,15.46666667,0,2,2
-230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
-230002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
-230003,202001,2,12,961,R,,3.599250936,1.0,2.241504449,72.19047619,0,2,2
-230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2
-230003,202003,2,12,314,R,1.176029963,,1.174002242,1.0,50,2,0,2
-230004,202001,2,9,555,R,,0.883757962,1.0,2.241504449,72.19047619,0,2,2
-230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2
-230004,202003,2,9,736,R,1.171974522,,1.174002242,1.0,50,2,0,2
-230005,202001,1,18,278.4,C,,,1.0,1.087985595,15.46666667,0,2,2
-230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2
-230005,202003,2,18,900.627434,FIC,,,1.174002242,1.0,50,2,0,2
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,FALSE,FALSE,FALSE,FALSE
+230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
+230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
+230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,FALSE,FALSE,FALSE,FALSE
+230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
+230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
+230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
+230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
+230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,FALSE,FALSE,FALSE,FALSE
+230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
+230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
+230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,FALSE,FALSE,FALSE,FALSE
+230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,,
+230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,
+230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 74189c71..d99312d3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-240001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,13.17948718,0,2,3
-240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
-240001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,2
-240002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,13.17948718,0,2,3
-240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
-240002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
-240003,202001,2,12,961,R,,3.599250936,1.0,2.241504449,72.19047619,0,2,2
-240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2
-240003,202003,2,12,314,R,1.176029963,,1.174002242,1.0,30.76923077,2,0,3
-240004,202001,2,9,555,R,,0.883757962,1.0,2.241504449,72.19047619,0,2,2
-240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2
-240004,202003,2,9,736,R,1.171974522,,1.174002242,1.0,30.76923077,2,0,3
-240005,202001,1,18,100,R,,,1.0,1.087985595,13.17948718,0,2,3
-240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2
-240005,202003,2,18,150,R,,,1.174002242,1.0,30.76923077,2,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
+240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
+240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
+240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
+240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
+240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
+240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
+240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
+240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,FALSE,FALSE,FALSE,FALSE
+240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
+240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
+240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,FALSE,FALSE,FALSE,FALSE
+240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
+240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,
+240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,FALSE,FALSE,FALSE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index c3de706b..f0e64fdf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-250001,202001,1,10,547,R,,1.511049724,1.0,1.087985595,13.17948718,0,2,3
-250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2
-250001,202003,1,10,895,R,2.472375691,,1.42292432,1.0,18.48333333,2,0,2
-250002,202001,1,50,381,R,,0.664921466,1.0,1.087985595,13.17948718,0,2,3
-250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2
-250002,202003,1,50,214,R,0.373472949,,1.42292432,1.0,18.48333333,2,0,2
-250003,202001,2,12,961,R,,3.599250936,1.0,2.241504449,72.19047619,0,2,2
-250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3
-250003,202003,2,12,314,R,1.176029963,,1.040732678,1.0,33.07692308,3,0,3
-250004,202001,2,9,555,R,,0.883757962,1.0,2.241504449,72.19047619,0,2,2
-250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3
-250004,202003,2,9,736,R,1.171974522,,1.040732678,1.0,33.07692308,3,0,3
-250005,202001,1,18,100,R,,,1.0,1.087985595,13.17948718,0,2,3
-250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3
-250005,202003,2,18,240,R,0.774193548,,1.040732678,1.0,33.07692308,3,0,3
-250006,202001,1,22,289.9487179,C,,,1.0,1.087985595,13.17948718,0,2,3
-250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2
-250006,202003,1,22,446.7628274,FIC,,,1.42292432,1.0,18.48333333,2,0,2
-250007,202001,2,52,3753.904762,C,,,1.0,2.241504449,72.19047619,0,2,2
-250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3
-250007,202003,2,52,2753.065733,FIC,,,1.040732678,1.0,33.07692308,3,0,3
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
+250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
+250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
+250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
+250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
+250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
+250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
+250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
+250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,FALSE,FALSE,FALSE,FALSE
+250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,FALSE,FALSE,FALSE,FALSE
+250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
+250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,FALSE,FALSE,FALSE,FALSE
+250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,FALSE,FALSE,FALSE,FALSE
+250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
+250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,FALSE,FALSE,FALSE,FALSE
+250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,FALSE,FALSE,FALSE,FALSE
+250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,,,,
+250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,,,,
+250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,,,,
+250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,,,,
+250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,,,,
+250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,,,,
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 179d59c5..bc6343cd 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -5,7 +5,7 @@
 import pytest
 from chispa.dataframe_comparer import assert_df_equality
 from pyspark.sql.functions import bround, col
-from pyspark.sql.types import DecimalType, LongType, StringType
+from pyspark.sql.types import BooleanType, DecimalType, LongType, StringType
 
 from statistical_methods_library.imputation import impute, mean_of_ratios
 
@@ -25,6 +25,10 @@
 exclude_col = "exclude"
 forward_growth_col = "growth_forward"
 backward_growth_col = "growth_backward"
+filtered_forward_col = "filtered_forward"
+filtered_backward_col = "filtered_backward"
+trimmed_forward_col = "trimmed_forward"
+trimmed_backward_col = "trimmed_backward"
 
 decimal_type = DecimalType(15, 6)
 
@@ -44,6 +48,10 @@
 exclude_type = StringType()
 forward_growth_type = decimal_type
 backward_growth_type = decimal_type
+filtered_forward_type = BooleanType()
+filtered_backward_type = BooleanType()
+trimmed_forward_type = BooleanType()
+trimmed_backward_type = BooleanType()
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -64,6 +72,10 @@
     exclude_col,
     forward_growth_col,
     backward_growth_col,
+    filtered_forward_col,
+    filtered_backward_col,
+    trimmed_forward_col,
+    trimmed_backward_col,
 )
 
 dataframe_types = {
@@ -83,6 +95,10 @@
     exclude_col: exclude_type,
     forward_growth_col: forward_growth_type,
     backward_growth_col: backward_growth_type,
+    filtered_forward_col: filtered_forward_type,
+    filtered_backward_col: filtered_backward_type,
+    trimmed_forward_col: trimmed_forward_type,
+    trimmed_backward_col: trimmed_backward_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()

From ba225045c06d36e8eb987fcd0a84ff85322f2690 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 4 Apr 2023 14:07:03 +0100
Subject: [PATCH 184/531] Remove Headers. Not output when no calculations take
 place.

---
 .../19_link_columns_output.csv                | 50 +++++++++----------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index d691bc48..2d5f0e05 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,,,,,,,
-190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,,,,,,,
-190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,,,,,,,
-190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,,,,,,,
-190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,,,,,,,
-190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,,,,,,,
-190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,,,,,,,
-190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,,,,,,,
-190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,,,,,,,
-190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,,,,,,,
-190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,,,,,,,
-190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,,,,,,,
-190004,202001,100,51,2247,R,,,1,0.9214,50.3694,,,,,,,
-190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,,,,,,,
-190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,,,,,,,
-190004,202004,100,51,8608,R,,,1.113,1,110.5473,,,,,,,
-190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,,,,,,,
-190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,,,,,,,
-190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,,,,,,,
-190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,,,,,,,
-190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,,,,,,,
-190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,,,,,,,
-190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,,,,,,,
-190006,202004,100,8,370.1196299,FIC,,,1.113,1,110.5473,,,,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
+190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,,,
+190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,,,
+190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,,,
+190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,,,
+190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,,,
+190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,,,
+190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,,,
+190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,,,
+190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,,,
+190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,,,
+190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,,,
+190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,,,
+190004,202001,100,51,2247,R,,,1,0.9214,50.3694,,,
+190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,,,
+190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,,,
+190004,202004,100,51,8608,R,,,1.113,1,110.5473,,,
+190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,,,
+190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,,,
+190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,,,
+190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,,,
+190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,,,
+190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,,,
+190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,,,
+190006,202004,100,8,370.1196299,FIC,,,1.113,1,110.5473,,,

From 070d64ecbee0fe3bad91f2c9f637730c05d31e19 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 4 Apr 2023 14:22:22 +0100
Subject: [PATCH 185/531] Isort and Black reformat

---
 .../imputation/ratio_calculators.py                      | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 01d7414e..011b9055 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -5,7 +5,6 @@
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
-
 # Avoid shadowing builtin floor and ceil functions
 from pyspark.sql.functions import ceil as sql_ceil
 from pyspark.sql.functions import col, expr
@@ -215,8 +214,12 @@ def upper_bound(c, f):
             ) AS backward"""
         ),
         expr("sum(current_output)/sum(aux) AS construction"),
-        expr("sum(cast(NOT trimmed_forward AND growth_forward IS NOT NULL AS integer)) AS count_forward"),
-        expr("sum(cast(NOT trimmed_backward AND growth_backward IS NOT NULL AS integer)) AS count_backward"),
+        expr(
+            "sum(cast(NOT trimmed_forward AND growth_forward IS NOT NULL AS integer)) AS count_forward"
+        ),
+        expr(
+            "sum(cast(NOT trimmed_backward AND growth_backward IS NOT NULL AS integer)) AS count_backward"
+        ),
         expr("count(aux) AS count_construction"),
     )
 

From a46fbe0d74cde844a2aa19c7767fb808e4bca698 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 4 Apr 2023 14:30:48 +0100
Subject: [PATCH 186/531] Fix missing uses of Decimal and reformat for flake8

---
 .../imputation/ratio_calculators.py                  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 011b9055..825f7679 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -5,6 +5,7 @@
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
+
 # Avoid shadowing builtin floor and ceil functions
 from pyspark.sql.functions import ceil as sql_ceil
 from pyspark.sql.functions import col, expr
@@ -38,6 +39,9 @@ def mean_of_ratios(
     trimmed_backward_col: Optional[str] = "trimmed_backward",
     **_kwargs,
 ) -> List[RatioCalculationResult]:
+    lower_trim = Decimal(lower_trim)
+    upper_trim = Decimal(upper_trim)
+    trim_threshold = Decimal(trim_threshold)
     df = df.select(
         "period",
         "grouping",
@@ -215,10 +219,14 @@ def upper_bound(c, f):
         ),
         expr("sum(current_output)/sum(aux) AS construction"),
         expr(
-            "sum(cast(NOT trimmed_forward AND growth_forward IS NOT NULL AS integer)) AS count_forward"
+            """sum(cast(
+                NOT trimmed_forward AND growth_forward IS NOT NULL AS integer
+            )) AS count_forward"""
         ),
         expr(
-            "sum(cast(NOT trimmed_backward AND growth_backward IS NOT NULL AS integer)) AS count_backward"
+            """sum(cast(
+                NOT trimmed_backward AND growth_backward IS NOT NULL AS integer
+            )) AS count_backward"""
         ),
         expr("count(aux) AS count_construction"),
     )

From 580e7b2c83141a8518f94f1c7ad934b68432265a Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 4 Apr 2023 15:41:44 +0100
Subject: [PATCH 187/531] Fix usage of Decimal and reformat with Black

---
 .../imputation/ratio_calculators.py                       | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 825f7679..e7664774 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -39,9 +39,11 @@ def mean_of_ratios(
     trimmed_backward_col: Optional[str] = "trimmed_backward",
     **_kwargs,
 ) -> List[RatioCalculationResult]:
-    lower_trim = Decimal(lower_trim)
-    upper_trim = Decimal(upper_trim)
-    trim_threshold = Decimal(trim_threshold)
+    if lower_trim is not None:
+        lower_trim = Decimal(lower_trim)
+        upper_trim = Decimal(upper_trim)
+        trim_threshold = Decimal(trim_threshold)
+
     df = df.select(
         "period",
         "grouping",

From ca0011971e3b4d5a09578c0c8019d149ad6ccd08 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 4 Apr 2023 15:42:57 +0100
Subject: [PATCH 188/531] Run Isort

---
 statistical_methods_library/imputation/ratio_calculators.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index e7664774..42952d9e 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -5,7 +5,6 @@
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
-
 # Avoid shadowing builtin floor and ceil functions
 from pyspark.sql.functions import ceil as sql_ceil
 from pyspark.sql.functions import col, expr

From 9cda0cfc0353e6eabc9cedb806e5289d0d5ffbc1 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 4 Apr 2023 16:25:19 +0100
Subject: [PATCH 189/531] Remove Comment to remove conflict between isort and
 black

---
 statistical_methods_library/imputation/ratio_calculators.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 42952d9e..a69acec9 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -5,7 +5,6 @@
 from typing import Any, Callable, Dict, Iterable, List, Optional, Union
 
 from pyspark.sql import Column, DataFrame
-# Avoid shadowing builtin floor and ceil functions
 from pyspark.sql.functions import ceil as sql_ceil
 from pyspark.sql.functions import col, expr
 from pyspark.sql.functions import floor as sql_floor

From 0cc886c2d86a4d8e4e6141dbbe37c4bb3c832ab8 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 5 Apr 2023 12:18:11 +0100
Subject: [PATCH 190/531] Initial version of weighted link calculation

---
 .../imputation/engine.py                      | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index a8dd1323..27a563a5 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -5,6 +5,7 @@
 """
 
 from enum import Enum
+from numbers import Number
 from typing import Optional, Union
 
 from pyspark.sql import Column, DataFrame
@@ -58,6 +59,8 @@ def impute(
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
     periodicity: Optional[int] = 1,
+    weight: Optional[Number] = None,
+    weight_periodicity: Optional[int] = None,
     **ratio_calculator_params,
 ) -> DataFrame:
     additional_outputs = {}
@@ -66,6 +69,9 @@ def impute(
     if any(link_cols) and not all(link_cols):
         raise TypeError("Either all or no link columns must be specified")
 
+    if weight is not None:
+        weight = lit(Decimal(weight))
+
     input_params = {
         "ref": reference_col,
         "period": period_col,
@@ -305,6 +311,40 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         if all_fill_cols:
             df = df.fillna(1.0, all_fill_cols)
 
+        if weight is not None:
+
+            def calculate_weighted_link(link_name):
+                return (
+                    weight * col(f"curr.{link_name}")
+                    + (lit(Decimal(1)) - weight) * col(f"prev.{link_name}")
+                ).alias(link_name)
+
+            weighting_df = df.select(
+                "period", "ref", "forward", "backward", "construction"
+            )
+            curr_df = weighting_df.alias("curr")
+            prev_df = weighting_df.alias("prev")
+            df = (
+                curr_df.join(
+                    prev_df,
+                    (
+                        col("curr.ref")
+                        == col("prev.ref") & col("prev.period")
+                        == calculate_previous_period(
+                            col("curr.period"), weight_periodicity
+                        )
+                    ),
+                )
+                .select(
+                    expr("curr.period AS period"),
+                    expr("curr.ref AS ref"),
+                    calculate_weighted_link("forward"),
+                    calculate_weighted_link("backward"),
+                    calculate_weighted_link("construction"),
+                )
+                .join(df.drop("forward", "backward", "construction"), ["period", "ref"])
+            )
+
         return df
 
     # Caching for both imputed and unimputed data.

From a64ecfd4a3aa28033a1a06eeb8826ac01675eaf5 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 5 Apr 2023 12:57:23 +0100
Subject: [PATCH 191/531] Add case where previous link does not exist to
 weighted link calculation

---
 statistical_methods_library/imputation/engine.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 27a563a5..a94d848a 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -314,10 +314,16 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         if weight is not None:
 
             def calculate_weighted_link(link_name):
+                prev_link = col(f"prev.{link_name}")
+                curr_link = col(f"curr.{link_name}")
                 return (
-                    weight * col(f"curr.{link_name}")
-                    + (lit(Decimal(1)) - weight) * col(f"prev.{link_name}")
-                ).alias(link_name)
+                    when(
+                        prev_link.isNotNull(),
+                        weight * cur_link + (lit(Decimal(1)) - weight) * prev_link,
+                    )
+                    .otherwise(prev_link)
+                    .alias(link_name)
+                )
 
             weighting_df = df.select(
                 "period", "ref", "forward", "backward", "construction"

From 7cfd02a3aa114dc2a8f006f1de7c165f2210b56f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 5 Apr 2023 13:18:59 +0100
Subject: [PATCH 192/531] Add missing decimal import

---
 statistical_methods_library/imputation/engine.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index a94d848a..edac3497 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -3,7 +3,7 @@
 
 For Copyright information, please see LICENCE.
 """
-
+from decimal import Decimal
 from enum import Enum
 from numbers import Number
 from typing import Optional, Union
@@ -319,7 +319,7 @@ def calculate_weighted_link(link_name):
                 return (
                     when(
                         prev_link.isNotNull(),
-                        weight * cur_link + (lit(Decimal(1)) - weight) * prev_link,
+                        weight * curr_link + (lit(Decimal(1)) - weight) * prev_link,
                     )
                     .otherwise(prev_link)
                     .alias(link_name)

From 38744c44167cd5547756f02065e86feaeb9e283f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 12 Apr 2023 12:20:14 +0100
Subject: [PATCH 193/531] Remove unnecessary type checking of period columns in
 estimation and winsorisation

---
 docs/release-notes/11.0.2.md                  | 24 +++++++++++++++++++
 pyproject.toml                                |  2 +-
 .../estimation/ht_ratio.py                    |  1 -
 .../outliering/winsorisation.py               |  1 -
 4 files changed, 25 insertions(+), 3 deletions(-)
 create mode 100644 docs/release-notes/11.0.2.md

diff --git a/docs/release-notes/11.0.2.md b/docs/release-notes/11.0.2.md
new file mode 100644
index 00000000..036db43c
--- /dev/null
+++ b/docs/release-notes/11.0.2.md
@@ -0,0 +1,24 @@
+# Statistical Methods Library 11.0.2
+
+Release date: 2023-04-12
+
+## Synopsis
+
+Remove type validation for some period columns as they are only used for data grouping.
+
+## Changes
+
+In line with the changes in the previous release, the period columns in some
+methods are also only present for grouping purposes and thus checking their
+data types in the input schema is unnecessary. This release removes these
+checks.
+
+## Notes
+
+This change applies to the column referenced by the `period_col` parameter
+in the HT Ratio Estimation and Winsorisation methods. This column is still
+checked in Imputation since this method relies on the format of the period
+to perform calculations.
+
+This release does not have any impact on method outputs produced by existing
+code.
diff --git a/pyproject.toml b/pyproject.toml
index 657ab103..bd84e3b8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "11.0.1"
+version = "11.0.2"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index edeb0f31..563007c3 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -146,7 +146,6 @@ def estimate(
     input_params.update({k: v for k, v in optional_params.items() if v is not None})
 
     type_mapping = {
-        "period": StringType,
         "sample_marker": BooleanType,
         "adjustment_marker": StringType,
         "h_value": BooleanType,
diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index 8b627257..f98bda6a 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -115,7 +115,6 @@ def outlier(
     input_params.update({k: v for k, v in optional_params.items() if v is not None})
 
     type_mapping = {
-        "period": StringType,
         "target": DecimalType,
         "design": DecimalType,
         "l_value": DecimalType,

From 0a63a908c8d5437b793b34b6f650235d6ce0fea7 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 12 Apr 2023 12:40:37 +0100
Subject: [PATCH 194/531] Use an actually type checked column for estimation
 data type checking test

---
 tests/estimation/test_ht_ratio.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/estimation/test_ht_ratio.py b/tests/estimation/test_ht_ratio.py
index ec890d7c..77f73690 100644
--- a/tests/estimation/test_ht_ratio.py
+++ b/tests/estimation/test_ht_ratio.py
@@ -52,7 +52,7 @@
 }
 
 bad_dataframe_types = dataframe_types.copy()
-bad_dataframe_types[period_col] = decimal_type
+bad_dataframe_types[sample_marker_col] = decimal_type
 
 params = {
     "unique_identifier_col": unique_identifier_col,

From 01b67e47b806ab49b56bba2e4150e0d6221cde6c Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 12 Apr 2023 12:40:58 +0100
Subject: [PATCH 195/531] Use an actually type checked column for winsorisation
 data type checking test

---
 tests/outliering/test_winsorisation.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index 96001031..06f90026 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -50,7 +50,7 @@
 }
 
 bad_dataframe_types = dataframe_types.copy()
-bad_dataframe_types[period_col] = decimal_type
+bad_dataframe_types[target_col] = StringType()
 
 params = (
     reference_col,

From 94eef4ed6f11ea3ae176607519f4f0b91325aaf2 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 12 Apr 2023 12:41:33 +0100
Subject: [PATCH 196/531] Removed unused import

---
 statistical_methods_library/outliering/winsorisation.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index f98bda6a..b5ac4a9c 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -10,7 +10,7 @@
 
 from pyspark.sql import DataFrame
 from pyspark.sql.functions import col, expr, lit, when
-from pyspark.sql.types import DecimalType, StringType
+from pyspark.sql.types import DecimalType
 
 from statistical_methods_library.utilities import validation
 

From 2958434938041d453f6758dd794e472abc289007 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 12 Apr 2023 12:41:47 +0100
Subject: [PATCH 197/531] Update dependencies

---
 poetry.lock | 260 ++++++++++++++++++++++++----------------------------
 1 file changed, 120 insertions(+), 140 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index d4db3dfd..ade858c7 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,57 +1,38 @@
 # This file is automatically @generated by Poetry and should not be changed by hand.
 
-[[package]]
-name = "attrs"
-version = "22.2.0"
-description = "Classes Without Boilerplate"
-category = "dev"
-optional = false
-python-versions = ">=3.6"
-files = [
-    {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"},
-    {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"},
-]
-
-[package.extras]
-cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"]
-dev = ["attrs[docs,tests]"]
-docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"]
-tests = ["attrs[tests-no-zope]", "zope.interface"]
-tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"]
-
 [[package]]
 name = "black"
-version = "23.1.0"
+version = "23.3.0"
 description = "The uncompromising code formatter."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "black-23.1.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:b6a92a41ee34b883b359998f0c8e6eb8e99803aa8bf3123bf2b2e6fec505a221"},
-    {file = "black-23.1.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:57c18c5165c1dbe291d5306e53fb3988122890e57bd9b3dcb75f967f13411a26"},
-    {file = "black-23.1.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:9880d7d419bb7e709b37e28deb5e68a49227713b623c72b2b931028ea65f619b"},
-    {file = "black-23.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e6663f91b6feca5d06f2ccd49a10f254f9298cc1f7f49c46e498a0771b507104"},
-    {file = "black-23.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:9afd3f493666a0cd8f8df9a0200c6359ac53940cbde049dcb1a7eb6ee2dd7074"},
-    {file = "black-23.1.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:bfffba28dc52a58f04492181392ee380e95262af14ee01d4bc7bb1b1c6ca8d27"},
-    {file = "black-23.1.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:c1c476bc7b7d021321e7d93dc2cbd78ce103b84d5a4cf97ed535fbc0d6660648"},
-    {file = "black-23.1.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:382998821f58e5c8238d3166c492139573325287820963d2f7de4d518bd76958"},
-    {file = "black-23.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bf649fda611c8550ca9d7592b69f0637218c2369b7744694c5e4902873b2f3a"},
-    {file = "black-23.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:121ca7f10b4a01fd99951234abdbd97728e1240be89fde18480ffac16503d481"},
-    {file = "black-23.1.0-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:a8471939da5e824b891b25751955be52ee7f8a30a916d570a5ba8e0f2eb2ecad"},
-    {file = "black-23.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8178318cb74f98bc571eef19068f6ab5613b3e59d4f47771582f04e175570ed8"},
-    {file = "black-23.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:a436e7881d33acaf2536c46a454bb964a50eff59b21b51c6ccf5a40601fbef24"},
-    {file = "black-23.1.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:a59db0a2094d2259c554676403fa2fac3473ccf1354c1c63eccf7ae65aac8ab6"},
-    {file = "black-23.1.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:0052dba51dec07ed029ed61b18183942043e00008ec65d5028814afaab9a22fd"},
-    {file = "black-23.1.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:49f7b39e30f326a34b5c9a4213213a6b221d7ae9d58ec70df1c4a307cf2a1580"},
-    {file = "black-23.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:162e37d49e93bd6eb6f1afc3e17a3d23a823042530c37c3c42eeeaf026f38468"},
-    {file = "black-23.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b70eb40a78dfac24842458476135f9b99ab952dd3f2dab738c1881a9b38b753"},
-    {file = "black-23.1.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:a29650759a6a0944e7cca036674655c2f0f63806ddecc45ed40b7b8aa314b651"},
-    {file = "black-23.1.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:bb460c8561c8c1bec7824ecbc3ce085eb50005883a6203dcfb0122e95797ee06"},
-    {file = "black-23.1.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:c91dfc2c2a4e50df0026f88d2215e166616e0c80e86004d0003ece0488db2739"},
-    {file = "black-23.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a951cc83ab535d248c89f300eccbd625e80ab880fbcfb5ac8afb5f01a258ac9"},
-    {file = "black-23.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:0680d4380db3719ebcfb2613f34e86c8e6d15ffeabcf8ec59355c5e7b85bb555"},
-    {file = "black-23.1.0-py3-none-any.whl", hash = "sha256:7a0f701d314cfa0896b9001df70a530eb2472babb76086344e688829efd97d32"},
-    {file = "black-23.1.0.tar.gz", hash = "sha256:b0bd97bea8903f5a2ba7219257a44e3f1f9d00073d6cc1add68f0beec69692ac"},
+    {file = "black-23.3.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:0945e13506be58bf7db93ee5853243eb368ace1c08a24c65ce108986eac65915"},
+    {file = "black-23.3.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:67de8d0c209eb5b330cce2469503de11bca4085880d62f1628bd9972cc3366b9"},
+    {file = "black-23.3.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:7c3eb7cea23904399866c55826b31c1f55bbcd3890ce22ff70466b907b6775c2"},
+    {file = "black-23.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:32daa9783106c28815d05b724238e30718f34155653d4d6e125dc7daec8e260c"},
+    {file = "black-23.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:35d1381d7a22cc5b2be2f72c7dfdae4072a3336060635718cc7e1ede24221d6c"},
+    {file = "black-23.3.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:a8a968125d0a6a404842fa1bf0b349a568634f856aa08ffaff40ae0dfa52e7c6"},
+    {file = "black-23.3.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:c7ab5790333c448903c4b721b59c0d80b11fe5e9803d8703e84dcb8da56fec1b"},
+    {file = "black-23.3.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:a6f6886c9869d4daae2d1715ce34a19bbc4b95006d20ed785ca00fa03cba312d"},
+    {file = "black-23.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f3c333ea1dd6771b2d3777482429864f8e258899f6ff05826c3a4fcc5ce3f70"},
+    {file = "black-23.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:11c410f71b876f961d1de77b9699ad19f939094c3a677323f43d7a29855fe326"},
+    {file = "black-23.3.0-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:1d06691f1eb8de91cd1b322f21e3bfc9efe0c7ca1f0e1eb1db44ea367dff656b"},
+    {file = "black-23.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50cb33cac881766a5cd9913e10ff75b1e8eb71babf4c7104f2e9c52da1fb7de2"},
+    {file = "black-23.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:e114420bf26b90d4b9daa597351337762b63039752bdf72bf361364c1aa05925"},
+    {file = "black-23.3.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:48f9d345675bb7fbc3dd85821b12487e1b9a75242028adad0333ce36ed2a6d27"},
+    {file = "black-23.3.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:714290490c18fb0126baa0fca0a54ee795f7502b44177e1ce7624ba1c00f2331"},
+    {file = "black-23.3.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:064101748afa12ad2291c2b91c960be28b817c0c7eaa35bec09cc63aa56493c5"},
+    {file = "black-23.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:562bd3a70495facf56814293149e51aa1be9931567474993c7942ff7d3533961"},
+    {file = "black-23.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:e198cf27888ad6f4ff331ca1c48ffc038848ea9f031a3b40ba36aced7e22f2c8"},
+    {file = "black-23.3.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:3238f2aacf827d18d26db07524e44741233ae09a584273aa059066d644ca7b30"},
+    {file = "black-23.3.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:f0bd2f4a58d6666500542b26354978218a9babcdc972722f4bf90779524515f3"},
+    {file = "black-23.3.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:92c543f6854c28a3c7f39f4d9b7694f9a6eb9d3c5e2ece488c327b6e7ea9b266"},
+    {file = "black-23.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a150542a204124ed00683f0db1f5cf1c2aaaa9cc3495b7a3b5976fb136090ab"},
+    {file = "black-23.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:6b39abdfb402002b8a7d030ccc85cf5afff64ee90fa4c5aebc531e3ad0175ddb"},
+    {file = "black-23.3.0-py3-none-any.whl", hash = "sha256:ec751418022185b0c1bb7d7736e6933d40bbb14c14a0abcf9123d1b159f98dd4"},
+    {file = "black-23.3.0.tar.gz", hash = "sha256:1c7b8d606e728a41ea1ccbd7264677e494e87cf630e399262ced92d4a8dac940"},
 ]
 
 [package.dependencies]
@@ -112,63 +93,63 @@ files = [
 
 [[package]]
 name = "coverage"
-version = "7.0.5"
+version = "7.2.3"
 description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "coverage-7.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2a7f23bbaeb2a87f90f607730b45564076d870f1fb07b9318d0c21f36871932b"},
-    {file = "coverage-7.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c18d47f314b950dbf24a41787ced1474e01ca816011925976d90a88b27c22b89"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef14d75d86f104f03dea66c13188487151760ef25dd6b2dbd541885185f05f40"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66e50680e888840c0995f2ad766e726ce71ca682e3c5f4eee82272c7671d38a2"},
-    {file = "coverage-7.0.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9fed35ca8c6e946e877893bbac022e8563b94404a605af1d1e6accc7eb73289"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d8d04e755934195bdc1db45ba9e040b8d20d046d04d6d77e71b3b34a8cc002d0"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e109f1c9a3ece676597831874126555997c48f62bddbcace6ed17be3e372de8"},
-    {file = "coverage-7.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0a1890fca2962c4f1ad16551d660b46ea77291fba2cc21c024cd527b9d9c8809"},
-    {file = "coverage-7.0.5-cp310-cp310-win32.whl", hash = "sha256:be9fcf32c010da0ba40bf4ee01889d6c737658f4ddff160bd7eb9cac8f094b21"},
-    {file = "coverage-7.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:cbfcba14a3225b055a28b3199c3d81cd0ab37d2353ffd7f6fd64844cebab31ad"},
-    {file = "coverage-7.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30b5fec1d34cc932c1bc04017b538ce16bf84e239378b8f75220478645d11fca"},
-    {file = "coverage-7.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1caed2367b32cc80a2b7f58a9f46658218a19c6cfe5bc234021966dc3daa01f0"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d254666d29540a72d17cc0175746cfb03d5123db33e67d1020e42dae611dc196"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19245c249aa711d954623d94f23cc94c0fd65865661f20b7781210cb97c471c0"},
-    {file = "coverage-7.0.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b05ed4b35bf6ee790832f68932baf1f00caa32283d66cc4d455c9e9d115aafc"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:29de916ba1099ba2aab76aca101580006adfac5646de9b7c010a0f13867cba45"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e057e74e53db78122a3979f908973e171909a58ac20df05c33998d52e6d35757"},
-    {file = "coverage-7.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:411d4ff9d041be08fdfc02adf62e89c735b9468f6d8f6427f8a14b6bb0a85095"},
-    {file = "coverage-7.0.5-cp311-cp311-win32.whl", hash = "sha256:52ab14b9e09ce052237dfe12d6892dd39b0401690856bcfe75d5baba4bfe2831"},
-    {file = "coverage-7.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:1f66862d3a41674ebd8d1a7b6f5387fe5ce353f8719040a986551a545d7d83ea"},
-    {file = "coverage-7.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b69522b168a6b64edf0c33ba53eac491c0a8f5cc94fa4337f9c6f4c8f2f5296c"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436e103950d05b7d7f55e39beeb4d5be298ca3e119e0589c0227e6d0b01ee8c7"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8c56bec53d6e3154eaff6ea941226e7bd7cc0d99f9b3756c2520fc7a94e6d96"},
-    {file = "coverage-7.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a38362528a9115a4e276e65eeabf67dcfaf57698e17ae388599568a78dcb029"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f67472c09a0c7486e27f3275f617c964d25e35727af952869dd496b9b5b7f6a3"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:220e3fa77d14c8a507b2d951e463b57a1f7810a6443a26f9b7591ef39047b1b2"},
-    {file = "coverage-7.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ecb0f73954892f98611e183f50acdc9e21a4653f294dfbe079da73c6378a6f47"},
-    {file = "coverage-7.0.5-cp37-cp37m-win32.whl", hash = "sha256:d8f3e2e0a1d6777e58e834fd5a04657f66affa615dae61dd67c35d1568c38882"},
-    {file = "coverage-7.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9e662e6fc4f513b79da5d10a23edd2b87685815b337b1a30cd11307a6679148d"},
-    {file = "coverage-7.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:790e4433962c9f454e213b21b0fd4b42310ade9c077e8edcb5113db0818450cb"},
-    {file = "coverage-7.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49640bda9bda35b057b0e65b7c43ba706fa2335c9a9896652aebe0fa399e80e6"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d66187792bfe56f8c18ba986a0e4ae44856b1c645336bd2c776e3386da91e1dd"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:276f4cd0001cd83b00817c8db76730938b1ee40f4993b6a905f40a7278103b3a"},
-    {file = "coverage-7.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95304068686545aa368b35dfda1cdfbbdbe2f6fe43de4a2e9baa8ebd71be46e2"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:17e01dd8666c445025c29684d4aabf5a90dc6ef1ab25328aa52bedaa95b65ad7"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea76dbcad0b7b0deb265d8c36e0801abcddf6cc1395940a24e3595288b405ca0"},
-    {file = "coverage-7.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:50a6adc2be8edd7ee67d1abc3cd20678987c7b9d79cd265de55941e3d0d56499"},
-    {file = "coverage-7.0.5-cp38-cp38-win32.whl", hash = "sha256:e4ce984133b888cc3a46867c8b4372c7dee9cee300335e2925e197bcd45b9e16"},
-    {file = "coverage-7.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:4a950f83fd3f9bca23b77442f3a2b2ea4ac900944d8af9993743774c4fdc57af"},
-    {file = "coverage-7.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c2155943896ac78b9b0fd910fb381186d0c345911f5333ee46ac44c8f0e43ab"},
-    {file = "coverage-7.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:54f7e9705e14b2c9f6abdeb127c390f679f6dbe64ba732788d3015f7f76ef637"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ee30375b409d9a7ea0f30c50645d436b6f5dfee254edffd27e45a980ad2c7f4"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b78729038abea6a5df0d2708dce21e82073463b2d79d10884d7d591e0f385ded"},
-    {file = "coverage-7.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13250b1f0bd023e0c9f11838bdeb60214dd5b6aaf8e8d2f110c7e232a1bff83b"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c407b1950b2d2ffa091f4e225ca19a66a9bd81222f27c56bd12658fc5ca1209"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c76a3075e96b9c9ff00df8b5f7f560f5634dffd1658bafb79eb2682867e94f78"},
-    {file = "coverage-7.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f26648e1b3b03b6022b48a9b910d0ae209e2d51f50441db5dce5b530fad6d9b1"},
-    {file = "coverage-7.0.5-cp39-cp39-win32.whl", hash = "sha256:ba3027deb7abf02859aca49c865ece538aee56dcb4871b4cced23ba4d5088904"},
-    {file = "coverage-7.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:949844af60ee96a376aac1ded2a27e134b8c8d35cc006a52903fc06c24a3296f"},
-    {file = "coverage-7.0.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:b9727ac4f5cf2cbf87880a63870b5b9730a8ae3a4a360241a0fdaa2f71240ff0"},
-    {file = "coverage-7.0.5.tar.gz", hash = "sha256:051afcbd6d2ac39298d62d340f94dbb6a1f31de06dfaf6fcef7b759dd3860c45"},
+    {file = "coverage-7.2.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e58c0d41d336569d63d1b113bd573db8363bc4146f39444125b7f8060e4e04f5"},
+    {file = "coverage-7.2.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:344e714bd0fe921fc72d97404ebbdbf9127bac0ca1ff66d7b79efc143cf7c0c4"},
+    {file = "coverage-7.2.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:974bc90d6f6c1e59ceb1516ab00cf1cdfbb2e555795d49fa9571d611f449bcb2"},
+    {file = "coverage-7.2.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0743b0035d4b0e32bc1df5de70fba3059662ace5b9a2a86a9f894cfe66569013"},
+    {file = "coverage-7.2.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d0391fb4cfc171ce40437f67eb050a340fdbd0f9f49d6353a387f1b7f9dd4fa"},
+    {file = "coverage-7.2.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4a42e1eff0ca9a7cb7dc9ecda41dfc7cbc17cb1d02117214be0561bd1134772b"},
+    {file = "coverage-7.2.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:be19931a8dcbe6ab464f3339966856996b12a00f9fe53f346ab3be872d03e257"},
+    {file = "coverage-7.2.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:72fcae5bcac3333a4cf3b8f34eec99cea1187acd55af723bcbd559adfdcb5535"},
+    {file = "coverage-7.2.3-cp310-cp310-win32.whl", hash = "sha256:aeae2aa38395b18106e552833f2a50c27ea0000122bde421c31d11ed7e6f9c91"},
+    {file = "coverage-7.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:83957d349838a636e768251c7e9979e899a569794b44c3728eaebd11d848e58e"},
+    {file = "coverage-7.2.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dfd393094cd82ceb9b40df4c77976015a314b267d498268a076e940fe7be6b79"},
+    {file = "coverage-7.2.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:182eb9ac3f2b4874a1f41b78b87db20b66da6b9cdc32737fbbf4fea0c35b23fc"},
+    {file = "coverage-7.2.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bb1e77a9a311346294621be905ea8a2c30d3ad371fc15bb72e98bfcfae532df"},
+    {file = "coverage-7.2.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca0f34363e2634deffd390a0fef1aa99168ae9ed2af01af4a1f5865e362f8623"},
+    {file = "coverage-7.2.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55416d7385774285b6e2a5feca0af9652f7f444a4fa3d29d8ab052fafef9d00d"},
+    {file = "coverage-7.2.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:06ddd9c0249a0546997fdda5a30fbcb40f23926df0a874a60a8a185bc3a87d93"},
+    {file = "coverage-7.2.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:fff5aaa6becf2c6a1699ae6a39e2e6fb0672c2d42eca8eb0cafa91cf2e9bd312"},
+    {file = "coverage-7.2.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ea53151d87c52e98133eb8ac78f1206498c015849662ca8dc246255265d9c3c4"},
+    {file = "coverage-7.2.3-cp311-cp311-win32.whl", hash = "sha256:8f6c930fd70d91ddee53194e93029e3ef2aabe26725aa3c2753df057e296b925"},
+    {file = "coverage-7.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:fa546d66639d69aa967bf08156eb8c9d0cd6f6de84be9e8c9819f52ad499c910"},
+    {file = "coverage-7.2.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b2317d5ed777bf5a033e83d4f1389fd4ef045763141d8f10eb09a7035cee774c"},
+    {file = "coverage-7.2.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be9824c1c874b73b96288c6d3de793bf7f3a597770205068c6163ea1f326e8b9"},
+    {file = "coverage-7.2.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c3b2803e730dc2797a017335827e9da6da0e84c745ce0f552e66400abdfb9a1"},
+    {file = "coverage-7.2.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f69770f5ca1994cb32c38965e95f57504d3aea96b6c024624fdd5bb1aa494a1"},
+    {file = "coverage-7.2.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1127b16220f7bfb3f1049ed4a62d26d81970a723544e8252db0efde853268e21"},
+    {file = "coverage-7.2.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:aa784405f0c640940595fa0f14064d8e84aff0b0f762fa18393e2760a2cf5841"},
+    {file = "coverage-7.2.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3146b8e16fa60427e03884301bf8209221f5761ac754ee6b267642a2fd354c48"},
+    {file = "coverage-7.2.3-cp37-cp37m-win32.whl", hash = "sha256:1fd78b911aea9cec3b7e1e2622c8018d51c0d2bbcf8faaf53c2497eb114911c1"},
+    {file = "coverage-7.2.3-cp37-cp37m-win_amd64.whl", hash = "sha256:0f3736a5d34e091b0a611964c6262fd68ca4363df56185902528f0b75dbb9c1f"},
+    {file = "coverage-7.2.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:981b4df72c93e3bc04478153df516d385317628bd9c10be699c93c26ddcca8ab"},
+    {file = "coverage-7.2.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c0045f8f23a5fb30b2eb3b8a83664d8dc4fb58faddf8155d7109166adb9f2040"},
+    {file = "coverage-7.2.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f760073fcf8f3d6933178d67754f4f2d4e924e321f4bb0dcef0424ca0215eba1"},
+    {file = "coverage-7.2.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c86bd45d1659b1ae3d0ba1909326b03598affbc9ed71520e0ff8c31a993ad911"},
+    {file = "coverage-7.2.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:172db976ae6327ed4728e2507daf8a4de73c7cc89796483e0a9198fd2e47b462"},
+    {file = "coverage-7.2.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d2a3a6146fe9319926e1d477842ca2a63fe99af5ae690b1f5c11e6af074a6b5c"},
+    {file = "coverage-7.2.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f649dd53833b495c3ebd04d6eec58479454a1784987af8afb77540d6c1767abd"},
+    {file = "coverage-7.2.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7c4ed4e9f3b123aa403ab424430b426a1992e6f4c8fd3cb56ea520446e04d152"},
+    {file = "coverage-7.2.3-cp38-cp38-win32.whl", hash = "sha256:eb0edc3ce9760d2f21637766c3aa04822030e7451981ce569a1b3456b7053f22"},
+    {file = "coverage-7.2.3-cp38-cp38-win_amd64.whl", hash = "sha256:63cdeaac4ae85a179a8d6bc09b77b564c096250d759eed343a89d91bce8b6367"},
+    {file = "coverage-7.2.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:20d1a2a76bb4eb00e4d36b9699f9b7aba93271c9c29220ad4c6a9581a0320235"},
+    {file = "coverage-7.2.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ea748802cc0de4de92ef8244dd84ffd793bd2e7be784cd8394d557a3c751e21"},
+    {file = "coverage-7.2.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21b154aba06df42e4b96fc915512ab39595105f6c483991287021ed95776d934"},
+    {file = "coverage-7.2.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd214917cabdd6f673a29d708574e9fbdb892cb77eb426d0eae3490d95ca7859"},
+    {file = "coverage-7.2.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c2e58e45fe53fab81f85474e5d4d226eeab0f27b45aa062856c89389da2f0d9"},
+    {file = "coverage-7.2.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:87ecc7c9a1a9f912e306997ffee020297ccb5ea388421fe62a2a02747e4d5539"},
+    {file = "coverage-7.2.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:387065e420aed3c71b61af7e82c7b6bc1c592f7e3c7a66e9f78dd178699da4fe"},
+    {file = "coverage-7.2.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ea3f5bc91d7d457da7d48c7a732beaf79d0c8131df3ab278e6bba6297e23c6c4"},
+    {file = "coverage-7.2.3-cp39-cp39-win32.whl", hash = "sha256:ae7863a1d8db6a014b6f2ff9c1582ab1aad55a6d25bac19710a8df68921b6e30"},
+    {file = "coverage-7.2.3-cp39-cp39-win_amd64.whl", hash = "sha256:3f04becd4fcda03c0160d0da9c8f0c246bc78f2f7af0feea1ec0930e7c93fa4a"},
+    {file = "coverage-7.2.3-pp37.pp38.pp39-none-any.whl", hash = "sha256:965ee3e782c7892befc25575fa171b521d33798132692df428a09efacaffe8d0"},
+    {file = "coverage-7.2.3.tar.gz", hash = "sha256:d298c2815fa4891edd9abe5ad6e6cb4207104c7dd9fd13aea3fdebf6f9b91259"},
 ]
 
 [package.dependencies]
@@ -179,14 +160,14 @@ toml = ["tomli"]
 
 [[package]]
 name = "exceptiongroup"
-version = "1.1.0"
+version = "1.1.1"
 description = "Backport of PEP 654 (exception groups)"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"},
-    {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"},
+    {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"},
+    {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"},
 ]
 
 [package.extras]
@@ -232,31 +213,31 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517",
 
 [[package]]
 name = "iniconfig"
-version = "1.1.1"
-description = "iniconfig: brain-dead simple config-ini parsing"
+version = "2.0.0"
+description = "brain-dead simple config-ini parsing"
 category = "dev"
 optional = false
-python-versions = "*"
+python-versions = ">=3.7"
 files = [
-    {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
-    {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
+    {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"},
+    {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},
 ]
 
 [[package]]
 name = "isort"
-version = "5.11.4"
+version = "5.11.5"
 description = "A Python utility / library to sort Python imports."
 category = "dev"
 optional = false
 python-versions = ">=3.7.0"
 files = [
-    {file = "isort-5.11.4-py3-none-any.whl", hash = "sha256:c033fd0edb91000a7f09527fe5c75321878f98322a77ddcc81adbd83724afb7b"},
-    {file = "isort-5.11.4.tar.gz", hash = "sha256:6db30c5ded9815d813932c04c2f85a360bcdd35fed496f4d8f35495ef0a261b6"},
+    {file = "isort-5.11.5-py3-none-any.whl", hash = "sha256:ba1d72fb2595a01c7895a5128f9585a5cc4b6d395f1c8d514989b9a7eb2a8746"},
+    {file = "isort-5.11.5.tar.gz", hash = "sha256:6be1f76a507cb2ecf16c7cf14a37e41609ca082330be4e3436a18ef74add55db"},
 ]
 
 [package.extras]
 colors = ["colorama (>=0.4.3,<0.5.0)"]
-pipfile-deprecated-finder = ["pipreqs", "requirementslib"]
+pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"]
 plugins = ["setuptools"]
 requirements-deprecated-finder = ["pip-api", "pipreqs"]
 
@@ -274,58 +255,58 @@ files = [
 
 [[package]]
 name = "mypy-extensions"
-version = "0.4.3"
-description = "Experimental type system extensions for programs checked with the mypy typechecker."
+version = "1.0.0"
+description = "Type system extensions for programs checked with the mypy type checker."
 category = "dev"
 optional = false
-python-versions = "*"
+python-versions = ">=3.5"
 files = [
-    {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
-    {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
+    {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
+    {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
 ]
 
 [[package]]
 name = "packaging"
-version = "22.0"
+version = "23.0"
 description = "Core utilities for Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
-    {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
+    {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"},
+    {file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"},
 ]
 
 [[package]]
 name = "pathspec"
-version = "0.10.3"
+version = "0.11.1"
 description = "Utility library for gitignore style pattern matching of file paths."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
-    {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
+    {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"},
+    {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"},
 ]
 
 [[package]]
 name = "platformdirs"
-version = "2.6.2"
+version = "3.2.0"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"},
-    {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"},
+    {file = "platformdirs-3.2.0-py3-none-any.whl", hash = "sha256:ebe11c0d7a805086e99506aa331612429a72ca7cd52a1f0d277dc4adc20cb10e"},
+    {file = "platformdirs-3.2.0.tar.gz", hash = "sha256:d5b638ca397f25f979350ff789db335903d7ea010ab28903f57b27e1b16c2b08"},
 ]
 
 [package.dependencies]
-typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""}
+typing-extensions = {version = ">=4.5", markers = "python_version < \"3.8\""}
 
 [package.extras]
-docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"]
-test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"]
+docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"]
+test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"]
 
 [[package]]
 name = "pluggy"
@@ -403,18 +384,17 @@ sql = ["pandas (>=0.23.2)", "pyarrow (>=1.0.0)"]
 
 [[package]]
 name = "pytest"
-version = "7.2.1"
+version = "7.3.0"
 description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"},
-    {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"},
+    {file = "pytest-7.3.0-py3-none-any.whl", hash = "sha256:933051fa1bfbd38a21e73c3960cebdad4cf59483ddba7696c48509727e17f201"},
+    {file = "pytest-7.3.0.tar.gz", hash = "sha256:58ecc27ebf0ea643ebfdf7fb1249335da761a00c9f955bcd922349bcb68ee57d"},
 ]
 
 [package.dependencies]
-attrs = ">=19.2.0"
 colorama = {version = "*", markers = "sys_platform == \"win32\""}
 exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
 importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
@@ -424,7 +404,7 @@ pluggy = ">=0.12,<2.0"
 tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
 
 [package.extras]
-testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
+testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
 
 [[package]]
 name = "pytest-cov"
@@ -476,7 +456,7 @@ pytest = ">=3.0"
 "tap.py" = ">=3.0,<4.0"
 
 [[package]]
-name = "tap.py"
+name = "tap-py"
 version = "3.1"
 description = "Test Anything Protocol (TAP) tools"
 category = "dev"
@@ -538,31 +518,31 @@ files = [
 
 [[package]]
 name = "typing-extensions"
-version = "4.4.0"
+version = "4.5.0"
 description = "Backported and Experimental Type Hints for Python 3.7+"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"},
-    {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"},
+    {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"},
+    {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"},
 ]
 
 [[package]]
 name = "zipp"
-version = "3.11.0"
+version = "3.15.0"
 description = "Backport of pathlib-compatible object wrapper for zip files"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"},
-    {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"},
+    {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"},
+    {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"},
 ]
 
 [package.extras]
-docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
-testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
+docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"]
+testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
 
 [metadata]
 lock-version = "2.0"

From f5ea8c94f3142d4caefabb4af96888f4f3d43d2c Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Thu, 13 Apr 2023 12:48:58 +0100
Subject: [PATCH 198/531] More Test Data

3 test cases are not properly defined. Will need to remove some columns that are actually parameters.
---
 .../26_C_FI_FI_NS_BI_BI_R_filtered_input.csv  | 42 +++++++++++
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv | 42 +++++++++++
 .../27_BI_BI_R_NS_R_FI_FI_filtered_input.csv  | 42 +++++++++++
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv | 42 +++++++++++
 .../28_link_columns_filtered_input.csv        | 33 +++++++++
 .../28_link_columns_filtered_output.csv       | 33 +++++++++
 .../29_mixed_data_filtered_input.csv          | 64 ++++++++++++++++
 .../29_mixed_data_filtered_output.csv         | 64 ++++++++++++++++
 .../30_class_change_C_C_FI_filtered_input.csv | 28 +++++++
 ...30_class_change_C_C_FI_filtered_output.csv | 28 +++++++
 ...BI_R-R_FI_FI-C_FI_FI_no_response_input.csv | 22 ++++++
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv | 22 ++++++
 .../32_C_FI_FI_no_response_input.csv          | 16 ++++
 .../32_C_FI_FI_no_response_output.csv         | 16 ++++
 .../33_partial_link_columns_input.csv         | 25 +++++++
 .../33_partial_link_columns_output.csv        | 25 +++++++
 .../34_default_link_input.csv                 | 21 ++++++
 .../34_default_link_output.csv                | 21 ++++++
 .../35_TB_10_R_R_FI_input.csv                 | 37 ++++++++++
 .../35_TB_10_R_R_FI_output.csv                | 37 ++++++++++
 .../36_TB_10_BI_BI_R_input.csv                | 37 ++++++++++
 .../36_TB_10_BI_BI_R_output.csv               | 37 ++++++++++
 .../37_TB_10_C_FI_FI_input.csv                | 37 ++++++++++
 .../37_TB_10_C_FI_FI_output.csv               | 37 ++++++++++
 .../38_T_10_R_R_FI_input.csv                  | 37 ++++++++++
 .../38_T_10_R_R_FI_output.csv                 | 37 ++++++++++
 .../39_B_10_R_R_FI_input.csv                  | 37 ++++++++++
 .../39_B_10_R_R_FI_output.csv                 | 37 ++++++++++
 .../40_TB_10_R_R_FI_no_trim_input.csv         | 31 ++++++++
 .../40_TB_10_R_R_FI_no_trim_output.csv        | 31 ++++++++
 .../41_TB_10_R_R_FI_filtered_input.csv        | 37 ++++++++++
 .../41_TB_10_R_R_FI_filtered_output.csv       | 37 ++++++++++
 .../42_TB_10_R_R_FI-BI_R_R_input.csv          | 73 +++++++++++++++++++
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 73 +++++++++++++++++++
 .../43_TB_10_BI_BI_R_boundary_input.csv       | 64 ++++++++++++++++
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 64 ++++++++++++++++
 .../44_TB_5_BI_BI_R_boundary_input.csv        | 64 ++++++++++++++++
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 64 ++++++++++++++++
 .../45_TB_10_R_R_FI_partial_no_trim_input.csv | 35 +++++++++
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv | 35 +++++++++
 .../46_TB_10_BI_BI_R_filtered_input.csv       | 64 ++++++++++++++++
 .../46_TB_10_BI_BI_R_filtered_output.csv      | 64 ++++++++++++++++
 .../methodology_scenarios/47_TB_50_input.csv  | 37 ++++++++++
 .../methodology_scenarios/47_TB_50_output.csv | 37 ++++++++++
 .../48_TB_50_filtered_input.csv               | 37 ++++++++++
 .../48_TB_50_filtered_output.csv              | 37 ++++++++++
 .../49_TB_50_UNKNOWN_input.csv                | 37 ++++++++++
 .../49_TB_50_UNKNOWN_output.csv               | 37 ++++++++++
 .../50_R_R_FI_50_weight_input.csv             | 13 ++++
 .../50_R_R_FI_50_weight_output.csv            | 13 ++++
 .../51_R_R_FI_80_weight_input.csv             | 13 ++++
 .../51_R_R_FI_80_weight_output.csv            | 13 ++++
 .../52_BI_BI_R_50_weight_input.csv            | 13 ++++
 .../52_BI_BI_R_50_weight_output.csv           | 13 ++++
 .../53_C_FI_FI_50_weight_input.csv            | 13 ++++
 .../53_C_FI_FI_50_weight_output.csv           | 13 ++++
 .../54_R_R_FI-BI_R_R_50_weight_input.csv      | 25 +++++++
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     | 25 +++++++
 .../55_R_R_FI_50_weight_default_input.csv     | 13 ++++
 .../55_R_R_FI_50_weight_default_output.csv    | 13 ++++
 .../56_BI_BI_R_50_weight_default_input.csv    | 13 ++++
 .../56_BI_BI_R_50_weight_default_output.csv   | 13 ++++
 .../57_C_FI_FI_50_weight_default_input.csv    | 13 ++++
 .../57_C_FI_FI_50_weight_default_output.csv   | 13 ++++
 ...BI_R_R_50_weight_partial_default_input.csv | 25 +++++++
 ...I_R_R_50_weight_partial_default_output.csv | 25 +++++++
 .../59_class_change_input.csv                 | 16 ++++
 .../59_class_change_output.csv                | 16 ++++
 .../60_WHICH_CASE_7_input.csv                 | 29 ++++++++
 .../60_WHICH_CASE_7_output.csv                | 29 ++++++++
 ...R_R_FI-BI_R_R_50_weight_filtered_input.csv | 37 ++++++++++
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv | 37 ++++++++++
 .../62_CLARIFY_WITH_ELLIE_input.csv           | 22 ++++++
 .../62_CLARIFY_WITH_ELLIE_output.csv          | 22 ++++++
 ...63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv | 73 +++++++++++++++++++
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 73 +++++++++++++++++++
 .../64_TB_10_C_FI_FI_50_weight_input.csv      | 37 ++++++++++
 .../64_TB_10_C_FI_FI_50_weight_output.csv     | 37 ++++++++++
 ...TB_10_BI_BI_R_50_weight_filtered_input.csv | 64 ++++++++++++++++
 ...B_10_BI_BI_R_50_weight_filtered_output.csv | 64 ++++++++++++++++
 ..._weight_filtered_partial_default_input.csv | 37 ++++++++++
 ...weight_filtered_partial_default_output.csv | 37 ++++++++++
 ..._50_weight_filtered_full_default_input.csv | 37 ++++++++++
 ...50_weight_filtered_full_default_output.csv | 37 ++++++++++
 84 files changed, 2900 insertions(+)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_input.csv
new file mode 100644
index 00000000..aeb064ff
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_input.csv
@@ -0,0 +1,42 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn
+140001,202001,100,3582,27
+140001,202002,100,4533,27
+140001,202003,100,4471,27
+140001,202004,100,3040,27
+140001,202005,100,8519,27
+140001,202006,100,8690,27
+140001,202007,100,9979,27
+140002,202001,100,5359,83
+140002,202002,100,7091,83
+140002,202003,100,7098,83
+140002,202004,100,7408,83
+140002,202005,100,1937,83
+140002,202006,100,6711,83
+140002,202007,100,1052,83
+140003,202001,100,439,89
+140003,202002,100,7783,89
+140003,202003,100,897,89
+140003,202004,100,8477,89
+140003,202005,100,2207,89
+140003,202006,100,9889,89
+140003,202007,100,2528,89
+140004,202001,100,,28
+140004,202002,100,,28
+140004,202003,100,,28
+140004,202005,100,,28
+140004,202006,100,,28
+140004,202007,100,7243,28
+140005,202001,100,150000,85
+140005,202002,100,180000,85
+140005,202003,100,120000,85
+140005,202004,100,115000,85
+140005,202005,100,105000,85
+140005,202006,100,110000,85
+140005,202007,100,160000,85
+140006,202001,100,,71
+140006,202002,100,,71
+140006,202003,100,,71
+140006,202004,100,,71
+140006,202005,100,,71
+140006,202006,100,,71
+140006,202007,100,,71
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
new file mode 100644
index 00000000..53011984
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -0,0 +1,42 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,filter_mkr
+140001,202001,100,3582,27,,,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3,
+140001,202002,100,4533,27,,,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,
+140001,202003,100,4471,27,,,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,
+140001,202004,100,3040,27,,,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,
+140001,202005,100,8519,27,,,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,
+140001,202006,100,8690,27,,,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,
+140001,202007,100,9979,27,,,1.148331415,,0.520242185,,91.63876652,9979,R,3,,4,
+140002,202001,100,5359,83,,,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3,
+140002,202002,100,7091,83,,,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,
+140002,202003,100,7098,83,,,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,
+140002,202004,100,7408,83,,,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,
+140002,202005,100,1937,83,,,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,
+140002,202006,100,6711,83,,,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,
+140002,202007,100,1052,83,,,0.156757562,,0.520242185,,91.63876652,1052,R,3,,4,
+140003,202001,100,439,89,,,,0.056404985,,0.534118956,47.13567839,439,R,,3,3,
+140003,202002,100,7783,89,,,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,
+140003,202003,100,897,89,,,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,
+140003,202004,100,8477,89,,,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,
+140003,202005,100,2207,89,,,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,
+140003,202006,100,9889,89,,,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,
+140003,202007,100,2528,89,,,0.255637577,,0.520242185,,91.63876652,2528,R,3,,4,
+140004,202001,100,,28,,,,,,0.534118956,47.13567839,1319.798995,C,,3,3,
+140004,202002,100,,28,,,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,
+140004,202003,100,,28,,,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,
+140004,202005,100,,28,,,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3,
+140004,202006,100,,28,,,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3,
+140004,202007,100,7243,28,,,,,0.520242185,,91.63876652,7243,R,3,,4,
+140005,202001,100,150000,85,,,,,,0.534118956,47.13567839,150000,R,,3,3,TRUE
+140005,202002,100,180000,85,,,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,TRUE
+140005,202003,100,120000,85,,,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,TRUE
+140005,202004,100,115000,85,,,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,TRUE
+140005,202005,100,105000,85,,,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,TRUE
+140005,202006,100,110000,85,,,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,TRUE
+140005,202007,100,160000,85,,,,,0.520242185,,91.63876652,160000,R,3,,4,TRUE
+140006,202001,100,,71,,,,,,0.534118956,47.13567839,3346.633166,C,,3,3,
+140006,202002,100,,71,,,,,6.772539383,3.563193687,97.52261307,22665.20492,FIC,3,3,3,
+140006,202003,100,,71,,,,,0.700853626,0.84489759,62.64321608,15884.99105,FIC,3,3,3,
+140006,202004,100,,71,,,,,3.724667279,2.674093602,95.10050251,59166.30639,FIC,3,3,3,
+140006,202005,100,,71,,,,,1.108042751,0.497376695,63.63316583,65558.7969,FIC,3,3,3,
+140006,202006,100,,71,,,,,2.988483968,3.720631427,127.0854271,195921.4135,FIC,3,3,3,
+140006,202007,100,,71,,,,,0.520242185,,91.63876652,101926.5842,FIC,3,,4,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_input.csv
new file mode 100644
index 00000000..5bc4faa0
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_input.csv
@@ -0,0 +1,42 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn
+150001,202001,100,5891,15
+150001,202002,100,4581,15
+150001,202003,100,4741,15
+150001,202004,100,8092,15
+150001,202005,100,2727,15
+150001,202006,100,2363,15
+150001,202007,100,9549,15
+150002,202001,100,8611,5
+150002,202002,100,9383,5
+150002,202003,100,1064,5
+150002,202004,100,7419,5
+150002,202005,100,9967,5
+150002,202006,100,1393,5
+150002,202007,100,2593,5
+150003,202001,100,3426,79
+150003,202002,100,6246,79
+150003,202003,100,8402,79
+150003,202004,100,3891,79
+150003,202005,100,5463,79
+150003,202006,100,6852,79
+150003,202007,100,2959,79
+150004,202001,100,,69
+150004,202002,100,,69
+150004,202003,100,4208,69
+150004,202005,100,2818,69
+150004,202006,100,,69
+150004,202007,100,,69
+150005,202001,100,150000,85
+150005,202002,100,180000,85
+150005,202003,100,120000,85
+150005,202004,100,115000,85
+150006,202005,100,105000,85
+150006,202006,100,110000,85
+150006,202007,100,160000,85
+150007,202001,100,,71
+150007,202002,100,,71
+150007,202003,100,,71
+150007,202004,100,,71
+150007,202005,100,,71
+150007,202006,100,,71
+150007,202007,100,,71
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
new file mode 100644
index 00000000..fc5d20a1
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -0,0 +1,42 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,filter_mkr
+150001,202001,100,5891,15,,,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3,
+150001,202002,100,4581,15,,,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,
+150001,202003,100,4741,15,,,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,
+150001,202004,100,8092,15,,,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,
+150001,202005,100,2727,15,,,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,2727,R,3,3,4,
+150001,202006,100,2363,15,,,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,
+150001,202007,100,9549,15,,,4.041049513,,2.111448113,,152.5353535,9549,R,3,,3,
+150002,202001,100,8611,5,,,,0.917723543,,0.917399451,181.0909091,8611,R,,3,3,
+150002,202002,100,9383,5,,,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,
+150002,202003,100,1064,5,,,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,
+150002,202004,100,7419,5,,,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,
+150002,202005,100,9967,5,,,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,9967,R,3,3,4,
+150002,202006,100,1393,5,,,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,
+150002,202007,100,2593,5,,,1.861450108,,2.111448113,,152.5353535,2593,R,3,,3,
+150003,202001,100,3426,79,,,,0.548511047,,0.917399451,181.0909091,3426,R,,3,3,
+150003,202002,100,6246,79,,,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,
+150003,202003,100,8402,79,,,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,
+150003,202004,100,3891,79,,,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,
+150003,202005,100,5463,79,,,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,5463,R,3,3,4,
+150003,202006,100,6852,79,,,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,
+150003,202007,100,2959,79,,,0.431844717,,2.111448113,,152.5353535,2959,R,3,,3,
+150004,202001,100,,69,,,,,,0.917399451,181.0909091,13547.81819,BI,,3,3,
+150004,202002,100,,69,,,,,1.230132332,3.509418433,204.1414141,14767.63276,BI,3,3,3,
+150004,202003,100,4208,69,,,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,
+150004,202005,100,2818,69,,,,,1.028150423,3.035462652,124.8511905,2818,R,3,3,4,
+150004,202006,100,,69,,,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,
+150004,202007,100,,69,,,,,2.111448113,,152.5353535,4483.444383,FIR,3,,3,
+150005,202001,100,150000,85,,,,,,0.917399451,181.0909091,150000,R,,3,3,TRUE
+150005,202002,100,180000,85,,,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,TRUE
+150005,202003,100,120000,85,,,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,TRUE
+150005,202004,100,115000,85,,,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,TRUE
+150006,202005,100,105000,85,,,,,1.028150423,3.035462652,124.8511905,105000,R,3,3,4,TRUE
+150006,202006,100,110000,85,,,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,TRUE
+150006,202007,100,160000,85,,,,,2.111448113,,152.5353535,160000,R,3,,3,TRUE
+150007,202001,100,,71,,,,,,0.917399451,181.0909091,12857.45455,C,,3,3,
+150007,202002,100,,71,,,,,1.230132332,3.509418433,204.1414141,15816.37054,FIC,3,3,3,
+150007,202003,100,,71,,,,,0.831168119,0.962881641,109.6130952,13146.06295,FIC,3,3,4,
+150007,202004,100,,71,,,,,3.047553764,1.474655266,195.979798,40063.33364,FIC,3,3,3,
+150007,202005,100,,71,,,,,1.028150423,3.035462652,124.8511905,41191.13343,FIC,3,3,4,
+150007,202006,100,,71,,,,,0.753512367,1.033441075,107.1515152,31038.02845,FIC,3,3,3,
+150007,202007,100,,71,,,,,2.111448113,,152.5353535,65535.1866,FIC,3,,3,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
new file mode 100644
index 00000000..b1dddfc9
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
@@ -0,0 +1,33 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+190001,202001,100,9261,95,,
+190001,202002,100,4996,95,,
+190001,202003,100,1480,95,,
+190001,202004,100,4350,95,,
+190002,202001,100,2433,17,,
+190002,202002,100,4324,17,,
+190002,202003,100,6598,17,,
+190002,202004,100,700,17,,
+190003,202001,100,7888,64,,
+190003,202002,100,4218,64,,
+190003,202003,100,7591,64,,
+190003,202004,100,4077,64,,
+190004,202001,100,2247,51,,
+190004,202002,100,,51,,
+190004,202003,100,,51,,
+190004,202004,100,8608,51,,
+190005,202001,100,,34,,
+190005,202002,100,,34,,
+190005,202003,100,4456,34,,
+190005,202004,100,5134,34,,
+190006,202001,100,,8,,
+190006,202002,100,,8,,
+190006,202003,100,,8,,
+190006,202004,100,,8,,
+190007,202001,100,150000,85,,
+190007,202002,100,120000,85,,
+190007,202003,100,110000,85,,
+190007,202004,100,180000,85,,
+190008,202001,100,,71,,
+190008,202002,100,,71,,
+190008,202003,100,,71,,
+190008,202004,100,,71,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
new file mode 100644
index 00000000..02891913
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -0,0 +1,33 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,filter_mkr,calc_fi,calc_bi,calc_cons
+190001,202001,100,9261,95,,,,1.853682946,,0.9214,50.3694,9261,R,,,,,,1.428812335,96.16299559
+190001,202002,100,4996,95,,,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,,,,,0.86670161,1.528894599,76.92045455
+190001,202003,100,1480,95,,,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,,,,,0.733999278,3.123947916,95.83333333
+190001,202004,100,4350,95,,,2.939189189,,1.113,,110.5473,4350,R,,,,,3.974249601,,87.62068966
+190002,202001,100,2433,17,,,,0.562673451,,0.9214,50.3694,2433,R,,,,,,1.428812335,96.16299559
+190002,202002,100,4324,17,,,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,,,,,0.86670161,1.528894599,76.92045455
+190002,202003,100,6598,17,,,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,,,,,0.733999278,3.123947916,95.83333333
+190002,202004,100,700,17,,,11.26857143,,1.113,,110.5473,700,R,,,,,3.974249601,,87.62068966
+190003,202001,100,7888,64,,,,1.870080607,,0.9214,50.3694,7888,R,,,,,,1.428812335,96.16299559
+190003,202002,100,4218,64,,,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,,,,,0.86670161,1.528894599,76.92045455
+190003,202003,100,7591,64,,,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,,,,,0.733999278,3.123947916,95.83333333
+190003,202004,100,4077,64,,,0.537083388,,1.113,,110.5473,4077,R,,,,,3.974249601,,87.62068966
+190004,202001,100,2247,51,,,,,,0.9214,50.3694,2247,R,,,,,,1.428812335,96.16299559
+190004,202002,100,,51,,,,,0.8521,1.5274,121.4187,1914.6687,FIR,,,,,0.86670161,1.528894599,76.92045455
+190004,202003,100,,51,,,,,0.9685,1.8795,89.3761,1854.356636,FIR,,,,,0.733999278,3.123947916,95.83333333
+190004,202004,100,8608,51,,,,,1.113,,110.5473,8608,R,,,,,3.974249601,,87.62068966
+190005,202001,100,,34,,,,,,0.9214,50.3694,6271.13538,BI,,,,,,1.428812335,96.16299559
+190005,202002,100,,34,,,,,0.8521,1.5274,121.4187,6806.0944,BI,,,,,0.86670161,1.528894599,76.92045455
+190005,202003,100,4456,34,,,,0.867939229,0.9685,1.8795,89.3761,4456,R,,,,,0.733999278,3.123947916,95.83333333
+190005,202004,100,5134,34,,,1.152154399,,1.113,,110.5473,5134,R,,,,,3.974249601,,87.62068966
+190006,202001,100,,8,,,,,,0.9214,50.3694,402.9552,C,,,,,,1.428812335,96.16299559
+190006,202002,100,,8,,,,,0.8521,1.5274,121.4187,343.3581259,FIC,,,,,0.86670161,1.528894599,76.92045455
+190006,202003,100,,8,,,,,0.9685,1.8795,89.3761,332.542345,FIC,,,,,0.733999278,3.123947916,95.83333333
+190006,202004,100,,8,,,,,1.113,,110.5473,370.1196299,FIC,,,,,3.974249601,,87.62068966
+190007,202001,100,150000,85,,,,,,0.9214,50.3694,150000,R,,,,TRUE,,1.428812335,96.16299559
+190007,202002,100,120000,85,,,,,0.8521,1.5274,121.4187,120000,R,,,,TRUE,0.86670161,1.528894599,76.92045455
+190007,202003,100,110000,85,,,,,0.9685,1.8795,89.3761,110000,R,,,,TRUE,0.733999278,3.123947916,95.83333333
+190007,202004,100,180000,85,,,,,1.113,,110.5473,180000,R,,,,TRUE,3.974249601,,87.62068966
+190008,202001,100,,71,,,,,,0.9214,50.3694,3576.2274,C,,,,,,1.428812335,96.16299559
+190008,202002,100,,71,,,,,0.8521,1.5274,121.4187,3047.303368,FIC,,,,,0.86670161,1.528894599,76.92045455
+190008,202003,100,,71,,,,,0.9685,1.8795,89.3761,2951.313311,FIC,,,,,0.733999278,3.123947916,95.83333333
+190008,202004,100,,71,,,,,1.113,,110.5473,3284.811716,FIC,,,,,3.974249601,,87.62068966
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_input.csv
new file mode 100644
index 00000000..29e33a5f
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_input.csv
@@ -0,0 +1,64 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+200001,202001,100,7788,56,,
+200001,202002,100,6169,56,,
+200001,202003,100,6156,56,,
+200001,202004,100,1577,56,,
+200002,202001,100,6533,75,,
+200002,202002,100,8103,75,,
+200002,202003,100,5860,75,,
+200002,202004,100,2575,75,,
+200003,202001,100,56,10,,
+200003,202002,100,4978,10,,
+200003,202003,100,8777,10,,
+200003,202004,100,906,10,,
+200004,202001,100,1884,86,,
+200004,202002,100,6075,86,,
+200004,202003,100,,86,,
+200004,202004,100,,86,,
+200005,202001,100,,6,,
+200005,202002,100,,6,,
+200005,202003,100,,6,,
+200005,202004,100,,6,,
+200006,202001,100,,41,,
+200006,202002,100,,41,,
+200006,202003,100,8882,41,,
+200006,202004,100,2711,41,,
+200007,202001,200,2439,4,,
+200007,202002,200,9675,4,,
+200007,202003,200,7003,4,,
+200007,202004,200,595,4,,
+200008,202001,200,1849,4,,
+200008,202002,200,6436,4,,
+200008,202003,200,9709,4,,
+200008,202004,200,2727,4,,
+200009,202001,200,8742,45,,
+200009,202002,200,1469,45,,
+200009,202003,200,8602,45,,
+200009,202004,200,1945,45,,
+200010,202001,200,,85,,
+200010,202002,200,6489,85,,
+200010,202003,200,1796,85,,
+200010,202004,200,,85,,
+200011,202001,200,,79,,
+200011,202002,200,1926,79,,
+200011,202004,200,,79,,
+200012,202001,200,5495,87,,
+200012,202002,200,,87,,
+200012,202003,200,,87,,
+200012,202004,200,,87,,
+200013,202001,100,150000,85,,
+200013,202002,100,180000,85,,
+200013,202003,100,120000,85,,
+200013,202004,100,105000,85,,
+200014,202001,200,150000,96,,
+200014,202002,200,180000,96,,
+200014,202003,200,120000,96,,
+200014,202004,200,105000,96,,
+200015,202001,100,,71,,
+200015,202002,100,,71,,
+200015,202003,100,,71,,
+200015,202004,100,,71,,
+200016,202001,200,,48,,
+200016,202002,200,,48,,
+200016,202003,200,,48,,
+200016,202004,200,,48,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
new file mode 100644
index 00000000..2c47aa1e
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -0,0 +1,64 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,filter_mkr
+200001,202001,100,7788,56,,,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4,
+200001,202002,100,6169,56,,,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,
+200001,202003,100,6156,56,,,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,
+200001,202004,100,1577,56,,,0.25617284,,0.276010255,,42.68681319,1577,R,4,,4,
+200002,202001,100,6533,75,,,,0.806244601,,0.597514698,71.63436123,6533,R,,4,4,
+200002,202002,100,8103,75,,,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,
+200002,202003,100,5860,75,,,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,
+200002,202004,100,2575,75,,,0.439419795,,0.276010255,,42.68681319,2575,R,4,,4,
+200003,202001,100,56,10,,,,0.011249498,,0.597514698,71.63436123,56,R,,4,4,
+200003,202002,100,4978,10,,,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,
+200003,202003,100,8777,10,,,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,
+200003,202004,100,906,10,,,0.103224336,,0.276010255,,42.68681319,906,R,4,,4,
+200004,202001,100,1884,86,,,,0.310123457,,0.597514698,71.63436123,1884,R,,4,4,
+200004,202002,100,6075,86,,,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,
+200004,202003,100,,86,,,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,
+200004,202004,100,,86,,,,,0.276010255,,42.68681319,1947.413826,FIR,4,,4,
+200005,202001,100,,6,,,,,,0.597514698,71.63436123,429.8061674,C,,4,4,
+200005,202002,100,,6,,,,,23.53745347,0.984013482,111.5638767,10116.54267,FIC,4,3,4,
+200005,202003,100,,6,,,,,1.161413175,4.785815599,163.0494505,11749.48594,FIC,3,4,4,
+200005,202004,100,,6,,,,,0.276010255,,42.68681319,3242.978611,FIC,4,,4,
+200006,202001,100,,41,,,,,,0.597514698,71.63436123,8740.605259,BI,,4,4,
+200006,202002,100,,41,,,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,
+200006,202003,100,8882,41,,,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,
+200006,202004,100,2711,41,,,0.305224049,,0.276010255,,42.68681319,2711,R,4,,4,
+200007,202001,200,2439,4,,,,0.252093023,,2.163456777,132.3214286,2439,R,,3,4,
+200007,202002,200,9675,4,,,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,
+200007,202003,200,7003,4,,,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,
+200007,202004,200,595,4,,,0.084963587,,0.197315737,,99.37735849,595,R,3,,3,
+200008,202001,200,1849,4,,,,0.287290242,,2.163456777,132.3214286,1849,R,,3,4,
+200008,202002,200,6436,4,,,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,
+200008,202003,200,9709,4,,,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,
+200008,202004,200,2727,4,,,0.280873416,,0.197315737,,99.37735849,2727,R,3,,3,
+200009,202001,200,8742,45,,,,5.950987066,,2.163456777,132.3214286,8742,R,,3,4,
+200009,202002,200,1469,45,,,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,
+200009,202003,200,8602,45,,,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,
+200009,202004,200,1945,45,,,0.226110207,,0.197315737,,99.37735849,1945,R,3,,3,
+200010,202001,200,,85,,,,,,2.163456777,132.3214286,14038.67103,BI,,3,4,
+200010,202002,200,6489,85,,,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,
+200010,202003,200,1796,85,,,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,
+200010,202004,200,,85,,,,,0.197315737,,99.37735849,354.3790633,FIR,3,,3,
+200011,202001,200,,79,,,,,,2.163456777,132.3214286,4166.817753,BI,,3,4,
+200011,202002,200,1926,79,,,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,
+200011,202004,200,,79,,,,,0.197315737,,99.37735849,7850.811321,C,3,,3,
+200012,202001,200,5495,87,,,,,,2.163456777,132.3214286,5495,R,,3,4,
+200012,202002,200,,87,,,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5,
+200012,202003,200,,87,,,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4,
+200012,202004,200,,87,,,,,0.197315737,,99.37735849,5755.871742,FIR,3,,3,
+200013,202001,100,150000,85,,,,,,0.597514698,71.63436123,150000,R,,4,4,TRUE
+200013,202002,100,180000,85,,,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,TRUE
+200013,202003,100,120000,85,,,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,TRUE
+200013,202004,100,105000,85,,,,,0.276010255,,42.68681319,105000,R,4,,4,TRUE
+200014,202001,200,150000,96,,,,,,2.163456777,132.3214286,150000,R,,3,4,TRUE
+200014,202002,200,180000,96,,,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,TRUE
+200014,202003,200,120000,96,,,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,TRUE
+200014,202004,200,105000,96,,,,,0.197315737,,99.37735849,105000,R,3,,3,TRUE
+200015,202001,100,,71,,,,,,0.597514698,71.63436123,5086.039647,C,,4,4,
+200015,202002,100,,71,,,,,23.53745347,0.984013482,111.5638767,119712.4215,FIC,4,3,4,
+200015,202003,100,,71,,,,,1.161413175,4.785815599,163.0494505,139035.5836,FIC,3,4,4,
+200015,202004,100,,71,,,,,0.276010255,,42.68681319,38375.24688,FIC,4,,4,
+200016,202001,200,,48,,,,,,2.163456777,132.3214286,6351.428573,C,,3,4,
+200016,202002,200,,48,,,,,2.53854315,1.457061014,119.7926267,16123.3755,FIC,3,4,5,
+200016,202003,200,,48,,,,,2.091207548,6.584230902,196.4492754,33717.32454,FIC,4,3,4,
+200016,202004,200,,48,,,,,0.197315737,,99.37735849,6652.958741,FIC,3,,3,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_input.csv
new file mode 100644
index 00000000..01ba81ae
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_input.csv
@@ -0,0 +1,28 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+230001,202001,1,547,10,,
+230001,202002,1,362,10,,
+230001,202003,1,895,10,,
+230002,202001,1,381,50,,
+230002,202002,1,573,50,,
+230002,202003,1,214,50,,
+230003,202001,2,961,12,,
+230003,202002,2,267,12,,
+230003,202003,2,314,12,,
+230004,202001,2,555,9,,
+230004,202002,2,628,9,,
+230004,202003,2,736,9,,
+230005,202001,1,,18,,
+230005,202002,2,,18,,
+230005,202003,2,,18,,
+230006,202001,1,150000,85,,
+230006,202002,1,180000,85,,
+230006,202003,1,120000,85,,
+230007,202001,1,,71,,
+230007,202002,1,,71,,
+230007,202003,1,,71,,
+230008,202001,2,150000,85,,
+230008,202002,2,180000,85,,
+230008,202003,2,120000,85,,
+230009,202001,2,,71,,
+230009,202002,2,,71,,
+230009,202003,2,,71,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
new file mode 100644
index 00000000..9388ff02
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -0,0 +1,28 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,filter_mkr
+230001,202001,1,547,10,,,,1.511049724,,1.087985595,15.46666667,547,R,,2,2,
+230001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,
+230001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2,
+230002,202001,1,381,50,,,,0.664921466,,1.087985595,15.46666667,381,R,,2,2,
+230002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,
+230002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2,
+230003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2,
+230003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,
+230003,202003,2,314,12,,,1.176029963,,1.174002242,,50,314,R,2,,2,
+230004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2,
+230004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,
+230004,202003,2,736,9,,,1.171974522,,1.174002242,,50,736,R,2,,2,
+230005,202001,1,,18,,,,,,1.087985595,15.46666667,278.4,C,,2,2,
+230005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,
+230005,202003,2,,18,,,,,1.174002242,,50,900.6274345,FIC,2,,2,
+230006,202001,1,150000,85,,,,,,1.087985595,15.46666667,150000,R,,2,2,TRUE
+230006,202002,1,180000,85,,,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,TRUE
+230006,202003,1,120000,85,,,,,1.42292432,,18.48333333,120000,R,2,,2,TRUE
+230007,202001,1,,71,,,,,,1.087985595,15.46666667,1098.133334,C,,2,2,
+230007,202002,1,,71,,,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,
+230007,202003,1,,71,,,,,1.42292432,,18.48333333,1692.041118,FIC,2,,2,
+230008,202001,2,150000,85,,,,,,2.241504449,72.19047619,150000,R,,2,2,TRUE
+230008,202002,2,180000,85,,,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,TRUE
+230008,202003,2,120000,85,,,,,1.174002242,,50,120000,R,2,,2,TRUE
+230009,202001,2,,71,,,,,,2.241504449,72.19047619,5125.523809,C,,2,2,
+230009,202002,2,,71,,,,,0.70468356,0.85178967,42.61904762,3611.872365,FIC,2,2,2,
+230009,202003,2,,71,,,,,1.174002242,,50,4240.346254,FIC,2,,2,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_input.csv
new file mode 100644
index 00000000..8127580d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_input.csv
@@ -0,0 +1,22 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+110001,202001,100,9244,89,,
+110001,202002,100,8916,89,,
+110001,202003,100,6194,89,,
+110002,202001,100,4826,83,,
+110002,202002,100,5903,83,,
+110002,202003,100,4743,83,,
+110003,202001,100,7586,4,,
+110003,202002,100,1016,4,,
+110003,202003,100,1429,4,,
+110004,202001,100,3975,76,,
+110004,202002,100,3044,76,,
+110004,202003,100,,76,,
+110005,202001,200,,27,,
+110005,202002,200,,27,,
+110005,202003,200,9940,27,,
+110006,202001,200,5325,42,,
+110006,202002,200,,42,,
+110006,202003,200,,42,,
+110007,202001,200,,19,,
+110007,202002,200,,19,,
+110007,202003,200,,19,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
new file mode 100644
index 00000000..fc42dd90
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -0,0 +1,22 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+110001,202001,100,9244,89,,,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
+110001,202002,100,8916,89,,,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
+110001,202003,100,6194,89,,,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
+110002,202001,100,4826,83,,,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
+110002,202002,100,5903,83,,,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
+110002,202003,100,4743,83,,,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
+110003,202001,100,7586,4,,,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
+110003,202002,100,1016,4,,,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
+110003,202003,100,1429,4,,,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
+110004,202001,100,3975,76,,,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
+110004,202002,100,3044,76,,,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
+110004,202003,100,,76,,,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
+110005,202001,200,,27,,,,,,1,1,9940,BI,,0,0
+110005,202002,200,,27,,,,,1,1,1,9940,BI,0,0,0
+110005,202003,200,9940,27,,,,,1,,368.1481481,9940,R,0,,1
+110006,202001,200,5325,42,,,,,,1,126.7857143,5325,R,,0,1
+110006,202002,200,,42,,,,,1,1,1,5325,FIR,0,0,0
+110006,202003,200,,42,,,,,1,,368.1481481,5325,FIR,0,,1
+110007,202001,200,,19,,,,,,1,126.7857143,2408.928571,C,,0,1
+110007,202002,200,,19,,,,,1,1,1,2408.928571,FIC,0,0,0
+110007,202003,200,,19,,,,,1,,368.1481481,2408.928571,FIC,0,,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_input.csv
new file mode 100644
index 00000000..71916545
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_input.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+110001,202001,100,9244,89,,
+110001,202002,100,8916,89,,
+110001,202003,100,6194,89,,
+110002,202001,100,4826,83,,
+110002,202002,100,5903,83,,
+110002,202003,100,4743,83,,
+110003,202001,100,7586,4,,
+110003,202002,100,1016,4,,
+110003,202003,100,1429,4,,
+110004,202001,100,3975,76,,
+110004,202002,100,3044,76,,
+110004,202003,100,,76,,
+110005,202001,200,,27,,
+110005,202002,200,,27,,
+110005,202003,200,,27,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
new file mode 100644
index 00000000..b1aa4904
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+110001,202001,100,9244,89,,,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
+110001,202002,100,8916,89,,,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
+110001,202003,100,6194,89,,,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
+110002,202001,100,4826,83,,,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
+110002,202002,100,5903,83,,,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
+110002,202003,100,4743,83,,,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
+110003,202001,100,7586,4,,,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
+110003,202002,100,1016,4,,,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
+110003,202003,100,1429,4,,,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
+110004,202001,100,3975,76,,,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
+110004,202002,100,3044,76,,,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
+110004,202003,100,,76,,,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
+110005,202001,200,,27,,,,,,1,1,27,C,,0,0
+110005,202002,200,,27,,,,,1,1,1,27,FIC,0,0,0
+110005,202003,200,,27,,,,,1,,1,27,FIC,0,,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv
new file mode 100644
index 00000000..83aa5321
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_link,bi_link
+190001,202001,100,9261,95,,,,0.9214
+190001,202002,100,4996,95,,,0.8521,1.5274
+190001,202003,100,1480,95,,,0.9685,1.8795
+190001,202004,100,4350,95,,,1.113,
+190002,202001,100,2433,17,,,,0.9214
+190002,202002,100,4324,17,,,0.8521,1.5274
+190002,202003,100,6598,17,,,0.9685,1.8795
+190002,202004,100,700,17,,,1.113,
+190003,202001,100,7888,64,,,,0.9214
+190003,202002,100,4218,64,,,0.8521,1.5274
+190003,202003,100,7591,64,,,0.9685,1.8795
+190003,202004,100,4077,64,,,1.113,
+190004,202001,100,2247,51,,,,0.9214
+190004,202002,100,,51,,,0.8521,1.5274
+190004,202003,100,,51,,,0.9685,1.8795
+190004,202004,100,8608,51,,,1.113,
+190005,202001,100,,34,,,,0.9214
+190005,202002,100,,34,,,0.8521,1.5274
+190005,202003,100,4456,34,,,0.9685,1.8795
+190005,202004,100,5134,34,,,1.113,
+190006,202001,100,,8,,,,0.9214
+190006,202002,100,,8,,,0.8521,1.5274
+190006,202003,100,,8,,,0.9685,1.8795
+190006,202004,100,,8,,,1.113,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
new file mode 100644
index 00000000..6a25d27e
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,calc_fi,calc_bi
+190001,202001,100,9261,95,,,,1.853682946,,0.9214,96.16299559,9261,R,,,4,,1.428812335
+190001,202002,100,4996,95,,,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,,,3,0.86670161,1.528894599
+190001,202003,100,1480,95,,,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,,,4,0.733999278,3.123947916
+190001,202004,100,4350,95,,,2.939189189,,1.113,,87.62068966,4350,R,,,5,3.974249601,
+190002,202001,100,2433,17,,,,0.562673451,,0.9214,96.16299559,2433,R,,,4,,1.428812335
+190002,202002,100,4324,17,,,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,,,3,0.86670161,1.528894599
+190002,202003,100,6598,17,,,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,,,4,0.733999278,3.123947916
+190002,202004,100,700,17,,,11.26857143,,1.113,,87.62068966,700,R,,,5,3.974249601,
+190003,202001,100,7888,64,,,,1.870080607,,0.9214,96.16299559,7888,R,,,4,,1.428812335
+190003,202002,100,4218,64,,,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,,,3,0.86670161,1.528894599
+190003,202003,100,7591,64,,,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,,,4,0.733999278,3.123947916
+190003,202004,100,4077,64,,,0.537083388,,1.113,,87.62068966,4077,R,,,5,3.974249601,
+190004,202001,100,2247,51,,,,,,0.9214,96.16299559,2247,R,,,4,,1.428812335
+190004,202002,100,,51,,,,,0.8521,1.5274,76.92045455,1914.6687,FIR,,,3,0.86670161,1.528894599
+190004,202003,100,,51,,,,,0.9685,1.8795,95.83333333,1854.356636,FIR,,,4,0.733999278,3.123947916
+190004,202004,100,8608,51,,,,,1.113,,87.62068966,8608,R,,,5,3.974249601,
+190005,202001,100,,34,,,,,,0.9214,96.16299559,6271.13538,BI,,,4,,1.428812335
+190005,202002,100,,34,,,,,0.8521,1.5274,76.92045455,6806.0944,BI,,,3,0.86670161,1.528894599
+190005,202003,100,4456,34,,,,0.867939229,0.9685,1.8795,95.83333333,4456,R,,,4,0.733999278,3.123947916
+190005,202004,100,5134,34,,,1.152154399,,1.113,,87.62068966,5134,R,,,5,3.974249601,
+190006,202001,100,,8,,,,,,0.9214,96.16299559,769.3039647,C,,,4,,1.428812335
+190006,202002,100,,8,,,,,0.8521,1.5274,76.92045455,655.5239083,FIC,,,3,0.86670161,1.528894599
+190006,202003,100,,8,,,,,0.9685,1.8795,95.83333333,634.8749052,FIC,,,4,0.733999278,3.123947916
+190006,202004,100,,8,,,,,1.113,,87.62068966,706.6157695,FIC,,,5,3.974249601,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_input.csv
new file mode 100644
index 00000000..c321b555
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_input.csv
@@ -0,0 +1,21 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+120001,202001,100,5240,0,,
+120001,202002,100,2490,0,,
+120001,202003,100,3382,0,,
+120001,202004,100,4475,0,,
+120001,202005,100,1316,0,,
+120002,202001,100,7410,0,,
+120002,202002,100,3602,0,,
+120002,202003,100,4972,0,,
+120002,202004,100,8838,0,,
+120002,202005,100,1535,0,,
+120003,202001,100,4530,0,,
+120003,202002,100,7451,0,,
+120003,202003,100,7586,0,,
+120003,202004,100,283,0,,
+120003,202005,100,4416,0,,
+120004,202001,100,,3,,
+120004,202002,100,,3,,
+120004,202003,100,,3,,
+120004,202004,100,,3,,
+120004,202005,100,,3,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
new file mode 100644
index 00000000..f688cc92
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -0,0 +1,21 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,default_c_link
+120001,202001,100,5240,0,,,,2.104417671,,1.589860068,1,5240,R,,3,3,TRUE
+120001,202002,100,2490,0,,,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,TRUE
+120001,202003,100,3382,0,,,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,TRUE
+120001,202004,100,4475,0,,,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,TRUE
+120001,202005,100,1316,0,,,0.294078212,,5.357333441,,1,1316,R,3,,3,TRUE
+120002,202001,100,7410,0,,,,2.05719045,,1.589860068,1,7410,R,,3,3,TRUE
+120002,202002,100,3602,0,,,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,TRUE
+120002,202003,100,4972,0,,,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,TRUE
+120002,202004,100,8838,0,,,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,TRUE
+120002,202005,100,1535,0,,,0.173681828,,5.357333441,,1,1535,R,3,,3,TRUE
+120003,202001,100,4530,0,,,,0.607972084,,1.589860068,1,4530,R,,3,3,TRUE
+120003,202002,100,7451,0,,,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,TRUE
+120003,202003,100,7586,0,,,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,TRUE
+120003,202004,100,283,0,,,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,TRUE
+120003,202005,100,4416,0,,,15.60424028,,5.357333441,,1,4416,R,3,,3,TRUE
+120004,202001,100,,3,,,,,,1.589860068,1,3,C,,3,3,TRUE
+120004,202002,100,,3,,,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,TRUE
+120004,202003,100,,3,,,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,TRUE
+120004,202004,100,,3,,,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,TRUE
+120004,202005,100,,3,,,,,5.357333441,,1,18.28784061,FIC,3,,3,TRUE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_input.csv
new file mode 100644
index 00000000..5a53a763
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+30001,202001,100,8444,51,0.1,0.1
+30001,202002,100,7476,51,0.1,0.1
+30001,202003,100,2003,51,0.1,0.1
+30002,202001,100,9343,72,0.1,0.1
+30002,202002,100,7818,72,0.1,0.1
+30002,202003,100,4897,72,0.1,0.1
+30003,202001,100,7511,7,0.1,0.1
+30003,202002,100,1761,7,0.1,0.1
+30003,202003,100,6492,7,0.1,0.1
+30004,202001,100,64,81,0.1,0.1
+30004,202002,100,2113,81,0.1,0.1
+30004,202003,100,185,81,0.1,0.1
+30005,202001,100,844,5,0.1,0.1
+30005,202002,100,897,5,0.1,0.1
+30005,202003,100,280,5,0.1,0.1
+30006,202001,100,1869,14,0.1,0.1
+30006,202002,100,1876,14,0.1,0.1
+30006,202003,100,1371,14,0.1,0.1
+30007,202001,100,12769,12,0.1,0.1
+30007,202002,100,2853,12,0.1,0.1
+30007,202003,100,11491,12,0.1,0.1
+30008,202001,100,141,162,0.1,0.1
+30008,202002,100,6001,162,0.1,0.1
+30008,202003,100,433,162,0.1,0.1
+30009,202001,100,6417,26,0.1,0.1
+30009,202002,100,4037,26,0.1,0.1
+30009,202003,100,1322,26,0.1,0.1
+30010,202001,100,28963,144,0.1,0.1
+30010,202002,100,21734,144,0.1,0.1
+30010,202003,100,10529,144,0.1,0.1
+30011,202001,100,6009,5,0.1,0.1
+30011,202002,100,1145,5,0.1,0.1
+30011,202003,100,5064,5,0.1,0.1
+30012,202001,100,256,275,0.1,0.1
+30012,202002,100,7522,275,0.1,0.1
+30012,202003,100,,275,0.1,0.1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
new file mode 100644
index 00000000..4381e97c
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.598925527,96.73383283,8444,R,,10,12,,
+30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,6.802558774,2.995081605,76.3675837,7476,R,10,9,12,,
+30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
+30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.598925527,96.73383283,9343,R,,10,12,,
+30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,6.802558774,2.995081605,76.3675837,7818,R,10,9,12,,
+30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
+30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.598925527,96.73383283,7511,R,,10,12,,
+30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,6.802558774,2.995081605,76.3675837,1761,R,10,9,12,,
+30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
+30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.598925527,96.73383283,64,R,,10,12,,
+30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,6.802558774,2.995081605,76.3675837,2113,R,10,9,12,,
+30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
+30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.598925527,96.73383283,844,R,,10,12,,
+30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,6.802558774,2.995081605,76.3675837,897,R,10,9,12,,
+30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
+30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.598925527,96.73383283,1869,R,,10,12,,
+30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,6.802558774,2.995081605,76.3675837,1876,R,10,9,12,,
+30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
+30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.598925527,96.73383283,12769,R,,10,12,,
+30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,6.802558774,2.995081605,76.3675837,2853,R,10,9,12,,
+30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
+30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.598925527,96.73383283,141,R,,10,12,,TRUE
+30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,,6.802558774,2.995081605,76.3675837,6001,R,10,9,12,TRUE,TRUE
+30008,202003,100,433,162,0.1,0.1,0.072138939,,,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
+30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.598925527,96.73383283,6417,R,,10,12,,
+30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,6.802558774,2.995081605,76.3675837,4037,R,10,9,12,,
+30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
+30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.598925527,96.73383283,28963,R,,10,12,,
+30010,202002,100,21734,144,0.1,0.1,0.750399298,2.064295653,0.750399298,2.064295653,6.802558774,2.995081605,76.3675837,21734,R,10,9,12,,
+30010,202003,100,10529,144,0.1,0.1,0.484426733,,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
+30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.598925527,96.73383283,6009,R,,10,12,,TRUE
+30011,202002,100,1145,5,0.1,0.1,0.190495606,0.226047443,,,6.802558774,2.995081605,76.3675837,1145,R,10,9,12,TRUE,TRUE
+30011,202003,100,5064,5,0.1,0.1,4.423850085,,,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
+30012,202001,100,256,275,0.1,0.1,,0.034032235,,0.034032235,,1.598925527,96.73383283,256,R,,10,12,,
+30012,202002,100,7522,275,0.1,0.1,29.38390625,,29.38390625,,6.802558774,2.995081605,76.3675837,7522,R,10,9,12,,
+30012,202003,100,,275,0.1,0.1,,,,,1.172391173,,76.13443331,8818.726403,FIR,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_input.csv
new file mode 100644
index 00000000..5b064cf1
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+30001,202001,100,8444,51,0.1,0.1
+30001,202002,100,7476,51,0.1,0.1
+30001,202003,100,2003,51,0.1,0.1
+30002,202001,100,9343,72,0.1,0.1
+30002,202002,100,7818,72,0.1,0.1
+30002,202003,100,4897,72,0.1,0.1
+30003,202001,100,7511,7,0.1,0.1
+30003,202002,100,1761,7,0.1,0.1
+30003,202003,100,6492,7,0.1,0.1
+30004,202001,100,64,81,0.1,0.1
+30004,202002,100,2113,81,0.1,0.1
+30004,202003,100,185,81,0.1,0.1
+30005,202001,100,844,5,0.1,0.1
+30005,202002,100,897,5,0.1,0.1
+30005,202003,100,280,5,0.1,0.1
+30006,202001,100,1869,14,0.1,0.1
+30006,202002,100,1876,14,0.1,0.1
+30006,202003,100,1371,14,0.1,0.1
+30007,202001,100,12769,12,0.1,0.1
+30007,202002,100,2853,12,0.1,0.1
+30007,202003,100,11491,12,0.1,0.1
+30008,202001,100,141,162,0.1,0.1
+30008,202002,100,6001,162,0.1,0.1
+30008,202003,100,433,162,0.1,0.1
+30009,202001,100,6417,26,0.1,0.1
+30009,202002,100,4037,26,0.1,0.1
+30009,202003,100,1322,26,0.1,0.1
+30010,202001,100,28963,144,0.1,0.1
+30010,202002,100,21734,144,0.1,0.1
+30010,202003,100,10529,144,0.1,0.1
+30011,202001,100,6009,5,0.1,0.1
+30011,202002,100,1145,5,0.1,0.1
+30011,202003,100,5064,5,0.1,0.1
+30012,202001,100,,275,0.1,0.1
+30012,202002,100,,275,0.1,0.1
+30012,202003,100,7522,275,0.1,0.1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
new file mode 100644
index 00000000..b2e4df64
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.772802559,142.2694301,8444,R,,9,11,,
+30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.67357513,7476,R,9,9,11,,
+30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.172391173,,60.40866511,2003,R,9,,12,,
+30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.772802559,142.2694301,9343,R,,9,11,,
+30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.67357513,7818,R,9,9,11,,
+30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.172391173,,60.40866511,4897,R,9,,12,,
+30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.772802559,142.2694301,7511,R,,9,11,,
+30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.67357513,1761,R,9,9,11,,
+30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.172391173,,60.40866511,6492,R,9,,12,,
+30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.772802559,142.2694301,64,R,,9,11,,
+30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.67357513,2113,R,9,9,11,,
+30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.172391173,,60.40866511,185,R,9,,12,,
+30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.772802559,142.2694301,844,R,,9,11,,
+30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.67357513,897,R,9,9,11,,
+30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.172391173,,60.40866511,280,R,9,,12,,
+30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.772802559,142.2694301,1869,R,,9,11,,
+30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.67357513,1876,R,9,9,11,,
+30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.172391173,,60.40866511,1371,R,9,,12,,
+30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.772802559,142.2694301,12769,R,,9,11,,
+30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.67357513,2853,R,9,9,11,,
+30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.172391173,,60.40866511,11491,R,9,,12,,
+30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.772802559,142.2694301,141,R,,9,11,,TRUE
+30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,,4.293520165,2.995081605,99.67357513,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,433,162,0.1,0.1,0.072138939,,,,1.172391173,,60.40866511,433,R,9,,12,TRUE,
+30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.772802559,142.2694301,6417,R,,9,11,,
+30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.67357513,4037,R,9,9,11,,
+30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.172391173,,60.40866511,1322,R,9,,12,,
+30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.772802559,142.2694301,28963,R,,9,11,,
+30010,202002,100,21734,144,0.1,0.1,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.67357513,21734,R,9,9,11,,
+30010,202003,100,10529,144,0.1,0.1,0.484426733,,0.484426733,,1.172391173,,60.40866511,10529,R,9,,12,,
+30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.772802559,142.2694301,6009,R,,9,11,,TRUE
+30011,202002,100,1145,5,0.1,0.1,0.190495606,0.226047443,,,4.293520165,2.995081605,99.67357513,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5064,5,0.1,0.1,4.423850085,,,,1.172391173,,60.40866511,5064,R,9,,12,TRUE,
+30012,202001,100,,275,0.1,0.1,,,,,,1.772802559,142.2694301,46826.14142,BI,,9,11,,
+30012,202002,100,,275,0.1,0.1,,,,,4.293520165,2.995081605,99.67357513,26413.62467,BI,9,9,11,,
+30012,202003,100,7522,275,0.1,0.1,,,,,1.172391173,,60.40866511,8819,R,9,,12,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_input.csv
new file mode 100644
index 00000000..112cc560
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,,,,,,,,
+30001,202001,100,8444,51,0.1,0.1,,,,,,,,
+30001,202002,100,7476,51,0.1,0.1,,,,,,,,
+30001,202003,100,2003,51,0.1,0.1,,,,,,,,
+30002,202001,100,9343,72,0.1,0.1,,,,,,,,
+30002,202002,100,7818,72,0.1,0.1,,,,,,,,
+30002,202003,100,4897,72,0.1,0.1,,,,,,,,
+30003,202001,100,7511,7,0.1,0.1,,,,,,,,
+30003,202002,100,1761,7,0.1,0.1,,,,,,,,
+30003,202003,100,6492,7,0.1,0.1,,,,,,,,
+30004,202001,100,64,81,0.1,0.1,,,,,,,,
+30004,202002,100,2113,81,0.1,0.1,,,,,,,,
+30004,202003,100,185,81,0.1,0.1,,,,,,,,
+30005,202001,100,844,5,0.1,0.1,,,,,,,,
+30005,202002,100,897,5,0.1,0.1,,,,,,,,
+30005,202003,100,280,5,0.1,0.1,,,,,,,,
+30006,202001,100,1869,14,0.1,0.1,,,,,,,,
+30006,202002,100,1876,14,0.1,0.1,,,,,,,,
+30006,202003,100,1371,14,0.1,0.1,,,,,,,,
+30007,202001,100,12769,12,0.1,0.1,,,,,,,,
+30007,202002,100,2853,12,0.1,0.1,,,,,,,,
+30007,202003,100,11491,12,0.1,0.1,,,,,,,,
+30008,202001,100,141,162,0.1,0.1,,,,,,,,
+30008,202002,100,6001,162,0.1,0.1,,,,,,,,
+30008,202003,100,433,162,0.1,0.1,,,,,,,,
+30009,202001,100,6417,26,0.1,0.1,,,,,,,,
+30009,202002,100,4037,26,0.1,0.1,,,,,,,,
+30009,202003,100,1322,26,0.1,0.1,,,,,,,,
+30010,202001,100,28963,144,0.1,0.1,,,,,,,,
+30010,202002,100,21734,144,0.1,0.1,,,,,,,,
+30010,202003,100,10529,144,0.1,0.1,,,,,,,,
+30011,202001,100,6009,5,0.1,0.1,,,,,,,,
+30011,202002,100,1145,5,0.1,0.1,,,,,,,,
+30011,202003,100,5064,5,0.1,0.1,,,,,,,,
+30012,202001,100,,275,0.1,0.1,,,,,,,,
+30012,202002,100,,275,0.1,0.1,,,,,,,,
+30012,202003,100,,275,0.1,0.1,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
new file mode 100644
index 00000000..ced07828
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.772802559,142.3186593,8444,R,,9,11,,
+30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,7476,R,9,9,11,,
+30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
+30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.772802559,142.3186593,9343,R,,9,11,,
+30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,7818,R,9,9,11,,
+30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
+30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.772802559,142.3186593,7511,R,,9,11,,
+30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,1761,R,9,9,11,,
+30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
+30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.772802559,142.3186593,64,R,,9,11,,
+30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2113,R,9,9,11,,
+30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
+30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.772802559,142.3186593,844,R,,9,11,,
+30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,897,R,9,9,11,,
+30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
+30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.772802559,142.3186593,1869,R,,9,11,,
+30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,1876,R,9,9,11,,
+30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
+30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.772802559,142.3186593,12769,R,,9,11,,
+30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2853,R,9,9,11,,
+30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
+30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.772802559,142.3186593,141,R,,9,11,,TRUE
+30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,,4.293520165,2.995081605,99.70786109,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,433,162,0.1,0.1,0.072138939,,,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
+30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.772802559,142.3186593,6417,R,,9,11,,
+30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,4037,R,9,9,11,,
+30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
+30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.772802559,142.3186593,28963,R,,9,11,,
+30010,202002,100,21734,144,0.1,0.1,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,21734,R,9,9,11,,
+30010,202003,100,10529,144,0.1,0.1,0.484426733,,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
+30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.772802559,142.3186593,6009,R,,9,11,,TRUE
+30011,202002,100,1145,5,0.1,0.1,0.190495606,0.226047443,,,4.293520165,2.995081605,99.70786109,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5064,5,0.1,0.1,4.423850085,,,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
+30012,202001,100,,275,0.1,0.1,,,,,,1.772802559,142.3186593,39195,C,,9,11,,
+30012,202002,100,,275,0.1,0.1,,,,,4.293520165,2.995081605,99.70786109,168283,FIC,9,9,11,,
+30012,202003,100,,275,0.1,0.1,,,,,1.172391173,,76.13443331,197293,FIC,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_input.csv
new file mode 100644
index 00000000..9d4ea3c1
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+30001,202001,100,8444,51,,0.1
+30001,202002,100,7476,51,,0.1
+30001,202003,100,2003,51,,0.1
+30002,202001,100,9343,72,,0.1
+30002,202002,100,7818,72,,0.1
+30002,202003,100,4897,72,,0.1
+30003,202001,100,7511,7,,0.1
+30003,202002,100,1761,7,,0.1
+30003,202003,100,6492,7,,0.1
+30004,202001,100,64,81,,0.1
+30004,202002,100,2113,81,,0.1
+30004,202003,100,185,81,,0.1
+30005,202001,100,844,5,,0.1
+30005,202002,100,897,5,,0.1
+30005,202003,100,280,5,,0.1
+30006,202001,100,1869,14,,0.1
+30006,202002,100,1876,14,,0.1
+30006,202003,100,1371,14,,0.1
+30007,202001,100,12769,12,,0.1
+30007,202002,100,2853,12,,0.1
+30007,202003,100,11491,12,,0.1
+30008,202001,100,141,162,,0.1
+30008,202002,100,6001,162,,0.1
+30008,202003,100,433,162,,0.1
+30009,202001,100,6417,26,,0.1
+30009,202002,100,4037,26,,0.1
+30009,202003,100,1322,26,,0.1
+30010,202001,100,28963,144,,0.1
+30010,202002,100,21734,144,,0.1
+30010,202003,100,10529,144,,0.1
+30011,202001,100,6009,5,,0.1
+30011,202002,100,1145,5,,0.1
+30011,202003,100,5064,5,,0.1
+30012,202001,100,256,275,,0.1
+30012,202002,100,7522,275,,0.1
+30012,202003,100,,275,,0.1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
new file mode 100644
index 00000000..6ffb0bee
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+30001,202001,100,8444,51,,0.1,,1.129481006,,1.129481006,,1.455701667,96.73383283,8444,R,,11,12,,
+30001,202002,100,7476,51,,0.1,0.885362387,3.732401398,0.885362387,3.732401398,6.201462122,2.718178189,76.3675837,7476,R,11,10,12,,
+30001,202003,100,2003,51,,0.1,0.267924024,,0.267924024,,1.06236595,,76.13443331,2003,R,10,,11,,
+30002,202001,100,9343,72,,0.1,,1.195062676,,1.195062676,,1.455701667,96.73383283,9343,R,,11,12,,
+30002,202002,100,7818,72,,0.1,0.836776196,1.596487645,0.836776196,1.596487645,6.201462122,2.718178189,76.3675837,7818,R,11,10,12,,
+30002,202003,100,4897,72,,0.1,0.626375032,,0.626375032,,1.06236595,,76.13443331,4897,R,10,,11,,
+30003,202001,100,7511,7,,0.1,,4.265190233,,4.265190233,,1.455701667,96.73383283,7511,R,,11,12,,
+30003,202002,100,1761,7,,0.1,0.234456131,0.271256932,0.234456131,0.271256932,6.201462122,2.718178189,76.3675837,1761,R,11,10,12,,
+30003,202003,100,6492,7,,0.1,3.686541738,,3.686541738,,1.06236595,,76.13443331,6492,R,10,,11,,
+30004,202001,100,64,81,,0.1,,0.030288689,,0.030288689,,1.455701667,96.73383283,64,R,,11,12,,
+30004,202002,100,2113,81,,0.1,33.015625,11.42162162,33.015625,11.42162162,6.201462122,2.718178189,76.3675837,2113,R,11,10,12,,
+30004,202003,100,185,81,,0.1,0.087553242,,0.087553242,,1.06236595,,76.13443331,185,R,10,,11,,
+30005,202001,100,844,5,,0.1,,0.941234172,,0.941234172,,1.455701667,96.73383283,844,R,,11,12,,
+30005,202002,100,897,5,,0.1,1.062434865,3.199201198,1.062434865,3.199201198,6.201462122,2.718178189,76.3675837,897,R,11,10,12,,
+30005,202003,100,280,5,,0.1,0.312578027,,0.312578027,,1.06236595,,76.13443331,280,R,10,,11,,
+30006,202001,100,1869,14,,0.1,,0.995885563,,0.995885563,,1.455701667,96.73383283,1869,R,,11,12,,
+30006,202002,100,1876,14,,0.1,1.004131435,1.368417982,1.004131435,1.368417982,6.201462122,2.718178189,76.3675837,1876,R,11,10,12,,
+30006,202003,100,1371,14,,0.1,0.730770871,,0.730770871,,1.06236595,,76.13443331,1371,R,10,,11,,
+30007,202001,100,12769,12,,0.1,,4.475816911,,4.475816911,,1.455701667,96.73383283,12769,R,,11,12,,
+30007,202002,100,2853,12,,0.1,0.223422901,0.248269056,0.223422901,0.248269056,6.201462122,2.718178189,76.3675837,2853,R,11,10,12,,
+30007,202003,100,11491,12,,0.1,4.027888195,,4.027888195,,1.06236595,,76.13443331,11491,R,10,,11,,
+30008,202001,100,141,162,,0.1,,0.023463069,,0.023463069,,1.455701667,96.73383283,141,R,,11,12,,
+30008,202002,100,6001,162,,0.1,42.62017045,13.86213906,,,6.201462122,2.718178189,76.3675837,6001,R,11,10,12,TRUE,TRUE
+30008,202003,100,433,162,,0.1,0.072138939,,0.072138939,,1.06236595,,76.13443331,433,R,10,,11,,
+30009,202001,100,6417,26,,0.1,,1.589639934,,1.589639934,,1.455701667,96.73383283,6417,R,,11,12,,
+30009,202002,100,4037,26,,0.1,0.629073275,3.053782962,0.629073275,3.053782962,6.201462122,2.718178189,76.3675837,4037,R,11,10,12,,
+30009,202003,100,1322,26,,0.1,0.327462695,,0.327462695,,1.06236595,,76.13443331,1322,R,10,,11,,
+30010,202001,100,28963,144,,0.1,,1.332623847,,1.332623847,,1.455701667,96.73383283,28963,R,,11,12,,
+30010,202002,100,21734,144,,0.1,0.750399298,2.064295653,0.750399298,2.064295653,6.201462122,2.718178189,76.3675837,21734,R,11,10,12,,
+30010,202003,100,10529,144,,0.1,0.484426733,,0.484426733,,1.06236595,,76.13443331,10529,R,10,,11,,
+30011,202001,100,6009,5,,0.1,,5.249464902,,,,1.455701667,96.73383283,6009,R,,11,12,,TRUE
+30011,202002,100,1145,5,,0.1,0.190495606,0.226047443,0.190495606,0.226047443,6.201462122,2.718178189,76.3675837,1145,R,11,10,12,,
+30011,202003,100,5064,5,,0.1,4.423850085,,,,1.06236595,,76.13443331,5064,R,10,,11,TRUE,
+30012,202001,100,256,275,,0.1,,0.034032235,,0.034032235,,1.455701667,96.73383283,256,R,,11,12,,
+30012,202002,100,7522,275,,0.1,29.38390625,,29.38390625,,6.201462122,2.718178189,76.3675837,7522,R,11,10,12,,
+30012,202003,100,,275,,0.1,,,,,1.06236595,,76.13443331,7991.116673,FIR,10,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_input.csv
new file mode 100644
index 00000000..15a2e4ce
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+30001,202001,100,8444,51,0.1,
+30001,202002,100,7476,51,0.1,
+30001,202003,100,2003,51,0.1,
+30002,202001,100,9343,72,0.1,
+30002,202002,100,7818,72,0.1,
+30002,202003,100,4897,72,0.1,
+30003,202001,100,7511,7,0.1,
+30003,202002,100,1761,7,0.1,
+30003,202003,100,6492,7,0.1,
+30004,202001,100,64,81,0.1,
+30004,202002,100,2113,81,0.1,
+30004,202003,100,185,81,0.1,
+30005,202001,100,844,5,0.1,
+30005,202002,100,897,5,0.1,
+30005,202003,100,280,5,0.1,
+30006,202001,100,1869,14,0.1,
+30006,202002,100,1876,14,0.1,
+30006,202003,100,1371,14,0.1,
+30007,202001,100,12769,12,0.1,
+30007,202002,100,2853,12,0.1,
+30007,202003,100,11491,12,0.1,
+30008,202001,100,141,162,0.1,
+30008,202002,100,6001,162,0.1,
+30008,202003,100,433,162,0.1,
+30009,202001,100,6417,26,0.1,
+30009,202002,100,4037,26,0.1,
+30009,202003,100,1322,26,0.1,
+30010,202001,100,28963,144,0.1,
+30010,202002,100,21734,144,0.1,
+30010,202003,100,10529,144,0.1,
+30011,202001,100,6009,5,0.1,
+30011,202002,100,1145,5,0.1,
+30011,202003,100,5064,5,0.1,
+30012,202001,100,256,275,0.1,
+30012,202002,100,7522,275,0.1,
+30012,202003,100,,275,0.1,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
new file mode 100644
index 00000000..e6d4fee5
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+30001,202001,100,8444,51,0.1,,,1.129481006,,1.129481006,,1.930792743,96.75644028,8444,R,,11,12,,
+30001,202002,100,7476,51,0.1,,0.885362387,3.732401398,0.885362387,3.732401398,10.05870529,4.081787351,76.3852459,7476,R,11,10,12,,
+30001,202003,100,2003,51,0.1,,0.267924024,,0.267924024,,1.497537064,,76.10880829,2003,R,10,,11,,
+30002,202001,100,9343,72,0.1,,,1.195062676,,1.195062676,,1.930792743,96.75644028,9343,R,,11,12,,
+30002,202002,100,7818,72,0.1,,0.836776196,1.596487645,0.836776196,1.596487645,10.05870529,4.081787351,76.3852459,7818,R,11,10,12,,
+30002,202003,100,4897,72,0.1,,0.626375032,,0.626375032,,1.497537064,,76.10880829,4897,R,10,,11,,
+30003,202001,100,7511,7,0.1,,,4.265190233,,4.265190233,,1.930792743,96.75644028,7511,R,,11,12,,
+30003,202002,100,1761,7,0.1,,0.234456131,0.271256932,0.234456131,0.271256932,10.05870529,4.081787351,76.3852459,1761,R,11,10,12,,
+30003,202003,100,6492,7,0.1,,3.686541738,,3.686541738,,1.497537064,,76.10880829,6492,R,10,,11,,
+30004,202001,100,64,81,0.1,,,0.030288689,,0.030288689,,1.930792743,96.75644028,64,R,,11,12,,
+30004,202002,100,2113,81,0.1,,33.015625,11.42162162,33.015625,11.42162162,10.05870529,4.081787351,76.3852459,2113,R,11,10,12,,
+30004,202003,100,185,81,0.1,,0.087553242,,0.087553242,,1.497537064,,76.10880829,185,R,10,,11,,
+30005,202001,100,844,5,0.1,,,0.941234172,,0.941234172,,1.930792743,96.75644028,844,R,,11,12,,
+30005,202002,100,897,5,0.1,,1.062434865,3.199201198,1.062434865,3.199201198,10.05870529,4.081787351,76.3852459,897,R,11,10,12,,
+30005,202003,100,280,5,0.1,,0.312578027,,0.312578027,,1.497537064,,76.10880829,280,R,10,,11,,
+30006,202001,100,1869,14,0.1,,,0.995885563,,0.995885563,,1.930792743,96.75644028,1869,R,,11,12,,
+30006,202002,100,1876,14,0.1,,1.004131435,1.368417982,1.004131435,1.368417982,10.05870529,4.081787351,76.3852459,1876,R,11,10,12,,
+30006,202003,100,1371,14,0.1,,0.730770871,,0.730770871,,1.497537064,,76.10880829,1371,R,10,,11,,
+30007,202001,100,12769,12,0.1,,,4.475816911,,4.475816911,,1.930792743,96.75644028,12769,R,,11,12,,
+30007,202002,100,2853,12,0.1,,0.223422901,0.248269056,0.223422901,0.248269056,10.05870529,4.081787351,76.3852459,2853,R,11,10,12,,
+30007,202003,100,11491,12,0.1,,4.027888195,,4.027888195,,1.497537064,,76.10880829,11491,R,10,,11,,
+30008,202001,100,141,162,0.1,,,0.023463069,,,,1.930792743,96.75644028,141,R,,11,12,,TRUE
+30008,202002,100,6001,162,0.1,,42.62017045,13.86213906,42.62017045,13.86213906,10.05870529,4.081787351,76.3852459,6001,R,11,10,12,,
+30008,202003,100,433,162,0.1,,0.072138939,,,,1.497537064,,76.10880829,433,R,10,,11,TRUE,
+30009,202001,100,6417,26,0.1,,,1.589639934,,1.589639934,,1.930792743,96.75644028,6417,R,,11,12,,
+30009,202002,100,4037,26,0.1,,0.629073275,3.053782962,0.629073275,3.053782962,10.05870529,4.081787351,76.3852459,4037,R,11,10,12,,
+30009,202003,100,1322,26,0.1,,0.327462695,,0.327462695,,1.497537064,,76.10880829,1322,R,10,,11,,
+30010,202001,100,28963,144,0.1,,,1.332623847,,1.332623847,,1.930792743,96.75644028,28963,R,,11,12,,
+30010,202002,100,21734,144,0.1,,0.750399298,2.064295653,0.750399298,2.064295653,10.05870529,4.081787351,76.3852459,21734,R,11,10,12,,
+30010,202003,100,10529,144,0.1,,0.484426733,,0.484426733,,1.497537064,,76.10880829,10529,R,10,,11,,
+30011,202001,100,6009,5,0.1,,,5.249464902,,5.249464902,,1.930792743,96.75644028,6009,R,,11,12,,
+30011,202002,100,1145,5,0.1,,0.190495606,0.226047443,,,10.05870529,4.081787351,76.3852459,1145,R,11,10,12,TRUE,TRUE
+30011,202003,100,5064,5,0.1,,4.423850085,,4.423850085,,1.497537064,,76.10880829,5064,R,10,,11,,
+30012,202001,100,256,275,0.1,,,0.034032235,,0.034032235,,1.930792743,96.75644028,256,R,,11,12,,
+30012,202002,100,7522,275,0.1,,29.38390625,,29.38390625,,10.05870529,4.081787351,76.3852459,7522,R,11,10,12,,
+30012,202003,100,,275,0.1,,,,,,1.497537064,,76.10880829,11264.4738,FIR,10,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_input.csv
new file mode 100644
index 00000000..71625144
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_input.csv
@@ -0,0 +1,31 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+30001,202001,100,8444,51,0.1,0.1
+30001,202002,100,7476,51,0.1,0.1
+30001,202003,100,2003,51,0.1,0.1
+30002,202001,100,9343,72,0.1,0.1
+30002,202002,100,7818,72,0.1,0.1
+30002,202003,100,4897,72,0.1,0.1
+30003,202001,100,7511,7,0.1,0.1
+30003,202002,100,1761,7,0.1,0.1
+30003,202003,100,6492,7,0.1,0.1
+30004,202001,100,64,81,0.1,0.1
+30004,202002,100,2113,81,0.1,0.1
+30004,202003,100,185,81,0.1,0.1
+30005,202001,100,844,5,0.1,0.1
+30005,202002,100,897,5,0.1,0.1
+30005,202003,100,280,5,0.1,0.1
+30006,202001,100,1869,14,0.1,0.1
+30006,202002,100,1876,14,0.1,0.1
+30006,202003,100,1371,14,0.1,0.1
+30007,202001,100,12769,12,0.1,0.1
+30007,202002,100,2853,12,0.1,0.1
+30007,202003,100,11491,12,0.1,0.1
+30008,202001,100,141,162,0.1,0.1
+30008,202002,100,6001,162,0.1,0.1
+30008,202003,100,433,162,0.1,0.1
+30009,202001,100,6417,26,0.1,0.1
+30009,202002,100,4037,26,0.1,0.1
+30009,202003,100,1322,26,0.1,0.1
+30010,202001,100,28963,144,0.1,0.1
+30010,202002,100,21734,144,0.1,0.1
+30010,202003,100,,144,0.1,0.1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
new file mode 100644
index 00000000..1ed7d48f
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -0,0 +1,31 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.59786861,133.0400697,8444,R,,10,10,,
+30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,8.126185194,4.305953095,98.54703833,7476,R,10,9,10,,
+30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.126581418,,66.21860465,2003,R,9,,10,,
+30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.59786861,133.0400697,9343,R,,10,10,,
+30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,8.126185194,4.305953095,98.54703833,7818,R,10,9,10,,
+30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.126581418,,66.21860465,4897,R,9,,10,,
+30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.59786861,133.0400697,7511,R,,10,10,,
+30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,8.126185194,4.305953095,98.54703833,1761,R,10,9,10,,
+30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.126581418,,66.21860465,6492,R,9,,10,,
+30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.59786861,133.0400697,64,R,,10,10,,
+30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,8.126185194,4.305953095,98.54703833,2113,R,10,9,10,,
+30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.126581418,,66.21860465,185,R,9,,10,,
+30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.59786861,133.0400697,844,R,,10,10,,
+30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,8.126185194,4.305953095,98.54703833,897,R,10,9,10,,
+30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.126581418,,66.21860465,280,R,9,,10,,
+30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.59786861,133.0400697,1869,R,,10,10,,
+30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,8.126185194,4.305953095,98.54703833,1876,R,10,9,10,,
+30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.126581418,,66.21860465,1371,R,9,,10,,
+30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.59786861,133.0400697,12769,R,,10,10,,
+30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,8.126185194,4.305953095,98.54703833,2853,R,10,9,10,,
+30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.126581418,,66.21860465,11491,R,9,,10,,
+30008,202001,100,141,162,0.1,0.1,,0.023463069,,0.023463069,,1.59786861,133.0400697,141,R,,10,10,,
+30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,42.62017045,13.86213906,8.126185194,4.305953095,98.54703833,6001,R,10,9,10,,
+30008,202003,100,433,162,0.1,0.1,0.072138939,,0.072138939,,1.126581418,,66.21860465,433,R,9,,10,,
+30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.59786861,133.0400697,6417,R,,10,10,,
+30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,8.126185194,4.305953095,98.54703833,4037,R,10,9,10,,
+30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.126581418,,66.21860465,1322,R,9,,10,,
+30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.59786861,133.0400697,28963,R,,10,10,,
+30010,202002,100,21734,144,0.1,0.1,0.750399298,,0.750399298,,8.126185194,4.305953095,98.54703833,21734,R,10,9,10,,
+30010,202003,100,,144,0.1,0.1,,,,,1.126581418,,66.21860465,24485.12054,FIR,9,,10,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_input.csv
new file mode 100644
index 00000000..aa973752
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,,
+30001,202001,100,8444,51,0.1,0.1,,
+30001,202002,100,7476,51,0.1,0.1,,
+30001,202003,100,2003,51,0.1,0.1,,
+30002,202001,100,9343,72,0.1,0.1,,
+30002,202002,100,7818,72,0.1,0.1,,
+30002,202003,100,4897,72,0.1,0.1,,
+30003,202001,100,7511,7,0.1,0.1,,
+30003,202002,100,1761,7,0.1,0.1,,
+30003,202003,100,6492,7,0.1,0.1,,
+30004,202001,100,64,81,0.1,0.1,,
+30004,202002,100,2113,81,0.1,0.1,,
+30004,202003,100,185,81,0.1,0.1,,
+30005,202001,100,844,5,0.1,0.1,,
+30005,202002,100,897,5,0.1,0.1,,
+30005,202003,100,280,5,0.1,0.1,,
+30006,202001,100,1869,14,0.1,0.1,,
+30006,202002,100,1876,14,0.1,0.1,,
+30006,202003,100,1371,14,0.1,0.1,,
+30007,202001,100,12769,12,0.1,0.1,,
+30007,202002,100,2853,12,0.1,0.1,,
+30007,202003,100,11491,12,0.1,0.1,,
+30008,202001,100,141,162,0.1,0.1,,
+30008,202002,100,6001,162,0.1,0.1,,
+30008,202003,100,433,162,0.1,0.1,,
+30009,202001,100,6417,26,0.1,0.1,,
+30009,202002,100,4037,26,0.1,0.1,,
+30009,202003,100,1322,26,0.1,0.1,,
+30010,202001,100,28963,144,0.1,0.1,,
+30010,202002,100,21734,144,0.1,0.1,,
+30010,202003,100,10529,144,0.1,0.1,,
+30011,202001,100,6009,5,0.1,0.1,,
+30011,202002,100,1145,5,0.1,0.1,,
+30011,202003,100,5064,5,0.1,0.1,,
+30012,202001,100,256,275,0.1,0.1,,
+30012,202002,100,7522,275,0.1,0.1,,
+30012,202003,100,,275,0.1,0.1,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
new file mode 100644
index 00000000..ac87b6ef
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
+30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.773218509,96.73383283,8444,R,,9,12,,,
+30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,3.88999586,1.941764103,81.65588616,7476,R,9,8,11,,,
+30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.307995914,,76.13443331,2003,R,8,,11,,,
+30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.773218509,96.73383283,9343,R,,9,12,,,
+30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,3.88999586,1.941764103,81.65588616,7818,R,9,8,11,,,
+30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.307995914,,76.13443331,4897,R,8,,11,,,
+30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.773218509,96.73383283,7511,R,,9,12,,,
+30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,3.88999586,1.941764103,81.65588616,1761,R,9,8,11,,,
+30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.307995914,,76.13443331,6492,R,8,,11,,,
+30004,202001,100,64,81,0.1,0.1,,,,,,1.773218509,96.73383283,64,R,,9,12,,,
+30004,202002,100,2113,81,0.1,0.1,,,,,3.88999586,1.941764103,81.65588616,2113,R,9,8,11,,,TRUE
+30004,202003,100,185,81,0.1,0.1,,,,,1.307995914,,76.13443331,185,R,8,,11,,,
+30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.773218509,96.73383283,844,R,,9,12,,,
+30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,3.88999586,1.941764103,81.65588616,897,R,9,8,11,,,
+30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.307995914,,76.13443331,280,R,8,,11,,,
+30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.773218509,96.73383283,1869,R,,9,12,,,
+30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,3.88999586,1.941764103,81.65588616,1876,R,9,8,11,,,
+30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.307995914,,76.13443331,1371,R,8,,11,,,
+30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.773218509,96.73383283,12769,R,,9,12,,,
+30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,3.88999586,1.941764103,81.65588616,2853,R,9,8,11,,,
+30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.307995914,,76.13443331,11491,R,8,,11,,,
+30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.773218509,96.73383283,141,R,,9,12,,TRUE,
+30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,,3.88999586,1.941764103,81.65588616,6001,R,9,8,11,TRUE,TRUE,
+30008,202003,100,433,162,0.1,0.1,0.072138939,,,,1.307995914,,76.13443331,433,R,8,,11,TRUE,,
+30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.773218509,96.73383283,6417,R,,9,12,,,
+30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,3.88999586,1.941764103,81.65588616,4037,R,9,8,11,,,
+30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.307995914,,76.13443331,1322,R,8,,11,,,
+30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.773218509,96.73383283,28963,R,,9,12,,,
+30010,202002,100,21734,144,0.1,0.1,0.750399298,2.064295653,0.750399298,2.064295653,3.88999586,1.941764103,81.65588616,21734,R,9,8,11,,,
+30010,202003,100,10529,144,0.1,0.1,0.484426733,,0.484426733,,1.307995914,,76.13443331,10529,R,8,,11,,,
+30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.773218509,96.73383283,6009,R,,9,12,,TRUE,
+30011,202002,100,1145,5,0.1,0.1,0.190495606,0.226047443,,,3.88999586,1.941764103,81.65588616,1145,R,9,8,11,TRUE,TRUE,
+30011,202003,100,5064,5,0.1,0.1,4.423850085,,,,1.307995914,,76.13443331,5064,R,8,,11,TRUE,,
+30012,202001,100,256,275,0.1,0.1,,0.034032235,,0.034032235,,1.773218509,96.73383283,256,R,,9,12,,,
+30012,202002,100,7522,275,0.1,0.1,29.38390625,,29.38390625,,3.88999586,1.941764103,81.65588616,7522,R,9,8,11,,,
+30012,202003,100,,275,0.1,0.1,,,,,1.307995914,,76.13443331,9838.745268,FIR,8,,11,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv
new file mode 100644
index 00000000..4a24ab5d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv
@@ -0,0 +1,73 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+110001,202001,100,9244,89,0.1,0.1
+110001,202002,100,8916,89,0.1,0.1
+110001,202003,100,6194,89,0.1,0.1
+110002,202001,100,4826,83,0.1,0.1
+110002,202002,100,5903,83,0.1,0.1
+110002,202003,100,4743,83,0.1,0.1
+110003,202001,100,7586,4,0.1,0.1
+110003,202002,100,1016,4,0.1,0.1
+110003,202003,100,1429,4,0.1,0.1
+110004,202001,100,3975,76,0.1,0.1
+110004,202002,100,3044,76,0.1,0.1
+110004,202003,100,3673,76,0.1,0.1
+110005,202001,100,1941,18,0.1,0.1
+110005,202002,100,3121,18,0.1,0.1
+110005,202003,100,1208,18,0.1,0.1
+110006,202001,100,5405,94,0.1,0.1
+110006,202002,100,7084,94,0.1,0.1
+110006,202003,100,4980,94,0.1,0.1
+110007,202001,100,15172,8,0.1,0.1
+110007,202002,100,2845,8,0.1,0.1
+110007,202003,100,3501,8,0.1,0.1
+110008,202001,100,16298,304,0.1,0.1
+110008,202002,100,14429,304,0.1,0.1
+110008,202003,100,14295,304,0.1,0.1
+110009,202001,100,3698,45,0.1,0.1
+110009,202002,100,4993,45,0.1,0.1
+110009,202003,100,4212,45,0.1,0.1
+110010,202001,100,7722,100,0.1,0.1
+110010,202002,100,10153,100,0.1,0.1
+110010,202003,100,6545,100,0.1,0.1
+110011,202001,100,30344,19,0.1,0.1
+110011,202002,100,3627,19,0.1,0.1
+110011,202003,100,7288,19,0.1,0.1
+110012,202001,100,16298,304,0.1,0.1
+110012,202002,100,11567,304,0.1,0.1
+110012,202003,100,,304,0.1,0.1
+110013,202001,200,20190,54,0.1,0.1
+110013,202002,200,18242,54,0.1,0.1
+110013,202003,200,28826,54,0.1,0.1
+110014,202001,200,4260,47,0.1,0.1
+110014,202002,200,5036,42,0.1,0.1
+110014,202003,200,6484,42,0.1,0.1
+110015,202001,200,19236,57,0.1,0.1
+110015,202002,200,4949,57,0.1,0.1
+110015,202003,200,3544,57,0.1,0.1
+110016,202001,200,14902,163,0.1,0.1
+110016,202002,200,16435,163,0.1,0.1
+110016,202003,200,24653,163,0.1,0.1
+110017,202001,200,35476,149,0.1,0.1
+110017,202002,200,50515,149,0.1,0.1
+110017,202003,200,53477,149,0.1,0.1
+110018,202001,200,13845,126,0.1,0.1
+110018,202002,200,25488,126,0.1,0.1
+110018,202003,200,27409,126,0.1,0.1
+110019,202001,200,1099,6,0.1,0.1
+110019,202002,200,434,6,0.1,0.1
+110019,202003,200,124,6,0.1,0.1
+110020,202001,200,3348,22,0.1,0.1
+110020,202002,200,1996,22,0.1,0.1
+110020,202003,200,5051,22,0.1,0.1
+110021,202001,200,29215,108,0.1,0.1
+110021,202002,200,34168,108,0.1,0.1
+110021,202003,200,61628,108,0.1,0.1
+110022,202001,200,6390,67,0.1,0.1
+110022,202002,200,12705,67,0.1,0.1
+110022,202003,200,11966,67,0.1,0.1
+110023,202001,200,4562,18,0.1,0.1
+110023,202002,200,1717,18,0.1,0.1
+110023,202003,200,2371,18,0.1,0.1
+110024,202001,200,,155,0.1,0.1
+110024,202002,200,18782,155,0.1,0.1
+110024,202003,200,21046,155,0.1,0.1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
new file mode 100644
index 00000000..54739537
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -0,0 +1,73 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+80001,202001,100,9244,89,0.1,0.1,,1.036787797,,1.036787797,,2.076255394,107.1910333,9244,R,,10,12,,
+80001,202002,100,8916,89,0.1,0.1,0.964517525,1.43945754,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,8916,R,10,9,12,,
+80001,202003,100,6194,89,0.1,0.1,0.694706146,,0.694706146,,0.918490819,,69.22002885,6194,R,9,,11,,
+80002,202001,100,4826,83,0.1,0.1,,0.817550398,,0.817550398,,2.076255394,107.1910333,4826,R,,10,12,,
+80002,202002,100,5903,83,0.1,0.1,1.223166183,1.244570947,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,5903,R,10,9,12,,
+80002,202003,100,4743,83,0.1,0.1,0.803489751,,0.803489751,,0.918490819,,69.22002885,4743,R,9,,11,,
+80003,202001,100,7586,4,0.1,0.1,,7.466535433,,7.466535433,,2.076255394,107.1910333,7586,R,,10,12,,
+80003,202002,100,1016,4,0.1,0.1,0.133930925,0.710986704,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1016,R,10,9,12,,
+80003,202003,100,1429,4,0.1,0.1,1.406496063,,1.406496063,,0.918490819,,69.22002885,1429,R,9,,11,,
+80004,202001,100,3975,76,0.1,0.1,,1.305847569,,1.305847569,,2.076255394,107.1910333,3975,R,,10,12,,
+80004,202002,100,3044,76,0.1,0.1,0.765786164,0.82875034,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,3044,R,10,9,12,,
+80004,202003,100,3673,76,0.1,0.1,1.206636005,,1.206636005,,0.918490819,,69.22002885,3673,R,9,,11,,
+80005,202001,100,1941,18,0.1,0.1,,0.622072678,,,,2.076255394,107.1910333,1941,R,,10,12,,TRUE
+80005,202002,100,3121,18,0.1,0.1,1.607529208,2.583641738,,,0.884574402,1.133853978,67.10794565,3121,R,10,9,12,TRUE,TRUE
+80005,202003,100,1208,18,0.1,0.1,0.387050567,,0.387050567,,0.918490819,,69.22002885,1208,R,9,,11,,
+80006,202001,100,5405,94,0.1,0.1,,0.763047038,,0.763047038,,2.076255394,107.1910333,5405,R,,10,12,,
+80006,202002,100,7084,94,0.1,0.1,1.310535196,1.422366796,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,7084,R,10,9,12,,
+80006,202003,100,4980,94,0.1,0.1,0.703053532,,0.703053532,,0.918490819,,69.22002885,4980,R,9,,11,,
+80007,202001,100,15172,8,0.1,0.1,,5.333239595,,5.333239595,,2.076255394,107.1910333,15172,R,,10,12,,
+80007,202002,100,2845,8,0.1,0.1,0.187503296,0.812556233,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,2845,R,10,9,12,,
+80007,202003,100,3501,8,0.1,0.1,1.230684055,,1.230684055,,0.918490819,,69.22002885,3501,R,9,,11,,
+80008,202001,100,16298,304,0.1,0.1,,1.129530598,,1.129530598,,2.076255394,107.1910333,16298,R,,10,12,,
+80008,202002,100,14429,304,0.1,0.1,0.885323516,1.009357249,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,14429,R,10,9,12,,
+80008,202003,100,14295,304,0.1,0.1,0.990729498,,0.990729498,,0.918490819,,69.22002885,14295,R,9,,11,,
+80009,202001,100,3698,45,0.1,0.1,,0.740562712,,0.740562712,,2.076255394,107.1910333,3698,R,,10,12,,
+80009,202002,100,4993,45,0.1,0.1,1.350324535,1.185435621,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,4993,R,10,9,12,,
+80009,202003,100,4212,45,0.1,0.1,0.843571749,,0.843571749,,0.918490819,,69.22002885,4212,R,9,,11,,
+80010,202001,100,7722,100,0.1,0.1,,0.760511998,,0.760511998,,2.076255394,107.1910333,7722,R,,10,12,,
+80010,202002,100,10153,100,0.1,0.1,1.314903647,1.551204368,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,10153,R,10,9,12,,
+80010,202003,100,6545,100,0.1,0.1,0.644660382,,,,0.918490819,,69.22002885,6545,R,9,,11,TRUE,
+80011,202001,100,30344,19,0.1,0.1,,8.365866031,,,,2.076255394,107.1910333,30344,R,,10,12,,TRUE
+80011,202002,100,3627,19,0.1,0.1,0.119533351,0.497690693,,,0.884574402,1.133853978,67.10794565,3627,R,10,9,12,TRUE,TRUE
+80011,202003,100,7288,19,0.1,0.1,2.00928009,,,,0.918490819,,69.22002885,7288,R,9,,11,TRUE,
+80012,202001,100,16298,304,0.1,0.1,,1.408940798,,1.408940798,,2.076255394,107.1910333,16298,R,,10,12,,
+80012,202002,100,11567,304,0.1,0.1,0.70975303,,0.70975303,,0.884574402,1.133853978,67.10794565,11567,R,10,9,12,,
+80012,202003,100,,304,0.1,0.1,,,,,0.918490819,,69.22002885,10624.18,FIR,9,,11,,
+80013,202001,200,20190,54,0.1,0.1,,1.106799294,,1.106799294,,1.313944665,186.8459267,20190,R,,9,11,,
+80013,202002,200,18242,54,0.1,0.1,0.903506178,0.632817595,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,18242,R,9,10,12,,
+80013,202003,200,28826,54,0.1,0.1,1.58023419,,1.58023419,,1.246527322,,255.2315185,28826,R,10,,12,,
+80014,202001,200,4260,47,0.1,0.1,,0.845985046,,0.845985046,,1.313944665,186.8459267,4260,R,,9,11,,
+80014,202002,200,5036,42,0.1,0.1,1.182053991,0.776557765,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,5036,R,9,10,12,,
+80014,202003,200,6484,42,0.1,0.1,1.28773421,,1.28773421,,1.246527322,,255.2315185,6484,R,10,,12,,
+80015,202001,200,19236,57,0.1,0.1,,3.886845827,,,,1.313944665,186.8459267,19236,R,,9,11,,TRUE
+80015,202002,200,4949,57,0.1,0.1,0.25727802,1.396267404,,1.396267404,0.998929763,0.857954645,197.1492703,4949,R,9,10,12,TRUE,
+80015,202003,200,3544,57,0.1,0.1,0.716195191,,0.716195191,,1.246527322,,255.2315185,3544,R,10,,12,,
+80016,202001,200,14902,163,0.1,0.1,,0.906730921,,0.906730921,,1.313944665,186.8459267,14902,R,,9,11,,
+80016,202002,200,16435,163,0.1,0.1,1.102863018,0.666628808,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,16435,R,9,10,12,,
+80016,202003,200,24653,163,0.1,0.1,1.500085186,,1.500085186,,1.246527322,,255.2315185,24653,R,10,,12,,
+80017,202001,200,35476,149,0.1,0.1,,0.702275751,,0.702275751,,1.313944665,186.8459267,35476,R,,9,11,,
+80017,202002,200,50515,149,0.1,0.1,1.42394209,0.944611909,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,50515,R,9,10,12,,
+80017,202003,200,53477,149,0.1,0.1,1.058635817,,1.058635817,,1.246527322,,255.2315185,53477,R,10,,12,,
+80018,202001,200,13845,126,0.1,0.1,,0.543204684,,0.543204684,,1.313944665,186.8459267,13845,R,,9,11,,
+80018,202002,200,25488,126,0.1,0.1,1.840926688,0.929916997,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,25488,R,9,10,12,,
+80018,202003,200,27409,126,0.1,0.1,1.075364795,,1.075364795,,1.246527322,,255.2315185,27409,R,10,,12,,
+80019,202001,200,1099,6,0.1,0.1,,2.530969376,,2.530969376,,1.313944665,186.8459267,1099,R,,9,11,,
+80019,202002,200,434,6,0.1,0.1,0.395105531,3.51659919,0.395105531,,0.998929763,0.857954645,197.1492703,434,R,9,10,12,,TRUE
+80019,202003,200,124,6,0.1,0.1,0.284365646,,,,1.246527322,,255.2315185,124,R,10,,12,TRUE,
+80020,202001,200,3348,22,0.1,0.1,,1.677715809,,1.677715809,,1.313944665,186.8459267,3348,R,,9,11,,
+80020,202002,200,1996,22,0.1,0.1,0.596048505,0.395102278,0.596048505,,0.998929763,0.857954645,197.1492703,1996,R,9,10,12,,TRUE
+80020,202003,200,5051,22,0.1,0.1,2.530990214,,,,1.246527322,,255.2315185,5051,R,10,,12,TRUE,
+80021,202001,200,29215,108,0.1,0.1,,0.855047659,,0.855047659,,1.313944665,186.8459267,29215,R,,9,11,,
+80021,202002,200,34168,108,0.1,0.1,1.169525453,0.554422016,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,34168,R,9,10,12,,
+80021,202003,200,61628,108,0.1,0.1,1.803680177,,1.803680177,,1.246527322,,255.2315185,61628,R,10,,12,,
+80022,202001,200,6390,67,0.1,0.1,,0.502948427,,,,1.313944665,186.8459267,6390,R,,9,11,,TRUE
+80022,202002,200,12705,67,0.1,0.1,1.98827543,1.061751691,,1.061751691,0.998929763,0.857954645,197.1492703,12705,R,9,10,12,TRUE,
+80022,202003,200,11966,67,0.1,0.1,0.9418398,,0.9418398,,1.246527322,,255.2315185,11966,R,10,,12,,
+80023,202001,200,4562,18,0.1,0.1,,2.656773442,,2.656773442,,1.313944665,186.8459267,4562,R,,9,11,,
+80023,202002,200,1717,18,0.1,0.1,0.376396415,0.724105938,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,1717,R,9,10,12,,
+80023,202003,200,2371,18,0.1,0.1,1.381013395,,1.381013395,,1.246527322,,255.2315185,2371,R,10,,12,,
+80024,202001,200,,155,0.1,0.1,,,,,,1.313944665,186.8459267,24679.03,BI,,9,11,,
+80024,202002,200,18782,155,0.1,0.1,,0.892466323,,0.892466323,0.998929763,0.857954645,197.1492703,18782,R,9,10,12,,
+80024,202003,200,21046,155,0.1,0.1,1.120490459,,1.120490459,,1.246527322,,255.2315185,21046,R,10,,12,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_input.csv
new file mode 100644
index 00000000..2e20dd5d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_input.csv
@@ -0,0 +1,64 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+90001,202001,100,9244,89,0.1,0.1
+90001,202002,100,8916,89,0.1,0.1
+90001,202003,100,6194,89,0.1,0.1
+90002,202001,100,4826,83,0.1,0.1
+90002,202002,100,5903,83,0.1,0.1
+90002,202003,100,4743,83,0.1,0.1
+90003,202001,100,7586,4,0.1,0.1
+90003,202002,100,1016,4,0.1,0.1
+90003,202003,100,1429,4,0.1,0.1
+90004,202001,100,3975,76,0.1,0.1
+90004,202002,100,3044,76,0.1,0.1
+90004,202003,100,3673,76,0.1,0.1
+90005,202001,100,1941,18,0.1,0.1
+90005,202002,100,3121,18,0.1,0.1
+90005,202003,100,1208,18,0.1,0.1
+90006,202001,100,5405,94,0.1,0.1
+90006,202002,100,7084,94,0.1,0.1
+90006,202003,100,4980,94,0.1,0.1
+90007,202001,100,15172,8,0.1,0.1
+90007,202002,100,2845,8,0.1,0.1
+90007,202003,100,3501,8,0.1,0.1
+90008,202001,100,16298,304,0.1,0.1
+90008,202002,100,14429,304,0.1,0.1
+90008,202003,100,14295,304,0.1,0.1
+90009,202001,100,3698,45,0.1,0.1
+90009,202002,100,4993,45,0.1,0.1
+90009,202003,100,4212,45,0.1,0.1
+90010,202001,100,7722,100,0.1,0.1
+90010,202002,100,10153,100,0.1,0.1
+90010,202003,100,6545,100,0.1,0.1
+90011,202001,100,30344,19,0.1,0.1
+90011,202002,100,3627,19,0.1,0.1
+90011,202003,100,7288,19,0.1,0.1
+90012,202001,100,16298,304,0.1,0.1
+90012,202002,100,11567,304,0.1,0.1
+90012,202003,100,13484,304,0.1,0.1
+90013,202001,100,20190,54,0.1,0.1
+90013,202002,100,18242,54,0.1,0.1
+90013,202003,100,28826,54,0.1,0.1
+90014,202001,100,4260,47,0.1,0.1
+90014,202002,100,5036,42,0.1,0.1
+90014,202003,100,6484,42,0.1,0.1
+90015,202001,100,19236,57,0.1,0.1
+90015,202002,100,4949,57,0.1,0.1
+90015,202003,100,3544,57,0.1,0.1
+90016,202001,100,14902,163,0.1,0.1
+90016,202002,100,16435,163,0.1,0.1
+90016,202003,100,24653,163,0.1,0.1
+90017,202001,100,35476,149,0.1,0.1
+90017,202002,100,50515,149,0.1,0.1
+90017,202003,100,53477,149,0.1,0.1
+90018,202001,100,13845,126,0.1,0.1
+90018,202002,100,25488,126,0.1,0.1
+90018,202003,100,27409,126,0.1,0.1
+90019,202001,100,1099,6,0.1,0.1
+90019,202002,100,434,6,0.1,0.1
+90019,202003,100,124,6,0.1,0.1
+90020,202001,100,3348,22,0.1,0.1
+90020,202002,100,1996,22,0.1,0.1
+90020,202003,100,5051,22,0.1,0.1
+90021,202001,100,,155,0.1,0.1
+90021,202002,100,,155,0.1,0.1
+90021,202003,100,21046,155,0.1,0.1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
new file mode 100644
index 00000000..3a0fdef4
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -0,0 +1,64 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+90001,202001,100,9244,89,0.1,0.1,,1.036787797,,1.036787797,,1.835663813,132.8421946,9244,R,,18,20,,
+90001,202002,100,8916,89,0.1,0.1,0.964517525,1.43945754,0.964517525,1.43945754,0.906337253,1.082813901,113.3255814,8916,R,18,18,20,,
+90001,202003,100,6194,89,0.1,0.1,0.694706146,,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,
+90002,202001,100,4826,83,0.1,0.1,,0.817550398,,0.817550398,,1.835663813,132.8421946,4826,R,,18,20,,
+90002,202002,100,5903,83,0.1,0.1,1.223166183,1.244570947,1.223166183,1.244570947,0.906337253,1.082813901,113.3255814,5903,R,18,18,20,,
+90002,202003,100,4743,83,0.1,0.1,0.803489751,,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,
+90003,202001,100,7586,4,0.1,0.1,,7.466535433,,7.466535433,,1.835663813,132.8421946,7586,R,,18,20,,
+90003,202002,100,1016,4,0.1,0.1,0.133930925,0.710986704,0.133930925,0.710986704,0.906337253,1.082813901,113.3255814,1016,R,18,18,20,,
+90003,202003,100,1429,4,0.1,0.1,1.406496063,,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,
+90004,202001,100,3975,76,0.1,0.1,,1.305847569,,1.305847569,,1.835663813,132.8421946,3975,R,,18,20,,
+90004,202002,100,3044,76,0.1,0.1,0.765786164,0.82875034,0.765786164,0.82875034,0.906337253,1.082813901,113.3255814,3044,R,18,18,20,,
+90004,202003,100,3673,76,0.1,0.1,1.206636005,,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,
+90005,202001,100,1941,18,0.1,0.1,,0.622072678,,0.622072678,,1.835663813,132.8421946,1941,R,,18,20,,
+90005,202002,100,3121,18,0.1,0.1,1.607529208,2.583641738,1.607529208,2.583641738,0.906337253,1.082813901,113.3255814,3121,R,18,18,20,,
+90005,202003,100,1208,18,0.1,0.1,0.387050567,,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,
+90006,202001,100,5405,94,0.1,0.1,,0.763047038,,0.763047038,,1.835663813,132.8421946,5405,R,,18,20,,
+90006,202002,100,7084,94,0.1,0.1,1.310535196,1.422366796,1.310535196,1.422366796,0.906337253,1.082813901,113.3255814,7084,R,18,18,20,,
+90006,202003,100,4980,94,0.1,0.1,0.703053532,,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,
+90007,202001,100,15172,8,0.1,0.1,,5.333239595,,5.333239595,,1.835663813,132.8421946,15172,R,,18,20,,
+90007,202002,100,2845,8,0.1,0.1,0.187503296,0.812556233,0.187503296,0.812556233,0.906337253,1.082813901,113.3255814,2845,R,18,18,20,,
+90007,202003,100,3501,8,0.1,0.1,1.230684055,,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,
+90008,202001,100,16298,304,0.1,0.1,,1.129530598,,1.129530598,,1.835663813,132.8421946,16298,R,,18,20,,
+90008,202002,100,14429,304,0.1,0.1,0.885323516,1.009357249,0.885323516,1.009357249,0.906337253,1.082813901,113.3255814,14429,R,18,18,20,,
+90008,202003,100,14295,304,0.1,0.1,0.990729498,,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,
+90009,202001,100,3698,45,0.1,0.1,,0.740562712,,0.740562712,,1.835663813,132.8421946,3698,R,,18,20,,
+90009,202002,100,4993,45,0.1,0.1,1.350324535,1.185435621,1.350324535,1.185435621,0.906337253,1.082813901,113.3255814,4993,R,18,18,20,,
+90009,202003,100,4212,45,0.1,0.1,0.843571749,,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,
+90010,202001,100,7722,100,0.1,0.1,,0.760511998,,0.760511998,,1.835663813,132.8421946,7722,R,,18,20,,
+90010,202002,100,10153,100,0.1,0.1,1.314903647,1.551204368,1.314903647,1.551204368,0.906337253,1.082813901,113.3255814,10153,R,18,18,20,,
+90010,202003,100,6545,100,0.1,0.1,0.644660382,,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,
+90011,202001,100,30344,19,0.1,0.1,,8.365866031,,,,1.835663813,132.8421946,30344,R,,18,20,,TRUE
+90011,202002,100,3627,19,0.1,0.1,0.119533351,0.497690693,,0.497690693,0.906337253,1.082813901,113.3255814,3627,R,18,18,20,TRUE,
+90011,202003,100,7288,19,0.1,0.1,2.00928009,,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,
+90012,202001,100,16298,304,0.1,0.1,,1.408940798,,1.408940798,,1.835663813,132.8421946,16298,R,,18,20,,
+90012,202002,100,11567,304,0.1,0.1,0.70975303,0.857831504,0.70975303,0.857831504,0.906337253,1.082813901,113.3255814,11567,R,18,18,20,,
+90012,202003,100,13484,304,0.1,0.1,1.165730094,,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,
+90013,202001,100,20190,54,0.1,0.1,,1.106799294,,1.106799294,,1.835663813,132.8421946,20190,R,,18,20,,
+90013,202002,100,18242,54,0.1,0.1,0.903506178,0.632817595,0.903506178,0.632817595,0.906337253,1.082813901,113.3255814,18242,R,18,18,20,,
+90013,202003,100,28826,54,0.1,0.1,1.58023419,,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,
+90014,202001,100,4260,47,0.1,0.1,,0.845985046,,0.845985046,,1.835663813,132.8421946,4260,R,,18,20,,
+90014,202002,100,5036,42,0.1,0.1,1.182053991,0.776557765,1.182053991,0.776557765,0.906337253,1.082813901,113.3255814,5036,R,18,18,20,,
+90014,202003,100,6484,42,0.1,0.1,1.28773421,,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,
+90015,202001,100,19236,57,0.1,0.1,,3.886845827,,3.886845827,,1.835663813,132.8421946,19236,R,,18,20,,
+90015,202002,100,4949,57,0.1,0.1,0.25727802,1.396267404,0.25727802,1.396267404,0.906337253,1.082813901,113.3255814,4949,R,18,18,20,,
+90015,202003,100,3544,57,0.1,0.1,0.716195191,,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,
+90016,202001,100,14902,163,0.1,0.1,,0.906730921,,0.906730921,,1.835663813,132.8421946,14902,R,,18,20,,
+90016,202002,100,16435,163,0.1,0.1,1.102863018,0.666628808,1.102863018,0.666628808,0.906337253,1.082813901,113.3255814,16435,R,18,18,20,,
+90016,202003,100,24653,163,0.1,0.1,1.500085186,,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,
+90017,202001,100,35476,149,0.1,0.1,,0.702275751,,0.702275751,,1.835663813,132.8421946,35476,R,,18,20,,
+90017,202002,100,50515,149,0.1,0.1,1.42394209,0.944611909,1.42394209,0.944611909,0.906337253,1.082813901,113.3255814,50515,R,18,18,20,,
+90017,202003,100,53477,149,0.1,0.1,1.058635817,,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,
+90018,202001,100,13845,126,0.1,0.1,,0.543204684,,,,1.835663813,132.8421946,13845,R,,18,20,,TRUE
+90018,202002,100,25488,126,0.1,0.1,1.840926688,0.929916997,,0.929916997,0.906337253,1.082813901,113.3255814,25488,R,18,18,20,TRUE,
+90018,202003,100,27409,126,0.1,0.1,1.075364795,,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,
+90019,202001,100,1099,6,0.1,0.1,,2.530969376,,2.530969376,,1.835663813,132.8421946,1099,R,,18,20,,
+90019,202002,100,434,6,0.1,0.1,0.395105531,3.51659919,0.395105531,,0.906337253,1.082813901,113.3255814,434,R,18,18,20,,TRUE
+90019,202003,100,124,6,0.1,0.1,0.284365646,,,,1.072463185,,126.2596455,124,R,18,,21,TRUE,
+90020,202001,100,3348,22,0.1,0.1,,1.677715809,,1.677715809,,1.835663813,132.8421946,3348,R,,18,20,,
+90020,202002,100,1996,22,0.1,0.1,0.596048505,0.395102278,0.596048505,,0.906337253,1.082813901,113.3255814,1996,R,18,18,20,,TRUE
+90020,202003,100,5051,22,0.1,0.1,2.530990214,,,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,
+90021,202001,100,,155,0.1,0.1,,,,,,1.835663813,132.8421946,41832.76156,BI,,18,20,,
+90021,202002,100,,155,0.1,0.1,,,,,0.906337253,1.082813901,113.3255814,22788.90135,BI,18,18,20,,
+90021,202003,100,21046,155,0.1,0.1,,,,,1.072463185,,126.2596455,21046,R,18,,21,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_input.csv
new file mode 100644
index 00000000..3ff1ab70
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_input.csv
@@ -0,0 +1,64 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+100001,202001,100,9244,89,0.05,0.05
+100001,202002,100,8916,89,0.05,0.05
+100001,202003,100,6194,89,0.05,0.05
+100002,202001,100,4826,83,0.05,0.05
+100002,202002,100,5903,83,0.05,0.05
+100002,202003,100,4743,83,0.05,0.05
+100003,202001,100,7586,4,0.05,0.05
+100003,202002,100,1016,4,0.05,0.05
+100003,202003,100,1429,4,0.05,0.05
+100004,202001,100,3975,76,0.05,0.05
+100004,202002,100,3044,76,0.05,0.05
+100004,202003,100,3673,76,0.05,0.05
+100005,202001,100,1941,18,0.05,0.05
+100005,202002,100,3121,18,0.05,0.05
+100005,202003,100,1208,18,0.05,0.05
+100006,202001,100,5405,94,0.05,0.05
+100006,202002,100,7084,94,0.05,0.05
+100006,202003,100,4980,94,0.05,0.05
+100007,202001,100,15172,8,0.05,0.05
+100007,202002,100,2845,8,0.05,0.05
+100007,202003,100,3501,8,0.05,0.05
+100008,202001,100,16298,304,0.05,0.05
+100008,202002,100,14429,304,0.05,0.05
+100008,202003,100,14295,304,0.05,0.05
+100009,202001,100,3698,45,0.05,0.05
+100009,202002,100,4993,45,0.05,0.05
+100009,202003,100,4212,45,0.05,0.05
+100010,202001,100,7722,100,0.05,0.05
+100010,202002,100,10153,100,0.05,0.05
+100010,202003,100,6545,100,0.05,0.05
+100011,202001,100,30344,19,0.05,0.05
+100011,202002,100,3627,19,0.05,0.05
+100011,202003,100,7288,19,0.05,0.05
+100012,202001,100,16298,304,0.05,0.05
+100012,202002,100,11567,304,0.05,0.05
+100012,202003,100,13484,304,0.05,0.05
+100013,202001,100,20190,54,0.05,0.05
+100013,202002,100,18242,54,0.05,0.05
+100013,202003,100,28826,54,0.05,0.05
+100014,202001,100,4260,47,0.05,0.05
+100014,202002,100,5036,42,0.05,0.05
+100014,202003,100,6484,42,0.05,0.05
+100015,202001,100,19236,57,0.05,0.05
+100015,202002,100,4949,57,0.05,0.05
+100015,202003,100,3544,57,0.05,0.05
+100016,202001,100,14902,163,0.05,0.05
+100016,202002,100,16435,163,0.05,0.05
+100016,202003,100,24653,163,0.05,0.05
+100017,202001,100,35476,149,0.05,0.05
+100017,202002,100,50515,149,0.05,0.05
+100017,202003,100,53477,149,0.05,0.05
+100018,202001,100,13845,126,0.05,0.05
+100018,202002,100,25488,126,0.05,0.05
+100018,202003,100,27409,126,0.05,0.05
+100019,202001,100,1099,6,0.05,0.05
+100019,202002,100,434,6,0.05,0.05
+100019,202003,100,124,6,0.05,0.05
+100020,202001,100,3348,22,0.05,0.05
+100020,202002,100,1996,22,0.05,0.05
+100020,202003,100,5051,22,0.05,0.05
+100021,202001,100,,155,0.05,0.05
+100021,202002,100,,155,0.05,0.05
+100021,202003,100,21046,155,0.05,0.05
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
new file mode 100644
index 00000000..83b82bde
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -0,0 +1,64 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+100001,202001,100,9244,89,0.05,0.05,,1.036787797,,1.036787797,,2.097550968,132.8421946,9244,R,,20,20,,
+100001,202002,100,8916,89,0.05,0.05,0.964517525,1.43945754,0.964517525,1.43945754,0.91372653,1.170117584,113.3255814,8916,R,20,20,20,,
+100001,202003,100,6194,89,0.05,0.05,0.694706146,,0.694706146,,1.105984659,,126.2596455,6194,R,20,,21,,
+100002,202001,100,4826,83,0.05,0.05,,0.817550398,,0.817550398,,2.097550968,132.8421946,4826,R,,20,20,,
+100002,202002,100,5903,83,0.05,0.05,1.223166183,1.244570947,1.223166183,1.244570947,0.91372653,1.170117584,113.3255814,5903,R,20,20,20,,
+100002,202003,100,4743,83,0.05,0.05,0.803489751,,0.803489751,,1.105984659,,126.2596455,4743,R,20,,21,,
+100003,202001,100,7586,4,0.05,0.05,,7.466535433,,7.466535433,,2.097550968,132.8421946,7586,R,,20,20,,
+100003,202002,100,1016,4,0.05,0.05,0.133930925,0.710986704,0.133930925,0.710986704,0.91372653,1.170117584,113.3255814,1016,R,20,20,20,,
+100003,202003,100,1429,4,0.05,0.05,1.406496063,,1.406496063,,1.105984659,,126.2596455,1429,R,20,,21,,
+100004,202001,100,3975,76,0.05,0.05,,1.305847569,,1.305847569,,2.097550968,132.8421946,3975,R,,20,20,,
+100004,202002,100,3044,76,0.05,0.05,0.765786164,0.82875034,0.765786164,0.82875034,0.91372653,1.170117584,113.3255814,3044,R,20,20,20,,
+100004,202003,100,3673,76,0.05,0.05,1.206636005,,1.206636005,,1.105984659,,126.2596455,3673,R,20,,21,,
+100005,202001,100,1941,18,0.05,0.05,,0.622072678,,0.622072678,,2.097550968,132.8421946,1941,R,,20,20,,
+100005,202002,100,3121,18,0.05,0.05,1.607529208,2.583641738,1.607529208,2.583641738,0.91372653,1.170117584,113.3255814,3121,R,20,20,20,,
+100005,202003,100,1208,18,0.05,0.05,0.387050567,,0.387050567,,1.105984659,,126.2596455,1208,R,20,,21,,
+100006,202001,100,5405,94,0.05,0.05,,0.763047038,,0.763047038,,2.097550968,132.8421946,5405,R,,20,20,,
+100006,202002,100,7084,94,0.05,0.05,1.310535196,1.422366796,1.310535196,1.422366796,0.91372653,1.170117584,113.3255814,7084,R,20,20,20,,
+100006,202003,100,4980,94,0.05,0.05,0.703053532,,0.703053532,,1.105984659,,126.2596455,4980,R,20,,21,,
+100007,202001,100,15172,8,0.05,0.05,,5.333239595,,5.333239595,,2.097550968,132.8421946,15172,R,,20,20,,
+100007,202002,100,2845,8,0.05,0.05,0.187503296,0.812556233,0.187503296,0.812556233,0.91372653,1.170117584,113.3255814,2845,R,20,20,20,,
+100007,202003,100,3501,8,0.05,0.05,1.230684055,,1.230684055,,1.105984659,,126.2596455,3501,R,20,,21,,
+100008,202001,100,16298,304,0.05,0.05,,1.129530598,,1.129530598,,2.097550968,132.8421946,16298,R,,20,20,,
+100008,202002,100,14429,304,0.05,0.05,0.885323516,1.009357249,0.885323516,1.009357249,0.91372653,1.170117584,113.3255814,14429,R,20,20,20,,
+100008,202003,100,14295,304,0.05,0.05,0.990729498,,0.990729498,,1.105984659,,126.2596455,14295,R,20,,21,,
+100009,202001,100,3698,45,0.05,0.05,,0.740562712,,0.740562712,,2.097550968,132.8421946,3698,R,,20,20,,
+100009,202002,100,4993,45,0.05,0.05,1.350324535,1.185435621,1.350324535,1.185435621,0.91372653,1.170117584,113.3255814,4993,R,20,20,20,,
+100009,202003,100,4212,45,0.05,0.05,0.843571749,,0.843571749,,1.105984659,,126.2596455,4212,R,20,,21,,
+100010,202001,100,7722,100,0.05,0.05,,0.760511998,,0.760511998,,2.097550968,132.8421946,7722,R,,20,20,,
+100010,202002,100,10153,100,0.05,0.05,1.314903647,1.551204368,1.314903647,1.551204368,0.91372653,1.170117584,113.3255814,10153,R,20,20,20,,
+100010,202003,100,6545,100,0.05,0.05,0.644660382,,0.644660382,,1.105984659,,126.2596455,6545,R,20,,21,,
+100011,202001,100,30344,19,0.05,0.05,,8.365866031,,8.365866031,,2.097550968,132.8421946,30344,R,,20,20,,
+100011,202002,100,3627,19,0.05,0.05,0.119533351,0.497690693,0.119533351,0.497690693,0.91372653,1.170117584,113.3255814,3627,R,20,20,20,,
+100011,202003,100,7288,19,0.05,0.05,2.00928009,,2.00928009,,1.105984659,,126.2596455,7288,R,20,,21,,
+100012,202001,100,16298,304,0.05,0.05,,1.408940798,,1.408940798,,2.097550968,132.8421946,16298,R,,20,20,,
+100012,202002,100,11567,304,0.05,0.05,0.70975303,0.857831504,0.70975303,0.857831504,0.91372653,1.170117584,113.3255814,11567,R,20,20,20,,
+100012,202003,100,13484,304,0.05,0.05,1.165730094,,1.165730094,,1.105984659,,126.2596455,13484,R,20,,21,,
+100013,202001,100,20190,54,0.05,0.05,,1.106799294,,1.106799294,,2.097550968,132.8421946,20190,R,,20,20,,
+100013,202002,100,18242,54,0.05,0.05,0.903506178,0.632817595,0.903506178,0.632817595,0.91372653,1.170117584,113.3255814,18242,R,20,20,20,,
+100013,202003,100,28826,54,0.05,0.05,1.58023419,,1.58023419,,1.105984659,,126.2596455,28826,R,20,,21,,
+100014,202001,100,4260,47,0.05,0.05,,0.845985046,,0.845985046,,2.097550968,132.8421946,4260,R,,20,20,,
+100014,202002,100,5036,42,0.05,0.05,1.182053991,0.776557765,1.182053991,0.776557765,0.91372653,1.170117584,113.3255814,5036,R,20,20,20,,
+100014,202003,100,6484,42,0.05,0.05,1.28773421,,1.28773421,,1.105984659,,126.2596455,6484,R,20,,21,,
+100015,202001,100,19236,57,0.05,0.05,,3.886845827,,3.886845827,,2.097550968,132.8421946,19236,R,,20,20,,
+100015,202002,100,4949,57,0.05,0.05,0.25727802,1.396267404,0.25727802,1.396267404,0.91372653,1.170117584,113.3255814,4949,R,20,20,20,,
+100015,202003,100,3544,57,0.05,0.05,0.716195191,,0.716195191,,1.105984659,,126.2596455,3544,R,20,,21,,
+100016,202001,100,14902,163,0.05,0.05,,0.906730921,,0.906730921,,2.097550968,132.8421946,14902,R,,20,20,,
+100016,202002,100,16435,163,0.05,0.05,1.102863018,0.666628808,1.102863018,0.666628808,0.91372653,1.170117584,113.3255814,16435,R,20,20,20,,
+100016,202003,100,24653,163,0.05,0.05,1.500085186,,1.500085186,,1.105984659,,126.2596455,24653,R,20,,21,,
+100017,202001,100,35476,149,0.05,0.05,,0.702275751,,0.702275751,,2.097550968,132.8421946,35476,R,,20,20,,
+100017,202002,100,50515,149,0.05,0.05,1.42394209,0.944611909,1.42394209,0.944611909,0.91372653,1.170117584,113.3255814,50515,R,20,20,20,,
+100017,202003,100,53477,149,0.05,0.05,1.058635817,,1.058635817,,1.105984659,,126.2596455,53477,R,20,,21,,
+100018,202001,100,13845,126,0.05,0.05,,0.543204684,,0.543204684,,2.097550968,132.8421946,13845,R,,20,20,,
+100018,202002,100,25488,126,0.05,0.05,1.840926688,0.929916997,1.840926688,0.929916997,0.91372653,1.170117584,113.3255814,25488,R,20,20,20,,
+100018,202003,100,27409,126,0.05,0.05,1.075364795,,1.075364795,,1.105984659,,126.2596455,27409,R,20,,21,,
+100019,202001,100,1099,6,0.05,0.05,,2.530969376,,2.530969376,,2.097550968,132.8421946,1099,R,,20,20,,
+100019,202002,100,434,6,0.05,0.05,0.395105531,3.51659919,0.395105531,3.51659919,0.91372653,1.170117584,113.3255814,434,R,20,20,20,,
+100019,202003,100,124,6,0.05,0.05,0.284365646,,0.284365646,,1.105984659,,126.2596455,124,R,20,,21,,
+100020,202001,100,3348,22,0.05,0.05,,1.677715809,,1.677715809,,2.097550968,132.8421946,3348,R,,20,20,,
+100020,202002,100,1996,22,0.05,0.05,0.596048505,0.395102278,0.596048505,0.395102278,0.91372653,1.170117584,113.3255814,1996,R,20,20,20,,
+100020,202003,100,5051,22,0.05,0.05,2.530990214,,2.530990214,,1.105984659,,126.2596455,5051,R,20,,21,,
+100021,202001,100,,155,0.05,0.05,,,,,,2.097550968,132.8421946,51654.90822,BI,,20,20,,
+100021,202002,100,,155,0.05,0.05,,,,,0.91372653,1.170117584,113.3255814,24626.29467,BI,20,20,20,,
+100021,202003,100,21046,155,0.05,0.05,,,,,1.105984659,,126.2596455,21046,R,20,,21,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_input.csv
new file mode 100644
index 00000000..dca0e398
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_input.csv
@@ -0,0 +1,35 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c
+30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.598925527,96.75644028,8444,R,,10,12
+30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,6.802558774,4.305953095,76.3852459,7476,R,10,9,12
+30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.126581418,,66.21860465,2003,R,9,,9
+30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.930792743,96.75644028,9343,R,,10,12
+30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,6.802558774,4.305953095,76.3852459,7818,R,10,9,12
+30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.126581418,,66.21860465,4897,R,9,,9
+30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.930792743,96.75644028,7511,R,,10,12
+30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,6.802558774,4.305953095,76.3852459,1761,R,10,9,12
+30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.126581418,,66.21860465,6492,R,9,,9
+30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.930792743,96.75644028,64,R,,10,12
+30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,6.802558774,4.305953095,76.3852459,2113,R,10,9,12
+30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.126581418,,66.21860465,185,R,9,,9
+30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.930792743,96.75644028,844,R,,10,12
+30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,6.802558774,4.305953095,76.3852459,897,R,10,9,12
+30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.126581418,,66.21860465,280,R,9,,9
+30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.930792743,96.75644028,1869,R,,10,12
+30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,6.802558774,4.305953095,76.3852459,1876,R,10,9,12
+30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.126581418,,66.21860465,1371,R,9,,9
+30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.930792743,96.75644028,12769,R,,10,12
+30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,6.802558774,4.305953095,76.3852459,2853,R,10,9,12
+30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.126581418,,66.21860465,11491,R,9,,9
+30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.930792743,96.75644028,141,R,,10,12
+30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,13.86213906,6.802558774,4.305953095,76.3852459,6001,R,10,9,12
+30008,202003,100,433,162,0.1,0.1,0.072138939,,0.072138939,,1.126581418,,66.21860465,433,R,9,,9
+30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.930792743,96.75644028,6417,R,,10,12
+30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,6.802558774,4.305953095,76.3852459,4037,R,10,9,12
+30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.126581418,,66.21860465,1322,R,9,,9
+30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.930792743,96.75644028,28963,R,,10,12
+30010,202002,100,21734,144,0.1,0.1,0.750399298,,0.750399298,,6.802558774,4.305953095,76.3852459,21734,R,10,9,12
+30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.930792743,96.75644028,6009,R,,10,12
+30011,202002,100,1145,5,0.1,0.1,0.190495606,,,,6.802558774,4.305953095,76.3852459,1145,R,10,9,12
+30012,202001,100,256,275,0.1,0.1,,0.034032235,,0.034032235,,1.930792743,96.75644028,256,R,,10,12
+30012,202002,100,7522,275,0.1,0.1,29.38390625,,29.38390625,,6.802558774,4.305953095,76.3852459,7522,R,10,9,12
+30012,202003,100,,275,0.1,0.1,,,,,1.126581418,,66.21860465,8474.145427,FIR,9,,9
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
new file mode 100644
index 00000000..5ad2a0ab
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -0,0 +1,35 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.598925527,96.75644028,8444,R,,10,12,,
+30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,6.802558774,4.305953095,76.3852459,7476,R,10,9,12,,
+30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.126581418,,66.21860465,2003,R,9,,9,,
+30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.930792743,96.75644028,9343,R,,10,12,,
+30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,6.802558774,4.305953095,76.3852459,7818,R,10,9,12,,
+30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.126581418,,66.21860465,4897,R,9,,9,,
+30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.930792743,96.75644028,7511,R,,10,12,,
+30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,6.802558774,4.305953095,76.3852459,1761,R,10,9,12,,
+30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.126581418,,66.21860465,6492,R,9,,9,,
+30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.930792743,96.75644028,64,R,,10,12,,
+30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,6.802558774,4.305953095,76.3852459,2113,R,10,9,12,,
+30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.126581418,,66.21860465,185,R,9,,9,,
+30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.930792743,96.75644028,844,R,,10,12,,
+30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,6.802558774,4.305953095,76.3852459,897,R,10,9,12,,
+30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.126581418,,66.21860465,280,R,9,,9,,
+30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.930792743,96.75644028,1869,R,,10,12,,
+30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,6.802558774,4.305953095,76.3852459,1876,R,10,9,12,,
+30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.126581418,,66.21860465,1371,R,9,,9,,
+30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.930792743,96.75644028,12769,R,,10,12,,
+30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,6.802558774,4.305953095,76.3852459,2853,R,10,9,12,,
+30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.126581418,,66.21860465,11491,R,9,,9,,
+30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.930792743,96.75644028,141,R,,10,12,,TRUE
+30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,13.86213906,6.802558774,4.305953095,76.3852459,6001,R,10,9,12,TRUE,
+30008,202003,100,433,162,0.1,0.1,0.072138939,,0.072138939,,1.126581418,,66.21860465,433,R,9,,9,,
+30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.930792743,96.75644028,6417,R,,10,12,,
+30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,6.802558774,4.305953095,76.3852459,4037,R,10,9,12,,
+30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.126581418,,66.21860465,1322,R,9,,9,,
+30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.930792743,96.75644028,28963,R,,10,12,,
+30010,202002,100,21734,144,0.1,0.1,0.750399298,,0.750399298,,6.802558774,4.305953095,76.3852459,21734,R,10,9,12,,
+30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.930792743,96.75644028,6009,R,,10,12,,TRUE
+30011,202002,100,1145,5,0.1,0.1,0.190495606,,,,6.802558774,4.305953095,76.3852459,1145,R,10,9,12,TRUE,
+30012,202001,100,256,275,0.1,0.1,,0.034032235,,0.034032235,,1.930792743,96.75644028,256,R,,10,12,,
+30012,202002,100,7522,275,0.1,0.1,29.38390625,,29.38390625,,6.802558774,4.305953095,76.3852459,7522,R,10,9,12,,
+30012,202003,100,,275,0.1,0.1,,,,,1.126581418,,66.21860465,8474.145427,FIR,9,,9,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_input.csv
new file mode 100644
index 00000000..152f6772
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_input.csv
@@ -0,0 +1,64 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,,,,
+90001,202001,100,9244,89,0.1,0.1,,,,
+90001,202002,100,8916,89,0.1,0.1,,,,
+90001,202003,100,6194,89,0.1,0.1,,,,
+90002,202001,100,4826,83,0.1,0.1,,,,
+90002,202002,100,5903,83,0.1,0.1,,,,
+90002,202003,100,4743,83,0.1,0.1,,,,
+90003,202001,100,7586,4,0.1,0.1,,,,
+90003,202002,100,1016,4,0.1,0.1,,,,
+90003,202003,100,1429,4,0.1,0.1,,,,
+90004,202001,100,3975,76,0.1,0.1,,,,
+90004,202002,100,3044,76,0.1,0.1,,,,
+90004,202003,100,3673,76,0.1,0.1,,,,
+90005,202001,100,1941,18,0.1,0.1,,,,
+90005,202002,100,3121,18,0.1,0.1,,,,
+90005,202003,100,1208,18,0.1,0.1,,,,
+90006,202001,100,5405,94,0.1,0.1,,,,
+90006,202002,100,7084,94,0.1,0.1,,,,
+90006,202003,100,4980,94,0.1,0.1,,,,
+90007,202001,100,15172,8,0.1,0.1,,,,
+90007,202002,100,2845,8,0.1,0.1,,,,
+90007,202003,100,3501,8,0.1,0.1,,,,
+90008,202001,100,16298,304,0.1,0.1,,,,
+90008,202002,100,14429,304,0.1,0.1,,,,
+90008,202003,100,14295,304,0.1,0.1,,,,
+90009,202001,100,3698,45,0.1,0.1,,,,
+90009,202002,100,4993,45,0.1,0.1,,,,
+90009,202003,100,4212,45,0.1,0.1,,,,
+90010,202001,100,7722,100,0.1,0.1,,,,
+90010,202002,100,10153,100,0.1,0.1,,,,
+90010,202003,100,6545,100,0.1,0.1,,,,
+90011,202001,100,30344,19,0.1,0.1,,,,
+90011,202002,100,3627,19,0.1,0.1,,,,
+90011,202003,100,7288,19,0.1,0.1,,,,
+90012,202001,100,16298,304,0.1,0.1,,,,
+90012,202002,100,11567,304,0.1,0.1,,,,
+90012,202003,100,13484,304,0.1,0.1,,,,
+90013,202001,100,20190,54,0.1,0.1,,,,
+90013,202002,100,18242,54,0.1,0.1,,,,
+90013,202003,100,28826,54,0.1,0.1,,,,
+90014,202001,100,4260,47,0.1,0.1,,,,
+90014,202002,100,5036,42,0.1,0.1,,,,
+90014,202003,100,6484,42,0.1,0.1,,,,
+90015,202001,100,19236,57,0.1,0.1,,,,
+90015,202002,100,4949,57,0.1,0.1,,,,
+90015,202003,100,3544,57,0.1,0.1,,,,
+90016,202001,100,14902,163,0.1,0.1,,,,
+90016,202002,100,16435,163,0.1,0.1,,,,
+90016,202003,100,24653,163,0.1,0.1,,,,
+90017,202001,100,35476,149,0.1,0.1,,,,
+90017,202002,100,50515,149,0.1,0.1,,,,
+90017,202003,100,53477,149,0.1,0.1,,,,
+90018,202001,100,13845,126,0.1,0.1,,,,
+90018,202002,100,25488,126,0.1,0.1,,,,
+90018,202003,100,27409,126,0.1,0.1,,,,
+90019,202001,100,1099,6,0.1,0.1,,,,
+90019,202002,100,434,6,0.1,0.1,,,,
+90019,202003,100,124,6,0.1,0.1,,,,
+90020,202001,100,3348,22,0.1,0.1,,,,
+90020,202002,100,1996,22,0.1,0.1,,,,
+90020,202003,100,5051,22,0.1,0.1,,,,
+90021,202001,100,,155,0.1,0.1,,,,
+90021,202002,100,,155,0.1,0.1,,,,
+90021,202003,100,21046,155,0.1,0.1,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
new file mode 100644
index 00000000..27c28265
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -0,0 +1,64 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
+90001,202001,100,9244,89,0.1,0.1,,1.036787797,,1.036787797,,1.504436071,128.8429705,9244,R,,17,19,,,
+90001,202002,100,8916,89,0.1,0.1,0.964517525,1.43945754,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,8916,R,17,18,20,,,
+90001,202003,100,6194,89,0.1,0.1,0.694706146,,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,,
+90002,202001,100,4826,83,0.1,0.1,,0.817550398,,0.817550398,,1.504436071,128.8429705,4826,R,,17,19,,,
+90002,202002,100,5903,83,0.1,0.1,1.223166183,1.244570947,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,5903,R,17,18,20,,,
+90002,202003,100,4743,83,0.1,0.1,0.803489751,,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,,
+90003,202001,100,7586,4,0.1,0.1,,,,,,1.504436071,128.8429705,7586,R,,17,19,,,TRUE
+90003,202002,100,1016,4,0.1,0.1,,0.710986704,,0.710986704,0.95177292,1.082813901,113.3255814,1016,R,17,18,20,,,
+90003,202003,100,1429,4,0.1,0.1,1.406496063,,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,,
+90004,202001,100,3975,76,0.1,0.1,,1.305847569,,1.305847569,,1.504436071,128.8429705,3975,R,,17,19,,,
+90004,202002,100,3044,76,0.1,0.1,0.765786164,0.82875034,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,3044,R,17,18,20,,,
+90004,202003,100,3673,76,0.1,0.1,1.206636005,,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,,
+90005,202001,100,1941,18,0.1,0.1,,0.622072678,,0.622072678,,1.504436071,128.8429705,1941,R,,17,19,,,
+90005,202002,100,3121,18,0.1,0.1,1.607529208,2.583641738,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,3121,R,17,18,20,,,
+90005,202003,100,1208,18,0.1,0.1,0.387050567,,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,,
+90006,202001,100,5405,94,0.1,0.1,,0.763047038,,0.763047038,,1.504436071,128.8429705,5405,R,,17,19,,,
+90006,202002,100,7084,94,0.1,0.1,1.310535196,1.422366796,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,7084,R,17,18,20,,,
+90006,202003,100,4980,94,0.1,0.1,0.703053532,,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,,
+90007,202001,100,15172,8,0.1,0.1,,5.333239595,,5.333239595,,1.504436071,128.8429705,15172,R,,17,19,,,
+90007,202002,100,2845,8,0.1,0.1,0.187503296,0.812556233,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,2845,R,17,18,20,,,
+90007,202003,100,3501,8,0.1,0.1,1.230684055,,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,,
+90008,202001,100,16298,304,0.1,0.1,,1.129530598,,1.129530598,,1.504436071,128.8429705,16298,R,,17,19,,,
+90008,202002,100,14429,304,0.1,0.1,0.885323516,1.009357249,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,14429,R,17,18,20,,,
+90008,202003,100,14295,304,0.1,0.1,0.990729498,,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,,
+90009,202001,100,3698,45,0.1,0.1,,0.740562712,,0.740562712,,1.504436071,128.8429705,3698,R,,17,19,,,
+90009,202002,100,4993,45,0.1,0.1,1.350324535,1.185435621,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,4993,R,17,18,20,,,
+90009,202003,100,4212,45,0.1,0.1,0.843571749,,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,,
+90010,202001,100,7722,100,0.1,0.1,,0.760511998,,0.760511998,,1.504436071,128.8429705,7722,R,,17,19,,,
+90010,202002,100,10153,100,0.1,0.1,1.314903647,1.551204368,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,10153,R,17,18,20,,,
+90010,202003,100,6545,100,0.1,0.1,0.644660382,,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,,
+90011,202001,100,30344,19,0.1,0.1,,8.365866031,,,,1.504436071,128.8429705,30344,R,,17,19,,TRUE,
+90011,202002,100,3627,19,0.1,0.1,0.119533351,0.497690693,,0.497690693,0.95177292,1.082813901,113.3255814,3627,R,17,18,20,TRUE,,
+90011,202003,100,7288,19,0.1,0.1,2.00928009,,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,,
+90012,202001,100,16298,304,0.1,0.1,,1.408940798,,1.408940798,,1.504436071,128.8429705,16298,R,,17,19,,,
+90012,202002,100,11567,304,0.1,0.1,0.70975303,0.857831504,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,11567,R,17,18,20,,,
+90012,202003,100,13484,304,0.1,0.1,1.165730094,,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,,
+90013,202001,100,20190,54,0.1,0.1,,1.106799294,,1.106799294,,1.504436071,128.8429705,20190,R,,17,19,,,
+90013,202002,100,18242,54,0.1,0.1,0.903506178,0.632817595,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,18242,R,17,18,20,,,
+90013,202003,100,28826,54,0.1,0.1,1.58023419,,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,,
+90014,202001,100,4260,47,0.1,0.1,,0.845985046,,0.845985046,,1.504436071,128.8429705,4260,R,,17,19,,,
+90014,202002,100,5036,42,0.1,0.1,1.182053991,0.776557765,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,5036,R,17,18,20,,,
+90014,202003,100,6484,42,0.1,0.1,1.28773421,,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,,
+90015,202001,100,19236,57,0.1,0.1,,3.886845827,,3.886845827,,1.504436071,128.8429705,19236,R,,17,19,,,
+90015,202002,100,4949,57,0.1,0.1,0.25727802,1.396267404,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,4949,R,17,18,20,,,
+90015,202003,100,3544,57,0.1,0.1,0.716195191,,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,,
+90016,202001,100,14902,163,0.1,0.1,,0.906730921,,0.906730921,,1.504436071,128.8429705,14902,R,,17,19,,,
+90016,202002,100,16435,163,0.1,0.1,1.102863018,0.666628808,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,16435,R,17,18,20,,,
+90016,202003,100,24653,163,0.1,0.1,1.500085186,,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,,
+90017,202001,100,35476,149,0.1,0.1,,0.702275751,,0.702275751,,1.504436071,128.8429705,35476,R,,17,19,,,
+90017,202002,100,50515,149,0.1,0.1,1.42394209,0.944611909,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,50515,R,17,18,20,,,
+90017,202003,100,53477,149,0.1,0.1,1.058635817,,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,,
+90018,202001,100,13845,126,0.1,0.1,,0.543204684,,,,1.504436071,128.8429705,13845,R,,17,19,,TRUE,
+90018,202002,100,25488,126,0.1,0.1,1.840926688,0.929916997,,0.929916997,0.95177292,1.082813901,113.3255814,25488,R,17,18,20,TRUE,,
+90018,202003,100,27409,126,0.1,0.1,1.075364795,,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,,
+90019,202001,100,1099,6,0.1,0.1,,2.530969376,,2.530969376,,1.504436071,128.8429705,1099,R,,17,19,,,
+90019,202002,100,434,6,0.1,0.1,0.395105531,3.51659919,0.395105531,,0.95177292,1.082813901,113.3255814,434,R,17,18,20,,TRUE,
+90019,202003,100,124,6,0.1,0.1,0.284365646,,,,1.072463185,,126.2596455,124,R,18,,21,TRUE,,
+90020,202001,100,3348,22,0.1,0.1,,1.677715809,,1.677715809,,1.504436071,128.8429705,3348,R,,17,19,,,
+90020,202002,100,1996,22,0.1,0.1,0.596048505,0.395102278,0.596048505,,0.95177292,1.082813901,113.3255814,1996,R,17,18,20,,TRUE,
+90020,202003,100,5051,22,0.1,0.1,2.530990214,,,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,,
+90021,202001,100,,155,0.1,0.1,,,,,,1.504436071,128.8429705,34284.44522,BI,,17,19,,,
+90021,202002,100,,155,0.1,0.1,,,,,0.95177292,1.082813901,113.3255814,22788.90136,BI,17,18,20,,,
+90021,202003,100,21046,155,0.1,0.1,,,,,1.072463185,,126.2596455,21046,R,18,,21,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_input.csv
new file mode 100644
index 00000000..1d59390d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+30001,202001,100,8444,51,0.5,0.5
+30001,202002,100,7476,51,0.5,0.5
+30001,202003,100,2003,51,0.5,0.5
+30002,202001,100,9343,72,0.5,0.5
+30002,202002,100,7818,72,0.5,0.5
+30002,202003,100,4897,72,0.5,0.5
+30003,202001,100,7511,7,0.5,0.5
+30003,202002,100,1761,7,0.5,0.5
+30003,202003,100,6492,7,0.5,0.5
+30004,202001,100,64,81,0.5,0.5
+30004,202002,100,2113,81,0.5,0.5
+30004,202003,100,185,81,0.5,0.5
+30005,202001,100,844,5,0.5,0.5
+30005,202002,100,897,5,0.5,0.5
+30005,202003,100,280,5,0.5,0.5
+30006,202001,100,1869,14,0.5,0.5
+30006,202002,100,1876,14,0.5,0.5
+30006,202003,100,1371,14,0.5,0.5
+30007,202001,100,12769,12,0.5,0.5
+30007,202002,100,2853,12,0.5,0.5
+30007,202003,100,11491,12,0.5,0.5
+30008,202001,100,141,162,0.5,0.5
+30008,202002,100,6001,162,0.5,0.5
+30008,202003,100,433,162,0.5,0.5
+30009,202001,100,6417,26,0.5,0.5
+30009,202002,100,4037,26,0.5,0.5
+30009,202003,100,1322,26,0.5,0.5
+30010,202001,100,28963,144,0.5,0.5
+30010,202002,100,21734,144,0.5,0.5
+30010,202003,100,10529,144,0.5,0.5
+30011,202001,100,6009,5,0.5,0.5
+30011,202002,100,1145,5,0.5,0.5
+30011,202003,100,5064,5,0.5,0.5
+30012,202001,100,256,275,0.5,0.5
+30012,202002,100,7522,275,0.5,0.5
+30012,202003,100,,275,0.5,0.5
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
new file mode 100644
index 00000000..50192c41
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+30001,202001,100,8444,51,0.5,0.5,,1.129481006,,1.129481006,,1.162271841,96.73383283,8444,R,,2,12,,
+30001,202002,100,7476,51,0.5,0.5,0.885362387,3.732401398,0.885362387,,0.861069292,2.064295653,76.3675837,7476,R,2,1,12,,TRUE
+30001,202003,100,2003,51,0.5,0.5,0.267924024,,,,0.484426733,,76.13443331,2003,R,1,,11,TRUE,
+30002,202001,100,9343,72,0.5,0.5,,1.195062676,,1.195062676,,1.162271841,96.73383283,9343,R,,2,12,,
+30002,202002,100,7818,72,0.5,0.5,0.836776196,1.596487645,0.836776196,,0.861069292,2.064295653,76.3675837,7818,R,2,1,12,,TRUE
+30002,202003,100,4897,72,0.5,0.5,0.626375032,,,,0.484426733,,76.13443331,4897,R,1,,11,TRUE,
+30003,202001,100,7511,7,0.5,0.5,,4.265190233,,,,1.162271841,96.73383283,7511,R,,2,12,,TRUE
+30003,202002,100,1761,7,0.5,0.5,0.234456131,0.271256932,,,0.861069292,2.064295653,76.3675837,1761,R,2,1,12,TRUE,TRUE
+30003,202003,100,6492,7,0.5,0.5,3.686541738,,,,0.484426733,,76.13443331,6492,R,1,,11,TRUE,
+30004,202001,100,64,81,0.5,0.5,,0.030288689,,,,1.162271841,96.73383283,64,R,,2,12,,TRUE
+30004,202002,100,2113,81,0.5,0.5,33.015625,11.42162162,,,0.861069292,2.064295653,76.3675837,2113,R,2,1,12,TRUE,TRUE
+30004,202003,100,185,81,0.5,0.5,0.087553242,,,,0.484426733,,76.13443331,185,R,1,,11,TRUE,
+30005,202001,100,844,5,0.5,0.5,,0.941234172,,,,1.162271841,96.73383283,844,R,,2,12,,TRUE
+30005,202002,100,897,5,0.5,0.5,1.062434865,3.199201198,,,0.861069292,2.064295653,76.3675837,897,R,2,1,12,TRUE,TRUE
+30005,202003,100,280,5,0.5,0.5,0.312578027,,,,0.484426733,,76.13443331,280,R,1,,11,TRUE,
+30006,202001,100,1869,14,0.5,0.5,,0.995885563,,,,1.162271841,96.73383283,1869,R,,2,12,,TRUE
+30006,202002,100,1876,14,0.5,0.5,1.004131435,1.368417982,,,0.861069292,2.064295653,76.3675837,1876,R,2,1,12,TRUE,TRUE
+30006,202003,100,1371,14,0.5,0.5,0.730770871,,,,0.484426733,,76.13443331,1371,R,1,,11,TRUE,
+30007,202001,100,12769,12,0.5,0.5,,4.475816911,,,,1.162271841,96.73383283,12769,R,,2,12,,TRUE
+30007,202002,100,2853,12,0.5,0.5,0.223422901,0.248269056,,,0.861069292,2.064295653,76.3675837,2853,R,2,1,12,TRUE,TRUE
+30007,202003,100,11491,12,0.5,0.5,4.027888195,,,,0.484426733,,76.13443331,11491,R,1,,11,TRUE,
+30008,202001,100,141,162,0.5,0.5,,0.023463069,,,,1.162271841,96.73383283,141,R,,2,12,,TRUE
+30008,202002,100,6001,162,0.5,0.5,42.62017045,13.86213906,,,0.861069292,2.064295653,76.3675837,6001,R,2,1,12,TRUE,TRUE
+30008,202003,100,433,162,0.5,0.5,0.072138939,,,,0.484426733,,76.13443331,433,R,1,,11,TRUE,
+30009,202001,100,6417,26,0.5,0.5,,1.589639934,,,,1.162271841,96.73383283,6417,R,,2,12,,TRUE
+30009,202002,100,4037,26,0.5,0.5,0.629073275,3.053782962,,,0.861069292,2.064295653,76.3675837,4037,R,2,1,12,TRUE,TRUE
+30009,202003,100,1322,26,0.5,0.5,0.327462695,,,,0.484426733,,76.13443331,1322,R,1,,11,TRUE,
+30010,202001,100,28963,144,0.5,0.5,,1.332623847,,,,1.162271841,96.73383283,28963,R,,2,12,,TRUE
+30010,202002,100,21734,144,0.5,0.5,0.750399298,2.064295653,,2.064295653,0.861069292,2.064295653,76.3675837,21734,R,2,1,12,TRUE,
+30010,202003,100,10529,144,0.5,0.5,0.484426733,,0.484426733,,0.484426733,,76.13443331,10529,R,1,,11,,
+30011,202001,100,6009,5,0.5,0.5,,5.249464902,,,,1.162271841,96.73383283,6009,R,,2,12,,TRUE
+30011,202002,100,1145,5,0.5,0.5,0.190495606,0.226047443,,,0.861069292,2.064295653,76.3675837,1145,R,2,1,12,TRUE,TRUE
+30011,202003,100,5064,5,0.5,0.5,4.423850085,,,,0.484426733,,76.13443331,5064,R,1,,11,TRUE,
+30012,202001,100,256,275,0.5,0.5,,0.034032235,,,,1.162271841,96.73383283,256,R,,2,12,,TRUE
+30012,202002,100,7522,275,0.5,0.5,29.38390625,,,,0.861069292,2.064295653,76.3675837,7522,R,2,1,12,TRUE,
+30012,202003,100,,275,0.5,0.5,,,,,0.484426733,,76.13443331,3643.857886,FIR,1,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_input.csv
new file mode 100644
index 00000000..1d59390d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+30001,202001,100,8444,51,0.5,0.5
+30001,202002,100,7476,51,0.5,0.5
+30001,202003,100,2003,51,0.5,0.5
+30002,202001,100,9343,72,0.5,0.5
+30002,202002,100,7818,72,0.5,0.5
+30002,202003,100,4897,72,0.5,0.5
+30003,202001,100,7511,7,0.5,0.5
+30003,202002,100,1761,7,0.5,0.5
+30003,202003,100,6492,7,0.5,0.5
+30004,202001,100,64,81,0.5,0.5
+30004,202002,100,2113,81,0.5,0.5
+30004,202003,100,185,81,0.5,0.5
+30005,202001,100,844,5,0.5,0.5
+30005,202002,100,897,5,0.5,0.5
+30005,202003,100,280,5,0.5,0.5
+30006,202001,100,1869,14,0.5,0.5
+30006,202002,100,1876,14,0.5,0.5
+30006,202003,100,1371,14,0.5,0.5
+30007,202001,100,12769,12,0.5,0.5
+30007,202002,100,2853,12,0.5,0.5
+30007,202003,100,11491,12,0.5,0.5
+30008,202001,100,141,162,0.5,0.5
+30008,202002,100,6001,162,0.5,0.5
+30008,202003,100,433,162,0.5,0.5
+30009,202001,100,6417,26,0.5,0.5
+30009,202002,100,4037,26,0.5,0.5
+30009,202003,100,1322,26,0.5,0.5
+30010,202001,100,28963,144,0.5,0.5
+30010,202002,100,21734,144,0.5,0.5
+30010,202003,100,10529,144,0.5,0.5
+30011,202001,100,6009,5,0.5,0.5
+30011,202002,100,1145,5,0.5,0.5
+30011,202003,100,5064,5,0.5,0.5
+30012,202001,100,256,275,0.5,0.5
+30012,202002,100,7522,275,0.5,0.5
+30012,202003,100,,275,0.5,0.5
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_output.csv
new file mode 100644
index 00000000..f879659b
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter
+30001,202001,100,8444,51,0.5,0.5,,,,,,1,61.12436116,8444,R,,0,9,,,TRUE
+30001,202002,100,7476,51,0.5,0.5,,,,,1,1,48.04940375,7476,R,0,0,9,,,TRUE
+30001,202003,100,2003,51,0.5,0.5,,,,,1,,85.37820513,2003,R,0,,10,,,TRUE
+30002,202001,100,9343,72,0.5,0.5,,,,,,1,61.12436116,9343,R,,0,9,,,TRUE
+30002,202002,100,7818,72,0.5,0.5,,,,,1,1,48.04940375,7818,R,0,0,9,,,TRUE
+30002,202003,100,4897,72,0.5,0.5,,,,,1,,85.37820513,4897,R,0,,10,,,TRUE
+30003,202001,100,7511,7,0.5,0.5,,4.265190233,,,,1,61.12436116,7511,R,,0,9,,TRUE,
+30003,202002,100,1761,7,0.5,0.5,0.234456131,0.271256932,,,1,1,48.04940375,1761,R,0,0,9,TRUE,TRUE,
+30003,202003,100,6492,7,0.5,0.5,3.686541738,,,,1,,85.37820513,6492,R,0,,10,TRUE,,
+30004,202001,100,64,81,0.5,0.5,,0.030288689,,,,1,61.12436116,64,R,,0,9,,TRUE,
+30004,202002,100,2113,81,0.5,0.5,33.015625,11.42162162,,,1,1,48.04940375,2113,R,0,0,9,TRUE,TRUE,
+30004,202003,100,185,81,0.5,0.5,0.087553242,,,,1,,85.37820513,185,R,0,,10,TRUE,,
+30005,202001,100,844,5,0.5,0.5,,0.941234172,,,,1,61.12436116,844,R,,0,9,,TRUE,
+30005,202002,100,897,5,0.5,0.5,1.062434865,3.199201198,,,1,1,48.04940375,897,R,0,0,9,TRUE,TRUE,
+30005,202003,100,280,5,0.5,0.5,0.312578027,,,,1,,85.37820513,280,R,0,,10,TRUE,,
+30006,202001,100,1869,14,0.5,0.5,,0.995885563,,,,1,61.12436116,1869,R,,0,9,,TRUE,
+30006,202002,100,1876,14,0.5,0.5,1.004131435,1.368417982,,,1,1,48.04940375,1876,R,0,0,9,TRUE,TRUE,
+30006,202003,100,1371,14,0.5,0.5,0.730770871,,,,1,,85.37820513,1371,R,0,,10,TRUE,,
+30007,202001,100,12769,12,0.5,0.5,,4.475816911,,,,1,61.12436116,12769,R,,0,9,,TRUE,
+30007,202002,100,2853,12,0.5,0.5,0.223422901,0.248269056,,,1,1,48.04940375,2853,R,0,0,9,TRUE,TRUE,
+30007,202003,100,11491,12,0.5,0.5,4.027888195,,,,1,,85.37820513,11491,R,0,,10,TRUE,,
+30008,202001,100,141,162,0.5,0.5,,0.023463069,,,,1,61.12436116,141,R,,0,9,,TRUE,
+30008,202002,100,6001,162,0.5,0.5,42.62017045,13.86213906,,,1,1,48.04940375,6001,R,0,0,9,TRUE,TRUE,
+30008,202003,100,433,162,0.5,0.5,0.072138939,,,,1,,85.37820513,433,R,0,,10,TRUE,,
+30009,202001,100,6417,26,0.5,0.5,,1.589639934,,,,1,61.12436116,6417,R,,0,9,,TRUE,
+30009,202002,100,4037,26,0.5,0.5,0.629073275,3.053782962,,,1,1,48.04940375,4037,R,0,0,9,TRUE,TRUE,
+30009,202003,100,1322,26,0.5,0.5,0.327462695,,,,1,,85.37820513,1322,R,0,,10,TRUE,,
+30010,202001,100,28963,144,0.5,0.5,,,,,,1,61.12436116,28963,R,,0,9,,,TRUE
+30010,202002,100,21734,144,0.5,0.5,,,,,1,1,48.04940375,21734,R,0,0,9,,,TRUE
+30010,202003,100,10529,144,0.5,0.5,,,,,1,,85.37820513,10529,R,0,,10,,,TRUE
+30011,202001,100,6009,5,0.5,0.5,,5.249464902,,,,1,61.12436116,6009,R,,0,9,,TRUE,
+30011,202002,100,1145,5,0.5,0.5,0.190495606,0.226047443,,,1,1,48.04940375,1145,R,0,0,9,TRUE,TRUE,
+30011,202003,100,5064,5,0.5,0.5,4.423850085,,,,1,,85.37820513,5064,R,0,,10,TRUE,,
+30012,202001,100,256,275,0.5,0.5,,0.034032235,,,,1,61.12436116,256,R,,0,9,,TRUE,
+30012,202002,100,7522,275,0.5,0.5,29.38390625,,,,1,1,48.04940375,7522,R,0,0,9,TRUE,,
+30012,202003,100,,275,0.5,0.5,,,,,1,,85.37820513,7522,FIR,0,,10,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_input.csv
new file mode 100644
index 00000000..dd05ef3b
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
+30001,202001,100,8444,0,0.5,0.5
+30001,202002,100,7476,0,0.5,0.5
+30001,202003,100,2003,0,0.5,0.5
+30002,202001,100,9343,0,0.5,0.5
+30002,202002,100,7818,0,0.5,0.5
+30002,202003,100,4897,0,0.5,0.5
+30003,202001,100,7511,0,0.5,0.5
+30003,202002,100,1761,0,0.5,0.5
+30003,202003,100,6492,0,0.5,0.5
+30004,202001,100,64,0,0.5,0.5
+30004,202002,100,2113,0,0.5,0.5
+30004,202003,100,185,0,0.5,0.5
+30005,202001,100,844,0,0.5,0.5
+30005,202002,100,897,0,0.5,0.5
+30005,202003,100,280,0,0.5,0.5
+30006,202001,100,1869,0,0.5,0.5
+30006,202002,100,1876,0,0.5,0.5
+30006,202003,100,1371,0,0.5,0.5
+30007,202001,100,12769,0,0.5,0.5
+30007,202002,100,2853,0,0.5,0.5
+30007,202003,100,11491,0,0.5,0.5
+30008,202001,100,141,0,0.5,0.5
+30008,202002,100,6001,0,0.5,0.5
+30008,202003,100,433,0,0.5,0.5
+30009,202001,100,6417,0,0.5,0.5
+30009,202002,100,4037,0,0.5,0.5
+30009,202003,100,1322,0,0.5,0.5
+30010,202001,100,28963,0,0.5,0.5
+30010,202002,100,21734,0,0.5,0.5
+30010,202003,100,10529,0,0.5,0.5
+30011,202001,100,6009,0,0.5,0.5
+30011,202002,100,1145,0,0.5,0.5
+30011,202003,100,5064,0,0.5,0.5
+30012,202001,100,256,0,0.5,0.5
+30012,202002,100,7522,0,0.5,0.5
+30012,202003,100,,0,0.5,0.5
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_output.csv
new file mode 100644
index 00000000..efcf016d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,default_c_link,filter
+30001,202001,100,8444,0,0.5,0.5,,,,,,1,1,8444,R,,0,9,,,TRUE,TRUE
+30001,202002,100,7476,0,0.5,0.5,,,,,1,1,1,7476,R,0,0,9,,,TRUE,TRUE
+30001,202003,100,2003,0,0.5,0.5,,,,,1,,1,2003,R,0,,10,,,TRUE,TRUE
+30002,202001,100,9343,0,0.5,0.5,,,,,,1,1,9343,R,,0,9,,,TRUE,TRUE
+30002,202002,100,7818,0,0.5,0.5,,,,,1,1,1,7818,R,0,0,9,,,TRUE,TRUE
+30002,202003,100,4897,0,0.5,0.5,,,,,1,,1,4897,R,0,,10,,,TRUE,TRUE
+30003,202001,100,7511,0,0.5,0.5,,4.265190233,,,,1,1,7511,R,,0,9,,TRUE,TRUE,
+30003,202002,100,1761,0,0.5,0.5,0.234456131,0.271256932,,,1,1,1,1761,R,0,0,9,TRUE,TRUE,TRUE,
+30003,202003,100,6492,0,0.5,0.5,3.686541738,,,,1,,1,6492,R,0,,10,TRUE,,TRUE,
+30004,202001,100,64,0,0.5,0.5,,0.030288689,,,,1,1,64,R,,0,9,,TRUE,TRUE,
+30004,202002,100,2113,0,0.5,0.5,33.015625,11.42162162,,,1,1,1,2113,R,0,0,9,TRUE,TRUE,TRUE,
+30004,202003,100,185,0,0.5,0.5,0.087553242,,,,1,,1,185,R,0,,10,TRUE,,TRUE,
+30005,202001,100,844,0,0.5,0.5,,0.941234172,,,,1,1,844,R,,0,9,,TRUE,TRUE,
+30005,202002,100,897,0,0.5,0.5,1.062434865,3.199201198,,,1,1,1,897,R,0,0,9,TRUE,TRUE,TRUE,
+30005,202003,100,280,0,0.5,0.5,0.312578027,,,,1,,1,280,R,0,,10,TRUE,,TRUE,
+30006,202001,100,1869,0,0.5,0.5,,0.995885563,,,,1,1,1869,R,,0,9,,TRUE,TRUE,
+30006,202002,100,1876,0,0.5,0.5,1.004131435,1.368417982,,,1,1,1,1876,R,0,0,9,TRUE,TRUE,TRUE,
+30006,202003,100,1371,0,0.5,0.5,0.730770871,,,,1,,1,1371,R,0,,10,TRUE,,TRUE,
+30007,202001,100,12769,0,0.5,0.5,,4.475816911,,,,1,1,12769,R,,0,9,,TRUE,TRUE,
+30007,202002,100,2853,0,0.5,0.5,0.223422901,0.248269056,,,1,1,1,2853,R,0,0,9,TRUE,TRUE,TRUE,
+30007,202003,100,11491,0,0.5,0.5,4.027888195,,,,1,,1,11491,R,0,,10,TRUE,,TRUE,
+30008,202001,100,141,0,0.5,0.5,,0.023463069,,,,1,1,141,R,,0,9,,TRUE,TRUE,
+30008,202002,100,6001,0,0.5,0.5,42.62017045,13.86213906,,,1,1,1,6001,R,0,0,9,TRUE,TRUE,TRUE,
+30008,202003,100,433,0,0.5,0.5,0.072138939,,,,1,,1,433,R,0,,10,TRUE,,TRUE,
+30009,202001,100,6417,0,0.5,0.5,,1.589639934,,,,1,1,6417,R,,0,9,,TRUE,TRUE,
+30009,202002,100,4037,0,0.5,0.5,0.629073275,3.053782962,,,1,1,1,4037,R,0,0,9,TRUE,TRUE,TRUE,
+30009,202003,100,1322,0,0.5,0.5,0.327462695,,,,1,,1,1322,R,0,,10,TRUE,,TRUE,
+30010,202001,100,28963,0,0.5,0.5,,,,,,1,1,28963,R,,0,9,,,TRUE,TRUE
+30010,202002,100,21734,0,0.5,0.5,,,,,1,1,1,21734,R,0,0,9,,,TRUE,TRUE
+30010,202003,100,10529,0,0.5,0.5,,,,,1,,1,10529,R,0,,10,,,TRUE,TRUE
+30011,202001,100,6009,0,0.5,0.5,,5.249464902,,,,1,1,6009,R,,0,9,,TRUE,TRUE,
+30011,202002,100,1145,0,0.5,0.5,0.190495606,0.226047443,,,1,1,1,1145,R,0,0,9,TRUE,TRUE,TRUE,
+30011,202003,100,5064,0,0.5,0.5,4.423850085,,,,1,,1,5064,R,0,,10,TRUE,,TRUE,
+30012,202001,100,256,0,0.5,0.5,,0.034032235,,,,1,1,256,R,,0,9,,TRUE,TRUE,
+30012,202002,100,7522,0,0.5,0.5,29.38390625,,,,1,1,1,7522,R,0,0,9,TRUE,,TRUE,
+30012,202003,100,,0,0.5,0.5,,,,,1,,1,7522,FIR,0,,10,,,TRUE,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
new file mode 100644
index 00000000..cd7699e1
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+30001,202001,100,8444,51,,,0.5,,1.5274,50.3694
+30001,202002,100,7476,51,,,0.5,0.9685,1.8795,121.4187
+30001,202003,100,2003,51,,,0.5,1.113,,89.3761
+30002,202001,100,9343,72,,,0.5,,1.5274,50.3694
+30002,202002,100,7818,72,,,0.5,0.9685,1.8795,121.4187
+30002,202003,100,4897,72,,,0.5,1.113,,89.3761
+30003,202001,100,7511,7,,,0.5,,1.5274,50.3694
+30003,202002,100,1761,7,,,0.5,0.9685,1.8795,121.4187
+30003,202003,100,6492,7,,,0.5,1.113,,89.3761
+30004,202001,100,64,81,,,0.5,,1.5274,50.3694
+30004,202002,100,2113,81,,,0.5,0.9685,1.8795,121.4187
+30004,202003,100,,81,,,0.5,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
new file mode 100644
index 00000000..8d4b8a76
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c
+30001,202001,100,8444,51,,,0.5,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
+30001,202002,100,7476,51,,,0.5,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7476,R,4,3,4
+30001,202003,100,2003,51,,,0.5,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.3199735,,96.19575,2003,R,3,,3
+30002,202001,100,9343,72,,,0.5,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
+30002,202002,100,7818,72,,,0.5,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7818,R,4,3,4
+30002,202003,100,4897,72,,,0.5,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.3199735,,96.19575,4897,R,3,,3
+30003,202001,100,7511,7,,,0.5,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
+30003,202002,100,1761,7,,,0.5,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,1761,R,4,3,4
+30003,202003,100,6492,7,,,0.5,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.3199735,,96.19575,6492,R,3,,3
+30004,202001,100,64,81,,,0.5,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
+30004,202002,100,2113,81,,,0.5,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,2113,R,4,3,4
+30004,202003,100,,81,,,0.5,1.113,,89.3761,,,1.526947,,103.0154,1.3199735,,96.19575,2789.104006,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
new file mode 100644
index 00000000..92012aa8
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+30001,202001,100,8444,51,,,0.8,,1.5274,50.3694
+30001,202002,100,7476,51,,,0.8,0.9685,1.8795,121.4187
+30001,202003,100,2003,51,,,0.8,1.113,,89.3761
+30002,202001,100,9343,72,,,0.8,,1.5274,50.3694
+30002,202002,100,7818,72,,,0.8,0.9685,1.8795,121.4187
+30002,202003,100,4897,72,,,0.8,1.113,,89.3761
+30003,202001,100,7511,7,,,0.8,,1.5274,50.3694
+30003,202002,100,1761,7,,,0.8,0.9685,1.8795,121.4187
+30003,202003,100,6492,7,,,0.8,1.113,,89.3761
+30004,202001,100,64,81,,,0.8,,1.5274,50.3694
+30004,202002,100,2113,81,,,0.8,0.9685,1.8795,121.4187
+30004,202003,100,,81,,,0.8,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
new file mode 100644
index 00000000..7d15ece7
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c
+30001,202001,100,8444,51,,,0.8,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.6294848,106.2331217,8444,R,,4,4
+30001,202002,100,7476,51,,,0.8,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7476,R,4,3,4
+30001,202003,100,2003,51,,,0.8,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.4441576,,100.28754,2003,R,3,,3
+30002,202001,100,9343,72,,,0.8,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.6294848,106.23316,9343,R,,4,4
+30002,202002,100,7818,72,,,0.8,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7818,R,4,3,4
+30002,202003,100,4897,72,,,0.8,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
+30003,202001,100,7511,7,,,0.8,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.6294848,106.23316,7511,R,,4,4
+30003,202002,100,1761,7,,,0.8,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,1761,R,4,3,4
+30003,202003,100,6492,7,,,0.8,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
+30004,202001,100,64,81,,,0.8,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.6294848,106.23316,64,R,,4,4
+30004,202002,100,2113,81,,,0.8,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,2113,R,4,3,4
+30004,202003,100,,81,,,0.8,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,3051.505009,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
new file mode 100644
index 00000000..bc141a7d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+60001,202001,100,5077,15,,,0.5,,1.5274,50.3694
+60001,202002,100,7830,15,,,0.5,0.9685,1.8795,121.4187
+60001,202003,100,1046,15,,,0.5,1.113,,89.3761
+60002,202001,100,1588,71,,,0.5,,1.5274,50.3694
+60002,202002,100,1213,71,,,0.5,0.9685,1.8795,121.4187
+60002,202003,100,3807,71,,,0.5,1.113,,89.3761
+60003,202001,100,6541,26,,,0.5,,1.5274,50.3694
+60003,202002,100,336,26,,,0.5,0.9685,1.8795,121.4187
+60003,202003,100,6351,26,,,0.5,1.113,,89.3761
+60004,202001,100,,3,,,0.5,,1.5274,50.3694
+60004,202002,100,,3,,,0.5,0.9685,1.8795,121.4187
+60004,202003,100,401,3,,,0.5,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
new file mode 100644
index 00000000..9c48f082
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+60001,202001,100,5077,15,,,0.5,,1.5274,50.3694,,0.648403576,,7.141605449,117.9107143,,4.334502725,84.14005715,5077,R,,3,3
+60001,202002,100,7830,15,,,0.5,0.9685,1.8795,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,7830,R,3,3,3
+60001,202003,100,1046,15,,,0.5,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
+60002,202001,100,1588,71,,,0.5,,1.5274,50.3694,,1.309150866,,7.141605449,117.9107143,,4.334502725,84.14005715,1588,R,,3,3
+60002,202002,100,1213,71,,,0.5,0.9685,1.8795,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,1213,R,3,3,3
+60002,202003,100,3807,71,,,0.5,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
+60003,202001,100,6541,26,,,0.5,,1.5274,50.3694,,19.4672619,,7.141605449,117.9107143,,4.334502725,84.14005715,6541,R,,3,3
+60003,202002,100,336,26,,,0.5,0.9685,1.8795,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,336,R,3,3,3
+60003,202003,100,6351,26,,,0.5,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
+60004,202001,100,,3,,,0.5,,1.5274,50.3694,,,,7.141605449,117.9107143,,4.334502725,84.14005715,3909.556029,BI,,3,3
+60004,202002,100,,3,,,0.5,0.9685,1.8795,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,901.9618346,BI,3,3,3
+60004,202003,100,401,3,,,0.5,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
new file mode 100644
index 00000000..1bdb451e
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+30001,202001,100,8444,51,,,0.5,,1.5274,50.3694
+30001,202002,100,7476,51,,,0.5,0.9685,1.8795,121.4187
+30001,202003,100,2003,51,,,0.5,1.113,,89.3761
+30002,202001,100,9343,72,,,0.5,,1.5274,50.3694
+30002,202002,100,7818,72,,,0.5,0.9685,1.8795,121.4187
+30002,202003,100,4897,72,,,0.5,1.113,,89.3761
+30003,202001,100,7511,7,,,0.5,,1.5274,50.3694
+30003,202002,100,1761,7,,,0.5,0.9685,1.8795,121.4187
+30003,202003,100,6492,7,,,0.5,1.113,,89.3761
+30004,202001,100,,81,,,0.5,,1.5274,50.3694
+30004,202002,100,,81,,,0.5,0.9685,1.8795,121.4187
+30004,202003,100,,81,,,0.5,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
new file mode 100644
index 00000000..a4f794bc
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c
+30001,202001,100,8444,51,,,0.5,,1.5274,50.3694,,1.129481006,,2.196577972,194.6,,2.062742377,165.75388,8444,R,,3,3
+30001,202002,100,7476,51,,,0.5,0.9685,1.8795,121.4187,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7476,R,3,3,3
+30001,202003,100,2003,51,,,0.5,1.113,,89.3761,0.267924024,,1.526946931,,103.0154,1.444157545,,100.28754,2003,R,3,,3
+30002,202001,100,9343,72,,,0.5,,1.5274,50.3694,,1.195062676,,2.196577972,194.6,,2.062742377,165.75388,9343,R,,3,3
+30002,202002,100,7818,72,,,0.5,0.9685,1.8795,121.4187,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7818,R,3,3,3
+30002,202003,100,4897,72,,,0.5,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
+30003,202001,100,7511,7,,,0.5,,1.5274,50.3694,,4.265190233,,2.196577972,194.6,,2.062742377,165.75388,7511,R,,3,3
+30003,202002,100,1761,7,,,0.5,0.9685,1.8795,121.4187,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,1761,R,3,3,3
+30003,202003,100,6492,7,,,0.5,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
+30004,202001,100,,81,,,0.5,,1.5274,50.3694,,,,2.196577972,194.6,,2.062742377,165.75388,13426.06428,C,,3,3
+30004,202002,100,,81,,,0.5,0.9685,1.8795,121.4187,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,9605.793024,FIC,3,3,3
+30004,202003,100,,81,,,0.5,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,13872.279,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
new file mode 100644
index 00000000..b1a7194e
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+110001,202001,100,9244,89,,,0.5,,1.5274,50.3694
+110001,202002,100,8916,89,,,0.5,0.9685,1.8795,121.4187
+110001,202003,100,6194,89,,,0.5,1.113,,89.3761
+110002,202001,100,4826,83,,,0.5,,1.5274,50.3694
+110002,202002,100,5903,83,,,0.5,0.9685,1.8795,121.4187
+110002,202003,100,4743,83,,,0.5,1.113,,89.3761
+110003,202001,100,7586,4,,,0.5,,1.5274,50.3694
+110003,202002,100,1016,4,,,0.5,0.9685,1.8795,121.4187
+110003,202003,100,1429,4,,,0.5,1.113,,89.3761
+110004,202001,100,3975,76,,,0.5,,1.5274,50.3694
+110004,202002,100,3044,76,,,0.5,0.9685,1.8795,121.4187
+110004,202003,100,,76,,,0.5,1.113,,89.3761
+110005,202001,200,5217,27,,,0.5,,2.994350985,107.48
+110005,202002,200,7016,27,,,0.5,1.377938182,0.670608989,54.70285714
+110005,202003,200,9940,27,,,0.5,0.952585628,,98.26519337
+110006,202001,200,5325,42,,,0.5,,2.994350985,107.48
+110006,202002,200,7747,42,,,0.5,1.377938182,0.670608989,54.70285714
+110006,202003,200,6685,42,,,0.5,0.952585628,,98.26519337
+110007,202001,200,5496,19,,,0.5,,2.994350985,107.48
+110007,202002,200,1010,19,,,0.5,1.377938182,0.670608989,54.70285714
+110007,202003,200,1235,19,,,0.5,0.952585628,,98.26519337
+110008,202001,200,,43,,,0.5,,2.994350985,107.48
+110008,202002,200,3913,43,,,0.5,1.377938182,0.670608989,54.70285714
+110008,202003,200,6013,43,,,0.5,0.952585628,,98.26519337
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
new file mode 100644
index 00000000..dc498973
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+110001,202001,100,9244,89,,,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
+110001,202002,100,8916,89,,,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
+110001,202003,100,6194,89,,,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
+110002,202001,100,4826,83,,,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
+110002,202002,100,5903,83,,,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
+110002,202003,100,4743,83,,,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
+110003,202001,100,7586,4,,,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
+110003,202002,100,1016,4,,,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
+110003,202003,100,1429,4,,,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
+110004,202001,100,3975,76,,,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
+110004,202002,100,3044,76,,,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
+110004,202003,100,,76,,,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
+110005,202001,200,5217,27,,,0.5,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3
+110005,202002,200,7016,27,,,0.5,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4
+110005,202003,200,9940,27,,,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
+110006,202001,200,5325,42,,,0.5,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3
+110006,202002,200,7747,42,,,0.5,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4
+110006,202003,200,6685,42,,,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
+110007,202001,200,5496,19,,,0.5,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3
+110007,202002,200,1010,19,,,0.5,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4
+110007,202003,200,1235,19,,,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
+110008,202001,200,,43,,,0.5,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3
+110008,202002,200,3913,43,,,0.5,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4
+110008,202003,200,6013,43,,,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
new file mode 100644
index 00000000..b2a3ca3e
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+30001,202001,100,8444,51,,,0.5,,1.5274,50.3694
+30001,202002,100,7476,51,,,0.5,,1.8795,121.4187
+30001,202003,100,2003,51,,,0.5,,,89.3761
+30002,202001,100,9343,72,,,0.5,,1.5274,50.3694
+30002,202002,100,7818,72,,,0.5,,1.8795,121.4187
+30002,202003,100,4897,72,,,0.5,,,89.3761
+30003,202001,100,7511,7,,,0.5,,1.5274,50.3694
+30003,202002,100,1761,7,,,0.5,,1.8795,121.4187
+30003,202003,100,6492,7,,,0.5,,,89.3761
+30004,202001,100,64,81,,,0.5,,1.5274,50.3694
+30004,202002,100,2113,81,,,0.5,,1.8795,121.4187
+30004,202003,100,,81,,,0.5,,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
new file mode 100644
index 00000000..5556aa05
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c
+30001,202001,100,8444,51,,,0.5,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
+30001,202002,100,7476,51,,,0.5,,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4
+30001,202003,100,2003,51,,,0.5,,,89.3761,0.267924024,,1.526947,,103.0154,1.526947,,96.19575,2003,R,3,,3
+30002,202001,100,9343,72,,,0.5,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
+30002,202002,100,7818,72,,,0.5,,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4
+30002,202003,100,4897,72,,,0.5,,,89.3761,0.626375032,,1.526947,,103.0154,1.526947,,96.19575,4897,R,3,,3
+30003,202001,100,7511,7,,,0.5,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
+30003,202002,100,1761,7,,,0.5,,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4
+30003,202003,100,6492,7,,,0.5,,,89.3761,3.686541738,,1.526947,,103.0154,1.526947,,96.19575,6492,R,3,,3
+30004,202001,100,64,81,,,0.5,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
+30004,202002,100,2113,81,,,0.5,,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4
+30004,202003,100,,81,,,0.5,,,89.3761,,,1.526947,,103.0154,1.526947,,96.19575,3226.439011,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
new file mode 100644
index 00000000..15c737ba
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+60001,202001,100,5077,15,,,0.5,,,50.3694
+60001,202002,100,7830,15,,,0.5,0.9685,,121.4187
+60001,202003,100,1046,15,,,0.5,1.113,,89.3761
+60002,202001,100,1588,71,,,0.5,,,50.3694
+60002,202002,100,1213,71,,,0.5,0.9685,,121.4187
+60002,202003,100,3807,71,,,0.5,1.113,,89.3761
+60003,202001,100,6541,26,,,0.5,,,50.3694
+60003,202002,100,336,26,,,0.5,0.9685,,121.4187
+60003,202003,100,6351,26,,,0.5,1.113,,89.3761
+60004,202001,100,,3,,,0.5,,,50.3694
+60004,202002,100,,3,,,0.5,0.9685,,121.4187
+60004,202003,100,401,3,,,0.5,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
new file mode 100644
index 00000000..15028707
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+60001,202001,100,5077,15,,,0.5,,,50.3694,,0.648403576,,7.141605449,117.9107143,,7.141605449,84.14005715,5077,R,,3,3
+60001,202002,100,7830,15,,,0.5,0.9685,,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3
+60001,202003,100,1046,15,,,0.5,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
+60002,202001,100,1588,71,,,0.5,,,50.3694,,1.309150866,,7.141605449,117.9107143,,7.141605449,84.14005715,1588,R,,3,3
+60002,202002,100,1213,71,,,0.5,0.9685,,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3
+60002,202003,100,3807,71,,,0.5,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
+60003,202001,100,6541,26,,,0.5,,,50.3694,,19.4672619,,7.141605449,117.9107143,,7.141605449,84.14005715,6541,R,,3,3
+60003,202002,100,336,26,,,0.5,0.9685,,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3
+60003,202003,100,6351,26,,,0.5,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
+60004,202001,100,,3,,,0.5,,,50.3694,,,,7.141605449,117.9107143,,7.141605449,84.14005715,7500.429481,BI,,3,3
+60004,202002,100,,3,,,0.5,0.9685,,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3
+60004,202003,100,401,3,,,0.5,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
new file mode 100644
index 00000000..d69b4082
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+30001,202001,100,8444,51,,,0.5,,1.5274,
+30001,202002,100,7476,51,,,0.5,0.9685,1.8795,
+30001,202003,100,2003,51,,,0.5,1.113,,
+30002,202001,100,9343,72,,,0.5,,1.5274,
+30002,202002,100,7818,72,,,0.5,0.9685,1.8795,
+30002,202003,100,4897,72,,,0.5,1.113,,
+30003,202001,100,7511,7,,,0.5,,1.5274,
+30003,202002,100,1761,7,,,0.5,0.9685,1.8795,
+30003,202003,100,6492,7,,,0.5,1.113,,
+30004,202001,100,,81,,,0.5,,1.5274,
+30004,202002,100,,81,,,0.5,0.9685,1.8795,
+30004,202003,100,,81,,,0.5,1.113,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
new file mode 100644
index 00000000..5581404b
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -0,0 +1,13 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c
+30001,202001,100,8444,51,,,0.5,,1.5274,,,1.129481006,,2.196577972,194.6,,2.062742377,194.6,8444,R,,3,3
+30001,202002,100,7476,51,,,0.5,0.9685,1.8795,,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3
+30001,202003,100,2003,51,,,0.5,1.113,,,0.267924024,,1.526946931,,103.0154,1.444157545,,103.0154,2003,R,3,,3
+30002,202001,100,9343,72,,,0.5,,1.5274,,,1.195062676,,2.196577972,194.6,,2.062742377,194.6,9343,R,,3,3
+30002,202002,100,7818,72,,,0.5,0.9685,1.8795,,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3
+30002,202003,100,4897,72,,,0.5,1.113,,,0.626375032,,1.526947,,103.0154,1.4441576,,103.0154,4897,R,3,,3
+30003,202001,100,7511,7,,,0.5,,1.5274,,,4.265190233,,2.196577972,194.6,,2.062742377,194.6,7511,R,,3,3
+30003,202002,100,1761,7,,,0.5,0.9685,1.8795,,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3
+30003,202003,100,6492,7,,,0.5,1.113,,,3.686541738,,1.526947,,103.0154,1.4441576,,103.0154,6492,R,3,,3
+30004,202001,100,,81,,,0.5,,1.5274,,,,,2.196577972,194.6,,2.062742377,194.6,15762.6,C,,3,3
+30004,202002,100,,81,,,0.5,0.9685,1.8795,,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3
+30004,202003,100,,81,,,0.5,1.113,,,,,1.526947,,103.0154,1.4441576,,103.0154,16286.46938,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
new file mode 100644
index 00000000..02de0898
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+110001,202001,100,9244,89,,,0.5,,1.5274,50.3694
+110001,202002,100,8916,89,,,0.5,0.9685,1.8795,121.4187
+110001,202003,100,6194,89,,,0.5,1.113,,89.3761
+110002,202001,100,4826,83,,,0.5,,1.5274,50.3694
+110002,202002,100,5903,83,,,0.5,0.9685,1.8795,121.4187
+110002,202003,100,4743,83,,,0.5,1.113,,89.3761
+110003,202001,100,7586,4,,,0.5,,1.5274,50.3694
+110003,202002,100,1016,4,,,0.5,0.9685,1.8795,121.4187
+110003,202003,100,1429,4,,,0.5,1.113,,89.3761
+110004,202001,100,3975,76,,,0.5,,1.5274,50.3694
+110004,202002,100,3044,76,,,0.5,0.9685,1.8795,121.4187
+110004,202003,100,,76,,,0.5,1.113,,89.3761
+110005,202001,200,5217,27,,,0.5,,,107.48
+110005,202002,200,7016,27,,,0.5,1.377938182,,54.70285714
+110005,202003,200,9940,27,,,0.5,0.952585628,,98.26519337
+110006,202001,200,5325,42,,,0.5,,,107.48
+110006,202002,200,7747,42,,,0.5,1.377938182,,54.70285714
+110006,202003,200,6685,42,,,0.5,0.952585628,,98.26519337
+110007,202001,200,5496,19,,,0.5,,,107.48
+110007,202002,200,1010,19,,,0.5,1.377938182,,54.70285714
+110007,202003,200,1235,19,,,0.5,0.952585628,,98.26519337
+110008,202001,200,,43,,,0.5,,,107.48
+110008,202002,200,3913,43,,,0.5,1.377938182,,54.70285714
+110008,202003,200,6013,43,,,0.5,0.952585628,,98.26519337
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
new file mode 100644
index 00000000..eb418ded
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+110001,202001,100,9244,89,,,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
+110001,202002,100,8916,89,,,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
+110001,202003,100,6194,89,,,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
+110002,202001,100,4826,83,,,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
+110002,202002,100,5903,83,,,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
+110002,202003,100,4743,83,,,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
+110003,202001,100,7586,4,,,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
+110003,202002,100,1016,4,,,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
+110003,202003,100,1429,4,,,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
+110004,202001,100,3975,76,,,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
+110004,202002,100,3044,76,,,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
+110004,202003,100,,76,,,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
+110005,202001,200,5217,27,,,0.5,,,107.48,,0.743586089,,2.290844366,182.25,,2.290844366,144.865,5217,R,,3,3
+110005,202002,200,7016,27,,,0.5,1.377938182,,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4
+110005,202003,200,9940,27,,,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
+110006,202001,200,5325,42,,,0.5,,,107.48,,0.68736285,,2.290844366,182.25,,2.290844366,144.865,5325,R,,3,3
+110006,202002,200,7747,42,,,0.5,1.377938182,,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4
+110006,202003,200,6685,42,,,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
+110007,202001,200,5496,19,,,0.5,,,107.48,,5.441584158,,2.290844366,182.25,,2.290844366,144.865,5496,R,,3,3
+110007,202002,200,1010,19,,,0.5,1.377938182,,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4
+110007,202003,200,1235,19,,,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
+110008,202001,200,,43,,,0.5,,,107.48,,,,2.290844366,182.25,,2.290844366,144.865,8964.074004,BI,,3,3
+110008,202002,200,3913,43,,,0.5,1.377938182,,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4
+110008,202003,200,6013,43,,,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_input.csv
new file mode 100644
index 00000000..4eeb979c
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_input.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+210001,202001,1,547,10,,,0.5,,2.656680299,101.7103175
+210001,202002,1,362,10,,,0.5,0.771850199,1.13167173,74.91666667
+210001,202003,1,895,10,,,0.5,0.968230653,,70.26136364
+210002,202001,1,381,50,,,0.5,,2.656680299,101.7103175
+210002,202002,1,573,50,,,0.5,0.771850199,1.13167173,74.91666667
+210002,202003,1,214,50,,,0.5,0.968230653,,70.26136364
+210003,202001,2,961,12,,,0.5,,0.68736285,182.25
+210003,202002,2,267,12,,,0.5,0.994479964,1.158863126,150.2748092
+210003,202003,2,314,12,,,0.5,1.259780318,,182.2366412
+210004,202001,2,555,9,,,0.5,,0.68736285,182.25
+210004,202002,2,628,9,,,0.5,0.994479964,1.158863126,150.2748092
+210004,202003,2,736,9,,,0.5,1.259780318,,182.2366412
+210005,202001,1,100,18,,,0.5,,2.656680299,101.7103175
+210005,202002,2,,18,,,0.5,0.994479964,1.158863126,150.2748092
+210005,202003,2,,18,,,0.5,1.259780318,,182.2366412
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_output.csv
new file mode 100644
index 00000000..cb183528
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_output.csv
@@ -0,0 +1,16 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+210001,202001,1,547,10,,,0.5,,2.656680299,101.7103175,,1.511049724,,1.087985595,13.17948718,,1.872332947,57.44490234,547,R,,2,3
+210001,202002,1,362,10,,,0.5,0.771850199,1.13167173,74.91666667,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2
+210001,202003,1,895,10,,,0.5,0.968230653,,70.26136364,2.472375691,,1.42292432,,18.48333333,1.195577487,,44.37234849,895,R,2,,2
+210002,202001,1,381,50,,,0.5,,2.656680299,101.7103175,,0.664921466,,1.087985595,13.17948718,,1.872332947,57.44490234,381,R,,2,3
+210002,202002,1,573,50,,,0.5,0.771850199,1.13167173,74.91666667,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2
+210002,202003,1,214,50,,,0.5,0.968230653,,70.26136364,0.373472949,,1.42292432,,18.48333333,1.195577487,,44.37234849,214,R,2,,2
+210003,202001,2,961,12,,,0.5,,0.68736285,182.25,,3.599250936,,2.241504449,72.19047619,,1.46443365,127.2202381,961,R,,2,2
+210003,202002,2,267,12,,,0.5,0.994479964,1.158863126,150.2748092,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2
+210003,202003,2,314,12,,,0.5,1.259780318,,182.2366412,1.176029963,,1.174002242,,50,1.21689128,,116.1183206,314,R,2,,2
+210004,202001,2,555,9,,,0.5,,0.68736285,182.25,,0.883757962,,2.241504449,72.19047619,,1.46443365,127.2202381,555,R,,2,2
+210004,202002,2,628,9,,,0.5,0.994479964,1.158863126,150.2748092,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2
+210004,202003,2,736,9,,,0.5,1.259780318,,182.2366412,1.171974522,,1.174002242,,50,1.21689128,,116.1183206,736,R,2,,2
+210005,202001,1,100,18,,,0.5,,2.656680299,101.7103175,,,,1.087985595,13.17948718,,1.872332947,57.44490234,100,R,,2,3
+210005,202002,2,,18,,,0.5,0.994479964,1.158863126,150.2748092,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2
+210005,202003,2,,18,,,0.5,1.259780318,,182.2366412,,,1.174002242,,50,1.21689128,,116.1183206,2112.577671,FIC,2,,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_input.csv
new file mode 100644
index 00000000..486f0501
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_input.csv
@@ -0,0 +1,29 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+70001,202001,100,5951,39,,,0.5,,1.511049724,101.7103175
+70001,202002,100,1814,39,,,0.5,,,
+70001,202003,100,734,39,,,0.5,1.082864299,,70.26136364
+70001,202004,100,96,39,,,0.5,1.42292432,0.664921466,101.7103175
+70001,202005,100,9086,39,,,0.5,0.70468356,2.677570093,74.91666667
+70001,202006,100,3949,39,,,0.5,1.174002242,0.404469274,182.2366412
+70001,202007,100,49,39,,,0.5,,,
+70002,202001,100,6705,94,,,0.5,,1.511049724,101.7103175
+70002,202002,100,48,94,,,0.5,,,
+70002,202003,100,5361,94,,,0.5,1.082864299,,70.26136364
+70002,202004,100,8767,94,,,0.5,1.42292432,0.664921466,101.7103175
+70002,202005,100,9214,94,,,0.5,0.70468356,2.677570093,74.91666667
+70002,202006,100,7467,94,,,0.5,1.174002242,0.404469274,182.2366412
+70002,202007,100,3475,94,,,0.5,,,
+70003,202001,100,6153,42,,,0.5,,1.511049724,101.7103175
+70003,202002,100,7711,42,,,0.5,,,
+70003,202003,100,5403,42,,,0.5,1.082864299,,70.26136364
+70003,202004,100,7445,42,,,0.5,1.42292432,0.664921466,101.7103175
+70003,202005,100,7092,42,,,0.5,0.70468356,2.677570093,74.91666667
+70003,202006,100,2038,42,,,0.5,1.174002242,0.404469274,182.2366412
+70003,202007,100,8768,42,,,0.5,,,
+70004,202001,100,,6,,,0.5,,1.511049724,101.7103175
+70004,202002,100,,6,,,0.5,,,
+70004,202003,100,6288,6,,,0.5,1.082864299,,70.26136364
+70004,202004,100,,6,,,0.5,1.42292432,0.664921466,101.7103175
+70004,202005,100,,6,,,0.5,0.70468356,2.677570093,74.91666667
+70004,202006,100,5875,6,,,0.5,1.174002242,0.404469274,182.2366412
+70004,202007,100,,6,,,0.5,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_output.csv
new file mode 100644
index 00000000..5550c5eb
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_output.csv
@@ -0,0 +1,29 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+70001,202001,100,5951,39,,,0.5,,1.511049724,101.7103175,,3.280595369,,47.92201545,107.48,,24.71653259,104.5951588,5951,R,,3,3
+70001,202002,100,1814,39,,,0.5,,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
+70001,202003,100,734,39,,,0.5,1.082864299,,70.26136364,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4
+70001,202004,100,96,39,,,0.5,1.42292432,0.664921466,101.7103175,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3
+70001,202005,100,9086,39,,,0.5,0.70468356,2.677570093,74.91666667,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3
+70001,202006,100,3949,39,,,0.5,1.174002242,0.404469274,182.2366412,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4
+70001,202007,100,49,39,,,0.5,,,,0.012408205,,1.593348776,,70.24,1.593348776,,70.24,49,R,3,,3
+70002,202001,100,6705,94,,,0.5,,1.511049724,101.7103175,,139.6875,,47.92201545,107.48,,24.71653259,104.5951588,6705,R,,3,3
+70002,202002,100,48,94,,,0.5,,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3
+70002,202003,100,5361,94,,,0.5,1.082864299,,70.26136364,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4
+70002,202004,100,8767,94,,,0.5,1.42292432,0.664921466,101.7103175,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3
+70002,202005,100,9214,94,,,0.5,0.70468356,2.677570093,74.91666667,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3
+70002,202006,100,7467,94,,,0.5,1.174002242,0.404469274,182.2366412,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4
+70002,202007,100,3475,94,,,0.5,,,,0.46538101,,1.593348776,,70.24,1.593348776,,70.24,3475,R,3,,3
+70003,202001,100,6153,42,,,0.5,,1.511049724,101.7103175,,0.797950979,,47.92201545,107.48,,24.71653259,104.5951588,6153,R,,3,3
+70003,202002,100,7711,42,,,0.5,,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
+70003,202003,100,5403,42,,,0.5,1.082864299,,70.26136364,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4
+70003,202004,100,7445,42,,,0.5,1.42292432,0.664921466,101.7103175,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3
+70003,202005,100,7092,42,,,0.5,0.70468356,2.677570093,74.91666667,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3
+70003,202006,100,2038,42,,,0.5,1.174002242,0.404469274,182.2366412,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4
+70003,202007,100,8768,42,,,0.5,,,,4.302257115,,1.593348776,,70.24,1.593348776,,70.24,8768,R,3,,3
+70004,202001,100,,6,,,0.5,,1.511049724,101.7103175,,,,47.92201545,107.48,,24.71653259,104.5951588,202432.0564,BI,,3,3
+70004,202002,100,,6,,,0.5,,,,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
+70004,202003,100,6288,6,,,0.5,1.082864299,,70.26136364,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4
+70004,202004,100,,6,,,0.5,1.42292432,0.664921466,101.7103175,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3
+70004,202005,100,,6,,,0.5,0.70468356,2.677570093,74.91666667,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3
+70004,202006,100,5875,6,,,0.5,1.174002242,0.404469274,182.2366412,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4
+70004,202007,100,,6,,,0.5,,,,,,1.593348776,,70.24,1.593348776,,70.24,9360.924059,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
new file mode 100644
index 00000000..8219d361
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w
+110001,202001,100,9244,89,,,0.5
+110001,202002,100,8916,89,,,0.5
+110001,202003,100,6194,89,,,0.5
+110002,202001,100,4826,83,,,0.5
+110002,202002,100,5903,83,,,0.5
+110002,202003,100,4743,83,,,0.5
+110003,202001,100,7586,4,,,0.5
+110003,202002,100,1016,4,,,0.5
+110003,202003,100,1429,4,,,0.5
+110004,202001,100,3975,76,,,0.5
+110004,202002,100,3044,76,,,0.5
+110004,202003,100,,76,,,0.5
+110005,202001,200,5217,27,,,0.5
+110005,202002,200,7016,27,,,0.5
+110005,202003,200,9940,27,,,0.5
+110006,202001,200,5325,42,,,0.5
+110006,202002,200,7747,42,,,0.5
+110006,202003,200,6685,42,,,0.5
+110007,202001,200,5496,19,,,0.5
+110007,202002,200,1010,19,,,0.5
+110007,202003,200,1235,19,,,0.5
+110008,202001,200,,43,,,0.5
+110008,202002,200,3913,43,,,0.5
+110008,202003,200,6013,43,,,0.5
+110009,202001,100,150000,85,,,0.5
+110009,202002,100,180000,85,,,0.5
+110009,202003,100,120000,85,,,0.5
+110010,202001,100,,71,,,0.5
+110010,202002,100,,71,,,0.5
+110010,202003,100,,71,,,0.5
+110011,202001,200,150000,85,,,0.5
+110011,202002,200,180000,85,,,0.5
+110011,202003,200,120000,85,,,0.5
+110012,202001,200,,71,,,0.5
+110012,202002,200,,71,,,0.5
+110012,202003,200,,71,,,0.5
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
new file mode 100644
index 00000000..00721280
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
+110001,202001,100,9244,89,,,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4,,,
+110001,202002,100,8916,89,,,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,,,
+110001,202003,100,6194,89,,,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3,,,
+110002,202001,100,4826,83,,,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4,,,
+110002,202002,100,5903,83,,,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,,,
+110002,202003,100,4743,83,,,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3,,,
+110003,202001,100,7586,4,,,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4,,,
+110003,202002,100,1016,4,,,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,,,
+110003,202003,100,1429,4,,,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3,,,
+110004,202001,100,3975,76,,,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4,,,
+110004,202002,100,3044,76,,,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,,,
+110004,202003,100,,76,,,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3,,,
+110005,202001,200,5217,27,,,0.5,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3,,,
+110005,202002,200,7016,27,,,0.5,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,,,
+110005,202003,200,9940,27,,,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4,,,
+110006,202001,200,5325,42,,,0.5,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3,,,
+110006,202002,200,7747,42,,,0.5,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,,,
+110006,202003,200,6685,42,,,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4,,,
+110007,202001,200,5496,19,,,0.5,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3,,,
+110007,202002,200,1010,19,,,0.5,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,,,
+110007,202003,200,1235,19,,,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4,,,
+110008,202001,200,,43,,,0.5,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3,,,
+110008,202002,200,3913,43,,,0.5,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,,
+110008,202003,200,6013,43,,,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4,,,
+110009,202001,100,150000,85,,,0.5,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,150000,R,,4,4,,,TRUE
+110009,202002,100,180000,85,,,0.5,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,,,TRUE
+110009,202003,100,120000,85,,,0.5,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,120000,R,3,,3,,,TRUE
+110010,202001,100,,71,,,0.5,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,5398.829971,C,,4,4,,,
+110010,202002,100,,71,,,0.5,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,
+110010,202003,100,,71,,,0.5,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,4888.735268,FIC,3,,3,,,
+110011,202001,200,150000,85,,,0.5,,,,,,,2.290844366,182.25,,2.642597676,144.865,150000,R,,3,3,,,TRUE
+110011,202002,200,180000,85,,,0.5,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,,,TRUE
+110011,202003,200,120000,85,,,0.5,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,120000,R,4,,4,,,TRUE
+110012,202001,200,,71,,,0.5,,,,,,,2.290844366,182.25,,2.642597676,144.865,10285.415,C,,3,3,,,
+110012,202002,200,,71,,,0.5,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,
+110012,202003,200,,71,,,0.5,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,13496.15416,FIC,4,,4,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv
new file mode 100644
index 00000000..61fd8667
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv
@@ -0,0 +1,22 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+110001,202001,100,9244,89,,,0.5,,2.09204015,76.03985875
+110001,202002,100,8916,89,,,0.5,0.8701751,1.505585865,98.16768334
+110001,202003,100,6194,89,,,0.5,1.040615327,,79.81873182
+110002,202001,100,4826,83,,,0.5,,2.09204015,76.03985875
+110002,202002,100,5903,83,,,0.5,0.8701751,1.505585865,98.16768334
+110002,202003,100,4743,83,,,0.5,1.040615327,,79.81873182
+110003,202001,100,7586,4,,,0.5,,2.09204015,76.03985875
+110003,202002,100,1016,4,,,0.5,0.8701751,1.505585865,98.16768334
+110003,202003,100,1429,4,,,0.5,1.040615327,,79.81873182
+110004,202001,100,3975,76,,,0.5,,2.09204015,76.03985875
+110004,202002,100,3044,76,,,0.5,0.8701751,1.505585865,98.16768334
+110004,202003,100,,76,,,0.5,1.040615327,,79.81873182
+110005,202001,200,,27,,,0.5,,2.642597676,144.865
+110005,202002,200,,27,,,0.5,1.186209073,0.751963069,102.4888332
+110005,202003,200,9940,27,,,0.5,1.106182973,,140.2509173
+110006,202001,200,5325,42,,,0.5,,2.642597676,144.865
+110006,202002,200,,42,,,0.5,1.186209073,0.751963069,102.4888332
+110006,202003,200,,42,,,0.5,1.106182973,,140.2509173
+110007,202001,200,,19,,,0.5,,2.642597676,144.865
+110007,202002,200,,19,,,0.5,1.186209073,0.751963069,102.4888332
+110007,202003,200,,19,,,0.5,1.106182973,,140.2509173
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
new file mode 100644
index 00000000..7602da02
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
@@ -0,0 +1,22 @@
+prev,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+110001,202001,100,9244,89,,,0.5,,2.09204015,76.03985875,,1.036787797,,2.656680299,101.7103175,,2.374360225,88.87508813,9244,R,,4,4
+110001,202002,100,8916,89,,,0.5,0.8701751,1.505585865,98.16768334,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4
+110001,202003,100,6194,89,,,0.5,1.040615327,,79.81873182,0.694706146,,0.968230653,,70.26136364,1.00442299,,75.04004773,6194,R,3,,3
+110002,202001,100,4826,83,,,0.5,,2.09204015,76.03985875,,0.817550398,,2.656680299,101.7103175,,2.374360225,88.87508813,4826,R,,4,4
+110002,202002,100,5903,83,,,0.5,0.8701751,1.505585865,98.16768334,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4
+110002,202003,100,4743,83,,,0.5,1.040615327,,79.81873182,0.803489751,,0.968230653,,70.26136364,1.00442299,,75.04004773,4743,R,3,,3
+110003,202001,100,7586,4,,,0.5,,2.09204015,76.03985875,,7.466535433,,2.656680299,101.7103175,,2.374360225,88.87508813,7586,R,,4,4
+110003,202002,100,1016,4,,,0.5,0.8701751,1.505585865,98.16768334,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4
+110003,202003,100,1429,4,,,0.5,1.040615327,,79.81873182,1.406496063,,0.968230653,,70.26136364,1.00442299,,75.04004773,1429,R,3,,3
+110004,202001,100,3975,76,,,0.5,,2.09204015,76.03985875,,1.305847569,,2.656680299,101.7103175,,2.374360225,88.87508813,3975,R,,4,4
+110004,202002,100,3044,76,,,0.5,0.8701751,1.505585865,98.16768334,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4
+110004,202003,100,,76,,,0.5,1.040615327,,79.81873182,,,0.968230653,,70.26136364,1.00442299,,75.04004773,3057.463582,FIR,3,,3
+110005,202001,200,,27,,,0.5,,2.642597676,144.865,,,,1,1,,1.821298838,72.9325,9940,BI,,0,0
+110005,202002,200,,27,,,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0
+110005,202003,200,9940,27,,,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,9940,R,0,,1
+110006,202001,200,5325,42,,,0.5,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,5325,R,,0,1
+110006,202002,200,,42,,,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0
+110006,202003,200,,42,,,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,5325,FIR,0,,1
+110007,202001,200,,19,,,0.5,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,2580.681786,C,,0,1
+110007,202002,200,,19,,,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0
+110007,202003,200,,19,,,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,2970.72366,FIC,0,,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
new file mode 100644
index 00000000..9b32c504
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
@@ -0,0 +1,73 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+80001,202001,100,9244,89,0.1,0.1,0.5,,2.642597676,144.865
+80001,202002,100,8916,89,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80001,202003,100,6194,89,0.1,0.1,0.5,1.106182973,,140.2509173
+80002,202001,100,4826,83,0.1,0.1,0.5,,2.642597676,144.865
+80002,202002,100,5903,83,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80002,202003,100,4743,83,0.1,0.1,0.5,1.106182973,,140.2509173
+80003,202001,100,7586,4,0.1,0.1,0.5,,2.642597676,144.865
+80003,202002,100,1016,4,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80003,202003,100,1429,4,0.1,0.1,0.5,1.106182973,,140.2509173
+80004,202001,100,3975,76,0.1,0.1,0.5,,2.642597676,144.865
+80004,202002,100,3044,76,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80004,202003,100,3673,76,0.1,0.1,0.5,1.106182973,,140.2509173
+80005,202001,100,1941,18,0.1,0.1,0.5,,2.642597676,144.865
+80005,202002,100,3121,18,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80005,202003,100,1208,18,0.1,0.1,0.5,1.106182973,,140.2509173
+80006,202001,100,5405,94,0.1,0.1,0.5,,2.642597676,144.865
+80006,202002,100,7084,94,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80006,202003,100,4980,94,0.1,0.1,0.5,1.106182973,,140.2509173
+80007,202001,100,15172,8,0.1,0.1,0.5,,2.642597676,144.865
+80007,202002,100,2845,8,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80007,202003,100,3501,8,0.1,0.1,0.5,1.106182973,,140.2509173
+80008,202001,100,16298,304,0.1,0.1,0.5,,2.642597676,144.865
+80008,202002,100,14429,304,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80008,202003,100,14295,304,0.1,0.1,0.5,1.106182973,,140.2509173
+80009,202001,100,3698,45,0.1,0.1,0.5,,2.642597676,144.865
+80009,202002,100,4993,45,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80009,202003,100,4212,45,0.1,0.1,0.5,1.106182973,,140.2509173
+80010,202001,100,7722,100,0.1,0.1,0.5,,2.642597676,144.865
+80010,202002,100,10153,100,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80010,202003,100,6545,100,0.1,0.1,0.5,1.106182973,,140.2509173
+80011,202001,100,30344,19,0.1,0.1,0.5,,2.642597676,144.865
+80011,202002,100,3627,19,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80011,202003,100,7288,19,0.1,0.1,0.5,1.106182973,,140.2509173
+80012,202001,100,16298,304,0.1,0.1,0.5,,2.642597676,144.865
+80012,202002,100,11567,304,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
+80012,202003,100,,304,0.1,0.1,0.5,1.106182973,,140.2509173
+80013,202001,200,20190,54,0.1,0.1,0.5,,2.09204015,76.03985875
+80013,202002,200,18242,54,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80013,202003,200,28826,54,0.1,0.1,0.5,1.040615327,,79.81873182
+80014,202001,200,4260,47,0.1,0.1,0.5,,2.09204015,76.03985875
+80014,202002,200,5036,42,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80014,202003,200,6484,42,0.1,0.1,0.5,1.040615327,,79.81873182
+80015,202001,200,19236,57,0.1,0.1,0.5,,2.09204015,76.03985875
+80015,202002,200,4949,57,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80015,202003,200,3544,57,0.1,0.1,0.5,1.040615327,,79.81873182
+80016,202001,200,14902,163,0.1,0.1,0.5,,2.09204015,76.03985875
+80016,202002,200,16435,163,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80016,202003,200,24653,163,0.1,0.1,0.5,1.040615327,,79.81873182
+80017,202001,200,35476,149,0.1,0.1,0.5,,2.09204015,76.03985875
+80017,202002,200,50515,149,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80017,202003,200,53477,149,0.1,0.1,0.5,1.040615327,,79.81873182
+80018,202001,200,13845,126,0.1,0.1,0.5,,2.09204015,76.03985875
+80018,202002,200,25488,126,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80018,202003,200,27409,126,0.1,0.1,0.5,1.040615327,,79.81873182
+80019,202001,200,1099,6,0.1,0.1,0.5,,2.09204015,76.03985875
+80019,202002,200,434,6,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80019,202003,200,124,6,0.1,0.1,0.5,1.040615327,,79.81873182
+80020,202001,200,3348,22,0.1,0.1,0.5,,2.09204015,76.03985875
+80020,202002,200,1996,22,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80020,202003,200,5051,22,0.1,0.1,0.5,1.040615327,,79.81873182
+80021,202001,200,29215,108,0.1,0.1,0.5,,2.09204015,76.03985875
+80021,202002,200,34168,108,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80021,202003,200,61628,108,0.1,0.1,0.5,1.040615327,,79.81873182
+80022,202001,200,6390,67,0.1,0.1,0.5,,2.09204015,76.03985875
+80022,202002,200,12705,67,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80022,202003,200,11966,67,0.1,0.1,0.5,1.040615327,,79.81873182
+80023,202001,200,4562,18,0.1,0.1,0.5,,2.09204015,76.03985875
+80023,202002,200,1717,18,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80023,202003,200,2371,18,0.1,0.1,0.5,1.040615327,,79.81873182
+80024,202001,200,,155,0.1,0.1,0.5,,2.09204015,76.03985875
+80024,202002,200,18782,155,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
+80024,202003,200,21046,155,0.1,0.1,0.5,1.040615327,,79.81873182
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
new file mode 100644
index 00000000..c363f10c
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -0,0 +1,73 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
+80001,202001,100,9244,89,0.1,0.1,0.5,,2.642597676,144.865,,1.036787797,,1.036787797,,2.076255394,107.1910333,,2.359426535,126.0280167,9244,R,,10,12,,,
+80001,202002,100,8916,89,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.964517525,1.43945754,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,
+80001,202003,100,6194,89,0.1,0.1,0.5,1.106182973,,140.2509173,0.694706146,,0.694706146,,0.918490819,,69.22002885,1.012336896,,104.7354731,6194,R,9,,11,,,
+80002,202001,100,4826,83,0.1,0.1,0.5,,2.642597676,144.865,,0.817550398,,0.817550398,,2.076255394,107.1910333,,2.359426535,126.0280167,4826,R,,10,12,,,
+80002,202002,100,5903,83,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,1.223166183,1.244570947,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,,,
+80002,202003,100,4743,83,0.1,0.1,0.5,1.106182973,,140.2509173,0.803489751,,0.803489751,,0.918490819,,69.22002885,1.012336896,,104.7354731,4743,R,9,,11,,,
+80003,202001,100,7586,4,0.1,0.1,0.5,,2.642597676,144.865,,7.466535433,,7.466535433,,2.076255394,107.1910333,,2.359426535,126.0280167,7586,R,,10,12,,,
+80003,202002,100,1016,4,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.133930925,0.710986704,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,,,
+80003,202003,100,1429,4,0.1,0.1,0.5,1.106182973,,140.2509173,1.406496063,,1.406496063,,0.918490819,,69.22002885,1.012336896,,104.7354731,1429,R,9,,11,,,
+80004,202001,100,3975,76,0.1,0.1,0.5,,2.642597676,144.865,,1.305847569,,1.305847569,,2.076255394,107.1910333,,2.359426535,126.0280167,3975,R,,10,12,,,
+80004,202002,100,3044,76,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.765786164,0.82875034,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,,,
+80004,202003,100,3673,76,0.1,0.1,0.5,1.106182973,,140.2509173,1.206636005,,1.206636005,,0.918490819,,69.22002885,1.012336896,,104.7354731,3673,R,9,,11,,,
+80005,202001,100,1941,18,0.1,0.1,0.5,,2.642597676,144.865,,0.622072678,,,,2.076255394,107.1910333,,2.359426535,126.0280167,1941,R,,10,12,,TRUE,
+80005,202002,100,3121,18,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,1.607529208,2.583641738,,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,TRUE,TRUE,
+80005,202003,100,1208,18,0.1,0.1,0.5,1.106182973,,140.2509173,0.387050567,,0.387050567,,0.918490819,,69.22002885,1.012336896,,104.7354731,1208,R,9,,11,,,
+80006,202001,100,5405,94,0.1,0.1,0.5,,2.642597676,144.865,,0.763047038,,0.763047038,,2.076255394,107.1910333,,2.359426535,126.0280167,5405,R,,10,12,,,
+80006,202002,100,7084,94,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,1.310535196,1.422366796,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,,,
+80006,202003,100,4980,94,0.1,0.1,0.5,1.106182973,,140.2509173,0.703053532,,0.703053532,,0.918490819,,69.22002885,1.012336896,,104.7354731,4980,R,9,,11,,,
+80007,202001,100,15172,8,0.1,0.1,0.5,,2.642597676,144.865,,5.333239595,,5.333239595,,2.076255394,107.1910333,,2.359426535,126.0280167,15172,R,,10,12,,,
+80007,202002,100,2845,8,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.187503296,0.812556233,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,,,
+80007,202003,100,3501,8,0.1,0.1,0.5,1.106182973,,140.2509173,1.230684055,,1.230684055,,0.918490819,,69.22002885,1.012336896,,104.7354731,3501,R,9,,11,,,
+80008,202001,100,16298,304,0.1,0.1,0.5,,2.642597676,144.865,,1.129530598,,1.129530598,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
+80008,202002,100,14429,304,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.885323516,1.009357249,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,,,
+80008,202003,100,14295,304,0.1,0.1,0.5,1.106182973,,140.2509173,0.990729498,,0.990729498,,0.918490819,,69.22002885,1.012336896,,104.7354731,14295,R,9,,11,,,
+80009,202001,100,3698,45,0.1,0.1,0.5,,2.642597676,144.865,,0.740562712,,0.740562712,,2.076255394,107.1910333,,2.359426535,126.0280167,3698,R,,10,12,,,
+80009,202002,100,4993,45,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,1.350324535,1.185435621,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,,,
+80009,202003,100,4212,45,0.1,0.1,0.5,1.106182973,,140.2509173,0.843571749,,0.843571749,,0.918490819,,69.22002885,1.012336896,,104.7354731,4212,R,9,,11,,,
+80010,202001,100,7722,100,0.1,0.1,0.5,,2.642597676,144.865,,0.760511998,,0.760511998,,2.076255394,107.1910333,,2.359426535,126.0280167,7722,R,,10,12,,,
+80010,202002,100,10153,100,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,1.314903647,1.551204368,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,,,
+80010,202003,100,6545,100,0.1,0.1,0.5,1.106182973,,140.2509173,0.644660382,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,6545,R,9,,11,TRUE,,
+80011,202001,100,30344,19,0.1,0.1,0.5,,2.642597676,144.865,,8.365866031,,,,2.076255394,107.1910333,,2.359426535,126.0280167,30344,R,,10,12,,TRUE,
+80011,202002,100,3627,19,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.119533351,0.497690693,,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,TRUE,TRUE,
+80011,202003,100,7288,19,0.1,0.1,0.5,1.106182973,,140.2509173,2.00928009,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,7288,R,9,,11,TRUE,,
+80012,202001,100,16298,304,0.1,0.1,0.5,,2.642597676,144.865,,1.408940798,,1.408940798,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
+80012,202002,100,11567,304,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.70975303,,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,,,
+80012,202003,100,,304,0.1,0.1,0.5,1.106182973,,140.2509173,,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,11709.70088,FIR,9,,11,,,
+80013,202001,200,20190,54,0.1,0.1,0.5,,2.09204015,76.03985875,,1.106799294,,1.106799294,,1.313944665,186.8459267,,1.702992408,131.4428927,20190,R,,9,11,,,
+80013,202002,200,18242,54,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,0.903506178,0.632817595,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,,,
+80013,202003,200,28826,54,0.1,0.1,0.5,1.040615327,,79.81873182,1.58023419,,1.58023419,,1.246527322,,255.2315185,1.143571325,,167.5251252,28826,R,10,,12,,,
+80014,202001,200,4260,47,0.1,0.1,0.5,,2.09204015,76.03985875,,0.845985046,,0.845985046,,1.313944665,186.8459267,,1.702992408,131.4428927,4260,R,,9,11,,,
+80014,202002,200,5036,42,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.182053991,0.776557765,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,,,
+80014,202003,200,6484,42,0.1,0.1,0.5,1.040615327,,79.81873182,1.28773421,,1.28773421,,1.246527322,,255.2315185,1.143571325,,167.5251252,6484,R,10,,12,,,
+80015,202001,200,19236,57,0.1,0.1,0.5,,2.09204015,76.03985875,,3.886845827,,,,1.313944665,186.8459267,,1.702992408,131.4428927,19236,R,,9,11,,TRUE,
+80015,202002,200,4949,57,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,0.25727802,1.396267404,,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,TRUE,,
+80015,202003,200,3544,57,0.1,0.1,0.5,1.040615327,,79.81873182,0.716195191,,0.716195191,,1.246527322,,255.2315185,1.143571325,,167.5251252,3544,R,10,,12,,,
+80016,202001,200,14902,163,0.1,0.1,0.5,,2.09204015,76.03985875,,0.906730921,,0.906730921,,1.313944665,186.8459267,,1.702992408,131.4428927,14902,R,,9,11,,,
+80016,202002,200,16435,163,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.102863018,0.666628808,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,,,
+80016,202003,200,24653,163,0.1,0.1,0.5,1.040615327,,79.81873182,1.500085186,,1.500085186,,1.246527322,,255.2315185,1.143571325,,167.5251252,24653,R,10,,12,,,
+80017,202001,200,35476,149,0.1,0.1,0.5,,2.09204015,76.03985875,,0.702275751,,0.702275751,,1.313944665,186.8459267,,1.702992408,131.4428927,35476,R,,9,11,,,
+80017,202002,200,50515,149,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.42394209,0.944611909,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,,,
+80017,202003,200,53477,149,0.1,0.1,0.5,1.040615327,,79.81873182,1.058635817,,1.058635817,,1.246527322,,255.2315185,1.143571325,,167.5251252,53477,R,10,,12,,,
+80018,202001,200,13845,126,0.1,0.1,0.5,,2.09204015,76.03985875,,0.543204684,,0.543204684,,1.313944665,186.8459267,,1.702992408,131.4428927,13845,R,,9,11,,,
+80018,202002,200,25488,126,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.840926688,0.929916997,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,,,
+80018,202003,200,27409,126,0.1,0.1,0.5,1.040615327,,79.81873182,1.075364795,,1.075364795,,1.246527322,,255.2315185,1.143571325,,167.5251252,27409,R,10,,12,,,
+80019,202001,200,1099,6,0.1,0.1,0.5,,2.09204015,76.03985875,,2.530969376,,2.530969376,,1.313944665,186.8459267,,1.702992408,131.4428927,1099,R,,9,11,,,
+80019,202002,200,434,6,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,0.395105531,3.51659919,0.395105531,,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,,TRUE,
+80019,202003,200,124,6,0.1,0.1,0.5,1.040615327,,79.81873182,0.284365646,,,,1.246527322,,255.2315185,1.143571325,,167.5251252,124,R,10,,12,TRUE,,
+80020,202001,200,3348,22,0.1,0.1,0.5,,2.09204015,76.03985875,,1.677715809,,1.677715809,,1.313944665,186.8459267,,1.702992408,131.4428927,3348,R,,9,11,,,
+80020,202002,200,1996,22,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,0.596048505,0.395102278,0.596048505,,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,,TRUE,
+80020,202003,200,5051,22,0.1,0.1,0.5,1.040615327,,79.81873182,2.530990214,,,,1.246527322,,255.2315185,1.143571325,,167.5251252,5051,R,10,,12,TRUE,,
+80021,202001,200,29215,108,0.1,0.1,0.5,,2.09204015,76.03985875,,0.855047659,,0.855047659,,1.313944665,186.8459267,,1.702992408,131.4428927,29215,R,,9,11,,,
+80021,202002,200,34168,108,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.169525453,0.554422016,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,,,
+80021,202003,200,61628,108,0.1,0.1,0.5,1.040615327,,79.81873182,1.803680177,,1.803680177,,1.246527322,,255.2315185,1.143571325,,167.5251252,61628,R,10,,12,,,
+80022,202001,200,6390,67,0.1,0.1,0.5,,2.09204015,76.03985875,,0.502948427,,,,1.313944665,186.8459267,,1.702992408,131.4428927,6390,R,,9,11,,TRUE,
+80022,202002,200,12705,67,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.98827543,1.061751691,,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,,TRUE,
+80022,202003,200,11966,67,0.1,0.1,0.5,1.040615327,,79.81873182,0.9418398,,0.9418398,,1.246527322,,255.2315185,1.143571325,,167.5251252,11966,R,10,,12,,,
+80023,202001,200,4562,18,0.1,0.1,0.5,,2.09204015,76.03985875,,2.656773442,,2.656773442,,1.313944665,186.8459267,,1.702992408,131.4428927,4562,R,,9,11,,,
+80023,202002,200,1717,18,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,0.376396415,0.724105938,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,,,
+80023,202003,200,2371,18,0.1,0.1,0.5,1.040615327,,79.81873182,1.381013395,,1.381013395,,1.246527322,,255.2315185,1.143571325,,167.5251252,2371,R,10,,12,,,
+80024,202001,200,,155,0.1,0.1,0.5,,2.09204015,76.03985875,,,,,,1.313944665,186.8459267,,1.702992408,131.4428927,31985.6034,BI,,9,11,,,
+80024,202002,200,18782,155,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,,0.892466323,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,,
+80024,202003,200,21046,155,0.1,0.1,0.5,1.040615327,,79.81873182,1.120490459,,1.120490459,,1.246527322,,255.2315185,1.143571325,,167.5251252,21046,R,10,,12,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
new file mode 100644
index 00000000..87bb2a92
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+30001,202001,100,8444,51,0.1,0.1,0.5,,2.09204015,76.03985875
+30001,202002,100,7476,51,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30001,202003,100,2003,51,0.1,0.1,0.5,2.040615327,,84.81873182
+30002,202001,100,9343,72,0.1,0.1,0.5,,2.09204015,76.03985875
+30002,202002,100,7818,72,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30002,202003,100,4897,72,0.1,0.1,0.5,2.040615327,,84.81873182
+30003,202001,100,7511,7,0.1,0.1,0.5,,2.09204015,76.03985875
+30003,202002,100,1761,7,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30003,202003,100,6492,7,0.1,0.1,0.5,2.040615327,,84.81873182
+30004,202001,100,64,81,0.1,0.1,0.5,,2.09204015,76.03985875
+30004,202002,100,2113,81,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30004,202003,100,185,81,0.1,0.1,0.5,2.040615327,,84.81873182
+30005,202001,100,844,5,0.1,0.1,0.5,,2.09204015,76.03985875
+30005,202002,100,897,5,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30005,202003,100,280,5,0.1,0.1,0.5,2.040615327,,84.81873182
+30006,202001,100,1869,14,0.1,0.1,0.5,,2.09204015,76.03985875
+30006,202002,100,1876,14,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30006,202003,100,1371,14,0.1,0.1,0.5,2.040615327,,84.81873182
+30007,202001,100,12769,12,0.1,0.1,0.5,,2.09204015,76.03985875
+30007,202002,100,2853,12,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30007,202003,100,11491,12,0.1,0.1,0.5,2.040615327,,84.81873182
+30008,202001,100,141,162,0.1,0.1,0.5,,2.09204015,76.03985875
+30008,202002,100,6001,162,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30008,202003,100,433,162,0.1,0.1,0.5,2.040615327,,84.81873182
+30009,202001,100,6417,26,0.1,0.1,0.5,,2.09204015,76.03985875
+30009,202002,100,4037,26,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30009,202003,100,1322,26,0.1,0.1,0.5,2.040615327,,84.81873182
+30010,202001,100,28963,144,0.1,0.1,0.5,,2.09204015,76.03985875
+30010,202002,100,21734,144,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30010,202003,100,10529,144,0.1,0.1,0.5,2.040615327,,84.81873182
+30011,202001,100,6009,5,0.1,0.1,0.5,,2.09204015,76.03985875
+30011,202002,100,1145,5,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30011,202003,100,5064,5,0.1,0.1,0.5,2.040615327,,84.81873182
+30012,202001,100,,275,0.1,0.1,0.5,,2.09204015,76.03985875
+30012,202002,100,,275,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+30012,202003,100,,275,0.1,0.1,0.5,2.040615327,,84.81873182
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
new file mode 100644
index 00000000..eea5f4de
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
+30001,202001,100,8444,51,0.1,0.1,0.5,,2.09204015,76.03985875,,1.129481006,,1.129481006,,1.772802559,142.3186593,,1.932421355,109.179259,8444,R,,9,11,,
+30001,202002,100,7476,51,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,,
+30001,202003,100,2003,51,0.1,0.1,0.5,2.040615327,,84.81873182,0.267924024,,0.267924024,,1.172391173,,76.13443331,1.60650325,,80.47658257,2003,R,9,,11,,
+30002,202001,100,9343,72,0.1,0.1,0.5,,2.09204015,76.03985875,,1.195062676,,1.195062676,,1.772802559,142.3186593,,1.932421355,109.179259,9343,R,,9,11,,
+30002,202002,100,7818,72,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,,
+30002,202003,100,4897,72,0.1,0.1,0.5,2.040615327,,84.81873182,0.626375032,,0.626375032,,1.172391173,,76.13443331,1.60650325,,80.47658257,4897,R,9,,11,,
+30003,202001,100,7511,7,0.1,0.1,0.5,,2.09204015,76.03985875,,4.265190233,,4.265190233,,1.772802559,142.3186593,,1.932421355,109.179259,7511,R,,9,11,,
+30003,202002,100,1761,7,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,,
+30003,202003,100,6492,7,0.1,0.1,0.5,2.040615327,,84.81873182,3.686541738,,3.686541738,,1.172391173,,76.13443331,1.60650325,,80.47658257,6492,R,9,,11,,
+30004,202001,100,64,81,0.1,0.1,0.5,,2.09204015,76.03985875,,0.030288689,,0.030288689,,1.772802559,142.3186593,,1.932421355,109.179259,64,R,,9,11,,
+30004,202002,100,2113,81,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,,
+30004,202003,100,185,81,0.1,0.1,0.5,2.040615327,,84.81873182,0.087553242,,0.087553242,,1.172391173,,76.13443331,1.60650325,,80.47658257,185,R,9,,11,,
+30005,202001,100,844,5,0.1,0.1,0.5,,2.09204015,76.03985875,,0.941234172,,0.941234172,,1.772802559,142.3186593,,1.932421355,109.179259,844,R,,9,11,,
+30005,202002,100,897,5,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,,
+30005,202003,100,280,5,0.1,0.1,0.5,2.040615327,,84.81873182,0.312578027,,0.312578027,,1.172391173,,76.13443331,1.60650325,,80.47658257,280,R,9,,11,,
+30006,202001,100,1869,14,0.1,0.1,0.5,,2.09204015,76.03985875,,0.995885563,,0.995885563,,1.772802559,142.3186593,,1.932421355,109.179259,1869,R,,9,11,,
+30006,202002,100,1876,14,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,,
+30006,202003,100,1371,14,0.1,0.1,0.5,2.040615327,,84.81873182,0.730770871,,0.730770871,,1.172391173,,76.13443331,1.60650325,,80.47658257,1371,R,9,,11,,
+30007,202001,100,12769,12,0.1,0.1,0.5,,2.09204015,76.03985875,,4.475816911,,4.475816911,,1.772802559,142.3186593,,1.932421355,109.179259,12769,R,,9,11,,
+30007,202002,100,2853,12,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,,
+30007,202003,100,11491,12,0.1,0.1,0.5,2.040615327,,84.81873182,4.027888195,,4.027888195,,1.172391173,,76.13443331,1.60650325,,80.47658257,11491,R,9,,11,,
+30008,202001,100,141,162,0.1,0.1,0.5,,2.09204015,76.03985875,,0.023463069,,,,1.772802559,142.3186593,,1.932421355,109.179259,141,R,,9,11,,TRUE
+30008,202002,100,6001,162,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,42.62017045,13.86213906,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,433,162,0.1,0.1,0.5,2.040615327,,84.81873182,0.072138939,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,433,R,9,,11,TRUE,
+30009,202001,100,6417,26,0.1,0.1,0.5,,2.09204015,76.03985875,,1.589639934,,1.589639934,,1.772802559,142.3186593,,1.932421355,109.179259,6417,R,,9,11,,
+30009,202002,100,4037,26,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,,
+30009,202003,100,1322,26,0.1,0.1,0.5,2.040615327,,84.81873182,0.327462695,,0.327462695,,1.172391173,,76.13443331,1.60650325,,80.47658257,1322,R,9,,11,,
+30010,202001,100,28963,144,0.1,0.1,0.5,,2.09204015,76.03985875,,1.332623847,,1.332623847,,1.772802559,142.3186593,,1.932421355,109.179259,28963,R,,9,11,,
+30010,202002,100,21734,144,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,,
+30010,202003,100,10529,144,0.1,0.1,0.5,2.040615327,,84.81873182,0.484426733,,0.484426733,,1.172391173,,76.13443331,1.60650325,,80.47658257,10529,R,9,,11,,
+30011,202001,100,6009,5,0.1,0.1,0.5,,2.09204015,76.03985875,,5.249464902,,,,1.772802559,142.3186593,,1.932421355,109.179259,6009,R,,9,11,,TRUE
+30011,202002,100,1145,5,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.190495606,0.226047443,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5064,5,0.1,0.1,0.5,2.040615327,,84.81873182,4.423850085,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,5064,R,9,,11,TRUE,
+30012,202001,100,,275,0.1,0.1,0.5,,2.09204015,76.03985875,,,,,,1.772802559,142.3186593,,1.932421355,109.179259,30024.29623,C,,9,11,,
+30012,202002,100,,275,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,,,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,
+30012,202003,100,,275,0.1,0.1,0.5,2.040615327,,84.81873182,,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,124533.173,FIC,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
new file mode 100644
index 00000000..74b5bc90
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
@@ -0,0 +1,64 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+90001,202001,100,9244,89,0.1,0.1,0.5,,2.09204015,76.03985875
+90001,202002,100,8916,89,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90001,202003,100,6194,89,0.1,0.1,0.5,2.040615327,,84.81873182
+90002,202001,100,4826,83,0.1,0.1,0.5,,2.09204015,76.03985875
+90002,202002,100,5903,83,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90002,202003,100,4743,83,0.1,0.1,0.5,2.040615327,,84.81873182
+90003,202001,100,7586,4,0.1,0.1,0.5,,2.09204015,76.03985875
+90003,202002,100,1016,4,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90003,202003,100,1429,4,0.1,0.1,0.5,2.040615327,,84.81873182
+90004,202001,100,3975,76,0.1,0.1,0.5,,2.09204015,76.03985875
+90004,202002,100,3044,76,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90004,202003,100,3673,76,0.1,0.1,0.5,2.040615327,,84.81873182
+90005,202001,100,1941,18,0.1,0.1,0.5,,2.09204015,76.03985875
+90005,202002,100,3121,18,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90005,202003,100,1208,18,0.1,0.1,0.5,2.040615327,,84.81873182
+90006,202001,100,5405,94,0.1,0.1,0.5,,2.09204015,76.03985875
+90006,202002,100,7084,94,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90006,202003,100,4980,94,0.1,0.1,0.5,2.040615327,,84.81873182
+90007,202001,100,15172,8,0.1,0.1,0.5,,2.09204015,76.03985875
+90007,202002,100,2845,8,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90007,202003,100,3501,8,0.1,0.1,0.5,2.040615327,,84.81873182
+90008,202001,100,16298,304,0.1,0.1,0.5,,2.09204015,76.03985875
+90008,202002,100,14429,304,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90008,202003,100,14295,304,0.1,0.1,0.5,2.040615327,,84.81873182
+90009,202001,100,3698,45,0.1,0.1,0.5,,2.09204015,76.03985875
+90009,202002,100,4993,45,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90009,202003,100,4212,45,0.1,0.1,0.5,2.040615327,,84.81873182
+90010,202001,100,7722,100,0.1,0.1,0.5,,2.09204015,76.03985875
+90010,202002,100,10153,100,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90010,202003,100,6545,100,0.1,0.1,0.5,2.040615327,,84.81873182
+90011,202001,100,30344,19,0.1,0.1,0.5,,2.09204015,76.03985875
+90011,202002,100,3627,19,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90011,202003,100,7288,19,0.1,0.1,0.5,2.040615327,,84.81873182
+90012,202001,100,16298,304,0.1,0.1,0.5,,2.09204015,76.03985875
+90012,202002,100,11567,304,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90012,202003,100,13484,304,0.1,0.1,0.5,2.040615327,,84.81873182
+90013,202001,100,20190,54,0.1,0.1,0.5,,2.09204015,76.03985875
+90013,202002,100,18242,54,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90013,202003,100,28826,54,0.1,0.1,0.5,2.040615327,,84.81873182
+90014,202001,100,4260,47,0.1,0.1,0.5,,2.09204015,76.03985875
+90014,202002,100,5036,42,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90014,202003,100,6484,42,0.1,0.1,0.5,2.040615327,,84.81873182
+90015,202001,100,19236,57,0.1,0.1,0.5,,2.09204015,76.03985875
+90015,202002,100,4949,57,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90015,202003,100,3544,57,0.1,0.1,0.5,2.040615327,,84.81873182
+90016,202001,100,14902,163,0.1,0.1,0.5,,2.09204015,76.03985875
+90016,202002,100,16435,163,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90016,202003,100,24653,163,0.1,0.1,0.5,2.040615327,,84.81873182
+90017,202001,100,35476,149,0.1,0.1,0.5,,2.09204015,76.03985875
+90017,202002,100,50515,149,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90017,202003,100,53477,149,0.1,0.1,0.5,2.040615327,,84.81873182
+90018,202001,100,13845,126,0.1,0.1,0.5,,2.09204015,76.03985875
+90018,202002,100,25488,126,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90018,202003,100,27409,126,0.1,0.1,0.5,2.040615327,,84.81873182
+90019,202001,100,1099,6,0.1,0.1,0.5,,2.09204015,76.03985875
+90019,202002,100,434,6,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90019,202003,100,124,6,0.1,0.1,0.5,2.040615327,,84.81873182
+90020,202001,100,3348,22,0.1,0.1,0.5,,2.09204015,76.03985875
+90020,202002,100,1996,22,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90020,202003,100,5051,22,0.1,0.1,0.5,2.040615327,,84.81873182
+90021,202001,100,,155,0.1,0.1,0.5,,2.09204015,76.03985875
+90021,202002,100,,155,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
+90021,202003,100,21046,155,0.1,0.1,0.5,2.040615327,,84.81873182
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
new file mode 100644
index 00000000..6204e0a5
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -0,0 +1,64 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,disc_count_fi,disc_count_bi,disc_count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
+90001,202001,100,9244,89,0.1,0.1,0.5,,2.09204015,76.03985875,,1.036787797,,1.036787797,,1.504436071,128.8429705,,1.798238111,102.4414146,9244,R,,17,19,,3,1,,,
+90001,202002,100,8916,89,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.964517525,1.43945754,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,3,2,0,,,
+90001,202003,100,6194,89,0.1,0.1,0.5,2.040615327,,84.81873182,0.694706146,,0.694706146,,1.072463185,,126.2596455,1.556539256,,105.5391887,6194,R,18,,21,2,,0,,,
+90002,202001,100,4826,83,0.1,0.1,0.5,,2.09204015,76.03985875,,0.817550398,,0.817550398,,1.504436071,128.8429705,,1.798238111,102.4414146,4826,R,,17,19,,3,1,,,
+90002,202002,100,5903,83,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.223166183,1.244570947,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,3,2,0,,,
+90002,202003,100,4743,83,0.1,0.1,0.5,2.040615327,,84.81873182,0.803489751,,0.803489751,,1.072463185,,126.2596455,1.556539256,,105.5391887,4743,R,18,,21,2,,0,,,
+90003,202001,100,7586,4,0.1,0.1,0.5,,2.09204015,76.03985875,,,,,,1.504436071,128.8429705,,1.798238111,102.4414146,7586,R,,17,19,,3,1,,,TRUE
+90003,202002,100,1016,4,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,,0.710986704,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,3,2,0,,,
+90003,202003,100,1429,4,0.1,0.1,0.5,2.040615327,,84.81873182,1.406496063,,1.406496063,,1.072463185,,126.2596455,1.556539256,,105.5391887,1429,R,18,,21,2,,0,,,
+90004,202001,100,3975,76,0.1,0.1,0.5,,2.09204015,76.03985875,,1.305847569,,1.305847569,,1.504436071,128.8429705,,1.798238111,102.4414146,3975,R,,17,19,,3,1,,,
+90004,202002,100,3044,76,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.765786164,0.82875034,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,3,2,0,,,
+90004,202003,100,3673,76,0.1,0.1,0.5,2.040615327,,84.81873182,1.206636005,,1.206636005,,1.072463185,,126.2596455,1.556539256,,105.5391887,3673,R,18,,21,2,,0,,,
+90005,202001,100,1941,18,0.1,0.1,0.5,,2.09204015,76.03985875,,0.622072678,,0.622072678,,1.504436071,128.8429705,,1.798238111,102.4414146,1941,R,,17,19,,3,1,,,
+90005,202002,100,3121,18,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.607529208,2.583641738,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,3,2,0,,,
+90005,202003,100,1208,18,0.1,0.1,0.5,2.040615327,,84.81873182,0.387050567,,0.387050567,,1.072463185,,126.2596455,1.556539256,,105.5391887,1208,R,18,,21,2,,0,,,
+90006,202001,100,5405,94,0.1,0.1,0.5,,2.09204015,76.03985875,,0.763047038,,0.763047038,,1.504436071,128.8429705,,1.798238111,102.4414146,5405,R,,17,19,,3,1,,,
+90006,202002,100,7084,94,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.310535196,1.422366796,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,3,2,0,,,
+90006,202003,100,4980,94,0.1,0.1,0.5,2.040615327,,84.81873182,0.703053532,,0.703053532,,1.072463185,,126.2596455,1.556539256,,105.5391887,4980,R,18,,21,2,,0,,,
+90007,202001,100,15172,8,0.1,0.1,0.5,,2.09204015,76.03985875,,5.333239595,,5.333239595,,1.504436071,128.8429705,,1.798238111,102.4414146,15172,R,,17,19,,3,1,,,
+90007,202002,100,2845,8,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.187503296,0.812556233,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,3,2,0,,,
+90007,202003,100,3501,8,0.1,0.1,0.5,2.040615327,,84.81873182,1.230684055,,1.230684055,,1.072463185,,126.2596455,1.556539256,,105.5391887,3501,R,18,,21,2,,0,,,
+90008,202001,100,16298,304,0.1,0.1,0.5,,2.09204015,76.03985875,,1.129530598,,1.129530598,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
+90008,202002,100,14429,304,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.885323516,1.009357249,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,3,2,0,,,
+90008,202003,100,14295,304,0.1,0.1,0.5,2.040615327,,84.81873182,0.990729498,,0.990729498,,1.072463185,,126.2596455,1.556539256,,105.5391887,14295,R,18,,21,2,,0,,,
+90009,202001,100,3698,45,0.1,0.1,0.5,,2.09204015,76.03985875,,0.740562712,,0.740562712,,1.504436071,128.8429705,,1.798238111,102.4414146,3698,R,,17,19,,3,1,,,
+90009,202002,100,4993,45,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.350324535,1.185435621,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,3,2,0,,,
+90009,202003,100,4212,45,0.1,0.1,0.5,2.040615327,,84.81873182,0.843571749,,0.843571749,,1.072463185,,126.2596455,1.556539256,,105.5391887,4212,R,18,,21,2,,0,,,
+90010,202001,100,7722,100,0.1,0.1,0.5,,2.09204015,76.03985875,,0.760511998,,0.760511998,,1.504436071,128.8429705,,1.798238111,102.4414146,7722,R,,17,19,,3,1,,,
+90010,202002,100,10153,100,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.314903647,1.551204368,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,3,2,0,,,
+90010,202003,100,6545,100,0.1,0.1,0.5,2.040615327,,84.81873182,0.644660382,,0.644660382,,1.072463185,,126.2596455,1.556539256,,105.5391887,6545,R,18,,21,2,,0,,,
+90011,202001,100,30344,19,0.1,0.1,0.5,,2.09204015,76.03985875,,8.365866031,,,,1.504436071,128.8429705,,1.798238111,102.4414146,30344,R,,17,19,,3,1,,TRUE,
+90011,202002,100,3627,19,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.119533351,0.497690693,,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,3,2,0,TRUE,,
+90011,202003,100,7288,19,0.1,0.1,0.5,2.040615327,,84.81873182,2.00928009,,2.00928009,,1.072463185,,126.2596455,1.556539256,,105.5391887,7288,R,18,,21,2,,0,,,
+90012,202001,100,16298,304,0.1,0.1,0.5,,2.09204015,76.03985875,,1.408940798,,1.408940798,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
+90012,202002,100,11567,304,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.70975303,0.857831504,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,3,2,0,,,
+90012,202003,100,13484,304,0.1,0.1,0.5,2.040615327,,84.81873182,1.165730094,,1.165730094,,1.072463185,,126.2596455,1.556539256,,105.5391887,13484,R,18,,21,2,,0,,,
+90013,202001,100,20190,54,0.1,0.1,0.5,,2.09204015,76.03985875,,1.106799294,,1.106799294,,1.504436071,128.8429705,,1.798238111,102.4414146,20190,R,,17,19,,3,1,,,
+90013,202002,100,18242,54,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.903506178,0.632817595,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,3,2,0,,,
+90013,202003,100,28826,54,0.1,0.1,0.5,2.040615327,,84.81873182,1.58023419,,1.58023419,,1.072463185,,126.2596455,1.556539256,,105.5391887,28826,R,18,,21,2,,0,,,
+90014,202001,100,4260,47,0.1,0.1,0.5,,2.09204015,76.03985875,,0.845985046,,0.845985046,,1.504436071,128.8429705,,1.798238111,102.4414146,4260,R,,17,19,,3,1,,,
+90014,202002,100,5036,42,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.182053991,0.776557765,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,3,2,0,,,
+90014,202003,100,6484,42,0.1,0.1,0.5,2.040615327,,84.81873182,1.28773421,,1.28773421,,1.072463185,,126.2596455,1.556539256,,105.5391887,6484,R,18,,21,2,,0,,,
+90015,202001,100,19236,57,0.1,0.1,0.5,,2.09204015,76.03985875,,3.886845827,,3.886845827,,1.504436071,128.8429705,,1.798238111,102.4414146,19236,R,,17,19,,3,1,,,
+90015,202002,100,4949,57,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.25727802,1.396267404,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,3,2,0,,,
+90015,202003,100,3544,57,0.1,0.1,0.5,2.040615327,,84.81873182,0.716195191,,0.716195191,,1.072463185,,126.2596455,1.556539256,,105.5391887,3544,R,18,,21,2,,0,,,
+90016,202001,100,14902,163,0.1,0.1,0.5,,2.09204015,76.03985875,,0.906730921,,0.906730921,,1.504436071,128.8429705,,1.798238111,102.4414146,14902,R,,17,19,,3,1,,,
+90016,202002,100,16435,163,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.102863018,0.666628808,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,3,2,0,,,
+90016,202003,100,24653,163,0.1,0.1,0.5,2.040615327,,84.81873182,1.500085186,,1.500085186,,1.072463185,,126.2596455,1.556539256,,105.5391887,24653,R,18,,21,2,,0,,,
+90017,202001,100,35476,149,0.1,0.1,0.5,,2.09204015,76.03985875,,0.702275751,,0.702275751,,1.504436071,128.8429705,,1.798238111,102.4414146,35476,R,,17,19,,3,1,,,
+90017,202002,100,50515,149,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.42394209,0.944611909,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,3,2,0,,,
+90017,202003,100,53477,149,0.1,0.1,0.5,2.040615327,,84.81873182,1.058635817,,1.058635817,,1.072463185,,126.2596455,1.556539256,,105.5391887,53477,R,18,,21,2,,0,,,
+90018,202001,100,13845,126,0.1,0.1,0.5,,2.09204015,76.03985875,,0.543204684,,,,1.504436071,128.8429705,,1.798238111,102.4414146,13845,R,,17,19,,3,1,,TRUE,
+90018,202002,100,25488,126,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.840926688,0.929916997,,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,3,2,0,TRUE,,
+90018,202003,100,27409,126,0.1,0.1,0.5,2.040615327,,84.81873182,1.075364795,,1.075364795,,1.072463185,,126.2596455,1.556539256,,105.5391887,27409,R,18,,21,2,,0,,,
+90019,202001,100,1099,6,0.1,0.1,0.5,,2.09204015,76.03985875,,2.530969376,,2.530969376,,1.504436071,128.8429705,,1.798238111,102.4414146,1099,R,,17,19,,3,1,,,
+90019,202002,100,434,6,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.395105531,3.51659919,0.395105531,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,3,2,0,,TRUE,
+90019,202003,100,124,6,0.1,0.1,0.5,2.040615327,,84.81873182,0.284365646,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,124,R,18,,21,2,,0,TRUE,,
+90020,202001,100,3348,22,0.1,0.1,0.5,,2.09204015,76.03985875,,1.677715809,,1.677715809,,1.504436071,128.8429705,,1.798238111,102.4414146,3348,R,,17,19,,3,1,,,
+90020,202002,100,1996,22,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.596048505,0.395102278,0.596048505,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,3,2,0,,TRUE,
+90020,202003,100,5051,22,0.1,0.1,0.5,2.040615327,,84.81873182,2.530990214,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,5051,R,18,,21,2,,0,TRUE,,
+90021,202001,100,,155,0.1,0.1,0.5,,2.09204015,76.03985875,,,,,,1.504436071,128.8429705,,1.798238111,102.4414146,48979.92546,BI,,17,19,,3,1,,,
+90021,202002,100,,155,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,,,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,3,2,0,,,
+90021,202003,100,21046,155,0.1,0.1,0.5,2.040615327,,84.81873182,,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,21046,R,18,,21,2,,0,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
new file mode 100644
index 00000000..247994a6
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter,link marker
+30001,202001,100,8444,51,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,8444,R,,0,9,,,F,F
+30001,202002,100,7476,51,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,,,F,F
+30001,202003,100,2003,51,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,2003,R,0,,10,,,F,F
+30002,202001,100,9343,72,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,9343,R,,0,9,,,F,F
+30002,202002,100,7818,72,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,,,F,F
+30002,202003,100,4897,72,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,4897,R,0,,10,,,F,F
+30003,202001,100,7511,7,0.5,0.5,0.5,,2.656680299,101.7103175,,4.265190233,,,,1,61.12436116,,1.82834015,81.41733933,7511,R,,0,9,,T,,TBI
+30003,202002,100,1761,7,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,T,T,,T
+30003,202003,100,6492,7,0.5,0.5,0.5,0.968230653,,70.26136364,3.686541738,,,,1,,85.37820513,0.984115327,,77.81978439,6492,R,0,,10,T,,,TFI
+30004,202001,100,64,81,0.5,0.5,0.5,,2.656680299,101.7103175,,0.030288689,,,,1,61.12436116,,1.82834015,81.41733933,64,R,,0,9,,T,,TBI
+30004,202002,100,2113,81,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,T,T,,T
+30004,202003,100,185,81,0.5,0.5,0.5,0.968230653,,70.26136364,0.087553242,,,,1,,85.37820513,0.984115327,,77.81978439,185,R,0,,10,T,,,TFI
+30005,202001,100,844,5,0.5,0.5,0.5,,2.656680299,101.7103175,,0.941234172,,,,1,61.12436116,,1.82834015,81.41733933,844,R,,0,9,,T,,TBI
+30005,202002,100,897,5,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,T,T,,T
+30005,202003,100,280,5,0.5,0.5,0.5,0.968230653,,70.26136364,0.312578027,,,,1,,85.37820513,0.984115327,,77.81978439,280,R,0,,10,T,,,TFI
+30006,202001,100,1869,14,0.5,0.5,0.5,,2.656680299,101.7103175,,0.995885563,,,,1,61.12436116,,1.82834015,81.41733933,1869,R,,0,9,,T,,TBI
+30006,202002,100,1876,14,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,T,T,,T
+30006,202003,100,1371,14,0.5,0.5,0.5,0.968230653,,70.26136364,0.730770871,,,,1,,85.37820513,0.984115327,,77.81978439,1371,R,0,,10,T,,,TFI
+30007,202001,100,12769,12,0.5,0.5,0.5,,2.656680299,101.7103175,,4.475816911,,,,1,61.12436116,,1.82834015,81.41733933,12769,R,,0,9,,T,,TBI
+30007,202002,100,2853,12,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,T,T,,T
+30007,202003,100,11491,12,0.5,0.5,0.5,0.968230653,,70.26136364,4.027888195,,,,1,,85.37820513,0.984115327,,77.81978439,11491,R,0,,10,T,,,TFI
+30008,202001,100,141,162,0.5,0.5,0.5,,2.656680299,101.7103175,,0.023463069,,,,1,61.12436116,,1.82834015,81.41733933,141,R,,0,9,,T,,TBI
+30008,202002,100,6001,162,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,T,T,,T
+30008,202003,100,433,162,0.5,0.5,0.5,0.968230653,,70.26136364,0.072138939,,,,1,,85.37820513,0.984115327,,77.81978439,433,R,0,,10,T,,,TFI
+30009,202001,100,6417,26,0.5,0.5,0.5,,2.656680299,101.7103175,,1.589639934,,,,1,61.12436116,,1.82834015,81.41733933,6417,R,,0,9,,T,,TBI
+30009,202002,100,4037,26,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,T,T,,T
+30009,202003,100,1322,26,0.5,0.5,0.5,0.968230653,,70.26136364,0.327462695,,,,1,,85.37820513,0.984115327,,77.81978439,1322,R,0,,10,T,,,TFI
+30010,202001,100,28963,144,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,28963,R,,0,9,,,F,F
+30010,202002,100,21734,144,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,,,F,F
+30010,202003,100,10529,144,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,10529,R,0,,10,,,F,F
+30011,202001,100,6009,5,0.5,0.5,0.5,,2.656680299,101.7103175,,5.249464902,,,,1,61.12436116,,1.82834015,81.41733933,6009,R,,0,9,,T,,TBI
+30011,202002,100,1145,5,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,T,T,,T
+30011,202003,100,5064,5,0.5,0.5,0.5,0.968230653,,70.26136364,4.423850085,,,,1,,85.37820513,0.984115327,,77.81978439,5064,R,0,,10,T,,,TFI
+30012,202001,100,256,275,0.5,0.5,0.5,,2.656680299,101.7103175,,0.034032235,,,,1,61.12436116,,1.82834015,81.41733933,256,R,,0,9,,T,,TBI
+30012,202002,100,7522,275,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,29.38390625,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,T,,,TFI
+30012,202003,100,,275,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,7402.515486,FIR,0,,10,,,,I
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
new file mode 100644
index 00000000..8125727d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
+30001,202001,100,8444,51,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,8444,R,,0,9,,,TRUE
+30001,202002,100,7476,51,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,,,TRUE
+30001,202003,100,2003,51,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,2003,R,0,,10,,,TRUE
+30002,202001,100,9343,72,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,9343,R,,0,9,,,TRUE
+30002,202002,100,7818,72,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,,,TRUE
+30002,202003,100,4897,72,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,4897,R,0,,10,,,TRUE
+30003,202001,100,7511,7,0.5,0.5,0.5,,2.656680299,101.7103175,,4.265190233,,,,1,61.12436116,,1.82834015,81.41733933,7511,R,,0,9,,TRUE,
+30003,202002,100,1761,7,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,TRUE,TRUE,
+30003,202003,100,6492,7,0.5,0.5,0.5,0.968230653,,70.26136364,3.686541738,,,,1,,85.37820513,0.984115327,,77.81978439,6492,R,0,,10,TRUE,,
+30004,202001,100,64,81,0.5,0.5,0.5,,2.656680299,101.7103175,,0.030288689,,,,1,61.12436116,,1.82834015,81.41733933,64,R,,0,9,,TRUE,
+30004,202002,100,2113,81,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,TRUE,TRUE,
+30004,202003,100,185,81,0.5,0.5,0.5,0.968230653,,70.26136364,0.087553242,,,,1,,85.37820513,0.984115327,,77.81978439,185,R,0,,10,TRUE,,
+30005,202001,100,844,5,0.5,0.5,0.5,,2.656680299,101.7103175,,0.941234172,,,,1,61.12436116,,1.82834015,81.41733933,844,R,,0,9,,TRUE,
+30005,202002,100,897,5,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,TRUE,TRUE,
+30005,202003,100,280,5,0.5,0.5,0.5,0.968230653,,70.26136364,0.312578027,,,,1,,85.37820513,0.984115327,,77.81978439,280,R,0,,10,TRUE,,
+30006,202001,100,1869,14,0.5,0.5,0.5,,2.656680299,101.7103175,,0.995885563,,,,1,61.12436116,,1.82834015,81.41733933,1869,R,,0,9,,TRUE,
+30006,202002,100,1876,14,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,TRUE,TRUE,
+30006,202003,100,1371,14,0.5,0.5,0.5,0.968230653,,70.26136364,0.730770871,,,,1,,85.37820513,0.984115327,,77.81978439,1371,R,0,,10,TRUE,,
+30007,202001,100,12769,12,0.5,0.5,0.5,,2.656680299,101.7103175,,4.475816911,,,,1,61.12436116,,1.82834015,81.41733933,12769,R,,0,9,,TRUE,
+30007,202002,100,2853,12,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,TRUE,TRUE,
+30007,202003,100,11491,12,0.5,0.5,0.5,0.968230653,,70.26136364,4.027888195,,,,1,,85.37820513,0.984115327,,77.81978439,11491,R,0,,10,TRUE,,
+30008,202001,100,141,162,0.5,0.5,0.5,,2.656680299,101.7103175,,0.023463069,,,,1,61.12436116,,1.82834015,81.41733933,141,R,,0,9,,TRUE,
+30008,202002,100,6001,162,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,TRUE,TRUE,
+30008,202003,100,433,162,0.5,0.5,0.5,0.968230653,,70.26136364,0.072138939,,,,1,,85.37820513,0.984115327,,77.81978439,433,R,0,,10,TRUE,,
+30009,202001,100,6417,26,0.5,0.5,0.5,,2.656680299,101.7103175,,1.589639934,,,,1,61.12436116,,1.82834015,81.41733933,6417,R,,0,9,,TRUE,
+30009,202002,100,4037,26,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,TRUE,TRUE,
+30009,202003,100,1322,26,0.5,0.5,0.5,0.968230653,,70.26136364,0.327462695,,,,1,,85.37820513,0.984115327,,77.81978439,1322,R,0,,10,TRUE,,
+30010,202001,100,28963,144,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,28963,R,,0,9,,,TRUE
+30010,202002,100,21734,144,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,,,TRUE
+30010,202003,100,10529,144,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,10529,R,0,,10,,,TRUE
+30011,202001,100,6009,5,0.5,0.5,0.5,,2.656680299,101.7103175,,5.249464902,,,,1,61.12436116,,1.82834015,81.41733933,6009,R,,0,9,,TRUE,
+30011,202002,100,1145,5,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,TRUE,TRUE,
+30011,202003,100,5064,5,0.5,0.5,0.5,0.968230653,,70.26136364,4.423850085,,,,1,,85.37820513,0.984115327,,77.81978439,5064,R,0,,10,TRUE,,
+30012,202001,100,256,275,0.5,0.5,0.5,,2.656680299,101.7103175,,0.034032235,,,,1,61.12436116,,1.82834015,81.41733933,256,R,,0,9,,TRUE,
+30012,202002,100,7522,275,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,29.38390625,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,TRUE,,
+30012,202003,100,,275,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,7402.515486,FIR,0,,10,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
new file mode 100644
index 00000000..211fb7fe
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+30001,202001,100,8444,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30001,202002,100,7476,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30001,202003,100,2003,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30002,202001,100,9343,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30002,202002,100,7818,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30002,202003,100,4897,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30003,202001,100,7511,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30003,202002,100,1761,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30003,202003,100,6492,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30004,202001,100,64,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30004,202002,100,2113,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30004,202003,100,185,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30005,202001,100,844,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30005,202002,100,897,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30005,202003,100,280,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30006,202001,100,1869,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30006,202002,100,1876,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30006,202003,100,1371,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30007,202001,100,12769,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30007,202002,100,2853,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30007,202003,100,11491,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30008,202001,100,141,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30008,202002,100,6001,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30008,202003,100,433,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30009,202001,100,6417,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30009,202002,100,4037,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30009,202003,100,1322,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30010,202001,100,28963,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30010,202002,100,21734,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30010,202003,100,10529,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30011,202001,100,6009,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30011,202002,100,1145,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30011,202003,100,5064,0,0.5,0.5,0.5,0.968230653,,70.26136364
+30012,202001,100,256,0,0.5,0.5,0.5,,2.656680299,101.7103175
+30012,202002,100,7522,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
+30012,202003,100,,0,0.5,0.5,0.5,0.968230653,,70.26136364
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
new file mode 100644
index 00000000..ef5a16dd
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -0,0 +1,37 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,default_c_link,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
+30001,202001,100,8444,0,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,8444,R,,0,9,TRUE,,,TRUE
+30001,202002,100,7476,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,TRUE,,,TRUE
+30001,202003,100,2003,0,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,2003,R,0,,10,TRUE,,,TRUE
+30002,202001,100,9343,0,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,9343,R,,0,9,TRUE,,,TRUE
+30002,202002,100,7818,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,TRUE,,,TRUE
+30002,202003,100,4897,0,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,4897,R,0,,10,TRUE,,,TRUE
+30003,202001,100,7511,0,0.5,0.5,0.5,,2.656680299,101.7103175,,4.265190233,,,,1,1,,1.82834015,51.35515875,7511,R,,0,9,TRUE,,TRUE,
+30003,202002,100,1761,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,,,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,TRUE,TRUE,TRUE,
+30003,202003,100,6492,0,0.5,0.5,0.5,0.968230653,,70.26136364,3.686541738,,,,1,,1,0.984115327,,35.63068182,6492,R,0,,10,TRUE,TRUE,,
+30004,202001,100,64,0,0.5,0.5,0.5,,2.656680299,101.7103175,,0.030288689,,,,1,1,,1.82834015,51.35515875,64,R,,0,9,TRUE,,TRUE,
+30004,202002,100,2113,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,,,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,TRUE,TRUE,TRUE,
+30004,202003,100,185,0,0.5,0.5,0.5,0.968230653,,70.26136364,0.087553242,,,,1,,1,0.984115327,,35.63068182,185,R,0,,10,TRUE,TRUE,,
+30005,202001,100,844,0,0.5,0.5,0.5,,2.656680299,101.7103175,,0.941234172,,,,1,1,,1.82834015,51.35515875,844,R,,0,9,TRUE,,TRUE,
+30005,202002,100,897,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,,,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,TRUE,TRUE,TRUE,
+30005,202003,100,280,0,0.5,0.5,0.5,0.968230653,,70.26136364,0.312578027,,,,1,,1,0.984115327,,35.63068182,280,R,0,,10,TRUE,TRUE,,
+30006,202001,100,1869,0,0.5,0.5,0.5,,2.656680299,101.7103175,,0.995885563,,,,1,1,,1.82834015,51.35515875,1869,R,,0,9,TRUE,,TRUE,
+30006,202002,100,1876,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,,,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,TRUE,TRUE,TRUE,
+30006,202003,100,1371,0,0.5,0.5,0.5,0.968230653,,70.26136364,0.730770871,,,,1,,1,0.984115327,,35.63068182,1371,R,0,,10,TRUE,TRUE,,
+30007,202001,100,12769,0,0.5,0.5,0.5,,2.656680299,101.7103175,,4.475816911,,,,1,1,,1.82834015,51.35515875,12769,R,,0,9,TRUE,,TRUE,
+30007,202002,100,2853,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,,,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,TRUE,TRUE,TRUE,
+30007,202003,100,11491,0,0.5,0.5,0.5,0.968230653,,70.26136364,4.027888195,,,,1,,1,0.984115327,,35.63068182,11491,R,0,,10,TRUE,TRUE,,
+30008,202001,100,141,0,0.5,0.5,0.5,,2.656680299,101.7103175,,0.023463069,,,,1,1,,1.82834015,51.35515875,141,R,,0,9,TRUE,,TRUE,
+30008,202002,100,6001,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,,,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,TRUE,TRUE,TRUE,
+30008,202003,100,433,0,0.5,0.5,0.5,0.968230653,,70.26136364,0.072138939,,,,1,,1,0.984115327,,35.63068182,433,R,0,,10,TRUE,TRUE,,
+30009,202001,100,6417,0,0.5,0.5,0.5,,2.656680299,101.7103175,,1.589639934,,,,1,1,,1.82834015,51.35515875,6417,R,,0,9,TRUE,,TRUE,
+30009,202002,100,4037,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,,,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,TRUE,TRUE,TRUE,
+30009,202003,100,1322,0,0.5,0.5,0.5,0.968230653,,70.26136364,0.327462695,,,,1,,1,0.984115327,,35.63068182,1322,R,0,,10,TRUE,TRUE,,
+30010,202001,100,28963,0,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,28963,R,,0,9,TRUE,,,TRUE
+30010,202002,100,21734,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,TRUE,,,TRUE
+30010,202003,100,10529,0,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,10529,R,0,,10,TRUE,,,TRUE
+30011,202001,100,6009,0,0.5,0.5,0.5,,2.656680299,101.7103175,,5.249464902,,,,1,1,,1.82834015,51.35515875,6009,R,,0,9,TRUE,,TRUE,
+30011,202002,100,1145,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,,,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,TRUE,TRUE,TRUE,
+30011,202003,100,5064,0,0.5,0.5,0.5,0.968230653,,70.26136364,4.423850085,,,,1,,1,0.984115327,,35.63068182,5064,R,0,,10,TRUE,TRUE,,
+30012,202001,100,256,0,0.5,0.5,0.5,,2.656680299,101.7103175,,0.034032235,,,,1,1,,1.82834015,51.35515875,256,R,,0,9,TRUE,,TRUE,
+30012,202002,100,7522,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,29.38390625,,,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,TRUE,TRUE,,
+30012,202003,100,,0,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,7402.515486,FIR,0,,10,TRUE,,,

From 4771ee0f5c5c206229b075b80925fcfc9a464ba6 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 13 Apr 2023 15:20:01 +0100
Subject: [PATCH 199/531] Initial Standardising Of Files

---
 .../26_C_FI_FI_NS_BI_BI_R_filtered_input.csv  |   2 +-
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv |  84 +++++-----
 .../27_BI_BI_R_NS_R_FI_FI_filtered_input.csv  |   2 +-
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |  84 +++++-----
 .../28_link_columns_filtered_input.csv        |  66 ++++----
 .../28_link_columns_filtered_output.csv       |  66 ++++----
 .../29_mixed_data_filtered_input.csv          | 128 +++++++--------
 .../29_mixed_data_filtered_output.csv         | 128 +++++++--------
 .../30_class_change_C_C_FI_filtered_input.csv |  56 +++----
 ...30_class_change_C_C_FI_filtered_output.csv |  56 +++----
 ...BI_R-R_FI_FI-C_FI_FI_no_response_input.csv |  44 +++---
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  44 +++---
 .../32_C_FI_FI_no_response_input.csv          |  32 ++--
 .../32_C_FI_FI_no_response_output.csv         |  32 ++--
 .../33_partial_link_columns_input.csv         |  50 +++---
 .../33_partial_link_columns_output.csv        |  50 +++---
 .../34_default_link_input.csv                 |  42 ++---
 .../34_default_link_output.csv                |  42 ++---
 .../35_TB_10_R_R_FI_input.csv                 |  74 ++++-----
 .../35_TB_10_R_R_FI_output.csv                |  74 ++++-----
 .../36_TB_10_BI_BI_R_input.csv                |  74 ++++-----
 .../36_TB_10_BI_BI_R_output.csv               |  74 ++++-----
 .../37_TB_10_C_FI_FI_input.csv                |  74 ++++-----
 .../37_TB_10_C_FI_FI_output.csv               |  74 ++++-----
 .../38_T_10_R_R_FI_input.csv                  |  74 ++++-----
 .../38_T_10_R_R_FI_output.csv                 |  74 ++++-----
 .../39_B_10_R_R_FI_input.csv                  |  74 ++++-----
 .../39_B_10_R_R_FI_output.csv                 |  74 ++++-----
 .../40_TB_10_R_R_FI_no_trim_input.csv         |  62 ++++----
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  62 ++++----
 .../41_TB_10_R_R_FI_filtered_input.csv        |  74 ++++-----
 .../41_TB_10_R_R_FI_filtered_output.csv       |  74 ++++-----
 .../42_TB_10_R_R_FI-BI_R_R_input.csv          | 146 +++++++++---------
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 146 +++++++++---------
 .../43_TB_10_BI_BI_R_boundary_input.csv       | 128 +++++++--------
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 128 +++++++--------
 .../44_TB_5_BI_BI_R_boundary_input.csv        | 128 +++++++--------
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 128 +++++++--------
 .../45_TB_10_R_R_FI_partial_no_trim_input.csv |  70 ++++-----
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |  70 ++++-----
 .../46_TB_10_BI_BI_R_filtered_input.csv       | 128 +++++++--------
 .../46_TB_10_BI_BI_R_filtered_output.csv      | 128 +++++++--------
 .../methodology_scenarios/47_TB_50_input.csv  |  74 ++++-----
 .../methodology_scenarios/47_TB_50_output.csv |  74 ++++-----
 .../48_TB_50_filtered_input.csv               |  37 -----
 .../48_TB_50_filtered_output.csv              |  37 -----
 ...8_TB_50_filtered_partial_default_input.csv |  37 +++++
 ..._TB_50_filtered_partial_default_output.csv |  37 +++++
 .../49_TB_50_UNKNOWN_input.csv                |  37 -----
 .../49_TB_50_UNKNOWN_output.csv               |  37 -----
 .../49_TB_50_filtered_full_default_input.csv  |  37 +++++
 .../49_TB_50_filtered_full_default_output.csv |  37 +++++
 .../50_R_R_FI_50_weight_input.csv             |  26 ++--
 .../50_R_R_FI_50_weight_output.csv            |  26 ++--
 .../51_R_R_FI_80_weight_input.csv             |  26 ++--
 .../51_R_R_FI_80_weight_output.csv            |  26 ++--
 .../52_BI_BI_R_50_weight_input.csv            |  26 ++--
 .../52_BI_BI_R_50_weight_output.csv           |  26 ++--
 .../53_C_FI_FI_50_weight_input.csv            |  26 ++--
 .../53_C_FI_FI_50_weight_output.csv           |  26 ++--
 .../54_R_R_FI-BI_R_R_50_weight_input.csv      |  50 +++---
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  50 +++---
 .../55_R_R_FI_50_weight_default_input.csv     |  26 ++--
 .../55_R_R_FI_50_weight_default_output.csv    |  26 ++--
 .../56_BI_BI_R_50_weight_default_input.csv    |  26 ++--
 .../56_BI_BI_R_50_weight_default_output.csv   |  26 ++--
 .../57_C_FI_FI_50_weight_default_input.csv    |  26 ++--
 .../57_C_FI_FI_50_weight_default_output.csv   |  26 ++--
 ...BI_R_R_50_weight_partial_default_input.csv |  50 +++---
 ...I_R_R_50_weight_partial_default_output.csv |  50 +++---
 .../59_class_change_50_weight_input.csv       |  16 ++
 .../59_class_change_50_weight_output.csv      |  16 ++
 .../59_class_change_input.csv                 |  16 --
 .../59_class_change_output.csv                |  16 --
 .../60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv |  29 ++++
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv |  29 ++++
 .../60_WHICH_CASE_7_input.csv                 |  29 ----
 .../60_WHICH_CASE_7_output.csv                |  29 ----
 ...R_R_FI-BI_R_R_50_weight_filtered_input.csv |  74 ++++-----
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv |  74 ++++-----
 .../62_CLARIFY_WITH_ELLIE_input.csv           |  44 +++---
 .../62_CLARIFY_WITH_ELLIE_output.csv          |  44 +++---
 ...63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv | 146 +++++++++---------
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 146 +++++++++---------
 .../64_TB_10_C_FI_FI_50_weight_input.csv      |  74 ++++-----
 .../64_TB_10_C_FI_FI_50_weight_output.csv     |  74 ++++-----
 ...TB_10_BI_BI_R_50_weight_filtered_input.csv | 128 +++++++--------
 ...B_10_BI_BI_R_50_weight_filtered_output.csv | 128 +++++++--------
 ..._weight_filtered_partial_default_input.csv |  74 ++++-----
 ...weight_filtered_partial_default_output.csv |  74 ++++-----
 ..._50_weight_filtered_full_default_input.csv |  74 ++++-----
 ...50_weight_filtered_full_default_output.csv |  74 ++++-----
 92 files changed, 2818 insertions(+), 2818 deletions(-)
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_input.csv
index aeb064ff..e434e5ff 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_input.csv
@@ -1,4 +1,4 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn
+identifier,date,group,question,other
 140001,202001,100,3582,27
 140001,202002,100,4533,27
 140001,202003,100,4471,27
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 53011984..97c97885 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,filter_mkr
-140001,202001,100,3582,27,,,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3,
-140001,202002,100,4533,27,,,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,
-140001,202003,100,4471,27,,,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,
-140001,202004,100,3040,27,,,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,
-140001,202005,100,8519,27,,,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,
-140001,202006,100,8690,27,,,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,
-140001,202007,100,9979,27,,,1.148331415,,0.520242185,,91.63876652,9979,R,3,,4,
-140002,202001,100,5359,83,,,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3,
-140002,202002,100,7091,83,,,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,
-140002,202003,100,7098,83,,,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,
-140002,202004,100,7408,83,,,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,
-140002,202005,100,1937,83,,,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,
-140002,202006,100,6711,83,,,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,
-140002,202007,100,1052,83,,,0.156757562,,0.520242185,,91.63876652,1052,R,3,,4,
-140003,202001,100,439,89,,,,0.056404985,,0.534118956,47.13567839,439,R,,3,3,
-140003,202002,100,7783,89,,,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,
-140003,202003,100,897,89,,,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,
-140003,202004,100,8477,89,,,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,
-140003,202005,100,2207,89,,,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,
-140003,202006,100,9889,89,,,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,
-140003,202007,100,2528,89,,,0.255637577,,0.520242185,,91.63876652,2528,R,3,,4,
-140004,202001,100,,28,,,,,,0.534118956,47.13567839,1319.798995,C,,3,3,
-140004,202002,100,,28,,,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,
-140004,202003,100,,28,,,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,
-140004,202005,100,,28,,,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3,
-140004,202006,100,,28,,,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3,
-140004,202007,100,7243,28,,,,,0.520242185,,91.63876652,7243,R,3,,4,
-140005,202001,100,150000,85,,,,,,0.534118956,47.13567839,150000,R,,3,3,TRUE
-140005,202002,100,180000,85,,,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,TRUE
-140005,202003,100,120000,85,,,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,TRUE
-140005,202004,100,115000,85,,,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,TRUE
-140005,202005,100,105000,85,,,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,TRUE
-140005,202006,100,110000,85,,,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,TRUE
-140005,202007,100,160000,85,,,,,0.520242185,,91.63876652,160000,R,3,,4,TRUE
-140006,202001,100,,71,,,,,,0.534118956,47.13567839,3346.633166,C,,3,3,
-140006,202002,100,,71,,,,,6.772539383,3.563193687,97.52261307,22665.20492,FIC,3,3,3,
-140006,202003,100,,71,,,,,0.700853626,0.84489759,62.64321608,15884.99105,FIC,3,3,3,
-140006,202004,100,,71,,,,,3.724667279,2.674093602,95.10050251,59166.30639,FIC,3,3,3,
-140006,202005,100,,71,,,,,1.108042751,0.497376695,63.63316583,65558.7969,FIC,3,3,3,
-140006,202006,100,,71,,,,,2.988483968,3.720631427,127.0854271,195921.4135,FIC,3,3,3,
-140006,202007,100,,71,,,,,0.520242185,,91.63876652,101926.5842,FIC,3,,4,
+identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+140001,202001,100,3582,27,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3,
+140001,202002,100,4533,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,
+140001,202003,100,4471,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,
+140001,202004,100,3040,27,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,
+140001,202005,100,8519,27,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,
+140001,202006,100,8690,27,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,
+140001,202007,100,9979,27,1.148331415,,0.520242185,,91.63876652,9979,R,3,,4,
+140002,202001,100,5359,83,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3,
+140002,202002,100,7091,83,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,
+140002,202003,100,7098,83,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,
+140002,202004,100,7408,83,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,
+140002,202005,100,1937,83,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,
+140002,202006,100,6711,83,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,
+140002,202007,100,1052,83,0.156757562,,0.520242185,,91.63876652,1052,R,3,,4,
+140003,202001,100,439,89,,0.056404985,,0.534118956,47.13567839,439,R,,3,3,
+140003,202002,100,7783,89,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,
+140003,202003,100,897,89,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,
+140003,202004,100,8477,89,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,
+140003,202005,100,2207,89,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,
+140003,202006,100,9889,89,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,
+140003,202007,100,2528,89,0.255637577,,0.520242185,,91.63876652,2528,R,3,,4,
+140004,202001,100,,28,,,,0.534118956,47.13567839,1319.798995,C,,3,3,
+140004,202002,100,,28,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,
+140004,202003,100,,28,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,
+140004,202005,100,,28,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3,
+140004,202006,100,,28,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3,
+140004,202007,100,7243,28,,,0.520242185,,91.63876652,7243,R,3,,4,
+140005,202001,100,150000,85,,,,0.534118956,47.13567839,150000,R,,3,3,TRUE
+140005,202002,100,180000,85,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,TRUE
+140005,202003,100,120000,85,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,TRUE
+140005,202004,100,115000,85,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,TRUE
+140005,202005,100,105000,85,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,TRUE
+140005,202006,100,110000,85,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,TRUE
+140005,202007,100,160000,85,,,0.520242185,,91.63876652,160000,R,3,,4,TRUE
+140006,202001,100,,71,,,,0.534118956,47.13567839,3346.633166,C,,3,3,
+140006,202002,100,,71,,,6.772539383,3.563193687,97.52261307,22665.20492,FIC,3,3,3,
+140006,202003,100,,71,,,0.700853626,0.84489759,62.64321608,15884.99105,FIC,3,3,3,
+140006,202004,100,,71,,,3.724667279,2.674093602,95.10050251,59166.30639,FIC,3,3,3,
+140006,202005,100,,71,,,1.108042751,0.497376695,63.63316583,65558.7969,FIC,3,3,3,
+140006,202006,100,,71,,,2.988483968,3.720631427,127.0854271,195921.4135,FIC,3,3,3,
+140006,202007,100,,71,,,0.520242185,,91.63876652,101926.5842,FIC,3,,4,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_input.csv
index 5bc4faa0..840e5049 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_input.csv
@@ -1,4 +1,4 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn
+identifier,date,group,question,other
 150001,202001,100,5891,15
 150001,202002,100,4581,15
 150001,202003,100,4741,15
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index fc5d20a1..642c1a77 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,filter_mkr
-150001,202001,100,5891,15,,,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3,
-150001,202002,100,4581,15,,,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,
-150001,202003,100,4741,15,,,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,
-150001,202004,100,8092,15,,,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,
-150001,202005,100,2727,15,,,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,2727,R,3,3,4,
-150001,202006,100,2363,15,,,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,
-150001,202007,100,9549,15,,,4.041049513,,2.111448113,,152.5353535,9549,R,3,,3,
-150002,202001,100,8611,5,,,,0.917723543,,0.917399451,181.0909091,8611,R,,3,3,
-150002,202002,100,9383,5,,,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,
-150002,202003,100,1064,5,,,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,
-150002,202004,100,7419,5,,,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,
-150002,202005,100,9967,5,,,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,9967,R,3,3,4,
-150002,202006,100,1393,5,,,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,
-150002,202007,100,2593,5,,,1.861450108,,2.111448113,,152.5353535,2593,R,3,,3,
-150003,202001,100,3426,79,,,,0.548511047,,0.917399451,181.0909091,3426,R,,3,3,
-150003,202002,100,6246,79,,,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,
-150003,202003,100,8402,79,,,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,
-150003,202004,100,3891,79,,,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,
-150003,202005,100,5463,79,,,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,5463,R,3,3,4,
-150003,202006,100,6852,79,,,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,
-150003,202007,100,2959,79,,,0.431844717,,2.111448113,,152.5353535,2959,R,3,,3,
-150004,202001,100,,69,,,,,,0.917399451,181.0909091,13547.81819,BI,,3,3,
-150004,202002,100,,69,,,,,1.230132332,3.509418433,204.1414141,14767.63276,BI,3,3,3,
-150004,202003,100,4208,69,,,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,
-150004,202005,100,2818,69,,,,,1.028150423,3.035462652,124.8511905,2818,R,3,3,4,
-150004,202006,100,,69,,,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,
-150004,202007,100,,69,,,,,2.111448113,,152.5353535,4483.444383,FIR,3,,3,
-150005,202001,100,150000,85,,,,,,0.917399451,181.0909091,150000,R,,3,3,TRUE
-150005,202002,100,180000,85,,,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,TRUE
-150005,202003,100,120000,85,,,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,TRUE
-150005,202004,100,115000,85,,,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,TRUE
-150006,202005,100,105000,85,,,,,1.028150423,3.035462652,124.8511905,105000,R,3,3,4,TRUE
-150006,202006,100,110000,85,,,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,TRUE
-150006,202007,100,160000,85,,,,,2.111448113,,152.5353535,160000,R,3,,3,TRUE
-150007,202001,100,,71,,,,,,0.917399451,181.0909091,12857.45455,C,,3,3,
-150007,202002,100,,71,,,,,1.230132332,3.509418433,204.1414141,15816.37054,FIC,3,3,3,
-150007,202003,100,,71,,,,,0.831168119,0.962881641,109.6130952,13146.06295,FIC,3,3,4,
-150007,202004,100,,71,,,,,3.047553764,1.474655266,195.979798,40063.33364,FIC,3,3,3,
-150007,202005,100,,71,,,,,1.028150423,3.035462652,124.8511905,41191.13343,FIC,3,3,4,
-150007,202006,100,,71,,,,,0.753512367,1.033441075,107.1515152,31038.02845,FIC,3,3,3,
-150007,202007,100,,71,,,,,2.111448113,,152.5353535,65535.1866,FIC,3,,3,
+identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+150001,202001,100,5891,15,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3,
+150001,202002,100,4581,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,
+150001,202003,100,4741,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,
+150001,202004,100,8092,15,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,
+150001,202005,100,2727,15,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,2727,R,3,3,4,
+150001,202006,100,2363,15,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,
+150001,202007,100,9549,15,4.041049513,,2.111448113,,152.5353535,9549,R,3,,3,
+150002,202001,100,8611,5,,0.917723543,,0.917399451,181.0909091,8611,R,,3,3,
+150002,202002,100,9383,5,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,
+150002,202003,100,1064,5,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,
+150002,202004,100,7419,5,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,
+150002,202005,100,9967,5,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,9967,R,3,3,4,
+150002,202006,100,1393,5,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,
+150002,202007,100,2593,5,1.861450108,,2.111448113,,152.5353535,2593,R,3,,3,
+150003,202001,100,3426,79,,0.548511047,,0.917399451,181.0909091,3426,R,,3,3,
+150003,202002,100,6246,79,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,
+150003,202003,100,8402,79,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,
+150003,202004,100,3891,79,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,
+150003,202005,100,5463,79,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,5463,R,3,3,4,
+150003,202006,100,6852,79,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,
+150003,202007,100,2959,79,0.431844717,,2.111448113,,152.5353535,2959,R,3,,3,
+150004,202001,100,,69,,,,0.917399451,181.0909091,13547.81819,BI,,3,3,
+150004,202002,100,,69,,,1.230132332,3.509418433,204.1414141,14767.63276,BI,3,3,3,
+150004,202003,100,4208,69,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,
+150004,202005,100,2818,69,,,1.028150423,3.035462652,124.8511905,2818,R,3,3,4,
+150004,202006,100,,69,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,
+150004,202007,100,,69,,,2.111448113,,152.5353535,4483.444383,FIR,3,,3,
+150005,202001,100,150000,85,,,,0.917399451,181.0909091,150000,R,,3,3,TRUE
+150005,202002,100,180000,85,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,TRUE
+150005,202003,100,120000,85,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,TRUE
+150005,202004,100,115000,85,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,TRUE
+150006,202005,100,105000,85,,,1.028150423,3.035462652,124.8511905,105000,R,3,3,4,TRUE
+150006,202006,100,110000,85,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,TRUE
+150006,202007,100,160000,85,,,2.111448113,,152.5353535,160000,R,3,,3,TRUE
+150007,202001,100,,71,,,,0.917399451,181.0909091,12857.45455,C,,3,3,
+150007,202002,100,,71,,,1.230132332,3.509418433,204.1414141,15816.37054,FIC,3,3,3,
+150007,202003,100,,71,,,0.831168119,0.962881641,109.6130952,13146.06295,FIC,3,3,4,
+150007,202004,100,,71,,,3.047553764,1.474655266,195.979798,40063.33364,FIC,3,3,3,
+150007,202005,100,,71,,,1.028150423,3.035462652,124.8511905,41191.13343,FIC,3,3,4,
+150007,202006,100,,71,,,0.753512367,1.033441075,107.1515152,31038.02845,FIC,3,3,3,
+150007,202007,100,,71,,,2.111448113,,152.5353535,65535.1866,FIC,3,,3,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
index b1dddfc9..8f22bf2d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
@@ -1,33 +1,33 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-190001,202001,100,9261,95,,
-190001,202002,100,4996,95,,
-190001,202003,100,1480,95,,
-190001,202004,100,4350,95,,
-190002,202001,100,2433,17,,
-190002,202002,100,4324,17,,
-190002,202003,100,6598,17,,
-190002,202004,100,700,17,,
-190003,202001,100,7888,64,,
-190003,202002,100,4218,64,,
-190003,202003,100,7591,64,,
-190003,202004,100,4077,64,,
-190004,202001,100,2247,51,,
-190004,202002,100,,51,,
-190004,202003,100,,51,,
-190004,202004,100,8608,51,,
-190005,202001,100,,34,,
-190005,202002,100,,34,,
-190005,202003,100,4456,34,,
-190005,202004,100,5134,34,,
-190006,202001,100,,8,,
-190006,202002,100,,8,,
-190006,202003,100,,8,,
-190006,202004,100,,8,,
-190007,202001,100,150000,85,,
-190007,202002,100,120000,85,,
-190007,202003,100,110000,85,,
-190007,202004,100,180000,85,,
-190008,202001,100,,71,,
-190008,202002,100,,71,,
-190008,202003,100,,71,,
-190008,202004,100,,71,,
+identifier,date,group,question,other,forward,backward,construction
+190001,202001,100,9261,95,,,
+190001,202002,100,4996,95,,,
+190001,202003,100,1480,95,,,
+190001,202004,100,4350,95,,,
+190002,202001,100,2433,17,,,
+190002,202002,100,4324,17,,,
+190002,202003,100,6598,17,,,
+190002,202004,100,700,17,,,
+190003,202001,100,7888,64,,,
+190003,202002,100,4218,64,,,
+190003,202003,100,7591,64,,,
+190003,202004,100,4077,64,,,
+190004,202001,100,2247,51,,,
+190004,202002,100,,51,,,
+190004,202003,100,,51,,,
+190004,202004,100,8608,51,,,
+190005,202001,100,,34,,,
+190005,202002,100,,34,,,
+190005,202003,100,4456,34,,,
+190005,202004,100,5134,34,,,
+190006,202001,100,,8,,,
+190006,202002,100,,8,,,
+190006,202003,100,,8,,,
+190006,202004,100,,8,,,
+190007,202001,100,150000,85,,,
+190007,202002,100,120000,85,,,
+190007,202003,100,110000,85,,,
+190007,202004,100,180000,85,,,
+190008,202001,100,,71,,,
+190008,202002,100,,71,,,
+190008,202003,100,,71,,,
+190008,202004,100,,71,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
index 02891913..b6f04ace 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,filter_mkr,calc_fi,calc_bi,calc_cons
-190001,202001,100,9261,95,,,,1.853682946,,0.9214,50.3694,9261,R,,,,,,1.428812335,96.16299559
-190001,202002,100,4996,95,,,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,,,,,0.86670161,1.528894599,76.92045455
-190001,202003,100,1480,95,,,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,,,,,0.733999278,3.123947916,95.83333333
-190001,202004,100,4350,95,,,2.939189189,,1.113,,110.5473,4350,R,,,,,3.974249601,,87.62068966
-190002,202001,100,2433,17,,,,0.562673451,,0.9214,50.3694,2433,R,,,,,,1.428812335,96.16299559
-190002,202002,100,4324,17,,,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,,,,,0.86670161,1.528894599,76.92045455
-190002,202003,100,6598,17,,,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,,,,,0.733999278,3.123947916,95.83333333
-190002,202004,100,700,17,,,11.26857143,,1.113,,110.5473,700,R,,,,,3.974249601,,87.62068966
-190003,202001,100,7888,64,,,,1.870080607,,0.9214,50.3694,7888,R,,,,,,1.428812335,96.16299559
-190003,202002,100,4218,64,,,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,,,,,0.86670161,1.528894599,76.92045455
-190003,202003,100,7591,64,,,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,,,,,0.733999278,3.123947916,95.83333333
-190003,202004,100,4077,64,,,0.537083388,,1.113,,110.5473,4077,R,,,,,3.974249601,,87.62068966
-190004,202001,100,2247,51,,,,,,0.9214,50.3694,2247,R,,,,,,1.428812335,96.16299559
-190004,202002,100,,51,,,,,0.8521,1.5274,121.4187,1914.6687,FIR,,,,,0.86670161,1.528894599,76.92045455
-190004,202003,100,,51,,,,,0.9685,1.8795,89.3761,1854.356636,FIR,,,,,0.733999278,3.123947916,95.83333333
-190004,202004,100,8608,51,,,,,1.113,,110.5473,8608,R,,,,,3.974249601,,87.62068966
-190005,202001,100,,34,,,,,,0.9214,50.3694,6271.13538,BI,,,,,,1.428812335,96.16299559
-190005,202002,100,,34,,,,,0.8521,1.5274,121.4187,6806.0944,BI,,,,,0.86670161,1.528894599,76.92045455
-190005,202003,100,4456,34,,,,0.867939229,0.9685,1.8795,89.3761,4456,R,,,,,0.733999278,3.123947916,95.83333333
-190005,202004,100,5134,34,,,1.152154399,,1.113,,110.5473,5134,R,,,,,3.974249601,,87.62068966
-190006,202001,100,,8,,,,,,0.9214,50.3694,402.9552,C,,,,,,1.428812335,96.16299559
-190006,202002,100,,8,,,,,0.8521,1.5274,121.4187,343.3581259,FIC,,,,,0.86670161,1.528894599,76.92045455
-190006,202003,100,,8,,,,,0.9685,1.8795,89.3761,332.542345,FIC,,,,,0.733999278,3.123947916,95.83333333
-190006,202004,100,,8,,,,,1.113,,110.5473,370.1196299,FIC,,,,,3.974249601,,87.62068966
-190007,202001,100,150000,85,,,,,,0.9214,50.3694,150000,R,,,,TRUE,,1.428812335,96.16299559
-190007,202002,100,120000,85,,,,,0.8521,1.5274,121.4187,120000,R,,,,TRUE,0.86670161,1.528894599,76.92045455
-190007,202003,100,110000,85,,,,,0.9685,1.8795,89.3761,110000,R,,,,TRUE,0.733999278,3.123947916,95.83333333
-190007,202004,100,180000,85,,,,,1.113,,110.5473,180000,R,,,,TRUE,3.974249601,,87.62068966
-190008,202001,100,,71,,,,,,0.9214,50.3694,3576.2274,C,,,,,,1.428812335,96.16299559
-190008,202002,100,,71,,,,,0.8521,1.5274,121.4187,3047.303368,FIC,,,,,0.86670161,1.528894599,76.92045455
-190008,202003,100,,71,,,,,0.9685,1.8795,89.3761,2951.313311,FIC,,,,,0.733999278,3.123947916,95.83333333
-190008,202004,100,,71,,,,,1.113,,110.5473,3284.811716,FIC,,,,,3.974249601,,87.62068966
+identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+190001,202001,100,9261,95,,1.853682946,,0.9214,50.3694,9261,R,,,,
+190001,202002,100,4996,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,,,,
+190001,202003,100,1480,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,,,,
+190001,202004,100,4350,95,2.939189189,,1.113,,110.5473,4350,R,,,,
+190002,202001,100,2433,17,,0.562673451,,0.9214,50.3694,2433,R,,,,
+190002,202002,100,4324,17,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,,,,
+190002,202003,100,6598,17,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,,,,
+190002,202004,100,700,17,11.26857143,,1.113,,110.5473,700,R,,,,
+190003,202001,100,7888,64,,1.870080607,,0.9214,50.3694,7888,R,,,,
+190003,202002,100,4218,64,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,,,,
+190003,202003,100,7591,64,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,,,,
+190003,202004,100,4077,64,0.537083388,,1.113,,110.5473,4077,R,,,,
+190004,202001,100,2247,51,,,,0.9214,50.3694,2247,R,,,,
+190004,202002,100,,51,,,0.8521,1.5274,121.4187,1914.6687,FIR,,,,
+190004,202003,100,,51,,,0.9685,1.8795,89.3761,1854.356636,FIR,,,,
+190004,202004,100,8608,51,,,1.113,,110.5473,8608,R,,,,
+190005,202001,100,,34,,,,0.9214,50.3694,6271.13538,BI,,,,
+190005,202002,100,,34,,,0.8521,1.5274,121.4187,6806.0944,BI,,,,
+190005,202003,100,4456,34,,0.867939229,0.9685,1.8795,89.3761,4456,R,,,,
+190005,202004,100,5134,34,1.152154399,,1.113,,110.5473,5134,R,,,,
+190006,202001,100,,8,,,,0.9214,50.3694,402.9552,C,,,,
+190006,202002,100,,8,,,0.8521,1.5274,121.4187,343.3581259,FIC,,,,
+190006,202003,100,,8,,,0.9685,1.8795,89.3761,332.542345,FIC,,,,
+190006,202004,100,,8,,,1.113,,110.5473,370.1196299,FIC,,,,
+190007,202001,100,150000,85,,,,0.9214,50.3694,150000,R,,,,TRUE
+190007,202002,100,120000,85,,,0.8521,1.5274,121.4187,120000,R,,,,TRUE
+190007,202003,100,110000,85,,,0.9685,1.8795,89.3761,110000,R,,,,TRUE
+190007,202004,100,180000,85,,,1.113,,110.5473,180000,R,,,,TRUE
+190008,202001,100,,71,,,,0.9214,50.3694,3576.2274,C,,,,
+190008,202002,100,,71,,,0.8521,1.5274,121.4187,3047.303368,FIC,,,,
+190008,202003,100,,71,,,0.9685,1.8795,89.3761,2951.313311,FIC,,,,
+190008,202004,100,,71,,,1.113,,110.5473,3284.811716,FIC,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_input.csv
index 29e33a5f..f71ac258 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_input.csv
@@ -1,64 +1,64 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-200001,202001,100,7788,56,,
-200001,202002,100,6169,56,,
-200001,202003,100,6156,56,,
-200001,202004,100,1577,56,,
-200002,202001,100,6533,75,,
-200002,202002,100,8103,75,,
-200002,202003,100,5860,75,,
-200002,202004,100,2575,75,,
-200003,202001,100,56,10,,
-200003,202002,100,4978,10,,
-200003,202003,100,8777,10,,
-200003,202004,100,906,10,,
-200004,202001,100,1884,86,,
-200004,202002,100,6075,86,,
-200004,202003,100,,86,,
-200004,202004,100,,86,,
-200005,202001,100,,6,,
-200005,202002,100,,6,,
-200005,202003,100,,6,,
-200005,202004,100,,6,,
-200006,202001,100,,41,,
-200006,202002,100,,41,,
-200006,202003,100,8882,41,,
-200006,202004,100,2711,41,,
-200007,202001,200,2439,4,,
-200007,202002,200,9675,4,,
-200007,202003,200,7003,4,,
-200007,202004,200,595,4,,
-200008,202001,200,1849,4,,
-200008,202002,200,6436,4,,
-200008,202003,200,9709,4,,
-200008,202004,200,2727,4,,
-200009,202001,200,8742,45,,
-200009,202002,200,1469,45,,
-200009,202003,200,8602,45,,
-200009,202004,200,1945,45,,
-200010,202001,200,,85,,
-200010,202002,200,6489,85,,
-200010,202003,200,1796,85,,
-200010,202004,200,,85,,
-200011,202001,200,,79,,
-200011,202002,200,1926,79,,
-200011,202004,200,,79,,
-200012,202001,200,5495,87,,
-200012,202002,200,,87,,
-200012,202003,200,,87,,
-200012,202004,200,,87,,
-200013,202001,100,150000,85,,
-200013,202002,100,180000,85,,
-200013,202003,100,120000,85,,
-200013,202004,100,105000,85,,
-200014,202001,200,150000,96,,
-200014,202002,200,180000,96,,
-200014,202003,200,120000,96,,
-200014,202004,200,105000,96,,
-200015,202001,100,,71,,
-200015,202002,100,,71,,
-200015,202003,100,,71,,
-200015,202004,100,,71,,
-200016,202001,200,,48,,
-200016,202002,200,,48,,
-200016,202003,200,,48,,
-200016,202004,200,,48,,
+identifier,date,group,question,other
+200001,202001,100,7788,56
+200001,202002,100,6169,56
+200001,202003,100,6156,56
+200001,202004,100,1577,56
+200002,202001,100,6533,75
+200002,202002,100,8103,75
+200002,202003,100,5860,75
+200002,202004,100,2575,75
+200003,202001,100,56,10
+200003,202002,100,4978,10
+200003,202003,100,8777,10
+200003,202004,100,906,10
+200004,202001,100,1884,86
+200004,202002,100,6075,86
+200004,202003,100,,86
+200004,202004,100,,86
+200005,202001,100,,6
+200005,202002,100,,6
+200005,202003,100,,6
+200005,202004,100,,6
+200006,202001,100,,41
+200006,202002,100,,41
+200006,202003,100,8882,41
+200006,202004,100,2711,41
+200007,202001,200,2439,4
+200007,202002,200,9675,4
+200007,202003,200,7003,4
+200007,202004,200,595,4
+200008,202001,200,1849,4
+200008,202002,200,6436,4
+200008,202003,200,9709,4
+200008,202004,200,2727,4
+200009,202001,200,8742,45
+200009,202002,200,1469,45
+200009,202003,200,8602,45
+200009,202004,200,1945,45
+200010,202001,200,,85
+200010,202002,200,6489,85
+200010,202003,200,1796,85
+200010,202004,200,,85
+200011,202001,200,,79
+200011,202002,200,1926,79
+200011,202004,200,,79
+200012,202001,200,5495,87
+200012,202002,200,,87
+200012,202003,200,,87
+200012,202004,200,,87
+200013,202001,100,150000,85
+200013,202002,100,180000,85
+200013,202003,100,120000,85
+200013,202004,100,105000,85
+200014,202001,200,150000,96
+200014,202002,200,180000,96
+200014,202003,200,120000,96
+200014,202004,200,105000,96
+200015,202001,100,,71
+200015,202002,100,,71
+200015,202003,100,,71
+200015,202004,100,,71
+200016,202001,200,,48
+200016,202002,200,,48
+200016,202003,200,,48
+200016,202004,200,,48
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
index 2c47aa1e..ce4716bd 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,64 +1,64 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,filter_mkr
-200001,202001,100,7788,56,,,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4,
-200001,202002,100,6169,56,,,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,
-200001,202003,100,6156,56,,,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,
-200001,202004,100,1577,56,,,0.25617284,,0.276010255,,42.68681319,1577,R,4,,4,
-200002,202001,100,6533,75,,,,0.806244601,,0.597514698,71.63436123,6533,R,,4,4,
-200002,202002,100,8103,75,,,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,
-200002,202003,100,5860,75,,,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,
-200002,202004,100,2575,75,,,0.439419795,,0.276010255,,42.68681319,2575,R,4,,4,
-200003,202001,100,56,10,,,,0.011249498,,0.597514698,71.63436123,56,R,,4,4,
-200003,202002,100,4978,10,,,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,
-200003,202003,100,8777,10,,,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,
-200003,202004,100,906,10,,,0.103224336,,0.276010255,,42.68681319,906,R,4,,4,
-200004,202001,100,1884,86,,,,0.310123457,,0.597514698,71.63436123,1884,R,,4,4,
-200004,202002,100,6075,86,,,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,
-200004,202003,100,,86,,,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,
-200004,202004,100,,86,,,,,0.276010255,,42.68681319,1947.413826,FIR,4,,4,
-200005,202001,100,,6,,,,,,0.597514698,71.63436123,429.8061674,C,,4,4,
-200005,202002,100,,6,,,,,23.53745347,0.984013482,111.5638767,10116.54267,FIC,4,3,4,
-200005,202003,100,,6,,,,,1.161413175,4.785815599,163.0494505,11749.48594,FIC,3,4,4,
-200005,202004,100,,6,,,,,0.276010255,,42.68681319,3242.978611,FIC,4,,4,
-200006,202001,100,,41,,,,,,0.597514698,71.63436123,8740.605259,BI,,4,4,
-200006,202002,100,,41,,,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,
-200006,202003,100,8882,41,,,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,
-200006,202004,100,2711,41,,,0.305224049,,0.276010255,,42.68681319,2711,R,4,,4,
-200007,202001,200,2439,4,,,,0.252093023,,2.163456777,132.3214286,2439,R,,3,4,
-200007,202002,200,9675,4,,,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,
-200007,202003,200,7003,4,,,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,
-200007,202004,200,595,4,,,0.084963587,,0.197315737,,99.37735849,595,R,3,,3,
-200008,202001,200,1849,4,,,,0.287290242,,2.163456777,132.3214286,1849,R,,3,4,
-200008,202002,200,6436,4,,,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,
-200008,202003,200,9709,4,,,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,
-200008,202004,200,2727,4,,,0.280873416,,0.197315737,,99.37735849,2727,R,3,,3,
-200009,202001,200,8742,45,,,,5.950987066,,2.163456777,132.3214286,8742,R,,3,4,
-200009,202002,200,1469,45,,,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,
-200009,202003,200,8602,45,,,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,
-200009,202004,200,1945,45,,,0.226110207,,0.197315737,,99.37735849,1945,R,3,,3,
-200010,202001,200,,85,,,,,,2.163456777,132.3214286,14038.67103,BI,,3,4,
-200010,202002,200,6489,85,,,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,
-200010,202003,200,1796,85,,,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,
-200010,202004,200,,85,,,,,0.197315737,,99.37735849,354.3790633,FIR,3,,3,
-200011,202001,200,,79,,,,,,2.163456777,132.3214286,4166.817753,BI,,3,4,
-200011,202002,200,1926,79,,,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,
-200011,202004,200,,79,,,,,0.197315737,,99.37735849,7850.811321,C,3,,3,
-200012,202001,200,5495,87,,,,,,2.163456777,132.3214286,5495,R,,3,4,
-200012,202002,200,,87,,,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5,
-200012,202003,200,,87,,,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4,
-200012,202004,200,,87,,,,,0.197315737,,99.37735849,5755.871742,FIR,3,,3,
-200013,202001,100,150000,85,,,,,,0.597514698,71.63436123,150000,R,,4,4,TRUE
-200013,202002,100,180000,85,,,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,TRUE
-200013,202003,100,120000,85,,,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,TRUE
-200013,202004,100,105000,85,,,,,0.276010255,,42.68681319,105000,R,4,,4,TRUE
-200014,202001,200,150000,96,,,,,,2.163456777,132.3214286,150000,R,,3,4,TRUE
-200014,202002,200,180000,96,,,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,TRUE
-200014,202003,200,120000,96,,,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,TRUE
-200014,202004,200,105000,96,,,,,0.197315737,,99.37735849,105000,R,3,,3,TRUE
-200015,202001,100,,71,,,,,,0.597514698,71.63436123,5086.039647,C,,4,4,
-200015,202002,100,,71,,,,,23.53745347,0.984013482,111.5638767,119712.4215,FIC,4,3,4,
-200015,202003,100,,71,,,,,1.161413175,4.785815599,163.0494505,139035.5836,FIC,3,4,4,
-200015,202004,100,,71,,,,,0.276010255,,42.68681319,38375.24688,FIC,4,,4,
-200016,202001,200,,48,,,,,,2.163456777,132.3214286,6351.428573,C,,3,4,
-200016,202002,200,,48,,,,,2.53854315,1.457061014,119.7926267,16123.3755,FIC,3,4,5,
-200016,202003,200,,48,,,,,2.091207548,6.584230902,196.4492754,33717.32454,FIC,4,3,4,
-200016,202004,200,,48,,,,,0.197315737,,99.37735849,6652.958741,FIC,3,,3,
+identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,
+200001,202001,100,7788,56,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4,
+200001,202002,100,6169,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,
+200001,202003,100,6156,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,
+200001,202004,100,1577,56,0.25617284,,0.276010255,,42.68681319,1577,R,4,,4,
+200002,202001,100,6533,75,,0.806244601,,0.597514698,71.63436123,6533,R,,4,4,
+200002,202002,100,8103,75,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,
+200002,202003,100,5860,75,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,
+200002,202004,100,2575,75,0.439419795,,0.276010255,,42.68681319,2575,R,4,,4,
+200003,202001,100,56,10,,0.011249498,,0.597514698,71.63436123,56,R,,4,4,
+200003,202002,100,4978,10,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,
+200003,202003,100,8777,10,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,
+200003,202004,100,906,10,0.103224336,,0.276010255,,42.68681319,906,R,4,,4,
+200004,202001,100,1884,86,,0.310123457,,0.597514698,71.63436123,1884,R,,4,4,
+200004,202002,100,6075,86,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,
+200004,202003,100,,86,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,
+200004,202004,100,,86,,,0.276010255,,42.68681319,1947.413826,FIR,4,,4,
+200005,202001,100,,6,,,,0.597514698,71.63436123,429.8061674,C,,4,4,
+200005,202002,100,,6,,,23.53745347,0.984013482,111.5638767,10116.54267,FIC,4,3,4,
+200005,202003,100,,6,,,1.161413175,4.785815599,163.0494505,11749.48594,FIC,3,4,4,
+200005,202004,100,,6,,,0.276010255,,42.68681319,3242.978611,FIC,4,,4,
+200006,202001,100,,41,,,,0.597514698,71.63436123,8740.605259,BI,,4,4,
+200006,202002,100,,41,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,
+200006,202003,100,8882,41,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,
+200006,202004,100,2711,41,0.305224049,,0.276010255,,42.68681319,2711,R,4,,4,
+200007,202001,200,2439,4,,0.252093023,,2.163456777,132.3214286,2439,R,,3,4,
+200007,202002,200,9675,4,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,
+200007,202003,200,7003,4,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,
+200007,202004,200,595,4,0.084963587,,0.197315737,,99.37735849,595,R,3,,3,
+200008,202001,200,1849,4,,0.287290242,,2.163456777,132.3214286,1849,R,,3,4,
+200008,202002,200,6436,4,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,
+200008,202003,200,9709,4,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,
+200008,202004,200,2727,4,0.280873416,,0.197315737,,99.37735849,2727,R,3,,3,
+200009,202001,200,8742,45,,5.950987066,,2.163456777,132.3214286,8742,R,,3,4,
+200009,202002,200,1469,45,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,
+200009,202003,200,8602,45,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,
+200009,202004,200,1945,45,0.226110207,,0.197315737,,99.37735849,1945,R,3,,3,
+200010,202001,200,,85,,,,2.163456777,132.3214286,14038.67103,BI,,3,4,
+200010,202002,200,6489,85,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,
+200010,202003,200,1796,85,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,
+200010,202004,200,,85,,,0.197315737,,99.37735849,354.3790633,FIR,3,,3,
+200011,202001,200,,79,,,,2.163456777,132.3214286,4166.817753,BI,,3,4,
+200011,202002,200,1926,79,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,
+200011,202004,200,,79,,,0.197315737,,99.37735849,7850.811321,C,3,,3,
+200012,202001,200,5495,87,,,,2.163456777,132.3214286,5495,R,,3,4,
+200012,202002,200,,87,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5,
+200012,202003,200,,87,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4,
+200012,202004,200,,87,,,0.197315737,,99.37735849,5755.871742,FIR,3,,3,
+200013,202001,100,150000,85,,,,0.597514698,71.63436123,150000,R,,4,4,TRUE
+200013,202002,100,180000,85,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,TRUE
+200013,202003,100,120000,85,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,TRUE
+200013,202004,100,105000,85,,,0.276010255,,42.68681319,105000,R,4,,4,TRUE
+200014,202001,200,150000,96,,,,2.163456777,132.3214286,150000,R,,3,4,TRUE
+200014,202002,200,180000,96,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,TRUE
+200014,202003,200,120000,96,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,TRUE
+200014,202004,200,105000,96,,,0.197315737,,99.37735849,105000,R,3,,3,TRUE
+200015,202001,100,,71,,,,0.597514698,71.63436123,5086.039647,C,,4,4,
+200015,202002,100,,71,,,23.53745347,0.984013482,111.5638767,119712.4215,FIC,4,3,4,
+200015,202003,100,,71,,,1.161413175,4.785815599,163.0494505,139035.5836,FIC,3,4,4,
+200015,202004,100,,71,,,0.276010255,,42.68681319,38375.24688,FIC,4,,4,
+200016,202001,200,,48,,,,2.163456777,132.3214286,6351.428573,C,,3,4,
+200016,202002,200,,48,,,2.53854315,1.457061014,119.7926267,16123.3755,FIC,3,4,5,
+200016,202003,200,,48,,,2.091207548,6.584230902,196.4492754,33717.32454,FIC,4,3,4,
+200016,202004,200,,48,,,0.197315737,,99.37735849,6652.958741,FIC,3,,3,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_input.csv
index 01ba81ae..b719b137 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_input.csv
@@ -1,28 +1,28 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-230001,202001,1,547,10,,
-230001,202002,1,362,10,,
-230001,202003,1,895,10,,
-230002,202001,1,381,50,,
-230002,202002,1,573,50,,
-230002,202003,1,214,50,,
-230003,202001,2,961,12,,
-230003,202002,2,267,12,,
-230003,202003,2,314,12,,
-230004,202001,2,555,9,,
-230004,202002,2,628,9,,
-230004,202003,2,736,9,,
-230005,202001,1,,18,,
-230005,202002,2,,18,,
-230005,202003,2,,18,,
-230006,202001,1,150000,85,,
-230006,202002,1,180000,85,,
-230006,202003,1,120000,85,,
-230007,202001,1,,71,,
-230007,202002,1,,71,,
-230007,202003,1,,71,,
-230008,202001,2,150000,85,,
-230008,202002,2,180000,85,,
-230008,202003,2,120000,85,,
-230009,202001,2,,71,,
-230009,202002,2,,71,,
-230009,202003,2,,71,,
+identifier,date,group,question,other
+230001,202001,1,547,10
+230001,202002,1,362,10
+230001,202003,1,895,10
+230002,202001,1,381,50
+230002,202002,1,573,50
+230002,202003,1,214,50
+230003,202001,2,961,12
+230003,202002,2,267,12
+230003,202003,2,314,12
+230004,202001,2,555,9
+230004,202002,2,628,9
+230004,202003,2,736,9
+230005,202001,1,,18
+230005,202002,2,,18
+230005,202003,2,,18
+230006,202001,1,150000,85
+230006,202002,1,180000,85
+230006,202003,1,120000,85
+230007,202001,1,,71
+230007,202002,1,,71
+230007,202003,1,,71
+230008,202001,2,150000,85
+230008,202002,2,180000,85
+230008,202003,2,120000,85
+230009,202001,2,,71
+230009,202002,2,,71
+230009,202003,2,,71
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 9388ff02..5998ed75 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,filter_mkr
-230001,202001,1,547,10,,,,1.511049724,,1.087985595,15.46666667,547,R,,2,2,
-230001,202002,1,362,10,,,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,
-230001,202003,1,895,10,,,2.472375691,,1.42292432,,18.48333333,895,R,2,,2,
-230002,202001,1,381,50,,,,0.664921466,,1.087985595,15.46666667,381,R,,2,2,
-230002,202002,1,573,50,,,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,
-230002,202003,1,214,50,,,0.373472949,,1.42292432,,18.48333333,214,R,2,,2,
-230003,202001,2,961,12,,,,3.599250936,,2.241504449,72.19047619,961,R,,2,2,
-230003,202002,2,267,12,,,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,
-230003,202003,2,314,12,,,1.176029963,,1.174002242,,50,314,R,2,,2,
-230004,202001,2,555,9,,,,0.883757962,,2.241504449,72.19047619,555,R,,2,2,
-230004,202002,2,628,9,,,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,
-230004,202003,2,736,9,,,1.171974522,,1.174002242,,50,736,R,2,,2,
-230005,202001,1,,18,,,,,,1.087985595,15.46666667,278.4,C,,2,2,
-230005,202002,2,,18,,,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,
-230005,202003,2,,18,,,,,1.174002242,,50,900.6274345,FIC,2,,2,
-230006,202001,1,150000,85,,,,,,1.087985595,15.46666667,150000,R,,2,2,TRUE
-230006,202002,1,180000,85,,,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,TRUE
-230006,202003,1,120000,85,,,,,1.42292432,,18.48333333,120000,R,2,,2,TRUE
-230007,202001,1,,71,,,,,,1.087985595,15.46666667,1098.133334,C,,2,2,
-230007,202002,1,,71,,,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,
-230007,202003,1,,71,,,,,1.42292432,,18.48333333,1692.041118,FIC,2,,2,
-230008,202001,2,150000,85,,,,,,2.241504449,72.19047619,150000,R,,2,2,TRUE
-230008,202002,2,180000,85,,,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,TRUE
-230008,202003,2,120000,85,,,,,1.174002242,,50,120000,R,2,,2,TRUE
-230009,202001,2,,71,,,,,,2.241504449,72.19047619,5125.523809,C,,2,2,
-230009,202002,2,,71,,,,,0.70468356,0.85178967,42.61904762,3611.872365,FIC,2,2,2,
-230009,202003,2,,71,,,,,1.174002242,,50,4240.346254,FIC,2,,2,
+identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,
+230001,202001,1,547,10,,1.511049724,,1.087985595,15.46666667,547,R,,2,2,
+230001,202002,1,362,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,
+230001,202003,1,895,10,2.472375691,,1.42292432,,18.48333333,895,R,2,,2,
+230002,202001,1,381,50,,0.664921466,,1.087985595,15.46666667,381,R,,2,2,
+230002,202002,1,573,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,
+230002,202003,1,214,50,0.373472949,,1.42292432,,18.48333333,214,R,2,,2,
+230003,202001,2,961,12,,3.599250936,,2.241504449,72.19047619,961,R,,2,2,
+230003,202002,2,267,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,
+230003,202003,2,314,12,1.176029963,,1.174002242,,50,314,R,2,,2,
+230004,202001,2,555,9,,0.883757962,,2.241504449,72.19047619,555,R,,2,2,
+230004,202002,2,628,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,
+230004,202003,2,736,9,1.171974522,,1.174002242,,50,736,R,2,,2,
+230005,202001,1,,18,,,,1.087985595,15.46666667,278.4,C,,2,2,
+230005,202002,2,,18,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,
+230005,202003,2,,18,,,1.174002242,,50,900.6274345,FIC,2,,2,
+230006,202001,1,150000,85,,,,1.087985595,15.46666667,150000,R,,2,2,TRUE
+230006,202002,1,180000,85,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,TRUE
+230006,202003,1,120000,85,,,1.42292432,,18.48333333,120000,R,2,,2,TRUE
+230007,202001,1,,71,,,,1.087985595,15.46666667,1098.133334,C,,2,2,
+230007,202002,1,,71,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,
+230007,202003,1,,71,,,1.42292432,,18.48333333,1692.041118,FIC,2,,2,
+230008,202001,2,150000,85,,,,2.241504449,72.19047619,150000,R,,2,2,TRUE
+230008,202002,2,180000,85,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,TRUE
+230008,202003,2,120000,85,,,1.174002242,,50,120000,R,2,,2,TRUE
+230009,202001,2,,71,,,,2.241504449,72.19047619,5125.523809,C,,2,2,
+230009,202002,2,,71,,,0.70468356,0.85178967,42.61904762,3611.872365,FIC,2,2,2,
+230009,202003,2,,71,,,1.174002242,,50,4240.346254,FIC,2,,2,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_input.csv
index 8127580d..b4bafd4e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_input.csv
@@ -1,22 +1,22 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-110001,202001,100,9244,89,,
-110001,202002,100,8916,89,,
-110001,202003,100,6194,89,,
-110002,202001,100,4826,83,,
-110002,202002,100,5903,83,,
-110002,202003,100,4743,83,,
-110003,202001,100,7586,4,,
-110003,202002,100,1016,4,,
-110003,202003,100,1429,4,,
-110004,202001,100,3975,76,,
-110004,202002,100,3044,76,,
-110004,202003,100,,76,,
-110005,202001,200,,27,,
-110005,202002,200,,27,,
-110005,202003,200,9940,27,,
-110006,202001,200,5325,42,,
-110006,202002,200,,42,,
-110006,202003,200,,42,,
-110007,202001,200,,19,,
-110007,202002,200,,19,,
-110007,202003,200,,19,,
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,,76
+110005,202001,200,,27
+110005,202002,200,,27
+110005,202003,200,9940,27
+110006,202001,200,5325,42
+110006,202002,200,,42
+110006,202003,200,,42
+110007,202001,200,,19
+110007,202002,200,,19
+110007,202003,200,,19
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index fc42dd90..c9c52898 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,22 +1,22 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-110001,202001,100,9244,89,,,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
-110001,202002,100,8916,89,,,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
-110001,202003,100,6194,89,,,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
-110002,202001,100,4826,83,,,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
-110002,202002,100,5903,83,,,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
-110002,202003,100,4743,83,,,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
-110003,202001,100,7586,4,,,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
-110003,202002,100,1016,4,,,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
-110003,202003,100,1429,4,,,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
-110004,202001,100,3975,76,,,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
-110004,202002,100,3044,76,,,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
-110004,202003,100,,76,,,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
-110005,202001,200,,27,,,,,,1,1,9940,BI,,0,0
-110005,202002,200,,27,,,,,1,1,1,9940,BI,0,0,0
-110005,202003,200,9940,27,,,,,1,,368.1481481,9940,R,0,,1
-110006,202001,200,5325,42,,,,,,1,126.7857143,5325,R,,0,1
-110006,202002,200,,42,,,,,1,1,1,5325,FIR,0,0,0
-110006,202003,200,,42,,,,,1,,368.1481481,5325,FIR,0,,1
-110007,202001,200,,19,,,,,,1,126.7857143,2408.928571,C,,0,1
-110007,202002,200,,19,,,,,1,1,1,2408.928571,FIC,0,0,0
-110007,202003,200,,19,,,,,1,,368.1481481,2408.928571,FIC,0,,1
+identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,9244,89,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
+110001,202002,100,8916,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
+110001,202003,100,6194,89,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
+110002,202001,100,4826,83,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
+110002,202002,100,5903,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
+110002,202003,100,4743,83,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
+110003,202001,100,7586,4,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
+110003,202002,100,1016,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
+110003,202003,100,1429,4,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
+110004,202001,100,3975,76,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
+110004,202002,100,3044,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
+110004,202003,100,,76,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
+110005,202001,200,,27,,,,1,1,9940,BI,,0,0
+110005,202002,200,,27,,,1,1,1,9940,BI,0,0,0
+110005,202003,200,9940,27,,,1,,368.1481481,9940,R,0,,1
+110006,202001,200,5325,42,,,,1,126.7857143,5325,R,,0,1
+110006,202002,200,,42,,,1,1,1,5325,FIR,0,0,0
+110006,202003,200,,42,,,1,,368.1481481,5325,FIR,0,,1
+110007,202001,200,,19,,,,1,126.7857143,2408.928571,C,,0,1
+110007,202002,200,,19,,,1,1,1,2408.928571,FIC,0,0,0
+110007,202003,200,,19,,,1,,368.1481481,2408.928571,FIC,0,,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_input.csv
index 71916545..1a5ddba4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_input.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-110001,202001,100,9244,89,,
-110001,202002,100,8916,89,,
-110001,202003,100,6194,89,,
-110002,202001,100,4826,83,,
-110002,202002,100,5903,83,,
-110002,202003,100,4743,83,,
-110003,202001,100,7586,4,,
-110003,202002,100,1016,4,,
-110003,202003,100,1429,4,,
-110004,202001,100,3975,76,,
-110004,202002,100,3044,76,,
-110004,202003,100,,76,,
-110005,202001,200,,27,,
-110005,202002,200,,27,,
-110005,202003,200,,27,,
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,,76
+110005,202001,200,,27
+110005,202002,200,,27
+110005,202003,200,,27
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index b1aa4904..3943009a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,16 +1,16 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-110001,202001,100,9244,89,,,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
-110001,202002,100,8916,89,,,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
-110001,202003,100,6194,89,,,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
-110002,202001,100,4826,83,,,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
-110002,202002,100,5903,83,,,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
-110002,202003,100,4743,83,,,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
-110003,202001,100,7586,4,,,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
-110003,202002,100,1016,4,,,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
-110003,202003,100,1429,4,,,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
-110004,202001,100,3975,76,,,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
-110004,202002,100,3044,76,,,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
-110004,202003,100,,76,,,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
-110005,202001,200,,27,,,,,,1,1,27,C,,0,0
-110005,202002,200,,27,,,,,1,1,1,27,FIC,0,0,0
-110005,202003,200,,27,,,,,1,,1,27,FIC,0,,0
+identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,9244,89,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
+110001,202002,100,8916,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
+110001,202003,100,6194,89,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
+110002,202001,100,4826,83,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
+110002,202002,100,5903,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
+110002,202003,100,4743,83,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
+110003,202001,100,7586,4,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
+110003,202002,100,1016,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
+110003,202003,100,1429,4,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
+110004,202001,100,3975,76,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
+110004,202002,100,3044,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
+110004,202003,100,,76,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
+110005,202001,200,,27,,,,1,1,27,C,,0,0
+110005,202002,200,,27,,,1,1,1,27,FIC,0,0,0
+110005,202003,200,,27,,,1,,1,27,FIC,0,,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv
index 83aa5321..f0d55fe9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_link,bi_link
-190001,202001,100,9261,95,,,,0.9214
-190001,202002,100,4996,95,,,0.8521,1.5274
-190001,202003,100,1480,95,,,0.9685,1.8795
-190001,202004,100,4350,95,,,1.113,
-190002,202001,100,2433,17,,,,0.9214
-190002,202002,100,4324,17,,,0.8521,1.5274
-190002,202003,100,6598,17,,,0.9685,1.8795
-190002,202004,100,700,17,,,1.113,
-190003,202001,100,7888,64,,,,0.9214
-190003,202002,100,4218,64,,,0.8521,1.5274
-190003,202003,100,7591,64,,,0.9685,1.8795
-190003,202004,100,4077,64,,,1.113,
-190004,202001,100,2247,51,,,,0.9214
-190004,202002,100,,51,,,0.8521,1.5274
-190004,202003,100,,51,,,0.9685,1.8795
-190004,202004,100,8608,51,,,1.113,
-190005,202001,100,,34,,,,0.9214
-190005,202002,100,,34,,,0.8521,1.5274
-190005,202003,100,4456,34,,,0.9685,1.8795
-190005,202004,100,5134,34,,,1.113,
-190006,202001,100,,8,,,,0.9214
-190006,202002,100,,8,,,0.8521,1.5274
-190006,202003,100,,8,,,0.9685,1.8795
-190006,202004,100,,8,,,1.113,
+identifier,date,group,question,other,forward,backward
+190001,202001,100,9261,95,,0.9214
+190001,202002,100,4996,95,0.8521,1.5274
+190001,202003,100,1480,95,0.9685,1.8795
+190001,202004,100,4350,95,1.113,
+190002,202001,100,2433,17,,0.9214
+190002,202002,100,4324,17,0.8521,1.5274
+190002,202003,100,6598,17,0.9685,1.8795
+190002,202004,100,700,17,1.113,
+190003,202001,100,7888,64,,0.9214
+190003,202002,100,4218,64,0.8521,1.5274
+190003,202003,100,7591,64,0.9685,1.8795
+190003,202004,100,4077,64,1.113,
+190004,202001,100,2247,51,,0.9214
+190004,202002,100,,51,0.8521,1.5274
+190004,202003,100,,51,0.9685,1.8795
+190004,202004,100,8608,51,1.113,
+190005,202001,100,,34,,0.9214
+190005,202002,100,,34,0.8521,1.5274
+190005,202003,100,4456,34,0.9685,1.8795
+190005,202004,100,5134,34,1.113,
+190006,202001,100,,8,,0.9214
+190006,202002,100,,8,0.8521,1.5274
+190006,202003,100,,8,0.9685,1.8795
+190006,202004,100,,8,1.113,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index 6a25d27e..ffa1a513 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,calc_fi,calc_bi
-190001,202001,100,9261,95,,,,1.853682946,,0.9214,96.16299559,9261,R,,,4,,1.428812335
-190001,202002,100,4996,95,,,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,,,3,0.86670161,1.528894599
-190001,202003,100,1480,95,,,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,,,4,0.733999278,3.123947916
-190001,202004,100,4350,95,,,2.939189189,,1.113,,87.62068966,4350,R,,,5,3.974249601,
-190002,202001,100,2433,17,,,,0.562673451,,0.9214,96.16299559,2433,R,,,4,,1.428812335
-190002,202002,100,4324,17,,,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,,,3,0.86670161,1.528894599
-190002,202003,100,6598,17,,,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,,,4,0.733999278,3.123947916
-190002,202004,100,700,17,,,11.26857143,,1.113,,87.62068966,700,R,,,5,3.974249601,
-190003,202001,100,7888,64,,,,1.870080607,,0.9214,96.16299559,7888,R,,,4,,1.428812335
-190003,202002,100,4218,64,,,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,,,3,0.86670161,1.528894599
-190003,202003,100,7591,64,,,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,,,4,0.733999278,3.123947916
-190003,202004,100,4077,64,,,0.537083388,,1.113,,87.62068966,4077,R,,,5,3.974249601,
-190004,202001,100,2247,51,,,,,,0.9214,96.16299559,2247,R,,,4,,1.428812335
-190004,202002,100,,51,,,,,0.8521,1.5274,76.92045455,1914.6687,FIR,,,3,0.86670161,1.528894599
-190004,202003,100,,51,,,,,0.9685,1.8795,95.83333333,1854.356636,FIR,,,4,0.733999278,3.123947916
-190004,202004,100,8608,51,,,,,1.113,,87.62068966,8608,R,,,5,3.974249601,
-190005,202001,100,,34,,,,,,0.9214,96.16299559,6271.13538,BI,,,4,,1.428812335
-190005,202002,100,,34,,,,,0.8521,1.5274,76.92045455,6806.0944,BI,,,3,0.86670161,1.528894599
-190005,202003,100,4456,34,,,,0.867939229,0.9685,1.8795,95.83333333,4456,R,,,4,0.733999278,3.123947916
-190005,202004,100,5134,34,,,1.152154399,,1.113,,87.62068966,5134,R,,,5,3.974249601,
-190006,202001,100,,8,,,,,,0.9214,96.16299559,769.3039647,C,,,4,,1.428812335
-190006,202002,100,,8,,,,,0.8521,1.5274,76.92045455,655.5239083,FIC,,,3,0.86670161,1.528894599
-190006,202003,100,,8,,,,,0.9685,1.8795,95.83333333,634.8749052,FIC,,,4,0.733999278,3.123947916
-190006,202004,100,,8,,,,,1.113,,87.62068966,706.6157695,FIC,,,5,3.974249601,
+identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+190001,202001,100,9261,95,,1.853682946,,0.9214,96.16299559,9261,R,,,4
+190001,202002,100,4996,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,,,3
+190001,202003,100,1480,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,,,4
+190001,202004,100,4350,95,2.939189189,,1.113,,87.62068966,4350,R,,,5
+190002,202001,100,2433,17,,0.562673451,,0.9214,96.16299559,2433,R,,,4
+190002,202002,100,4324,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,,,3
+190002,202003,100,6598,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,,,4
+190002,202004,100,700,17,11.26857143,,1.113,,87.62068966,700,R,,,5
+190003,202001,100,7888,64,,1.870080607,,0.9214,96.16299559,7888,R,,,4
+190003,202002,100,4218,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,,,3
+190003,202003,100,7591,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,,,4
+190003,202004,100,4077,64,0.537083388,,1.113,,87.62068966,4077,R,,,5
+190004,202001,100,2247,51,,,,0.9214,96.16299559,2247,R,,,4
+190004,202002,100,,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,,,3
+190004,202003,100,,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,,,4
+190004,202004,100,8608,51,,,1.113,,87.62068966,8608,R,,,5
+190005,202001,100,,34,,,,0.9214,96.16299559,6271.13538,BI,,,4
+190005,202002,100,,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,,,3
+190005,202003,100,4456,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,,,4
+190005,202004,100,5134,34,1.152154399,,1.113,,87.62068966,5134,R,,,5
+190006,202001,100,,8,,,,0.9214,96.16299559,769.3039647,C,,,4
+190006,202002,100,,8,,,0.8521,1.5274,76.92045455,655.5239083,FIC,,,3
+190006,202003,100,,8,,,0.9685,1.8795,95.83333333,634.8749052,FIC,,,4
+190006,202004,100,,8,,,1.113,,87.62068966,706.6157695,FIC,,,5
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_input.csv
index c321b555..60db0f4b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_input.csv
@@ -1,21 +1,21 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-120001,202001,100,5240,0,,
-120001,202002,100,2490,0,,
-120001,202003,100,3382,0,,
-120001,202004,100,4475,0,,
-120001,202005,100,1316,0,,
-120002,202001,100,7410,0,,
-120002,202002,100,3602,0,,
-120002,202003,100,4972,0,,
-120002,202004,100,8838,0,,
-120002,202005,100,1535,0,,
-120003,202001,100,4530,0,,
-120003,202002,100,7451,0,,
-120003,202003,100,7586,0,,
-120003,202004,100,283,0,,
-120003,202005,100,4416,0,,
-120004,202001,100,,3,,
-120004,202002,100,,3,,
-120004,202003,100,,3,,
-120004,202004,100,,3,,
-120004,202005,100,,3,,
+identifier,date,group,question,other
+120001,202001,100,5240,0
+120001,202002,100,2490,0
+120001,202003,100,3382,0
+120001,202004,100,4475,0
+120001,202005,100,1316,0
+120002,202001,100,7410,0
+120002,202002,100,3602,0
+120002,202003,100,4972,0
+120002,202004,100,8838,0
+120002,202005,100,1535,0
+120003,202001,100,4530,0
+120003,202002,100,7451,0
+120003,202003,100,7586,0
+120003,202004,100,283,0
+120003,202005,100,4416,0
+120004,202001,100,,3
+120004,202002,100,,3
+120004,202003,100,,3
+120004,202004,100,,3
+120004,202005,100,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index f688cc92..ef5a51db 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,21 +1,21 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_link,bi_link,c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,default_c_link
-120001,202001,100,5240,0,,,,2.104417671,,1.589860068,1,5240,R,,3,3,TRUE
-120001,202002,100,2490,0,,,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,TRUE
-120001,202003,100,3382,0,,,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,TRUE
-120001,202004,100,4475,0,,,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,TRUE
-120001,202005,100,1316,0,,,0.294078212,,5.357333441,,1,1316,R,3,,3,TRUE
-120002,202001,100,7410,0,,,,2.05719045,,1.589860068,1,7410,R,,3,3,TRUE
-120002,202002,100,3602,0,,,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,TRUE
-120002,202003,100,4972,0,,,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,TRUE
-120002,202004,100,8838,0,,,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,TRUE
-120002,202005,100,1535,0,,,0.173681828,,5.357333441,,1,1535,R,3,,3,TRUE
-120003,202001,100,4530,0,,,,0.607972084,,1.589860068,1,4530,R,,3,3,TRUE
-120003,202002,100,7451,0,,,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,TRUE
-120003,202003,100,7586,0,,,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,TRUE
-120003,202004,100,283,0,,,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,TRUE
-120003,202005,100,4416,0,,,15.60424028,,5.357333441,,1,4416,R,3,,3,TRUE
-120004,202001,100,,3,,,,,,1.589860068,1,3,C,,3,3,TRUE
-120004,202002,100,,3,,,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,TRUE
-120004,202003,100,,3,,,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,TRUE
-120004,202004,100,,3,,,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,TRUE
-120004,202005,100,,3,,,,,5.357333441,,1,18.28784061,FIC,3,,3,TRUE
+identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_construction_link
+120001,202001,100,5240,0,,2.104417671,,1.589860068,1,5240,R,,3,3,TRUE
+120001,202002,100,2490,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,TRUE
+120001,202003,100,3382,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,TRUE
+120001,202004,100,4475,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,TRUE
+120001,202005,100,1316,0,0.294078212,,5.357333441,,1,1316,R,3,,3,TRUE
+120002,202001,100,7410,0,,2.05719045,,1.589860068,1,7410,R,,3,3,TRUE
+120002,202002,100,3602,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,TRUE
+120002,202003,100,4972,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,TRUE
+120002,202004,100,8838,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,TRUE
+120002,202005,100,1535,0,0.173681828,,5.357333441,,1,1535,R,3,,3,TRUE
+120003,202001,100,4530,0,,0.607972084,,1.589860068,1,4530,R,,3,3,TRUE
+120003,202002,100,7451,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,TRUE
+120003,202003,100,7586,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,TRUE
+120003,202004,100,283,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,TRUE
+120003,202005,100,4416,0,15.60424028,,5.357333441,,1,4416,R,3,,3,TRUE
+120004,202001,100,,3,,,,1.589860068,1,3,C,,3,3,TRUE
+120004,202002,100,,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,TRUE
+120004,202003,100,,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,TRUE
+120004,202004,100,,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,TRUE
+120004,202005,100,,3,,,5.357333441,,1,18.28784061,FIC,3,,3,TRUE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_input.csv
index 5a53a763..5d0a69d4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-30001,202001,100,8444,51,0.1,0.1
-30001,202002,100,7476,51,0.1,0.1
-30001,202003,100,2003,51,0.1,0.1
-30002,202001,100,9343,72,0.1,0.1
-30002,202002,100,7818,72,0.1,0.1
-30002,202003,100,4897,72,0.1,0.1
-30003,202001,100,7511,7,0.1,0.1
-30003,202002,100,1761,7,0.1,0.1
-30003,202003,100,6492,7,0.1,0.1
-30004,202001,100,64,81,0.1,0.1
-30004,202002,100,2113,81,0.1,0.1
-30004,202003,100,185,81,0.1,0.1
-30005,202001,100,844,5,0.1,0.1
-30005,202002,100,897,5,0.1,0.1
-30005,202003,100,280,5,0.1,0.1
-30006,202001,100,1869,14,0.1,0.1
-30006,202002,100,1876,14,0.1,0.1
-30006,202003,100,1371,14,0.1,0.1
-30007,202001,100,12769,12,0.1,0.1
-30007,202002,100,2853,12,0.1,0.1
-30007,202003,100,11491,12,0.1,0.1
-30008,202001,100,141,162,0.1,0.1
-30008,202002,100,6001,162,0.1,0.1
-30008,202003,100,433,162,0.1,0.1
-30009,202001,100,6417,26,0.1,0.1
-30009,202002,100,4037,26,0.1,0.1
-30009,202003,100,1322,26,0.1,0.1
-30010,202001,100,28963,144,0.1,0.1
-30010,202002,100,21734,144,0.1,0.1
-30010,202003,100,10529,144,0.1,0.1
-30011,202001,100,6009,5,0.1,0.1
-30011,202002,100,1145,5,0.1,0.1
-30011,202003,100,5064,5,0.1,0.1
-30012,202001,100,256,275,0.1,0.1
-30012,202002,100,7522,275,0.1,0.1
-30012,202003,100,,275,0.1,0.1
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,10529,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30011,202003,100,5064,5
+30012,202001,100,256,275
+30012,202002,100,7522,275
+30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 4381e97c..dc5ed3a3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.598925527,96.73383283,8444,R,,10,12,,
-30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,6.802558774,2.995081605,76.3675837,7476,R,10,9,12,,
-30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
-30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.598925527,96.73383283,9343,R,,10,12,,
-30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,6.802558774,2.995081605,76.3675837,7818,R,10,9,12,,
-30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
-30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.598925527,96.73383283,7511,R,,10,12,,
-30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,6.802558774,2.995081605,76.3675837,1761,R,10,9,12,,
-30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
-30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.598925527,96.73383283,64,R,,10,12,,
-30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,6.802558774,2.995081605,76.3675837,2113,R,10,9,12,,
-30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
-30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.598925527,96.73383283,844,R,,10,12,,
-30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,6.802558774,2.995081605,76.3675837,897,R,10,9,12,,
-30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
-30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.598925527,96.73383283,1869,R,,10,12,,
-30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,6.802558774,2.995081605,76.3675837,1876,R,10,9,12,,
-30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
-30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.598925527,96.73383283,12769,R,,10,12,,
-30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,6.802558774,2.995081605,76.3675837,2853,R,10,9,12,,
-30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
-30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.598925527,96.73383283,141,R,,10,12,,TRUE
-30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,,6.802558774,2.995081605,76.3675837,6001,R,10,9,12,TRUE,TRUE
-30008,202003,100,433,162,0.1,0.1,0.072138939,,,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
-30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.598925527,96.73383283,6417,R,,10,12,,
-30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,6.802558774,2.995081605,76.3675837,4037,R,10,9,12,,
-30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
-30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.598925527,96.73383283,28963,R,,10,12,,
-30010,202002,100,21734,144,0.1,0.1,0.750399298,2.064295653,0.750399298,2.064295653,6.802558774,2.995081605,76.3675837,21734,R,10,9,12,,
-30010,202003,100,10529,144,0.1,0.1,0.484426733,,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
-30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.598925527,96.73383283,6009,R,,10,12,,TRUE
-30011,202002,100,1145,5,0.1,0.1,0.190495606,0.226047443,,,6.802558774,2.995081605,76.3675837,1145,R,10,9,12,TRUE,TRUE
-30011,202003,100,5064,5,0.1,0.1,4.423850085,,,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
-30012,202001,100,256,275,0.1,0.1,,0.034032235,,0.034032235,,1.598925527,96.73383283,256,R,,10,12,,
-30012,202002,100,7522,275,0.1,0.1,29.38390625,,29.38390625,,6.802558774,2.995081605,76.3675837,7522,R,10,9,12,,
-30012,202003,100,,275,0.1,0.1,,,,,1.172391173,,76.13443331,8818.726403,FIR,9,,11,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.598925527,96.73383283,8444,R,,10,12,,
+30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,6.802558774,2.995081605,76.3675837,7476,R,10,9,12,,
+30001,202003,100,2003,51,0.267924024,,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
+30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.598925527,96.73383283,9343,R,,10,12,,
+30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,6.802558774,2.995081605,76.3675837,7818,R,10,9,12,,
+30002,202003,100,4897,72,0.626375032,,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
+30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.598925527,96.73383283,7511,R,,10,12,,
+30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,6.802558774,2.995081605,76.3675837,1761,R,10,9,12,,
+30003,202003,100,6492,7,3.686541738,,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
+30004,202001,100,64,81,,0.030288689,,0.030288689,,1.598925527,96.73383283,64,R,,10,12,,
+30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,6.802558774,2.995081605,76.3675837,2113,R,10,9,12,,
+30004,202003,100,185,81,0.087553242,,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
+30005,202001,100,844,5,,0.941234172,,0.941234172,,1.598925527,96.73383283,844,R,,10,12,,
+30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,6.802558774,2.995081605,76.3675837,897,R,10,9,12,,
+30005,202003,100,280,5,0.312578027,,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
+30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.598925527,96.73383283,1869,R,,10,12,,
+30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,6.802558774,2.995081605,76.3675837,1876,R,10,9,12,,
+30006,202003,100,1371,14,0.730770871,,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
+30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.598925527,96.73383283,12769,R,,10,12,,
+30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,6.802558774,2.995081605,76.3675837,2853,R,10,9,12,,
+30007,202003,100,11491,12,4.027888195,,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
+30008,202001,100,141,162,,0.023463069,,,,1.598925527,96.73383283,141,R,,10,12,,TRUE
+30008,202002,100,6001,162,42.62017045,13.86213906,,,6.802558774,2.995081605,76.3675837,6001,R,10,9,12,TRUE,TRUE
+30008,202003,100,433,162,0.072138939,,,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
+30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.598925527,96.73383283,6417,R,,10,12,,
+30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,6.802558774,2.995081605,76.3675837,4037,R,10,9,12,,
+30009,202003,100,1322,26,0.327462695,,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
+30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.598925527,96.73383283,28963,R,,10,12,,
+30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,6.802558774,2.995081605,76.3675837,21734,R,10,9,12,,
+30010,202003,100,10529,144,0.484426733,,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
+30011,202001,100,6009,5,,5.249464902,,,,1.598925527,96.73383283,6009,R,,10,12,,TRUE
+30011,202002,100,1145,5,0.190495606,0.226047443,,,6.802558774,2.995081605,76.3675837,1145,R,10,9,12,TRUE,TRUE
+30011,202003,100,5064,5,4.423850085,,,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
+30012,202001,100,256,275,,0.034032235,,0.034032235,,1.598925527,96.73383283,256,R,,10,12,,
+30012,202002,100,7522,275,29.38390625,,29.38390625,,6.802558774,2.995081605,76.3675837,7522,R,10,9,12,,
+30012,202003,100,,275,,,,,1.172391173,,76.13443331,8818.726403,FIR,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_input.csv
index 5b064cf1..0a441050 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-30001,202001,100,8444,51,0.1,0.1
-30001,202002,100,7476,51,0.1,0.1
-30001,202003,100,2003,51,0.1,0.1
-30002,202001,100,9343,72,0.1,0.1
-30002,202002,100,7818,72,0.1,0.1
-30002,202003,100,4897,72,0.1,0.1
-30003,202001,100,7511,7,0.1,0.1
-30003,202002,100,1761,7,0.1,0.1
-30003,202003,100,6492,7,0.1,0.1
-30004,202001,100,64,81,0.1,0.1
-30004,202002,100,2113,81,0.1,0.1
-30004,202003,100,185,81,0.1,0.1
-30005,202001,100,844,5,0.1,0.1
-30005,202002,100,897,5,0.1,0.1
-30005,202003,100,280,5,0.1,0.1
-30006,202001,100,1869,14,0.1,0.1
-30006,202002,100,1876,14,0.1,0.1
-30006,202003,100,1371,14,0.1,0.1
-30007,202001,100,12769,12,0.1,0.1
-30007,202002,100,2853,12,0.1,0.1
-30007,202003,100,11491,12,0.1,0.1
-30008,202001,100,141,162,0.1,0.1
-30008,202002,100,6001,162,0.1,0.1
-30008,202003,100,433,162,0.1,0.1
-30009,202001,100,6417,26,0.1,0.1
-30009,202002,100,4037,26,0.1,0.1
-30009,202003,100,1322,26,0.1,0.1
-30010,202001,100,28963,144,0.1,0.1
-30010,202002,100,21734,144,0.1,0.1
-30010,202003,100,10529,144,0.1,0.1
-30011,202001,100,6009,5,0.1,0.1
-30011,202002,100,1145,5,0.1,0.1
-30011,202003,100,5064,5,0.1,0.1
-30012,202001,100,,275,0.1,0.1
-30012,202002,100,,275,0.1,0.1
-30012,202003,100,7522,275,0.1,0.1
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,10529,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30011,202003,100,5064,5
+30012,202001,100,,275
+30012,202002,100,,275
+30012,202003,100,7522,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index b2e4df64..ff10d6ea 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.772802559,142.2694301,8444,R,,9,11,,
-30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.67357513,7476,R,9,9,11,,
-30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.172391173,,60.40866511,2003,R,9,,12,,
-30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.772802559,142.2694301,9343,R,,9,11,,
-30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.67357513,7818,R,9,9,11,,
-30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.172391173,,60.40866511,4897,R,9,,12,,
-30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.772802559,142.2694301,7511,R,,9,11,,
-30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.67357513,1761,R,9,9,11,,
-30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.172391173,,60.40866511,6492,R,9,,12,,
-30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.772802559,142.2694301,64,R,,9,11,,
-30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.67357513,2113,R,9,9,11,,
-30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.172391173,,60.40866511,185,R,9,,12,,
-30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.772802559,142.2694301,844,R,,9,11,,
-30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.67357513,897,R,9,9,11,,
-30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.172391173,,60.40866511,280,R,9,,12,,
-30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.772802559,142.2694301,1869,R,,9,11,,
-30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.67357513,1876,R,9,9,11,,
-30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.172391173,,60.40866511,1371,R,9,,12,,
-30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.772802559,142.2694301,12769,R,,9,11,,
-30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.67357513,2853,R,9,9,11,,
-30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.172391173,,60.40866511,11491,R,9,,12,,
-30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.772802559,142.2694301,141,R,,9,11,,TRUE
-30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,,4.293520165,2.995081605,99.67357513,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,433,162,0.1,0.1,0.072138939,,,,1.172391173,,60.40866511,433,R,9,,12,TRUE,
-30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.772802559,142.2694301,6417,R,,9,11,,
-30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.67357513,4037,R,9,9,11,,
-30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.172391173,,60.40866511,1322,R,9,,12,,
-30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.772802559,142.2694301,28963,R,,9,11,,
-30010,202002,100,21734,144,0.1,0.1,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.67357513,21734,R,9,9,11,,
-30010,202003,100,10529,144,0.1,0.1,0.484426733,,0.484426733,,1.172391173,,60.40866511,10529,R,9,,12,,
-30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.772802559,142.2694301,6009,R,,9,11,,TRUE
-30011,202002,100,1145,5,0.1,0.1,0.190495606,0.226047443,,,4.293520165,2.995081605,99.67357513,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5064,5,0.1,0.1,4.423850085,,,,1.172391173,,60.40866511,5064,R,9,,12,TRUE,
-30012,202001,100,,275,0.1,0.1,,,,,,1.772802559,142.2694301,46826.14142,BI,,9,11,,
-30012,202002,100,,275,0.1,0.1,,,,,4.293520165,2.995081605,99.67357513,26413.62467,BI,9,9,11,,
-30012,202003,100,7522,275,0.1,0.1,,,,,1.172391173,,60.40866511,8819,R,9,,12,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.772802559,142.2694301,8444,R,,9,11,,
+30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.67357513,7476,R,9,9,11,,
+30001,202003,100,2003,51,0.267924024,,0.267924024,,1.172391173,,60.40866511,2003,R,9,,12,,
+30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.772802559,142.2694301,9343,R,,9,11,,
+30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.67357513,7818,R,9,9,11,,
+30002,202003,100,4897,72,0.626375032,,0.626375032,,1.172391173,,60.40866511,4897,R,9,,12,,
+30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.772802559,142.2694301,7511,R,,9,11,,
+30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.67357513,1761,R,9,9,11,,
+30003,202003,100,6492,7,3.686541738,,3.686541738,,1.172391173,,60.40866511,6492,R,9,,12,,
+30004,202001,100,64,81,,0.030288689,,0.030288689,,1.772802559,142.2694301,64,R,,9,11,,
+30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.67357513,2113,R,9,9,11,,
+30004,202003,100,185,81,0.087553242,,0.087553242,,1.172391173,,60.40866511,185,R,9,,12,,
+30005,202001,100,844,5,,0.941234172,,0.941234172,,1.772802559,142.2694301,844,R,,9,11,,
+30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.67357513,897,R,9,9,11,,
+30005,202003,100,280,5,0.312578027,,0.312578027,,1.172391173,,60.40866511,280,R,9,,12,,
+30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.772802559,142.2694301,1869,R,,9,11,,
+30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.67357513,1876,R,9,9,11,,
+30006,202003,100,1371,14,0.730770871,,0.730770871,,1.172391173,,60.40866511,1371,R,9,,12,,
+30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.772802559,142.2694301,12769,R,,9,11,,
+30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.67357513,2853,R,9,9,11,,
+30007,202003,100,11491,12,4.027888195,,4.027888195,,1.172391173,,60.40866511,11491,R,9,,12,,
+30008,202001,100,141,162,,0.023463069,,,,1.772802559,142.2694301,141,R,,9,11,,TRUE
+30008,202002,100,6001,162,42.62017045,13.86213906,,,4.293520165,2.995081605,99.67357513,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,433,162,0.072138939,,,,1.172391173,,60.40866511,433,R,9,,12,TRUE,
+30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.772802559,142.2694301,6417,R,,9,11,,
+30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.67357513,4037,R,9,9,11,,
+30009,202003,100,1322,26,0.327462695,,0.327462695,,1.172391173,,60.40866511,1322,R,9,,12,,
+30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.772802559,142.2694301,28963,R,,9,11,,
+30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.67357513,21734,R,9,9,11,,
+30010,202003,100,10529,144,0.484426733,,0.484426733,,1.172391173,,60.40866511,10529,R,9,,12,,
+30011,202001,100,6009,5,,5.249464902,,,,1.772802559,142.2694301,6009,R,,9,11,,TRUE
+30011,202002,100,1145,5,0.190495606,0.226047443,,,4.293520165,2.995081605,99.67357513,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5064,5,4.423850085,,,,1.172391173,,60.40866511,5064,R,9,,12,TRUE,
+30012,202001,100,,275,,,,,,1.772802559,142.2694301,46826.14142,BI,,9,11,,
+30012,202002,100,,275,,,,,4.293520165,2.995081605,99.67357513,26413.62467,BI,9,9,11,,
+30012,202003,100,7522,275,,,,,1.172391173,,60.40866511,8819,R,9,,12,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_input.csv
index 112cc560..7146dee2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,,,,,,,,
-30001,202001,100,8444,51,0.1,0.1,,,,,,,,
-30001,202002,100,7476,51,0.1,0.1,,,,,,,,
-30001,202003,100,2003,51,0.1,0.1,,,,,,,,
-30002,202001,100,9343,72,0.1,0.1,,,,,,,,
-30002,202002,100,7818,72,0.1,0.1,,,,,,,,
-30002,202003,100,4897,72,0.1,0.1,,,,,,,,
-30003,202001,100,7511,7,0.1,0.1,,,,,,,,
-30003,202002,100,1761,7,0.1,0.1,,,,,,,,
-30003,202003,100,6492,7,0.1,0.1,,,,,,,,
-30004,202001,100,64,81,0.1,0.1,,,,,,,,
-30004,202002,100,2113,81,0.1,0.1,,,,,,,,
-30004,202003,100,185,81,0.1,0.1,,,,,,,,
-30005,202001,100,844,5,0.1,0.1,,,,,,,,
-30005,202002,100,897,5,0.1,0.1,,,,,,,,
-30005,202003,100,280,5,0.1,0.1,,,,,,,,
-30006,202001,100,1869,14,0.1,0.1,,,,,,,,
-30006,202002,100,1876,14,0.1,0.1,,,,,,,,
-30006,202003,100,1371,14,0.1,0.1,,,,,,,,
-30007,202001,100,12769,12,0.1,0.1,,,,,,,,
-30007,202002,100,2853,12,0.1,0.1,,,,,,,,
-30007,202003,100,11491,12,0.1,0.1,,,,,,,,
-30008,202001,100,141,162,0.1,0.1,,,,,,,,
-30008,202002,100,6001,162,0.1,0.1,,,,,,,,
-30008,202003,100,433,162,0.1,0.1,,,,,,,,
-30009,202001,100,6417,26,0.1,0.1,,,,,,,,
-30009,202002,100,4037,26,0.1,0.1,,,,,,,,
-30009,202003,100,1322,26,0.1,0.1,,,,,,,,
-30010,202001,100,28963,144,0.1,0.1,,,,,,,,
-30010,202002,100,21734,144,0.1,0.1,,,,,,,,
-30010,202003,100,10529,144,0.1,0.1,,,,,,,,
-30011,202001,100,6009,5,0.1,0.1,,,,,,,,
-30011,202002,100,1145,5,0.1,0.1,,,,,,,,
-30011,202003,100,5064,5,0.1,0.1,,,,,,,,
-30012,202001,100,,275,0.1,0.1,,,,,,,,
-30012,202002,100,,275,0.1,0.1,,,,,,,,
-30012,202003,100,,275,0.1,0.1,,,,,,,,
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,10529,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30011,202003,100,5064,5
+30012,202001,100,,275
+30012,202002,100,,275
+30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index ced07828..9d1d12f4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.772802559,142.3186593,8444,R,,9,11,,
-30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,7476,R,9,9,11,,
-30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
-30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.772802559,142.3186593,9343,R,,9,11,,
-30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,7818,R,9,9,11,,
-30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
-30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.772802559,142.3186593,7511,R,,9,11,,
-30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,1761,R,9,9,11,,
-30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
-30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.772802559,142.3186593,64,R,,9,11,,
-30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2113,R,9,9,11,,
-30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
-30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.772802559,142.3186593,844,R,,9,11,,
-30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,897,R,9,9,11,,
-30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
-30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.772802559,142.3186593,1869,R,,9,11,,
-30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,1876,R,9,9,11,,
-30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
-30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.772802559,142.3186593,12769,R,,9,11,,
-30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2853,R,9,9,11,,
-30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
-30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.772802559,142.3186593,141,R,,9,11,,TRUE
-30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,,4.293520165,2.995081605,99.70786109,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,433,162,0.1,0.1,0.072138939,,,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
-30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.772802559,142.3186593,6417,R,,9,11,,
-30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,4037,R,9,9,11,,
-30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
-30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.772802559,142.3186593,28963,R,,9,11,,
-30010,202002,100,21734,144,0.1,0.1,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,21734,R,9,9,11,,
-30010,202003,100,10529,144,0.1,0.1,0.484426733,,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
-30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.772802559,142.3186593,6009,R,,9,11,,TRUE
-30011,202002,100,1145,5,0.1,0.1,0.190495606,0.226047443,,,4.293520165,2.995081605,99.70786109,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5064,5,0.1,0.1,4.423850085,,,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
-30012,202001,100,,275,0.1,0.1,,,,,,1.772802559,142.3186593,39195,C,,9,11,,
-30012,202002,100,,275,0.1,0.1,,,,,4.293520165,2.995081605,99.70786109,168283,FIC,9,9,11,,
-30012,202003,100,,275,0.1,0.1,,,,,1.172391173,,76.13443331,197293,FIC,9,,11,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.772802559,142.3186593,8444,R,,9,11,,
+30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,7476,R,9,9,11,,
+30001,202003,100,2003,51,0.267924024,,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
+30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.772802559,142.3186593,9343,R,,9,11,,
+30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,7818,R,9,9,11,,
+30002,202003,100,4897,72,0.626375032,,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
+30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.772802559,142.3186593,7511,R,,9,11,,
+30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,1761,R,9,9,11,,
+30003,202003,100,6492,7,3.686541738,,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
+30004,202001,100,64,81,,0.030288689,,0.030288689,,1.772802559,142.3186593,64,R,,9,11,,
+30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2113,R,9,9,11,,
+30004,202003,100,185,81,0.087553242,,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
+30005,202001,100,844,5,,0.941234172,,0.941234172,,1.772802559,142.3186593,844,R,,9,11,,
+30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,897,R,9,9,11,,
+30005,202003,100,280,5,0.312578027,,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
+30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.772802559,142.3186593,1869,R,,9,11,,
+30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,1876,R,9,9,11,,
+30006,202003,100,1371,14,0.730770871,,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
+30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.772802559,142.3186593,12769,R,,9,11,,
+30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2853,R,9,9,11,,
+30007,202003,100,11491,12,4.027888195,,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
+30008,202001,100,141,162,,0.023463069,,,,1.772802559,142.3186593,141,R,,9,11,,TRUE
+30008,202002,100,6001,162,42.62017045,13.86213906,,,4.293520165,2.995081605,99.70786109,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,433,162,0.072138939,,,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
+30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.772802559,142.3186593,6417,R,,9,11,,
+30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,4037,R,9,9,11,,
+30009,202003,100,1322,26,0.327462695,,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
+30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.772802559,142.3186593,28963,R,,9,11,,
+30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,21734,R,9,9,11,,
+30010,202003,100,10529,144,0.484426733,,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
+30011,202001,100,6009,5,,5.249464902,,,,1.772802559,142.3186593,6009,R,,9,11,,TRUE
+30011,202002,100,1145,5,0.190495606,0.226047443,,,4.293520165,2.995081605,99.70786109,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5064,5,4.423850085,,,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
+30012,202001,100,,275,,,,,,1.772802559,142.3186593,39195,C,,9,11,,
+30012,202002,100,,275,,,,,4.293520165,2.995081605,99.70786109,168283,FIC,9,9,11,,
+30012,202003,100,,275,,,,,1.172391173,,76.13443331,197293,FIC,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_input.csv
index 9d4ea3c1..5d0a69d4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-30001,202001,100,8444,51,,0.1
-30001,202002,100,7476,51,,0.1
-30001,202003,100,2003,51,,0.1
-30002,202001,100,9343,72,,0.1
-30002,202002,100,7818,72,,0.1
-30002,202003,100,4897,72,,0.1
-30003,202001,100,7511,7,,0.1
-30003,202002,100,1761,7,,0.1
-30003,202003,100,6492,7,,0.1
-30004,202001,100,64,81,,0.1
-30004,202002,100,2113,81,,0.1
-30004,202003,100,185,81,,0.1
-30005,202001,100,844,5,,0.1
-30005,202002,100,897,5,,0.1
-30005,202003,100,280,5,,0.1
-30006,202001,100,1869,14,,0.1
-30006,202002,100,1876,14,,0.1
-30006,202003,100,1371,14,,0.1
-30007,202001,100,12769,12,,0.1
-30007,202002,100,2853,12,,0.1
-30007,202003,100,11491,12,,0.1
-30008,202001,100,141,162,,0.1
-30008,202002,100,6001,162,,0.1
-30008,202003,100,433,162,,0.1
-30009,202001,100,6417,26,,0.1
-30009,202002,100,4037,26,,0.1
-30009,202003,100,1322,26,,0.1
-30010,202001,100,28963,144,,0.1
-30010,202002,100,21734,144,,0.1
-30010,202003,100,10529,144,,0.1
-30011,202001,100,6009,5,,0.1
-30011,202002,100,1145,5,,0.1
-30011,202003,100,5064,5,,0.1
-30012,202001,100,256,275,,0.1
-30012,202002,100,7522,275,,0.1
-30012,202003,100,,275,,0.1
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,10529,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30011,202003,100,5064,5
+30012,202001,100,256,275
+30012,202002,100,7522,275
+30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index 6ffb0bee..5da3d0f4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-30001,202001,100,8444,51,,0.1,,1.129481006,,1.129481006,,1.455701667,96.73383283,8444,R,,11,12,,
-30001,202002,100,7476,51,,0.1,0.885362387,3.732401398,0.885362387,3.732401398,6.201462122,2.718178189,76.3675837,7476,R,11,10,12,,
-30001,202003,100,2003,51,,0.1,0.267924024,,0.267924024,,1.06236595,,76.13443331,2003,R,10,,11,,
-30002,202001,100,9343,72,,0.1,,1.195062676,,1.195062676,,1.455701667,96.73383283,9343,R,,11,12,,
-30002,202002,100,7818,72,,0.1,0.836776196,1.596487645,0.836776196,1.596487645,6.201462122,2.718178189,76.3675837,7818,R,11,10,12,,
-30002,202003,100,4897,72,,0.1,0.626375032,,0.626375032,,1.06236595,,76.13443331,4897,R,10,,11,,
-30003,202001,100,7511,7,,0.1,,4.265190233,,4.265190233,,1.455701667,96.73383283,7511,R,,11,12,,
-30003,202002,100,1761,7,,0.1,0.234456131,0.271256932,0.234456131,0.271256932,6.201462122,2.718178189,76.3675837,1761,R,11,10,12,,
-30003,202003,100,6492,7,,0.1,3.686541738,,3.686541738,,1.06236595,,76.13443331,6492,R,10,,11,,
-30004,202001,100,64,81,,0.1,,0.030288689,,0.030288689,,1.455701667,96.73383283,64,R,,11,12,,
-30004,202002,100,2113,81,,0.1,33.015625,11.42162162,33.015625,11.42162162,6.201462122,2.718178189,76.3675837,2113,R,11,10,12,,
-30004,202003,100,185,81,,0.1,0.087553242,,0.087553242,,1.06236595,,76.13443331,185,R,10,,11,,
-30005,202001,100,844,5,,0.1,,0.941234172,,0.941234172,,1.455701667,96.73383283,844,R,,11,12,,
-30005,202002,100,897,5,,0.1,1.062434865,3.199201198,1.062434865,3.199201198,6.201462122,2.718178189,76.3675837,897,R,11,10,12,,
-30005,202003,100,280,5,,0.1,0.312578027,,0.312578027,,1.06236595,,76.13443331,280,R,10,,11,,
-30006,202001,100,1869,14,,0.1,,0.995885563,,0.995885563,,1.455701667,96.73383283,1869,R,,11,12,,
-30006,202002,100,1876,14,,0.1,1.004131435,1.368417982,1.004131435,1.368417982,6.201462122,2.718178189,76.3675837,1876,R,11,10,12,,
-30006,202003,100,1371,14,,0.1,0.730770871,,0.730770871,,1.06236595,,76.13443331,1371,R,10,,11,,
-30007,202001,100,12769,12,,0.1,,4.475816911,,4.475816911,,1.455701667,96.73383283,12769,R,,11,12,,
-30007,202002,100,2853,12,,0.1,0.223422901,0.248269056,0.223422901,0.248269056,6.201462122,2.718178189,76.3675837,2853,R,11,10,12,,
-30007,202003,100,11491,12,,0.1,4.027888195,,4.027888195,,1.06236595,,76.13443331,11491,R,10,,11,,
-30008,202001,100,141,162,,0.1,,0.023463069,,0.023463069,,1.455701667,96.73383283,141,R,,11,12,,
-30008,202002,100,6001,162,,0.1,42.62017045,13.86213906,,,6.201462122,2.718178189,76.3675837,6001,R,11,10,12,TRUE,TRUE
-30008,202003,100,433,162,,0.1,0.072138939,,0.072138939,,1.06236595,,76.13443331,433,R,10,,11,,
-30009,202001,100,6417,26,,0.1,,1.589639934,,1.589639934,,1.455701667,96.73383283,6417,R,,11,12,,
-30009,202002,100,4037,26,,0.1,0.629073275,3.053782962,0.629073275,3.053782962,6.201462122,2.718178189,76.3675837,4037,R,11,10,12,,
-30009,202003,100,1322,26,,0.1,0.327462695,,0.327462695,,1.06236595,,76.13443331,1322,R,10,,11,,
-30010,202001,100,28963,144,,0.1,,1.332623847,,1.332623847,,1.455701667,96.73383283,28963,R,,11,12,,
-30010,202002,100,21734,144,,0.1,0.750399298,2.064295653,0.750399298,2.064295653,6.201462122,2.718178189,76.3675837,21734,R,11,10,12,,
-30010,202003,100,10529,144,,0.1,0.484426733,,0.484426733,,1.06236595,,76.13443331,10529,R,10,,11,,
-30011,202001,100,6009,5,,0.1,,5.249464902,,,,1.455701667,96.73383283,6009,R,,11,12,,TRUE
-30011,202002,100,1145,5,,0.1,0.190495606,0.226047443,0.190495606,0.226047443,6.201462122,2.718178189,76.3675837,1145,R,11,10,12,,
-30011,202003,100,5064,5,,0.1,4.423850085,,,,1.06236595,,76.13443331,5064,R,10,,11,TRUE,
-30012,202001,100,256,275,,0.1,,0.034032235,,0.034032235,,1.455701667,96.73383283,256,R,,11,12,,
-30012,202002,100,7522,275,,0.1,29.38390625,,29.38390625,,6.201462122,2.718178189,76.3675837,7522,R,11,10,12,,
-30012,202003,100,,275,,0.1,,,,,1.06236595,,76.13443331,7991.116673,FIR,10,,11,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.455701667,96.73383283,8444,R,,11,12,,
+30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,6.201462122,2.718178189,76.3675837,7476,R,11,10,12,,
+30001,202003,100,2003,51,0.267924024,,0.267924024,,1.06236595,,76.13443331,2003,R,10,,11,,
+30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.455701667,96.73383283,9343,R,,11,12,,
+30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,6.201462122,2.718178189,76.3675837,7818,R,11,10,12,,
+30002,202003,100,4897,72,0.626375032,,0.626375032,,1.06236595,,76.13443331,4897,R,10,,11,,
+30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.455701667,96.73383283,7511,R,,11,12,,
+30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,6.201462122,2.718178189,76.3675837,1761,R,11,10,12,,
+30003,202003,100,6492,7,3.686541738,,3.686541738,,1.06236595,,76.13443331,6492,R,10,,11,,
+30004,202001,100,64,81,,0.030288689,,0.030288689,,1.455701667,96.73383283,64,R,,11,12,,
+30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,6.201462122,2.718178189,76.3675837,2113,R,11,10,12,,
+30004,202003,100,185,81,0.087553242,,0.087553242,,1.06236595,,76.13443331,185,R,10,,11,,
+30005,202001,100,844,5,,0.941234172,,0.941234172,,1.455701667,96.73383283,844,R,,11,12,,
+30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,6.201462122,2.718178189,76.3675837,897,R,11,10,12,,
+30005,202003,100,280,5,0.312578027,,0.312578027,,1.06236595,,76.13443331,280,R,10,,11,,
+30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.455701667,96.73383283,1869,R,,11,12,,
+30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,6.201462122,2.718178189,76.3675837,1876,R,11,10,12,,
+30006,202003,100,1371,14,0.730770871,,0.730770871,,1.06236595,,76.13443331,1371,R,10,,11,,
+30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.455701667,96.73383283,12769,R,,11,12,,
+30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,6.201462122,2.718178189,76.3675837,2853,R,11,10,12,,
+30007,202003,100,11491,12,4.027888195,,4.027888195,,1.06236595,,76.13443331,11491,R,10,,11,,
+30008,202001,100,141,162,,0.023463069,,0.023463069,,1.455701667,96.73383283,141,R,,11,12,,
+30008,202002,100,6001,162,42.62017045,13.86213906,,,6.201462122,2.718178189,76.3675837,6001,R,11,10,12,TRUE,TRUE
+30008,202003,100,433,162,0.072138939,,0.072138939,,1.06236595,,76.13443331,433,R,10,,11,,
+30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.455701667,96.73383283,6417,R,,11,12,,
+30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,6.201462122,2.718178189,76.3675837,4037,R,11,10,12,,
+30009,202003,100,1322,26,0.327462695,,0.327462695,,1.06236595,,76.13443331,1322,R,10,,11,,
+30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.455701667,96.73383283,28963,R,,11,12,,
+30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,6.201462122,2.718178189,76.3675837,21734,R,11,10,12,,
+30010,202003,100,10529,144,0.484426733,,0.484426733,,1.06236595,,76.13443331,10529,R,10,,11,,
+30011,202001,100,6009,5,,5.249464902,,,,1.455701667,96.73383283,6009,R,,11,12,,TRUE
+30011,202002,100,1145,5,0.190495606,0.226047443,0.190495606,0.226047443,6.201462122,2.718178189,76.3675837,1145,R,11,10,12,,
+30011,202003,100,5064,5,4.423850085,,,,1.06236595,,76.13443331,5064,R,10,,11,TRUE,
+30012,202001,100,256,275,,0.034032235,,0.034032235,,1.455701667,96.73383283,256,R,,11,12,,
+30012,202002,100,7522,275,29.38390625,,29.38390625,,6.201462122,2.718178189,76.3675837,7522,R,11,10,12,,
+30012,202003,100,,275,,,,,1.06236595,,76.13443331,7991.116673,FIR,10,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_input.csv
index 15a2e4ce..5d0a69d4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-30001,202001,100,8444,51,0.1,
-30001,202002,100,7476,51,0.1,
-30001,202003,100,2003,51,0.1,
-30002,202001,100,9343,72,0.1,
-30002,202002,100,7818,72,0.1,
-30002,202003,100,4897,72,0.1,
-30003,202001,100,7511,7,0.1,
-30003,202002,100,1761,7,0.1,
-30003,202003,100,6492,7,0.1,
-30004,202001,100,64,81,0.1,
-30004,202002,100,2113,81,0.1,
-30004,202003,100,185,81,0.1,
-30005,202001,100,844,5,0.1,
-30005,202002,100,897,5,0.1,
-30005,202003,100,280,5,0.1,
-30006,202001,100,1869,14,0.1,
-30006,202002,100,1876,14,0.1,
-30006,202003,100,1371,14,0.1,
-30007,202001,100,12769,12,0.1,
-30007,202002,100,2853,12,0.1,
-30007,202003,100,11491,12,0.1,
-30008,202001,100,141,162,0.1,
-30008,202002,100,6001,162,0.1,
-30008,202003,100,433,162,0.1,
-30009,202001,100,6417,26,0.1,
-30009,202002,100,4037,26,0.1,
-30009,202003,100,1322,26,0.1,
-30010,202001,100,28963,144,0.1,
-30010,202002,100,21734,144,0.1,
-30010,202003,100,10529,144,0.1,
-30011,202001,100,6009,5,0.1,
-30011,202002,100,1145,5,0.1,
-30011,202003,100,5064,5,0.1,
-30012,202001,100,256,275,0.1,
-30012,202002,100,7522,275,0.1,
-30012,202003,100,,275,0.1,
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,10529,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30011,202003,100,5064,5
+30012,202001,100,256,275
+30012,202002,100,7522,275
+30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index e6d4fee5..ca02b876 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-30001,202001,100,8444,51,0.1,,,1.129481006,,1.129481006,,1.930792743,96.75644028,8444,R,,11,12,,
-30001,202002,100,7476,51,0.1,,0.885362387,3.732401398,0.885362387,3.732401398,10.05870529,4.081787351,76.3852459,7476,R,11,10,12,,
-30001,202003,100,2003,51,0.1,,0.267924024,,0.267924024,,1.497537064,,76.10880829,2003,R,10,,11,,
-30002,202001,100,9343,72,0.1,,,1.195062676,,1.195062676,,1.930792743,96.75644028,9343,R,,11,12,,
-30002,202002,100,7818,72,0.1,,0.836776196,1.596487645,0.836776196,1.596487645,10.05870529,4.081787351,76.3852459,7818,R,11,10,12,,
-30002,202003,100,4897,72,0.1,,0.626375032,,0.626375032,,1.497537064,,76.10880829,4897,R,10,,11,,
-30003,202001,100,7511,7,0.1,,,4.265190233,,4.265190233,,1.930792743,96.75644028,7511,R,,11,12,,
-30003,202002,100,1761,7,0.1,,0.234456131,0.271256932,0.234456131,0.271256932,10.05870529,4.081787351,76.3852459,1761,R,11,10,12,,
-30003,202003,100,6492,7,0.1,,3.686541738,,3.686541738,,1.497537064,,76.10880829,6492,R,10,,11,,
-30004,202001,100,64,81,0.1,,,0.030288689,,0.030288689,,1.930792743,96.75644028,64,R,,11,12,,
-30004,202002,100,2113,81,0.1,,33.015625,11.42162162,33.015625,11.42162162,10.05870529,4.081787351,76.3852459,2113,R,11,10,12,,
-30004,202003,100,185,81,0.1,,0.087553242,,0.087553242,,1.497537064,,76.10880829,185,R,10,,11,,
-30005,202001,100,844,5,0.1,,,0.941234172,,0.941234172,,1.930792743,96.75644028,844,R,,11,12,,
-30005,202002,100,897,5,0.1,,1.062434865,3.199201198,1.062434865,3.199201198,10.05870529,4.081787351,76.3852459,897,R,11,10,12,,
-30005,202003,100,280,5,0.1,,0.312578027,,0.312578027,,1.497537064,,76.10880829,280,R,10,,11,,
-30006,202001,100,1869,14,0.1,,,0.995885563,,0.995885563,,1.930792743,96.75644028,1869,R,,11,12,,
-30006,202002,100,1876,14,0.1,,1.004131435,1.368417982,1.004131435,1.368417982,10.05870529,4.081787351,76.3852459,1876,R,11,10,12,,
-30006,202003,100,1371,14,0.1,,0.730770871,,0.730770871,,1.497537064,,76.10880829,1371,R,10,,11,,
-30007,202001,100,12769,12,0.1,,,4.475816911,,4.475816911,,1.930792743,96.75644028,12769,R,,11,12,,
-30007,202002,100,2853,12,0.1,,0.223422901,0.248269056,0.223422901,0.248269056,10.05870529,4.081787351,76.3852459,2853,R,11,10,12,,
-30007,202003,100,11491,12,0.1,,4.027888195,,4.027888195,,1.497537064,,76.10880829,11491,R,10,,11,,
-30008,202001,100,141,162,0.1,,,0.023463069,,,,1.930792743,96.75644028,141,R,,11,12,,TRUE
-30008,202002,100,6001,162,0.1,,42.62017045,13.86213906,42.62017045,13.86213906,10.05870529,4.081787351,76.3852459,6001,R,11,10,12,,
-30008,202003,100,433,162,0.1,,0.072138939,,,,1.497537064,,76.10880829,433,R,10,,11,TRUE,
-30009,202001,100,6417,26,0.1,,,1.589639934,,1.589639934,,1.930792743,96.75644028,6417,R,,11,12,,
-30009,202002,100,4037,26,0.1,,0.629073275,3.053782962,0.629073275,3.053782962,10.05870529,4.081787351,76.3852459,4037,R,11,10,12,,
-30009,202003,100,1322,26,0.1,,0.327462695,,0.327462695,,1.497537064,,76.10880829,1322,R,10,,11,,
-30010,202001,100,28963,144,0.1,,,1.332623847,,1.332623847,,1.930792743,96.75644028,28963,R,,11,12,,
-30010,202002,100,21734,144,0.1,,0.750399298,2.064295653,0.750399298,2.064295653,10.05870529,4.081787351,76.3852459,21734,R,11,10,12,,
-30010,202003,100,10529,144,0.1,,0.484426733,,0.484426733,,1.497537064,,76.10880829,10529,R,10,,11,,
-30011,202001,100,6009,5,0.1,,,5.249464902,,5.249464902,,1.930792743,96.75644028,6009,R,,11,12,,
-30011,202002,100,1145,5,0.1,,0.190495606,0.226047443,,,10.05870529,4.081787351,76.3852459,1145,R,11,10,12,TRUE,TRUE
-30011,202003,100,5064,5,0.1,,4.423850085,,4.423850085,,1.497537064,,76.10880829,5064,R,10,,11,,
-30012,202001,100,256,275,0.1,,,0.034032235,,0.034032235,,1.930792743,96.75644028,256,R,,11,12,,
-30012,202002,100,7522,275,0.1,,29.38390625,,29.38390625,,10.05870529,4.081787351,76.3852459,7522,R,11,10,12,,
-30012,202003,100,,275,0.1,,,,,,1.497537064,,76.10880829,11264.4738,FIR,10,,11,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.930792743,96.75644028,8444,R,,11,12,,
+30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,10.05870529,4.081787351,76.3852459,7476,R,11,10,12,,
+30001,202003,100,2003,51,0.267924024,,0.267924024,,1.497537064,,76.10880829,2003,R,10,,11,,
+30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.930792743,96.75644028,9343,R,,11,12,,
+30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,10.05870529,4.081787351,76.3852459,7818,R,11,10,12,,
+30002,202003,100,4897,72,0.626375032,,0.626375032,,1.497537064,,76.10880829,4897,R,10,,11,,
+30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.930792743,96.75644028,7511,R,,11,12,,
+30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,10.05870529,4.081787351,76.3852459,1761,R,11,10,12,,
+30003,202003,100,6492,7,3.686541738,,3.686541738,,1.497537064,,76.10880829,6492,R,10,,11,,
+30004,202001,100,64,81,,0.030288689,,0.030288689,,1.930792743,96.75644028,64,R,,11,12,,
+30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,10.05870529,4.081787351,76.3852459,2113,R,11,10,12,,
+30004,202003,100,185,81,0.087553242,,0.087553242,,1.497537064,,76.10880829,185,R,10,,11,,
+30005,202001,100,844,5,,0.941234172,,0.941234172,,1.930792743,96.75644028,844,R,,11,12,,
+30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,10.05870529,4.081787351,76.3852459,897,R,11,10,12,,
+30005,202003,100,280,5,0.312578027,,0.312578027,,1.497537064,,76.10880829,280,R,10,,11,,
+30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.930792743,96.75644028,1869,R,,11,12,,
+30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,10.05870529,4.081787351,76.3852459,1876,R,11,10,12,,
+30006,202003,100,1371,14,0.730770871,,0.730770871,,1.497537064,,76.10880829,1371,R,10,,11,,
+30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.930792743,96.75644028,12769,R,,11,12,,
+30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,10.05870529,4.081787351,76.3852459,2853,R,11,10,12,,
+30007,202003,100,11491,12,4.027888195,,4.027888195,,1.497537064,,76.10880829,11491,R,10,,11,,
+30008,202001,100,141,162,,0.023463069,,,,1.930792743,96.75644028,141,R,,11,12,,TRUE
+30008,202002,100,6001,162,42.62017045,13.86213906,42.62017045,13.86213906,10.05870529,4.081787351,76.3852459,6001,R,11,10,12,,
+30008,202003,100,433,162,0.072138939,,,,1.497537064,,76.10880829,433,R,10,,11,TRUE,
+30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.930792743,96.75644028,6417,R,,11,12,,
+30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,10.05870529,4.081787351,76.3852459,4037,R,11,10,12,,
+30009,202003,100,1322,26,0.327462695,,0.327462695,,1.497537064,,76.10880829,1322,R,10,,11,,
+30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.930792743,96.75644028,28963,R,,11,12,,
+30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,10.05870529,4.081787351,76.3852459,21734,R,11,10,12,,
+30010,202003,100,10529,144,0.484426733,,0.484426733,,1.497537064,,76.10880829,10529,R,10,,11,,
+30011,202001,100,6009,5,,5.249464902,,5.249464902,,1.930792743,96.75644028,6009,R,,11,12,,
+30011,202002,100,1145,5,0.190495606,0.226047443,,,10.05870529,4.081787351,76.3852459,1145,R,11,10,12,TRUE,TRUE
+30011,202003,100,5064,5,4.423850085,,4.423850085,,1.497537064,,76.10880829,5064,R,10,,11,,
+30012,202001,100,256,275,,0.034032235,,0.034032235,,1.930792743,96.75644028,256,R,,11,12,,
+30012,202002,100,7522,275,29.38390625,,29.38390625,,10.05870529,4.081787351,76.3852459,7522,R,11,10,12,,
+30012,202003,100,,275,,,,,1.497537064,,76.10880829,11264.4738,FIR,10,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_input.csv
index 71625144..d22fb6aa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_input.csv
@@ -1,31 +1,31 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-30001,202001,100,8444,51,0.1,0.1
-30001,202002,100,7476,51,0.1,0.1
-30001,202003,100,2003,51,0.1,0.1
-30002,202001,100,9343,72,0.1,0.1
-30002,202002,100,7818,72,0.1,0.1
-30002,202003,100,4897,72,0.1,0.1
-30003,202001,100,7511,7,0.1,0.1
-30003,202002,100,1761,7,0.1,0.1
-30003,202003,100,6492,7,0.1,0.1
-30004,202001,100,64,81,0.1,0.1
-30004,202002,100,2113,81,0.1,0.1
-30004,202003,100,185,81,0.1,0.1
-30005,202001,100,844,5,0.1,0.1
-30005,202002,100,897,5,0.1,0.1
-30005,202003,100,280,5,0.1,0.1
-30006,202001,100,1869,14,0.1,0.1
-30006,202002,100,1876,14,0.1,0.1
-30006,202003,100,1371,14,0.1,0.1
-30007,202001,100,12769,12,0.1,0.1
-30007,202002,100,2853,12,0.1,0.1
-30007,202003,100,11491,12,0.1,0.1
-30008,202001,100,141,162,0.1,0.1
-30008,202002,100,6001,162,0.1,0.1
-30008,202003,100,433,162,0.1,0.1
-30009,202001,100,6417,26,0.1,0.1
-30009,202002,100,4037,26,0.1,0.1
-30009,202003,100,1322,26,0.1,0.1
-30010,202001,100,28963,144,0.1,0.1
-30010,202002,100,21734,144,0.1,0.1
-30010,202003,100,,144,0.1,0.1
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,,144
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index 1ed7d48f..9ef86f5f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.59786861,133.0400697,8444,R,,10,10,,
-30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,8.126185194,4.305953095,98.54703833,7476,R,10,9,10,,
-30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.126581418,,66.21860465,2003,R,9,,10,,
-30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.59786861,133.0400697,9343,R,,10,10,,
-30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,8.126185194,4.305953095,98.54703833,7818,R,10,9,10,,
-30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.126581418,,66.21860465,4897,R,9,,10,,
-30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.59786861,133.0400697,7511,R,,10,10,,
-30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,8.126185194,4.305953095,98.54703833,1761,R,10,9,10,,
-30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.126581418,,66.21860465,6492,R,9,,10,,
-30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.59786861,133.0400697,64,R,,10,10,,
-30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,8.126185194,4.305953095,98.54703833,2113,R,10,9,10,,
-30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.126581418,,66.21860465,185,R,9,,10,,
-30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.59786861,133.0400697,844,R,,10,10,,
-30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,8.126185194,4.305953095,98.54703833,897,R,10,9,10,,
-30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.126581418,,66.21860465,280,R,9,,10,,
-30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.59786861,133.0400697,1869,R,,10,10,,
-30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,8.126185194,4.305953095,98.54703833,1876,R,10,9,10,,
-30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.126581418,,66.21860465,1371,R,9,,10,,
-30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.59786861,133.0400697,12769,R,,10,10,,
-30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,8.126185194,4.305953095,98.54703833,2853,R,10,9,10,,
-30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.126581418,,66.21860465,11491,R,9,,10,,
-30008,202001,100,141,162,0.1,0.1,,0.023463069,,0.023463069,,1.59786861,133.0400697,141,R,,10,10,,
-30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,42.62017045,13.86213906,8.126185194,4.305953095,98.54703833,6001,R,10,9,10,,
-30008,202003,100,433,162,0.1,0.1,0.072138939,,0.072138939,,1.126581418,,66.21860465,433,R,9,,10,,
-30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.59786861,133.0400697,6417,R,,10,10,,
-30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,8.126185194,4.305953095,98.54703833,4037,R,10,9,10,,
-30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.126581418,,66.21860465,1322,R,9,,10,,
-30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.59786861,133.0400697,28963,R,,10,10,,
-30010,202002,100,21734,144,0.1,0.1,0.750399298,,0.750399298,,8.126185194,4.305953095,98.54703833,21734,R,10,9,10,,
-30010,202003,100,,144,0.1,0.1,,,,,1.126581418,,66.21860465,24485.12054,FIR,9,,10,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.59786861,133.0400697,8444,R,,10,10
+30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,8.126185194,4.305953095,98.54703833,7476,R,10,9,10
+30001,202003,100,2003,51,0.267924024,,0.267924024,,1.126581418,,66.21860465,2003,R,9,,10
+30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.59786861,133.0400697,9343,R,,10,10
+30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,8.126185194,4.305953095,98.54703833,7818,R,10,9,10
+30002,202003,100,4897,72,0.626375032,,0.626375032,,1.126581418,,66.21860465,4897,R,9,,10
+30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.59786861,133.0400697,7511,R,,10,10
+30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,8.126185194,4.305953095,98.54703833,1761,R,10,9,10
+30003,202003,100,6492,7,3.686541738,,3.686541738,,1.126581418,,66.21860465,6492,R,9,,10
+30004,202001,100,64,81,,0.030288689,,0.030288689,,1.59786861,133.0400697,64,R,,10,10
+30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,8.126185194,4.305953095,98.54703833,2113,R,10,9,10
+30004,202003,100,185,81,0.087553242,,0.087553242,,1.126581418,,66.21860465,185,R,9,,10
+30005,202001,100,844,5,,0.941234172,,0.941234172,,1.59786861,133.0400697,844,R,,10,10
+30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,8.126185194,4.305953095,98.54703833,897,R,10,9,10
+30005,202003,100,280,5,0.312578027,,0.312578027,,1.126581418,,66.21860465,280,R,9,,10
+30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.59786861,133.0400697,1869,R,,10,10
+30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,8.126185194,4.305953095,98.54703833,1876,R,10,9,10
+30006,202003,100,1371,14,0.730770871,,0.730770871,,1.126581418,,66.21860465,1371,R,9,,10
+30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.59786861,133.0400697,12769,R,,10,10
+30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,8.126185194,4.305953095,98.54703833,2853,R,10,9,10
+30007,202003,100,11491,12,4.027888195,,4.027888195,,1.126581418,,66.21860465,11491,R,9,,10
+30008,202001,100,141,162,,0.023463069,,0.023463069,,1.59786861,133.0400697,141,R,,10,10
+30008,202002,100,6001,162,42.62017045,13.86213906,42.62017045,13.86213906,8.126185194,4.305953095,98.54703833,6001,R,10,9,10
+30008,202003,100,433,162,0.072138939,,0.072138939,,1.126581418,,66.21860465,433,R,9,,10
+30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.59786861,133.0400697,6417,R,,10,10
+30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,8.126185194,4.305953095,98.54703833,4037,R,10,9,10
+30009,202003,100,1322,26,0.327462695,,0.327462695,,1.126581418,,66.21860465,1322,R,9,,10
+30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.59786861,133.0400697,28963,R,,10,10
+30010,202002,100,21734,144,0.750399298,,0.750399298,,8.126185194,4.305953095,98.54703833,21734,R,10,9,10
+30010,202003,100,,144,,,,,1.126581418,,66.21860465,24485.12054,FIR,9,,10
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_input.csv
index aa973752..5d0a69d4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,,
-30001,202001,100,8444,51,0.1,0.1,,
-30001,202002,100,7476,51,0.1,0.1,,
-30001,202003,100,2003,51,0.1,0.1,,
-30002,202001,100,9343,72,0.1,0.1,,
-30002,202002,100,7818,72,0.1,0.1,,
-30002,202003,100,4897,72,0.1,0.1,,
-30003,202001,100,7511,7,0.1,0.1,,
-30003,202002,100,1761,7,0.1,0.1,,
-30003,202003,100,6492,7,0.1,0.1,,
-30004,202001,100,64,81,0.1,0.1,,
-30004,202002,100,2113,81,0.1,0.1,,
-30004,202003,100,185,81,0.1,0.1,,
-30005,202001,100,844,5,0.1,0.1,,
-30005,202002,100,897,5,0.1,0.1,,
-30005,202003,100,280,5,0.1,0.1,,
-30006,202001,100,1869,14,0.1,0.1,,
-30006,202002,100,1876,14,0.1,0.1,,
-30006,202003,100,1371,14,0.1,0.1,,
-30007,202001,100,12769,12,0.1,0.1,,
-30007,202002,100,2853,12,0.1,0.1,,
-30007,202003,100,11491,12,0.1,0.1,,
-30008,202001,100,141,162,0.1,0.1,,
-30008,202002,100,6001,162,0.1,0.1,,
-30008,202003,100,433,162,0.1,0.1,,
-30009,202001,100,6417,26,0.1,0.1,,
-30009,202002,100,4037,26,0.1,0.1,,
-30009,202003,100,1322,26,0.1,0.1,,
-30010,202001,100,28963,144,0.1,0.1,,
-30010,202002,100,21734,144,0.1,0.1,,
-30010,202003,100,10529,144,0.1,0.1,,
-30011,202001,100,6009,5,0.1,0.1,,
-30011,202002,100,1145,5,0.1,0.1,,
-30011,202003,100,5064,5,0.1,0.1,,
-30012,202001,100,256,275,0.1,0.1,,
-30012,202002,100,7522,275,0.1,0.1,,
-30012,202003,100,,275,0.1,0.1,,
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,10529,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30011,202003,100,5064,5
+30012,202001,100,256,275
+30012,202002,100,7522,275
+30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
index ac87b6ef..3350b373 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
-30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.773218509,96.73383283,8444,R,,9,12,,,
-30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,3.88999586,1.941764103,81.65588616,7476,R,9,8,11,,,
-30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.307995914,,76.13443331,2003,R,8,,11,,,
-30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.773218509,96.73383283,9343,R,,9,12,,,
-30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,3.88999586,1.941764103,81.65588616,7818,R,9,8,11,,,
-30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.307995914,,76.13443331,4897,R,8,,11,,,
-30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.773218509,96.73383283,7511,R,,9,12,,,
-30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,3.88999586,1.941764103,81.65588616,1761,R,9,8,11,,,
-30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.307995914,,76.13443331,6492,R,8,,11,,,
-30004,202001,100,64,81,0.1,0.1,,,,,,1.773218509,96.73383283,64,R,,9,12,,,
-30004,202002,100,2113,81,0.1,0.1,,,,,3.88999586,1.941764103,81.65588616,2113,R,9,8,11,,,TRUE
-30004,202003,100,185,81,0.1,0.1,,,,,1.307995914,,76.13443331,185,R,8,,11,,,
-30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.773218509,96.73383283,844,R,,9,12,,,
-30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,3.88999586,1.941764103,81.65588616,897,R,9,8,11,,,
-30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.307995914,,76.13443331,280,R,8,,11,,,
-30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.773218509,96.73383283,1869,R,,9,12,,,
-30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,3.88999586,1.941764103,81.65588616,1876,R,9,8,11,,,
-30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.307995914,,76.13443331,1371,R,8,,11,,,
-30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.773218509,96.73383283,12769,R,,9,12,,,
-30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,3.88999586,1.941764103,81.65588616,2853,R,9,8,11,,,
-30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.307995914,,76.13443331,11491,R,8,,11,,,
-30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.773218509,96.73383283,141,R,,9,12,,TRUE,
-30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,,3.88999586,1.941764103,81.65588616,6001,R,9,8,11,TRUE,TRUE,
-30008,202003,100,433,162,0.1,0.1,0.072138939,,,,1.307995914,,76.13443331,433,R,8,,11,TRUE,,
-30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.773218509,96.73383283,6417,R,,9,12,,,
-30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,3.88999586,1.941764103,81.65588616,4037,R,9,8,11,,,
-30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.307995914,,76.13443331,1322,R,8,,11,,,
-30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.773218509,96.73383283,28963,R,,9,12,,,
-30010,202002,100,21734,144,0.1,0.1,0.750399298,2.064295653,0.750399298,2.064295653,3.88999586,1.941764103,81.65588616,21734,R,9,8,11,,,
-30010,202003,100,10529,144,0.1,0.1,0.484426733,,0.484426733,,1.307995914,,76.13443331,10529,R,8,,11,,,
-30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.773218509,96.73383283,6009,R,,9,12,,TRUE,
-30011,202002,100,1145,5,0.1,0.1,0.190495606,0.226047443,,,3.88999586,1.941764103,81.65588616,1145,R,9,8,11,TRUE,TRUE,
-30011,202003,100,5064,5,0.1,0.1,4.423850085,,,,1.307995914,,76.13443331,5064,R,8,,11,TRUE,,
-30012,202001,100,256,275,0.1,0.1,,0.034032235,,0.034032235,,1.773218509,96.73383283,256,R,,9,12,,,
-30012,202002,100,7522,275,0.1,0.1,29.38390625,,29.38390625,,3.88999586,1.941764103,81.65588616,7522,R,9,8,11,,,
-30012,202003,100,,275,0.1,0.1,,,,,1.307995914,,76.13443331,9838.745268,FIR,8,,11,,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.773218509,96.73383283,8444,R,,9,12,,,
+30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,3.88999586,1.941764103,81.65588616,7476,R,9,8,11,,,
+30001,202003,100,2003,51,0.267924024,,0.267924024,,1.307995914,,76.13443331,2003,R,8,,11,,,
+30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.773218509,96.73383283,9343,R,,9,12,,,
+30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,3.88999586,1.941764103,81.65588616,7818,R,9,8,11,,,
+30002,202003,100,4897,72,0.626375032,,0.626375032,,1.307995914,,76.13443331,4897,R,8,,11,,,
+30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.773218509,96.73383283,7511,R,,9,12,,,
+30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,3.88999586,1.941764103,81.65588616,1761,R,9,8,11,,,
+30003,202003,100,6492,7,3.686541738,,3.686541738,,1.307995914,,76.13443331,6492,R,8,,11,,,
+30004,202001,100,64,81,,,,,,1.773218509,96.73383283,64,R,,9,12,,,
+30004,202002,100,2113,81,,,,,3.88999586,1.941764103,81.65588616,2113,R,9,8,11,,,TRUE
+30004,202003,100,185,81,,,,,1.307995914,,76.13443331,185,R,8,,11,,,
+30005,202001,100,844,5,,0.941234172,,0.941234172,,1.773218509,96.73383283,844,R,,9,12,,,
+30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,3.88999586,1.941764103,81.65588616,897,R,9,8,11,,,
+30005,202003,100,280,5,0.312578027,,0.312578027,,1.307995914,,76.13443331,280,R,8,,11,,,
+30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.773218509,96.73383283,1869,R,,9,12,,,
+30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,3.88999586,1.941764103,81.65588616,1876,R,9,8,11,,,
+30006,202003,100,1371,14,0.730770871,,0.730770871,,1.307995914,,76.13443331,1371,R,8,,11,,,
+30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.773218509,96.73383283,12769,R,,9,12,,,
+30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,3.88999586,1.941764103,81.65588616,2853,R,9,8,11,,,
+30007,202003,100,11491,12,4.027888195,,4.027888195,,1.307995914,,76.13443331,11491,R,8,,11,,,
+30008,202001,100,141,162,,0.023463069,,,,1.773218509,96.73383283,141,R,,9,12,,TRUE,
+30008,202002,100,6001,162,42.62017045,13.86213906,,,3.88999586,1.941764103,81.65588616,6001,R,9,8,11,TRUE,TRUE,
+30008,202003,100,433,162,0.072138939,,,,1.307995914,,76.13443331,433,R,8,,11,TRUE,,
+30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.773218509,96.73383283,6417,R,,9,12,,,
+30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,3.88999586,1.941764103,81.65588616,4037,R,9,8,11,,,
+30009,202003,100,1322,26,0.327462695,,0.327462695,,1.307995914,,76.13443331,1322,R,8,,11,,,
+30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.773218509,96.73383283,28963,R,,9,12,,,
+30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,3.88999586,1.941764103,81.65588616,21734,R,9,8,11,,,
+30010,202003,100,10529,144,0.484426733,,0.484426733,,1.307995914,,76.13443331,10529,R,8,,11,,,
+30011,202001,100,6009,5,,5.249464902,,,,1.773218509,96.73383283,6009,R,,9,12,,TRUE,
+30011,202002,100,1145,5,0.190495606,0.226047443,,,3.88999586,1.941764103,81.65588616,1145,R,9,8,11,TRUE,TRUE,
+30011,202003,100,5064,5,4.423850085,,,,1.307995914,,76.13443331,5064,R,8,,11,TRUE,,
+30012,202001,100,256,275,,0.034032235,,0.034032235,,1.773218509,96.73383283,256,R,,9,12,,,
+30012,202002,100,7522,275,29.38390625,,29.38390625,,3.88999586,1.941764103,81.65588616,7522,R,9,8,11,,,
+30012,202003,100,,275,,,,,1.307995914,,76.13443331,9838.745268,FIR,8,,11,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv
index 4a24ab5d..8efac202 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv
@@ -1,73 +1,73 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-110001,202001,100,9244,89,0.1,0.1
-110001,202002,100,8916,89,0.1,0.1
-110001,202003,100,6194,89,0.1,0.1
-110002,202001,100,4826,83,0.1,0.1
-110002,202002,100,5903,83,0.1,0.1
-110002,202003,100,4743,83,0.1,0.1
-110003,202001,100,7586,4,0.1,0.1
-110003,202002,100,1016,4,0.1,0.1
-110003,202003,100,1429,4,0.1,0.1
-110004,202001,100,3975,76,0.1,0.1
-110004,202002,100,3044,76,0.1,0.1
-110004,202003,100,3673,76,0.1,0.1
-110005,202001,100,1941,18,0.1,0.1
-110005,202002,100,3121,18,0.1,0.1
-110005,202003,100,1208,18,0.1,0.1
-110006,202001,100,5405,94,0.1,0.1
-110006,202002,100,7084,94,0.1,0.1
-110006,202003,100,4980,94,0.1,0.1
-110007,202001,100,15172,8,0.1,0.1
-110007,202002,100,2845,8,0.1,0.1
-110007,202003,100,3501,8,0.1,0.1
-110008,202001,100,16298,304,0.1,0.1
-110008,202002,100,14429,304,0.1,0.1
-110008,202003,100,14295,304,0.1,0.1
-110009,202001,100,3698,45,0.1,0.1
-110009,202002,100,4993,45,0.1,0.1
-110009,202003,100,4212,45,0.1,0.1
-110010,202001,100,7722,100,0.1,0.1
-110010,202002,100,10153,100,0.1,0.1
-110010,202003,100,6545,100,0.1,0.1
-110011,202001,100,30344,19,0.1,0.1
-110011,202002,100,3627,19,0.1,0.1
-110011,202003,100,7288,19,0.1,0.1
-110012,202001,100,16298,304,0.1,0.1
-110012,202002,100,11567,304,0.1,0.1
-110012,202003,100,,304,0.1,0.1
-110013,202001,200,20190,54,0.1,0.1
-110013,202002,200,18242,54,0.1,0.1
-110013,202003,200,28826,54,0.1,0.1
-110014,202001,200,4260,47,0.1,0.1
-110014,202002,200,5036,42,0.1,0.1
-110014,202003,200,6484,42,0.1,0.1
-110015,202001,200,19236,57,0.1,0.1
-110015,202002,200,4949,57,0.1,0.1
-110015,202003,200,3544,57,0.1,0.1
-110016,202001,200,14902,163,0.1,0.1
-110016,202002,200,16435,163,0.1,0.1
-110016,202003,200,24653,163,0.1,0.1
-110017,202001,200,35476,149,0.1,0.1
-110017,202002,200,50515,149,0.1,0.1
-110017,202003,200,53477,149,0.1,0.1
-110018,202001,200,13845,126,0.1,0.1
-110018,202002,200,25488,126,0.1,0.1
-110018,202003,200,27409,126,0.1,0.1
-110019,202001,200,1099,6,0.1,0.1
-110019,202002,200,434,6,0.1,0.1
-110019,202003,200,124,6,0.1,0.1
-110020,202001,200,3348,22,0.1,0.1
-110020,202002,200,1996,22,0.1,0.1
-110020,202003,200,5051,22,0.1,0.1
-110021,202001,200,29215,108,0.1,0.1
-110021,202002,200,34168,108,0.1,0.1
-110021,202003,200,61628,108,0.1,0.1
-110022,202001,200,6390,67,0.1,0.1
-110022,202002,200,12705,67,0.1,0.1
-110022,202003,200,11966,67,0.1,0.1
-110023,202001,200,4562,18,0.1,0.1
-110023,202002,200,1717,18,0.1,0.1
-110023,202003,200,2371,18,0.1,0.1
-110024,202001,200,,155,0.1,0.1
-110024,202002,200,18782,155,0.1,0.1
-110024,202003,200,21046,155,0.1,0.1
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,3673,76
+110005,202001,100,1941,18
+110005,202002,100,3121,18
+110005,202003,100,1208,18
+110006,202001,100,5405,94
+110006,202002,100,7084,94
+110006,202003,100,4980,94
+110007,202001,100,15172,8
+110007,202002,100,2845,8
+110007,202003,100,3501,8
+110008,202001,100,16298,304
+110008,202002,100,14429,304
+110008,202003,100,14295,304
+110009,202001,100,3698,45
+110009,202002,100,4993,45
+110009,202003,100,4212,45
+110010,202001,100,7722,100
+110010,202002,100,10153,100
+110010,202003,100,6545,100
+110011,202001,100,30344,19
+110011,202002,100,3627,19
+110011,202003,100,7288,19
+110012,202001,100,16298,304
+110012,202002,100,11567,304
+110012,202003,100,,304
+110013,202001,200,20190,54
+110013,202002,200,18242,54
+110013,202003,200,28826,54
+110014,202001,200,4260,47
+110014,202002,200,5036,42
+110014,202003,200,6484,42
+110015,202001,200,19236,57
+110015,202002,200,4949,57
+110015,202003,200,3544,57
+110016,202001,200,14902,163
+110016,202002,200,16435,163
+110016,202003,200,24653,163
+110017,202001,200,35476,149
+110017,202002,200,50515,149
+110017,202003,200,53477,149
+110018,202001,200,13845,126
+110018,202002,200,25488,126
+110018,202003,200,27409,126
+110019,202001,200,1099,6
+110019,202002,200,434,6
+110019,202003,200,124,6
+110020,202001,200,3348,22
+110020,202002,200,1996,22
+110020,202003,200,5051,22
+110021,202001,200,29215,108
+110021,202002,200,34168,108
+110021,202003,200,61628,108
+110022,202001,200,6390,67
+110022,202002,200,12705,67
+110022,202003,200,11966,67
+110023,202001,200,4562,18
+110023,202002,200,1717,18
+110023,202003,200,2371,18
+110024,202001,200,,155
+110024,202002,200,18782,155
+110024,202003,200,21046,155
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 54739537..cd43c31b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,73 +1,73 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-80001,202001,100,9244,89,0.1,0.1,,1.036787797,,1.036787797,,2.076255394,107.1910333,9244,R,,10,12,,
-80001,202002,100,8916,89,0.1,0.1,0.964517525,1.43945754,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,8916,R,10,9,12,,
-80001,202003,100,6194,89,0.1,0.1,0.694706146,,0.694706146,,0.918490819,,69.22002885,6194,R,9,,11,,
-80002,202001,100,4826,83,0.1,0.1,,0.817550398,,0.817550398,,2.076255394,107.1910333,4826,R,,10,12,,
-80002,202002,100,5903,83,0.1,0.1,1.223166183,1.244570947,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,5903,R,10,9,12,,
-80002,202003,100,4743,83,0.1,0.1,0.803489751,,0.803489751,,0.918490819,,69.22002885,4743,R,9,,11,,
-80003,202001,100,7586,4,0.1,0.1,,7.466535433,,7.466535433,,2.076255394,107.1910333,7586,R,,10,12,,
-80003,202002,100,1016,4,0.1,0.1,0.133930925,0.710986704,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1016,R,10,9,12,,
-80003,202003,100,1429,4,0.1,0.1,1.406496063,,1.406496063,,0.918490819,,69.22002885,1429,R,9,,11,,
-80004,202001,100,3975,76,0.1,0.1,,1.305847569,,1.305847569,,2.076255394,107.1910333,3975,R,,10,12,,
-80004,202002,100,3044,76,0.1,0.1,0.765786164,0.82875034,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,3044,R,10,9,12,,
-80004,202003,100,3673,76,0.1,0.1,1.206636005,,1.206636005,,0.918490819,,69.22002885,3673,R,9,,11,,
-80005,202001,100,1941,18,0.1,0.1,,0.622072678,,,,2.076255394,107.1910333,1941,R,,10,12,,TRUE
-80005,202002,100,3121,18,0.1,0.1,1.607529208,2.583641738,,,0.884574402,1.133853978,67.10794565,3121,R,10,9,12,TRUE,TRUE
-80005,202003,100,1208,18,0.1,0.1,0.387050567,,0.387050567,,0.918490819,,69.22002885,1208,R,9,,11,,
-80006,202001,100,5405,94,0.1,0.1,,0.763047038,,0.763047038,,2.076255394,107.1910333,5405,R,,10,12,,
-80006,202002,100,7084,94,0.1,0.1,1.310535196,1.422366796,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,7084,R,10,9,12,,
-80006,202003,100,4980,94,0.1,0.1,0.703053532,,0.703053532,,0.918490819,,69.22002885,4980,R,9,,11,,
-80007,202001,100,15172,8,0.1,0.1,,5.333239595,,5.333239595,,2.076255394,107.1910333,15172,R,,10,12,,
-80007,202002,100,2845,8,0.1,0.1,0.187503296,0.812556233,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,2845,R,10,9,12,,
-80007,202003,100,3501,8,0.1,0.1,1.230684055,,1.230684055,,0.918490819,,69.22002885,3501,R,9,,11,,
-80008,202001,100,16298,304,0.1,0.1,,1.129530598,,1.129530598,,2.076255394,107.1910333,16298,R,,10,12,,
-80008,202002,100,14429,304,0.1,0.1,0.885323516,1.009357249,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,14429,R,10,9,12,,
-80008,202003,100,14295,304,0.1,0.1,0.990729498,,0.990729498,,0.918490819,,69.22002885,14295,R,9,,11,,
-80009,202001,100,3698,45,0.1,0.1,,0.740562712,,0.740562712,,2.076255394,107.1910333,3698,R,,10,12,,
-80009,202002,100,4993,45,0.1,0.1,1.350324535,1.185435621,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,4993,R,10,9,12,,
-80009,202003,100,4212,45,0.1,0.1,0.843571749,,0.843571749,,0.918490819,,69.22002885,4212,R,9,,11,,
-80010,202001,100,7722,100,0.1,0.1,,0.760511998,,0.760511998,,2.076255394,107.1910333,7722,R,,10,12,,
-80010,202002,100,10153,100,0.1,0.1,1.314903647,1.551204368,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,10153,R,10,9,12,,
-80010,202003,100,6545,100,0.1,0.1,0.644660382,,,,0.918490819,,69.22002885,6545,R,9,,11,TRUE,
-80011,202001,100,30344,19,0.1,0.1,,8.365866031,,,,2.076255394,107.1910333,30344,R,,10,12,,TRUE
-80011,202002,100,3627,19,0.1,0.1,0.119533351,0.497690693,,,0.884574402,1.133853978,67.10794565,3627,R,10,9,12,TRUE,TRUE
-80011,202003,100,7288,19,0.1,0.1,2.00928009,,,,0.918490819,,69.22002885,7288,R,9,,11,TRUE,
-80012,202001,100,16298,304,0.1,0.1,,1.408940798,,1.408940798,,2.076255394,107.1910333,16298,R,,10,12,,
-80012,202002,100,11567,304,0.1,0.1,0.70975303,,0.70975303,,0.884574402,1.133853978,67.10794565,11567,R,10,9,12,,
-80012,202003,100,,304,0.1,0.1,,,,,0.918490819,,69.22002885,10624.18,FIR,9,,11,,
-80013,202001,200,20190,54,0.1,0.1,,1.106799294,,1.106799294,,1.313944665,186.8459267,20190,R,,9,11,,
-80013,202002,200,18242,54,0.1,0.1,0.903506178,0.632817595,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,18242,R,9,10,12,,
-80013,202003,200,28826,54,0.1,0.1,1.58023419,,1.58023419,,1.246527322,,255.2315185,28826,R,10,,12,,
-80014,202001,200,4260,47,0.1,0.1,,0.845985046,,0.845985046,,1.313944665,186.8459267,4260,R,,9,11,,
-80014,202002,200,5036,42,0.1,0.1,1.182053991,0.776557765,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,5036,R,9,10,12,,
-80014,202003,200,6484,42,0.1,0.1,1.28773421,,1.28773421,,1.246527322,,255.2315185,6484,R,10,,12,,
-80015,202001,200,19236,57,0.1,0.1,,3.886845827,,,,1.313944665,186.8459267,19236,R,,9,11,,TRUE
-80015,202002,200,4949,57,0.1,0.1,0.25727802,1.396267404,,1.396267404,0.998929763,0.857954645,197.1492703,4949,R,9,10,12,TRUE,
-80015,202003,200,3544,57,0.1,0.1,0.716195191,,0.716195191,,1.246527322,,255.2315185,3544,R,10,,12,,
-80016,202001,200,14902,163,0.1,0.1,,0.906730921,,0.906730921,,1.313944665,186.8459267,14902,R,,9,11,,
-80016,202002,200,16435,163,0.1,0.1,1.102863018,0.666628808,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,16435,R,9,10,12,,
-80016,202003,200,24653,163,0.1,0.1,1.500085186,,1.500085186,,1.246527322,,255.2315185,24653,R,10,,12,,
-80017,202001,200,35476,149,0.1,0.1,,0.702275751,,0.702275751,,1.313944665,186.8459267,35476,R,,9,11,,
-80017,202002,200,50515,149,0.1,0.1,1.42394209,0.944611909,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,50515,R,9,10,12,,
-80017,202003,200,53477,149,0.1,0.1,1.058635817,,1.058635817,,1.246527322,,255.2315185,53477,R,10,,12,,
-80018,202001,200,13845,126,0.1,0.1,,0.543204684,,0.543204684,,1.313944665,186.8459267,13845,R,,9,11,,
-80018,202002,200,25488,126,0.1,0.1,1.840926688,0.929916997,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,25488,R,9,10,12,,
-80018,202003,200,27409,126,0.1,0.1,1.075364795,,1.075364795,,1.246527322,,255.2315185,27409,R,10,,12,,
-80019,202001,200,1099,6,0.1,0.1,,2.530969376,,2.530969376,,1.313944665,186.8459267,1099,R,,9,11,,
-80019,202002,200,434,6,0.1,0.1,0.395105531,3.51659919,0.395105531,,0.998929763,0.857954645,197.1492703,434,R,9,10,12,,TRUE
-80019,202003,200,124,6,0.1,0.1,0.284365646,,,,1.246527322,,255.2315185,124,R,10,,12,TRUE,
-80020,202001,200,3348,22,0.1,0.1,,1.677715809,,1.677715809,,1.313944665,186.8459267,3348,R,,9,11,,
-80020,202002,200,1996,22,0.1,0.1,0.596048505,0.395102278,0.596048505,,0.998929763,0.857954645,197.1492703,1996,R,9,10,12,,TRUE
-80020,202003,200,5051,22,0.1,0.1,2.530990214,,,,1.246527322,,255.2315185,5051,R,10,,12,TRUE,
-80021,202001,200,29215,108,0.1,0.1,,0.855047659,,0.855047659,,1.313944665,186.8459267,29215,R,,9,11,,
-80021,202002,200,34168,108,0.1,0.1,1.169525453,0.554422016,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,34168,R,9,10,12,,
-80021,202003,200,61628,108,0.1,0.1,1.803680177,,1.803680177,,1.246527322,,255.2315185,61628,R,10,,12,,
-80022,202001,200,6390,67,0.1,0.1,,0.502948427,,,,1.313944665,186.8459267,6390,R,,9,11,,TRUE
-80022,202002,200,12705,67,0.1,0.1,1.98827543,1.061751691,,1.061751691,0.998929763,0.857954645,197.1492703,12705,R,9,10,12,TRUE,
-80022,202003,200,11966,67,0.1,0.1,0.9418398,,0.9418398,,1.246527322,,255.2315185,11966,R,10,,12,,
-80023,202001,200,4562,18,0.1,0.1,,2.656773442,,2.656773442,,1.313944665,186.8459267,4562,R,,9,11,,
-80023,202002,200,1717,18,0.1,0.1,0.376396415,0.724105938,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,1717,R,9,10,12,,
-80023,202003,200,2371,18,0.1,0.1,1.381013395,,1.381013395,,1.246527322,,255.2315185,2371,R,10,,12,,
-80024,202001,200,,155,0.1,0.1,,,,,,1.313944665,186.8459267,24679.03,BI,,9,11,,
-80024,202002,200,18782,155,0.1,0.1,,0.892466323,,0.892466323,0.998929763,0.857954645,197.1492703,18782,R,9,10,12,,
-80024,202003,200,21046,155,0.1,0.1,1.120490459,,1.120490459,,1.246527322,,255.2315185,21046,R,10,,12,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+80001,202001,100,9244,89,,1.036787797,,1.036787797,,2.076255394,107.1910333,9244,R,,10,12,,
+80001,202002,100,8916,89,0.964517525,1.43945754,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,8916,R,10,9,12,,
+80001,202003,100,6194,89,0.694706146,,0.694706146,,0.918490819,,69.22002885,6194,R,9,,11,,
+80002,202001,100,4826,83,,0.817550398,,0.817550398,,2.076255394,107.1910333,4826,R,,10,12,,
+80002,202002,100,5903,83,1.223166183,1.244570947,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,5903,R,10,9,12,,
+80002,202003,100,4743,83,0.803489751,,0.803489751,,0.918490819,,69.22002885,4743,R,9,,11,,
+80003,202001,100,7586,4,,7.466535433,,7.466535433,,2.076255394,107.1910333,7586,R,,10,12,,
+80003,202002,100,1016,4,0.133930925,0.710986704,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1016,R,10,9,12,,
+80003,202003,100,1429,4,1.406496063,,1.406496063,,0.918490819,,69.22002885,1429,R,9,,11,,
+80004,202001,100,3975,76,,1.305847569,,1.305847569,,2.076255394,107.1910333,3975,R,,10,12,,
+80004,202002,100,3044,76,0.765786164,0.82875034,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,3044,R,10,9,12,,
+80004,202003,100,3673,76,1.206636005,,1.206636005,,0.918490819,,69.22002885,3673,R,9,,11,,
+80005,202001,100,1941,18,,0.622072678,,,,2.076255394,107.1910333,1941,R,,10,12,,TRUE
+80005,202002,100,3121,18,1.607529208,2.583641738,,,0.884574402,1.133853978,67.10794565,3121,R,10,9,12,TRUE,TRUE
+80005,202003,100,1208,18,0.387050567,,0.387050567,,0.918490819,,69.22002885,1208,R,9,,11,,
+80006,202001,100,5405,94,,0.763047038,,0.763047038,,2.076255394,107.1910333,5405,R,,10,12,,
+80006,202002,100,7084,94,1.310535196,1.422366796,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,7084,R,10,9,12,,
+80006,202003,100,4980,94,0.703053532,,0.703053532,,0.918490819,,69.22002885,4980,R,9,,11,,
+80007,202001,100,15172,8,,5.333239595,,5.333239595,,2.076255394,107.1910333,15172,R,,10,12,,
+80007,202002,100,2845,8,0.187503296,0.812556233,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,2845,R,10,9,12,,
+80007,202003,100,3501,8,1.230684055,,1.230684055,,0.918490819,,69.22002885,3501,R,9,,11,,
+80008,202001,100,16298,304,,1.129530598,,1.129530598,,2.076255394,107.1910333,16298,R,,10,12,,
+80008,202002,100,14429,304,0.885323516,1.009357249,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,14429,R,10,9,12,,
+80008,202003,100,14295,304,0.990729498,,0.990729498,,0.918490819,,69.22002885,14295,R,9,,11,,
+80009,202001,100,3698,45,,0.740562712,,0.740562712,,2.076255394,107.1910333,3698,R,,10,12,,
+80009,202002,100,4993,45,1.350324535,1.185435621,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,4993,R,10,9,12,,
+80009,202003,100,4212,45,0.843571749,,0.843571749,,0.918490819,,69.22002885,4212,R,9,,11,,
+80010,202001,100,7722,100,,0.760511998,,0.760511998,,2.076255394,107.1910333,7722,R,,10,12,,
+80010,202002,100,10153,100,1.314903647,1.551204368,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,10153,R,10,9,12,,
+80010,202003,100,6545,100,0.644660382,,,,0.918490819,,69.22002885,6545,R,9,,11,TRUE,
+80011,202001,100,30344,19,,8.365866031,,,,2.076255394,107.1910333,30344,R,,10,12,,TRUE
+80011,202002,100,3627,19,0.119533351,0.497690693,,,0.884574402,1.133853978,67.10794565,3627,R,10,9,12,TRUE,TRUE
+80011,202003,100,7288,19,2.00928009,,,,0.918490819,,69.22002885,7288,R,9,,11,TRUE,
+80012,202001,100,16298,304,,1.408940798,,1.408940798,,2.076255394,107.1910333,16298,R,,10,12,,
+80012,202002,100,11567,304,0.70975303,,0.70975303,,0.884574402,1.133853978,67.10794565,11567,R,10,9,12,,
+80012,202003,100,,304,,,,,0.918490819,,69.22002885,10624.18,FIR,9,,11,,
+80013,202001,200,20190,54,,1.106799294,,1.106799294,,1.313944665,186.8459267,20190,R,,9,11,,
+80013,202002,200,18242,54,0.903506178,0.632817595,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,18242,R,9,10,12,,
+80013,202003,200,28826,54,1.58023419,,1.58023419,,1.246527322,,255.2315185,28826,R,10,,12,,
+80014,202001,200,4260,47,,0.845985046,,0.845985046,,1.313944665,186.8459267,4260,R,,9,11,,
+80014,202002,200,5036,42,1.182053991,0.776557765,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,5036,R,9,10,12,,
+80014,202003,200,6484,42,1.28773421,,1.28773421,,1.246527322,,255.2315185,6484,R,10,,12,,
+80015,202001,200,19236,57,,3.886845827,,,,1.313944665,186.8459267,19236,R,,9,11,,TRUE
+80015,202002,200,4949,57,0.25727802,1.396267404,,1.396267404,0.998929763,0.857954645,197.1492703,4949,R,9,10,12,TRUE,
+80015,202003,200,3544,57,0.716195191,,0.716195191,,1.246527322,,255.2315185,3544,R,10,,12,,
+80016,202001,200,14902,163,,0.906730921,,0.906730921,,1.313944665,186.8459267,14902,R,,9,11,,
+80016,202002,200,16435,163,1.102863018,0.666628808,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,16435,R,9,10,12,,
+80016,202003,200,24653,163,1.500085186,,1.500085186,,1.246527322,,255.2315185,24653,R,10,,12,,
+80017,202001,200,35476,149,,0.702275751,,0.702275751,,1.313944665,186.8459267,35476,R,,9,11,,
+80017,202002,200,50515,149,1.42394209,0.944611909,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,50515,R,9,10,12,,
+80017,202003,200,53477,149,1.058635817,,1.058635817,,1.246527322,,255.2315185,53477,R,10,,12,,
+80018,202001,200,13845,126,,0.543204684,,0.543204684,,1.313944665,186.8459267,13845,R,,9,11,,
+80018,202002,200,25488,126,1.840926688,0.929916997,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,25488,R,9,10,12,,
+80018,202003,200,27409,126,1.075364795,,1.075364795,,1.246527322,,255.2315185,27409,R,10,,12,,
+80019,202001,200,1099,6,,2.530969376,,2.530969376,,1.313944665,186.8459267,1099,R,,9,11,,
+80019,202002,200,434,6,0.395105531,3.51659919,0.395105531,,0.998929763,0.857954645,197.1492703,434,R,9,10,12,,TRUE
+80019,202003,200,124,6,0.284365646,,,,1.246527322,,255.2315185,124,R,10,,12,TRUE,
+80020,202001,200,3348,22,,1.677715809,,1.677715809,,1.313944665,186.8459267,3348,R,,9,11,,
+80020,202002,200,1996,22,0.596048505,0.395102278,0.596048505,,0.998929763,0.857954645,197.1492703,1996,R,9,10,12,,TRUE
+80020,202003,200,5051,22,2.530990214,,,,1.246527322,,255.2315185,5051,R,10,,12,TRUE,
+80021,202001,200,29215,108,,0.855047659,,0.855047659,,1.313944665,186.8459267,29215,R,,9,11,,
+80021,202002,200,34168,108,1.169525453,0.554422016,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,34168,R,9,10,12,,
+80021,202003,200,61628,108,1.803680177,,1.803680177,,1.246527322,,255.2315185,61628,R,10,,12,,
+80022,202001,200,6390,67,,0.502948427,,,,1.313944665,186.8459267,6390,R,,9,11,,TRUE
+80022,202002,200,12705,67,1.98827543,1.061751691,,1.061751691,0.998929763,0.857954645,197.1492703,12705,R,9,10,12,TRUE,
+80022,202003,200,11966,67,0.9418398,,0.9418398,,1.246527322,,255.2315185,11966,R,10,,12,,
+80023,202001,200,4562,18,,2.656773442,,2.656773442,,1.313944665,186.8459267,4562,R,,9,11,,
+80023,202002,200,1717,18,0.376396415,0.724105938,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,1717,R,9,10,12,,
+80023,202003,200,2371,18,1.381013395,,1.381013395,,1.246527322,,255.2315185,2371,R,10,,12,,
+80024,202001,200,,155,,,,,,1.313944665,186.8459267,24679.03,BI,,9,11,,
+80024,202002,200,18782,155,,0.892466323,,0.892466323,0.998929763,0.857954645,197.1492703,18782,R,9,10,12,,
+80024,202003,200,21046,155,1.120490459,,1.120490459,,1.246527322,,255.2315185,21046,R,10,,12,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_input.csv
index 2e20dd5d..3a255141 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_input.csv
@@ -1,64 +1,64 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-90001,202001,100,9244,89,0.1,0.1
-90001,202002,100,8916,89,0.1,0.1
-90001,202003,100,6194,89,0.1,0.1
-90002,202001,100,4826,83,0.1,0.1
-90002,202002,100,5903,83,0.1,0.1
-90002,202003,100,4743,83,0.1,0.1
-90003,202001,100,7586,4,0.1,0.1
-90003,202002,100,1016,4,0.1,0.1
-90003,202003,100,1429,4,0.1,0.1
-90004,202001,100,3975,76,0.1,0.1
-90004,202002,100,3044,76,0.1,0.1
-90004,202003,100,3673,76,0.1,0.1
-90005,202001,100,1941,18,0.1,0.1
-90005,202002,100,3121,18,0.1,0.1
-90005,202003,100,1208,18,0.1,0.1
-90006,202001,100,5405,94,0.1,0.1
-90006,202002,100,7084,94,0.1,0.1
-90006,202003,100,4980,94,0.1,0.1
-90007,202001,100,15172,8,0.1,0.1
-90007,202002,100,2845,8,0.1,0.1
-90007,202003,100,3501,8,0.1,0.1
-90008,202001,100,16298,304,0.1,0.1
-90008,202002,100,14429,304,0.1,0.1
-90008,202003,100,14295,304,0.1,0.1
-90009,202001,100,3698,45,0.1,0.1
-90009,202002,100,4993,45,0.1,0.1
-90009,202003,100,4212,45,0.1,0.1
-90010,202001,100,7722,100,0.1,0.1
-90010,202002,100,10153,100,0.1,0.1
-90010,202003,100,6545,100,0.1,0.1
-90011,202001,100,30344,19,0.1,0.1
-90011,202002,100,3627,19,0.1,0.1
-90011,202003,100,7288,19,0.1,0.1
-90012,202001,100,16298,304,0.1,0.1
-90012,202002,100,11567,304,0.1,0.1
-90012,202003,100,13484,304,0.1,0.1
-90013,202001,100,20190,54,0.1,0.1
-90013,202002,100,18242,54,0.1,0.1
-90013,202003,100,28826,54,0.1,0.1
-90014,202001,100,4260,47,0.1,0.1
-90014,202002,100,5036,42,0.1,0.1
-90014,202003,100,6484,42,0.1,0.1
-90015,202001,100,19236,57,0.1,0.1
-90015,202002,100,4949,57,0.1,0.1
-90015,202003,100,3544,57,0.1,0.1
-90016,202001,100,14902,163,0.1,0.1
-90016,202002,100,16435,163,0.1,0.1
-90016,202003,100,24653,163,0.1,0.1
-90017,202001,100,35476,149,0.1,0.1
-90017,202002,100,50515,149,0.1,0.1
-90017,202003,100,53477,149,0.1,0.1
-90018,202001,100,13845,126,0.1,0.1
-90018,202002,100,25488,126,0.1,0.1
-90018,202003,100,27409,126,0.1,0.1
-90019,202001,100,1099,6,0.1,0.1
-90019,202002,100,434,6,0.1,0.1
-90019,202003,100,124,6,0.1,0.1
-90020,202001,100,3348,22,0.1,0.1
-90020,202002,100,1996,22,0.1,0.1
-90020,202003,100,5051,22,0.1,0.1
-90021,202001,100,,155,0.1,0.1
-90021,202002,100,,155,0.1,0.1
-90021,202003,100,21046,155,0.1,0.1
+identifier,date,group,question,other
+90001,202001,100,9244,89
+90001,202002,100,8916,89
+90001,202003,100,6194,89
+90002,202001,100,4826,83
+90002,202002,100,5903,83
+90002,202003,100,4743,83
+90003,202001,100,7586,4
+90003,202002,100,1016,4
+90003,202003,100,1429,4
+90004,202001,100,3975,76
+90004,202002,100,3044,76
+90004,202003,100,3673,76
+90005,202001,100,1941,18
+90005,202002,100,3121,18
+90005,202003,100,1208,18
+90006,202001,100,5405,94
+90006,202002,100,7084,94
+90006,202003,100,4980,94
+90007,202001,100,15172,8
+90007,202002,100,2845,8
+90007,202003,100,3501,8
+90008,202001,100,16298,304
+90008,202002,100,14429,304
+90008,202003,100,14295,304
+90009,202001,100,3698,45
+90009,202002,100,4993,45
+90009,202003,100,4212,45
+90010,202001,100,7722,100
+90010,202002,100,10153,100
+90010,202003,100,6545,100
+90011,202001,100,30344,19
+90011,202002,100,3627,19
+90011,202003,100,7288,19
+90012,202001,100,16298,304
+90012,202002,100,11567,304
+90012,202003,100,13484,304
+90013,202001,100,20190,54
+90013,202002,100,18242,54
+90013,202003,100,28826,54
+90014,202001,100,4260,47
+90014,202002,100,5036,42
+90014,202003,100,6484,42
+90015,202001,100,19236,57
+90015,202002,100,4949,57
+90015,202003,100,3544,57
+90016,202001,100,14902,163
+90016,202002,100,16435,163
+90016,202003,100,24653,163
+90017,202001,100,35476,149
+90017,202002,100,50515,149
+90017,202003,100,53477,149
+90018,202001,100,13845,126
+90018,202002,100,25488,126
+90018,202003,100,27409,126
+90019,202001,100,1099,6
+90019,202002,100,434,6
+90019,202003,100,124,6
+90020,202001,100,3348,22
+90020,202002,100,1996,22
+90020,202003,100,5051,22
+90021,202001,100,,155
+90021,202002,100,,155
+90021,202003,100,21046,155
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index 3a0fdef4..5c2598c3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-90001,202001,100,9244,89,0.1,0.1,,1.036787797,,1.036787797,,1.835663813,132.8421946,9244,R,,18,20,,
-90001,202002,100,8916,89,0.1,0.1,0.964517525,1.43945754,0.964517525,1.43945754,0.906337253,1.082813901,113.3255814,8916,R,18,18,20,,
-90001,202003,100,6194,89,0.1,0.1,0.694706146,,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,
-90002,202001,100,4826,83,0.1,0.1,,0.817550398,,0.817550398,,1.835663813,132.8421946,4826,R,,18,20,,
-90002,202002,100,5903,83,0.1,0.1,1.223166183,1.244570947,1.223166183,1.244570947,0.906337253,1.082813901,113.3255814,5903,R,18,18,20,,
-90002,202003,100,4743,83,0.1,0.1,0.803489751,,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,
-90003,202001,100,7586,4,0.1,0.1,,7.466535433,,7.466535433,,1.835663813,132.8421946,7586,R,,18,20,,
-90003,202002,100,1016,4,0.1,0.1,0.133930925,0.710986704,0.133930925,0.710986704,0.906337253,1.082813901,113.3255814,1016,R,18,18,20,,
-90003,202003,100,1429,4,0.1,0.1,1.406496063,,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,
-90004,202001,100,3975,76,0.1,0.1,,1.305847569,,1.305847569,,1.835663813,132.8421946,3975,R,,18,20,,
-90004,202002,100,3044,76,0.1,0.1,0.765786164,0.82875034,0.765786164,0.82875034,0.906337253,1.082813901,113.3255814,3044,R,18,18,20,,
-90004,202003,100,3673,76,0.1,0.1,1.206636005,,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,
-90005,202001,100,1941,18,0.1,0.1,,0.622072678,,0.622072678,,1.835663813,132.8421946,1941,R,,18,20,,
-90005,202002,100,3121,18,0.1,0.1,1.607529208,2.583641738,1.607529208,2.583641738,0.906337253,1.082813901,113.3255814,3121,R,18,18,20,,
-90005,202003,100,1208,18,0.1,0.1,0.387050567,,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,
-90006,202001,100,5405,94,0.1,0.1,,0.763047038,,0.763047038,,1.835663813,132.8421946,5405,R,,18,20,,
-90006,202002,100,7084,94,0.1,0.1,1.310535196,1.422366796,1.310535196,1.422366796,0.906337253,1.082813901,113.3255814,7084,R,18,18,20,,
-90006,202003,100,4980,94,0.1,0.1,0.703053532,,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,
-90007,202001,100,15172,8,0.1,0.1,,5.333239595,,5.333239595,,1.835663813,132.8421946,15172,R,,18,20,,
-90007,202002,100,2845,8,0.1,0.1,0.187503296,0.812556233,0.187503296,0.812556233,0.906337253,1.082813901,113.3255814,2845,R,18,18,20,,
-90007,202003,100,3501,8,0.1,0.1,1.230684055,,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,
-90008,202001,100,16298,304,0.1,0.1,,1.129530598,,1.129530598,,1.835663813,132.8421946,16298,R,,18,20,,
-90008,202002,100,14429,304,0.1,0.1,0.885323516,1.009357249,0.885323516,1.009357249,0.906337253,1.082813901,113.3255814,14429,R,18,18,20,,
-90008,202003,100,14295,304,0.1,0.1,0.990729498,,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,
-90009,202001,100,3698,45,0.1,0.1,,0.740562712,,0.740562712,,1.835663813,132.8421946,3698,R,,18,20,,
-90009,202002,100,4993,45,0.1,0.1,1.350324535,1.185435621,1.350324535,1.185435621,0.906337253,1.082813901,113.3255814,4993,R,18,18,20,,
-90009,202003,100,4212,45,0.1,0.1,0.843571749,,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,
-90010,202001,100,7722,100,0.1,0.1,,0.760511998,,0.760511998,,1.835663813,132.8421946,7722,R,,18,20,,
-90010,202002,100,10153,100,0.1,0.1,1.314903647,1.551204368,1.314903647,1.551204368,0.906337253,1.082813901,113.3255814,10153,R,18,18,20,,
-90010,202003,100,6545,100,0.1,0.1,0.644660382,,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,
-90011,202001,100,30344,19,0.1,0.1,,8.365866031,,,,1.835663813,132.8421946,30344,R,,18,20,,TRUE
-90011,202002,100,3627,19,0.1,0.1,0.119533351,0.497690693,,0.497690693,0.906337253,1.082813901,113.3255814,3627,R,18,18,20,TRUE,
-90011,202003,100,7288,19,0.1,0.1,2.00928009,,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,
-90012,202001,100,16298,304,0.1,0.1,,1.408940798,,1.408940798,,1.835663813,132.8421946,16298,R,,18,20,,
-90012,202002,100,11567,304,0.1,0.1,0.70975303,0.857831504,0.70975303,0.857831504,0.906337253,1.082813901,113.3255814,11567,R,18,18,20,,
-90012,202003,100,13484,304,0.1,0.1,1.165730094,,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,
-90013,202001,100,20190,54,0.1,0.1,,1.106799294,,1.106799294,,1.835663813,132.8421946,20190,R,,18,20,,
-90013,202002,100,18242,54,0.1,0.1,0.903506178,0.632817595,0.903506178,0.632817595,0.906337253,1.082813901,113.3255814,18242,R,18,18,20,,
-90013,202003,100,28826,54,0.1,0.1,1.58023419,,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,
-90014,202001,100,4260,47,0.1,0.1,,0.845985046,,0.845985046,,1.835663813,132.8421946,4260,R,,18,20,,
-90014,202002,100,5036,42,0.1,0.1,1.182053991,0.776557765,1.182053991,0.776557765,0.906337253,1.082813901,113.3255814,5036,R,18,18,20,,
-90014,202003,100,6484,42,0.1,0.1,1.28773421,,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,
-90015,202001,100,19236,57,0.1,0.1,,3.886845827,,3.886845827,,1.835663813,132.8421946,19236,R,,18,20,,
-90015,202002,100,4949,57,0.1,0.1,0.25727802,1.396267404,0.25727802,1.396267404,0.906337253,1.082813901,113.3255814,4949,R,18,18,20,,
-90015,202003,100,3544,57,0.1,0.1,0.716195191,,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,
-90016,202001,100,14902,163,0.1,0.1,,0.906730921,,0.906730921,,1.835663813,132.8421946,14902,R,,18,20,,
-90016,202002,100,16435,163,0.1,0.1,1.102863018,0.666628808,1.102863018,0.666628808,0.906337253,1.082813901,113.3255814,16435,R,18,18,20,,
-90016,202003,100,24653,163,0.1,0.1,1.500085186,,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,
-90017,202001,100,35476,149,0.1,0.1,,0.702275751,,0.702275751,,1.835663813,132.8421946,35476,R,,18,20,,
-90017,202002,100,50515,149,0.1,0.1,1.42394209,0.944611909,1.42394209,0.944611909,0.906337253,1.082813901,113.3255814,50515,R,18,18,20,,
-90017,202003,100,53477,149,0.1,0.1,1.058635817,,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,
-90018,202001,100,13845,126,0.1,0.1,,0.543204684,,,,1.835663813,132.8421946,13845,R,,18,20,,TRUE
-90018,202002,100,25488,126,0.1,0.1,1.840926688,0.929916997,,0.929916997,0.906337253,1.082813901,113.3255814,25488,R,18,18,20,TRUE,
-90018,202003,100,27409,126,0.1,0.1,1.075364795,,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,
-90019,202001,100,1099,6,0.1,0.1,,2.530969376,,2.530969376,,1.835663813,132.8421946,1099,R,,18,20,,
-90019,202002,100,434,6,0.1,0.1,0.395105531,3.51659919,0.395105531,,0.906337253,1.082813901,113.3255814,434,R,18,18,20,,TRUE
-90019,202003,100,124,6,0.1,0.1,0.284365646,,,,1.072463185,,126.2596455,124,R,18,,21,TRUE,
-90020,202001,100,3348,22,0.1,0.1,,1.677715809,,1.677715809,,1.835663813,132.8421946,3348,R,,18,20,,
-90020,202002,100,1996,22,0.1,0.1,0.596048505,0.395102278,0.596048505,,0.906337253,1.082813901,113.3255814,1996,R,18,18,20,,TRUE
-90020,202003,100,5051,22,0.1,0.1,2.530990214,,,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,
-90021,202001,100,,155,0.1,0.1,,,,,,1.835663813,132.8421946,41832.76156,BI,,18,20,,
-90021,202002,100,,155,0.1,0.1,,,,,0.906337253,1.082813901,113.3255814,22788.90135,BI,18,18,20,,
-90021,202003,100,21046,155,0.1,0.1,,,,,1.072463185,,126.2596455,21046,R,18,,21,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+90001,202001,100,9244,89,,1.036787797,,1.036787797,,1.835663813,132.8421946,9244,R,,18,20,,
+90001,202002,100,8916,89,0.964517525,1.43945754,0.964517525,1.43945754,0.906337253,1.082813901,113.3255814,8916,R,18,18,20,,
+90001,202003,100,6194,89,0.694706146,,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,
+90002,202001,100,4826,83,,0.817550398,,0.817550398,,1.835663813,132.8421946,4826,R,,18,20,,
+90002,202002,100,5903,83,1.223166183,1.244570947,1.223166183,1.244570947,0.906337253,1.082813901,113.3255814,5903,R,18,18,20,,
+90002,202003,100,4743,83,0.803489751,,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,
+90003,202001,100,7586,4,,7.466535433,,7.466535433,,1.835663813,132.8421946,7586,R,,18,20,,
+90003,202002,100,1016,4,0.133930925,0.710986704,0.133930925,0.710986704,0.906337253,1.082813901,113.3255814,1016,R,18,18,20,,
+90003,202003,100,1429,4,1.406496063,,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,
+90004,202001,100,3975,76,,1.305847569,,1.305847569,,1.835663813,132.8421946,3975,R,,18,20,,
+90004,202002,100,3044,76,0.765786164,0.82875034,0.765786164,0.82875034,0.906337253,1.082813901,113.3255814,3044,R,18,18,20,,
+90004,202003,100,3673,76,1.206636005,,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,
+90005,202001,100,1941,18,,0.622072678,,0.622072678,,1.835663813,132.8421946,1941,R,,18,20,,
+90005,202002,100,3121,18,1.607529208,2.583641738,1.607529208,2.583641738,0.906337253,1.082813901,113.3255814,3121,R,18,18,20,,
+90005,202003,100,1208,18,0.387050567,,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,
+90006,202001,100,5405,94,,0.763047038,,0.763047038,,1.835663813,132.8421946,5405,R,,18,20,,
+90006,202002,100,7084,94,1.310535196,1.422366796,1.310535196,1.422366796,0.906337253,1.082813901,113.3255814,7084,R,18,18,20,,
+90006,202003,100,4980,94,0.703053532,,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,
+90007,202001,100,15172,8,,5.333239595,,5.333239595,,1.835663813,132.8421946,15172,R,,18,20,,
+90007,202002,100,2845,8,0.187503296,0.812556233,0.187503296,0.812556233,0.906337253,1.082813901,113.3255814,2845,R,18,18,20,,
+90007,202003,100,3501,8,1.230684055,,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,
+90008,202001,100,16298,304,,1.129530598,,1.129530598,,1.835663813,132.8421946,16298,R,,18,20,,
+90008,202002,100,14429,304,0.885323516,1.009357249,0.885323516,1.009357249,0.906337253,1.082813901,113.3255814,14429,R,18,18,20,,
+90008,202003,100,14295,304,0.990729498,,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,
+90009,202001,100,3698,45,,0.740562712,,0.740562712,,1.835663813,132.8421946,3698,R,,18,20,,
+90009,202002,100,4993,45,1.350324535,1.185435621,1.350324535,1.185435621,0.906337253,1.082813901,113.3255814,4993,R,18,18,20,,
+90009,202003,100,4212,45,0.843571749,,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,
+90010,202001,100,7722,100,,0.760511998,,0.760511998,,1.835663813,132.8421946,7722,R,,18,20,,
+90010,202002,100,10153,100,1.314903647,1.551204368,1.314903647,1.551204368,0.906337253,1.082813901,113.3255814,10153,R,18,18,20,,
+90010,202003,100,6545,100,0.644660382,,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,
+90011,202001,100,30344,19,,8.365866031,,,,1.835663813,132.8421946,30344,R,,18,20,,TRUE
+90011,202002,100,3627,19,0.119533351,0.497690693,,0.497690693,0.906337253,1.082813901,113.3255814,3627,R,18,18,20,TRUE,
+90011,202003,100,7288,19,2.00928009,,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,
+90012,202001,100,16298,304,,1.408940798,,1.408940798,,1.835663813,132.8421946,16298,R,,18,20,,
+90012,202002,100,11567,304,0.70975303,0.857831504,0.70975303,0.857831504,0.906337253,1.082813901,113.3255814,11567,R,18,18,20,,
+90012,202003,100,13484,304,1.165730094,,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,
+90013,202001,100,20190,54,,1.106799294,,1.106799294,,1.835663813,132.8421946,20190,R,,18,20,,
+90013,202002,100,18242,54,0.903506178,0.632817595,0.903506178,0.632817595,0.906337253,1.082813901,113.3255814,18242,R,18,18,20,,
+90013,202003,100,28826,54,1.58023419,,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,
+90014,202001,100,4260,47,,0.845985046,,0.845985046,,1.835663813,132.8421946,4260,R,,18,20,,
+90014,202002,100,5036,42,1.182053991,0.776557765,1.182053991,0.776557765,0.906337253,1.082813901,113.3255814,5036,R,18,18,20,,
+90014,202003,100,6484,42,1.28773421,,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,
+90015,202001,100,19236,57,,3.886845827,,3.886845827,,1.835663813,132.8421946,19236,R,,18,20,,
+90015,202002,100,4949,57,0.25727802,1.396267404,0.25727802,1.396267404,0.906337253,1.082813901,113.3255814,4949,R,18,18,20,,
+90015,202003,100,3544,57,0.716195191,,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,
+90016,202001,100,14902,163,,0.906730921,,0.906730921,,1.835663813,132.8421946,14902,R,,18,20,,
+90016,202002,100,16435,163,1.102863018,0.666628808,1.102863018,0.666628808,0.906337253,1.082813901,113.3255814,16435,R,18,18,20,,
+90016,202003,100,24653,163,1.500085186,,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,
+90017,202001,100,35476,149,,0.702275751,,0.702275751,,1.835663813,132.8421946,35476,R,,18,20,,
+90017,202002,100,50515,149,1.42394209,0.944611909,1.42394209,0.944611909,0.906337253,1.082813901,113.3255814,50515,R,18,18,20,,
+90017,202003,100,53477,149,1.058635817,,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,
+90018,202001,100,13845,126,,0.543204684,,,,1.835663813,132.8421946,13845,R,,18,20,,TRUE
+90018,202002,100,25488,126,1.840926688,0.929916997,,0.929916997,0.906337253,1.082813901,113.3255814,25488,R,18,18,20,TRUE,
+90018,202003,100,27409,126,1.075364795,,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,
+90019,202001,100,1099,6,,2.530969376,,2.530969376,,1.835663813,132.8421946,1099,R,,18,20,,
+90019,202002,100,434,6,0.395105531,3.51659919,0.395105531,,0.906337253,1.082813901,113.3255814,434,R,18,18,20,,TRUE
+90019,202003,100,124,6,0.284365646,,,,1.072463185,,126.2596455,124,R,18,,21,TRUE,
+90020,202001,100,3348,22,,1.677715809,,1.677715809,,1.835663813,132.8421946,3348,R,,18,20,,
+90020,202002,100,1996,22,0.596048505,0.395102278,0.596048505,,0.906337253,1.082813901,113.3255814,1996,R,18,18,20,,TRUE
+90020,202003,100,5051,22,2.530990214,,,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,
+90021,202001,100,,155,,,,,,1.835663813,132.8421946,41832.76156,BI,,18,20,,
+90021,202002,100,,155,,,,,0.906337253,1.082813901,113.3255814,22788.90135,BI,18,18,20,,
+90021,202003,100,21046,155,,,,,1.072463185,,126.2596455,21046,R,18,,21,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_input.csv
index 3ff1ab70..eb2b6feb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_input.csv
@@ -1,64 +1,64 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-100001,202001,100,9244,89,0.05,0.05
-100001,202002,100,8916,89,0.05,0.05
-100001,202003,100,6194,89,0.05,0.05
-100002,202001,100,4826,83,0.05,0.05
-100002,202002,100,5903,83,0.05,0.05
-100002,202003,100,4743,83,0.05,0.05
-100003,202001,100,7586,4,0.05,0.05
-100003,202002,100,1016,4,0.05,0.05
-100003,202003,100,1429,4,0.05,0.05
-100004,202001,100,3975,76,0.05,0.05
-100004,202002,100,3044,76,0.05,0.05
-100004,202003,100,3673,76,0.05,0.05
-100005,202001,100,1941,18,0.05,0.05
-100005,202002,100,3121,18,0.05,0.05
-100005,202003,100,1208,18,0.05,0.05
-100006,202001,100,5405,94,0.05,0.05
-100006,202002,100,7084,94,0.05,0.05
-100006,202003,100,4980,94,0.05,0.05
-100007,202001,100,15172,8,0.05,0.05
-100007,202002,100,2845,8,0.05,0.05
-100007,202003,100,3501,8,0.05,0.05
-100008,202001,100,16298,304,0.05,0.05
-100008,202002,100,14429,304,0.05,0.05
-100008,202003,100,14295,304,0.05,0.05
-100009,202001,100,3698,45,0.05,0.05
-100009,202002,100,4993,45,0.05,0.05
-100009,202003,100,4212,45,0.05,0.05
-100010,202001,100,7722,100,0.05,0.05
-100010,202002,100,10153,100,0.05,0.05
-100010,202003,100,6545,100,0.05,0.05
-100011,202001,100,30344,19,0.05,0.05
-100011,202002,100,3627,19,0.05,0.05
-100011,202003,100,7288,19,0.05,0.05
-100012,202001,100,16298,304,0.05,0.05
-100012,202002,100,11567,304,0.05,0.05
-100012,202003,100,13484,304,0.05,0.05
-100013,202001,100,20190,54,0.05,0.05
-100013,202002,100,18242,54,0.05,0.05
-100013,202003,100,28826,54,0.05,0.05
-100014,202001,100,4260,47,0.05,0.05
-100014,202002,100,5036,42,0.05,0.05
-100014,202003,100,6484,42,0.05,0.05
-100015,202001,100,19236,57,0.05,0.05
-100015,202002,100,4949,57,0.05,0.05
-100015,202003,100,3544,57,0.05,0.05
-100016,202001,100,14902,163,0.05,0.05
-100016,202002,100,16435,163,0.05,0.05
-100016,202003,100,24653,163,0.05,0.05
-100017,202001,100,35476,149,0.05,0.05
-100017,202002,100,50515,149,0.05,0.05
-100017,202003,100,53477,149,0.05,0.05
-100018,202001,100,13845,126,0.05,0.05
-100018,202002,100,25488,126,0.05,0.05
-100018,202003,100,27409,126,0.05,0.05
-100019,202001,100,1099,6,0.05,0.05
-100019,202002,100,434,6,0.05,0.05
-100019,202003,100,124,6,0.05,0.05
-100020,202001,100,3348,22,0.05,0.05
-100020,202002,100,1996,22,0.05,0.05
-100020,202003,100,5051,22,0.05,0.05
-100021,202001,100,,155,0.05,0.05
-100021,202002,100,,155,0.05,0.05
-100021,202003,100,21046,155,0.05,0.05
+identifier,date,group,question,other
+100001,202001,100,9244,89
+100001,202002,100,8916,89
+100001,202003,100,6194,89
+100002,202001,100,4826,83
+100002,202002,100,5903,83
+100002,202003,100,4743,83
+100003,202001,100,7586,4
+100003,202002,100,1016,4
+100003,202003,100,1429,4
+100004,202001,100,3975,76
+100004,202002,100,3044,76
+100004,202003,100,3673,76
+100005,202001,100,1941,18
+100005,202002,100,3121,18
+100005,202003,100,1208,18
+100006,202001,100,5405,94
+100006,202002,100,7084,94
+100006,202003,100,4980,94
+100007,202001,100,15172,8
+100007,202002,100,2845,8
+100007,202003,100,3501,8
+100008,202001,100,16298,304
+100008,202002,100,14429,304
+100008,202003,100,14295,304
+100009,202001,100,3698,45
+100009,202002,100,4993,45
+100009,202003,100,4212,45
+100010,202001,100,7722,100
+100010,202002,100,10153,100
+100010,202003,100,6545,100
+100011,202001,100,30344,19
+100011,202002,100,3627,19
+100011,202003,100,7288,19
+100012,202001,100,16298,304
+100012,202002,100,11567,304
+100012,202003,100,13484,304
+100013,202001,100,20190,54
+100013,202002,100,18242,54
+100013,202003,100,28826,54
+100014,202001,100,4260,47
+100014,202002,100,5036,42
+100014,202003,100,6484,42
+100015,202001,100,19236,57
+100015,202002,100,4949,57
+100015,202003,100,3544,57
+100016,202001,100,14902,163
+100016,202002,100,16435,163
+100016,202003,100,24653,163
+100017,202001,100,35476,149
+100017,202002,100,50515,149
+100017,202003,100,53477,149
+100018,202001,100,13845,126
+100018,202002,100,25488,126
+100018,202003,100,27409,126
+100019,202001,100,1099,6
+100019,202002,100,434,6
+100019,202003,100,124,6
+100020,202001,100,3348,22
+100020,202002,100,1996,22
+100020,202003,100,5051,22
+100021,202001,100,,155
+100021,202002,100,,155
+100021,202003,100,21046,155
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index 83b82bde..104523aa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-100001,202001,100,9244,89,0.05,0.05,,1.036787797,,1.036787797,,2.097550968,132.8421946,9244,R,,20,20,,
-100001,202002,100,8916,89,0.05,0.05,0.964517525,1.43945754,0.964517525,1.43945754,0.91372653,1.170117584,113.3255814,8916,R,20,20,20,,
-100001,202003,100,6194,89,0.05,0.05,0.694706146,,0.694706146,,1.105984659,,126.2596455,6194,R,20,,21,,
-100002,202001,100,4826,83,0.05,0.05,,0.817550398,,0.817550398,,2.097550968,132.8421946,4826,R,,20,20,,
-100002,202002,100,5903,83,0.05,0.05,1.223166183,1.244570947,1.223166183,1.244570947,0.91372653,1.170117584,113.3255814,5903,R,20,20,20,,
-100002,202003,100,4743,83,0.05,0.05,0.803489751,,0.803489751,,1.105984659,,126.2596455,4743,R,20,,21,,
-100003,202001,100,7586,4,0.05,0.05,,7.466535433,,7.466535433,,2.097550968,132.8421946,7586,R,,20,20,,
-100003,202002,100,1016,4,0.05,0.05,0.133930925,0.710986704,0.133930925,0.710986704,0.91372653,1.170117584,113.3255814,1016,R,20,20,20,,
-100003,202003,100,1429,4,0.05,0.05,1.406496063,,1.406496063,,1.105984659,,126.2596455,1429,R,20,,21,,
-100004,202001,100,3975,76,0.05,0.05,,1.305847569,,1.305847569,,2.097550968,132.8421946,3975,R,,20,20,,
-100004,202002,100,3044,76,0.05,0.05,0.765786164,0.82875034,0.765786164,0.82875034,0.91372653,1.170117584,113.3255814,3044,R,20,20,20,,
-100004,202003,100,3673,76,0.05,0.05,1.206636005,,1.206636005,,1.105984659,,126.2596455,3673,R,20,,21,,
-100005,202001,100,1941,18,0.05,0.05,,0.622072678,,0.622072678,,2.097550968,132.8421946,1941,R,,20,20,,
-100005,202002,100,3121,18,0.05,0.05,1.607529208,2.583641738,1.607529208,2.583641738,0.91372653,1.170117584,113.3255814,3121,R,20,20,20,,
-100005,202003,100,1208,18,0.05,0.05,0.387050567,,0.387050567,,1.105984659,,126.2596455,1208,R,20,,21,,
-100006,202001,100,5405,94,0.05,0.05,,0.763047038,,0.763047038,,2.097550968,132.8421946,5405,R,,20,20,,
-100006,202002,100,7084,94,0.05,0.05,1.310535196,1.422366796,1.310535196,1.422366796,0.91372653,1.170117584,113.3255814,7084,R,20,20,20,,
-100006,202003,100,4980,94,0.05,0.05,0.703053532,,0.703053532,,1.105984659,,126.2596455,4980,R,20,,21,,
-100007,202001,100,15172,8,0.05,0.05,,5.333239595,,5.333239595,,2.097550968,132.8421946,15172,R,,20,20,,
-100007,202002,100,2845,8,0.05,0.05,0.187503296,0.812556233,0.187503296,0.812556233,0.91372653,1.170117584,113.3255814,2845,R,20,20,20,,
-100007,202003,100,3501,8,0.05,0.05,1.230684055,,1.230684055,,1.105984659,,126.2596455,3501,R,20,,21,,
-100008,202001,100,16298,304,0.05,0.05,,1.129530598,,1.129530598,,2.097550968,132.8421946,16298,R,,20,20,,
-100008,202002,100,14429,304,0.05,0.05,0.885323516,1.009357249,0.885323516,1.009357249,0.91372653,1.170117584,113.3255814,14429,R,20,20,20,,
-100008,202003,100,14295,304,0.05,0.05,0.990729498,,0.990729498,,1.105984659,,126.2596455,14295,R,20,,21,,
-100009,202001,100,3698,45,0.05,0.05,,0.740562712,,0.740562712,,2.097550968,132.8421946,3698,R,,20,20,,
-100009,202002,100,4993,45,0.05,0.05,1.350324535,1.185435621,1.350324535,1.185435621,0.91372653,1.170117584,113.3255814,4993,R,20,20,20,,
-100009,202003,100,4212,45,0.05,0.05,0.843571749,,0.843571749,,1.105984659,,126.2596455,4212,R,20,,21,,
-100010,202001,100,7722,100,0.05,0.05,,0.760511998,,0.760511998,,2.097550968,132.8421946,7722,R,,20,20,,
-100010,202002,100,10153,100,0.05,0.05,1.314903647,1.551204368,1.314903647,1.551204368,0.91372653,1.170117584,113.3255814,10153,R,20,20,20,,
-100010,202003,100,6545,100,0.05,0.05,0.644660382,,0.644660382,,1.105984659,,126.2596455,6545,R,20,,21,,
-100011,202001,100,30344,19,0.05,0.05,,8.365866031,,8.365866031,,2.097550968,132.8421946,30344,R,,20,20,,
-100011,202002,100,3627,19,0.05,0.05,0.119533351,0.497690693,0.119533351,0.497690693,0.91372653,1.170117584,113.3255814,3627,R,20,20,20,,
-100011,202003,100,7288,19,0.05,0.05,2.00928009,,2.00928009,,1.105984659,,126.2596455,7288,R,20,,21,,
-100012,202001,100,16298,304,0.05,0.05,,1.408940798,,1.408940798,,2.097550968,132.8421946,16298,R,,20,20,,
-100012,202002,100,11567,304,0.05,0.05,0.70975303,0.857831504,0.70975303,0.857831504,0.91372653,1.170117584,113.3255814,11567,R,20,20,20,,
-100012,202003,100,13484,304,0.05,0.05,1.165730094,,1.165730094,,1.105984659,,126.2596455,13484,R,20,,21,,
-100013,202001,100,20190,54,0.05,0.05,,1.106799294,,1.106799294,,2.097550968,132.8421946,20190,R,,20,20,,
-100013,202002,100,18242,54,0.05,0.05,0.903506178,0.632817595,0.903506178,0.632817595,0.91372653,1.170117584,113.3255814,18242,R,20,20,20,,
-100013,202003,100,28826,54,0.05,0.05,1.58023419,,1.58023419,,1.105984659,,126.2596455,28826,R,20,,21,,
-100014,202001,100,4260,47,0.05,0.05,,0.845985046,,0.845985046,,2.097550968,132.8421946,4260,R,,20,20,,
-100014,202002,100,5036,42,0.05,0.05,1.182053991,0.776557765,1.182053991,0.776557765,0.91372653,1.170117584,113.3255814,5036,R,20,20,20,,
-100014,202003,100,6484,42,0.05,0.05,1.28773421,,1.28773421,,1.105984659,,126.2596455,6484,R,20,,21,,
-100015,202001,100,19236,57,0.05,0.05,,3.886845827,,3.886845827,,2.097550968,132.8421946,19236,R,,20,20,,
-100015,202002,100,4949,57,0.05,0.05,0.25727802,1.396267404,0.25727802,1.396267404,0.91372653,1.170117584,113.3255814,4949,R,20,20,20,,
-100015,202003,100,3544,57,0.05,0.05,0.716195191,,0.716195191,,1.105984659,,126.2596455,3544,R,20,,21,,
-100016,202001,100,14902,163,0.05,0.05,,0.906730921,,0.906730921,,2.097550968,132.8421946,14902,R,,20,20,,
-100016,202002,100,16435,163,0.05,0.05,1.102863018,0.666628808,1.102863018,0.666628808,0.91372653,1.170117584,113.3255814,16435,R,20,20,20,,
-100016,202003,100,24653,163,0.05,0.05,1.500085186,,1.500085186,,1.105984659,,126.2596455,24653,R,20,,21,,
-100017,202001,100,35476,149,0.05,0.05,,0.702275751,,0.702275751,,2.097550968,132.8421946,35476,R,,20,20,,
-100017,202002,100,50515,149,0.05,0.05,1.42394209,0.944611909,1.42394209,0.944611909,0.91372653,1.170117584,113.3255814,50515,R,20,20,20,,
-100017,202003,100,53477,149,0.05,0.05,1.058635817,,1.058635817,,1.105984659,,126.2596455,53477,R,20,,21,,
-100018,202001,100,13845,126,0.05,0.05,,0.543204684,,0.543204684,,2.097550968,132.8421946,13845,R,,20,20,,
-100018,202002,100,25488,126,0.05,0.05,1.840926688,0.929916997,1.840926688,0.929916997,0.91372653,1.170117584,113.3255814,25488,R,20,20,20,,
-100018,202003,100,27409,126,0.05,0.05,1.075364795,,1.075364795,,1.105984659,,126.2596455,27409,R,20,,21,,
-100019,202001,100,1099,6,0.05,0.05,,2.530969376,,2.530969376,,2.097550968,132.8421946,1099,R,,20,20,,
-100019,202002,100,434,6,0.05,0.05,0.395105531,3.51659919,0.395105531,3.51659919,0.91372653,1.170117584,113.3255814,434,R,20,20,20,,
-100019,202003,100,124,6,0.05,0.05,0.284365646,,0.284365646,,1.105984659,,126.2596455,124,R,20,,21,,
-100020,202001,100,3348,22,0.05,0.05,,1.677715809,,1.677715809,,2.097550968,132.8421946,3348,R,,20,20,,
-100020,202002,100,1996,22,0.05,0.05,0.596048505,0.395102278,0.596048505,0.395102278,0.91372653,1.170117584,113.3255814,1996,R,20,20,20,,
-100020,202003,100,5051,22,0.05,0.05,2.530990214,,2.530990214,,1.105984659,,126.2596455,5051,R,20,,21,,
-100021,202001,100,,155,0.05,0.05,,,,,,2.097550968,132.8421946,51654.90822,BI,,20,20,,
-100021,202002,100,,155,0.05,0.05,,,,,0.91372653,1.170117584,113.3255814,24626.29467,BI,20,20,20,,
-100021,202003,100,21046,155,0.05,0.05,,,,,1.105984659,,126.2596455,21046,R,20,,21,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+100001,202001,100,9244,89,,1.036787797,,1.036787797,,2.097550968,132.8421946,9244,R,,20,20
+100001,202002,100,8916,89,0.964517525,1.43945754,0.964517525,1.43945754,0.91372653,1.170117584,113.3255814,8916,R,20,20,20
+100001,202003,100,6194,89,0.694706146,,0.694706146,,1.105984659,,126.2596455,6194,R,20,,21
+100002,202001,100,4826,83,,0.817550398,,0.817550398,,2.097550968,132.8421946,4826,R,,20,20
+100002,202002,100,5903,83,1.223166183,1.244570947,1.223166183,1.244570947,0.91372653,1.170117584,113.3255814,5903,R,20,20,20
+100002,202003,100,4743,83,0.803489751,,0.803489751,,1.105984659,,126.2596455,4743,R,20,,21
+100003,202001,100,7586,4,,7.466535433,,7.466535433,,2.097550968,132.8421946,7586,R,,20,20
+100003,202002,100,1016,4,0.133930925,0.710986704,0.133930925,0.710986704,0.91372653,1.170117584,113.3255814,1016,R,20,20,20
+100003,202003,100,1429,4,1.406496063,,1.406496063,,1.105984659,,126.2596455,1429,R,20,,21
+100004,202001,100,3975,76,,1.305847569,,1.305847569,,2.097550968,132.8421946,3975,R,,20,20
+100004,202002,100,3044,76,0.765786164,0.82875034,0.765786164,0.82875034,0.91372653,1.170117584,113.3255814,3044,R,20,20,20
+100004,202003,100,3673,76,1.206636005,,1.206636005,,1.105984659,,126.2596455,3673,R,20,,21
+100005,202001,100,1941,18,,0.622072678,,0.622072678,,2.097550968,132.8421946,1941,R,,20,20
+100005,202002,100,3121,18,1.607529208,2.583641738,1.607529208,2.583641738,0.91372653,1.170117584,113.3255814,3121,R,20,20,20
+100005,202003,100,1208,18,0.387050567,,0.387050567,,1.105984659,,126.2596455,1208,R,20,,21
+100006,202001,100,5405,94,,0.763047038,,0.763047038,,2.097550968,132.8421946,5405,R,,20,20
+100006,202002,100,7084,94,1.310535196,1.422366796,1.310535196,1.422366796,0.91372653,1.170117584,113.3255814,7084,R,20,20,20
+100006,202003,100,4980,94,0.703053532,,0.703053532,,1.105984659,,126.2596455,4980,R,20,,21
+100007,202001,100,15172,8,,5.333239595,,5.333239595,,2.097550968,132.8421946,15172,R,,20,20
+100007,202002,100,2845,8,0.187503296,0.812556233,0.187503296,0.812556233,0.91372653,1.170117584,113.3255814,2845,R,20,20,20
+100007,202003,100,3501,8,1.230684055,,1.230684055,,1.105984659,,126.2596455,3501,R,20,,21
+100008,202001,100,16298,304,,1.129530598,,1.129530598,,2.097550968,132.8421946,16298,R,,20,20
+100008,202002,100,14429,304,0.885323516,1.009357249,0.885323516,1.009357249,0.91372653,1.170117584,113.3255814,14429,R,20,20,20
+100008,202003,100,14295,304,0.990729498,,0.990729498,,1.105984659,,126.2596455,14295,R,20,,21
+100009,202001,100,3698,45,,0.740562712,,0.740562712,,2.097550968,132.8421946,3698,R,,20,20
+100009,202002,100,4993,45,1.350324535,1.185435621,1.350324535,1.185435621,0.91372653,1.170117584,113.3255814,4993,R,20,20,20
+100009,202003,100,4212,45,0.843571749,,0.843571749,,1.105984659,,126.2596455,4212,R,20,,21
+100010,202001,100,7722,100,,0.760511998,,0.760511998,,2.097550968,132.8421946,7722,R,,20,20
+100010,202002,100,10153,100,1.314903647,1.551204368,1.314903647,1.551204368,0.91372653,1.170117584,113.3255814,10153,R,20,20,20
+100010,202003,100,6545,100,0.644660382,,0.644660382,,1.105984659,,126.2596455,6545,R,20,,21
+100011,202001,100,30344,19,,8.365866031,,8.365866031,,2.097550968,132.8421946,30344,R,,20,20
+100011,202002,100,3627,19,0.119533351,0.497690693,0.119533351,0.497690693,0.91372653,1.170117584,113.3255814,3627,R,20,20,20
+100011,202003,100,7288,19,2.00928009,,2.00928009,,1.105984659,,126.2596455,7288,R,20,,21
+100012,202001,100,16298,304,,1.408940798,,1.408940798,,2.097550968,132.8421946,16298,R,,20,20
+100012,202002,100,11567,304,0.70975303,0.857831504,0.70975303,0.857831504,0.91372653,1.170117584,113.3255814,11567,R,20,20,20
+100012,202003,100,13484,304,1.165730094,,1.165730094,,1.105984659,,126.2596455,13484,R,20,,21
+100013,202001,100,20190,54,,1.106799294,,1.106799294,,2.097550968,132.8421946,20190,R,,20,20
+100013,202002,100,18242,54,0.903506178,0.632817595,0.903506178,0.632817595,0.91372653,1.170117584,113.3255814,18242,R,20,20,20
+100013,202003,100,28826,54,1.58023419,,1.58023419,,1.105984659,,126.2596455,28826,R,20,,21
+100014,202001,100,4260,47,,0.845985046,,0.845985046,,2.097550968,132.8421946,4260,R,,20,20
+100014,202002,100,5036,42,1.182053991,0.776557765,1.182053991,0.776557765,0.91372653,1.170117584,113.3255814,5036,R,20,20,20
+100014,202003,100,6484,42,1.28773421,,1.28773421,,1.105984659,,126.2596455,6484,R,20,,21
+100015,202001,100,19236,57,,3.886845827,,3.886845827,,2.097550968,132.8421946,19236,R,,20,20
+100015,202002,100,4949,57,0.25727802,1.396267404,0.25727802,1.396267404,0.91372653,1.170117584,113.3255814,4949,R,20,20,20
+100015,202003,100,3544,57,0.716195191,,0.716195191,,1.105984659,,126.2596455,3544,R,20,,21
+100016,202001,100,14902,163,,0.906730921,,0.906730921,,2.097550968,132.8421946,14902,R,,20,20
+100016,202002,100,16435,163,1.102863018,0.666628808,1.102863018,0.666628808,0.91372653,1.170117584,113.3255814,16435,R,20,20,20
+100016,202003,100,24653,163,1.500085186,,1.500085186,,1.105984659,,126.2596455,24653,R,20,,21
+100017,202001,100,35476,149,,0.702275751,,0.702275751,,2.097550968,132.8421946,35476,R,,20,20
+100017,202002,100,50515,149,1.42394209,0.944611909,1.42394209,0.944611909,0.91372653,1.170117584,113.3255814,50515,R,20,20,20
+100017,202003,100,53477,149,1.058635817,,1.058635817,,1.105984659,,126.2596455,53477,R,20,,21
+100018,202001,100,13845,126,,0.543204684,,0.543204684,,2.097550968,132.8421946,13845,R,,20,20
+100018,202002,100,25488,126,1.840926688,0.929916997,1.840926688,0.929916997,0.91372653,1.170117584,113.3255814,25488,R,20,20,20
+100018,202003,100,27409,126,1.075364795,,1.075364795,,1.105984659,,126.2596455,27409,R,20,,21
+100019,202001,100,1099,6,,2.530969376,,2.530969376,,2.097550968,132.8421946,1099,R,,20,20
+100019,202002,100,434,6,0.395105531,3.51659919,0.395105531,3.51659919,0.91372653,1.170117584,113.3255814,434,R,20,20,20
+100019,202003,100,124,6,0.284365646,,0.284365646,,1.105984659,,126.2596455,124,R,20,,21
+100020,202001,100,3348,22,,1.677715809,,1.677715809,,2.097550968,132.8421946,3348,R,,20,20
+100020,202002,100,1996,22,0.596048505,0.395102278,0.596048505,0.395102278,0.91372653,1.170117584,113.3255814,1996,R,20,20,20
+100020,202003,100,5051,22,2.530990214,,2.530990214,,1.105984659,,126.2596455,5051,R,20,,21
+100021,202001,100,,155,,,,,,2.097550968,132.8421946,51654.90822,BI,,20,20
+100021,202002,100,,155,,,,,0.91372653,1.170117584,113.3255814,24626.29467,BI,20,20,20
+100021,202003,100,21046,155,,,,,1.105984659,,126.2596455,21046,R,20,,21
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_input.csv
index dca0e398..3bee5342 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_input.csv
@@ -1,35 +1,35 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c
-30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.598925527,96.75644028,8444,R,,10,12
-30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,6.802558774,4.305953095,76.3852459,7476,R,10,9,12
-30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.126581418,,66.21860465,2003,R,9,,9
-30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.930792743,96.75644028,9343,R,,10,12
-30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,6.802558774,4.305953095,76.3852459,7818,R,10,9,12
-30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.126581418,,66.21860465,4897,R,9,,9
-30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.930792743,96.75644028,7511,R,,10,12
-30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,6.802558774,4.305953095,76.3852459,1761,R,10,9,12
-30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.126581418,,66.21860465,6492,R,9,,9
-30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.930792743,96.75644028,64,R,,10,12
-30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,6.802558774,4.305953095,76.3852459,2113,R,10,9,12
-30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.126581418,,66.21860465,185,R,9,,9
-30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.930792743,96.75644028,844,R,,10,12
-30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,6.802558774,4.305953095,76.3852459,897,R,10,9,12
-30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.126581418,,66.21860465,280,R,9,,9
-30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.930792743,96.75644028,1869,R,,10,12
-30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,6.802558774,4.305953095,76.3852459,1876,R,10,9,12
-30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.126581418,,66.21860465,1371,R,9,,9
-30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.930792743,96.75644028,12769,R,,10,12
-30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,6.802558774,4.305953095,76.3852459,2853,R,10,9,12
-30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.126581418,,66.21860465,11491,R,9,,9
-30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.930792743,96.75644028,141,R,,10,12
-30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,13.86213906,6.802558774,4.305953095,76.3852459,6001,R,10,9,12
-30008,202003,100,433,162,0.1,0.1,0.072138939,,0.072138939,,1.126581418,,66.21860465,433,R,9,,9
-30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.930792743,96.75644028,6417,R,,10,12
-30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,6.802558774,4.305953095,76.3852459,4037,R,10,9,12
-30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.126581418,,66.21860465,1322,R,9,,9
-30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.930792743,96.75644028,28963,R,,10,12
-30010,202002,100,21734,144,0.1,0.1,0.750399298,,0.750399298,,6.802558774,4.305953095,76.3852459,21734,R,10,9,12
-30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.930792743,96.75644028,6009,R,,10,12
-30011,202002,100,1145,5,0.1,0.1,0.190495606,,,,6.802558774,4.305953095,76.3852459,1145,R,10,9,12
-30012,202001,100,256,275,0.1,0.1,,0.034032235,,0.034032235,,1.930792743,96.75644028,256,R,,10,12
-30012,202002,100,7522,275,0.1,0.1,29.38390625,,29.38390625,,6.802558774,4.305953095,76.3852459,7522,R,10,9,12
-30012,202003,100,,275,0.1,0.1,,,,,1.126581418,,66.21860465,8474.145427,FIR,9,,9
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30012,202001,100,256,275
+30012,202002,100,7522,275
+30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index 5ad2a0ab..e30d9287 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,35 +1,35 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-30001,202001,100,8444,51,0.1,0.1,,1.129481006,,1.129481006,,1.598925527,96.75644028,8444,R,,10,12,,
-30001,202002,100,7476,51,0.1,0.1,0.885362387,3.732401398,0.885362387,3.732401398,6.802558774,4.305953095,76.3852459,7476,R,10,9,12,,
-30001,202003,100,2003,51,0.1,0.1,0.267924024,,0.267924024,,1.126581418,,66.21860465,2003,R,9,,9,,
-30002,202001,100,9343,72,0.1,0.1,,1.195062676,,1.195062676,,1.930792743,96.75644028,9343,R,,10,12,,
-30002,202002,100,7818,72,0.1,0.1,0.836776196,1.596487645,0.836776196,1.596487645,6.802558774,4.305953095,76.3852459,7818,R,10,9,12,,
-30002,202003,100,4897,72,0.1,0.1,0.626375032,,0.626375032,,1.126581418,,66.21860465,4897,R,9,,9,,
-30003,202001,100,7511,7,0.1,0.1,,4.265190233,,4.265190233,,1.930792743,96.75644028,7511,R,,10,12,,
-30003,202002,100,1761,7,0.1,0.1,0.234456131,0.271256932,0.234456131,0.271256932,6.802558774,4.305953095,76.3852459,1761,R,10,9,12,,
-30003,202003,100,6492,7,0.1,0.1,3.686541738,,3.686541738,,1.126581418,,66.21860465,6492,R,9,,9,,
-30004,202001,100,64,81,0.1,0.1,,0.030288689,,0.030288689,,1.930792743,96.75644028,64,R,,10,12,,
-30004,202002,100,2113,81,0.1,0.1,33.015625,11.42162162,33.015625,11.42162162,6.802558774,4.305953095,76.3852459,2113,R,10,9,12,,
-30004,202003,100,185,81,0.1,0.1,0.087553242,,0.087553242,,1.126581418,,66.21860465,185,R,9,,9,,
-30005,202001,100,844,5,0.1,0.1,,0.941234172,,0.941234172,,1.930792743,96.75644028,844,R,,10,12,,
-30005,202002,100,897,5,0.1,0.1,1.062434865,3.199201198,1.062434865,3.199201198,6.802558774,4.305953095,76.3852459,897,R,10,9,12,,
-30005,202003,100,280,5,0.1,0.1,0.312578027,,0.312578027,,1.126581418,,66.21860465,280,R,9,,9,,
-30006,202001,100,1869,14,0.1,0.1,,0.995885563,,0.995885563,,1.930792743,96.75644028,1869,R,,10,12,,
-30006,202002,100,1876,14,0.1,0.1,1.004131435,1.368417982,1.004131435,1.368417982,6.802558774,4.305953095,76.3852459,1876,R,10,9,12,,
-30006,202003,100,1371,14,0.1,0.1,0.730770871,,0.730770871,,1.126581418,,66.21860465,1371,R,9,,9,,
-30007,202001,100,12769,12,0.1,0.1,,4.475816911,,4.475816911,,1.930792743,96.75644028,12769,R,,10,12,,
-30007,202002,100,2853,12,0.1,0.1,0.223422901,0.248269056,0.223422901,0.248269056,6.802558774,4.305953095,76.3852459,2853,R,10,9,12,,
-30007,202003,100,11491,12,0.1,0.1,4.027888195,,4.027888195,,1.126581418,,66.21860465,11491,R,9,,9,,
-30008,202001,100,141,162,0.1,0.1,,0.023463069,,,,1.930792743,96.75644028,141,R,,10,12,,TRUE
-30008,202002,100,6001,162,0.1,0.1,42.62017045,13.86213906,,13.86213906,6.802558774,4.305953095,76.3852459,6001,R,10,9,12,TRUE,
-30008,202003,100,433,162,0.1,0.1,0.072138939,,0.072138939,,1.126581418,,66.21860465,433,R,9,,9,,
-30009,202001,100,6417,26,0.1,0.1,,1.589639934,,1.589639934,,1.930792743,96.75644028,6417,R,,10,12,,
-30009,202002,100,4037,26,0.1,0.1,0.629073275,3.053782962,0.629073275,3.053782962,6.802558774,4.305953095,76.3852459,4037,R,10,9,12,,
-30009,202003,100,1322,26,0.1,0.1,0.327462695,,0.327462695,,1.126581418,,66.21860465,1322,R,9,,9,,
-30010,202001,100,28963,144,0.1,0.1,,1.332623847,,1.332623847,,1.930792743,96.75644028,28963,R,,10,12,,
-30010,202002,100,21734,144,0.1,0.1,0.750399298,,0.750399298,,6.802558774,4.305953095,76.3852459,21734,R,10,9,12,,
-30011,202001,100,6009,5,0.1,0.1,,5.249464902,,,,1.930792743,96.75644028,6009,R,,10,12,,TRUE
-30011,202002,100,1145,5,0.1,0.1,0.190495606,,,,6.802558774,4.305953095,76.3852459,1145,R,10,9,12,TRUE,
-30012,202001,100,256,275,0.1,0.1,,0.034032235,,0.034032235,,1.930792743,96.75644028,256,R,,10,12,,
-30012,202002,100,7522,275,0.1,0.1,29.38390625,,29.38390625,,6.802558774,4.305953095,76.3852459,7522,R,10,9,12,,
-30012,202003,100,,275,0.1,0.1,,,,,1.126581418,,66.21860465,8474.145427,FIR,9,,9,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.598925527,96.75644028,8444,R,,10,12,,
+30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,6.802558774,4.305953095,76.3852459,7476,R,10,9,12,,
+30001,202003,100,2003,51,0.267924024,,0.267924024,,1.126581418,,66.21860465,2003,R,9,,9,,
+30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.930792743,96.75644028,9343,R,,10,12,,
+30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,6.802558774,4.305953095,76.3852459,7818,R,10,9,12,,
+30002,202003,100,4897,72,0.626375032,,0.626375032,,1.126581418,,66.21860465,4897,R,9,,9,,
+30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.930792743,96.75644028,7511,R,,10,12,,
+30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,6.802558774,4.305953095,76.3852459,1761,R,10,9,12,,
+30003,202003,100,6492,7,3.686541738,,3.686541738,,1.126581418,,66.21860465,6492,R,9,,9,,
+30004,202001,100,64,81,,0.030288689,,0.030288689,,1.930792743,96.75644028,64,R,,10,12,,
+30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,6.802558774,4.305953095,76.3852459,2113,R,10,9,12,,
+30004,202003,100,185,81,0.087553242,,0.087553242,,1.126581418,,66.21860465,185,R,9,,9,,
+30005,202001,100,844,5,,0.941234172,,0.941234172,,1.930792743,96.75644028,844,R,,10,12,,
+30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,6.802558774,4.305953095,76.3852459,897,R,10,9,12,,
+30005,202003,100,280,5,0.312578027,,0.312578027,,1.126581418,,66.21860465,280,R,9,,9,,
+30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.930792743,96.75644028,1869,R,,10,12,,
+30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,6.802558774,4.305953095,76.3852459,1876,R,10,9,12,,
+30006,202003,100,1371,14,0.730770871,,0.730770871,,1.126581418,,66.21860465,1371,R,9,,9,,
+30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.930792743,96.75644028,12769,R,,10,12,,
+30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,6.802558774,4.305953095,76.3852459,2853,R,10,9,12,,
+30007,202003,100,11491,12,4.027888195,,4.027888195,,1.126581418,,66.21860465,11491,R,9,,9,,
+30008,202001,100,141,162,,0.023463069,,,,1.930792743,96.75644028,141,R,,10,12,,TRUE
+30008,202002,100,6001,162,42.62017045,13.86213906,,13.86213906,6.802558774,4.305953095,76.3852459,6001,R,10,9,12,TRUE,
+30008,202003,100,433,162,0.072138939,,0.072138939,,1.126581418,,66.21860465,433,R,9,,9,,
+30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.930792743,96.75644028,6417,R,,10,12,,
+30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,6.802558774,4.305953095,76.3852459,4037,R,10,9,12,,
+30009,202003,100,1322,26,0.327462695,,0.327462695,,1.126581418,,66.21860465,1322,R,9,,9,,
+30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.930792743,96.75644028,28963,R,,10,12,,
+30010,202002,100,21734,144,0.750399298,,0.750399298,,6.802558774,4.305953095,76.3852459,21734,R,10,9,12,,
+30011,202001,100,6009,5,,5.249464902,,,,1.930792743,96.75644028,6009,R,,10,12,,TRUE
+30011,202002,100,1145,5,0.190495606,,,,6.802558774,4.305953095,76.3852459,1145,R,10,9,12,TRUE,
+30012,202001,100,256,275,,0.034032235,,0.034032235,,1.930792743,96.75644028,256,R,,10,12,,
+30012,202002,100,7522,275,29.38390625,,29.38390625,,6.802558774,4.305953095,76.3852459,7522,R,10,9,12,,
+30012,202003,100,,275,,,,,1.126581418,,66.21860465,8474.145427,FIR,9,,9,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_input.csv
index 152f6772..3a255141 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_input.csv
@@ -1,64 +1,64 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,,,,
-90001,202001,100,9244,89,0.1,0.1,,,,
-90001,202002,100,8916,89,0.1,0.1,,,,
-90001,202003,100,6194,89,0.1,0.1,,,,
-90002,202001,100,4826,83,0.1,0.1,,,,
-90002,202002,100,5903,83,0.1,0.1,,,,
-90002,202003,100,4743,83,0.1,0.1,,,,
-90003,202001,100,7586,4,0.1,0.1,,,,
-90003,202002,100,1016,4,0.1,0.1,,,,
-90003,202003,100,1429,4,0.1,0.1,,,,
-90004,202001,100,3975,76,0.1,0.1,,,,
-90004,202002,100,3044,76,0.1,0.1,,,,
-90004,202003,100,3673,76,0.1,0.1,,,,
-90005,202001,100,1941,18,0.1,0.1,,,,
-90005,202002,100,3121,18,0.1,0.1,,,,
-90005,202003,100,1208,18,0.1,0.1,,,,
-90006,202001,100,5405,94,0.1,0.1,,,,
-90006,202002,100,7084,94,0.1,0.1,,,,
-90006,202003,100,4980,94,0.1,0.1,,,,
-90007,202001,100,15172,8,0.1,0.1,,,,
-90007,202002,100,2845,8,0.1,0.1,,,,
-90007,202003,100,3501,8,0.1,0.1,,,,
-90008,202001,100,16298,304,0.1,0.1,,,,
-90008,202002,100,14429,304,0.1,0.1,,,,
-90008,202003,100,14295,304,0.1,0.1,,,,
-90009,202001,100,3698,45,0.1,0.1,,,,
-90009,202002,100,4993,45,0.1,0.1,,,,
-90009,202003,100,4212,45,0.1,0.1,,,,
-90010,202001,100,7722,100,0.1,0.1,,,,
-90010,202002,100,10153,100,0.1,0.1,,,,
-90010,202003,100,6545,100,0.1,0.1,,,,
-90011,202001,100,30344,19,0.1,0.1,,,,
-90011,202002,100,3627,19,0.1,0.1,,,,
-90011,202003,100,7288,19,0.1,0.1,,,,
-90012,202001,100,16298,304,0.1,0.1,,,,
-90012,202002,100,11567,304,0.1,0.1,,,,
-90012,202003,100,13484,304,0.1,0.1,,,,
-90013,202001,100,20190,54,0.1,0.1,,,,
-90013,202002,100,18242,54,0.1,0.1,,,,
-90013,202003,100,28826,54,0.1,0.1,,,,
-90014,202001,100,4260,47,0.1,0.1,,,,
-90014,202002,100,5036,42,0.1,0.1,,,,
-90014,202003,100,6484,42,0.1,0.1,,,,
-90015,202001,100,19236,57,0.1,0.1,,,,
-90015,202002,100,4949,57,0.1,0.1,,,,
-90015,202003,100,3544,57,0.1,0.1,,,,
-90016,202001,100,14902,163,0.1,0.1,,,,
-90016,202002,100,16435,163,0.1,0.1,,,,
-90016,202003,100,24653,163,0.1,0.1,,,,
-90017,202001,100,35476,149,0.1,0.1,,,,
-90017,202002,100,50515,149,0.1,0.1,,,,
-90017,202003,100,53477,149,0.1,0.1,,,,
-90018,202001,100,13845,126,0.1,0.1,,,,
-90018,202002,100,25488,126,0.1,0.1,,,,
-90018,202003,100,27409,126,0.1,0.1,,,,
-90019,202001,100,1099,6,0.1,0.1,,,,
-90019,202002,100,434,6,0.1,0.1,,,,
-90019,202003,100,124,6,0.1,0.1,,,,
-90020,202001,100,3348,22,0.1,0.1,,,,
-90020,202002,100,1996,22,0.1,0.1,,,,
-90020,202003,100,5051,22,0.1,0.1,,,,
-90021,202001,100,,155,0.1,0.1,,,,
-90021,202002,100,,155,0.1,0.1,,,,
-90021,202003,100,21046,155,0.1,0.1,,,,
+identifier,date,group,question,other
+90001,202001,100,9244,89
+90001,202002,100,8916,89
+90001,202003,100,6194,89
+90002,202001,100,4826,83
+90002,202002,100,5903,83
+90002,202003,100,4743,83
+90003,202001,100,7586,4
+90003,202002,100,1016,4
+90003,202003,100,1429,4
+90004,202001,100,3975,76
+90004,202002,100,3044,76
+90004,202003,100,3673,76
+90005,202001,100,1941,18
+90005,202002,100,3121,18
+90005,202003,100,1208,18
+90006,202001,100,5405,94
+90006,202002,100,7084,94
+90006,202003,100,4980,94
+90007,202001,100,15172,8
+90007,202002,100,2845,8
+90007,202003,100,3501,8
+90008,202001,100,16298,304
+90008,202002,100,14429,304
+90008,202003,100,14295,304
+90009,202001,100,3698,45
+90009,202002,100,4993,45
+90009,202003,100,4212,45
+90010,202001,100,7722,100
+90010,202002,100,10153,100
+90010,202003,100,6545,100
+90011,202001,100,30344,19
+90011,202002,100,3627,19
+90011,202003,100,7288,19
+90012,202001,100,16298,304
+90012,202002,100,11567,304
+90012,202003,100,13484,304
+90013,202001,100,20190,54
+90013,202002,100,18242,54
+90013,202003,100,28826,54
+90014,202001,100,4260,47
+90014,202002,100,5036,42
+90014,202003,100,6484,42
+90015,202001,100,19236,57
+90015,202002,100,4949,57
+90015,202003,100,3544,57
+90016,202001,100,14902,163
+90016,202002,100,16435,163
+90016,202003,100,24653,163
+90017,202001,100,35476,149
+90017,202002,100,50515,149
+90017,202003,100,53477,149
+90018,202001,100,13845,126
+90018,202002,100,25488,126
+90018,202003,100,27409,126
+90019,202001,100,1099,6
+90019,202002,100,434,6
+90019,202003,100,124,6
+90020,202001,100,3348,22
+90020,202002,100,1996,22
+90020,202003,100,5051,22
+90021,202001,100,,155
+90021,202002,100,,155
+90021,202003,100,21046,155
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
index 27c28265..c467a5e5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -1,64 +1,64 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
-90001,202001,100,9244,89,0.1,0.1,,1.036787797,,1.036787797,,1.504436071,128.8429705,9244,R,,17,19,,,
-90001,202002,100,8916,89,0.1,0.1,0.964517525,1.43945754,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,8916,R,17,18,20,,,
-90001,202003,100,6194,89,0.1,0.1,0.694706146,,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,,
-90002,202001,100,4826,83,0.1,0.1,,0.817550398,,0.817550398,,1.504436071,128.8429705,4826,R,,17,19,,,
-90002,202002,100,5903,83,0.1,0.1,1.223166183,1.244570947,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,5903,R,17,18,20,,,
-90002,202003,100,4743,83,0.1,0.1,0.803489751,,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,,
-90003,202001,100,7586,4,0.1,0.1,,,,,,1.504436071,128.8429705,7586,R,,17,19,,,TRUE
-90003,202002,100,1016,4,0.1,0.1,,0.710986704,,0.710986704,0.95177292,1.082813901,113.3255814,1016,R,17,18,20,,,
-90003,202003,100,1429,4,0.1,0.1,1.406496063,,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,,
-90004,202001,100,3975,76,0.1,0.1,,1.305847569,,1.305847569,,1.504436071,128.8429705,3975,R,,17,19,,,
-90004,202002,100,3044,76,0.1,0.1,0.765786164,0.82875034,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,3044,R,17,18,20,,,
-90004,202003,100,3673,76,0.1,0.1,1.206636005,,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,,
-90005,202001,100,1941,18,0.1,0.1,,0.622072678,,0.622072678,,1.504436071,128.8429705,1941,R,,17,19,,,
-90005,202002,100,3121,18,0.1,0.1,1.607529208,2.583641738,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,3121,R,17,18,20,,,
-90005,202003,100,1208,18,0.1,0.1,0.387050567,,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,,
-90006,202001,100,5405,94,0.1,0.1,,0.763047038,,0.763047038,,1.504436071,128.8429705,5405,R,,17,19,,,
-90006,202002,100,7084,94,0.1,0.1,1.310535196,1.422366796,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,7084,R,17,18,20,,,
-90006,202003,100,4980,94,0.1,0.1,0.703053532,,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,,
-90007,202001,100,15172,8,0.1,0.1,,5.333239595,,5.333239595,,1.504436071,128.8429705,15172,R,,17,19,,,
-90007,202002,100,2845,8,0.1,0.1,0.187503296,0.812556233,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,2845,R,17,18,20,,,
-90007,202003,100,3501,8,0.1,0.1,1.230684055,,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,,
-90008,202001,100,16298,304,0.1,0.1,,1.129530598,,1.129530598,,1.504436071,128.8429705,16298,R,,17,19,,,
-90008,202002,100,14429,304,0.1,0.1,0.885323516,1.009357249,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,14429,R,17,18,20,,,
-90008,202003,100,14295,304,0.1,0.1,0.990729498,,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,,
-90009,202001,100,3698,45,0.1,0.1,,0.740562712,,0.740562712,,1.504436071,128.8429705,3698,R,,17,19,,,
-90009,202002,100,4993,45,0.1,0.1,1.350324535,1.185435621,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,4993,R,17,18,20,,,
-90009,202003,100,4212,45,0.1,0.1,0.843571749,,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,,
-90010,202001,100,7722,100,0.1,0.1,,0.760511998,,0.760511998,,1.504436071,128.8429705,7722,R,,17,19,,,
-90010,202002,100,10153,100,0.1,0.1,1.314903647,1.551204368,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,10153,R,17,18,20,,,
-90010,202003,100,6545,100,0.1,0.1,0.644660382,,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,,
-90011,202001,100,30344,19,0.1,0.1,,8.365866031,,,,1.504436071,128.8429705,30344,R,,17,19,,TRUE,
-90011,202002,100,3627,19,0.1,0.1,0.119533351,0.497690693,,0.497690693,0.95177292,1.082813901,113.3255814,3627,R,17,18,20,TRUE,,
-90011,202003,100,7288,19,0.1,0.1,2.00928009,,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,,
-90012,202001,100,16298,304,0.1,0.1,,1.408940798,,1.408940798,,1.504436071,128.8429705,16298,R,,17,19,,,
-90012,202002,100,11567,304,0.1,0.1,0.70975303,0.857831504,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,11567,R,17,18,20,,,
-90012,202003,100,13484,304,0.1,0.1,1.165730094,,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,,
-90013,202001,100,20190,54,0.1,0.1,,1.106799294,,1.106799294,,1.504436071,128.8429705,20190,R,,17,19,,,
-90013,202002,100,18242,54,0.1,0.1,0.903506178,0.632817595,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,18242,R,17,18,20,,,
-90013,202003,100,28826,54,0.1,0.1,1.58023419,,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,,
-90014,202001,100,4260,47,0.1,0.1,,0.845985046,,0.845985046,,1.504436071,128.8429705,4260,R,,17,19,,,
-90014,202002,100,5036,42,0.1,0.1,1.182053991,0.776557765,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,5036,R,17,18,20,,,
-90014,202003,100,6484,42,0.1,0.1,1.28773421,,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,,
-90015,202001,100,19236,57,0.1,0.1,,3.886845827,,3.886845827,,1.504436071,128.8429705,19236,R,,17,19,,,
-90015,202002,100,4949,57,0.1,0.1,0.25727802,1.396267404,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,4949,R,17,18,20,,,
-90015,202003,100,3544,57,0.1,0.1,0.716195191,,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,,
-90016,202001,100,14902,163,0.1,0.1,,0.906730921,,0.906730921,,1.504436071,128.8429705,14902,R,,17,19,,,
-90016,202002,100,16435,163,0.1,0.1,1.102863018,0.666628808,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,16435,R,17,18,20,,,
-90016,202003,100,24653,163,0.1,0.1,1.500085186,,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,,
-90017,202001,100,35476,149,0.1,0.1,,0.702275751,,0.702275751,,1.504436071,128.8429705,35476,R,,17,19,,,
-90017,202002,100,50515,149,0.1,0.1,1.42394209,0.944611909,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,50515,R,17,18,20,,,
-90017,202003,100,53477,149,0.1,0.1,1.058635817,,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,,
-90018,202001,100,13845,126,0.1,0.1,,0.543204684,,,,1.504436071,128.8429705,13845,R,,17,19,,TRUE,
-90018,202002,100,25488,126,0.1,0.1,1.840926688,0.929916997,,0.929916997,0.95177292,1.082813901,113.3255814,25488,R,17,18,20,TRUE,,
-90018,202003,100,27409,126,0.1,0.1,1.075364795,,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,,
-90019,202001,100,1099,6,0.1,0.1,,2.530969376,,2.530969376,,1.504436071,128.8429705,1099,R,,17,19,,,
-90019,202002,100,434,6,0.1,0.1,0.395105531,3.51659919,0.395105531,,0.95177292,1.082813901,113.3255814,434,R,17,18,20,,TRUE,
-90019,202003,100,124,6,0.1,0.1,0.284365646,,,,1.072463185,,126.2596455,124,R,18,,21,TRUE,,
-90020,202001,100,3348,22,0.1,0.1,,1.677715809,,1.677715809,,1.504436071,128.8429705,3348,R,,17,19,,,
-90020,202002,100,1996,22,0.1,0.1,0.596048505,0.395102278,0.596048505,,0.95177292,1.082813901,113.3255814,1996,R,17,18,20,,TRUE,
-90020,202003,100,5051,22,0.1,0.1,2.530990214,,,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,,
-90021,202001,100,,155,0.1,0.1,,,,,,1.504436071,128.8429705,34284.44522,BI,,17,19,,,
-90021,202002,100,,155,0.1,0.1,,,,,0.95177292,1.082813901,113.3255814,22788.90136,BI,17,18,20,,,
-90021,202003,100,21046,155,0.1,0.1,,,,,1.072463185,,126.2596455,21046,R,18,,21,,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+90001,202001,100,9244,89,,1.036787797,,1.036787797,,1.504436071,128.8429705,9244,R,,17,19,,,
+90001,202002,100,8916,89,0.964517525,1.43945754,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,8916,R,17,18,20,,,
+90001,202003,100,6194,89,0.694706146,,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,,
+90002,202001,100,4826,83,,0.817550398,,0.817550398,,1.504436071,128.8429705,4826,R,,17,19,,,
+90002,202002,100,5903,83,1.223166183,1.244570947,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,5903,R,17,18,20,,,
+90002,202003,100,4743,83,0.803489751,,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,,
+90003,202001,100,7586,4,,,,,,1.504436071,128.8429705,7586,R,,17,19,,,TRUE
+90003,202002,100,1016,4,,0.710986704,,0.710986704,0.95177292,1.082813901,113.3255814,1016,R,17,18,20,,,
+90003,202003,100,1429,4,1.406496063,,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,,
+90004,202001,100,3975,76,,1.305847569,,1.305847569,,1.504436071,128.8429705,3975,R,,17,19,,,
+90004,202002,100,3044,76,0.765786164,0.82875034,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,3044,R,17,18,20,,,
+90004,202003,100,3673,76,1.206636005,,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,,
+90005,202001,100,1941,18,,0.622072678,,0.622072678,,1.504436071,128.8429705,1941,R,,17,19,,,
+90005,202002,100,3121,18,1.607529208,2.583641738,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,3121,R,17,18,20,,,
+90005,202003,100,1208,18,0.387050567,,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,,
+90006,202001,100,5405,94,,0.763047038,,0.763047038,,1.504436071,128.8429705,5405,R,,17,19,,,
+90006,202002,100,7084,94,1.310535196,1.422366796,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,7084,R,17,18,20,,,
+90006,202003,100,4980,94,0.703053532,,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,,
+90007,202001,100,15172,8,,5.333239595,,5.333239595,,1.504436071,128.8429705,15172,R,,17,19,,,
+90007,202002,100,2845,8,0.187503296,0.812556233,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,2845,R,17,18,20,,,
+90007,202003,100,3501,8,1.230684055,,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,,
+90008,202001,100,16298,304,,1.129530598,,1.129530598,,1.504436071,128.8429705,16298,R,,17,19,,,
+90008,202002,100,14429,304,0.885323516,1.009357249,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,14429,R,17,18,20,,,
+90008,202003,100,14295,304,0.990729498,,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,,
+90009,202001,100,3698,45,,0.740562712,,0.740562712,,1.504436071,128.8429705,3698,R,,17,19,,,
+90009,202002,100,4993,45,1.350324535,1.185435621,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,4993,R,17,18,20,,,
+90009,202003,100,4212,45,0.843571749,,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,,
+90010,202001,100,7722,100,,0.760511998,,0.760511998,,1.504436071,128.8429705,7722,R,,17,19,,,
+90010,202002,100,10153,100,1.314903647,1.551204368,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,10153,R,17,18,20,,,
+90010,202003,100,6545,100,0.644660382,,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,,
+90011,202001,100,30344,19,,8.365866031,,,,1.504436071,128.8429705,30344,R,,17,19,,TRUE,
+90011,202002,100,3627,19,0.119533351,0.497690693,,0.497690693,0.95177292,1.082813901,113.3255814,3627,R,17,18,20,TRUE,,
+90011,202003,100,7288,19,2.00928009,,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,,
+90012,202001,100,16298,304,,1.408940798,,1.408940798,,1.504436071,128.8429705,16298,R,,17,19,,,
+90012,202002,100,11567,304,0.70975303,0.857831504,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,11567,R,17,18,20,,,
+90012,202003,100,13484,304,1.165730094,,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,,
+90013,202001,100,20190,54,,1.106799294,,1.106799294,,1.504436071,128.8429705,20190,R,,17,19,,,
+90013,202002,100,18242,54,0.903506178,0.632817595,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,18242,R,17,18,20,,,
+90013,202003,100,28826,54,1.58023419,,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,,
+90014,202001,100,4260,47,,0.845985046,,0.845985046,,1.504436071,128.8429705,4260,R,,17,19,,,
+90014,202002,100,5036,42,1.182053991,0.776557765,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,5036,R,17,18,20,,,
+90014,202003,100,6484,42,1.28773421,,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,,
+90015,202001,100,19236,57,,3.886845827,,3.886845827,,1.504436071,128.8429705,19236,R,,17,19,,,
+90015,202002,100,4949,57,0.25727802,1.396267404,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,4949,R,17,18,20,,,
+90015,202003,100,3544,57,0.716195191,,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,,
+90016,202001,100,14902,163,,0.906730921,,0.906730921,,1.504436071,128.8429705,14902,R,,17,19,,,
+90016,202002,100,16435,163,1.102863018,0.666628808,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,16435,R,17,18,20,,,
+90016,202003,100,24653,163,1.500085186,,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,,
+90017,202001,100,35476,149,,0.702275751,,0.702275751,,1.504436071,128.8429705,35476,R,,17,19,,,
+90017,202002,100,50515,149,1.42394209,0.944611909,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,50515,R,17,18,20,,,
+90017,202003,100,53477,149,1.058635817,,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,,
+90018,202001,100,13845,126,,0.543204684,,,,1.504436071,128.8429705,13845,R,,17,19,,TRUE,
+90018,202002,100,25488,126,1.840926688,0.929916997,,0.929916997,0.95177292,1.082813901,113.3255814,25488,R,17,18,20,TRUE,,
+90018,202003,100,27409,126,1.075364795,,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,,
+90019,202001,100,1099,6,,2.530969376,,2.530969376,,1.504436071,128.8429705,1099,R,,17,19,,,
+90019,202002,100,434,6,0.395105531,3.51659919,0.395105531,,0.95177292,1.082813901,113.3255814,434,R,17,18,20,,TRUE,
+90019,202003,100,124,6,0.284365646,,,,1.072463185,,126.2596455,124,R,18,,21,TRUE,,
+90020,202001,100,3348,22,,1.677715809,,1.677715809,,1.504436071,128.8429705,3348,R,,17,19,,,
+90020,202002,100,1996,22,0.596048505,0.395102278,0.596048505,,0.95177292,1.082813901,113.3255814,1996,R,17,18,20,,TRUE,
+90020,202003,100,5051,22,2.530990214,,,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,,
+90021,202001,100,,155,,,,,,1.504436071,128.8429705,34284.44522,BI,,17,19,,,
+90021,202002,100,,155,,,,,0.95177292,1.082813901,113.3255814,22788.90136,BI,17,18,20,,,
+90021,202003,100,21046,155,,,,,1.072463185,,126.2596455,21046,R,18,,21,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_input.csv
index 1d59390d..5d0a69d4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-30001,202001,100,8444,51,0.5,0.5
-30001,202002,100,7476,51,0.5,0.5
-30001,202003,100,2003,51,0.5,0.5
-30002,202001,100,9343,72,0.5,0.5
-30002,202002,100,7818,72,0.5,0.5
-30002,202003,100,4897,72,0.5,0.5
-30003,202001,100,7511,7,0.5,0.5
-30003,202002,100,1761,7,0.5,0.5
-30003,202003,100,6492,7,0.5,0.5
-30004,202001,100,64,81,0.5,0.5
-30004,202002,100,2113,81,0.5,0.5
-30004,202003,100,185,81,0.5,0.5
-30005,202001,100,844,5,0.5,0.5
-30005,202002,100,897,5,0.5,0.5
-30005,202003,100,280,5,0.5,0.5
-30006,202001,100,1869,14,0.5,0.5
-30006,202002,100,1876,14,0.5,0.5
-30006,202003,100,1371,14,0.5,0.5
-30007,202001,100,12769,12,0.5,0.5
-30007,202002,100,2853,12,0.5,0.5
-30007,202003,100,11491,12,0.5,0.5
-30008,202001,100,141,162,0.5,0.5
-30008,202002,100,6001,162,0.5,0.5
-30008,202003,100,433,162,0.5,0.5
-30009,202001,100,6417,26,0.5,0.5
-30009,202002,100,4037,26,0.5,0.5
-30009,202003,100,1322,26,0.5,0.5
-30010,202001,100,28963,144,0.5,0.5
-30010,202002,100,21734,144,0.5,0.5
-30010,202003,100,10529,144,0.5,0.5
-30011,202001,100,6009,5,0.5,0.5
-30011,202002,100,1145,5,0.5,0.5
-30011,202003,100,5064,5,0.5,0.5
-30012,202001,100,256,275,0.5,0.5
-30012,202002,100,7522,275,0.5,0.5
-30012,202003,100,,275,0.5,0.5
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,10529,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30011,202003,100,5064,5
+30012,202001,100,256,275
+30012,202002,100,7522,275
+30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index 50192c41..c3a9063d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-30001,202001,100,8444,51,0.5,0.5,,1.129481006,,1.129481006,,1.162271841,96.73383283,8444,R,,2,12,,
-30001,202002,100,7476,51,0.5,0.5,0.885362387,3.732401398,0.885362387,,0.861069292,2.064295653,76.3675837,7476,R,2,1,12,,TRUE
-30001,202003,100,2003,51,0.5,0.5,0.267924024,,,,0.484426733,,76.13443331,2003,R,1,,11,TRUE,
-30002,202001,100,9343,72,0.5,0.5,,1.195062676,,1.195062676,,1.162271841,96.73383283,9343,R,,2,12,,
-30002,202002,100,7818,72,0.5,0.5,0.836776196,1.596487645,0.836776196,,0.861069292,2.064295653,76.3675837,7818,R,2,1,12,,TRUE
-30002,202003,100,4897,72,0.5,0.5,0.626375032,,,,0.484426733,,76.13443331,4897,R,1,,11,TRUE,
-30003,202001,100,7511,7,0.5,0.5,,4.265190233,,,,1.162271841,96.73383283,7511,R,,2,12,,TRUE
-30003,202002,100,1761,7,0.5,0.5,0.234456131,0.271256932,,,0.861069292,2.064295653,76.3675837,1761,R,2,1,12,TRUE,TRUE
-30003,202003,100,6492,7,0.5,0.5,3.686541738,,,,0.484426733,,76.13443331,6492,R,1,,11,TRUE,
-30004,202001,100,64,81,0.5,0.5,,0.030288689,,,,1.162271841,96.73383283,64,R,,2,12,,TRUE
-30004,202002,100,2113,81,0.5,0.5,33.015625,11.42162162,,,0.861069292,2.064295653,76.3675837,2113,R,2,1,12,TRUE,TRUE
-30004,202003,100,185,81,0.5,0.5,0.087553242,,,,0.484426733,,76.13443331,185,R,1,,11,TRUE,
-30005,202001,100,844,5,0.5,0.5,,0.941234172,,,,1.162271841,96.73383283,844,R,,2,12,,TRUE
-30005,202002,100,897,5,0.5,0.5,1.062434865,3.199201198,,,0.861069292,2.064295653,76.3675837,897,R,2,1,12,TRUE,TRUE
-30005,202003,100,280,5,0.5,0.5,0.312578027,,,,0.484426733,,76.13443331,280,R,1,,11,TRUE,
-30006,202001,100,1869,14,0.5,0.5,,0.995885563,,,,1.162271841,96.73383283,1869,R,,2,12,,TRUE
-30006,202002,100,1876,14,0.5,0.5,1.004131435,1.368417982,,,0.861069292,2.064295653,76.3675837,1876,R,2,1,12,TRUE,TRUE
-30006,202003,100,1371,14,0.5,0.5,0.730770871,,,,0.484426733,,76.13443331,1371,R,1,,11,TRUE,
-30007,202001,100,12769,12,0.5,0.5,,4.475816911,,,,1.162271841,96.73383283,12769,R,,2,12,,TRUE
-30007,202002,100,2853,12,0.5,0.5,0.223422901,0.248269056,,,0.861069292,2.064295653,76.3675837,2853,R,2,1,12,TRUE,TRUE
-30007,202003,100,11491,12,0.5,0.5,4.027888195,,,,0.484426733,,76.13443331,11491,R,1,,11,TRUE,
-30008,202001,100,141,162,0.5,0.5,,0.023463069,,,,1.162271841,96.73383283,141,R,,2,12,,TRUE
-30008,202002,100,6001,162,0.5,0.5,42.62017045,13.86213906,,,0.861069292,2.064295653,76.3675837,6001,R,2,1,12,TRUE,TRUE
-30008,202003,100,433,162,0.5,0.5,0.072138939,,,,0.484426733,,76.13443331,433,R,1,,11,TRUE,
-30009,202001,100,6417,26,0.5,0.5,,1.589639934,,,,1.162271841,96.73383283,6417,R,,2,12,,TRUE
-30009,202002,100,4037,26,0.5,0.5,0.629073275,3.053782962,,,0.861069292,2.064295653,76.3675837,4037,R,2,1,12,TRUE,TRUE
-30009,202003,100,1322,26,0.5,0.5,0.327462695,,,,0.484426733,,76.13443331,1322,R,1,,11,TRUE,
-30010,202001,100,28963,144,0.5,0.5,,1.332623847,,,,1.162271841,96.73383283,28963,R,,2,12,,TRUE
-30010,202002,100,21734,144,0.5,0.5,0.750399298,2.064295653,,2.064295653,0.861069292,2.064295653,76.3675837,21734,R,2,1,12,TRUE,
-30010,202003,100,10529,144,0.5,0.5,0.484426733,,0.484426733,,0.484426733,,76.13443331,10529,R,1,,11,,
-30011,202001,100,6009,5,0.5,0.5,,5.249464902,,,,1.162271841,96.73383283,6009,R,,2,12,,TRUE
-30011,202002,100,1145,5,0.5,0.5,0.190495606,0.226047443,,,0.861069292,2.064295653,76.3675837,1145,R,2,1,12,TRUE,TRUE
-30011,202003,100,5064,5,0.5,0.5,4.423850085,,,,0.484426733,,76.13443331,5064,R,1,,11,TRUE,
-30012,202001,100,256,275,0.5,0.5,,0.034032235,,,,1.162271841,96.73383283,256,R,,2,12,,TRUE
-30012,202002,100,7522,275,0.5,0.5,29.38390625,,,,0.861069292,2.064295653,76.3675837,7522,R,2,1,12,TRUE,
-30012,202003,100,,275,0.5,0.5,,,,,0.484426733,,76.13443331,3643.857886,FIR,1,,11,,
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.162271841,96.73383283,8444,R,,2,12,,
+30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,,0.861069292,2.064295653,76.3675837,7476,R,2,1,12,,TRUE
+30001,202003,100,2003,51,0.267924024,,,,0.484426733,,76.13443331,2003,R,1,,11,TRUE,
+30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.162271841,96.73383283,9343,R,,2,12,,
+30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,,0.861069292,2.064295653,76.3675837,7818,R,2,1,12,,TRUE
+30002,202003,100,4897,72,0.626375032,,,,0.484426733,,76.13443331,4897,R,1,,11,TRUE,
+30003,202001,100,7511,7,,4.265190233,,,,1.162271841,96.73383283,7511,R,,2,12,,TRUE
+30003,202002,100,1761,7,0.234456131,0.271256932,,,0.861069292,2.064295653,76.3675837,1761,R,2,1,12,TRUE,TRUE
+30003,202003,100,6492,7,3.686541738,,,,0.484426733,,76.13443331,6492,R,1,,11,TRUE,
+30004,202001,100,64,81,,0.030288689,,,,1.162271841,96.73383283,64,R,,2,12,,TRUE
+30004,202002,100,2113,81,33.015625,11.42162162,,,0.861069292,2.064295653,76.3675837,2113,R,2,1,12,TRUE,TRUE
+30004,202003,100,185,81,0.087553242,,,,0.484426733,,76.13443331,185,R,1,,11,TRUE,
+30005,202001,100,844,5,,0.941234172,,,,1.162271841,96.73383283,844,R,,2,12,,TRUE
+30005,202002,100,897,5,1.062434865,3.199201198,,,0.861069292,2.064295653,76.3675837,897,R,2,1,12,TRUE,TRUE
+30005,202003,100,280,5,0.312578027,,,,0.484426733,,76.13443331,280,R,1,,11,TRUE,
+30006,202001,100,1869,14,,0.995885563,,,,1.162271841,96.73383283,1869,R,,2,12,,TRUE
+30006,202002,100,1876,14,1.004131435,1.368417982,,,0.861069292,2.064295653,76.3675837,1876,R,2,1,12,TRUE,TRUE
+30006,202003,100,1371,14,0.730770871,,,,0.484426733,,76.13443331,1371,R,1,,11,TRUE,
+30007,202001,100,12769,12,,4.475816911,,,,1.162271841,96.73383283,12769,R,,2,12,,TRUE
+30007,202002,100,2853,12,0.223422901,0.248269056,,,0.861069292,2.064295653,76.3675837,2853,R,2,1,12,TRUE,TRUE
+30007,202003,100,11491,12,4.027888195,,,,0.484426733,,76.13443331,11491,R,1,,11,TRUE,
+30008,202001,100,141,162,,0.023463069,,,,1.162271841,96.73383283,141,R,,2,12,,TRUE
+30008,202002,100,6001,162,42.62017045,13.86213906,,,0.861069292,2.064295653,76.3675837,6001,R,2,1,12,TRUE,TRUE
+30008,202003,100,433,162,0.072138939,,,,0.484426733,,76.13443331,433,R,1,,11,TRUE,
+30009,202001,100,6417,26,,1.589639934,,,,1.162271841,96.73383283,6417,R,,2,12,,TRUE
+30009,202002,100,4037,26,0.629073275,3.053782962,,,0.861069292,2.064295653,76.3675837,4037,R,2,1,12,TRUE,TRUE
+30009,202003,100,1322,26,0.327462695,,,,0.484426733,,76.13443331,1322,R,1,,11,TRUE,
+30010,202001,100,28963,144,,1.332623847,,,,1.162271841,96.73383283,28963,R,,2,12,,TRUE
+30010,202002,100,21734,144,0.750399298,2.064295653,,2.064295653,0.861069292,2.064295653,76.3675837,21734,R,2,1,12,TRUE,
+30010,202003,100,10529,144,0.484426733,,0.484426733,,0.484426733,,76.13443331,10529,R,1,,11,,
+30011,202001,100,6009,5,,5.249464902,,,,1.162271841,96.73383283,6009,R,,2,12,,TRUE
+30011,202002,100,1145,5,0.190495606,0.226047443,,,0.861069292,2.064295653,76.3675837,1145,R,2,1,12,TRUE,TRUE
+30011,202003,100,5064,5,4.423850085,,,,0.484426733,,76.13443331,5064,R,1,,11,TRUE,
+30012,202001,100,256,275,,0.034032235,,,,1.162271841,96.73383283,256,R,,2,12,,TRUE
+30012,202002,100,7522,275,29.38390625,,,,0.861069292,2.064295653,76.3675837,7522,R,2,1,12,TRUE,
+30012,202003,100,,275,,,,,0.484426733,,76.13443331,3643.857886,FIR,1,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_input.csv
deleted file mode 100644
index 1d59390d..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_input.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-30001,202001,100,8444,51,0.5,0.5
-30001,202002,100,7476,51,0.5,0.5
-30001,202003,100,2003,51,0.5,0.5
-30002,202001,100,9343,72,0.5,0.5
-30002,202002,100,7818,72,0.5,0.5
-30002,202003,100,4897,72,0.5,0.5
-30003,202001,100,7511,7,0.5,0.5
-30003,202002,100,1761,7,0.5,0.5
-30003,202003,100,6492,7,0.5,0.5
-30004,202001,100,64,81,0.5,0.5
-30004,202002,100,2113,81,0.5,0.5
-30004,202003,100,185,81,0.5,0.5
-30005,202001,100,844,5,0.5,0.5
-30005,202002,100,897,5,0.5,0.5
-30005,202003,100,280,5,0.5,0.5
-30006,202001,100,1869,14,0.5,0.5
-30006,202002,100,1876,14,0.5,0.5
-30006,202003,100,1371,14,0.5,0.5
-30007,202001,100,12769,12,0.5,0.5
-30007,202002,100,2853,12,0.5,0.5
-30007,202003,100,11491,12,0.5,0.5
-30008,202001,100,141,162,0.5,0.5
-30008,202002,100,6001,162,0.5,0.5
-30008,202003,100,433,162,0.5,0.5
-30009,202001,100,6417,26,0.5,0.5
-30009,202002,100,4037,26,0.5,0.5
-30009,202003,100,1322,26,0.5,0.5
-30010,202001,100,28963,144,0.5,0.5
-30010,202002,100,21734,144,0.5,0.5
-30010,202003,100,10529,144,0.5,0.5
-30011,202001,100,6009,5,0.5,0.5
-30011,202002,100,1145,5,0.5,0.5
-30011,202003,100,5064,5,0.5,0.5
-30012,202001,100,256,275,0.5,0.5
-30012,202002,100,7522,275,0.5,0.5
-30012,202003,100,,275,0.5,0.5
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_output.csv
deleted file mode 100644
index f879659b..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_output.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter
-30001,202001,100,8444,51,0.5,0.5,,,,,,1,61.12436116,8444,R,,0,9,,,TRUE
-30001,202002,100,7476,51,0.5,0.5,,,,,1,1,48.04940375,7476,R,0,0,9,,,TRUE
-30001,202003,100,2003,51,0.5,0.5,,,,,1,,85.37820513,2003,R,0,,10,,,TRUE
-30002,202001,100,9343,72,0.5,0.5,,,,,,1,61.12436116,9343,R,,0,9,,,TRUE
-30002,202002,100,7818,72,0.5,0.5,,,,,1,1,48.04940375,7818,R,0,0,9,,,TRUE
-30002,202003,100,4897,72,0.5,0.5,,,,,1,,85.37820513,4897,R,0,,10,,,TRUE
-30003,202001,100,7511,7,0.5,0.5,,4.265190233,,,,1,61.12436116,7511,R,,0,9,,TRUE,
-30003,202002,100,1761,7,0.5,0.5,0.234456131,0.271256932,,,1,1,48.04940375,1761,R,0,0,9,TRUE,TRUE,
-30003,202003,100,6492,7,0.5,0.5,3.686541738,,,,1,,85.37820513,6492,R,0,,10,TRUE,,
-30004,202001,100,64,81,0.5,0.5,,0.030288689,,,,1,61.12436116,64,R,,0,9,,TRUE,
-30004,202002,100,2113,81,0.5,0.5,33.015625,11.42162162,,,1,1,48.04940375,2113,R,0,0,9,TRUE,TRUE,
-30004,202003,100,185,81,0.5,0.5,0.087553242,,,,1,,85.37820513,185,R,0,,10,TRUE,,
-30005,202001,100,844,5,0.5,0.5,,0.941234172,,,,1,61.12436116,844,R,,0,9,,TRUE,
-30005,202002,100,897,5,0.5,0.5,1.062434865,3.199201198,,,1,1,48.04940375,897,R,0,0,9,TRUE,TRUE,
-30005,202003,100,280,5,0.5,0.5,0.312578027,,,,1,,85.37820513,280,R,0,,10,TRUE,,
-30006,202001,100,1869,14,0.5,0.5,,0.995885563,,,,1,61.12436116,1869,R,,0,9,,TRUE,
-30006,202002,100,1876,14,0.5,0.5,1.004131435,1.368417982,,,1,1,48.04940375,1876,R,0,0,9,TRUE,TRUE,
-30006,202003,100,1371,14,0.5,0.5,0.730770871,,,,1,,85.37820513,1371,R,0,,10,TRUE,,
-30007,202001,100,12769,12,0.5,0.5,,4.475816911,,,,1,61.12436116,12769,R,,0,9,,TRUE,
-30007,202002,100,2853,12,0.5,0.5,0.223422901,0.248269056,,,1,1,48.04940375,2853,R,0,0,9,TRUE,TRUE,
-30007,202003,100,11491,12,0.5,0.5,4.027888195,,,,1,,85.37820513,11491,R,0,,10,TRUE,,
-30008,202001,100,141,162,0.5,0.5,,0.023463069,,,,1,61.12436116,141,R,,0,9,,TRUE,
-30008,202002,100,6001,162,0.5,0.5,42.62017045,13.86213906,,,1,1,48.04940375,6001,R,0,0,9,TRUE,TRUE,
-30008,202003,100,433,162,0.5,0.5,0.072138939,,,,1,,85.37820513,433,R,0,,10,TRUE,,
-30009,202001,100,6417,26,0.5,0.5,,1.589639934,,,,1,61.12436116,6417,R,,0,9,,TRUE,
-30009,202002,100,4037,26,0.5,0.5,0.629073275,3.053782962,,,1,1,48.04940375,4037,R,0,0,9,TRUE,TRUE,
-30009,202003,100,1322,26,0.5,0.5,0.327462695,,,,1,,85.37820513,1322,R,0,,10,TRUE,,
-30010,202001,100,28963,144,0.5,0.5,,,,,,1,61.12436116,28963,R,,0,9,,,TRUE
-30010,202002,100,21734,144,0.5,0.5,,,,,1,1,48.04940375,21734,R,0,0,9,,,TRUE
-30010,202003,100,10529,144,0.5,0.5,,,,,1,,85.37820513,10529,R,0,,10,,,TRUE
-30011,202001,100,6009,5,0.5,0.5,,5.249464902,,,,1,61.12436116,6009,R,,0,9,,TRUE,
-30011,202002,100,1145,5,0.5,0.5,0.190495606,0.226047443,,,1,1,48.04940375,1145,R,0,0,9,TRUE,TRUE,
-30011,202003,100,5064,5,0.5,0.5,4.423850085,,,,1,,85.37820513,5064,R,0,,10,TRUE,,
-30012,202001,100,256,275,0.5,0.5,,0.034032235,,,,1,61.12436116,256,R,,0,9,,TRUE,
-30012,202002,100,7522,275,0.5,0.5,29.38390625,,,,1,1,48.04940375,7522,R,0,0,9,TRUE,,
-30012,202003,100,,275,0.5,0.5,,,,,1,,85.37820513,7522,FIR,0,,10,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_input.csv
new file mode 100644
index 00000000..5d0a69d4
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_input.csv
@@ -0,0 +1,37 @@
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,10529,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30011,202003,100,5064,5
+30012,202001,100,256,275
+30012,202002,100,7522,275
+30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
new file mode 100644
index 00000000..af208011
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
@@ -0,0 +1,37 @@
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+30001,202001,100,8444,51,,,,,,1,61.12436116,8444,R,,0,9,,,TRUE
+30001,202002,100,7476,51,,,,,1,1,48.04940375,7476,R,0,0,9,,,TRUE
+30001,202003,100,2003,51,,,,,1,,85.37820513,2003,R,0,,10,,,TRUE
+30002,202001,100,9343,72,,,,,,1,61.12436116,9343,R,,0,9,,,TRUE
+30002,202002,100,7818,72,,,,,1,1,48.04940375,7818,R,0,0,9,,,TRUE
+30002,202003,100,4897,72,,,,,1,,85.37820513,4897,R,0,,10,,,TRUE
+30003,202001,100,7511,7,,4.265190233,,,,1,61.12436116,7511,R,,0,9,,TRUE,
+30003,202002,100,1761,7,0.234456131,0.271256932,,,1,1,48.04940375,1761,R,0,0,9,TRUE,TRUE,
+30003,202003,100,6492,7,3.686541738,,,,1,,85.37820513,6492,R,0,,10,TRUE,,
+30004,202001,100,64,81,,0.030288689,,,,1,61.12436116,64,R,,0,9,,TRUE,
+30004,202002,100,2113,81,33.015625,11.42162162,,,1,1,48.04940375,2113,R,0,0,9,TRUE,TRUE,
+30004,202003,100,185,81,0.087553242,,,,1,,85.37820513,185,R,0,,10,TRUE,,
+30005,202001,100,844,5,,0.941234172,,,,1,61.12436116,844,R,,0,9,,TRUE,
+30005,202002,100,897,5,1.062434865,3.199201198,,,1,1,48.04940375,897,R,0,0,9,TRUE,TRUE,
+30005,202003,100,280,5,0.312578027,,,,1,,85.37820513,280,R,0,,10,TRUE,,
+30006,202001,100,1869,14,,0.995885563,,,,1,61.12436116,1869,R,,0,9,,TRUE,
+30006,202002,100,1876,14,1.004131435,1.368417982,,,1,1,48.04940375,1876,R,0,0,9,TRUE,TRUE,
+30006,202003,100,1371,14,0.730770871,,,,1,,85.37820513,1371,R,0,,10,TRUE,,
+30007,202001,100,12769,12,,4.475816911,,,,1,61.12436116,12769,R,,0,9,,TRUE,
+30007,202002,100,2853,12,0.223422901,0.248269056,,,1,1,48.04940375,2853,R,0,0,9,TRUE,TRUE,
+30007,202003,100,11491,12,4.027888195,,,,1,,85.37820513,11491,R,0,,10,TRUE,,
+30008,202001,100,141,162,,0.023463069,,,,1,61.12436116,141,R,,0,9,,TRUE,
+30008,202002,100,6001,162,42.62017045,13.86213906,,,1,1,48.04940375,6001,R,0,0,9,TRUE,TRUE,
+30008,202003,100,433,162,0.072138939,,,,1,,85.37820513,433,R,0,,10,TRUE,,
+30009,202001,100,6417,26,,1.589639934,,,,1,61.12436116,6417,R,,0,9,,TRUE,
+30009,202002,100,4037,26,0.629073275,3.053782962,,,1,1,48.04940375,4037,R,0,0,9,TRUE,TRUE,
+30009,202003,100,1322,26,0.327462695,,,,1,,85.37820513,1322,R,0,,10,TRUE,,
+30010,202001,100,28963,144,,,,,,1,61.12436116,28963,R,,0,9,,,TRUE
+30010,202002,100,21734,144,,,,,1,1,48.04940375,21734,R,0,0,9,,,TRUE
+30010,202003,100,10529,144,,,,,1,,85.37820513,10529,R,0,,10,,,TRUE
+30011,202001,100,6009,5,,5.249464902,,,,1,61.12436116,6009,R,,0,9,,TRUE,
+30011,202002,100,1145,5,0.190495606,0.226047443,,,1,1,48.04940375,1145,R,0,0,9,TRUE,TRUE,
+30011,202003,100,5064,5,4.423850085,,,,1,,85.37820513,5064,R,0,,10,TRUE,,
+30012,202001,100,256,275,,0.034032235,,,,1,61.12436116,256,R,,0,9,,TRUE,
+30012,202002,100,7522,275,29.38390625,,,,1,1,48.04940375,7522,R,0,0,9,TRUE,,
+30012,202003,100,,275,,,,,1,,85.37820513,7522,FIR,0,,10,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_input.csv
deleted file mode 100644
index dd05ef3b..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_input.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim
-30001,202001,100,8444,0,0.5,0.5
-30001,202002,100,7476,0,0.5,0.5
-30001,202003,100,2003,0,0.5,0.5
-30002,202001,100,9343,0,0.5,0.5
-30002,202002,100,7818,0,0.5,0.5
-30002,202003,100,4897,0,0.5,0.5
-30003,202001,100,7511,0,0.5,0.5
-30003,202002,100,1761,0,0.5,0.5
-30003,202003,100,6492,0,0.5,0.5
-30004,202001,100,64,0,0.5,0.5
-30004,202002,100,2113,0,0.5,0.5
-30004,202003,100,185,0,0.5,0.5
-30005,202001,100,844,0,0.5,0.5
-30005,202002,100,897,0,0.5,0.5
-30005,202003,100,280,0,0.5,0.5
-30006,202001,100,1869,0,0.5,0.5
-30006,202002,100,1876,0,0.5,0.5
-30006,202003,100,1371,0,0.5,0.5
-30007,202001,100,12769,0,0.5,0.5
-30007,202002,100,2853,0,0.5,0.5
-30007,202003,100,11491,0,0.5,0.5
-30008,202001,100,141,0,0.5,0.5
-30008,202002,100,6001,0,0.5,0.5
-30008,202003,100,433,0,0.5,0.5
-30009,202001,100,6417,0,0.5,0.5
-30009,202002,100,4037,0,0.5,0.5
-30009,202003,100,1322,0,0.5,0.5
-30010,202001,100,28963,0,0.5,0.5
-30010,202002,100,21734,0,0.5,0.5
-30010,202003,100,10529,0,0.5,0.5
-30011,202001,100,6009,0,0.5,0.5
-30011,202002,100,1145,0,0.5,0.5
-30011,202003,100,5064,0,0.5,0.5
-30012,202001,100,256,0,0.5,0.5
-30012,202002,100,7522,0,0.5,0.5
-30012,202003,100,,0,0.5,0.5
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_output.csv
deleted file mode 100644
index efcf016d..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_UNKNOWN_output.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,default_c_link,filter
-30001,202001,100,8444,0,0.5,0.5,,,,,,1,1,8444,R,,0,9,,,TRUE,TRUE
-30001,202002,100,7476,0,0.5,0.5,,,,,1,1,1,7476,R,0,0,9,,,TRUE,TRUE
-30001,202003,100,2003,0,0.5,0.5,,,,,1,,1,2003,R,0,,10,,,TRUE,TRUE
-30002,202001,100,9343,0,0.5,0.5,,,,,,1,1,9343,R,,0,9,,,TRUE,TRUE
-30002,202002,100,7818,0,0.5,0.5,,,,,1,1,1,7818,R,0,0,9,,,TRUE,TRUE
-30002,202003,100,4897,0,0.5,0.5,,,,,1,,1,4897,R,0,,10,,,TRUE,TRUE
-30003,202001,100,7511,0,0.5,0.5,,4.265190233,,,,1,1,7511,R,,0,9,,TRUE,TRUE,
-30003,202002,100,1761,0,0.5,0.5,0.234456131,0.271256932,,,1,1,1,1761,R,0,0,9,TRUE,TRUE,TRUE,
-30003,202003,100,6492,0,0.5,0.5,3.686541738,,,,1,,1,6492,R,0,,10,TRUE,,TRUE,
-30004,202001,100,64,0,0.5,0.5,,0.030288689,,,,1,1,64,R,,0,9,,TRUE,TRUE,
-30004,202002,100,2113,0,0.5,0.5,33.015625,11.42162162,,,1,1,1,2113,R,0,0,9,TRUE,TRUE,TRUE,
-30004,202003,100,185,0,0.5,0.5,0.087553242,,,,1,,1,185,R,0,,10,TRUE,,TRUE,
-30005,202001,100,844,0,0.5,0.5,,0.941234172,,,,1,1,844,R,,0,9,,TRUE,TRUE,
-30005,202002,100,897,0,0.5,0.5,1.062434865,3.199201198,,,1,1,1,897,R,0,0,9,TRUE,TRUE,TRUE,
-30005,202003,100,280,0,0.5,0.5,0.312578027,,,,1,,1,280,R,0,,10,TRUE,,TRUE,
-30006,202001,100,1869,0,0.5,0.5,,0.995885563,,,,1,1,1869,R,,0,9,,TRUE,TRUE,
-30006,202002,100,1876,0,0.5,0.5,1.004131435,1.368417982,,,1,1,1,1876,R,0,0,9,TRUE,TRUE,TRUE,
-30006,202003,100,1371,0,0.5,0.5,0.730770871,,,,1,,1,1371,R,0,,10,TRUE,,TRUE,
-30007,202001,100,12769,0,0.5,0.5,,4.475816911,,,,1,1,12769,R,,0,9,,TRUE,TRUE,
-30007,202002,100,2853,0,0.5,0.5,0.223422901,0.248269056,,,1,1,1,2853,R,0,0,9,TRUE,TRUE,TRUE,
-30007,202003,100,11491,0,0.5,0.5,4.027888195,,,,1,,1,11491,R,0,,10,TRUE,,TRUE,
-30008,202001,100,141,0,0.5,0.5,,0.023463069,,,,1,1,141,R,,0,9,,TRUE,TRUE,
-30008,202002,100,6001,0,0.5,0.5,42.62017045,13.86213906,,,1,1,1,6001,R,0,0,9,TRUE,TRUE,TRUE,
-30008,202003,100,433,0,0.5,0.5,0.072138939,,,,1,,1,433,R,0,,10,TRUE,,TRUE,
-30009,202001,100,6417,0,0.5,0.5,,1.589639934,,,,1,1,6417,R,,0,9,,TRUE,TRUE,
-30009,202002,100,4037,0,0.5,0.5,0.629073275,3.053782962,,,1,1,1,4037,R,0,0,9,TRUE,TRUE,TRUE,
-30009,202003,100,1322,0,0.5,0.5,0.327462695,,,,1,,1,1322,R,0,,10,TRUE,,TRUE,
-30010,202001,100,28963,0,0.5,0.5,,,,,,1,1,28963,R,,0,9,,,TRUE,TRUE
-30010,202002,100,21734,0,0.5,0.5,,,,,1,1,1,21734,R,0,0,9,,,TRUE,TRUE
-30010,202003,100,10529,0,0.5,0.5,,,,,1,,1,10529,R,0,,10,,,TRUE,TRUE
-30011,202001,100,6009,0,0.5,0.5,,5.249464902,,,,1,1,6009,R,,0,9,,TRUE,TRUE,
-30011,202002,100,1145,0,0.5,0.5,0.190495606,0.226047443,,,1,1,1,1145,R,0,0,9,TRUE,TRUE,TRUE,
-30011,202003,100,5064,0,0.5,0.5,4.423850085,,,,1,,1,5064,R,0,,10,TRUE,,TRUE,
-30012,202001,100,256,0,0.5,0.5,,0.034032235,,,,1,1,256,R,,0,9,,TRUE,TRUE,
-30012,202002,100,7522,0,0.5,0.5,29.38390625,,,,1,1,1,7522,R,0,0,9,TRUE,,TRUE,
-30012,202003,100,,0,0.5,0.5,,,,,1,,1,7522,FIR,0,,10,,,TRUE,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_input.csv
new file mode 100644
index 00000000..f4a7b4aa
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_input.csv
@@ -0,0 +1,37 @@
+identifier,date,group,question,other
+30001,202001,100,8444,0
+30001,202002,100,7476,0
+30001,202003,100,2003,0
+30002,202001,100,9343,0
+30002,202002,100,7818,0
+30002,202003,100,4897,0
+30003,202001,100,7511,0
+30003,202002,100,1761,0
+30003,202003,100,6492,0
+30004,202001,100,64,0
+30004,202002,100,2113,0
+30004,202003,100,185,0
+30005,202001,100,844,0
+30005,202002,100,897,0
+30005,202003,100,280,0
+30006,202001,100,1869,0
+30006,202002,100,1876,0
+30006,202003,100,1371,0
+30007,202001,100,12769,0
+30007,202002,100,2853,0
+30007,202003,100,11491,0
+30008,202001,100,141,0
+30008,202002,100,6001,0
+30008,202003,100,433,0
+30009,202001,100,6417,0
+30009,202002,100,4037,0
+30009,202003,100,1322,0
+30010,202001,100,28963,0
+30010,202002,100,21734,0
+30010,202003,100,10529,0
+30011,202001,100,6009,0
+30011,202002,100,1145,0
+30011,202003,100,5064,0
+30012,202001,100,256,0
+30012,202002,100,7522,0
+30012,202003,100,,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
new file mode 100644
index 00000000..40c8c4b2
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
@@ -0,0 +1,37 @@
+identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,default_construction_link,filtered_marker
+30001,202001,100,8444,0,,,,,,1,1,8444,R,,0,9,,,TRUE,TRUE
+30001,202002,100,7476,0,,,,,1,1,1,7476,R,0,0,9,,,TRUE,TRUE
+30001,202003,100,2003,0,,,,,1,,1,2003,R,0,,10,,,TRUE,TRUE
+30002,202001,100,9343,0,,,,,,1,1,9343,R,,0,9,,,TRUE,TRUE
+30002,202002,100,7818,0,,,,,1,1,1,7818,R,0,0,9,,,TRUE,TRUE
+30002,202003,100,4897,0,,,,,1,,1,4897,R,0,,10,,,TRUE,TRUE
+30003,202001,100,7511,0,,4.265190233,,,,1,1,7511,R,,0,9,,TRUE,TRUE,
+30003,202002,100,1761,0,0.234456131,0.271256932,,,1,1,1,1761,R,0,0,9,TRUE,TRUE,TRUE,
+30003,202003,100,6492,0,3.686541738,,,,1,,1,6492,R,0,,10,TRUE,,TRUE,
+30004,202001,100,64,0,,0.030288689,,,,1,1,64,R,,0,9,,TRUE,TRUE,
+30004,202002,100,2113,0,33.015625,11.42162162,,,1,1,1,2113,R,0,0,9,TRUE,TRUE,TRUE,
+30004,202003,100,185,0,0.087553242,,,,1,,1,185,R,0,,10,TRUE,,TRUE,
+30005,202001,100,844,0,,0.941234172,,,,1,1,844,R,,0,9,,TRUE,TRUE,
+30005,202002,100,897,0,1.062434865,3.199201198,,,1,1,1,897,R,0,0,9,TRUE,TRUE,TRUE,
+30005,202003,100,280,0,0.312578027,,,,1,,1,280,R,0,,10,TRUE,,TRUE,
+30006,202001,100,1869,0,,0.995885563,,,,1,1,1869,R,,0,9,,TRUE,TRUE,
+30006,202002,100,1876,0,1.004131435,1.368417982,,,1,1,1,1876,R,0,0,9,TRUE,TRUE,TRUE,
+30006,202003,100,1371,0,0.730770871,,,,1,,1,1371,R,0,,10,TRUE,,TRUE,
+30007,202001,100,12769,0,,4.475816911,,,,1,1,12769,R,,0,9,,TRUE,TRUE,
+30007,202002,100,2853,0,0.223422901,0.248269056,,,1,1,1,2853,R,0,0,9,TRUE,TRUE,TRUE,
+30007,202003,100,11491,0,4.027888195,,,,1,,1,11491,R,0,,10,TRUE,,TRUE,
+30008,202001,100,141,0,,0.023463069,,,,1,1,141,R,,0,9,,TRUE,TRUE,
+30008,202002,100,6001,0,42.62017045,13.86213906,,,1,1,1,6001,R,0,0,9,TRUE,TRUE,TRUE,
+30008,202003,100,433,0,0.072138939,,,,1,,1,433,R,0,,10,TRUE,,TRUE,
+30009,202001,100,6417,0,,1.589639934,,,,1,1,6417,R,,0,9,,TRUE,TRUE,
+30009,202002,100,4037,0,0.629073275,3.053782962,,,1,1,1,4037,R,0,0,9,TRUE,TRUE,TRUE,
+30009,202003,100,1322,0,0.327462695,,,,1,,1,1322,R,0,,10,TRUE,,TRUE,
+30010,202001,100,28963,0,,,,,,1,1,28963,R,,0,9,,,TRUE,TRUE
+30010,202002,100,21734,0,,,,,1,1,1,21734,R,0,0,9,,,TRUE,TRUE
+30010,202003,100,10529,0,,,,,1,,1,10529,R,0,,10,,,TRUE,TRUE
+30011,202001,100,6009,0,,5.249464902,,,,1,1,6009,R,,0,9,,TRUE,TRUE,
+30011,202002,100,1145,0,0.190495606,0.226047443,,,1,1,1,1145,R,0,0,9,TRUE,TRUE,TRUE,
+30011,202003,100,5064,0,4.423850085,,,,1,,1,5064,R,0,,10,TRUE,,TRUE,
+30012,202001,100,256,0,,0.034032235,,,,1,1,256,R,,0,9,,TRUE,TRUE,
+30012,202002,100,7522,0,29.38390625,,,,1,1,1,7522,R,0,0,9,TRUE,,TRUE,
+30012,202003,100,,0,,,,,1,,1,7522,FIR,0,,10,,,TRUE,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
index cd7699e1..c46b2b1c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-30001,202001,100,8444,51,,,0.5,,1.5274,50.3694
-30001,202002,100,7476,51,,,0.5,0.9685,1.8795,121.4187
-30001,202003,100,2003,51,,,0.5,1.113,,89.3761
-30002,202001,100,9343,72,,,0.5,,1.5274,50.3694
-30002,202002,100,7818,72,,,0.5,0.9685,1.8795,121.4187
-30002,202003,100,4897,72,,,0.5,1.113,,89.3761
-30003,202001,100,7511,7,,,0.5,,1.5274,50.3694
-30003,202002,100,1761,7,,,0.5,0.9685,1.8795,121.4187
-30003,202003,100,6492,7,,,0.5,1.113,,89.3761
-30004,202001,100,64,81,,,0.5,,1.5274,50.3694
-30004,202002,100,2113,81,,,0.5,0.9685,1.8795,121.4187
-30004,202003,100,,81,,,0.5,1.113,,89.3761
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,0.5,,1.5274,50.3694
+30001,202002,100,7476,51,0.5,0.9685,1.8795,121.4187
+30001,202003,100,2003,51,0.5,1.113,,89.3761
+30002,202001,100,9343,72,0.5,,1.5274,50.3694
+30002,202002,100,7818,72,0.5,0.9685,1.8795,121.4187
+30002,202003,100,4897,72,0.5,1.113,,89.3761
+30003,202001,100,7511,7,0.5,,1.5274,50.3694
+30003,202002,100,1761,7,0.5,0.9685,1.8795,121.4187
+30003,202003,100,6492,7,0.5,1.113,,89.3761
+30004,202001,100,64,81,0.5,,1.5274,50.3694
+30004,202002,100,2113,81,0.5,0.9685,1.8795,121.4187
+30004,202003,100,,81,0.5,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 8d4b8a76..e6195aad 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c
-30001,202001,100,8444,51,,,0.5,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
-30001,202002,100,7476,51,,,0.5,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7476,R,4,3,4
-30001,202003,100,2003,51,,,0.5,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.3199735,,96.19575,2003,R,3,,3
-30002,202001,100,9343,72,,,0.5,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
-30002,202002,100,7818,72,,,0.5,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7818,R,4,3,4
-30002,202003,100,4897,72,,,0.5,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.3199735,,96.19575,4897,R,3,,3
-30003,202001,100,7511,7,,,0.5,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
-30003,202002,100,1761,7,,,0.5,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,1761,R,4,3,4
-30003,202003,100,6492,7,,,0.5,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.3199735,,96.19575,6492,R,3,,3
-30004,202001,100,64,81,,,0.5,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
-30004,202002,100,2113,81,,,0.5,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,2113,R,4,3,4
-30004,202003,100,,81,,,0.5,1.113,,89.3761,,,1.526947,,103.0154,1.3199735,,96.19575,2789.104006,FIR,3,,3
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,8444,51,0.5,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
+30001,202002,100,7476,51,0.5,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7476,R,4,3,4
+30001,202003,100,2003,51,0.5,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.3199735,,96.19575,2003,R,3,,3
+30002,202001,100,9343,72,0.5,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
+30002,202002,100,7818,72,0.5,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7818,R,4,3,4
+30002,202003,100,4897,72,0.5,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.3199735,,96.19575,4897,R,3,,3
+30003,202001,100,7511,7,0.5,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
+30003,202002,100,1761,7,0.5,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,1761,R,4,3,4
+30003,202003,100,6492,7,0.5,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.3199735,,96.19575,6492,R,3,,3
+30004,202001,100,64,81,0.5,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
+30004,202002,100,2113,81,0.5,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,2113,R,4,3,4
+30004,202003,100,,81,0.5,1.113,,89.3761,,,1.526947,,103.0154,1.3199735,,96.19575,2789.104006,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
index 92012aa8..6923f208 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-30001,202001,100,8444,51,,,0.8,,1.5274,50.3694
-30001,202002,100,7476,51,,,0.8,0.9685,1.8795,121.4187
-30001,202003,100,2003,51,,,0.8,1.113,,89.3761
-30002,202001,100,9343,72,,,0.8,,1.5274,50.3694
-30002,202002,100,7818,72,,,0.8,0.9685,1.8795,121.4187
-30002,202003,100,4897,72,,,0.8,1.113,,89.3761
-30003,202001,100,7511,7,,,0.8,,1.5274,50.3694
-30003,202002,100,1761,7,,,0.8,0.9685,1.8795,121.4187
-30003,202003,100,6492,7,,,0.8,1.113,,89.3761
-30004,202001,100,64,81,,,0.8,,1.5274,50.3694
-30004,202002,100,2113,81,,,0.8,0.9685,1.8795,121.4187
-30004,202003,100,,81,,,0.8,1.113,,89.3761
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,0.8,,1.5274,50.3694
+30001,202002,100,7476,51,0.8,0.9685,1.8795,121.4187
+30001,202003,100,2003,51,0.8,1.113,,89.3761
+30002,202001,100,9343,72,0.8,,1.5274,50.3694
+30002,202002,100,7818,72,0.8,0.9685,1.8795,121.4187
+30002,202003,100,4897,72,0.8,1.113,,89.3761
+30003,202001,100,7511,7,0.8,,1.5274,50.3694
+30003,202002,100,1761,7,0.8,0.9685,1.8795,121.4187
+30003,202003,100,6492,7,0.8,1.113,,89.3761
+30004,202001,100,64,81,0.8,,1.5274,50.3694
+30004,202002,100,2113,81,0.8,0.9685,1.8795,121.4187
+30004,202003,100,,81,0.8,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index 7d15ece7..34ebbeb8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c
-30001,202001,100,8444,51,,,0.8,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.6294848,106.2331217,8444,R,,4,4
-30001,202002,100,7476,51,,,0.8,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7476,R,4,3,4
-30001,202003,100,2003,51,,,0.8,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.4441576,,100.28754,2003,R,3,,3
-30002,202001,100,9343,72,,,0.8,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.6294848,106.23316,9343,R,,4,4
-30002,202002,100,7818,72,,,0.8,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7818,R,4,3,4
-30002,202003,100,4897,72,,,0.8,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
-30003,202001,100,7511,7,,,0.8,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.6294848,106.23316,7511,R,,4,4
-30003,202002,100,1761,7,,,0.8,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,1761,R,4,3,4
-30003,202003,100,6492,7,,,0.8,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
-30004,202001,100,64,81,,,0.8,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.6294848,106.23316,64,R,,4,4
-30004,202002,100,2113,81,,,0.8,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,2113,R,4,3,4
-30004,202003,100,,81,,,0.8,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,3051.505009,FIR,3,,3
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,8444,51,0.8,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.6294848,106.2331217,8444,R,,4,4
+30001,202002,100,7476,51,0.8,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7476,R,4,3,4
+30001,202003,100,2003,51,0.8,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.4441576,,100.28754,2003,R,3,,3
+30002,202001,100,9343,72,0.8,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.6294848,106.23316,9343,R,,4,4
+30002,202002,100,7818,72,0.8,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7818,R,4,3,4
+30002,202003,100,4897,72,0.8,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
+30003,202001,100,7511,7,0.8,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.6294848,106.23316,7511,R,,4,4
+30003,202002,100,1761,7,0.8,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,1761,R,4,3,4
+30003,202003,100,6492,7,0.8,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
+30004,202001,100,64,81,0.8,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.6294848,106.23316,64,R,,4,4
+30004,202002,100,2113,81,0.8,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,2113,R,4,3,4
+30004,202003,100,,81,0.8,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,3051.505009,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
index bc141a7d..3d4265d9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-60001,202001,100,5077,15,,,0.5,,1.5274,50.3694
-60001,202002,100,7830,15,,,0.5,0.9685,1.8795,121.4187
-60001,202003,100,1046,15,,,0.5,1.113,,89.3761
-60002,202001,100,1588,71,,,0.5,,1.5274,50.3694
-60002,202002,100,1213,71,,,0.5,0.9685,1.8795,121.4187
-60002,202003,100,3807,71,,,0.5,1.113,,89.3761
-60003,202001,100,6541,26,,,0.5,,1.5274,50.3694
-60003,202002,100,336,26,,,0.5,0.9685,1.8795,121.4187
-60003,202003,100,6351,26,,,0.5,1.113,,89.3761
-60004,202001,100,,3,,,0.5,,1.5274,50.3694
-60004,202002,100,,3,,,0.5,0.9685,1.8795,121.4187
-60004,202003,100,401,3,,,0.5,1.113,,89.3761
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+60001,202001,100,5077,15,0.5,,1.5274,50.3694
+60001,202002,100,7830,15,0.5,0.9685,1.8795,121.4187
+60001,202003,100,1046,15,0.5,1.113,,89.3761
+60002,202001,100,1588,71,0.5,,1.5274,50.3694
+60002,202002,100,1213,71,0.5,0.9685,1.8795,121.4187
+60002,202003,100,3807,71,0.5,1.113,,89.3761
+60003,202001,100,6541,26,0.5,,1.5274,50.3694
+60003,202002,100,336,26,0.5,0.9685,1.8795,121.4187
+60003,202003,100,6351,26,0.5,1.113,,89.3761
+60004,202001,100,,3,0.5,,1.5274,50.3694
+60004,202002,100,,3,0.5,0.9685,1.8795,121.4187
+60004,202003,100,401,3,0.5,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index 9c48f082..e275f74c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-60001,202001,100,5077,15,,,0.5,,1.5274,50.3694,,0.648403576,,7.141605449,117.9107143,,4.334502725,84.14005715,5077,R,,3,3
-60001,202002,100,7830,15,,,0.5,0.9685,1.8795,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,7830,R,3,3,3
-60001,202003,100,1046,15,,,0.5,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
-60002,202001,100,1588,71,,,0.5,,1.5274,50.3694,,1.309150866,,7.141605449,117.9107143,,4.334502725,84.14005715,1588,R,,3,3
-60002,202002,100,1213,71,,,0.5,0.9685,1.8795,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,1213,R,3,3,3
-60002,202003,100,3807,71,,,0.5,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
-60003,202001,100,6541,26,,,0.5,,1.5274,50.3694,,19.4672619,,7.141605449,117.9107143,,4.334502725,84.14005715,6541,R,,3,3
-60003,202002,100,336,26,,,0.5,0.9685,1.8795,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,336,R,3,3,3
-60003,202003,100,6351,26,,,0.5,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
-60004,202001,100,,3,,,0.5,,1.5274,50.3694,,,,7.141605449,117.9107143,,4.334502725,84.14005715,3909.556029,BI,,3,3
-60004,202002,100,,3,,,0.5,0.9685,1.8795,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,901.9618346,BI,3,3,3
-60004,202003,100,401,3,,,0.5,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+60001,202001,100,5077,15,0.5,,1.5274,50.3694,,0.648403576,,7.141605449,117.9107143,,4.334502725,84.14005715,5077,R,,3,3
+60001,202002,100,7830,15,0.5,0.9685,1.8795,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,7830,R,3,3,3
+60001,202003,100,1046,15,0.5,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
+60002,202001,100,1588,71,0.5,,1.5274,50.3694,,1.309150866,,7.141605449,117.9107143,,4.334502725,84.14005715,1588,R,,3,3
+60002,202002,100,1213,71,0.5,0.9685,1.8795,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,1213,R,3,3,3
+60002,202003,100,3807,71,0.5,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
+60003,202001,100,6541,26,0.5,,1.5274,50.3694,,19.4672619,,7.141605449,117.9107143,,4.334502725,84.14005715,6541,R,,3,3
+60003,202002,100,336,26,0.5,0.9685,1.8795,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,336,R,3,3,3
+60003,202003,100,6351,26,0.5,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
+60004,202001,100,,3,0.5,,1.5274,50.3694,,,,7.141605449,117.9107143,,4.334502725,84.14005715,3909.556029,BI,,3,3
+60004,202002,100,,3,0.5,0.9685,1.8795,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,901.9618346,BI,3,3,3
+60004,202003,100,401,3,0.5,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
index 1bdb451e..39dd9334 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-30001,202001,100,8444,51,,,0.5,,1.5274,50.3694
-30001,202002,100,7476,51,,,0.5,0.9685,1.8795,121.4187
-30001,202003,100,2003,51,,,0.5,1.113,,89.3761
-30002,202001,100,9343,72,,,0.5,,1.5274,50.3694
-30002,202002,100,7818,72,,,0.5,0.9685,1.8795,121.4187
-30002,202003,100,4897,72,,,0.5,1.113,,89.3761
-30003,202001,100,7511,7,,,0.5,,1.5274,50.3694
-30003,202002,100,1761,7,,,0.5,0.9685,1.8795,121.4187
-30003,202003,100,6492,7,,,0.5,1.113,,89.3761
-30004,202001,100,,81,,,0.5,,1.5274,50.3694
-30004,202002,100,,81,,,0.5,0.9685,1.8795,121.4187
-30004,202003,100,,81,,,0.5,1.113,,89.3761
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,0.5,,1.5274,50.3694
+30001,202002,100,7476,51,0.5,0.9685,1.8795,121.4187
+30001,202003,100,2003,51,0.5,1.113,,89.3761
+30002,202001,100,9343,72,0.5,,1.5274,50.3694
+30002,202002,100,7818,72,0.5,0.9685,1.8795,121.4187
+30002,202003,100,4897,72,0.5,1.113,,89.3761
+30003,202001,100,7511,7,0.5,,1.5274,50.3694
+30003,202002,100,1761,7,0.5,0.9685,1.8795,121.4187
+30003,202003,100,6492,7,0.5,1.113,,89.3761
+30004,202001,100,,81,0.5,,1.5274,50.3694
+30004,202002,100,,81,0.5,0.9685,1.8795,121.4187
+30004,202003,100,,81,0.5,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index a4f794bc..adf89474 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c
-30001,202001,100,8444,51,,,0.5,,1.5274,50.3694,,1.129481006,,2.196577972,194.6,,2.062742377,165.75388,8444,R,,3,3
-30001,202002,100,7476,51,,,0.5,0.9685,1.8795,121.4187,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7476,R,3,3,3
-30001,202003,100,2003,51,,,0.5,1.113,,89.3761,0.267924024,,1.526946931,,103.0154,1.444157545,,100.28754,2003,R,3,,3
-30002,202001,100,9343,72,,,0.5,,1.5274,50.3694,,1.195062676,,2.196577972,194.6,,2.062742377,165.75388,9343,R,,3,3
-30002,202002,100,7818,72,,,0.5,0.9685,1.8795,121.4187,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7818,R,3,3,3
-30002,202003,100,4897,72,,,0.5,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
-30003,202001,100,7511,7,,,0.5,,1.5274,50.3694,,4.265190233,,2.196577972,194.6,,2.062742377,165.75388,7511,R,,3,3
-30003,202002,100,1761,7,,,0.5,0.9685,1.8795,121.4187,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,1761,R,3,3,3
-30003,202003,100,6492,7,,,0.5,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
-30004,202001,100,,81,,,0.5,,1.5274,50.3694,,,,2.196577972,194.6,,2.062742377,165.75388,13426.06428,C,,3,3
-30004,202002,100,,81,,,0.5,0.9685,1.8795,121.4187,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,9605.793024,FIC,3,3,3
-30004,202003,100,,81,,,0.5,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,13872.279,FIC,3,,3
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,8444,51,0.5,,1.5274,50.3694,,1.129481006,,2.196577972,194.6,,2.062742377,165.75388,8444,R,,3,3
+30001,202002,100,7476,51,0.5,0.9685,1.8795,121.4187,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7476,R,3,3,3
+30001,202003,100,2003,51,0.5,1.113,,89.3761,0.267924024,,1.526946931,,103.0154,1.444157545,,100.28754,2003,R,3,,3
+30002,202001,100,9343,72,0.5,,1.5274,50.3694,,1.195062676,,2.196577972,194.6,,2.062742377,165.75388,9343,R,,3,3
+30002,202002,100,7818,72,0.5,0.9685,1.8795,121.4187,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7818,R,3,3,3
+30002,202003,100,4897,72,0.5,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
+30003,202001,100,7511,7,0.5,,1.5274,50.3694,,4.265190233,,2.196577972,194.6,,2.062742377,165.75388,7511,R,,3,3
+30003,202002,100,1761,7,0.5,0.9685,1.8795,121.4187,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,1761,R,3,3,3
+30003,202003,100,6492,7,0.5,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
+30004,202001,100,,81,0.5,,1.5274,50.3694,,,,2.196577972,194.6,,2.062742377,165.75388,13426.06428,C,,3,3
+30004,202002,100,,81,0.5,0.9685,1.8795,121.4187,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,9605.793024,FIC,3,3,3
+30004,202003,100,,81,0.5,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,13872.279,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
index b1a7194e..461d6b1a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-110001,202001,100,9244,89,,,0.5,,1.5274,50.3694
-110001,202002,100,8916,89,,,0.5,0.9685,1.8795,121.4187
-110001,202003,100,6194,89,,,0.5,1.113,,89.3761
-110002,202001,100,4826,83,,,0.5,,1.5274,50.3694
-110002,202002,100,5903,83,,,0.5,0.9685,1.8795,121.4187
-110002,202003,100,4743,83,,,0.5,1.113,,89.3761
-110003,202001,100,7586,4,,,0.5,,1.5274,50.3694
-110003,202002,100,1016,4,,,0.5,0.9685,1.8795,121.4187
-110003,202003,100,1429,4,,,0.5,1.113,,89.3761
-110004,202001,100,3975,76,,,0.5,,1.5274,50.3694
-110004,202002,100,3044,76,,,0.5,0.9685,1.8795,121.4187
-110004,202003,100,,76,,,0.5,1.113,,89.3761
-110005,202001,200,5217,27,,,0.5,,2.994350985,107.48
-110005,202002,200,7016,27,,,0.5,1.377938182,0.670608989,54.70285714
-110005,202003,200,9940,27,,,0.5,0.952585628,,98.26519337
-110006,202001,200,5325,42,,,0.5,,2.994350985,107.48
-110006,202002,200,7747,42,,,0.5,1.377938182,0.670608989,54.70285714
-110006,202003,200,6685,42,,,0.5,0.952585628,,98.26519337
-110007,202001,200,5496,19,,,0.5,,2.994350985,107.48
-110007,202002,200,1010,19,,,0.5,1.377938182,0.670608989,54.70285714
-110007,202003,200,1235,19,,,0.5,0.952585628,,98.26519337
-110008,202001,200,,43,,,0.5,,2.994350985,107.48
-110008,202002,200,3913,43,,,0.5,1.377938182,0.670608989,54.70285714
-110008,202003,200,6013,43,,,0.5,0.952585628,,98.26519337
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+110001,202001,100,9244,89,0.5,,1.5274,50.3694
+110001,202002,100,8916,89,0.5,0.9685,1.8795,121.4187
+110001,202003,100,6194,89,0.5,1.113,,89.3761
+110002,202001,100,4826,83,0.5,,1.5274,50.3694
+110002,202002,100,5903,83,0.5,0.9685,1.8795,121.4187
+110002,202003,100,4743,83,0.5,1.113,,89.3761
+110003,202001,100,7586,4,0.5,,1.5274,50.3694
+110003,202002,100,1016,4,0.5,0.9685,1.8795,121.4187
+110003,202003,100,1429,4,0.5,1.113,,89.3761
+110004,202001,100,3975,76,0.5,,1.5274,50.3694
+110004,202002,100,3044,76,0.5,0.9685,1.8795,121.4187
+110004,202003,100,,76,0.5,1.113,,89.3761
+110005,202001,200,5217,27,0.5,,2.994350985,107.48
+110005,202002,200,7016,27,0.5,1.377938182,0.670608989,54.70285714
+110005,202003,200,9940,27,0.5,0.952585628,,98.26519337
+110006,202001,200,5325,42,0.5,,2.994350985,107.48
+110006,202002,200,7747,42,0.5,1.377938182,0.670608989,54.70285714
+110006,202003,200,6685,42,0.5,0.952585628,,98.26519337
+110007,202001,200,5496,19,0.5,,2.994350985,107.48
+110007,202002,200,1010,19,0.5,1.377938182,0.670608989,54.70285714
+110007,202003,200,1235,19,0.5,0.952585628,,98.26519337
+110008,202001,200,,43,0.5,,2.994350985,107.48
+110008,202002,200,3913,43,0.5,1.377938182,0.670608989,54.70285714
+110008,202003,200,6013,43,0.5,0.952585628,,98.26519337
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index dc498973..d9b9bce4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-110001,202001,100,9244,89,,,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
-110001,202002,100,8916,89,,,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
-110001,202003,100,6194,89,,,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
-110002,202001,100,4826,83,,,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
-110002,202002,100,5903,83,,,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
-110002,202003,100,4743,83,,,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
-110003,202001,100,7586,4,,,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
-110003,202002,100,1016,4,,,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
-110003,202003,100,1429,4,,,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
-110004,202001,100,3975,76,,,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
-110004,202002,100,3044,76,,,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
-110004,202003,100,,76,,,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
-110005,202001,200,5217,27,,,0.5,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3
-110005,202002,200,7016,27,,,0.5,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4
-110005,202003,200,9940,27,,,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
-110006,202001,200,5325,42,,,0.5,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3
-110006,202002,200,7747,42,,,0.5,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4
-110006,202003,200,6685,42,,,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
-110007,202001,200,5496,19,,,0.5,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3
-110007,202002,200,1010,19,,,0.5,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4
-110007,202003,200,1235,19,,,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
-110008,202001,200,,43,,,0.5,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3
-110008,202002,200,3913,43,,,0.5,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4
-110008,202003,200,6013,43,,,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,9244,89,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
+110001,202002,100,8916,89,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
+110001,202003,100,6194,89,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
+110002,202001,100,4826,83,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
+110002,202002,100,5903,83,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
+110002,202003,100,4743,83,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
+110003,202001,100,7586,4,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
+110003,202002,100,1016,4,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
+110003,202003,100,1429,4,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
+110004,202001,100,3975,76,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
+110004,202002,100,3044,76,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
+110004,202003,100,,76,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
+110005,202001,200,5217,27,0.5,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3
+110005,202002,200,7016,27,0.5,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4
+110005,202003,200,9940,27,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
+110006,202001,200,5325,42,0.5,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3
+110006,202002,200,7747,42,0.5,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4
+110006,202003,200,6685,42,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
+110007,202001,200,5496,19,0.5,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3
+110007,202002,200,1010,19,0.5,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4
+110007,202003,200,1235,19,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
+110008,202001,200,,43,0.5,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3
+110008,202002,200,3913,43,0.5,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4
+110008,202003,200,6013,43,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
index b2a3ca3e..a0f21e24 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-30001,202001,100,8444,51,,,0.5,,1.5274,50.3694
-30001,202002,100,7476,51,,,0.5,,1.8795,121.4187
-30001,202003,100,2003,51,,,0.5,,,89.3761
-30002,202001,100,9343,72,,,0.5,,1.5274,50.3694
-30002,202002,100,7818,72,,,0.5,,1.8795,121.4187
-30002,202003,100,4897,72,,,0.5,,,89.3761
-30003,202001,100,7511,7,,,0.5,,1.5274,50.3694
-30003,202002,100,1761,7,,,0.5,,1.8795,121.4187
-30003,202003,100,6492,7,,,0.5,,,89.3761
-30004,202001,100,64,81,,,0.5,,1.5274,50.3694
-30004,202002,100,2113,81,,,0.5,,1.8795,121.4187
-30004,202003,100,,81,,,0.5,,,89.3761
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,0.5,,1.5274,50.3694
+30001,202002,100,7476,51,0.5,,1.8795,121.4187
+30001,202003,100,2003,51,0.5,,,89.3761
+30002,202001,100,9343,72,0.5,,1.5274,50.3694
+30002,202002,100,7818,72,0.5,,1.8795,121.4187
+30002,202003,100,4897,72,0.5,,,89.3761
+30003,202001,100,7511,7,0.5,,1.5274,50.3694
+30003,202002,100,1761,7,0.5,,1.8795,121.4187
+30003,202003,100,6492,7,0.5,,,89.3761
+30004,202001,100,64,81,0.5,,1.5274,50.3694
+30004,202002,100,2113,81,0.5,,1.8795,121.4187
+30004,202003,100,,81,0.5,,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 5556aa05..a1656849 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c
-30001,202001,100,8444,51,,,0.5,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
-30001,202002,100,7476,51,,,0.5,,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4
-30001,202003,100,2003,51,,,0.5,,,89.3761,0.267924024,,1.526947,,103.0154,1.526947,,96.19575,2003,R,3,,3
-30002,202001,100,9343,72,,,0.5,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
-30002,202002,100,7818,72,,,0.5,,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4
-30002,202003,100,4897,72,,,0.5,,,89.3761,0.626375032,,1.526947,,103.0154,1.526947,,96.19575,4897,R,3,,3
-30003,202001,100,7511,7,,,0.5,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
-30003,202002,100,1761,7,,,0.5,,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4
-30003,202003,100,6492,7,,,0.5,,,89.3761,3.686541738,,1.526947,,103.0154,1.526947,,96.19575,6492,R,3,,3
-30004,202001,100,64,81,,,0.5,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
-30004,202002,100,2113,81,,,0.5,,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4
-30004,202003,100,,81,,,0.5,,,89.3761,,,1.526947,,103.0154,1.526947,,96.19575,3226.439011,FIR,3,,3
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,8444,51,0.5,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
+30001,202002,100,7476,51,0.5,,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4
+30001,202003,100,2003,51,0.5,,,89.3761,0.267924024,,1.526947,,103.0154,1.526947,,96.19575,2003,R,3,,3
+30002,202001,100,9343,72,0.5,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
+30002,202002,100,7818,72,0.5,,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4
+30002,202003,100,4897,72,0.5,,,89.3761,0.626375032,,1.526947,,103.0154,1.526947,,96.19575,4897,R,3,,3
+30003,202001,100,7511,7,0.5,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
+30003,202002,100,1761,7,0.5,,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4
+30003,202003,100,6492,7,0.5,,,89.3761,3.686541738,,1.526947,,103.0154,1.526947,,96.19575,6492,R,3,,3
+30004,202001,100,64,81,0.5,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
+30004,202002,100,2113,81,0.5,,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4
+30004,202003,100,,81,0.5,,,89.3761,,,1.526947,,103.0154,1.526947,,96.19575,3226.439011,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
index 15c737ba..55fdf7eb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-60001,202001,100,5077,15,,,0.5,,,50.3694
-60001,202002,100,7830,15,,,0.5,0.9685,,121.4187
-60001,202003,100,1046,15,,,0.5,1.113,,89.3761
-60002,202001,100,1588,71,,,0.5,,,50.3694
-60002,202002,100,1213,71,,,0.5,0.9685,,121.4187
-60002,202003,100,3807,71,,,0.5,1.113,,89.3761
-60003,202001,100,6541,26,,,0.5,,,50.3694
-60003,202002,100,336,26,,,0.5,0.9685,,121.4187
-60003,202003,100,6351,26,,,0.5,1.113,,89.3761
-60004,202001,100,,3,,,0.5,,,50.3694
-60004,202002,100,,3,,,0.5,0.9685,,121.4187
-60004,202003,100,401,3,,,0.5,1.113,,89.3761
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+60001,202001,100,5077,15,0.5,,,50.3694
+60001,202002,100,7830,15,0.5,0.9685,,121.4187
+60001,202003,100,1046,15,0.5,1.113,,89.3761
+60002,202001,100,1588,71,0.5,,,50.3694
+60002,202002,100,1213,71,0.5,0.9685,,121.4187
+60002,202003,100,3807,71,0.5,1.113,,89.3761
+60003,202001,100,6541,26,0.5,,,50.3694
+60003,202002,100,336,26,0.5,0.9685,,121.4187
+60003,202003,100,6351,26,0.5,1.113,,89.3761
+60004,202001,100,,3,0.5,,,50.3694
+60004,202002,100,,3,0.5,0.9685,,121.4187
+60004,202003,100,401,3,0.5,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index 15028707..c02eec10 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-60001,202001,100,5077,15,,,0.5,,,50.3694,,0.648403576,,7.141605449,117.9107143,,7.141605449,84.14005715,5077,R,,3,3
-60001,202002,100,7830,15,,,0.5,0.9685,,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3
-60001,202003,100,1046,15,,,0.5,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
-60002,202001,100,1588,71,,,0.5,,,50.3694,,1.309150866,,7.141605449,117.9107143,,7.141605449,84.14005715,1588,R,,3,3
-60002,202002,100,1213,71,,,0.5,0.9685,,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3
-60002,202003,100,3807,71,,,0.5,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
-60003,202001,100,6541,26,,,0.5,,,50.3694,,19.4672619,,7.141605449,117.9107143,,7.141605449,84.14005715,6541,R,,3,3
-60003,202002,100,336,26,,,0.5,0.9685,,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3
-60003,202003,100,6351,26,,,0.5,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
-60004,202001,100,,3,,,0.5,,,50.3694,,,,7.141605449,117.9107143,,7.141605449,84.14005715,7500.429481,BI,,3,3
-60004,202002,100,,3,,,0.5,0.9685,,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3
-60004,202003,100,401,3,,,0.5,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+60001,202001,100,5077,15,0.5,,,50.3694,,0.648403576,,7.141605449,117.9107143,,7.141605449,84.14005715,5077,R,,3,3
+60001,202002,100,7830,15,0.5,0.9685,,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3
+60001,202003,100,1046,15,0.5,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
+60002,202001,100,1588,71,0.5,,,50.3694,,1.309150866,,7.141605449,117.9107143,,7.141605449,84.14005715,1588,R,,3,3
+60002,202002,100,1213,71,0.5,0.9685,,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3
+60002,202003,100,3807,71,0.5,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
+60003,202001,100,6541,26,0.5,,,50.3694,,19.4672619,,7.141605449,117.9107143,,7.141605449,84.14005715,6541,R,,3,3
+60003,202002,100,336,26,0.5,0.9685,,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3
+60003,202003,100,6351,26,0.5,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
+60004,202001,100,,3,0.5,,,50.3694,,,,7.141605449,117.9107143,,7.141605449,84.14005715,7500.429481,BI,,3,3
+60004,202002,100,,3,0.5,0.9685,,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3
+60004,202003,100,401,3,0.5,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
index d69b4082..06f70a65 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-30001,202001,100,8444,51,,,0.5,,1.5274,
-30001,202002,100,7476,51,,,0.5,0.9685,1.8795,
-30001,202003,100,2003,51,,,0.5,1.113,,
-30002,202001,100,9343,72,,,0.5,,1.5274,
-30002,202002,100,7818,72,,,0.5,0.9685,1.8795,
-30002,202003,100,4897,72,,,0.5,1.113,,
-30003,202001,100,7511,7,,,0.5,,1.5274,
-30003,202002,100,1761,7,,,0.5,0.9685,1.8795,
-30003,202003,100,6492,7,,,0.5,1.113,,
-30004,202001,100,,81,,,0.5,,1.5274,
-30004,202002,100,,81,,,0.5,0.9685,1.8795,
-30004,202003,100,,81,,,0.5,1.113,,
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,0.5,,1.5274,
+30001,202002,100,7476,51,0.5,0.9685,1.8795,
+30001,202003,100,2003,51,0.5,1.113,,
+30002,202001,100,9343,72,0.5,,1.5274,
+30002,202002,100,7818,72,0.5,0.9685,1.8795,
+30002,202003,100,4897,72,0.5,1.113,,
+30003,202001,100,7511,7,0.5,,1.5274,
+30003,202002,100,1761,7,0.5,0.9685,1.8795,
+30003,202003,100,6492,7,0.5,1.113,,
+30004,202001,100,,81,0.5,,1.5274,
+30004,202002,100,,81,0.5,0.9685,1.8795,
+30004,202003,100,,81,0.5,1.113,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index 5581404b..f868511c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,13 +1,13 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c
-30001,202001,100,8444,51,,,0.5,,1.5274,,,1.129481006,,2.196577972,194.6,,2.062742377,194.6,8444,R,,3,3
-30001,202002,100,7476,51,,,0.5,0.9685,1.8795,,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3
-30001,202003,100,2003,51,,,0.5,1.113,,,0.267924024,,1.526946931,,103.0154,1.444157545,,103.0154,2003,R,3,,3
-30002,202001,100,9343,72,,,0.5,,1.5274,,,1.195062676,,2.196577972,194.6,,2.062742377,194.6,9343,R,,3,3
-30002,202002,100,7818,72,,,0.5,0.9685,1.8795,,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3
-30002,202003,100,4897,72,,,0.5,1.113,,,0.626375032,,1.526947,,103.0154,1.4441576,,103.0154,4897,R,3,,3
-30003,202001,100,7511,7,,,0.5,,1.5274,,,4.265190233,,2.196577972,194.6,,2.062742377,194.6,7511,R,,3,3
-30003,202002,100,1761,7,,,0.5,0.9685,1.8795,,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3
-30003,202003,100,6492,7,,,0.5,1.113,,,3.686541738,,1.526947,,103.0154,1.4441576,,103.0154,6492,R,3,,3
-30004,202001,100,,81,,,0.5,,1.5274,,,,,2.196577972,194.6,,2.062742377,194.6,15762.6,C,,3,3
-30004,202002,100,,81,,,0.5,0.9685,1.8795,,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3
-30004,202003,100,,81,,,0.5,1.113,,,,,1.526947,,103.0154,1.4441576,,103.0154,16286.46938,FIC,3,,3
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,8444,51,0.5,,1.5274,,,1.129481006,,2.196577972,194.6,,2.062742377,194.6,8444,R,,3,3
+30001,202002,100,7476,51,0.5,0.9685,1.8795,,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3
+30001,202003,100,2003,51,0.5,1.113,,,0.267924024,,1.526946931,,103.0154,1.444157545,,103.0154,2003,R,3,,3
+30002,202001,100,9343,72,0.5,,1.5274,,,1.195062676,,2.196577972,194.6,,2.062742377,194.6,9343,R,,3,3
+30002,202002,100,7818,72,0.5,0.9685,1.8795,,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3
+30002,202003,100,4897,72,0.5,1.113,,,0.626375032,,1.526947,,103.0154,1.4441576,,103.0154,4897,R,3,,3
+30003,202001,100,7511,7,0.5,,1.5274,,,4.265190233,,2.196577972,194.6,,2.062742377,194.6,7511,R,,3,3
+30003,202002,100,1761,7,0.5,0.9685,1.8795,,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3
+30003,202003,100,6492,7,0.5,1.113,,,3.686541738,,1.526947,,103.0154,1.4441576,,103.0154,6492,R,3,,3
+30004,202001,100,,81,0.5,,1.5274,,,,,2.196577972,194.6,,2.062742377,194.6,15762.6,C,,3,3
+30004,202002,100,,81,0.5,0.9685,1.8795,,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3
+30004,202003,100,,81,0.5,1.113,,,,,1.526947,,103.0154,1.4441576,,103.0154,16286.46938,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
index 02de0898..2a73efb7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-110001,202001,100,9244,89,,,0.5,,1.5274,50.3694
-110001,202002,100,8916,89,,,0.5,0.9685,1.8795,121.4187
-110001,202003,100,6194,89,,,0.5,1.113,,89.3761
-110002,202001,100,4826,83,,,0.5,,1.5274,50.3694
-110002,202002,100,5903,83,,,0.5,0.9685,1.8795,121.4187
-110002,202003,100,4743,83,,,0.5,1.113,,89.3761
-110003,202001,100,7586,4,,,0.5,,1.5274,50.3694
-110003,202002,100,1016,4,,,0.5,0.9685,1.8795,121.4187
-110003,202003,100,1429,4,,,0.5,1.113,,89.3761
-110004,202001,100,3975,76,,,0.5,,1.5274,50.3694
-110004,202002,100,3044,76,,,0.5,0.9685,1.8795,121.4187
-110004,202003,100,,76,,,0.5,1.113,,89.3761
-110005,202001,200,5217,27,,,0.5,,,107.48
-110005,202002,200,7016,27,,,0.5,1.377938182,,54.70285714
-110005,202003,200,9940,27,,,0.5,0.952585628,,98.26519337
-110006,202001,200,5325,42,,,0.5,,,107.48
-110006,202002,200,7747,42,,,0.5,1.377938182,,54.70285714
-110006,202003,200,6685,42,,,0.5,0.952585628,,98.26519337
-110007,202001,200,5496,19,,,0.5,,,107.48
-110007,202002,200,1010,19,,,0.5,1.377938182,,54.70285714
-110007,202003,200,1235,19,,,0.5,0.952585628,,98.26519337
-110008,202001,200,,43,,,0.5,,,107.48
-110008,202002,200,3913,43,,,0.5,1.377938182,,54.70285714
-110008,202003,200,6013,43,,,0.5,0.952585628,,98.26519337
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+110001,202001,100,9244,89,0.5,,1.5274,50.3694
+110001,202002,100,8916,89,0.5,0.9685,1.8795,121.4187
+110001,202003,100,6194,89,0.5,1.113,,89.3761
+110002,202001,100,4826,83,0.5,,1.5274,50.3694
+110002,202002,100,5903,83,0.5,0.9685,1.8795,121.4187
+110002,202003,100,4743,83,0.5,1.113,,89.3761
+110003,202001,100,7586,4,0.5,,1.5274,50.3694
+110003,202002,100,1016,4,0.5,0.9685,1.8795,121.4187
+110003,202003,100,1429,4,0.5,1.113,,89.3761
+110004,202001,100,3975,76,0.5,,1.5274,50.3694
+110004,202002,100,3044,76,0.5,0.9685,1.8795,121.4187
+110004,202003,100,,76,0.5,1.113,,89.3761
+110005,202001,200,5217,27,0.5,,,107.48
+110005,202002,200,7016,27,0.5,1.377938182,,54.70285714
+110005,202003,200,9940,27,0.5,0.952585628,,98.26519337
+110006,202001,200,5325,42,0.5,,,107.48
+110006,202002,200,7747,42,0.5,1.377938182,,54.70285714
+110006,202003,200,6685,42,0.5,0.952585628,,98.26519337
+110007,202001,200,5496,19,0.5,,,107.48
+110007,202002,200,1010,19,0.5,1.377938182,,54.70285714
+110007,202003,200,1235,19,0.5,0.952585628,,98.26519337
+110008,202001,200,,43,0.5,,,107.48
+110008,202002,200,3913,43,0.5,1.377938182,,54.70285714
+110008,202003,200,6013,43,0.5,0.952585628,,98.26519337
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index eb418ded..1ad6a7f9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-110001,202001,100,9244,89,,,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
-110001,202002,100,8916,89,,,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
-110001,202003,100,6194,89,,,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
-110002,202001,100,4826,83,,,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
-110002,202002,100,5903,83,,,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
-110002,202003,100,4743,83,,,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
-110003,202001,100,7586,4,,,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
-110003,202002,100,1016,4,,,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
-110003,202003,100,1429,4,,,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
-110004,202001,100,3975,76,,,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
-110004,202002,100,3044,76,,,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
-110004,202003,100,,76,,,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
-110005,202001,200,5217,27,,,0.5,,,107.48,,0.743586089,,2.290844366,182.25,,2.290844366,144.865,5217,R,,3,3
-110005,202002,200,7016,27,,,0.5,1.377938182,,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4
-110005,202003,200,9940,27,,,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
-110006,202001,200,5325,42,,,0.5,,,107.48,,0.68736285,,2.290844366,182.25,,2.290844366,144.865,5325,R,,3,3
-110006,202002,200,7747,42,,,0.5,1.377938182,,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4
-110006,202003,200,6685,42,,,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
-110007,202001,200,5496,19,,,0.5,,,107.48,,5.441584158,,2.290844366,182.25,,2.290844366,144.865,5496,R,,3,3
-110007,202002,200,1010,19,,,0.5,1.377938182,,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4
-110007,202003,200,1235,19,,,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
-110008,202001,200,,43,,,0.5,,,107.48,,,,2.290844366,182.25,,2.290844366,144.865,8964.074004,BI,,3,3
-110008,202002,200,3913,43,,,0.5,1.377938182,,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4
-110008,202003,200,6013,43,,,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,9244,89,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
+110001,202002,100,8916,89,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
+110001,202003,100,6194,89,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
+110002,202001,100,4826,83,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
+110002,202002,100,5903,83,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
+110002,202003,100,4743,83,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
+110003,202001,100,7586,4,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
+110003,202002,100,1016,4,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
+110003,202003,100,1429,4,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
+110004,202001,100,3975,76,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
+110004,202002,100,3044,76,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
+110004,202003,100,,76,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
+110005,202001,200,5217,27,0.5,,,107.48,,0.743586089,,2.290844366,182.25,,2.290844366,144.865,5217,R,,3,3
+110005,202002,200,7016,27,0.5,1.377938182,,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4
+110005,202003,200,9940,27,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
+110006,202001,200,5325,42,0.5,,,107.48,,0.68736285,,2.290844366,182.25,,2.290844366,144.865,5325,R,,3,3
+110006,202002,200,7747,42,0.5,1.377938182,,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4
+110006,202003,200,6685,42,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
+110007,202001,200,5496,19,0.5,,,107.48,,5.441584158,,2.290844366,182.25,,2.290844366,144.865,5496,R,,3,3
+110007,202002,200,1010,19,0.5,1.377938182,,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4
+110007,202003,200,1235,19,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
+110008,202001,200,,43,0.5,,,107.48,,,,2.290844366,182.25,,2.290844366,144.865,8964.074004,BI,,3,3
+110008,202002,200,3913,43,0.5,1.377938182,,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4
+110008,202003,200,6013,43,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv
new file mode 100644
index 00000000..fb1f44f1
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv
@@ -0,0 +1,16 @@
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+210001,202001,1,547,10,0.5,,2.656680299,101.7103175
+210001,202002,1,362,10,0.5,0.771850199,1.13167173,74.91666667
+210001,202003,1,895,10,0.5,0.968230653,,70.26136364
+210002,202001,1,381,50,0.5,,2.656680299,101.7103175
+210002,202002,1,573,50,0.5,0.771850199,1.13167173,74.91666667
+210002,202003,1,214,50,0.5,0.968230653,,70.26136364
+210003,202001,2,961,12,0.5,,0.68736285,182.25
+210003,202002,2,267,12,0.5,0.994479964,1.158863126,150.2748092
+210003,202003,2,314,12,0.5,1.259780318,,182.2366412
+210004,202001,2,555,9,0.5,,0.68736285,182.25
+210004,202002,2,628,9,0.5,0.994479964,1.158863126,150.2748092
+210004,202003,2,736,9,0.5,1.259780318,,182.2366412
+210005,202001,1,100,18,0.5,,2.656680299,101.7103175
+210005,202002,2,,18,0.5,0.994479964,1.158863126,150.2748092
+210005,202003,2,,18,0.5,1.259780318,,182.2366412
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
new file mode 100644
index 00000000..7e8027d8
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -0,0 +1,16 @@
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+210001,202001,1,547,10,0.5,,2.656680299,101.7103175,,1.511049724,,1.087985595,13.17948718,,1.872332947,57.44490234,547,R,,2,3
+210001,202002,1,362,10,0.5,0.771850199,1.13167173,74.91666667,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2
+210001,202003,1,895,10,0.5,0.968230653,,70.26136364,2.472375691,,1.42292432,,18.48333333,1.195577487,,44.37234849,895,R,2,,2
+210002,202001,1,381,50,0.5,,2.656680299,101.7103175,,0.664921466,,1.087985595,13.17948718,,1.872332947,57.44490234,381,R,,2,3
+210002,202002,1,573,50,0.5,0.771850199,1.13167173,74.91666667,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2
+210002,202003,1,214,50,0.5,0.968230653,,70.26136364,0.373472949,,1.42292432,,18.48333333,1.195577487,,44.37234849,214,R,2,,2
+210003,202001,2,961,12,0.5,,0.68736285,182.25,,3.599250936,,2.241504449,72.19047619,,1.46443365,127.2202381,961,R,,2,2
+210003,202002,2,267,12,0.5,0.994479964,1.158863126,150.2748092,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2
+210003,202003,2,314,12,0.5,1.259780318,,182.2366412,1.176029963,,1.174002242,,50,1.21689128,,116.1183206,314,R,2,,2
+210004,202001,2,555,9,0.5,,0.68736285,182.25,,0.883757962,,2.241504449,72.19047619,,1.46443365,127.2202381,555,R,,2,2
+210004,202002,2,628,9,0.5,0.994479964,1.158863126,150.2748092,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2
+210004,202003,2,736,9,0.5,1.259780318,,182.2366412,1.171974522,,1.174002242,,50,1.21689128,,116.1183206,736,R,2,,2
+210005,202001,1,100,18,0.5,,2.656680299,101.7103175,,,,1.087985595,13.17948718,,1.872332947,57.44490234,100,R,,2,3
+210005,202002,2,,18,0.5,0.994479964,1.158863126,150.2748092,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2
+210005,202003,2,,18,0.5,1.259780318,,182.2366412,,,1.174002242,,50,1.21689128,,116.1183206,2112.577671,FIC,2,,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_input.csv
deleted file mode 100644
index 4eeb979c..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_input.csv
+++ /dev/null
@@ -1,16 +0,0 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-210001,202001,1,547,10,,,0.5,,2.656680299,101.7103175
-210001,202002,1,362,10,,,0.5,0.771850199,1.13167173,74.91666667
-210001,202003,1,895,10,,,0.5,0.968230653,,70.26136364
-210002,202001,1,381,50,,,0.5,,2.656680299,101.7103175
-210002,202002,1,573,50,,,0.5,0.771850199,1.13167173,74.91666667
-210002,202003,1,214,50,,,0.5,0.968230653,,70.26136364
-210003,202001,2,961,12,,,0.5,,0.68736285,182.25
-210003,202002,2,267,12,,,0.5,0.994479964,1.158863126,150.2748092
-210003,202003,2,314,12,,,0.5,1.259780318,,182.2366412
-210004,202001,2,555,9,,,0.5,,0.68736285,182.25
-210004,202002,2,628,9,,,0.5,0.994479964,1.158863126,150.2748092
-210004,202003,2,736,9,,,0.5,1.259780318,,182.2366412
-210005,202001,1,100,18,,,0.5,,2.656680299,101.7103175
-210005,202002,2,,18,,,0.5,0.994479964,1.158863126,150.2748092
-210005,202003,2,,18,,,0.5,1.259780318,,182.2366412
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_output.csv
deleted file mode 100644
index cb183528..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_output.csv
+++ /dev/null
@@ -1,16 +0,0 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-210001,202001,1,547,10,,,0.5,,2.656680299,101.7103175,,1.511049724,,1.087985595,13.17948718,,1.872332947,57.44490234,547,R,,2,3
-210001,202002,1,362,10,,,0.5,0.771850199,1.13167173,74.91666667,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2
-210001,202003,1,895,10,,,0.5,0.968230653,,70.26136364,2.472375691,,1.42292432,,18.48333333,1.195577487,,44.37234849,895,R,2,,2
-210002,202001,1,381,50,,,0.5,,2.656680299,101.7103175,,0.664921466,,1.087985595,13.17948718,,1.872332947,57.44490234,381,R,,2,3
-210002,202002,1,573,50,,,0.5,0.771850199,1.13167173,74.91666667,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2
-210002,202003,1,214,50,,,0.5,0.968230653,,70.26136364,0.373472949,,1.42292432,,18.48333333,1.195577487,,44.37234849,214,R,2,,2
-210003,202001,2,961,12,,,0.5,,0.68736285,182.25,,3.599250936,,2.241504449,72.19047619,,1.46443365,127.2202381,961,R,,2,2
-210003,202002,2,267,12,,,0.5,0.994479964,1.158863126,150.2748092,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2
-210003,202003,2,314,12,,,0.5,1.259780318,,182.2366412,1.176029963,,1.174002242,,50,1.21689128,,116.1183206,314,R,2,,2
-210004,202001,2,555,9,,,0.5,,0.68736285,182.25,,0.883757962,,2.241504449,72.19047619,,1.46443365,127.2202381,555,R,,2,2
-210004,202002,2,628,9,,,0.5,0.994479964,1.158863126,150.2748092,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2
-210004,202003,2,736,9,,,0.5,1.259780318,,182.2366412,1.171974522,,1.174002242,,50,1.21689128,,116.1183206,736,R,2,,2
-210005,202001,1,100,18,,,0.5,,2.656680299,101.7103175,,,,1.087985595,13.17948718,,1.872332947,57.44490234,100,R,,2,3
-210005,202002,2,,18,,,0.5,0.994479964,1.158863126,150.2748092,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2
-210005,202003,2,,18,,,0.5,1.259780318,,182.2366412,,,1.174002242,,50,1.21689128,,116.1183206,2112.577671,FIC,2,,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv
new file mode 100644
index 00000000..ae75b8f6
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv
@@ -0,0 +1,29 @@
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+70001,202001,100,5951,39,0.5,,1.511049724,101.7103175
+70001,202002,100,1814,39,0.5,,,
+70001,202003,100,734,39,0.5,1.082864299,,70.26136364
+70001,202004,100,96,39,0.5,1.42292432,0.664921466,101.7103175
+70001,202005,100,9086,39,0.5,0.70468356,2.677570093,74.91666667
+70001,202006,100,3949,39,0.5,1.174002242,0.404469274,182.2366412
+70001,202007,100,49,39,0.5,,,
+70002,202001,100,6705,94,0.5,,1.511049724,101.7103175
+70002,202002,100,48,94,0.5,,,
+70002,202003,100,5361,94,0.5,1.082864299,,70.26136364
+70002,202004,100,8767,94,0.5,1.42292432,0.664921466,101.7103175
+70002,202005,100,9214,94,0.5,0.70468356,2.677570093,74.91666667
+70002,202006,100,7467,94,0.5,1.174002242,0.404469274,182.2366412
+70002,202007,100,3475,94,0.5,,,
+70003,202001,100,6153,42,0.5,,1.511049724,101.7103175
+70003,202002,100,7711,42,0.5,,,
+70003,202003,100,5403,42,0.5,1.082864299,,70.26136364
+70003,202004,100,7445,42,0.5,1.42292432,0.664921466,101.7103175
+70003,202005,100,7092,42,0.5,0.70468356,2.677570093,74.91666667
+70003,202006,100,2038,42,0.5,1.174002242,0.404469274,182.2366412
+70003,202007,100,8768,42,0.5,,,
+70004,202001,100,,6,0.5,,1.511049724,101.7103175
+70004,202002,100,,6,0.5,,,
+70004,202003,100,6288,6,0.5,1.082864299,,70.26136364
+70004,202004,100,,6,0.5,1.42292432,0.664921466,101.7103175
+70004,202005,100,,6,0.5,0.70468356,2.677570093,74.91666667
+70004,202006,100,5875,6,0.5,1.174002242,0.404469274,182.2366412
+70004,202007,100,,6,0.5,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
new file mode 100644
index 00000000..1cab8212
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -0,0 +1,29 @@
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+70001,202001,100,5951,39,0.5,,1.511049724,101.7103175,,3.280595369,,47.92201545,107.48,,24.71653259,104.5951588,5951,R,,3,3
+70001,202002,100,1814,39,0.5,,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
+70001,202003,100,734,39,0.5,1.082864299,,70.26136364,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4
+70001,202004,100,96,39,0.5,1.42292432,0.664921466,101.7103175,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3
+70001,202005,100,9086,39,0.5,0.70468356,2.677570093,74.91666667,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3
+70001,202006,100,3949,39,0.5,1.174002242,0.404469274,182.2366412,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4
+70001,202007,100,49,39,0.5,,,,0.012408205,,1.593348776,,70.24,1.593348776,,70.24,49,R,3,,3
+70002,202001,100,6705,94,0.5,,1.511049724,101.7103175,,139.6875,,47.92201545,107.48,,24.71653259,104.5951588,6705,R,,3,3
+70002,202002,100,48,94,0.5,,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3
+70002,202003,100,5361,94,0.5,1.082864299,,70.26136364,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4
+70002,202004,100,8767,94,0.5,1.42292432,0.664921466,101.7103175,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3
+70002,202005,100,9214,94,0.5,0.70468356,2.677570093,74.91666667,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3
+70002,202006,100,7467,94,0.5,1.174002242,0.404469274,182.2366412,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4
+70002,202007,100,3475,94,0.5,,,,0.46538101,,1.593348776,,70.24,1.593348776,,70.24,3475,R,3,,3
+70003,202001,100,6153,42,0.5,,1.511049724,101.7103175,,0.797950979,,47.92201545,107.48,,24.71653259,104.5951588,6153,R,,3,3
+70003,202002,100,7711,42,0.5,,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
+70003,202003,100,5403,42,0.5,1.082864299,,70.26136364,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4
+70003,202004,100,7445,42,0.5,1.42292432,0.664921466,101.7103175,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3
+70003,202005,100,7092,42,0.5,0.70468356,2.677570093,74.91666667,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3
+70003,202006,100,2038,42,0.5,1.174002242,0.404469274,182.2366412,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4
+70003,202007,100,8768,42,0.5,,,,4.302257115,,1.593348776,,70.24,1.593348776,,70.24,8768,R,3,,3
+70004,202001,100,,6,0.5,,1.511049724,101.7103175,,,,47.92201545,107.48,,24.71653259,104.5951588,202432.0564,BI,,3,3
+70004,202002,100,,6,0.5,,,,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
+70004,202003,100,6288,6,0.5,1.082864299,,70.26136364,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4
+70004,202004,100,,6,0.5,1.42292432,0.664921466,101.7103175,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3
+70004,202005,100,,6,0.5,0.70468356,2.677570093,74.91666667,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3
+70004,202006,100,5875,6,0.5,1.174002242,0.404469274,182.2366412,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4
+70004,202007,100,,6,0.5,,,,,,1.593348776,,70.24,1.593348776,,70.24,9360.924059,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_input.csv
deleted file mode 100644
index 486f0501..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_input.csv
+++ /dev/null
@@ -1,29 +0,0 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-70001,202001,100,5951,39,,,0.5,,1.511049724,101.7103175
-70001,202002,100,1814,39,,,0.5,,,
-70001,202003,100,734,39,,,0.5,1.082864299,,70.26136364
-70001,202004,100,96,39,,,0.5,1.42292432,0.664921466,101.7103175
-70001,202005,100,9086,39,,,0.5,0.70468356,2.677570093,74.91666667
-70001,202006,100,3949,39,,,0.5,1.174002242,0.404469274,182.2366412
-70001,202007,100,49,39,,,0.5,,,
-70002,202001,100,6705,94,,,0.5,,1.511049724,101.7103175
-70002,202002,100,48,94,,,0.5,,,
-70002,202003,100,5361,94,,,0.5,1.082864299,,70.26136364
-70002,202004,100,8767,94,,,0.5,1.42292432,0.664921466,101.7103175
-70002,202005,100,9214,94,,,0.5,0.70468356,2.677570093,74.91666667
-70002,202006,100,7467,94,,,0.5,1.174002242,0.404469274,182.2366412
-70002,202007,100,3475,94,,,0.5,,,
-70003,202001,100,6153,42,,,0.5,,1.511049724,101.7103175
-70003,202002,100,7711,42,,,0.5,,,
-70003,202003,100,5403,42,,,0.5,1.082864299,,70.26136364
-70003,202004,100,7445,42,,,0.5,1.42292432,0.664921466,101.7103175
-70003,202005,100,7092,42,,,0.5,0.70468356,2.677570093,74.91666667
-70003,202006,100,2038,42,,,0.5,1.174002242,0.404469274,182.2366412
-70003,202007,100,8768,42,,,0.5,,,
-70004,202001,100,,6,,,0.5,,1.511049724,101.7103175
-70004,202002,100,,6,,,0.5,,,
-70004,202003,100,6288,6,,,0.5,1.082864299,,70.26136364
-70004,202004,100,,6,,,0.5,1.42292432,0.664921466,101.7103175
-70004,202005,100,,6,,,0.5,0.70468356,2.677570093,74.91666667
-70004,202006,100,5875,6,,,0.5,1.174002242,0.404469274,182.2366412
-70004,202007,100,,6,,,0.5,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_output.csv
deleted file mode 100644
index 5550c5eb..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_WHICH_CASE_7_output.csv
+++ /dev/null
@@ -1,29 +0,0 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-70001,202001,100,5951,39,,,0.5,,1.511049724,101.7103175,,3.280595369,,47.92201545,107.48,,24.71653259,104.5951588,5951,R,,3,3
-70001,202002,100,1814,39,,,0.5,,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
-70001,202003,100,734,39,,,0.5,1.082864299,,70.26136364,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4
-70001,202004,100,96,39,,,0.5,1.42292432,0.664921466,101.7103175,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3
-70001,202005,100,9086,39,,,0.5,0.70468356,2.677570093,74.91666667,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3
-70001,202006,100,3949,39,,,0.5,1.174002242,0.404469274,182.2366412,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4
-70001,202007,100,49,39,,,0.5,,,,0.012408205,,1.593348776,,70.24,1.593348776,,70.24,49,R,3,,3
-70002,202001,100,6705,94,,,0.5,,1.511049724,101.7103175,,139.6875,,47.92201545,107.48,,24.71653259,104.5951588,6705,R,,3,3
-70002,202002,100,48,94,,,0.5,,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3
-70002,202003,100,5361,94,,,0.5,1.082864299,,70.26136364,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4
-70002,202004,100,8767,94,,,0.5,1.42292432,0.664921466,101.7103175,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3
-70002,202005,100,9214,94,,,0.5,0.70468356,2.677570093,74.91666667,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3
-70002,202006,100,7467,94,,,0.5,1.174002242,0.404469274,182.2366412,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4
-70002,202007,100,3475,94,,,0.5,,,,0.46538101,,1.593348776,,70.24,1.593348776,,70.24,3475,R,3,,3
-70003,202001,100,6153,42,,,0.5,,1.511049724,101.7103175,,0.797950979,,47.92201545,107.48,,24.71653259,104.5951588,6153,R,,3,3
-70003,202002,100,7711,42,,,0.5,,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
-70003,202003,100,5403,42,,,0.5,1.082864299,,70.26136364,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4
-70003,202004,100,7445,42,,,0.5,1.42292432,0.664921466,101.7103175,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3
-70003,202005,100,7092,42,,,0.5,0.70468356,2.677570093,74.91666667,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3
-70003,202006,100,2038,42,,,0.5,1.174002242,0.404469274,182.2366412,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4
-70003,202007,100,8768,42,,,0.5,,,,4.302257115,,1.593348776,,70.24,1.593348776,,70.24,8768,R,3,,3
-70004,202001,100,,6,,,0.5,,1.511049724,101.7103175,,,,47.92201545,107.48,,24.71653259,104.5951588,202432.0564,BI,,3,3
-70004,202002,100,,6,,,0.5,,,,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
-70004,202003,100,6288,6,,,0.5,1.082864299,,70.26136364,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4
-70004,202004,100,,6,,,0.5,1.42292432,0.664921466,101.7103175,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3
-70004,202005,100,,6,,,0.5,0.70468356,2.677570093,74.91666667,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3
-70004,202006,100,5875,6,,,0.5,1.174002242,0.404469274,182.2366412,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4
-70004,202007,100,,6,,,0.5,,,,,,1.593348776,,70.24,1.593348776,,70.24,9360.924059,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
index 8219d361..3d915821 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w
-110001,202001,100,9244,89,,,0.5
-110001,202002,100,8916,89,,,0.5
-110001,202003,100,6194,89,,,0.5
-110002,202001,100,4826,83,,,0.5
-110002,202002,100,5903,83,,,0.5
-110002,202003,100,4743,83,,,0.5
-110003,202001,100,7586,4,,,0.5
-110003,202002,100,1016,4,,,0.5
-110003,202003,100,1429,4,,,0.5
-110004,202001,100,3975,76,,,0.5
-110004,202002,100,3044,76,,,0.5
-110004,202003,100,,76,,,0.5
-110005,202001,200,5217,27,,,0.5
-110005,202002,200,7016,27,,,0.5
-110005,202003,200,9940,27,,,0.5
-110006,202001,200,5325,42,,,0.5
-110006,202002,200,7747,42,,,0.5
-110006,202003,200,6685,42,,,0.5
-110007,202001,200,5496,19,,,0.5
-110007,202002,200,1010,19,,,0.5
-110007,202003,200,1235,19,,,0.5
-110008,202001,200,,43,,,0.5
-110008,202002,200,3913,43,,,0.5
-110008,202003,200,6013,43,,,0.5
-110009,202001,100,150000,85,,,0.5
-110009,202002,100,180000,85,,,0.5
-110009,202003,100,120000,85,,,0.5
-110010,202001,100,,71,,,0.5
-110010,202002,100,,71,,,0.5
-110010,202003,100,,71,,,0.5
-110011,202001,200,150000,85,,,0.5
-110011,202002,200,180000,85,,,0.5
-110011,202003,200,120000,85,,,0.5
-110012,202001,200,,71,,,0.5
-110012,202002,200,,71,,,0.5
-110012,202003,200,,71,,,0.5
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+110001,202001,100,9244,89,0.5,,,
+110001,202002,100,8916,89,0.5,,,
+110001,202003,100,6194,89,0.5,,,
+110002,202001,100,4826,83,0.5,,,
+110002,202002,100,5903,83,0.5,,,
+110002,202003,100,4743,83,0.5,,,
+110003,202001,100,7586,4,0.5,,,
+110003,202002,100,1016,4,0.5,,,
+110003,202003,100,1429,4,0.5,,,
+110004,202001,100,3975,76,0.5,,,
+110004,202002,100,3044,76,0.5,,,
+110004,202003,100,,76,0.5,,,
+110005,202001,200,5217,27,0.5,,,
+110005,202002,200,7016,27,0.5,,,
+110005,202003,200,9940,27,0.5,,,
+110006,202001,200,5325,42,0.5,,,
+110006,202002,200,7747,42,0.5,,,
+110006,202003,200,6685,42,0.5,,,
+110007,202001,200,5496,19,0.5,,,
+110007,202002,200,1010,19,0.5,,,
+110007,202003,200,1235,19,0.5,,,
+110008,202001,200,,43,0.5,,,
+110008,202002,200,3913,43,0.5,,,
+110008,202003,200,6013,43,0.5,,,
+110009,202001,100,150000,85,0.5,,,
+110009,202002,100,180000,85,0.5,,,
+110009,202003,100,120000,85,0.5,,,
+110010,202001,100,,71,0.5,,,
+110010,202002,100,,71,0.5,,,
+110010,202003,100,,71,0.5,,,
+110011,202001,200,150000,85,0.5,,,
+110011,202002,200,180000,85,0.5,,,
+110011,202003,200,120000,85,0.5,,,
+110012,202001,200,,71,0.5,,,
+110012,202002,200,,71,0.5,,,
+110012,202003,200,,71,0.5,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index 00721280..8593405a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
-110001,202001,100,9244,89,,,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4,,,
-110001,202002,100,8916,89,,,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,,,
-110001,202003,100,6194,89,,,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3,,,
-110002,202001,100,4826,83,,,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4,,,
-110002,202002,100,5903,83,,,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,,,
-110002,202003,100,4743,83,,,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3,,,
-110003,202001,100,7586,4,,,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4,,,
-110003,202002,100,1016,4,,,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,,,
-110003,202003,100,1429,4,,,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3,,,
-110004,202001,100,3975,76,,,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4,,,
-110004,202002,100,3044,76,,,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,,,
-110004,202003,100,,76,,,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3,,,
-110005,202001,200,5217,27,,,0.5,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3,,,
-110005,202002,200,7016,27,,,0.5,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,,,
-110005,202003,200,9940,27,,,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4,,,
-110006,202001,200,5325,42,,,0.5,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3,,,
-110006,202002,200,7747,42,,,0.5,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,,,
-110006,202003,200,6685,42,,,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4,,,
-110007,202001,200,5496,19,,,0.5,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3,,,
-110007,202002,200,1010,19,,,0.5,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,,,
-110007,202003,200,1235,19,,,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4,,,
-110008,202001,200,,43,,,0.5,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3,,,
-110008,202002,200,3913,43,,,0.5,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,,
-110008,202003,200,6013,43,,,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4,,,
-110009,202001,100,150000,85,,,0.5,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,150000,R,,4,4,,,TRUE
-110009,202002,100,180000,85,,,0.5,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,,,TRUE
-110009,202003,100,120000,85,,,0.5,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,120000,R,3,,3,,,TRUE
-110010,202001,100,,71,,,0.5,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,5398.829971,C,,4,4,,,
-110010,202002,100,,71,,,0.5,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,
-110010,202003,100,,71,,,0.5,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,4888.735268,FIC,3,,3,,,
-110011,202001,200,150000,85,,,0.5,,,,,,,2.290844366,182.25,,2.642597676,144.865,150000,R,,3,3,,,TRUE
-110011,202002,200,180000,85,,,0.5,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,,,TRUE
-110011,202003,200,120000,85,,,0.5,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,120000,R,4,,4,,,TRUE
-110012,202001,200,,71,,,0.5,,,,,,,2.290844366,182.25,,2.642597676,144.865,10285.415,C,,3,3,,,
-110012,202002,200,,71,,,0.5,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,
-110012,202003,200,,71,,,0.5,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,13496.15416,FIC,4,,4,,,
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+110001,202001,100,9244,89,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4,,,
+110001,202002,100,8916,89,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,,,
+110001,202003,100,6194,89,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3,,,
+110002,202001,100,4826,83,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4,,,
+110002,202002,100,5903,83,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,,,
+110002,202003,100,4743,83,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3,,,
+110003,202001,100,7586,4,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4,,,
+110003,202002,100,1016,4,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,,,
+110003,202003,100,1429,4,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3,,,
+110004,202001,100,3975,76,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4,,,
+110004,202002,100,3044,76,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,,,
+110004,202003,100,,76,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3,,,
+110005,202001,200,5217,27,0.5,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3,,,
+110005,202002,200,7016,27,0.5,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,,,
+110005,202003,200,9940,27,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4,,,
+110006,202001,200,5325,42,0.5,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3,,,
+110006,202002,200,7747,42,0.5,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,,,
+110006,202003,200,6685,42,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4,,,
+110007,202001,200,5496,19,0.5,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3,,,
+110007,202002,200,1010,19,0.5,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,,,
+110007,202003,200,1235,19,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4,,,
+110008,202001,200,,43,0.5,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3,,,
+110008,202002,200,3913,43,0.5,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,,
+110008,202003,200,6013,43,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4,,,
+110009,202001,100,150000,85,0.5,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,150000,R,,4,4,,,TRUE
+110009,202002,100,180000,85,0.5,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,,,TRUE
+110009,202003,100,120000,85,0.5,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,120000,R,3,,3,,,TRUE
+110010,202001,100,,71,0.5,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,5398.829971,C,,4,4,,,
+110010,202002,100,,71,0.5,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,
+110010,202003,100,,71,0.5,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,4888.735268,FIC,3,,3,,,
+110011,202001,200,150000,85,0.5,,,,,,,2.290844366,182.25,,2.642597676,144.865,150000,R,,3,3,,,TRUE
+110011,202002,200,180000,85,0.5,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,,,TRUE
+110011,202003,200,120000,85,0.5,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,120000,R,4,,4,,,TRUE
+110012,202001,200,,71,0.5,,,,,,,2.290844366,182.25,,2.642597676,144.865,10285.415,C,,3,3,,,
+110012,202002,200,,71,0.5,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,
+110012,202003,200,,71,0.5,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,13496.15416,FIC,4,,4,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv
index 61fd8667..d7acf9dc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv
@@ -1,22 +1,22 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-110001,202001,100,9244,89,,,0.5,,2.09204015,76.03985875
-110001,202002,100,8916,89,,,0.5,0.8701751,1.505585865,98.16768334
-110001,202003,100,6194,89,,,0.5,1.040615327,,79.81873182
-110002,202001,100,4826,83,,,0.5,,2.09204015,76.03985875
-110002,202002,100,5903,83,,,0.5,0.8701751,1.505585865,98.16768334
-110002,202003,100,4743,83,,,0.5,1.040615327,,79.81873182
-110003,202001,100,7586,4,,,0.5,,2.09204015,76.03985875
-110003,202002,100,1016,4,,,0.5,0.8701751,1.505585865,98.16768334
-110003,202003,100,1429,4,,,0.5,1.040615327,,79.81873182
-110004,202001,100,3975,76,,,0.5,,2.09204015,76.03985875
-110004,202002,100,3044,76,,,0.5,0.8701751,1.505585865,98.16768334
-110004,202003,100,,76,,,0.5,1.040615327,,79.81873182
-110005,202001,200,,27,,,0.5,,2.642597676,144.865
-110005,202002,200,,27,,,0.5,1.186209073,0.751963069,102.4888332
-110005,202003,200,9940,27,,,0.5,1.106182973,,140.2509173
-110006,202001,200,5325,42,,,0.5,,2.642597676,144.865
-110006,202002,200,,42,,,0.5,1.186209073,0.751963069,102.4888332
-110006,202003,200,,42,,,0.5,1.106182973,,140.2509173
-110007,202001,200,,19,,,0.5,,2.642597676,144.865
-110007,202002,200,,19,,,0.5,1.186209073,0.751963069,102.4888332
-110007,202003,200,,19,,,0.5,1.106182973,,140.2509173
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+110001,202001,100,9244,89,0.5,,2.09204015,76.03985875
+110001,202002,100,8916,89,0.5,0.8701751,1.505585865,98.16768334
+110001,202003,100,6194,89,0.5,1.040615327,,79.81873182
+110002,202001,100,4826,83,0.5,,2.09204015,76.03985875
+110002,202002,100,5903,83,0.5,0.8701751,1.505585865,98.16768334
+110002,202003,100,4743,83,0.5,1.040615327,,79.81873182
+110003,202001,100,7586,4,0.5,,2.09204015,76.03985875
+110003,202002,100,1016,4,0.5,0.8701751,1.505585865,98.16768334
+110003,202003,100,1429,4,0.5,1.040615327,,79.81873182
+110004,202001,100,3975,76,0.5,,2.09204015,76.03985875
+110004,202002,100,3044,76,0.5,0.8701751,1.505585865,98.16768334
+110004,202003,100,,76,0.5,1.040615327,,79.81873182
+110005,202001,200,,27,0.5,,2.642597676,144.865
+110005,202002,200,,27,0.5,1.186209073,0.751963069,102.4888332
+110005,202003,200,9940,27,0.5,1.106182973,,140.2509173
+110006,202001,200,5325,42,0.5,,2.642597676,144.865
+110006,202002,200,,42,0.5,1.186209073,0.751963069,102.4888332
+110006,202003,200,,42,0.5,1.106182973,,140.2509173
+110007,202001,200,,19,0.5,,2.642597676,144.865
+110007,202002,200,,19,0.5,1.186209073,0.751963069,102.4888332
+110007,202003,200,,19,0.5,1.106182973,,140.2509173
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
index 7602da02..fcacfd03 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
@@ -1,22 +1,22 @@
-prev,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-110001,202001,100,9244,89,,,0.5,,2.09204015,76.03985875,,1.036787797,,2.656680299,101.7103175,,2.374360225,88.87508813,9244,R,,4,4
-110001,202002,100,8916,89,,,0.5,0.8701751,1.505585865,98.16768334,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4
-110001,202003,100,6194,89,,,0.5,1.040615327,,79.81873182,0.694706146,,0.968230653,,70.26136364,1.00442299,,75.04004773,6194,R,3,,3
-110002,202001,100,4826,83,,,0.5,,2.09204015,76.03985875,,0.817550398,,2.656680299,101.7103175,,2.374360225,88.87508813,4826,R,,4,4
-110002,202002,100,5903,83,,,0.5,0.8701751,1.505585865,98.16768334,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4
-110002,202003,100,4743,83,,,0.5,1.040615327,,79.81873182,0.803489751,,0.968230653,,70.26136364,1.00442299,,75.04004773,4743,R,3,,3
-110003,202001,100,7586,4,,,0.5,,2.09204015,76.03985875,,7.466535433,,2.656680299,101.7103175,,2.374360225,88.87508813,7586,R,,4,4
-110003,202002,100,1016,4,,,0.5,0.8701751,1.505585865,98.16768334,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4
-110003,202003,100,1429,4,,,0.5,1.040615327,,79.81873182,1.406496063,,0.968230653,,70.26136364,1.00442299,,75.04004773,1429,R,3,,3
-110004,202001,100,3975,76,,,0.5,,2.09204015,76.03985875,,1.305847569,,2.656680299,101.7103175,,2.374360225,88.87508813,3975,R,,4,4
-110004,202002,100,3044,76,,,0.5,0.8701751,1.505585865,98.16768334,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4
-110004,202003,100,,76,,,0.5,1.040615327,,79.81873182,,,0.968230653,,70.26136364,1.00442299,,75.04004773,3057.463582,FIR,3,,3
-110005,202001,200,,27,,,0.5,,2.642597676,144.865,,,,1,1,,1.821298838,72.9325,9940,BI,,0,0
-110005,202002,200,,27,,,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0
-110005,202003,200,9940,27,,,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,9940,R,0,,1
-110006,202001,200,5325,42,,,0.5,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,5325,R,,0,1
-110006,202002,200,,42,,,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0
-110006,202003,200,,42,,,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,5325,FIR,0,,1
-110007,202001,200,,19,,,0.5,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,2580.681786,C,,0,1
-110007,202002,200,,19,,,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0
-110007,202003,200,,19,,,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,2970.72366,FIC,0,,1
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,9244,89,0.5,,2.09204015,76.03985875,,1.036787797,,2.656680299,101.7103175,,2.374360225,88.87508813,9244,R,,4,4
+110001,202002,100,8916,89,0.5,0.8701751,1.505585865,98.16768334,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4
+110001,202003,100,6194,89,0.5,1.040615327,,79.81873182,0.694706146,,0.968230653,,70.26136364,1.00442299,,75.04004773,6194,R,3,,3
+110002,202001,100,4826,83,0.5,,2.09204015,76.03985875,,0.817550398,,2.656680299,101.7103175,,2.374360225,88.87508813,4826,R,,4,4
+110002,202002,100,5903,83,0.5,0.8701751,1.505585865,98.16768334,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4
+110002,202003,100,4743,83,0.5,1.040615327,,79.81873182,0.803489751,,0.968230653,,70.26136364,1.00442299,,75.04004773,4743,R,3,,3
+110003,202001,100,7586,4,0.5,,2.09204015,76.03985875,,7.466535433,,2.656680299,101.7103175,,2.374360225,88.87508813,7586,R,,4,4
+110003,202002,100,1016,4,0.5,0.8701751,1.505585865,98.16768334,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4
+110003,202003,100,1429,4,0.5,1.040615327,,79.81873182,1.406496063,,0.968230653,,70.26136364,1.00442299,,75.04004773,1429,R,3,,3
+110004,202001,100,3975,76,0.5,,2.09204015,76.03985875,,1.305847569,,2.656680299,101.7103175,,2.374360225,88.87508813,3975,R,,4,4
+110004,202002,100,3044,76,0.5,0.8701751,1.505585865,98.16768334,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4
+110004,202003,100,,76,0.5,1.040615327,,79.81873182,,,0.968230653,,70.26136364,1.00442299,,75.04004773,3057.463582,FIR,3,,3
+110005,202001,200,,27,0.5,,2.642597676,144.865,,,,1,1,,1.821298838,72.9325,9940,BI,,0,0
+110005,202002,200,,27,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0
+110005,202003,200,9940,27,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,9940,R,0,,1
+110006,202001,200,5325,42,0.5,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,5325,R,,0,1
+110006,202002,200,,42,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0
+110006,202003,200,,42,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,5325,FIR,0,,1
+110007,202001,200,,19,0.5,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,2580.681786,C,,0,1
+110007,202002,200,,19,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0
+110007,202003,200,,19,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,2970.72366,FIC,0,,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
index 9b32c504..ab3c8acb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
@@ -1,73 +1,73 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-80001,202001,100,9244,89,0.1,0.1,0.5,,2.642597676,144.865
-80001,202002,100,8916,89,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80001,202003,100,6194,89,0.1,0.1,0.5,1.106182973,,140.2509173
-80002,202001,100,4826,83,0.1,0.1,0.5,,2.642597676,144.865
-80002,202002,100,5903,83,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80002,202003,100,4743,83,0.1,0.1,0.5,1.106182973,,140.2509173
-80003,202001,100,7586,4,0.1,0.1,0.5,,2.642597676,144.865
-80003,202002,100,1016,4,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80003,202003,100,1429,4,0.1,0.1,0.5,1.106182973,,140.2509173
-80004,202001,100,3975,76,0.1,0.1,0.5,,2.642597676,144.865
-80004,202002,100,3044,76,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80004,202003,100,3673,76,0.1,0.1,0.5,1.106182973,,140.2509173
-80005,202001,100,1941,18,0.1,0.1,0.5,,2.642597676,144.865
-80005,202002,100,3121,18,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80005,202003,100,1208,18,0.1,0.1,0.5,1.106182973,,140.2509173
-80006,202001,100,5405,94,0.1,0.1,0.5,,2.642597676,144.865
-80006,202002,100,7084,94,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80006,202003,100,4980,94,0.1,0.1,0.5,1.106182973,,140.2509173
-80007,202001,100,15172,8,0.1,0.1,0.5,,2.642597676,144.865
-80007,202002,100,2845,8,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80007,202003,100,3501,8,0.1,0.1,0.5,1.106182973,,140.2509173
-80008,202001,100,16298,304,0.1,0.1,0.5,,2.642597676,144.865
-80008,202002,100,14429,304,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80008,202003,100,14295,304,0.1,0.1,0.5,1.106182973,,140.2509173
-80009,202001,100,3698,45,0.1,0.1,0.5,,2.642597676,144.865
-80009,202002,100,4993,45,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80009,202003,100,4212,45,0.1,0.1,0.5,1.106182973,,140.2509173
-80010,202001,100,7722,100,0.1,0.1,0.5,,2.642597676,144.865
-80010,202002,100,10153,100,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80010,202003,100,6545,100,0.1,0.1,0.5,1.106182973,,140.2509173
-80011,202001,100,30344,19,0.1,0.1,0.5,,2.642597676,144.865
-80011,202002,100,3627,19,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80011,202003,100,7288,19,0.1,0.1,0.5,1.106182973,,140.2509173
-80012,202001,100,16298,304,0.1,0.1,0.5,,2.642597676,144.865
-80012,202002,100,11567,304,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332
-80012,202003,100,,304,0.1,0.1,0.5,1.106182973,,140.2509173
-80013,202001,200,20190,54,0.1,0.1,0.5,,2.09204015,76.03985875
-80013,202002,200,18242,54,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80013,202003,200,28826,54,0.1,0.1,0.5,1.040615327,,79.81873182
-80014,202001,200,4260,47,0.1,0.1,0.5,,2.09204015,76.03985875
-80014,202002,200,5036,42,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80014,202003,200,6484,42,0.1,0.1,0.5,1.040615327,,79.81873182
-80015,202001,200,19236,57,0.1,0.1,0.5,,2.09204015,76.03985875
-80015,202002,200,4949,57,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80015,202003,200,3544,57,0.1,0.1,0.5,1.040615327,,79.81873182
-80016,202001,200,14902,163,0.1,0.1,0.5,,2.09204015,76.03985875
-80016,202002,200,16435,163,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80016,202003,200,24653,163,0.1,0.1,0.5,1.040615327,,79.81873182
-80017,202001,200,35476,149,0.1,0.1,0.5,,2.09204015,76.03985875
-80017,202002,200,50515,149,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80017,202003,200,53477,149,0.1,0.1,0.5,1.040615327,,79.81873182
-80018,202001,200,13845,126,0.1,0.1,0.5,,2.09204015,76.03985875
-80018,202002,200,25488,126,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80018,202003,200,27409,126,0.1,0.1,0.5,1.040615327,,79.81873182
-80019,202001,200,1099,6,0.1,0.1,0.5,,2.09204015,76.03985875
-80019,202002,200,434,6,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80019,202003,200,124,6,0.1,0.1,0.5,1.040615327,,79.81873182
-80020,202001,200,3348,22,0.1,0.1,0.5,,2.09204015,76.03985875
-80020,202002,200,1996,22,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80020,202003,200,5051,22,0.1,0.1,0.5,1.040615327,,79.81873182
-80021,202001,200,29215,108,0.1,0.1,0.5,,2.09204015,76.03985875
-80021,202002,200,34168,108,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80021,202003,200,61628,108,0.1,0.1,0.5,1.040615327,,79.81873182
-80022,202001,200,6390,67,0.1,0.1,0.5,,2.09204015,76.03985875
-80022,202002,200,12705,67,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80022,202003,200,11966,67,0.1,0.1,0.5,1.040615327,,79.81873182
-80023,202001,200,4562,18,0.1,0.1,0.5,,2.09204015,76.03985875
-80023,202002,200,1717,18,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80023,202003,200,2371,18,0.1,0.1,0.5,1.040615327,,79.81873182
-80024,202001,200,,155,0.1,0.1,0.5,,2.09204015,76.03985875
-80024,202002,200,18782,155,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334
-80024,202003,200,21046,155,0.1,0.1,0.5,1.040615327,,79.81873182
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+80001,202001,100,9244,89,0.5,,2.642597676,144.865
+80001,202002,100,8916,89,0.5,1.186209073,0.751963069,102.4888332
+80001,202003,100,6194,89,0.5,1.106182973,,140.2509173
+80002,202001,100,4826,83,0.5,,2.642597676,144.865
+80002,202002,100,5903,83,0.5,1.186209073,0.751963069,102.4888332
+80002,202003,100,4743,83,0.5,1.106182973,,140.2509173
+80003,202001,100,7586,4,0.5,,2.642597676,144.865
+80003,202002,100,1016,4,0.5,1.186209073,0.751963069,102.4888332
+80003,202003,100,1429,4,0.5,1.106182973,,140.2509173
+80004,202001,100,3975,76,0.5,,2.642597676,144.865
+80004,202002,100,3044,76,0.5,1.186209073,0.751963069,102.4888332
+80004,202003,100,3673,76,0.5,1.106182973,,140.2509173
+80005,202001,100,1941,18,0.5,,2.642597676,144.865
+80005,202002,100,3121,18,0.5,1.186209073,0.751963069,102.4888332
+80005,202003,100,1208,18,0.5,1.106182973,,140.2509173
+80006,202001,100,5405,94,0.5,,2.642597676,144.865
+80006,202002,100,7084,94,0.5,1.186209073,0.751963069,102.4888332
+80006,202003,100,4980,94,0.5,1.106182973,,140.2509173
+80007,202001,100,15172,8,0.5,,2.642597676,144.865
+80007,202002,100,2845,8,0.5,1.186209073,0.751963069,102.4888332
+80007,202003,100,3501,8,0.5,1.106182973,,140.2509173
+80008,202001,100,16298,304,0.5,,2.642597676,144.865
+80008,202002,100,14429,304,0.5,1.186209073,0.751963069,102.4888332
+80008,202003,100,14295,304,0.5,1.106182973,,140.2509173
+80009,202001,100,3698,45,0.5,,2.642597676,144.865
+80009,202002,100,4993,45,0.5,1.186209073,0.751963069,102.4888332
+80009,202003,100,4212,45,0.5,1.106182973,,140.2509173
+80010,202001,100,7722,100,0.5,,2.642597676,144.865
+80010,202002,100,10153,100,0.5,1.186209073,0.751963069,102.4888332
+80010,202003,100,6545,100,0.5,1.106182973,,140.2509173
+80011,202001,100,30344,19,0.5,,2.642597676,144.865
+80011,202002,100,3627,19,0.5,1.186209073,0.751963069,102.4888332
+80011,202003,100,7288,19,0.5,1.106182973,,140.2509173
+80012,202001,100,16298,304,0.5,,2.642597676,144.865
+80012,202002,100,11567,304,0.5,1.186209073,0.751963069,102.4888332
+80012,202003,100,,304,0.5,1.106182973,,140.2509173
+80013,202001,200,20190,54,0.5,,2.09204015,76.03985875
+80013,202002,200,18242,54,0.5,0.8701751,1.505585865,98.16768334
+80013,202003,200,28826,54,0.5,1.040615327,,79.81873182
+80014,202001,200,4260,47,0.5,,2.09204015,76.03985875
+80014,202002,200,5036,42,0.5,0.8701751,1.505585865,98.16768334
+80014,202003,200,6484,42,0.5,1.040615327,,79.81873182
+80015,202001,200,19236,57,0.5,,2.09204015,76.03985875
+80015,202002,200,4949,57,0.5,0.8701751,1.505585865,98.16768334
+80015,202003,200,3544,57,0.5,1.040615327,,79.81873182
+80016,202001,200,14902,163,0.5,,2.09204015,76.03985875
+80016,202002,200,16435,163,0.5,0.8701751,1.505585865,98.16768334
+80016,202003,200,24653,163,0.5,1.040615327,,79.81873182
+80017,202001,200,35476,149,0.5,,2.09204015,76.03985875
+80017,202002,200,50515,149,0.5,0.8701751,1.505585865,98.16768334
+80017,202003,200,53477,149,0.5,1.040615327,,79.81873182
+80018,202001,200,13845,126,0.5,,2.09204015,76.03985875
+80018,202002,200,25488,126,0.5,0.8701751,1.505585865,98.16768334
+80018,202003,200,27409,126,0.5,1.040615327,,79.81873182
+80019,202001,200,1099,6,0.5,,2.09204015,76.03985875
+80019,202002,200,434,6,0.5,0.8701751,1.505585865,98.16768334
+80019,202003,200,124,6,0.5,1.040615327,,79.81873182
+80020,202001,200,3348,22,0.5,,2.09204015,76.03985875
+80020,202002,200,1996,22,0.5,0.8701751,1.505585865,98.16768334
+80020,202003,200,5051,22,0.5,1.040615327,,79.81873182
+80021,202001,200,29215,108,0.5,,2.09204015,76.03985875
+80021,202002,200,34168,108,0.5,0.8701751,1.505585865,98.16768334
+80021,202003,200,61628,108,0.5,1.040615327,,79.81873182
+80022,202001,200,6390,67,0.5,,2.09204015,76.03985875
+80022,202002,200,12705,67,0.5,0.8701751,1.505585865,98.16768334
+80022,202003,200,11966,67,0.5,1.040615327,,79.81873182
+80023,202001,200,4562,18,0.5,,2.09204015,76.03985875
+80023,202002,200,1717,18,0.5,0.8701751,1.505585865,98.16768334
+80023,202003,200,2371,18,0.5,1.040615327,,79.81873182
+80024,202001,200,,155,0.5,,2.09204015,76.03985875
+80024,202002,200,18782,155,0.5,0.8701751,1.505585865,98.16768334
+80024,202003,200,21046,155,0.5,1.040615327,,79.81873182
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index c363f10c..f2d399ef 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,73 +1,73 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
-80001,202001,100,9244,89,0.1,0.1,0.5,,2.642597676,144.865,,1.036787797,,1.036787797,,2.076255394,107.1910333,,2.359426535,126.0280167,9244,R,,10,12,,,
-80001,202002,100,8916,89,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.964517525,1.43945754,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,
-80001,202003,100,6194,89,0.1,0.1,0.5,1.106182973,,140.2509173,0.694706146,,0.694706146,,0.918490819,,69.22002885,1.012336896,,104.7354731,6194,R,9,,11,,,
-80002,202001,100,4826,83,0.1,0.1,0.5,,2.642597676,144.865,,0.817550398,,0.817550398,,2.076255394,107.1910333,,2.359426535,126.0280167,4826,R,,10,12,,,
-80002,202002,100,5903,83,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,1.223166183,1.244570947,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,,,
-80002,202003,100,4743,83,0.1,0.1,0.5,1.106182973,,140.2509173,0.803489751,,0.803489751,,0.918490819,,69.22002885,1.012336896,,104.7354731,4743,R,9,,11,,,
-80003,202001,100,7586,4,0.1,0.1,0.5,,2.642597676,144.865,,7.466535433,,7.466535433,,2.076255394,107.1910333,,2.359426535,126.0280167,7586,R,,10,12,,,
-80003,202002,100,1016,4,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.133930925,0.710986704,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,,,
-80003,202003,100,1429,4,0.1,0.1,0.5,1.106182973,,140.2509173,1.406496063,,1.406496063,,0.918490819,,69.22002885,1.012336896,,104.7354731,1429,R,9,,11,,,
-80004,202001,100,3975,76,0.1,0.1,0.5,,2.642597676,144.865,,1.305847569,,1.305847569,,2.076255394,107.1910333,,2.359426535,126.0280167,3975,R,,10,12,,,
-80004,202002,100,3044,76,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.765786164,0.82875034,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,,,
-80004,202003,100,3673,76,0.1,0.1,0.5,1.106182973,,140.2509173,1.206636005,,1.206636005,,0.918490819,,69.22002885,1.012336896,,104.7354731,3673,R,9,,11,,,
-80005,202001,100,1941,18,0.1,0.1,0.5,,2.642597676,144.865,,0.622072678,,,,2.076255394,107.1910333,,2.359426535,126.0280167,1941,R,,10,12,,TRUE,
-80005,202002,100,3121,18,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,1.607529208,2.583641738,,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,TRUE,TRUE,
-80005,202003,100,1208,18,0.1,0.1,0.5,1.106182973,,140.2509173,0.387050567,,0.387050567,,0.918490819,,69.22002885,1.012336896,,104.7354731,1208,R,9,,11,,,
-80006,202001,100,5405,94,0.1,0.1,0.5,,2.642597676,144.865,,0.763047038,,0.763047038,,2.076255394,107.1910333,,2.359426535,126.0280167,5405,R,,10,12,,,
-80006,202002,100,7084,94,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,1.310535196,1.422366796,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,,,
-80006,202003,100,4980,94,0.1,0.1,0.5,1.106182973,,140.2509173,0.703053532,,0.703053532,,0.918490819,,69.22002885,1.012336896,,104.7354731,4980,R,9,,11,,,
-80007,202001,100,15172,8,0.1,0.1,0.5,,2.642597676,144.865,,5.333239595,,5.333239595,,2.076255394,107.1910333,,2.359426535,126.0280167,15172,R,,10,12,,,
-80007,202002,100,2845,8,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.187503296,0.812556233,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,,,
-80007,202003,100,3501,8,0.1,0.1,0.5,1.106182973,,140.2509173,1.230684055,,1.230684055,,0.918490819,,69.22002885,1.012336896,,104.7354731,3501,R,9,,11,,,
-80008,202001,100,16298,304,0.1,0.1,0.5,,2.642597676,144.865,,1.129530598,,1.129530598,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
-80008,202002,100,14429,304,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.885323516,1.009357249,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,,,
-80008,202003,100,14295,304,0.1,0.1,0.5,1.106182973,,140.2509173,0.990729498,,0.990729498,,0.918490819,,69.22002885,1.012336896,,104.7354731,14295,R,9,,11,,,
-80009,202001,100,3698,45,0.1,0.1,0.5,,2.642597676,144.865,,0.740562712,,0.740562712,,2.076255394,107.1910333,,2.359426535,126.0280167,3698,R,,10,12,,,
-80009,202002,100,4993,45,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,1.350324535,1.185435621,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,,,
-80009,202003,100,4212,45,0.1,0.1,0.5,1.106182973,,140.2509173,0.843571749,,0.843571749,,0.918490819,,69.22002885,1.012336896,,104.7354731,4212,R,9,,11,,,
-80010,202001,100,7722,100,0.1,0.1,0.5,,2.642597676,144.865,,0.760511998,,0.760511998,,2.076255394,107.1910333,,2.359426535,126.0280167,7722,R,,10,12,,,
-80010,202002,100,10153,100,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,1.314903647,1.551204368,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,,,
-80010,202003,100,6545,100,0.1,0.1,0.5,1.106182973,,140.2509173,0.644660382,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,6545,R,9,,11,TRUE,,
-80011,202001,100,30344,19,0.1,0.1,0.5,,2.642597676,144.865,,8.365866031,,,,2.076255394,107.1910333,,2.359426535,126.0280167,30344,R,,10,12,,TRUE,
-80011,202002,100,3627,19,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.119533351,0.497690693,,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,TRUE,TRUE,
-80011,202003,100,7288,19,0.1,0.1,0.5,1.106182973,,140.2509173,2.00928009,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,7288,R,9,,11,TRUE,,
-80012,202001,100,16298,304,0.1,0.1,0.5,,2.642597676,144.865,,1.408940798,,1.408940798,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
-80012,202002,100,11567,304,0.1,0.1,0.5,1.186209073,0.751963069,102.4888332,0.70975303,,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,,,
-80012,202003,100,,304,0.1,0.1,0.5,1.106182973,,140.2509173,,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,11709.70088,FIR,9,,11,,,
-80013,202001,200,20190,54,0.1,0.1,0.5,,2.09204015,76.03985875,,1.106799294,,1.106799294,,1.313944665,186.8459267,,1.702992408,131.4428927,20190,R,,9,11,,,
-80013,202002,200,18242,54,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,0.903506178,0.632817595,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,,,
-80013,202003,200,28826,54,0.1,0.1,0.5,1.040615327,,79.81873182,1.58023419,,1.58023419,,1.246527322,,255.2315185,1.143571325,,167.5251252,28826,R,10,,12,,,
-80014,202001,200,4260,47,0.1,0.1,0.5,,2.09204015,76.03985875,,0.845985046,,0.845985046,,1.313944665,186.8459267,,1.702992408,131.4428927,4260,R,,9,11,,,
-80014,202002,200,5036,42,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.182053991,0.776557765,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,,,
-80014,202003,200,6484,42,0.1,0.1,0.5,1.040615327,,79.81873182,1.28773421,,1.28773421,,1.246527322,,255.2315185,1.143571325,,167.5251252,6484,R,10,,12,,,
-80015,202001,200,19236,57,0.1,0.1,0.5,,2.09204015,76.03985875,,3.886845827,,,,1.313944665,186.8459267,,1.702992408,131.4428927,19236,R,,9,11,,TRUE,
-80015,202002,200,4949,57,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,0.25727802,1.396267404,,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,TRUE,,
-80015,202003,200,3544,57,0.1,0.1,0.5,1.040615327,,79.81873182,0.716195191,,0.716195191,,1.246527322,,255.2315185,1.143571325,,167.5251252,3544,R,10,,12,,,
-80016,202001,200,14902,163,0.1,0.1,0.5,,2.09204015,76.03985875,,0.906730921,,0.906730921,,1.313944665,186.8459267,,1.702992408,131.4428927,14902,R,,9,11,,,
-80016,202002,200,16435,163,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.102863018,0.666628808,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,,,
-80016,202003,200,24653,163,0.1,0.1,0.5,1.040615327,,79.81873182,1.500085186,,1.500085186,,1.246527322,,255.2315185,1.143571325,,167.5251252,24653,R,10,,12,,,
-80017,202001,200,35476,149,0.1,0.1,0.5,,2.09204015,76.03985875,,0.702275751,,0.702275751,,1.313944665,186.8459267,,1.702992408,131.4428927,35476,R,,9,11,,,
-80017,202002,200,50515,149,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.42394209,0.944611909,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,,,
-80017,202003,200,53477,149,0.1,0.1,0.5,1.040615327,,79.81873182,1.058635817,,1.058635817,,1.246527322,,255.2315185,1.143571325,,167.5251252,53477,R,10,,12,,,
-80018,202001,200,13845,126,0.1,0.1,0.5,,2.09204015,76.03985875,,0.543204684,,0.543204684,,1.313944665,186.8459267,,1.702992408,131.4428927,13845,R,,9,11,,,
-80018,202002,200,25488,126,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.840926688,0.929916997,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,,,
-80018,202003,200,27409,126,0.1,0.1,0.5,1.040615327,,79.81873182,1.075364795,,1.075364795,,1.246527322,,255.2315185,1.143571325,,167.5251252,27409,R,10,,12,,,
-80019,202001,200,1099,6,0.1,0.1,0.5,,2.09204015,76.03985875,,2.530969376,,2.530969376,,1.313944665,186.8459267,,1.702992408,131.4428927,1099,R,,9,11,,,
-80019,202002,200,434,6,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,0.395105531,3.51659919,0.395105531,,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,,TRUE,
-80019,202003,200,124,6,0.1,0.1,0.5,1.040615327,,79.81873182,0.284365646,,,,1.246527322,,255.2315185,1.143571325,,167.5251252,124,R,10,,12,TRUE,,
-80020,202001,200,3348,22,0.1,0.1,0.5,,2.09204015,76.03985875,,1.677715809,,1.677715809,,1.313944665,186.8459267,,1.702992408,131.4428927,3348,R,,9,11,,,
-80020,202002,200,1996,22,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,0.596048505,0.395102278,0.596048505,,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,,TRUE,
-80020,202003,200,5051,22,0.1,0.1,0.5,1.040615327,,79.81873182,2.530990214,,,,1.246527322,,255.2315185,1.143571325,,167.5251252,5051,R,10,,12,TRUE,,
-80021,202001,200,29215,108,0.1,0.1,0.5,,2.09204015,76.03985875,,0.855047659,,0.855047659,,1.313944665,186.8459267,,1.702992408,131.4428927,29215,R,,9,11,,,
-80021,202002,200,34168,108,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.169525453,0.554422016,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,,,
-80021,202003,200,61628,108,0.1,0.1,0.5,1.040615327,,79.81873182,1.803680177,,1.803680177,,1.246527322,,255.2315185,1.143571325,,167.5251252,61628,R,10,,12,,,
-80022,202001,200,6390,67,0.1,0.1,0.5,,2.09204015,76.03985875,,0.502948427,,,,1.313944665,186.8459267,,1.702992408,131.4428927,6390,R,,9,11,,TRUE,
-80022,202002,200,12705,67,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,1.98827543,1.061751691,,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,,TRUE,
-80022,202003,200,11966,67,0.1,0.1,0.5,1.040615327,,79.81873182,0.9418398,,0.9418398,,1.246527322,,255.2315185,1.143571325,,167.5251252,11966,R,10,,12,,,
-80023,202001,200,4562,18,0.1,0.1,0.5,,2.09204015,76.03985875,,2.656773442,,2.656773442,,1.313944665,186.8459267,,1.702992408,131.4428927,4562,R,,9,11,,,
-80023,202002,200,1717,18,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,0.376396415,0.724105938,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,,,
-80023,202003,200,2371,18,0.1,0.1,0.5,1.040615327,,79.81873182,1.381013395,,1.381013395,,1.246527322,,255.2315185,1.143571325,,167.5251252,2371,R,10,,12,,,
-80024,202001,200,,155,0.1,0.1,0.5,,2.09204015,76.03985875,,,,,,1.313944665,186.8459267,,1.702992408,131.4428927,31985.6034,BI,,9,11,,,
-80024,202002,200,18782,155,0.1,0.1,0.5,0.8701751,1.505585865,98.16768334,,0.892466323,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,,
-80024,202003,200,21046,155,0.1,0.1,0.5,1.040615327,,79.81873182,1.120490459,,1.120490459,,1.246527322,,255.2315185,1.143571325,,167.5251252,21046,R,10,,12,,,
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+80001,202001,100,9244,89,0.5,,2.642597676,144.865,,1.036787797,,1.036787797,,2.076255394,107.1910333,,2.359426535,126.0280167,9244,R,,10,12,,,
+80001,202002,100,8916,89,0.5,1.186209073,0.751963069,102.4888332,0.964517525,1.43945754,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,
+80001,202003,100,6194,89,0.5,1.106182973,,140.2509173,0.694706146,,0.694706146,,0.918490819,,69.22002885,1.012336896,,104.7354731,6194,R,9,,11,,,
+80002,202001,100,4826,83,0.5,,2.642597676,144.865,,0.817550398,,0.817550398,,2.076255394,107.1910333,,2.359426535,126.0280167,4826,R,,10,12,,,
+80002,202002,100,5903,83,0.5,1.186209073,0.751963069,102.4888332,1.223166183,1.244570947,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,,,
+80002,202003,100,4743,83,0.5,1.106182973,,140.2509173,0.803489751,,0.803489751,,0.918490819,,69.22002885,1.012336896,,104.7354731,4743,R,9,,11,,,
+80003,202001,100,7586,4,0.5,,2.642597676,144.865,,7.466535433,,7.466535433,,2.076255394,107.1910333,,2.359426535,126.0280167,7586,R,,10,12,,,
+80003,202002,100,1016,4,0.5,1.186209073,0.751963069,102.4888332,0.133930925,0.710986704,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,,,
+80003,202003,100,1429,4,0.5,1.106182973,,140.2509173,1.406496063,,1.406496063,,0.918490819,,69.22002885,1.012336896,,104.7354731,1429,R,9,,11,,,
+80004,202001,100,3975,76,0.5,,2.642597676,144.865,,1.305847569,,1.305847569,,2.076255394,107.1910333,,2.359426535,126.0280167,3975,R,,10,12,,,
+80004,202002,100,3044,76,0.5,1.186209073,0.751963069,102.4888332,0.765786164,0.82875034,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,,,
+80004,202003,100,3673,76,0.5,1.106182973,,140.2509173,1.206636005,,1.206636005,,0.918490819,,69.22002885,1.012336896,,104.7354731,3673,R,9,,11,,,
+80005,202001,100,1941,18,0.5,,2.642597676,144.865,,0.622072678,,,,2.076255394,107.1910333,,2.359426535,126.0280167,1941,R,,10,12,,TRUE,
+80005,202002,100,3121,18,0.5,1.186209073,0.751963069,102.4888332,1.607529208,2.583641738,,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,TRUE,TRUE,
+80005,202003,100,1208,18,0.5,1.106182973,,140.2509173,0.387050567,,0.387050567,,0.918490819,,69.22002885,1.012336896,,104.7354731,1208,R,9,,11,,,
+80006,202001,100,5405,94,0.5,,2.642597676,144.865,,0.763047038,,0.763047038,,2.076255394,107.1910333,,2.359426535,126.0280167,5405,R,,10,12,,,
+80006,202002,100,7084,94,0.5,1.186209073,0.751963069,102.4888332,1.310535196,1.422366796,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,,,
+80006,202003,100,4980,94,0.5,1.106182973,,140.2509173,0.703053532,,0.703053532,,0.918490819,,69.22002885,1.012336896,,104.7354731,4980,R,9,,11,,,
+80007,202001,100,15172,8,0.5,,2.642597676,144.865,,5.333239595,,5.333239595,,2.076255394,107.1910333,,2.359426535,126.0280167,15172,R,,10,12,,,
+80007,202002,100,2845,8,0.5,1.186209073,0.751963069,102.4888332,0.187503296,0.812556233,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,,,
+80007,202003,100,3501,8,0.5,1.106182973,,140.2509173,1.230684055,,1.230684055,,0.918490819,,69.22002885,1.012336896,,104.7354731,3501,R,9,,11,,,
+80008,202001,100,16298,304,0.5,,2.642597676,144.865,,1.129530598,,1.129530598,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
+80008,202002,100,14429,304,0.5,1.186209073,0.751963069,102.4888332,0.885323516,1.009357249,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,,,
+80008,202003,100,14295,304,0.5,1.106182973,,140.2509173,0.990729498,,0.990729498,,0.918490819,,69.22002885,1.012336896,,104.7354731,14295,R,9,,11,,,
+80009,202001,100,3698,45,0.5,,2.642597676,144.865,,0.740562712,,0.740562712,,2.076255394,107.1910333,,2.359426535,126.0280167,3698,R,,10,12,,,
+80009,202002,100,4993,45,0.5,1.186209073,0.751963069,102.4888332,1.350324535,1.185435621,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,,,
+80009,202003,100,4212,45,0.5,1.106182973,,140.2509173,0.843571749,,0.843571749,,0.918490819,,69.22002885,1.012336896,,104.7354731,4212,R,9,,11,,,
+80010,202001,100,7722,100,0.5,,2.642597676,144.865,,0.760511998,,0.760511998,,2.076255394,107.1910333,,2.359426535,126.0280167,7722,R,,10,12,,,
+80010,202002,100,10153,100,0.5,1.186209073,0.751963069,102.4888332,1.314903647,1.551204368,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,,,
+80010,202003,100,6545,100,0.5,1.106182973,,140.2509173,0.644660382,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,6545,R,9,,11,TRUE,,
+80011,202001,100,30344,19,0.5,,2.642597676,144.865,,8.365866031,,,,2.076255394,107.1910333,,2.359426535,126.0280167,30344,R,,10,12,,TRUE,
+80011,202002,100,3627,19,0.5,1.186209073,0.751963069,102.4888332,0.119533351,0.497690693,,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,TRUE,TRUE,
+80011,202003,100,7288,19,0.5,1.106182973,,140.2509173,2.00928009,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,7288,R,9,,11,TRUE,,
+80012,202001,100,16298,304,0.5,,2.642597676,144.865,,1.408940798,,1.408940798,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
+80012,202002,100,11567,304,0.5,1.186209073,0.751963069,102.4888332,0.70975303,,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,,,
+80012,202003,100,,304,0.5,1.106182973,,140.2509173,,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,11709.70088,FIR,9,,11,,,
+80013,202001,200,20190,54,0.5,,2.09204015,76.03985875,,1.106799294,,1.106799294,,1.313944665,186.8459267,,1.702992408,131.4428927,20190,R,,9,11,,,
+80013,202002,200,18242,54,0.5,0.8701751,1.505585865,98.16768334,0.903506178,0.632817595,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,,,
+80013,202003,200,28826,54,0.5,1.040615327,,79.81873182,1.58023419,,1.58023419,,1.246527322,,255.2315185,1.143571325,,167.5251252,28826,R,10,,12,,,
+80014,202001,200,4260,47,0.5,,2.09204015,76.03985875,,0.845985046,,0.845985046,,1.313944665,186.8459267,,1.702992408,131.4428927,4260,R,,9,11,,,
+80014,202002,200,5036,42,0.5,0.8701751,1.505585865,98.16768334,1.182053991,0.776557765,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,,,
+80014,202003,200,6484,42,0.5,1.040615327,,79.81873182,1.28773421,,1.28773421,,1.246527322,,255.2315185,1.143571325,,167.5251252,6484,R,10,,12,,,
+80015,202001,200,19236,57,0.5,,2.09204015,76.03985875,,3.886845827,,,,1.313944665,186.8459267,,1.702992408,131.4428927,19236,R,,9,11,,TRUE,
+80015,202002,200,4949,57,0.5,0.8701751,1.505585865,98.16768334,0.25727802,1.396267404,,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,TRUE,,
+80015,202003,200,3544,57,0.5,1.040615327,,79.81873182,0.716195191,,0.716195191,,1.246527322,,255.2315185,1.143571325,,167.5251252,3544,R,10,,12,,,
+80016,202001,200,14902,163,0.5,,2.09204015,76.03985875,,0.906730921,,0.906730921,,1.313944665,186.8459267,,1.702992408,131.4428927,14902,R,,9,11,,,
+80016,202002,200,16435,163,0.5,0.8701751,1.505585865,98.16768334,1.102863018,0.666628808,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,,,
+80016,202003,200,24653,163,0.5,1.040615327,,79.81873182,1.500085186,,1.500085186,,1.246527322,,255.2315185,1.143571325,,167.5251252,24653,R,10,,12,,,
+80017,202001,200,35476,149,0.5,,2.09204015,76.03985875,,0.702275751,,0.702275751,,1.313944665,186.8459267,,1.702992408,131.4428927,35476,R,,9,11,,,
+80017,202002,200,50515,149,0.5,0.8701751,1.505585865,98.16768334,1.42394209,0.944611909,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,,,
+80017,202003,200,53477,149,0.5,1.040615327,,79.81873182,1.058635817,,1.058635817,,1.246527322,,255.2315185,1.143571325,,167.5251252,53477,R,10,,12,,,
+80018,202001,200,13845,126,0.5,,2.09204015,76.03985875,,0.543204684,,0.543204684,,1.313944665,186.8459267,,1.702992408,131.4428927,13845,R,,9,11,,,
+80018,202002,200,25488,126,0.5,0.8701751,1.505585865,98.16768334,1.840926688,0.929916997,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,,,
+80018,202003,200,27409,126,0.5,1.040615327,,79.81873182,1.075364795,,1.075364795,,1.246527322,,255.2315185,1.143571325,,167.5251252,27409,R,10,,12,,,
+80019,202001,200,1099,6,0.5,,2.09204015,76.03985875,,2.530969376,,2.530969376,,1.313944665,186.8459267,,1.702992408,131.4428927,1099,R,,9,11,,,
+80019,202002,200,434,6,0.5,0.8701751,1.505585865,98.16768334,0.395105531,3.51659919,0.395105531,,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,,TRUE,
+80019,202003,200,124,6,0.5,1.040615327,,79.81873182,0.284365646,,,,1.246527322,,255.2315185,1.143571325,,167.5251252,124,R,10,,12,TRUE,,
+80020,202001,200,3348,22,0.5,,2.09204015,76.03985875,,1.677715809,,1.677715809,,1.313944665,186.8459267,,1.702992408,131.4428927,3348,R,,9,11,,,
+80020,202002,200,1996,22,0.5,0.8701751,1.505585865,98.16768334,0.596048505,0.395102278,0.596048505,,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,,TRUE,
+80020,202003,200,5051,22,0.5,1.040615327,,79.81873182,2.530990214,,,,1.246527322,,255.2315185,1.143571325,,167.5251252,5051,R,10,,12,TRUE,,
+80021,202001,200,29215,108,0.5,,2.09204015,76.03985875,,0.855047659,,0.855047659,,1.313944665,186.8459267,,1.702992408,131.4428927,29215,R,,9,11,,,
+80021,202002,200,34168,108,0.5,0.8701751,1.505585865,98.16768334,1.169525453,0.554422016,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,,,
+80021,202003,200,61628,108,0.5,1.040615327,,79.81873182,1.803680177,,1.803680177,,1.246527322,,255.2315185,1.143571325,,167.5251252,61628,R,10,,12,,,
+80022,202001,200,6390,67,0.5,,2.09204015,76.03985875,,0.502948427,,,,1.313944665,186.8459267,,1.702992408,131.4428927,6390,R,,9,11,,TRUE,
+80022,202002,200,12705,67,0.5,0.8701751,1.505585865,98.16768334,1.98827543,1.061751691,,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,,TRUE,
+80022,202003,200,11966,67,0.5,1.040615327,,79.81873182,0.9418398,,0.9418398,,1.246527322,,255.2315185,1.143571325,,167.5251252,11966,R,10,,12,,,
+80023,202001,200,4562,18,0.5,,2.09204015,76.03985875,,2.656773442,,2.656773442,,1.313944665,186.8459267,,1.702992408,131.4428927,4562,R,,9,11,,,
+80023,202002,200,1717,18,0.5,0.8701751,1.505585865,98.16768334,0.376396415,0.724105938,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,,,
+80023,202003,200,2371,18,0.5,1.040615327,,79.81873182,1.381013395,,1.381013395,,1.246527322,,255.2315185,1.143571325,,167.5251252,2371,R,10,,12,,,
+80024,202001,200,,155,0.5,,2.09204015,76.03985875,,,,,,1.313944665,186.8459267,,1.702992408,131.4428927,31985.6034,BI,,9,11,,,
+80024,202002,200,18782,155,0.5,0.8701751,1.505585865,98.16768334,,0.892466323,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,,
+80024,202003,200,21046,155,0.5,1.040615327,,79.81873182,1.120490459,,1.120490459,,1.246527322,,255.2315185,1.143571325,,167.5251252,21046,R,10,,12,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
index 87bb2a92..c1b2645a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-30001,202001,100,8444,51,0.1,0.1,0.5,,2.09204015,76.03985875
-30001,202002,100,7476,51,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30001,202003,100,2003,51,0.1,0.1,0.5,2.040615327,,84.81873182
-30002,202001,100,9343,72,0.1,0.1,0.5,,2.09204015,76.03985875
-30002,202002,100,7818,72,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30002,202003,100,4897,72,0.1,0.1,0.5,2.040615327,,84.81873182
-30003,202001,100,7511,7,0.1,0.1,0.5,,2.09204015,76.03985875
-30003,202002,100,1761,7,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30003,202003,100,6492,7,0.1,0.1,0.5,2.040615327,,84.81873182
-30004,202001,100,64,81,0.1,0.1,0.5,,2.09204015,76.03985875
-30004,202002,100,2113,81,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30004,202003,100,185,81,0.1,0.1,0.5,2.040615327,,84.81873182
-30005,202001,100,844,5,0.1,0.1,0.5,,2.09204015,76.03985875
-30005,202002,100,897,5,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30005,202003,100,280,5,0.1,0.1,0.5,2.040615327,,84.81873182
-30006,202001,100,1869,14,0.1,0.1,0.5,,2.09204015,76.03985875
-30006,202002,100,1876,14,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30006,202003,100,1371,14,0.1,0.1,0.5,2.040615327,,84.81873182
-30007,202001,100,12769,12,0.1,0.1,0.5,,2.09204015,76.03985875
-30007,202002,100,2853,12,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30007,202003,100,11491,12,0.1,0.1,0.5,2.040615327,,84.81873182
-30008,202001,100,141,162,0.1,0.1,0.5,,2.09204015,76.03985875
-30008,202002,100,6001,162,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30008,202003,100,433,162,0.1,0.1,0.5,2.040615327,,84.81873182
-30009,202001,100,6417,26,0.1,0.1,0.5,,2.09204015,76.03985875
-30009,202002,100,4037,26,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30009,202003,100,1322,26,0.1,0.1,0.5,2.040615327,,84.81873182
-30010,202001,100,28963,144,0.1,0.1,0.5,,2.09204015,76.03985875
-30010,202002,100,21734,144,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30010,202003,100,10529,144,0.1,0.1,0.5,2.040615327,,84.81873182
-30011,202001,100,6009,5,0.1,0.1,0.5,,2.09204015,76.03985875
-30011,202002,100,1145,5,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30011,202003,100,5064,5,0.1,0.1,0.5,2.040615327,,84.81873182
-30012,202001,100,,275,0.1,0.1,0.5,,2.09204015,76.03985875
-30012,202002,100,,275,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-30012,202003,100,,275,0.1,0.1,0.5,2.040615327,,84.81873182
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,0.5,,2.09204015,76.03985875
+30001,202002,100,7476,51,0.5,0.8701751,1.505585865,123.1676833
+30001,202003,100,2003,51,0.5,2.040615327,,84.81873182
+30002,202001,100,9343,72,0.5,,2.09204015,76.03985875
+30002,202002,100,7818,72,0.5,0.8701751,1.505585865,123.1676833
+30002,202003,100,4897,72,0.5,2.040615327,,84.81873182
+30003,202001,100,7511,7,0.5,,2.09204015,76.03985875
+30003,202002,100,1761,7,0.5,0.8701751,1.505585865,123.1676833
+30003,202003,100,6492,7,0.5,2.040615327,,84.81873182
+30004,202001,100,64,81,0.5,,2.09204015,76.03985875
+30004,202002,100,2113,81,0.5,0.8701751,1.505585865,123.1676833
+30004,202003,100,185,81,0.5,2.040615327,,84.81873182
+30005,202001,100,844,5,0.5,,2.09204015,76.03985875
+30005,202002,100,897,5,0.5,0.8701751,1.505585865,123.1676833
+30005,202003,100,280,5,0.5,2.040615327,,84.81873182
+30006,202001,100,1869,14,0.5,,2.09204015,76.03985875
+30006,202002,100,1876,14,0.5,0.8701751,1.505585865,123.1676833
+30006,202003,100,1371,14,0.5,2.040615327,,84.81873182
+30007,202001,100,12769,12,0.5,,2.09204015,76.03985875
+30007,202002,100,2853,12,0.5,0.8701751,1.505585865,123.1676833
+30007,202003,100,11491,12,0.5,2.040615327,,84.81873182
+30008,202001,100,141,162,0.5,,2.09204015,76.03985875
+30008,202002,100,6001,162,0.5,0.8701751,1.505585865,123.1676833
+30008,202003,100,433,162,0.5,2.040615327,,84.81873182
+30009,202001,100,6417,26,0.5,,2.09204015,76.03985875
+30009,202002,100,4037,26,0.5,0.8701751,1.505585865,123.1676833
+30009,202003,100,1322,26,0.5,2.040615327,,84.81873182
+30010,202001,100,28963,144,0.5,,2.09204015,76.03985875
+30010,202002,100,21734,144,0.5,0.8701751,1.505585865,123.1676833
+30010,202003,100,10529,144,0.5,2.040615327,,84.81873182
+30011,202001,100,6009,5,0.5,,2.09204015,76.03985875
+30011,202002,100,1145,5,0.5,0.8701751,1.505585865,123.1676833
+30011,202003,100,5064,5,0.5,2.040615327,,84.81873182
+30012,202001,100,,275,0.5,,2.09204015,76.03985875
+30012,202002,100,,275,0.5,0.8701751,1.505585865,123.1676833
+30012,202003,100,,275,0.5,2.040615327,,84.81873182
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index eea5f4de..10db4e5f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr
-30001,202001,100,8444,51,0.1,0.1,0.5,,2.09204015,76.03985875,,1.129481006,,1.129481006,,1.772802559,142.3186593,,1.932421355,109.179259,8444,R,,9,11,,
-30001,202002,100,7476,51,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,,
-30001,202003,100,2003,51,0.1,0.1,0.5,2.040615327,,84.81873182,0.267924024,,0.267924024,,1.172391173,,76.13443331,1.60650325,,80.47658257,2003,R,9,,11,,
-30002,202001,100,9343,72,0.1,0.1,0.5,,2.09204015,76.03985875,,1.195062676,,1.195062676,,1.772802559,142.3186593,,1.932421355,109.179259,9343,R,,9,11,,
-30002,202002,100,7818,72,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,,
-30002,202003,100,4897,72,0.1,0.1,0.5,2.040615327,,84.81873182,0.626375032,,0.626375032,,1.172391173,,76.13443331,1.60650325,,80.47658257,4897,R,9,,11,,
-30003,202001,100,7511,7,0.1,0.1,0.5,,2.09204015,76.03985875,,4.265190233,,4.265190233,,1.772802559,142.3186593,,1.932421355,109.179259,7511,R,,9,11,,
-30003,202002,100,1761,7,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,,
-30003,202003,100,6492,7,0.1,0.1,0.5,2.040615327,,84.81873182,3.686541738,,3.686541738,,1.172391173,,76.13443331,1.60650325,,80.47658257,6492,R,9,,11,,
-30004,202001,100,64,81,0.1,0.1,0.5,,2.09204015,76.03985875,,0.030288689,,0.030288689,,1.772802559,142.3186593,,1.932421355,109.179259,64,R,,9,11,,
-30004,202002,100,2113,81,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,,
-30004,202003,100,185,81,0.1,0.1,0.5,2.040615327,,84.81873182,0.087553242,,0.087553242,,1.172391173,,76.13443331,1.60650325,,80.47658257,185,R,9,,11,,
-30005,202001,100,844,5,0.1,0.1,0.5,,2.09204015,76.03985875,,0.941234172,,0.941234172,,1.772802559,142.3186593,,1.932421355,109.179259,844,R,,9,11,,
-30005,202002,100,897,5,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,,
-30005,202003,100,280,5,0.1,0.1,0.5,2.040615327,,84.81873182,0.312578027,,0.312578027,,1.172391173,,76.13443331,1.60650325,,80.47658257,280,R,9,,11,,
-30006,202001,100,1869,14,0.1,0.1,0.5,,2.09204015,76.03985875,,0.995885563,,0.995885563,,1.772802559,142.3186593,,1.932421355,109.179259,1869,R,,9,11,,
-30006,202002,100,1876,14,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,,
-30006,202003,100,1371,14,0.1,0.1,0.5,2.040615327,,84.81873182,0.730770871,,0.730770871,,1.172391173,,76.13443331,1.60650325,,80.47658257,1371,R,9,,11,,
-30007,202001,100,12769,12,0.1,0.1,0.5,,2.09204015,76.03985875,,4.475816911,,4.475816911,,1.772802559,142.3186593,,1.932421355,109.179259,12769,R,,9,11,,
-30007,202002,100,2853,12,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,,
-30007,202003,100,11491,12,0.1,0.1,0.5,2.040615327,,84.81873182,4.027888195,,4.027888195,,1.172391173,,76.13443331,1.60650325,,80.47658257,11491,R,9,,11,,
-30008,202001,100,141,162,0.1,0.1,0.5,,2.09204015,76.03985875,,0.023463069,,,,1.772802559,142.3186593,,1.932421355,109.179259,141,R,,9,11,,TRUE
-30008,202002,100,6001,162,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,42.62017045,13.86213906,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,433,162,0.1,0.1,0.5,2.040615327,,84.81873182,0.072138939,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,433,R,9,,11,TRUE,
-30009,202001,100,6417,26,0.1,0.1,0.5,,2.09204015,76.03985875,,1.589639934,,1.589639934,,1.772802559,142.3186593,,1.932421355,109.179259,6417,R,,9,11,,
-30009,202002,100,4037,26,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,,
-30009,202003,100,1322,26,0.1,0.1,0.5,2.040615327,,84.81873182,0.327462695,,0.327462695,,1.172391173,,76.13443331,1.60650325,,80.47658257,1322,R,9,,11,,
-30010,202001,100,28963,144,0.1,0.1,0.5,,2.09204015,76.03985875,,1.332623847,,1.332623847,,1.772802559,142.3186593,,1.932421355,109.179259,28963,R,,9,11,,
-30010,202002,100,21734,144,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,,
-30010,202003,100,10529,144,0.1,0.1,0.5,2.040615327,,84.81873182,0.484426733,,0.484426733,,1.172391173,,76.13443331,1.60650325,,80.47658257,10529,R,9,,11,,
-30011,202001,100,6009,5,0.1,0.1,0.5,,2.09204015,76.03985875,,5.249464902,,,,1.772802559,142.3186593,,1.932421355,109.179259,6009,R,,9,11,,TRUE
-30011,202002,100,1145,5,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.190495606,0.226047443,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5064,5,0.1,0.1,0.5,2.040615327,,84.81873182,4.423850085,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,5064,R,9,,11,TRUE,
-30012,202001,100,,275,0.1,0.1,0.5,,2.09204015,76.03985875,,,,,,1.772802559,142.3186593,,1.932421355,109.179259,30024.29623,C,,9,11,,
-30012,202002,100,,275,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,,,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,
-30012,202003,100,,275,0.1,0.1,0.5,2.040615327,,84.81873182,,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,124533.173,FIC,9,,11,,
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,8444,51,0.5,,2.09204015,76.03985875,,1.129481006,,1.129481006,,1.772802559,142.3186593,,1.932421355,109.179259,8444,R,,9,11,,
+30001,202002,100,7476,51,0.5,0.8701751,1.505585865,123.1676833,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,,
+30001,202003,100,2003,51,0.5,2.040615327,,84.81873182,0.267924024,,0.267924024,,1.172391173,,76.13443331,1.60650325,,80.47658257,2003,R,9,,11,,
+30002,202001,100,9343,72,0.5,,2.09204015,76.03985875,,1.195062676,,1.195062676,,1.772802559,142.3186593,,1.932421355,109.179259,9343,R,,9,11,,
+30002,202002,100,7818,72,0.5,0.8701751,1.505585865,123.1676833,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,,
+30002,202003,100,4897,72,0.5,2.040615327,,84.81873182,0.626375032,,0.626375032,,1.172391173,,76.13443331,1.60650325,,80.47658257,4897,R,9,,11,,
+30003,202001,100,7511,7,0.5,,2.09204015,76.03985875,,4.265190233,,4.265190233,,1.772802559,142.3186593,,1.932421355,109.179259,7511,R,,9,11,,
+30003,202002,100,1761,7,0.5,0.8701751,1.505585865,123.1676833,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,,
+30003,202003,100,6492,7,0.5,2.040615327,,84.81873182,3.686541738,,3.686541738,,1.172391173,,76.13443331,1.60650325,,80.47658257,6492,R,9,,11,,
+30004,202001,100,64,81,0.5,,2.09204015,76.03985875,,0.030288689,,0.030288689,,1.772802559,142.3186593,,1.932421355,109.179259,64,R,,9,11,,
+30004,202002,100,2113,81,0.5,0.8701751,1.505585865,123.1676833,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,,
+30004,202003,100,185,81,0.5,2.040615327,,84.81873182,0.087553242,,0.087553242,,1.172391173,,76.13443331,1.60650325,,80.47658257,185,R,9,,11,,
+30005,202001,100,844,5,0.5,,2.09204015,76.03985875,,0.941234172,,0.941234172,,1.772802559,142.3186593,,1.932421355,109.179259,844,R,,9,11,,
+30005,202002,100,897,5,0.5,0.8701751,1.505585865,123.1676833,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,,
+30005,202003,100,280,5,0.5,2.040615327,,84.81873182,0.312578027,,0.312578027,,1.172391173,,76.13443331,1.60650325,,80.47658257,280,R,9,,11,,
+30006,202001,100,1869,14,0.5,,2.09204015,76.03985875,,0.995885563,,0.995885563,,1.772802559,142.3186593,,1.932421355,109.179259,1869,R,,9,11,,
+30006,202002,100,1876,14,0.5,0.8701751,1.505585865,123.1676833,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,,
+30006,202003,100,1371,14,0.5,2.040615327,,84.81873182,0.730770871,,0.730770871,,1.172391173,,76.13443331,1.60650325,,80.47658257,1371,R,9,,11,,
+30007,202001,100,12769,12,0.5,,2.09204015,76.03985875,,4.475816911,,4.475816911,,1.772802559,142.3186593,,1.932421355,109.179259,12769,R,,9,11,,
+30007,202002,100,2853,12,0.5,0.8701751,1.505585865,123.1676833,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,,
+30007,202003,100,11491,12,0.5,2.040615327,,84.81873182,4.027888195,,4.027888195,,1.172391173,,76.13443331,1.60650325,,80.47658257,11491,R,9,,11,,
+30008,202001,100,141,162,0.5,,2.09204015,76.03985875,,0.023463069,,,,1.772802559,142.3186593,,1.932421355,109.179259,141,R,,9,11,,TRUE
+30008,202002,100,6001,162,0.5,0.8701751,1.505585865,123.1676833,42.62017045,13.86213906,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,433,162,0.5,2.040615327,,84.81873182,0.072138939,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,433,R,9,,11,TRUE,
+30009,202001,100,6417,26,0.5,,2.09204015,76.03985875,,1.589639934,,1.589639934,,1.772802559,142.3186593,,1.932421355,109.179259,6417,R,,9,11,,
+30009,202002,100,4037,26,0.5,0.8701751,1.505585865,123.1676833,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,,
+30009,202003,100,1322,26,0.5,2.040615327,,84.81873182,0.327462695,,0.327462695,,1.172391173,,76.13443331,1.60650325,,80.47658257,1322,R,9,,11,,
+30010,202001,100,28963,144,0.5,,2.09204015,76.03985875,,1.332623847,,1.332623847,,1.772802559,142.3186593,,1.932421355,109.179259,28963,R,,9,11,,
+30010,202002,100,21734,144,0.5,0.8701751,1.505585865,123.1676833,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,,
+30010,202003,100,10529,144,0.5,2.040615327,,84.81873182,0.484426733,,0.484426733,,1.172391173,,76.13443331,1.60650325,,80.47658257,10529,R,9,,11,,
+30011,202001,100,6009,5,0.5,,2.09204015,76.03985875,,5.249464902,,,,1.772802559,142.3186593,,1.932421355,109.179259,6009,R,,9,11,,TRUE
+30011,202002,100,1145,5,0.5,0.8701751,1.505585865,123.1676833,0.190495606,0.226047443,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5064,5,0.5,2.040615327,,84.81873182,4.423850085,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,5064,R,9,,11,TRUE,
+30012,202001,100,,275,0.5,,2.09204015,76.03985875,,,,,,1.772802559,142.3186593,,1.932421355,109.179259,30024.29623,C,,9,11,,
+30012,202002,100,,275,0.5,0.8701751,1.505585865,123.1676833,,,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,
+30012,202003,100,,275,0.5,2.040615327,,84.81873182,,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,124533.173,FIC,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
index 74b5bc90..73f13173 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
@@ -1,64 +1,64 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-90001,202001,100,9244,89,0.1,0.1,0.5,,2.09204015,76.03985875
-90001,202002,100,8916,89,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90001,202003,100,6194,89,0.1,0.1,0.5,2.040615327,,84.81873182
-90002,202001,100,4826,83,0.1,0.1,0.5,,2.09204015,76.03985875
-90002,202002,100,5903,83,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90002,202003,100,4743,83,0.1,0.1,0.5,2.040615327,,84.81873182
-90003,202001,100,7586,4,0.1,0.1,0.5,,2.09204015,76.03985875
-90003,202002,100,1016,4,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90003,202003,100,1429,4,0.1,0.1,0.5,2.040615327,,84.81873182
-90004,202001,100,3975,76,0.1,0.1,0.5,,2.09204015,76.03985875
-90004,202002,100,3044,76,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90004,202003,100,3673,76,0.1,0.1,0.5,2.040615327,,84.81873182
-90005,202001,100,1941,18,0.1,0.1,0.5,,2.09204015,76.03985875
-90005,202002,100,3121,18,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90005,202003,100,1208,18,0.1,0.1,0.5,2.040615327,,84.81873182
-90006,202001,100,5405,94,0.1,0.1,0.5,,2.09204015,76.03985875
-90006,202002,100,7084,94,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90006,202003,100,4980,94,0.1,0.1,0.5,2.040615327,,84.81873182
-90007,202001,100,15172,8,0.1,0.1,0.5,,2.09204015,76.03985875
-90007,202002,100,2845,8,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90007,202003,100,3501,8,0.1,0.1,0.5,2.040615327,,84.81873182
-90008,202001,100,16298,304,0.1,0.1,0.5,,2.09204015,76.03985875
-90008,202002,100,14429,304,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90008,202003,100,14295,304,0.1,0.1,0.5,2.040615327,,84.81873182
-90009,202001,100,3698,45,0.1,0.1,0.5,,2.09204015,76.03985875
-90009,202002,100,4993,45,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90009,202003,100,4212,45,0.1,0.1,0.5,2.040615327,,84.81873182
-90010,202001,100,7722,100,0.1,0.1,0.5,,2.09204015,76.03985875
-90010,202002,100,10153,100,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90010,202003,100,6545,100,0.1,0.1,0.5,2.040615327,,84.81873182
-90011,202001,100,30344,19,0.1,0.1,0.5,,2.09204015,76.03985875
-90011,202002,100,3627,19,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90011,202003,100,7288,19,0.1,0.1,0.5,2.040615327,,84.81873182
-90012,202001,100,16298,304,0.1,0.1,0.5,,2.09204015,76.03985875
-90012,202002,100,11567,304,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90012,202003,100,13484,304,0.1,0.1,0.5,2.040615327,,84.81873182
-90013,202001,100,20190,54,0.1,0.1,0.5,,2.09204015,76.03985875
-90013,202002,100,18242,54,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90013,202003,100,28826,54,0.1,0.1,0.5,2.040615327,,84.81873182
-90014,202001,100,4260,47,0.1,0.1,0.5,,2.09204015,76.03985875
-90014,202002,100,5036,42,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90014,202003,100,6484,42,0.1,0.1,0.5,2.040615327,,84.81873182
-90015,202001,100,19236,57,0.1,0.1,0.5,,2.09204015,76.03985875
-90015,202002,100,4949,57,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90015,202003,100,3544,57,0.1,0.1,0.5,2.040615327,,84.81873182
-90016,202001,100,14902,163,0.1,0.1,0.5,,2.09204015,76.03985875
-90016,202002,100,16435,163,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90016,202003,100,24653,163,0.1,0.1,0.5,2.040615327,,84.81873182
-90017,202001,100,35476,149,0.1,0.1,0.5,,2.09204015,76.03985875
-90017,202002,100,50515,149,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90017,202003,100,53477,149,0.1,0.1,0.5,2.040615327,,84.81873182
-90018,202001,100,13845,126,0.1,0.1,0.5,,2.09204015,76.03985875
-90018,202002,100,25488,126,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90018,202003,100,27409,126,0.1,0.1,0.5,2.040615327,,84.81873182
-90019,202001,100,1099,6,0.1,0.1,0.5,,2.09204015,76.03985875
-90019,202002,100,434,6,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90019,202003,100,124,6,0.1,0.1,0.5,2.040615327,,84.81873182
-90020,202001,100,3348,22,0.1,0.1,0.5,,2.09204015,76.03985875
-90020,202002,100,1996,22,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90020,202003,100,5051,22,0.1,0.1,0.5,2.040615327,,84.81873182
-90021,202001,100,,155,0.1,0.1,0.5,,2.09204015,76.03985875
-90021,202002,100,,155,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833
-90021,202003,100,21046,155,0.1,0.1,0.5,2.040615327,,84.81873182
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+90001,202001,100,9244,89,0.5,,2.09204015,76.03985875
+90001,202002,100,8916,89,0.5,0.8701751,1.505585865,123.1676833
+90001,202003,100,6194,89,0.5,2.040615327,,84.81873182
+90002,202001,100,4826,83,0.5,,2.09204015,76.03985875
+90002,202002,100,5903,83,0.5,0.8701751,1.505585865,123.1676833
+90002,202003,100,4743,83,0.5,2.040615327,,84.81873182
+90003,202001,100,7586,4,0.5,,2.09204015,76.03985875
+90003,202002,100,1016,4,0.5,0.8701751,1.505585865,123.1676833
+90003,202003,100,1429,4,0.5,2.040615327,,84.81873182
+90004,202001,100,3975,76,0.5,,2.09204015,76.03985875
+90004,202002,100,3044,76,0.5,0.8701751,1.505585865,123.1676833
+90004,202003,100,3673,76,0.5,2.040615327,,84.81873182
+90005,202001,100,1941,18,0.5,,2.09204015,76.03985875
+90005,202002,100,3121,18,0.5,0.8701751,1.505585865,123.1676833
+90005,202003,100,1208,18,0.5,2.040615327,,84.81873182
+90006,202001,100,5405,94,0.5,,2.09204015,76.03985875
+90006,202002,100,7084,94,0.5,0.8701751,1.505585865,123.1676833
+90006,202003,100,4980,94,0.5,2.040615327,,84.81873182
+90007,202001,100,15172,8,0.5,,2.09204015,76.03985875
+90007,202002,100,2845,8,0.5,0.8701751,1.505585865,123.1676833
+90007,202003,100,3501,8,0.5,2.040615327,,84.81873182
+90008,202001,100,16298,304,0.5,,2.09204015,76.03985875
+90008,202002,100,14429,304,0.5,0.8701751,1.505585865,123.1676833
+90008,202003,100,14295,304,0.5,2.040615327,,84.81873182
+90009,202001,100,3698,45,0.5,,2.09204015,76.03985875
+90009,202002,100,4993,45,0.5,0.8701751,1.505585865,123.1676833
+90009,202003,100,4212,45,0.5,2.040615327,,84.81873182
+90010,202001,100,7722,100,0.5,,2.09204015,76.03985875
+90010,202002,100,10153,100,0.5,0.8701751,1.505585865,123.1676833
+90010,202003,100,6545,100,0.5,2.040615327,,84.81873182
+90011,202001,100,30344,19,0.5,,2.09204015,76.03985875
+90011,202002,100,3627,19,0.5,0.8701751,1.505585865,123.1676833
+90011,202003,100,7288,19,0.5,2.040615327,,84.81873182
+90012,202001,100,16298,304,0.5,,2.09204015,76.03985875
+90012,202002,100,11567,304,0.5,0.8701751,1.505585865,123.1676833
+90012,202003,100,13484,304,0.5,2.040615327,,84.81873182
+90013,202001,100,20190,54,0.5,,2.09204015,76.03985875
+90013,202002,100,18242,54,0.5,0.8701751,1.505585865,123.1676833
+90013,202003,100,28826,54,0.5,2.040615327,,84.81873182
+90014,202001,100,4260,47,0.5,,2.09204015,76.03985875
+90014,202002,100,5036,42,0.5,0.8701751,1.505585865,123.1676833
+90014,202003,100,6484,42,0.5,2.040615327,,84.81873182
+90015,202001,100,19236,57,0.5,,2.09204015,76.03985875
+90015,202002,100,4949,57,0.5,0.8701751,1.505585865,123.1676833
+90015,202003,100,3544,57,0.5,2.040615327,,84.81873182
+90016,202001,100,14902,163,0.5,,2.09204015,76.03985875
+90016,202002,100,16435,163,0.5,0.8701751,1.505585865,123.1676833
+90016,202003,100,24653,163,0.5,2.040615327,,84.81873182
+90017,202001,100,35476,149,0.5,,2.09204015,76.03985875
+90017,202002,100,50515,149,0.5,0.8701751,1.505585865,123.1676833
+90017,202003,100,53477,149,0.5,2.040615327,,84.81873182
+90018,202001,100,13845,126,0.5,,2.09204015,76.03985875
+90018,202002,100,25488,126,0.5,0.8701751,1.505585865,123.1676833
+90018,202003,100,27409,126,0.5,2.040615327,,84.81873182
+90019,202001,100,1099,6,0.5,,2.09204015,76.03985875
+90019,202002,100,434,6,0.5,0.8701751,1.505585865,123.1676833
+90019,202003,100,124,6,0.5,2.040615327,,84.81873182
+90020,202001,100,3348,22,0.5,,2.09204015,76.03985875
+90020,202002,100,1996,22,0.5,0.8701751,1.505585865,123.1676833
+90020,202003,100,5051,22,0.5,2.040615327,,84.81873182
+90021,202001,100,,155,0.5,,2.09204015,76.03985875
+90021,202002,100,,155,0.5,0.8701751,1.505585865,123.1676833
+90021,202003,100,21046,155,0.5,2.040615327,,84.81873182
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index 6204e0a5..0af751b4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -1,64 +1,64 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,disc_count_fi,disc_count_bi,disc_count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
-90001,202001,100,9244,89,0.1,0.1,0.5,,2.09204015,76.03985875,,1.036787797,,1.036787797,,1.504436071,128.8429705,,1.798238111,102.4414146,9244,R,,17,19,,3,1,,,
-90001,202002,100,8916,89,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.964517525,1.43945754,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,3,2,0,,,
-90001,202003,100,6194,89,0.1,0.1,0.5,2.040615327,,84.81873182,0.694706146,,0.694706146,,1.072463185,,126.2596455,1.556539256,,105.5391887,6194,R,18,,21,2,,0,,,
-90002,202001,100,4826,83,0.1,0.1,0.5,,2.09204015,76.03985875,,0.817550398,,0.817550398,,1.504436071,128.8429705,,1.798238111,102.4414146,4826,R,,17,19,,3,1,,,
-90002,202002,100,5903,83,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.223166183,1.244570947,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,3,2,0,,,
-90002,202003,100,4743,83,0.1,0.1,0.5,2.040615327,,84.81873182,0.803489751,,0.803489751,,1.072463185,,126.2596455,1.556539256,,105.5391887,4743,R,18,,21,2,,0,,,
-90003,202001,100,7586,4,0.1,0.1,0.5,,2.09204015,76.03985875,,,,,,1.504436071,128.8429705,,1.798238111,102.4414146,7586,R,,17,19,,3,1,,,TRUE
-90003,202002,100,1016,4,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,,0.710986704,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,3,2,0,,,
-90003,202003,100,1429,4,0.1,0.1,0.5,2.040615327,,84.81873182,1.406496063,,1.406496063,,1.072463185,,126.2596455,1.556539256,,105.5391887,1429,R,18,,21,2,,0,,,
-90004,202001,100,3975,76,0.1,0.1,0.5,,2.09204015,76.03985875,,1.305847569,,1.305847569,,1.504436071,128.8429705,,1.798238111,102.4414146,3975,R,,17,19,,3,1,,,
-90004,202002,100,3044,76,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.765786164,0.82875034,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,3,2,0,,,
-90004,202003,100,3673,76,0.1,0.1,0.5,2.040615327,,84.81873182,1.206636005,,1.206636005,,1.072463185,,126.2596455,1.556539256,,105.5391887,3673,R,18,,21,2,,0,,,
-90005,202001,100,1941,18,0.1,0.1,0.5,,2.09204015,76.03985875,,0.622072678,,0.622072678,,1.504436071,128.8429705,,1.798238111,102.4414146,1941,R,,17,19,,3,1,,,
-90005,202002,100,3121,18,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.607529208,2.583641738,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,3,2,0,,,
-90005,202003,100,1208,18,0.1,0.1,0.5,2.040615327,,84.81873182,0.387050567,,0.387050567,,1.072463185,,126.2596455,1.556539256,,105.5391887,1208,R,18,,21,2,,0,,,
-90006,202001,100,5405,94,0.1,0.1,0.5,,2.09204015,76.03985875,,0.763047038,,0.763047038,,1.504436071,128.8429705,,1.798238111,102.4414146,5405,R,,17,19,,3,1,,,
-90006,202002,100,7084,94,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.310535196,1.422366796,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,3,2,0,,,
-90006,202003,100,4980,94,0.1,0.1,0.5,2.040615327,,84.81873182,0.703053532,,0.703053532,,1.072463185,,126.2596455,1.556539256,,105.5391887,4980,R,18,,21,2,,0,,,
-90007,202001,100,15172,8,0.1,0.1,0.5,,2.09204015,76.03985875,,5.333239595,,5.333239595,,1.504436071,128.8429705,,1.798238111,102.4414146,15172,R,,17,19,,3,1,,,
-90007,202002,100,2845,8,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.187503296,0.812556233,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,3,2,0,,,
-90007,202003,100,3501,8,0.1,0.1,0.5,2.040615327,,84.81873182,1.230684055,,1.230684055,,1.072463185,,126.2596455,1.556539256,,105.5391887,3501,R,18,,21,2,,0,,,
-90008,202001,100,16298,304,0.1,0.1,0.5,,2.09204015,76.03985875,,1.129530598,,1.129530598,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
-90008,202002,100,14429,304,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.885323516,1.009357249,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,3,2,0,,,
-90008,202003,100,14295,304,0.1,0.1,0.5,2.040615327,,84.81873182,0.990729498,,0.990729498,,1.072463185,,126.2596455,1.556539256,,105.5391887,14295,R,18,,21,2,,0,,,
-90009,202001,100,3698,45,0.1,0.1,0.5,,2.09204015,76.03985875,,0.740562712,,0.740562712,,1.504436071,128.8429705,,1.798238111,102.4414146,3698,R,,17,19,,3,1,,,
-90009,202002,100,4993,45,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.350324535,1.185435621,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,3,2,0,,,
-90009,202003,100,4212,45,0.1,0.1,0.5,2.040615327,,84.81873182,0.843571749,,0.843571749,,1.072463185,,126.2596455,1.556539256,,105.5391887,4212,R,18,,21,2,,0,,,
-90010,202001,100,7722,100,0.1,0.1,0.5,,2.09204015,76.03985875,,0.760511998,,0.760511998,,1.504436071,128.8429705,,1.798238111,102.4414146,7722,R,,17,19,,3,1,,,
-90010,202002,100,10153,100,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.314903647,1.551204368,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,3,2,0,,,
-90010,202003,100,6545,100,0.1,0.1,0.5,2.040615327,,84.81873182,0.644660382,,0.644660382,,1.072463185,,126.2596455,1.556539256,,105.5391887,6545,R,18,,21,2,,0,,,
-90011,202001,100,30344,19,0.1,0.1,0.5,,2.09204015,76.03985875,,8.365866031,,,,1.504436071,128.8429705,,1.798238111,102.4414146,30344,R,,17,19,,3,1,,TRUE,
-90011,202002,100,3627,19,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.119533351,0.497690693,,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,3,2,0,TRUE,,
-90011,202003,100,7288,19,0.1,0.1,0.5,2.040615327,,84.81873182,2.00928009,,2.00928009,,1.072463185,,126.2596455,1.556539256,,105.5391887,7288,R,18,,21,2,,0,,,
-90012,202001,100,16298,304,0.1,0.1,0.5,,2.09204015,76.03985875,,1.408940798,,1.408940798,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
-90012,202002,100,11567,304,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.70975303,0.857831504,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,3,2,0,,,
-90012,202003,100,13484,304,0.1,0.1,0.5,2.040615327,,84.81873182,1.165730094,,1.165730094,,1.072463185,,126.2596455,1.556539256,,105.5391887,13484,R,18,,21,2,,0,,,
-90013,202001,100,20190,54,0.1,0.1,0.5,,2.09204015,76.03985875,,1.106799294,,1.106799294,,1.504436071,128.8429705,,1.798238111,102.4414146,20190,R,,17,19,,3,1,,,
-90013,202002,100,18242,54,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.903506178,0.632817595,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,3,2,0,,,
-90013,202003,100,28826,54,0.1,0.1,0.5,2.040615327,,84.81873182,1.58023419,,1.58023419,,1.072463185,,126.2596455,1.556539256,,105.5391887,28826,R,18,,21,2,,0,,,
-90014,202001,100,4260,47,0.1,0.1,0.5,,2.09204015,76.03985875,,0.845985046,,0.845985046,,1.504436071,128.8429705,,1.798238111,102.4414146,4260,R,,17,19,,3,1,,,
-90014,202002,100,5036,42,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.182053991,0.776557765,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,3,2,0,,,
-90014,202003,100,6484,42,0.1,0.1,0.5,2.040615327,,84.81873182,1.28773421,,1.28773421,,1.072463185,,126.2596455,1.556539256,,105.5391887,6484,R,18,,21,2,,0,,,
-90015,202001,100,19236,57,0.1,0.1,0.5,,2.09204015,76.03985875,,3.886845827,,3.886845827,,1.504436071,128.8429705,,1.798238111,102.4414146,19236,R,,17,19,,3,1,,,
-90015,202002,100,4949,57,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.25727802,1.396267404,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,3,2,0,,,
-90015,202003,100,3544,57,0.1,0.1,0.5,2.040615327,,84.81873182,0.716195191,,0.716195191,,1.072463185,,126.2596455,1.556539256,,105.5391887,3544,R,18,,21,2,,0,,,
-90016,202001,100,14902,163,0.1,0.1,0.5,,2.09204015,76.03985875,,0.906730921,,0.906730921,,1.504436071,128.8429705,,1.798238111,102.4414146,14902,R,,17,19,,3,1,,,
-90016,202002,100,16435,163,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.102863018,0.666628808,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,3,2,0,,,
-90016,202003,100,24653,163,0.1,0.1,0.5,2.040615327,,84.81873182,1.500085186,,1.500085186,,1.072463185,,126.2596455,1.556539256,,105.5391887,24653,R,18,,21,2,,0,,,
-90017,202001,100,35476,149,0.1,0.1,0.5,,2.09204015,76.03985875,,0.702275751,,0.702275751,,1.504436071,128.8429705,,1.798238111,102.4414146,35476,R,,17,19,,3,1,,,
-90017,202002,100,50515,149,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.42394209,0.944611909,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,3,2,0,,,
-90017,202003,100,53477,149,0.1,0.1,0.5,2.040615327,,84.81873182,1.058635817,,1.058635817,,1.072463185,,126.2596455,1.556539256,,105.5391887,53477,R,18,,21,2,,0,,,
-90018,202001,100,13845,126,0.1,0.1,0.5,,2.09204015,76.03985875,,0.543204684,,,,1.504436071,128.8429705,,1.798238111,102.4414146,13845,R,,17,19,,3,1,,TRUE,
-90018,202002,100,25488,126,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,1.840926688,0.929916997,,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,3,2,0,TRUE,,
-90018,202003,100,27409,126,0.1,0.1,0.5,2.040615327,,84.81873182,1.075364795,,1.075364795,,1.072463185,,126.2596455,1.556539256,,105.5391887,27409,R,18,,21,2,,0,,,
-90019,202001,100,1099,6,0.1,0.1,0.5,,2.09204015,76.03985875,,2.530969376,,2.530969376,,1.504436071,128.8429705,,1.798238111,102.4414146,1099,R,,17,19,,3,1,,,
-90019,202002,100,434,6,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.395105531,3.51659919,0.395105531,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,3,2,0,,TRUE,
-90019,202003,100,124,6,0.1,0.1,0.5,2.040615327,,84.81873182,0.284365646,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,124,R,18,,21,2,,0,TRUE,,
-90020,202001,100,3348,22,0.1,0.1,0.5,,2.09204015,76.03985875,,1.677715809,,1.677715809,,1.504436071,128.8429705,,1.798238111,102.4414146,3348,R,,17,19,,3,1,,,
-90020,202002,100,1996,22,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,0.596048505,0.395102278,0.596048505,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,3,2,0,,TRUE,
-90020,202003,100,5051,22,0.1,0.1,0.5,2.040615327,,84.81873182,2.530990214,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,5051,R,18,,21,2,,0,TRUE,,
-90021,202001,100,,155,0.1,0.1,0.5,,2.09204015,76.03985875,,,,,,1.504436071,128.8429705,,1.798238111,102.4414146,48979.92546,BI,,17,19,,3,1,,,
-90021,202002,100,,155,0.1,0.1,0.5,0.8701751,1.505585865,123.1676833,,,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,3,2,0,,,
-90021,202003,100,21046,155,0.1,0.1,0.5,2.040615327,,84.81873182,,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,21046,R,18,,21,2,,0,,,
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,disc_count_fi,disc_count_bi,disc_count_c,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+90001,202001,100,9244,89,0.5,,2.09204015,76.03985875,,1.036787797,,1.036787797,,1.504436071,128.8429705,,1.798238111,102.4414146,9244,R,,17,19,,3,1,,,
+90001,202002,100,8916,89,0.5,0.8701751,1.505585865,123.1676833,0.964517525,1.43945754,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,3,2,0,,,
+90001,202003,100,6194,89,0.5,2.040615327,,84.81873182,0.694706146,,0.694706146,,1.072463185,,126.2596455,1.556539256,,105.5391887,6194,R,18,,21,2,,0,,,
+90002,202001,100,4826,83,0.5,,2.09204015,76.03985875,,0.817550398,,0.817550398,,1.504436071,128.8429705,,1.798238111,102.4414146,4826,R,,17,19,,3,1,,,
+90002,202002,100,5903,83,0.5,0.8701751,1.505585865,123.1676833,1.223166183,1.244570947,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,3,2,0,,,
+90002,202003,100,4743,83,0.5,2.040615327,,84.81873182,0.803489751,,0.803489751,,1.072463185,,126.2596455,1.556539256,,105.5391887,4743,R,18,,21,2,,0,,,
+90003,202001,100,7586,4,0.5,,2.09204015,76.03985875,,,,,,1.504436071,128.8429705,,1.798238111,102.4414146,7586,R,,17,19,,3,1,,,TRUE
+90003,202002,100,1016,4,0.5,0.8701751,1.505585865,123.1676833,,0.710986704,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,3,2,0,,,
+90003,202003,100,1429,4,0.5,2.040615327,,84.81873182,1.406496063,,1.406496063,,1.072463185,,126.2596455,1.556539256,,105.5391887,1429,R,18,,21,2,,0,,,
+90004,202001,100,3975,76,0.5,,2.09204015,76.03985875,,1.305847569,,1.305847569,,1.504436071,128.8429705,,1.798238111,102.4414146,3975,R,,17,19,,3,1,,,
+90004,202002,100,3044,76,0.5,0.8701751,1.505585865,123.1676833,0.765786164,0.82875034,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,3,2,0,,,
+90004,202003,100,3673,76,0.5,2.040615327,,84.81873182,1.206636005,,1.206636005,,1.072463185,,126.2596455,1.556539256,,105.5391887,3673,R,18,,21,2,,0,,,
+90005,202001,100,1941,18,0.5,,2.09204015,76.03985875,,0.622072678,,0.622072678,,1.504436071,128.8429705,,1.798238111,102.4414146,1941,R,,17,19,,3,1,,,
+90005,202002,100,3121,18,0.5,0.8701751,1.505585865,123.1676833,1.607529208,2.583641738,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,3,2,0,,,
+90005,202003,100,1208,18,0.5,2.040615327,,84.81873182,0.387050567,,0.387050567,,1.072463185,,126.2596455,1.556539256,,105.5391887,1208,R,18,,21,2,,0,,,
+90006,202001,100,5405,94,0.5,,2.09204015,76.03985875,,0.763047038,,0.763047038,,1.504436071,128.8429705,,1.798238111,102.4414146,5405,R,,17,19,,3,1,,,
+90006,202002,100,7084,94,0.5,0.8701751,1.505585865,123.1676833,1.310535196,1.422366796,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,3,2,0,,,
+90006,202003,100,4980,94,0.5,2.040615327,,84.81873182,0.703053532,,0.703053532,,1.072463185,,126.2596455,1.556539256,,105.5391887,4980,R,18,,21,2,,0,,,
+90007,202001,100,15172,8,0.5,,2.09204015,76.03985875,,5.333239595,,5.333239595,,1.504436071,128.8429705,,1.798238111,102.4414146,15172,R,,17,19,,3,1,,,
+90007,202002,100,2845,8,0.5,0.8701751,1.505585865,123.1676833,0.187503296,0.812556233,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,3,2,0,,,
+90007,202003,100,3501,8,0.5,2.040615327,,84.81873182,1.230684055,,1.230684055,,1.072463185,,126.2596455,1.556539256,,105.5391887,3501,R,18,,21,2,,0,,,
+90008,202001,100,16298,304,0.5,,2.09204015,76.03985875,,1.129530598,,1.129530598,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
+90008,202002,100,14429,304,0.5,0.8701751,1.505585865,123.1676833,0.885323516,1.009357249,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,3,2,0,,,
+90008,202003,100,14295,304,0.5,2.040615327,,84.81873182,0.990729498,,0.990729498,,1.072463185,,126.2596455,1.556539256,,105.5391887,14295,R,18,,21,2,,0,,,
+90009,202001,100,3698,45,0.5,,2.09204015,76.03985875,,0.740562712,,0.740562712,,1.504436071,128.8429705,,1.798238111,102.4414146,3698,R,,17,19,,3,1,,,
+90009,202002,100,4993,45,0.5,0.8701751,1.505585865,123.1676833,1.350324535,1.185435621,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,3,2,0,,,
+90009,202003,100,4212,45,0.5,2.040615327,,84.81873182,0.843571749,,0.843571749,,1.072463185,,126.2596455,1.556539256,,105.5391887,4212,R,18,,21,2,,0,,,
+90010,202001,100,7722,100,0.5,,2.09204015,76.03985875,,0.760511998,,0.760511998,,1.504436071,128.8429705,,1.798238111,102.4414146,7722,R,,17,19,,3,1,,,
+90010,202002,100,10153,100,0.5,0.8701751,1.505585865,123.1676833,1.314903647,1.551204368,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,3,2,0,,,
+90010,202003,100,6545,100,0.5,2.040615327,,84.81873182,0.644660382,,0.644660382,,1.072463185,,126.2596455,1.556539256,,105.5391887,6545,R,18,,21,2,,0,,,
+90011,202001,100,30344,19,0.5,,2.09204015,76.03985875,,8.365866031,,,,1.504436071,128.8429705,,1.798238111,102.4414146,30344,R,,17,19,,3,1,,TRUE,
+90011,202002,100,3627,19,0.5,0.8701751,1.505585865,123.1676833,0.119533351,0.497690693,,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,3,2,0,TRUE,,
+90011,202003,100,7288,19,0.5,2.040615327,,84.81873182,2.00928009,,2.00928009,,1.072463185,,126.2596455,1.556539256,,105.5391887,7288,R,18,,21,2,,0,,,
+90012,202001,100,16298,304,0.5,,2.09204015,76.03985875,,1.408940798,,1.408940798,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
+90012,202002,100,11567,304,0.5,0.8701751,1.505585865,123.1676833,0.70975303,0.857831504,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,3,2,0,,,
+90012,202003,100,13484,304,0.5,2.040615327,,84.81873182,1.165730094,,1.165730094,,1.072463185,,126.2596455,1.556539256,,105.5391887,13484,R,18,,21,2,,0,,,
+90013,202001,100,20190,54,0.5,,2.09204015,76.03985875,,1.106799294,,1.106799294,,1.504436071,128.8429705,,1.798238111,102.4414146,20190,R,,17,19,,3,1,,,
+90013,202002,100,18242,54,0.5,0.8701751,1.505585865,123.1676833,0.903506178,0.632817595,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,3,2,0,,,
+90013,202003,100,28826,54,0.5,2.040615327,,84.81873182,1.58023419,,1.58023419,,1.072463185,,126.2596455,1.556539256,,105.5391887,28826,R,18,,21,2,,0,,,
+90014,202001,100,4260,47,0.5,,2.09204015,76.03985875,,0.845985046,,0.845985046,,1.504436071,128.8429705,,1.798238111,102.4414146,4260,R,,17,19,,3,1,,,
+90014,202002,100,5036,42,0.5,0.8701751,1.505585865,123.1676833,1.182053991,0.776557765,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,3,2,0,,,
+90014,202003,100,6484,42,0.5,2.040615327,,84.81873182,1.28773421,,1.28773421,,1.072463185,,126.2596455,1.556539256,,105.5391887,6484,R,18,,21,2,,0,,,
+90015,202001,100,19236,57,0.5,,2.09204015,76.03985875,,3.886845827,,3.886845827,,1.504436071,128.8429705,,1.798238111,102.4414146,19236,R,,17,19,,3,1,,,
+90015,202002,100,4949,57,0.5,0.8701751,1.505585865,123.1676833,0.25727802,1.396267404,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,3,2,0,,,
+90015,202003,100,3544,57,0.5,2.040615327,,84.81873182,0.716195191,,0.716195191,,1.072463185,,126.2596455,1.556539256,,105.5391887,3544,R,18,,21,2,,0,,,
+90016,202001,100,14902,163,0.5,,2.09204015,76.03985875,,0.906730921,,0.906730921,,1.504436071,128.8429705,,1.798238111,102.4414146,14902,R,,17,19,,3,1,,,
+90016,202002,100,16435,163,0.5,0.8701751,1.505585865,123.1676833,1.102863018,0.666628808,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,3,2,0,,,
+90016,202003,100,24653,163,0.5,2.040615327,,84.81873182,1.500085186,,1.500085186,,1.072463185,,126.2596455,1.556539256,,105.5391887,24653,R,18,,21,2,,0,,,
+90017,202001,100,35476,149,0.5,,2.09204015,76.03985875,,0.702275751,,0.702275751,,1.504436071,128.8429705,,1.798238111,102.4414146,35476,R,,17,19,,3,1,,,
+90017,202002,100,50515,149,0.5,0.8701751,1.505585865,123.1676833,1.42394209,0.944611909,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,3,2,0,,,
+90017,202003,100,53477,149,0.5,2.040615327,,84.81873182,1.058635817,,1.058635817,,1.072463185,,126.2596455,1.556539256,,105.5391887,53477,R,18,,21,2,,0,,,
+90018,202001,100,13845,126,0.5,,2.09204015,76.03985875,,0.543204684,,,,1.504436071,128.8429705,,1.798238111,102.4414146,13845,R,,17,19,,3,1,,TRUE,
+90018,202002,100,25488,126,0.5,0.8701751,1.505585865,123.1676833,1.840926688,0.929916997,,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,3,2,0,TRUE,,
+90018,202003,100,27409,126,0.5,2.040615327,,84.81873182,1.075364795,,1.075364795,,1.072463185,,126.2596455,1.556539256,,105.5391887,27409,R,18,,21,2,,0,,,
+90019,202001,100,1099,6,0.5,,2.09204015,76.03985875,,2.530969376,,2.530969376,,1.504436071,128.8429705,,1.798238111,102.4414146,1099,R,,17,19,,3,1,,,
+90019,202002,100,434,6,0.5,0.8701751,1.505585865,123.1676833,0.395105531,3.51659919,0.395105531,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,3,2,0,,TRUE,
+90019,202003,100,124,6,0.5,2.040615327,,84.81873182,0.284365646,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,124,R,18,,21,2,,0,TRUE,,
+90020,202001,100,3348,22,0.5,,2.09204015,76.03985875,,1.677715809,,1.677715809,,1.504436071,128.8429705,,1.798238111,102.4414146,3348,R,,17,19,,3,1,,,
+90020,202002,100,1996,22,0.5,0.8701751,1.505585865,123.1676833,0.596048505,0.395102278,0.596048505,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,3,2,0,,TRUE,
+90020,202003,100,5051,22,0.5,2.040615327,,84.81873182,2.530990214,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,5051,R,18,,21,2,,0,TRUE,,
+90021,202001,100,,155,0.5,,2.09204015,76.03985875,,,,,,1.504436071,128.8429705,,1.798238111,102.4414146,48979.92546,BI,,17,19,,3,1,,,
+90021,202002,100,,155,0.5,0.8701751,1.505585865,123.1676833,,,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,3,2,0,,,
+90021,202003,100,21046,155,0.5,2.040615327,,84.81873182,,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,21046,R,18,,21,2,,0,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
index 247994a6..c87e8ecb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter,link marker
-30001,202001,100,8444,51,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,8444,R,,0,9,,,F,F
-30001,202002,100,7476,51,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,,,F,F
-30001,202003,100,2003,51,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,2003,R,0,,10,,,F,F
-30002,202001,100,9343,72,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,9343,R,,0,9,,,F,F
-30002,202002,100,7818,72,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,,,F,F
-30002,202003,100,4897,72,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,4897,R,0,,10,,,F,F
-30003,202001,100,7511,7,0.5,0.5,0.5,,2.656680299,101.7103175,,4.265190233,,,,1,61.12436116,,1.82834015,81.41733933,7511,R,,0,9,,T,,TBI
-30003,202002,100,1761,7,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,T,T,,T
-30003,202003,100,6492,7,0.5,0.5,0.5,0.968230653,,70.26136364,3.686541738,,,,1,,85.37820513,0.984115327,,77.81978439,6492,R,0,,10,T,,,TFI
-30004,202001,100,64,81,0.5,0.5,0.5,,2.656680299,101.7103175,,0.030288689,,,,1,61.12436116,,1.82834015,81.41733933,64,R,,0,9,,T,,TBI
-30004,202002,100,2113,81,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,T,T,,T
-30004,202003,100,185,81,0.5,0.5,0.5,0.968230653,,70.26136364,0.087553242,,,,1,,85.37820513,0.984115327,,77.81978439,185,R,0,,10,T,,,TFI
-30005,202001,100,844,5,0.5,0.5,0.5,,2.656680299,101.7103175,,0.941234172,,,,1,61.12436116,,1.82834015,81.41733933,844,R,,0,9,,T,,TBI
-30005,202002,100,897,5,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,T,T,,T
-30005,202003,100,280,5,0.5,0.5,0.5,0.968230653,,70.26136364,0.312578027,,,,1,,85.37820513,0.984115327,,77.81978439,280,R,0,,10,T,,,TFI
-30006,202001,100,1869,14,0.5,0.5,0.5,,2.656680299,101.7103175,,0.995885563,,,,1,61.12436116,,1.82834015,81.41733933,1869,R,,0,9,,T,,TBI
-30006,202002,100,1876,14,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,T,T,,T
-30006,202003,100,1371,14,0.5,0.5,0.5,0.968230653,,70.26136364,0.730770871,,,,1,,85.37820513,0.984115327,,77.81978439,1371,R,0,,10,T,,,TFI
-30007,202001,100,12769,12,0.5,0.5,0.5,,2.656680299,101.7103175,,4.475816911,,,,1,61.12436116,,1.82834015,81.41733933,12769,R,,0,9,,T,,TBI
-30007,202002,100,2853,12,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,T,T,,T
-30007,202003,100,11491,12,0.5,0.5,0.5,0.968230653,,70.26136364,4.027888195,,,,1,,85.37820513,0.984115327,,77.81978439,11491,R,0,,10,T,,,TFI
-30008,202001,100,141,162,0.5,0.5,0.5,,2.656680299,101.7103175,,0.023463069,,,,1,61.12436116,,1.82834015,81.41733933,141,R,,0,9,,T,,TBI
-30008,202002,100,6001,162,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,T,T,,T
-30008,202003,100,433,162,0.5,0.5,0.5,0.968230653,,70.26136364,0.072138939,,,,1,,85.37820513,0.984115327,,77.81978439,433,R,0,,10,T,,,TFI
-30009,202001,100,6417,26,0.5,0.5,0.5,,2.656680299,101.7103175,,1.589639934,,,,1,61.12436116,,1.82834015,81.41733933,6417,R,,0,9,,T,,TBI
-30009,202002,100,4037,26,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,T,T,,T
-30009,202003,100,1322,26,0.5,0.5,0.5,0.968230653,,70.26136364,0.327462695,,,,1,,85.37820513,0.984115327,,77.81978439,1322,R,0,,10,T,,,TFI
-30010,202001,100,28963,144,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,28963,R,,0,9,,,F,F
-30010,202002,100,21734,144,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,,,F,F
-30010,202003,100,10529,144,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,10529,R,0,,10,,,F,F
-30011,202001,100,6009,5,0.5,0.5,0.5,,2.656680299,101.7103175,,5.249464902,,,,1,61.12436116,,1.82834015,81.41733933,6009,R,,0,9,,T,,TBI
-30011,202002,100,1145,5,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,T,T,,T
-30011,202003,100,5064,5,0.5,0.5,0.5,0.968230653,,70.26136364,4.423850085,,,,1,,85.37820513,0.984115327,,77.81978439,5064,R,0,,10,T,,,TFI
-30012,202001,100,256,275,0.5,0.5,0.5,,2.656680299,101.7103175,,0.034032235,,,,1,61.12436116,,1.82834015,81.41733933,256,R,,0,9,,T,,TBI
-30012,202002,100,7522,275,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,29.38390625,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,T,,,TFI
-30012,202003,100,,275,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,7402.515486,FIR,0,,10,,,,I
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,0.5,,2.656680299,101.7103175
+30001,202002,100,7476,51,0.5,0.771850199,1.13167173,74.91666667
+30001,202003,100,2003,51,0.5,0.968230653,,70.26136364
+30002,202001,100,9343,72,0.5,,2.656680299,101.7103175
+30002,202002,100,7818,72,0.5,0.771850199,1.13167173,74.91666667
+30002,202003,100,4897,72,0.5,0.968230653,,70.26136364
+30003,202001,100,7511,7,0.5,,2.656680299,101.7103175
+30003,202002,100,1761,7,0.5,0.771850199,1.13167173,74.91666667
+30003,202003,100,6492,7,0.5,0.968230653,,70.26136364
+30004,202001,100,64,81,0.5,,2.656680299,101.7103175
+30004,202002,100,2113,81,0.5,0.771850199,1.13167173,74.91666667
+30004,202003,100,185,81,0.5,0.968230653,,70.26136364
+30005,202001,100,844,5,0.5,,2.656680299,101.7103175
+30005,202002,100,897,5,0.5,0.771850199,1.13167173,74.91666667
+30005,202003,100,280,5,0.5,0.968230653,,70.26136364
+30006,202001,100,1869,14,0.5,,2.656680299,101.7103175
+30006,202002,100,1876,14,0.5,0.771850199,1.13167173,74.91666667
+30006,202003,100,1371,14,0.5,0.968230653,,70.26136364
+30007,202001,100,12769,12,0.5,,2.656680299,101.7103175
+30007,202002,100,2853,12,0.5,0.771850199,1.13167173,74.91666667
+30007,202003,100,11491,12,0.5,0.968230653,,70.26136364
+30008,202001,100,141,162,0.5,,2.656680299,101.7103175
+30008,202002,100,6001,162,0.5,0.771850199,1.13167173,74.91666667
+30008,202003,100,433,162,0.5,0.968230653,,70.26136364
+30009,202001,100,6417,26,0.5,,2.656680299,101.7103175
+30009,202002,100,4037,26,0.5,0.771850199,1.13167173,74.91666667
+30009,202003,100,1322,26,0.5,0.968230653,,70.26136364
+30010,202001,100,28963,144,0.5,,2.656680299,101.7103175
+30010,202002,100,21734,144,0.5,0.771850199,1.13167173,74.91666667
+30010,202003,100,10529,144,0.5,0.968230653,,70.26136364
+30011,202001,100,6009,5,0.5,,2.656680299,101.7103175
+30011,202002,100,1145,5,0.5,0.771850199,1.13167173,74.91666667
+30011,202003,100,5064,5,0.5,0.968230653,,70.26136364
+30012,202001,100,256,275,0.5,,2.656680299,101.7103175
+30012,202002,100,7522,275,0.5,0.771850199,1.13167173,74.91666667
+30012,202003,100,,275,0.5,0.968230653,,70.26136364
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index 8125727d..5c2347a5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
-30001,202001,100,8444,51,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,8444,R,,0,9,,,TRUE
-30001,202002,100,7476,51,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,,,TRUE
-30001,202003,100,2003,51,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,2003,R,0,,10,,,TRUE
-30002,202001,100,9343,72,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,9343,R,,0,9,,,TRUE
-30002,202002,100,7818,72,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,,,TRUE
-30002,202003,100,4897,72,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,4897,R,0,,10,,,TRUE
-30003,202001,100,7511,7,0.5,0.5,0.5,,2.656680299,101.7103175,,4.265190233,,,,1,61.12436116,,1.82834015,81.41733933,7511,R,,0,9,,TRUE,
-30003,202002,100,1761,7,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,TRUE,TRUE,
-30003,202003,100,6492,7,0.5,0.5,0.5,0.968230653,,70.26136364,3.686541738,,,,1,,85.37820513,0.984115327,,77.81978439,6492,R,0,,10,TRUE,,
-30004,202001,100,64,81,0.5,0.5,0.5,,2.656680299,101.7103175,,0.030288689,,,,1,61.12436116,,1.82834015,81.41733933,64,R,,0,9,,TRUE,
-30004,202002,100,2113,81,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,TRUE,TRUE,
-30004,202003,100,185,81,0.5,0.5,0.5,0.968230653,,70.26136364,0.087553242,,,,1,,85.37820513,0.984115327,,77.81978439,185,R,0,,10,TRUE,,
-30005,202001,100,844,5,0.5,0.5,0.5,,2.656680299,101.7103175,,0.941234172,,,,1,61.12436116,,1.82834015,81.41733933,844,R,,0,9,,TRUE,
-30005,202002,100,897,5,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,TRUE,TRUE,
-30005,202003,100,280,5,0.5,0.5,0.5,0.968230653,,70.26136364,0.312578027,,,,1,,85.37820513,0.984115327,,77.81978439,280,R,0,,10,TRUE,,
-30006,202001,100,1869,14,0.5,0.5,0.5,,2.656680299,101.7103175,,0.995885563,,,,1,61.12436116,,1.82834015,81.41733933,1869,R,,0,9,,TRUE,
-30006,202002,100,1876,14,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,TRUE,TRUE,
-30006,202003,100,1371,14,0.5,0.5,0.5,0.968230653,,70.26136364,0.730770871,,,,1,,85.37820513,0.984115327,,77.81978439,1371,R,0,,10,TRUE,,
-30007,202001,100,12769,12,0.5,0.5,0.5,,2.656680299,101.7103175,,4.475816911,,,,1,61.12436116,,1.82834015,81.41733933,12769,R,,0,9,,TRUE,
-30007,202002,100,2853,12,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,TRUE,TRUE,
-30007,202003,100,11491,12,0.5,0.5,0.5,0.968230653,,70.26136364,4.027888195,,,,1,,85.37820513,0.984115327,,77.81978439,11491,R,0,,10,TRUE,,
-30008,202001,100,141,162,0.5,0.5,0.5,,2.656680299,101.7103175,,0.023463069,,,,1,61.12436116,,1.82834015,81.41733933,141,R,,0,9,,TRUE,
-30008,202002,100,6001,162,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,TRUE,TRUE,
-30008,202003,100,433,162,0.5,0.5,0.5,0.968230653,,70.26136364,0.072138939,,,,1,,85.37820513,0.984115327,,77.81978439,433,R,0,,10,TRUE,,
-30009,202001,100,6417,26,0.5,0.5,0.5,,2.656680299,101.7103175,,1.589639934,,,,1,61.12436116,,1.82834015,81.41733933,6417,R,,0,9,,TRUE,
-30009,202002,100,4037,26,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,TRUE,TRUE,
-30009,202003,100,1322,26,0.5,0.5,0.5,0.968230653,,70.26136364,0.327462695,,,,1,,85.37820513,0.984115327,,77.81978439,1322,R,0,,10,TRUE,,
-30010,202001,100,28963,144,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,28963,R,,0,9,,,TRUE
-30010,202002,100,21734,144,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,,,TRUE
-30010,202003,100,10529,144,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,10529,R,0,,10,,,TRUE
-30011,202001,100,6009,5,0.5,0.5,0.5,,2.656680299,101.7103175,,5.249464902,,,,1,61.12436116,,1.82834015,81.41733933,6009,R,,0,9,,TRUE,
-30011,202002,100,1145,5,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,TRUE,TRUE,
-30011,202003,100,5064,5,0.5,0.5,0.5,0.968230653,,70.26136364,4.423850085,,,,1,,85.37820513,0.984115327,,77.81978439,5064,R,0,,10,TRUE,,
-30012,202001,100,256,275,0.5,0.5,0.5,,2.656680299,101.7103175,,0.034032235,,,,1,61.12436116,,1.82834015,81.41733933,256,R,,0,9,,TRUE,
-30012,202002,100,7522,275,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,29.38390625,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,TRUE,,
-30012,202003,100,,275,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,7402.515486,FIR,0,,10,,,
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+30001,202001,100,8444,51,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,8444,R,,0,9,,,TRUE,
+30001,202002,100,7476,51,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,,,TRUE,
+30001,202003,100,2003,51,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,2003,R,0,,10,,,TRUE,
+30002,202001,100,9343,72,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,9343,R,,0,9,,,TRUE,
+30002,202002,100,7818,72,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,,,TRUE,
+30002,202003,100,4897,72,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,4897,R,0,,10,,,TRUE,
+30003,202001,100,7511,7,0.5,,2.656680299,101.7103175,,4.265190233,,,,1,61.12436116,,1.82834015,81.41733933,7511,R,,0,9,,TRUE,,
+30003,202002,100,1761,7,0.5,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,TRUE,TRUE,,
+30003,202003,100,6492,7,0.5,0.968230653,,70.26136364,3.686541738,,,,1,,85.37820513,0.984115327,,77.81978439,6492,R,0,,10,TRUE,,,
+30004,202001,100,64,81,0.5,,2.656680299,101.7103175,,0.030288689,,,,1,61.12436116,,1.82834015,81.41733933,64,R,,0,9,,TRUE,,
+30004,202002,100,2113,81,0.5,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,TRUE,TRUE,,
+30004,202003,100,185,81,0.5,0.968230653,,70.26136364,0.087553242,,,,1,,85.37820513,0.984115327,,77.81978439,185,R,0,,10,TRUE,,,
+30005,202001,100,844,5,0.5,,2.656680299,101.7103175,,0.941234172,,,,1,61.12436116,,1.82834015,81.41733933,844,R,,0,9,,TRUE,,
+30005,202002,100,897,5,0.5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,TRUE,TRUE,,
+30005,202003,100,280,5,0.5,0.968230653,,70.26136364,0.312578027,,,,1,,85.37820513,0.984115327,,77.81978439,280,R,0,,10,TRUE,,,
+30006,202001,100,1869,14,0.5,,2.656680299,101.7103175,,0.995885563,,,,1,61.12436116,,1.82834015,81.41733933,1869,R,,0,9,,TRUE,,
+30006,202002,100,1876,14,0.5,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,TRUE,TRUE,,
+30006,202003,100,1371,14,0.5,0.968230653,,70.26136364,0.730770871,,,,1,,85.37820513,0.984115327,,77.81978439,1371,R,0,,10,TRUE,,,
+30007,202001,100,12769,12,0.5,,2.656680299,101.7103175,,4.475816911,,,,1,61.12436116,,1.82834015,81.41733933,12769,R,,0,9,,TRUE,,
+30007,202002,100,2853,12,0.5,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,TRUE,TRUE,,
+30007,202003,100,11491,12,0.5,0.968230653,,70.26136364,4.027888195,,,,1,,85.37820513,0.984115327,,77.81978439,11491,R,0,,10,TRUE,,,
+30008,202001,100,141,162,0.5,,2.656680299,101.7103175,,0.023463069,,,,1,61.12436116,,1.82834015,81.41733933,141,R,,0,9,,TRUE,,
+30008,202002,100,6001,162,0.5,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,TRUE,TRUE,,
+30008,202003,100,433,162,0.5,0.968230653,,70.26136364,0.072138939,,,,1,,85.37820513,0.984115327,,77.81978439,433,R,0,,10,TRUE,,,
+30009,202001,100,6417,26,0.5,,2.656680299,101.7103175,,1.589639934,,,,1,61.12436116,,1.82834015,81.41733933,6417,R,,0,9,,TRUE,,
+30009,202002,100,4037,26,0.5,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,TRUE,TRUE,,
+30009,202003,100,1322,26,0.5,0.968230653,,70.26136364,0.327462695,,,,1,,85.37820513,0.984115327,,77.81978439,1322,R,0,,10,TRUE,,,
+30010,202001,100,28963,144,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,28963,R,,0,9,,,TRUE,
+30010,202002,100,21734,144,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,,,TRUE,
+30010,202003,100,10529,144,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,10529,R,0,,10,,,TRUE,
+30011,202001,100,6009,5,0.5,,2.656680299,101.7103175,,5.249464902,,,,1,61.12436116,,1.82834015,81.41733933,6009,R,,0,9,,TRUE,,
+30011,202002,100,1145,5,0.5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,TRUE,TRUE,,
+30011,202003,100,5064,5,0.5,0.968230653,,70.26136364,4.423850085,,,,1,,85.37820513,0.984115327,,77.81978439,5064,R,0,,10,TRUE,,,
+30012,202001,100,256,275,0.5,,2.656680299,101.7103175,,0.034032235,,,,1,61.12436116,,1.82834015,81.41733933,256,R,,0,9,,TRUE,,
+30012,202002,100,7522,275,0.5,0.771850199,1.13167173,74.91666667,29.38390625,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,TRUE,,,
+30012,202003,100,,275,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,7402.515486,FIR,0,,10,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
index 211fb7fe..7b0def10 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-30001,202001,100,8444,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30001,202002,100,7476,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30001,202003,100,2003,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30002,202001,100,9343,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30002,202002,100,7818,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30002,202003,100,4897,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30003,202001,100,7511,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30003,202002,100,1761,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30003,202003,100,6492,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30004,202001,100,64,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30004,202002,100,2113,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30004,202003,100,185,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30005,202001,100,844,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30005,202002,100,897,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30005,202003,100,280,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30006,202001,100,1869,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30006,202002,100,1876,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30006,202003,100,1371,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30007,202001,100,12769,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30007,202002,100,2853,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30007,202003,100,11491,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30008,202001,100,141,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30008,202002,100,6001,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30008,202003,100,433,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30009,202001,100,6417,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30009,202002,100,4037,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30009,202003,100,1322,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30010,202001,100,28963,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30010,202002,100,21734,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30010,202003,100,10529,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30011,202001,100,6009,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30011,202002,100,1145,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30011,202003,100,5064,0,0.5,0.5,0.5,0.968230653,,70.26136364
-30012,202001,100,256,0,0.5,0.5,0.5,,2.656680299,101.7103175
-30012,202002,100,7522,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667
-30012,202003,100,,0,0.5,0.5,0.5,0.968230653,,70.26136364
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,0,0.5,,2.656680299,101.7103175
+30001,202002,100,7476,0,0.5,0.771850199,1.13167173,74.91666667
+30001,202003,100,2003,0,0.5,0.968230653,,70.26136364
+30002,202001,100,9343,0,0.5,,2.656680299,101.7103175
+30002,202002,100,7818,0,0.5,0.771850199,1.13167173,74.91666667
+30002,202003,100,4897,0,0.5,0.968230653,,70.26136364
+30003,202001,100,7511,0,0.5,,2.656680299,101.7103175
+30003,202002,100,1761,0,0.5,0.771850199,1.13167173,74.91666667
+30003,202003,100,6492,0,0.5,0.968230653,,70.26136364
+30004,202001,100,64,0,0.5,,2.656680299,101.7103175
+30004,202002,100,2113,0,0.5,0.771850199,1.13167173,74.91666667
+30004,202003,100,185,0,0.5,0.968230653,,70.26136364
+30005,202001,100,844,0,0.5,,2.656680299,101.7103175
+30005,202002,100,897,0,0.5,0.771850199,1.13167173,74.91666667
+30005,202003,100,280,0,0.5,0.968230653,,70.26136364
+30006,202001,100,1869,0,0.5,,2.656680299,101.7103175
+30006,202002,100,1876,0,0.5,0.771850199,1.13167173,74.91666667
+30006,202003,100,1371,0,0.5,0.968230653,,70.26136364
+30007,202001,100,12769,0,0.5,,2.656680299,101.7103175
+30007,202002,100,2853,0,0.5,0.771850199,1.13167173,74.91666667
+30007,202003,100,11491,0,0.5,0.968230653,,70.26136364
+30008,202001,100,141,0,0.5,,2.656680299,101.7103175
+30008,202002,100,6001,0,0.5,0.771850199,1.13167173,74.91666667
+30008,202003,100,433,0,0.5,0.968230653,,70.26136364
+30009,202001,100,6417,0,0.5,,2.656680299,101.7103175
+30009,202002,100,4037,0,0.5,0.771850199,1.13167173,74.91666667
+30009,202003,100,1322,0,0.5,0.968230653,,70.26136364
+30010,202001,100,28963,0,0.5,,2.656680299,101.7103175
+30010,202002,100,21734,0,0.5,0.771850199,1.13167173,74.91666667
+30010,202003,100,10529,0,0.5,0.968230653,,70.26136364
+30011,202001,100,6009,0,0.5,,2.656680299,101.7103175
+30011,202002,100,1145,0,0.5,0.771850199,1.13167173,74.91666667
+30011,202003,100,5064,0,0.5,0.968230653,,70.26136364
+30012,202001,100,256,0,0.5,,2.656680299,101.7103175
+30012,202002,100,7522,0,0.5,0.771850199,1.13167173,74.91666667
+30012,202003,100,,0,0.5,0.968230653,,70.26136364
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index ef5a16dd..d7bc8124 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -1,37 +1,37 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_gr_trim,bi_gr_trim,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target,imp_mkr,count_fi,count_bi,count_c,default_c_link,fi_gr_trim_mkr,bi_gr_trim_mkr,filter_mkr
-30001,202001,100,8444,0,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,8444,R,,0,9,TRUE,,,TRUE
-30001,202002,100,7476,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,TRUE,,,TRUE
-30001,202003,100,2003,0,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,2003,R,0,,10,TRUE,,,TRUE
-30002,202001,100,9343,0,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,9343,R,,0,9,TRUE,,,TRUE
-30002,202002,100,7818,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,TRUE,,,TRUE
-30002,202003,100,4897,0,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,4897,R,0,,10,TRUE,,,TRUE
-30003,202001,100,7511,0,0.5,0.5,0.5,,2.656680299,101.7103175,,4.265190233,,,,1,1,,1.82834015,51.35515875,7511,R,,0,9,TRUE,,TRUE,
-30003,202002,100,1761,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,,,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,TRUE,TRUE,TRUE,
-30003,202003,100,6492,0,0.5,0.5,0.5,0.968230653,,70.26136364,3.686541738,,,,1,,1,0.984115327,,35.63068182,6492,R,0,,10,TRUE,TRUE,,
-30004,202001,100,64,0,0.5,0.5,0.5,,2.656680299,101.7103175,,0.030288689,,,,1,1,,1.82834015,51.35515875,64,R,,0,9,TRUE,,TRUE,
-30004,202002,100,2113,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,,,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,TRUE,TRUE,TRUE,
-30004,202003,100,185,0,0.5,0.5,0.5,0.968230653,,70.26136364,0.087553242,,,,1,,1,0.984115327,,35.63068182,185,R,0,,10,TRUE,TRUE,,
-30005,202001,100,844,0,0.5,0.5,0.5,,2.656680299,101.7103175,,0.941234172,,,,1,1,,1.82834015,51.35515875,844,R,,0,9,TRUE,,TRUE,
-30005,202002,100,897,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,,,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,TRUE,TRUE,TRUE,
-30005,202003,100,280,0,0.5,0.5,0.5,0.968230653,,70.26136364,0.312578027,,,,1,,1,0.984115327,,35.63068182,280,R,0,,10,TRUE,TRUE,,
-30006,202001,100,1869,0,0.5,0.5,0.5,,2.656680299,101.7103175,,0.995885563,,,,1,1,,1.82834015,51.35515875,1869,R,,0,9,TRUE,,TRUE,
-30006,202002,100,1876,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,,,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,TRUE,TRUE,TRUE,
-30006,202003,100,1371,0,0.5,0.5,0.5,0.968230653,,70.26136364,0.730770871,,,,1,,1,0.984115327,,35.63068182,1371,R,0,,10,TRUE,TRUE,,
-30007,202001,100,12769,0,0.5,0.5,0.5,,2.656680299,101.7103175,,4.475816911,,,,1,1,,1.82834015,51.35515875,12769,R,,0,9,TRUE,,TRUE,
-30007,202002,100,2853,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,,,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,TRUE,TRUE,TRUE,
-30007,202003,100,11491,0,0.5,0.5,0.5,0.968230653,,70.26136364,4.027888195,,,,1,,1,0.984115327,,35.63068182,11491,R,0,,10,TRUE,TRUE,,
-30008,202001,100,141,0,0.5,0.5,0.5,,2.656680299,101.7103175,,0.023463069,,,,1,1,,1.82834015,51.35515875,141,R,,0,9,TRUE,,TRUE,
-30008,202002,100,6001,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,,,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,TRUE,TRUE,TRUE,
-30008,202003,100,433,0,0.5,0.5,0.5,0.968230653,,70.26136364,0.072138939,,,,1,,1,0.984115327,,35.63068182,433,R,0,,10,TRUE,TRUE,,
-30009,202001,100,6417,0,0.5,0.5,0.5,,2.656680299,101.7103175,,1.589639934,,,,1,1,,1.82834015,51.35515875,6417,R,,0,9,TRUE,,TRUE,
-30009,202002,100,4037,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,,,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,TRUE,TRUE,TRUE,
-30009,202003,100,1322,0,0.5,0.5,0.5,0.968230653,,70.26136364,0.327462695,,,,1,,1,0.984115327,,35.63068182,1322,R,0,,10,TRUE,TRUE,,
-30010,202001,100,28963,0,0.5,0.5,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,28963,R,,0,9,TRUE,,,TRUE
-30010,202002,100,21734,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,TRUE,,,TRUE
-30010,202003,100,10529,0,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,10529,R,0,,10,TRUE,,,TRUE
-30011,202001,100,6009,0,0.5,0.5,0.5,,2.656680299,101.7103175,,5.249464902,,,,1,1,,1.82834015,51.35515875,6009,R,,0,9,TRUE,,TRUE,
-30011,202002,100,1145,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,,,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,TRUE,TRUE,TRUE,
-30011,202003,100,5064,0,0.5,0.5,0.5,0.968230653,,70.26136364,4.423850085,,,,1,,1,0.984115327,,35.63068182,5064,R,0,,10,TRUE,TRUE,,
-30012,202001,100,256,0,0.5,0.5,0.5,,2.656680299,101.7103175,,0.034032235,,,,1,1,,1.82834015,51.35515875,256,R,,0,9,TRUE,,TRUE,
-30012,202002,100,7522,0,0.5,0.5,0.5,0.771850199,1.13167173,74.91666667,29.38390625,,,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,TRUE,TRUE,,
-30012,202003,100,,0,0.5,0.5,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,7402.515486,FIR,0,,10,TRUE,,,
+identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+30001,202001,100,8444,0,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,8444,R,,0,9,TRUE,,,TRUE
+30001,202002,100,7476,0,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,TRUE,,,TRUE
+30001,202003,100,2003,0,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,2003,R,0,,10,TRUE,,,TRUE
+30002,202001,100,9343,0,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,9343,R,,0,9,TRUE,,,TRUE
+30002,202002,100,7818,0,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,TRUE,,,TRUE
+30002,202003,100,4897,0,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,4897,R,0,,10,TRUE,,,TRUE
+30003,202001,100,7511,0,0.5,,2.656680299,101.7103175,,4.265190233,,,,1,1,,1.82834015,51.35515875,7511,R,,0,9,TRUE,,TRUE,
+30003,202002,100,1761,0,0.5,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,,,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,TRUE,TRUE,TRUE,
+30003,202003,100,6492,0,0.5,0.968230653,,70.26136364,3.686541738,,,,1,,1,0.984115327,,35.63068182,6492,R,0,,10,TRUE,TRUE,,
+30004,202001,100,64,0,0.5,,2.656680299,101.7103175,,0.030288689,,,,1,1,,1.82834015,51.35515875,64,R,,0,9,TRUE,,TRUE,
+30004,202002,100,2113,0,0.5,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,,,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,TRUE,TRUE,TRUE,
+30004,202003,100,185,0,0.5,0.968230653,,70.26136364,0.087553242,,,,1,,1,0.984115327,,35.63068182,185,R,0,,10,TRUE,TRUE,,
+30005,202001,100,844,0,0.5,,2.656680299,101.7103175,,0.941234172,,,,1,1,,1.82834015,51.35515875,844,R,,0,9,TRUE,,TRUE,
+30005,202002,100,897,0,0.5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,,,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,TRUE,TRUE,TRUE,
+30005,202003,100,280,0,0.5,0.968230653,,70.26136364,0.312578027,,,,1,,1,0.984115327,,35.63068182,280,R,0,,10,TRUE,TRUE,,
+30006,202001,100,1869,0,0.5,,2.656680299,101.7103175,,0.995885563,,,,1,1,,1.82834015,51.35515875,1869,R,,0,9,TRUE,,TRUE,
+30006,202002,100,1876,0,0.5,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,,,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,TRUE,TRUE,TRUE,
+30006,202003,100,1371,0,0.5,0.968230653,,70.26136364,0.730770871,,,,1,,1,0.984115327,,35.63068182,1371,R,0,,10,TRUE,TRUE,,
+30007,202001,100,12769,0,0.5,,2.656680299,101.7103175,,4.475816911,,,,1,1,,1.82834015,51.35515875,12769,R,,0,9,TRUE,,TRUE,
+30007,202002,100,2853,0,0.5,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,,,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,TRUE,TRUE,TRUE,
+30007,202003,100,11491,0,0.5,0.968230653,,70.26136364,4.027888195,,,,1,,1,0.984115327,,35.63068182,11491,R,0,,10,TRUE,TRUE,,
+30008,202001,100,141,0,0.5,,2.656680299,101.7103175,,0.023463069,,,,1,1,,1.82834015,51.35515875,141,R,,0,9,TRUE,,TRUE,
+30008,202002,100,6001,0,0.5,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,,,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,TRUE,TRUE,TRUE,
+30008,202003,100,433,0,0.5,0.968230653,,70.26136364,0.072138939,,,,1,,1,0.984115327,,35.63068182,433,R,0,,10,TRUE,TRUE,,
+30009,202001,100,6417,0,0.5,,2.656680299,101.7103175,,1.589639934,,,,1,1,,1.82834015,51.35515875,6417,R,,0,9,TRUE,,TRUE,
+30009,202002,100,4037,0,0.5,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,,,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,TRUE,TRUE,TRUE,
+30009,202003,100,1322,0,0.5,0.968230653,,70.26136364,0.327462695,,,,1,,1,0.984115327,,35.63068182,1322,R,0,,10,TRUE,TRUE,,
+30010,202001,100,28963,0,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,28963,R,,0,9,TRUE,,,TRUE
+30010,202002,100,21734,0,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,TRUE,,,TRUE
+30010,202003,100,10529,0,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,10529,R,0,,10,TRUE,,,TRUE
+30011,202001,100,6009,0,0.5,,2.656680299,101.7103175,,5.249464902,,,,1,1,,1.82834015,51.35515875,6009,R,,0,9,TRUE,,TRUE,
+30011,202002,100,1145,0,0.5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,,,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,TRUE,TRUE,TRUE,
+30011,202003,100,5064,0,0.5,0.968230653,,70.26136364,4.423850085,,,,1,,1,0.984115327,,35.63068182,5064,R,0,,10,TRUE,TRUE,,
+30012,202001,100,256,0,0.5,,2.656680299,101.7103175,,0.034032235,,,,1,1,,1.82834015,51.35515875,256,R,,0,9,TRUE,,TRUE,
+30012,202002,100,7522,0,0.5,0.771850199,1.13167173,74.91666667,29.38390625,,,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,TRUE,TRUE,,
+30012,202003,100,,0,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,7402.515486,FIR,0,,10,TRUE,,,

From a28b6a0af8a42319b899855aa1a27531203a3d7d Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 17 Apr 2023 12:49:30 +0100
Subject: [PATCH 200/531] Remove known uneeded columns

---
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv |  84 +++++-----
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |  84 +++++-----
 .../28_link_columns_filtered_output.csv       |  66 ++++----
 .../29_mixed_data_filtered_output.csv         | 128 +++++++--------
 ...30_class_change_C_C_FI_filtered_output.csv |  56 +++----
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  44 +++---
 .../32_C_FI_FI_no_response_output.csv         |  32 ++--
 .../33_partial_link_columns_output.csv        |  50 +++---
 .../34_default_link_output.csv                |  42 ++---
 .../35_TB_10_R_R_FI_output.csv                |  74 ++++-----
 .../36_TB_10_BI_BI_R_output.csv               |  74 ++++-----
 .../37_TB_10_C_FI_FI_output.csv               |  74 ++++-----
 .../38_T_10_R_R_FI_output.csv                 |  74 ++++-----
 .../39_B_10_R_R_FI_output.csv                 |  74 ++++-----
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  62 ++++----
 .../41_TB_10_R_R_FI_filtered_output.csv       |  74 ++++-----
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 146 +++++++++---------
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 128 +++++++--------
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 128 +++++++--------
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |  70 ++++-----
 .../46_TB_10_BI_BI_R_filtered_output.csv      | 128 +++++++--------
 .../methodology_scenarios/47_TB_50_output.csv |  74 ++++-----
 ..._TB_50_filtered_partial_default_output.csv |  74 ++++-----
 .../49_TB_50_filtered_full_default_output.csv |  74 ++++-----
 .../50_R_R_FI_50_weight_input.csv             |  26 ++--
 .../50_R_R_FI_50_weight_output.csv            |  26 ++--
 .../51_R_R_FI_80_weight_input.csv             |  26 ++--
 .../51_R_R_FI_80_weight_output.csv            |  26 ++--
 .../52_BI_BI_R_50_weight_input.csv            |  26 ++--
 .../52_BI_BI_R_50_weight_output.csv           |  26 ++--
 .../53_C_FI_FI_50_weight_input.csv            |  26 ++--
 .../53_C_FI_FI_50_weight_output.csv           |  26 ++--
 .../54_R_R_FI-BI_R_R_50_weight_input.csv      |  50 +++---
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  50 +++---
 .../55_R_R_FI_50_weight_default_input.csv     |  26 ++--
 .../55_R_R_FI_50_weight_default_output.csv    |  26 ++--
 .../56_BI_BI_R_50_weight_default_input.csv    |  26 ++--
 .../56_BI_BI_R_50_weight_default_output.csv   |  26 ++--
 .../57_C_FI_FI_50_weight_default_input.csv    |  26 ++--
 .../57_C_FI_FI_50_weight_default_output.csv   |  26 ++--
 ...BI_R_R_50_weight_partial_default_input.csv |  50 +++---
 ...I_R_R_50_weight_partial_default_output.csv |  50 +++---
 .../59_class_change_50_weight_input.csv       |  32 ++--
 .../59_class_change_50_weight_output.csv      |  32 ++--
 .../60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv |  58 +++----
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv |  58 +++----
 ...R_R_FI-BI_R_R_50_weight_filtered_input.csv |  74 ++++-----
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv |  74 ++++-----
 .../62_CLARIFY_WITH_ELLIE_input.csv           |  44 +++---
 .../62_CLARIFY_WITH_ELLIE_output.csv          |  44 +++---
 ...63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv | 146 +++++++++---------
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 146 +++++++++---------
 .../64_TB_10_C_FI_FI_50_weight_input.csv      |  74 ++++-----
 .../64_TB_10_C_FI_FI_50_weight_output.csv     |  74 ++++-----
 ...TB_10_BI_BI_R_50_weight_filtered_input.csv | 128 +++++++--------
 ...B_10_BI_BI_R_50_weight_filtered_output.csv | 128 +++++++--------
 ..._weight_filtered_partial_default_input.csv |  74 ++++-----
 ...weight_filtered_partial_default_output.csv |  74 ++++-----
 ..._50_weight_filtered_full_default_input.csv |  74 ++++-----
 ...50_weight_filtered_full_default_output.csv |  74 ++++-----
 60 files changed, 1943 insertions(+), 1943 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 97c97885..2139738a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-140001,202001,100,3582,27,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3,
-140001,202002,100,4533,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,
-140001,202003,100,4471,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,
-140001,202004,100,3040,27,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,
-140001,202005,100,8519,27,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,
-140001,202006,100,8690,27,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,
-140001,202007,100,9979,27,1.148331415,,0.520242185,,91.63876652,9979,R,3,,4,
-140002,202001,100,5359,83,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3,
-140002,202002,100,7091,83,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,
-140002,202003,100,7098,83,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,
-140002,202004,100,7408,83,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,
-140002,202005,100,1937,83,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,
-140002,202006,100,6711,83,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,
-140002,202007,100,1052,83,0.156757562,,0.520242185,,91.63876652,1052,R,3,,4,
-140003,202001,100,439,89,,0.056404985,,0.534118956,47.13567839,439,R,,3,3,
-140003,202002,100,7783,89,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,
-140003,202003,100,897,89,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,
-140003,202004,100,8477,89,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,
-140003,202005,100,2207,89,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,
-140003,202006,100,9889,89,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,
-140003,202007,100,2528,89,0.255637577,,0.520242185,,91.63876652,2528,R,3,,4,
-140004,202001,100,,28,,,,0.534118956,47.13567839,1319.798995,C,,3,3,
-140004,202002,100,,28,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,
-140004,202003,100,,28,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,
-140004,202005,100,,28,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3,
-140004,202006,100,,28,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3,
-140004,202007,100,7243,28,,,0.520242185,,91.63876652,7243,R,3,,4,
-140005,202001,100,150000,85,,,,0.534118956,47.13567839,150000,R,,3,3,TRUE
-140005,202002,100,180000,85,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,TRUE
-140005,202003,100,120000,85,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,TRUE
-140005,202004,100,115000,85,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,TRUE
-140005,202005,100,105000,85,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,TRUE
-140005,202006,100,110000,85,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,TRUE
-140005,202007,100,160000,85,,,0.520242185,,91.63876652,160000,R,3,,4,TRUE
-140006,202001,100,,71,,,,0.534118956,47.13567839,3346.633166,C,,3,3,
-140006,202002,100,,71,,,6.772539383,3.563193687,97.52261307,22665.20492,FIC,3,3,3,
-140006,202003,100,,71,,,0.700853626,0.84489759,62.64321608,15884.99105,FIC,3,3,3,
-140006,202004,100,,71,,,3.724667279,2.674093602,95.10050251,59166.30639,FIC,3,3,3,
-140006,202005,100,,71,,,1.108042751,0.497376695,63.63316583,65558.7969,FIC,3,3,3,
-140006,202006,100,,71,,,2.988483968,3.720631427,127.0854271,195921.4135,FIC,3,3,3,
-140006,202007,100,,71,,,0.520242185,,91.63876652,101926.5842,FIC,3,,4,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+140001,202001,100,27,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3,
+140001,202002,100,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,
+140001,202003,100,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,
+140001,202004,100,27,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,
+140001,202005,100,27,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,
+140001,202006,100,27,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,
+140001,202007,100,27,1.148331415,,0.520242185,,91.63876652,9979,R,3,,4,
+140002,202001,100,83,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3,
+140002,202002,100,83,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,
+140002,202003,100,83,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,
+140002,202004,100,83,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,
+140002,202005,100,83,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,
+140002,202006,100,83,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,
+140002,202007,100,83,0.156757562,,0.520242185,,91.63876652,1052,R,3,,4,
+140003,202001,100,89,,0.056404985,,0.534118956,47.13567839,439,R,,3,3,
+140003,202002,100,89,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,
+140003,202003,100,89,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,
+140003,202004,100,89,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,
+140003,202005,100,89,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,
+140003,202006,100,89,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,
+140003,202007,100,89,0.255637577,,0.520242185,,91.63876652,2528,R,3,,4,
+140004,202001,100,28,,,,0.534118956,47.13567839,1319.798995,C,,3,3,
+140004,202002,100,28,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,
+140004,202003,100,28,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,
+140004,202005,100,28,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3,
+140004,202006,100,28,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3,
+140004,202007,100,28,,,0.520242185,,91.63876652,7243,R,3,,4,
+140005,202001,100,85,,,,0.534118956,47.13567839,150000,R,,3,3,TRUE
+140005,202002,100,85,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,TRUE
+140005,202003,100,85,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,TRUE
+140005,202004,100,85,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,TRUE
+140005,202005,100,85,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,TRUE
+140005,202006,100,85,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,TRUE
+140005,202007,100,85,,,0.520242185,,91.63876652,160000,R,3,,4,TRUE
+140006,202001,100,71,,,,0.534118956,47.13567839,3346.633166,C,,3,3,
+140006,202002,100,71,,,6.772539383,3.563193687,97.52261307,22665.20492,FIC,3,3,3,
+140006,202003,100,71,,,0.700853626,0.84489759,62.64321608,15884.99105,FIC,3,3,3,
+140006,202004,100,71,,,3.724667279,2.674093602,95.10050251,59166.30639,FIC,3,3,3,
+140006,202005,100,71,,,1.108042751,0.497376695,63.63316583,65558.7969,FIC,3,3,3,
+140006,202006,100,71,,,2.988483968,3.720631427,127.0854271,195921.4135,FIC,3,3,3,
+140006,202007,100,71,,,0.520242185,,91.63876652,101926.5842,FIC,3,,4,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index 642c1a77..ec501553 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-150001,202001,100,5891,15,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3,
-150001,202002,100,4581,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,
-150001,202003,100,4741,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,
-150001,202004,100,8092,15,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,
-150001,202005,100,2727,15,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,2727,R,3,3,4,
-150001,202006,100,2363,15,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,
-150001,202007,100,9549,15,4.041049513,,2.111448113,,152.5353535,9549,R,3,,3,
-150002,202001,100,8611,5,,0.917723543,,0.917399451,181.0909091,8611,R,,3,3,
-150002,202002,100,9383,5,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,
-150002,202003,100,1064,5,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,
-150002,202004,100,7419,5,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,
-150002,202005,100,9967,5,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,9967,R,3,3,4,
-150002,202006,100,1393,5,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,
-150002,202007,100,2593,5,1.861450108,,2.111448113,,152.5353535,2593,R,3,,3,
-150003,202001,100,3426,79,,0.548511047,,0.917399451,181.0909091,3426,R,,3,3,
-150003,202002,100,6246,79,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,
-150003,202003,100,8402,79,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,
-150003,202004,100,3891,79,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,
-150003,202005,100,5463,79,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,5463,R,3,3,4,
-150003,202006,100,6852,79,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,
-150003,202007,100,2959,79,0.431844717,,2.111448113,,152.5353535,2959,R,3,,3,
-150004,202001,100,,69,,,,0.917399451,181.0909091,13547.81819,BI,,3,3,
-150004,202002,100,,69,,,1.230132332,3.509418433,204.1414141,14767.63276,BI,3,3,3,
-150004,202003,100,4208,69,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,
-150004,202005,100,2818,69,,,1.028150423,3.035462652,124.8511905,2818,R,3,3,4,
-150004,202006,100,,69,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,
-150004,202007,100,,69,,,2.111448113,,152.5353535,4483.444383,FIR,3,,3,
-150005,202001,100,150000,85,,,,0.917399451,181.0909091,150000,R,,3,3,TRUE
-150005,202002,100,180000,85,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,TRUE
-150005,202003,100,120000,85,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,TRUE
-150005,202004,100,115000,85,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,TRUE
-150006,202005,100,105000,85,,,1.028150423,3.035462652,124.8511905,105000,R,3,3,4,TRUE
-150006,202006,100,110000,85,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,TRUE
-150006,202007,100,160000,85,,,2.111448113,,152.5353535,160000,R,3,,3,TRUE
-150007,202001,100,,71,,,,0.917399451,181.0909091,12857.45455,C,,3,3,
-150007,202002,100,,71,,,1.230132332,3.509418433,204.1414141,15816.37054,FIC,3,3,3,
-150007,202003,100,,71,,,0.831168119,0.962881641,109.6130952,13146.06295,FIC,3,3,4,
-150007,202004,100,,71,,,3.047553764,1.474655266,195.979798,40063.33364,FIC,3,3,3,
-150007,202005,100,,71,,,1.028150423,3.035462652,124.8511905,41191.13343,FIC,3,3,4,
-150007,202006,100,,71,,,0.753512367,1.033441075,107.1515152,31038.02845,FIC,3,3,3,
-150007,202007,100,,71,,,2.111448113,,152.5353535,65535.1866,FIC,3,,3,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+150001,202001,100,15,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3,
+150001,202002,100,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,
+150001,202003,100,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,
+150001,202004,100,15,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,
+150001,202005,100,15,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,2727,R,3,3,4,
+150001,202006,100,15,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,
+150001,202007,100,15,4.041049513,,2.111448113,,152.5353535,9549,R,3,,3,
+150002,202001,100,5,,0.917723543,,0.917399451,181.0909091,8611,R,,3,3,
+150002,202002,100,5,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,
+150002,202003,100,5,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,
+150002,202004,100,5,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,
+150002,202005,100,5,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,9967,R,3,3,4,
+150002,202006,100,5,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,
+150002,202007,100,5,1.861450108,,2.111448113,,152.5353535,2593,R,3,,3,
+150003,202001,100,79,,0.548511047,,0.917399451,181.0909091,3426,R,,3,3,
+150003,202002,100,79,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,
+150003,202003,100,79,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,
+150003,202004,100,79,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,
+150003,202005,100,79,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,5463,R,3,3,4,
+150003,202006,100,79,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,
+150003,202007,100,79,0.431844717,,2.111448113,,152.5353535,2959,R,3,,3,
+150004,202001,100,69,,,,0.917399451,181.0909091,13547.81819,BI,,3,3,
+150004,202002,100,69,,,1.230132332,3.509418433,204.1414141,14767.63276,BI,3,3,3,
+150004,202003,100,69,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,
+150004,202005,100,69,,,1.028150423,3.035462652,124.8511905,2818,R,3,3,4,
+150004,202006,100,69,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,
+150004,202007,100,69,,,2.111448113,,152.5353535,4483.444383,FIR,3,,3,
+150005,202001,100,85,,,,0.917399451,181.0909091,150000,R,,3,3,TRUE
+150005,202002,100,85,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,TRUE
+150005,202003,100,85,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,TRUE
+150005,202004,100,85,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,TRUE
+150006,202005,100,85,,,1.028150423,3.035462652,124.8511905,105000,R,3,3,4,TRUE
+150006,202006,100,85,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,TRUE
+150006,202007,100,85,,,2.111448113,,152.5353535,160000,R,3,,3,TRUE
+150007,202001,100,71,,,,0.917399451,181.0909091,12857.45455,C,,3,3,
+150007,202002,100,71,,,1.230132332,3.509418433,204.1414141,15816.37054,FIC,3,3,3,
+150007,202003,100,71,,,0.831168119,0.962881641,109.6130952,13146.06295,FIC,3,3,4,
+150007,202004,100,71,,,3.047553764,1.474655266,195.979798,40063.33364,FIC,3,3,3,
+150007,202005,100,71,,,1.028150423,3.035462652,124.8511905,41191.13343,FIC,3,3,4,
+150007,202006,100,71,,,0.753512367,1.033441075,107.1515152,31038.02845,FIC,3,3,3,
+150007,202007,100,71,,,2.111448113,,152.5353535,65535.1866,FIC,3,,3,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
index b6f04ace..83ba9a2f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-190001,202001,100,9261,95,,1.853682946,,0.9214,50.3694,9261,R,,,,
-190001,202002,100,4996,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,,,,
-190001,202003,100,1480,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,,,,
-190001,202004,100,4350,95,2.939189189,,1.113,,110.5473,4350,R,,,,
-190002,202001,100,2433,17,,0.562673451,,0.9214,50.3694,2433,R,,,,
-190002,202002,100,4324,17,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,,,,
-190002,202003,100,6598,17,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,,,,
-190002,202004,100,700,17,11.26857143,,1.113,,110.5473,700,R,,,,
-190003,202001,100,7888,64,,1.870080607,,0.9214,50.3694,7888,R,,,,
-190003,202002,100,4218,64,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,,,,
-190003,202003,100,7591,64,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,,,,
-190003,202004,100,4077,64,0.537083388,,1.113,,110.5473,4077,R,,,,
-190004,202001,100,2247,51,,,,0.9214,50.3694,2247,R,,,,
-190004,202002,100,,51,,,0.8521,1.5274,121.4187,1914.6687,FIR,,,,
-190004,202003,100,,51,,,0.9685,1.8795,89.3761,1854.356636,FIR,,,,
-190004,202004,100,8608,51,,,1.113,,110.5473,8608,R,,,,
-190005,202001,100,,34,,,,0.9214,50.3694,6271.13538,BI,,,,
-190005,202002,100,,34,,,0.8521,1.5274,121.4187,6806.0944,BI,,,,
-190005,202003,100,4456,34,,0.867939229,0.9685,1.8795,89.3761,4456,R,,,,
-190005,202004,100,5134,34,1.152154399,,1.113,,110.5473,5134,R,,,,
-190006,202001,100,,8,,,,0.9214,50.3694,402.9552,C,,,,
-190006,202002,100,,8,,,0.8521,1.5274,121.4187,343.3581259,FIC,,,,
-190006,202003,100,,8,,,0.9685,1.8795,89.3761,332.542345,FIC,,,,
-190006,202004,100,,8,,,1.113,,110.5473,370.1196299,FIC,,,,
-190007,202001,100,150000,85,,,,0.9214,50.3694,150000,R,,,,TRUE
-190007,202002,100,120000,85,,,0.8521,1.5274,121.4187,120000,R,,,,TRUE
-190007,202003,100,110000,85,,,0.9685,1.8795,89.3761,110000,R,,,,TRUE
-190007,202004,100,180000,85,,,1.113,,110.5473,180000,R,,,,TRUE
-190008,202001,100,,71,,,,0.9214,50.3694,3576.2274,C,,,,
-190008,202002,100,,71,,,0.8521,1.5274,121.4187,3047.303368,FIC,,,,
-190008,202003,100,,71,,,0.9685,1.8795,89.3761,2951.313311,FIC,,,,
-190008,202004,100,,71,,,1.113,,110.5473,3284.811716,FIC,,,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+190001,202001,100,95,,1.853682946,,0.9214,50.3694,9261,R,,,,
+190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,,,,
+190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,,,,
+190001,202004,100,95,2.939189189,,1.113,,110.5473,4350,R,,,,
+190002,202001,100,17,,0.562673451,,0.9214,50.3694,2433,R,,,,
+190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,,,,
+190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,,,,
+190002,202004,100,17,11.26857143,,1.113,,110.5473,700,R,,,,
+190003,202001,100,64,,1.870080607,,0.9214,50.3694,7888,R,,,,
+190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,,,,
+190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,,,,
+190003,202004,100,64,0.537083388,,1.113,,110.5473,4077,R,,,,
+190004,202001,100,51,,,,0.9214,50.3694,2247,R,,,,
+190004,202002,100,51,,,0.8521,1.5274,121.4187,1914.6687,FIR,,,,
+190004,202003,100,51,,,0.9685,1.8795,89.3761,1854.356636,FIR,,,,
+190004,202004,100,51,,,1.113,,110.5473,8608,R,,,,
+190005,202001,100,34,,,,0.9214,50.3694,6271.13538,BI,,,,
+190005,202002,100,34,,,0.8521,1.5274,121.4187,6806.0944,BI,,,,
+190005,202003,100,34,,0.867939229,0.9685,1.8795,89.3761,4456,R,,,,
+190005,202004,100,34,1.152154399,,1.113,,110.5473,5134,R,,,,
+190006,202001,100,8,,,,0.9214,50.3694,402.9552,C,,,,
+190006,202002,100,8,,,0.8521,1.5274,121.4187,343.3581259,FIC,,,,
+190006,202003,100,8,,,0.9685,1.8795,89.3761,332.542345,FIC,,,,
+190006,202004,100,8,,,1.113,,110.5473,370.1196299,FIC,,,,
+190007,202001,100,85,,,,0.9214,50.3694,150000,R,,,,TRUE
+190007,202002,100,85,,,0.8521,1.5274,121.4187,120000,R,,,,TRUE
+190007,202003,100,85,,,0.9685,1.8795,89.3761,110000,R,,,,TRUE
+190007,202004,100,85,,,1.113,,110.5473,180000,R,,,,TRUE
+190008,202001,100,71,,,,0.9214,50.3694,3576.2274,C,,,,
+190008,202002,100,71,,,0.8521,1.5274,121.4187,3047.303368,FIC,,,,
+190008,202003,100,71,,,0.9685,1.8795,89.3761,2951.313311,FIC,,,,
+190008,202004,100,71,,,1.113,,110.5473,3284.811716,FIC,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
index ce4716bd..bbf20ec2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,
-200001,202001,100,7788,56,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4,
-200001,202002,100,6169,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,
-200001,202003,100,6156,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,
-200001,202004,100,1577,56,0.25617284,,0.276010255,,42.68681319,1577,R,4,,4,
-200002,202001,100,6533,75,,0.806244601,,0.597514698,71.63436123,6533,R,,4,4,
-200002,202002,100,8103,75,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,
-200002,202003,100,5860,75,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,
-200002,202004,100,2575,75,0.439419795,,0.276010255,,42.68681319,2575,R,4,,4,
-200003,202001,100,56,10,,0.011249498,,0.597514698,71.63436123,56,R,,4,4,
-200003,202002,100,4978,10,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,
-200003,202003,100,8777,10,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,
-200003,202004,100,906,10,0.103224336,,0.276010255,,42.68681319,906,R,4,,4,
-200004,202001,100,1884,86,,0.310123457,,0.597514698,71.63436123,1884,R,,4,4,
-200004,202002,100,6075,86,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,
-200004,202003,100,,86,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,
-200004,202004,100,,86,,,0.276010255,,42.68681319,1947.413826,FIR,4,,4,
-200005,202001,100,,6,,,,0.597514698,71.63436123,429.8061674,C,,4,4,
-200005,202002,100,,6,,,23.53745347,0.984013482,111.5638767,10116.54267,FIC,4,3,4,
-200005,202003,100,,6,,,1.161413175,4.785815599,163.0494505,11749.48594,FIC,3,4,4,
-200005,202004,100,,6,,,0.276010255,,42.68681319,3242.978611,FIC,4,,4,
-200006,202001,100,,41,,,,0.597514698,71.63436123,8740.605259,BI,,4,4,
-200006,202002,100,,41,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,
-200006,202003,100,8882,41,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,
-200006,202004,100,2711,41,0.305224049,,0.276010255,,42.68681319,2711,R,4,,4,
-200007,202001,200,2439,4,,0.252093023,,2.163456777,132.3214286,2439,R,,3,4,
-200007,202002,200,9675,4,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,
-200007,202003,200,7003,4,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,
-200007,202004,200,595,4,0.084963587,,0.197315737,,99.37735849,595,R,3,,3,
-200008,202001,200,1849,4,,0.287290242,,2.163456777,132.3214286,1849,R,,3,4,
-200008,202002,200,6436,4,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,
-200008,202003,200,9709,4,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,
-200008,202004,200,2727,4,0.280873416,,0.197315737,,99.37735849,2727,R,3,,3,
-200009,202001,200,8742,45,,5.950987066,,2.163456777,132.3214286,8742,R,,3,4,
-200009,202002,200,1469,45,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,
-200009,202003,200,8602,45,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,
-200009,202004,200,1945,45,0.226110207,,0.197315737,,99.37735849,1945,R,3,,3,
-200010,202001,200,,85,,,,2.163456777,132.3214286,14038.67103,BI,,3,4,
-200010,202002,200,6489,85,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,
-200010,202003,200,1796,85,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,
-200010,202004,200,,85,,,0.197315737,,99.37735849,354.3790633,FIR,3,,3,
-200011,202001,200,,79,,,,2.163456777,132.3214286,4166.817753,BI,,3,4,
-200011,202002,200,1926,79,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,
-200011,202004,200,,79,,,0.197315737,,99.37735849,7850.811321,C,3,,3,
-200012,202001,200,5495,87,,,,2.163456777,132.3214286,5495,R,,3,4,
-200012,202002,200,,87,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5,
-200012,202003,200,,87,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4,
-200012,202004,200,,87,,,0.197315737,,99.37735849,5755.871742,FIR,3,,3,
-200013,202001,100,150000,85,,,,0.597514698,71.63436123,150000,R,,4,4,TRUE
-200013,202002,100,180000,85,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,TRUE
-200013,202003,100,120000,85,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,TRUE
-200013,202004,100,105000,85,,,0.276010255,,42.68681319,105000,R,4,,4,TRUE
-200014,202001,200,150000,96,,,,2.163456777,132.3214286,150000,R,,3,4,TRUE
-200014,202002,200,180000,96,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,TRUE
-200014,202003,200,120000,96,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,TRUE
-200014,202004,200,105000,96,,,0.197315737,,99.37735849,105000,R,3,,3,TRUE
-200015,202001,100,,71,,,,0.597514698,71.63436123,5086.039647,C,,4,4,
-200015,202002,100,,71,,,23.53745347,0.984013482,111.5638767,119712.4215,FIC,4,3,4,
-200015,202003,100,,71,,,1.161413175,4.785815599,163.0494505,139035.5836,FIC,3,4,4,
-200015,202004,100,,71,,,0.276010255,,42.68681319,38375.24688,FIC,4,,4,
-200016,202001,200,,48,,,,2.163456777,132.3214286,6351.428573,C,,3,4,
-200016,202002,200,,48,,,2.53854315,1.457061014,119.7926267,16123.3755,FIC,3,4,5,
-200016,202003,200,,48,,,2.091207548,6.584230902,196.4492754,33717.32454,FIC,4,3,4,
-200016,202004,200,,48,,,0.197315737,,99.37735849,6652.958741,FIC,3,,3,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,
+200001,202001,100,56,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4,
+200001,202002,100,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,
+200001,202003,100,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,
+200001,202004,100,56,0.25617284,,0.276010255,,42.68681319,1577,R,4,,4,
+200002,202001,100,75,,0.806244601,,0.597514698,71.63436123,6533,R,,4,4,
+200002,202002,100,75,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,
+200002,202003,100,75,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,
+200002,202004,100,75,0.439419795,,0.276010255,,42.68681319,2575,R,4,,4,
+200003,202001,100,10,,0.011249498,,0.597514698,71.63436123,56,R,,4,4,
+200003,202002,100,10,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,
+200003,202003,100,10,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,
+200003,202004,100,10,0.103224336,,0.276010255,,42.68681319,906,R,4,,4,
+200004,202001,100,86,,0.310123457,,0.597514698,71.63436123,1884,R,,4,4,
+200004,202002,100,86,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,
+200004,202003,100,86,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,
+200004,202004,100,86,,,0.276010255,,42.68681319,1947.413826,FIR,4,,4,
+200005,202001,100,6,,,,0.597514698,71.63436123,429.8061674,C,,4,4,
+200005,202002,100,6,,,23.53745347,0.984013482,111.5638767,10116.54267,FIC,4,3,4,
+200005,202003,100,6,,,1.161413175,4.785815599,163.0494505,11749.48594,FIC,3,4,4,
+200005,202004,100,6,,,0.276010255,,42.68681319,3242.978611,FIC,4,,4,
+200006,202001,100,41,,,,0.597514698,71.63436123,8740.605259,BI,,4,4,
+200006,202002,100,41,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,
+200006,202003,100,41,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,
+200006,202004,100,41,0.305224049,,0.276010255,,42.68681319,2711,R,4,,4,
+200007,202001,200,4,,0.252093023,,2.163456777,132.3214286,2439,R,,3,4,
+200007,202002,200,4,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,
+200007,202003,200,4,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,
+200007,202004,200,4,0.084963587,,0.197315737,,99.37735849,595,R,3,,3,
+200008,202001,200,4,,0.287290242,,2.163456777,132.3214286,1849,R,,3,4,
+200008,202002,200,4,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,
+200008,202003,200,4,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,
+200008,202004,200,4,0.280873416,,0.197315737,,99.37735849,2727,R,3,,3,
+200009,202001,200,45,,5.950987066,,2.163456777,132.3214286,8742,R,,3,4,
+200009,202002,200,45,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,
+200009,202003,200,45,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,
+200009,202004,200,45,0.226110207,,0.197315737,,99.37735849,1945,R,3,,3,
+200010,202001,200,85,,,,2.163456777,132.3214286,14038.67103,BI,,3,4,
+200010,202002,200,85,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,
+200010,202003,200,85,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,
+200010,202004,200,85,,,0.197315737,,99.37735849,354.3790633,FIR,3,,3,
+200011,202001,200,79,,,,2.163456777,132.3214286,4166.817753,BI,,3,4,
+200011,202002,200,79,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,
+200011,202004,200,79,,,0.197315737,,99.37735849,7850.811321,C,3,,3,
+200012,202001,200,87,,,,2.163456777,132.3214286,5495,R,,3,4,
+200012,202002,200,87,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5,
+200012,202003,200,87,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4,
+200012,202004,200,87,,,0.197315737,,99.37735849,5755.871742,FIR,3,,3,
+200013,202001,100,85,,,,0.597514698,71.63436123,150000,R,,4,4,TRUE
+200013,202002,100,85,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,TRUE
+200013,202003,100,85,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,TRUE
+200013,202004,100,85,,,0.276010255,,42.68681319,105000,R,4,,4,TRUE
+200014,202001,200,96,,,,2.163456777,132.3214286,150000,R,,3,4,TRUE
+200014,202002,200,96,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,TRUE
+200014,202003,200,96,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,TRUE
+200014,202004,200,96,,,0.197315737,,99.37735849,105000,R,3,,3,TRUE
+200015,202001,100,71,,,,0.597514698,71.63436123,5086.039647,C,,4,4,
+200015,202002,100,71,,,23.53745347,0.984013482,111.5638767,119712.4215,FIC,4,3,4,
+200015,202003,100,71,,,1.161413175,4.785815599,163.0494505,139035.5836,FIC,3,4,4,
+200015,202004,100,71,,,0.276010255,,42.68681319,38375.24688,FIC,4,,4,
+200016,202001,200,48,,,,2.163456777,132.3214286,6351.428573,C,,3,4,
+200016,202002,200,48,,,2.53854315,1.457061014,119.7926267,16123.3755,FIC,3,4,5,
+200016,202003,200,48,,,2.091207548,6.584230902,196.4492754,33717.32454,FIC,4,3,4,
+200016,202004,200,48,,,0.197315737,,99.37735849,6652.958741,FIC,3,,3,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 5998ed75..550cd441 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,
-230001,202001,1,547,10,,1.511049724,,1.087985595,15.46666667,547,R,,2,2,
-230001,202002,1,362,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,
-230001,202003,1,895,10,2.472375691,,1.42292432,,18.48333333,895,R,2,,2,
-230002,202001,1,381,50,,0.664921466,,1.087985595,15.46666667,381,R,,2,2,
-230002,202002,1,573,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,
-230002,202003,1,214,50,0.373472949,,1.42292432,,18.48333333,214,R,2,,2,
-230003,202001,2,961,12,,3.599250936,,2.241504449,72.19047619,961,R,,2,2,
-230003,202002,2,267,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,
-230003,202003,2,314,12,1.176029963,,1.174002242,,50,314,R,2,,2,
-230004,202001,2,555,9,,0.883757962,,2.241504449,72.19047619,555,R,,2,2,
-230004,202002,2,628,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,
-230004,202003,2,736,9,1.171974522,,1.174002242,,50,736,R,2,,2,
-230005,202001,1,,18,,,,1.087985595,15.46666667,278.4,C,,2,2,
-230005,202002,2,,18,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,
-230005,202003,2,,18,,,1.174002242,,50,900.6274345,FIC,2,,2,
-230006,202001,1,150000,85,,,,1.087985595,15.46666667,150000,R,,2,2,TRUE
-230006,202002,1,180000,85,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,TRUE
-230006,202003,1,120000,85,,,1.42292432,,18.48333333,120000,R,2,,2,TRUE
-230007,202001,1,,71,,,,1.087985595,15.46666667,1098.133334,C,,2,2,
-230007,202002,1,,71,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,
-230007,202003,1,,71,,,1.42292432,,18.48333333,1692.041118,FIC,2,,2,
-230008,202001,2,150000,85,,,,2.241504449,72.19047619,150000,R,,2,2,TRUE
-230008,202002,2,180000,85,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,TRUE
-230008,202003,2,120000,85,,,1.174002242,,50,120000,R,2,,2,TRUE
-230009,202001,2,,71,,,,2.241504449,72.19047619,5125.523809,C,,2,2,
-230009,202002,2,,71,,,0.70468356,0.85178967,42.61904762,3611.872365,FIC,2,2,2,
-230009,202003,2,,71,,,1.174002242,,50,4240.346254,FIC,2,,2,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+230001,202001,1,10,,1.511049724,,1.087985595,15.46666667,547,R,,2,2,
+230001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,
+230001,202003,1,10,2.472375691,,1.42292432,,18.48333333,895,R,2,,2,
+230002,202001,1,50,,0.664921466,,1.087985595,15.46666667,381,R,,2,2,
+230002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,
+230002,202003,1,50,0.373472949,,1.42292432,,18.48333333,214,R,2,,2,
+230003,202001,2,12,,3.599250936,,2.241504449,72.19047619,961,R,,2,2,
+230003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,
+230003,202003,2,12,1.176029963,,1.174002242,,50,314,R,2,,2,
+230004,202001,2,9,,0.883757962,,2.241504449,72.19047619,555,R,,2,2,
+230004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,
+230004,202003,2,9,1.171974522,,1.174002242,,50,736,R,2,,2,
+230005,202001,1,18,,,,1.087985595,15.46666667,278.4,C,,2,2,
+230005,202002,2,18,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,
+230005,202003,2,18,,,1.174002242,,50,900.6274345,FIC,2,,2,
+230006,202001,1,85,,,,1.087985595,15.46666667,150000,R,,2,2,TRUE
+230006,202002,1,85,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,TRUE
+230006,202003,1,85,,,1.42292432,,18.48333333,120000,R,2,,2,TRUE
+230007,202001,1,71,,,,1.087985595,15.46666667,1098.133334,C,,2,2,
+230007,202002,1,71,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,
+230007,202003,1,71,,,1.42292432,,18.48333333,1692.041118,FIC,2,,2,
+230008,202001,2,85,,,,2.241504449,72.19047619,150000,R,,2,2,TRUE
+230008,202002,2,85,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,TRUE
+230008,202003,2,85,,,1.174002242,,50,120000,R,2,,2,TRUE
+230009,202001,2,71,,,,2.241504449,72.19047619,5125.523809,C,,2,2,
+230009,202002,2,71,,,0.70468356,0.85178967,42.61904762,3611.872365,FIC,2,2,2,
+230009,202003,2,71,,,1.174002242,,50,4240.346254,FIC,2,,2,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index c9c52898..c2cc80b1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,9244,89,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
-110001,202002,100,8916,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
-110001,202003,100,6194,89,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
-110002,202001,100,4826,83,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
-110002,202002,100,5903,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
-110002,202003,100,4743,83,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
-110003,202001,100,7586,4,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
-110003,202002,100,1016,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
-110003,202003,100,1429,4,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
-110004,202001,100,3975,76,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
-110004,202002,100,3044,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
-110004,202003,100,,76,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
-110005,202001,200,,27,,,,1,1,9940,BI,,0,0
-110005,202002,200,,27,,,1,1,1,9940,BI,0,0,0
-110005,202003,200,9940,27,,,1,,368.1481481,9940,R,0,,1
-110006,202001,200,5325,42,,,,1,126.7857143,5325,R,,0,1
-110006,202002,200,,42,,,1,1,1,5325,FIR,0,0,0
-110006,202003,200,,42,,,1,,368.1481481,5325,FIR,0,,1
-110007,202001,200,,19,,,,1,126.7857143,2408.928571,C,,0,1
-110007,202002,200,,19,,,1,1,1,2408.928571,FIC,0,0,0
-110007,202003,200,,19,,,1,,368.1481481,2408.928571,FIC,0,,1
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,89,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
+110001,202003,100,89,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
+110002,202001,100,83,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
+110002,202003,100,83,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
+110003,202001,100,4,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
+110003,202003,100,4,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
+110004,202001,100,76,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
+110004,202003,100,76,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
+110005,202001,200,27,,,,1,1,9940,BI,,0,0
+110005,202002,200,27,,,1,1,1,9940,BI,0,0,0
+110005,202003,200,27,,,1,,368.1481481,9940,R,0,,1
+110006,202001,200,42,,,,1,126.7857143,5325,R,,0,1
+110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0
+110006,202003,200,42,,,1,,368.1481481,5325,FIR,0,,1
+110007,202001,200,19,,,,1,126.7857143,2408.928571,C,,0,1
+110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0
+110007,202003,200,19,,,1,,368.1481481,2408.928571,FIC,0,,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index 3943009a..0d51ca07 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,9244,89,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
-110001,202002,100,8916,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
-110001,202003,100,6194,89,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
-110002,202001,100,4826,83,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
-110002,202002,100,5903,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
-110002,202003,100,4743,83,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
-110003,202001,100,7586,4,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
-110003,202002,100,1016,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
-110003,202003,100,1429,4,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
-110004,202001,100,3975,76,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
-110004,202002,100,3044,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
-110004,202003,100,,76,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
-110005,202001,200,,27,,,,1,1,27,C,,0,0
-110005,202002,200,,27,,,1,1,1,27,FIC,0,0,0
-110005,202003,200,,27,,,1,,1,27,FIC,0,,0
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,89,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
+110001,202003,100,89,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
+110002,202001,100,83,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
+110002,202003,100,83,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
+110003,202001,100,4,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
+110003,202003,100,4,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
+110004,202001,100,76,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
+110004,202003,100,76,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
+110005,202001,200,27,,,,1,1,27,C,,0,0
+110005,202002,200,27,,,1,1,1,27,FIC,0,0,0
+110005,202003,200,27,,,1,,1,27,FIC,0,,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index ffa1a513..15cdd3f5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-190001,202001,100,9261,95,,1.853682946,,0.9214,96.16299559,9261,R,,,4
-190001,202002,100,4996,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,,,3
-190001,202003,100,1480,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,,,4
-190001,202004,100,4350,95,2.939189189,,1.113,,87.62068966,4350,R,,,5
-190002,202001,100,2433,17,,0.562673451,,0.9214,96.16299559,2433,R,,,4
-190002,202002,100,4324,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,,,3
-190002,202003,100,6598,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,,,4
-190002,202004,100,700,17,11.26857143,,1.113,,87.62068966,700,R,,,5
-190003,202001,100,7888,64,,1.870080607,,0.9214,96.16299559,7888,R,,,4
-190003,202002,100,4218,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,,,3
-190003,202003,100,7591,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,,,4
-190003,202004,100,4077,64,0.537083388,,1.113,,87.62068966,4077,R,,,5
-190004,202001,100,2247,51,,,,0.9214,96.16299559,2247,R,,,4
-190004,202002,100,,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,,,3
-190004,202003,100,,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,,,4
-190004,202004,100,8608,51,,,1.113,,87.62068966,8608,R,,,5
-190005,202001,100,,34,,,,0.9214,96.16299559,6271.13538,BI,,,4
-190005,202002,100,,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,,,3
-190005,202003,100,4456,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,,,4
-190005,202004,100,5134,34,1.152154399,,1.113,,87.62068966,5134,R,,,5
-190006,202001,100,,8,,,,0.9214,96.16299559,769.3039647,C,,,4
-190006,202002,100,,8,,,0.8521,1.5274,76.92045455,655.5239083,FIC,,,3
-190006,202003,100,,8,,,0.9685,1.8795,95.83333333,634.8749052,FIC,,,4
-190006,202004,100,,8,,,1.113,,87.62068966,706.6157695,FIC,,,5
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+190001,202001,100,95,,1.853682946,,0.9214,96.16299559,9261,R,,,4
+190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,,,3
+190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,,,4
+190001,202004,100,95,2.939189189,,1.113,,87.62068966,4350,R,,,5
+190002,202001,100,17,,0.562673451,,0.9214,96.16299559,2433,R,,,4
+190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,,,3
+190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,,,4
+190002,202004,100,17,11.26857143,,1.113,,87.62068966,700,R,,,5
+190003,202001,100,64,,1.870080607,,0.9214,96.16299559,7888,R,,,4
+190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,,,3
+190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,,,4
+190003,202004,100,64,0.537083388,,1.113,,87.62068966,4077,R,,,5
+190004,202001,100,51,,,,0.9214,96.16299559,2247,R,,,4
+190004,202002,100,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,,,3
+190004,202003,100,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,,,4
+190004,202004,100,51,,,1.113,,87.62068966,8608,R,,,5
+190005,202001,100,34,,,,0.9214,96.16299559,6271.13538,BI,,,4
+190005,202002,100,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,,,3
+190005,202003,100,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,,,4
+190005,202004,100,34,1.152154399,,1.113,,87.62068966,5134,R,,,5
+190006,202001,100,8,,,,0.9214,96.16299559,769.3039647,C,,,4
+190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.5239083,FIC,,,3
+190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.8749052,FIC,,,4
+190006,202004,100,8,,,1.113,,87.62068966,706.6157695,FIC,,,5
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index ef5a51db..94663014 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_construction_link
-120001,202001,100,5240,0,,2.104417671,,1.589860068,1,5240,R,,3,3,TRUE
-120001,202002,100,2490,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,TRUE
-120001,202003,100,3382,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,TRUE
-120001,202004,100,4475,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,TRUE
-120001,202005,100,1316,0,0.294078212,,5.357333441,,1,1316,R,3,,3,TRUE
-120002,202001,100,7410,0,,2.05719045,,1.589860068,1,7410,R,,3,3,TRUE
-120002,202002,100,3602,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,TRUE
-120002,202003,100,4972,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,TRUE
-120002,202004,100,8838,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,TRUE
-120002,202005,100,1535,0,0.173681828,,5.357333441,,1,1535,R,3,,3,TRUE
-120003,202001,100,4530,0,,0.607972084,,1.589860068,1,4530,R,,3,3,TRUE
-120003,202002,100,7451,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,TRUE
-120003,202003,100,7586,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,TRUE
-120003,202004,100,283,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,TRUE
-120003,202005,100,4416,0,15.60424028,,5.357333441,,1,4416,R,3,,3,TRUE
-120004,202001,100,,3,,,,1.589860068,1,3,C,,3,3,TRUE
-120004,202002,100,,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,TRUE
-120004,202003,100,,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,TRUE
-120004,202004,100,,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,TRUE
-120004,202005,100,,3,,,5.357333441,,1,18.28784061,FIC,3,,3,TRUE
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_construction_link
+120001,202001,100,0,,2.104417671,,1.589860068,1,5240,R,,3,3,TRUE
+120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,TRUE
+120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,TRUE
+120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,TRUE
+120001,202005,100,0,0.294078212,,5.357333441,,1,1316,R,3,,3,TRUE
+120002,202001,100,0,,2.05719045,,1.589860068,1,7410,R,,3,3,TRUE
+120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,TRUE
+120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,TRUE
+120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,TRUE
+120002,202005,100,0,0.173681828,,5.357333441,,1,1535,R,3,,3,TRUE
+120003,202001,100,0,,0.607972084,,1.589860068,1,4530,R,,3,3,TRUE
+120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,TRUE
+120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,TRUE
+120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,TRUE
+120003,202005,100,0,15.60424028,,5.357333441,,1,4416,R,3,,3,TRUE
+120004,202001,100,3,,,,1.589860068,1,3,C,,3,3,TRUE
+120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,TRUE
+120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,TRUE
+120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,TRUE
+120004,202005,100,3,,,5.357333441,,1,18.28784061,FIC,3,,3,TRUE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index dc5ed3a3..65c42d68 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
-30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.598925527,96.73383283,8444,R,,10,12,,
-30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,6.802558774,2.995081605,76.3675837,7476,R,10,9,12,,
-30001,202003,100,2003,51,0.267924024,,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
-30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.598925527,96.73383283,9343,R,,10,12,,
-30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,6.802558774,2.995081605,76.3675837,7818,R,10,9,12,,
-30002,202003,100,4897,72,0.626375032,,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
-30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.598925527,96.73383283,7511,R,,10,12,,
-30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,6.802558774,2.995081605,76.3675837,1761,R,10,9,12,,
-30003,202003,100,6492,7,3.686541738,,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
-30004,202001,100,64,81,,0.030288689,,0.030288689,,1.598925527,96.73383283,64,R,,10,12,,
-30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,6.802558774,2.995081605,76.3675837,2113,R,10,9,12,,
-30004,202003,100,185,81,0.087553242,,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
-30005,202001,100,844,5,,0.941234172,,0.941234172,,1.598925527,96.73383283,844,R,,10,12,,
-30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,6.802558774,2.995081605,76.3675837,897,R,10,9,12,,
-30005,202003,100,280,5,0.312578027,,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
-30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.598925527,96.73383283,1869,R,,10,12,,
-30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,6.802558774,2.995081605,76.3675837,1876,R,10,9,12,,
-30006,202003,100,1371,14,0.730770871,,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
-30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.598925527,96.73383283,12769,R,,10,12,,
-30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,6.802558774,2.995081605,76.3675837,2853,R,10,9,12,,
-30007,202003,100,11491,12,4.027888195,,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
-30008,202001,100,141,162,,0.023463069,,,,1.598925527,96.73383283,141,R,,10,12,,TRUE
-30008,202002,100,6001,162,42.62017045,13.86213906,,,6.802558774,2.995081605,76.3675837,6001,R,10,9,12,TRUE,TRUE
-30008,202003,100,433,162,0.072138939,,,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
-30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.598925527,96.73383283,6417,R,,10,12,,
-30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,6.802558774,2.995081605,76.3675837,4037,R,10,9,12,,
-30009,202003,100,1322,26,0.327462695,,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
-30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.598925527,96.73383283,28963,R,,10,12,,
-30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,6.802558774,2.995081605,76.3675837,21734,R,10,9,12,,
-30010,202003,100,10529,144,0.484426733,,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
-30011,202001,100,6009,5,,5.249464902,,,,1.598925527,96.73383283,6009,R,,10,12,,TRUE
-30011,202002,100,1145,5,0.190495606,0.226047443,,,6.802558774,2.995081605,76.3675837,1145,R,10,9,12,TRUE,TRUE
-30011,202003,100,5064,5,4.423850085,,,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
-30012,202001,100,256,275,,0.034032235,,0.034032235,,1.598925527,96.73383283,256,R,,10,12,,
-30012,202002,100,7522,275,29.38390625,,29.38390625,,6.802558774,2.995081605,76.3675837,7522,R,10,9,12,,
-30012,202003,100,,275,,,,,1.172391173,,76.13443331,8818.726403,FIR,9,,11,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,51,,1.129481006,,1.598925527,96.73383283,8444,R,,10,12,,
+30001,202002,100,51,0.885362387,3.732401398,6.802558774,2.995081605,76.3675837,7476,R,10,9,12,,
+30001,202003,100,51,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
+30002,202001,100,72,,1.195062676,,1.598925527,96.73383283,9343,R,,10,12,,
+30002,202002,100,72,0.836776196,1.596487645,6.802558774,2.995081605,76.3675837,7818,R,10,9,12,,
+30002,202003,100,72,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
+30003,202001,100,7,,4.265190233,,1.598925527,96.73383283,7511,R,,10,12,,
+30003,202002,100,7,0.234456131,0.271256932,6.802558774,2.995081605,76.3675837,1761,R,10,9,12,,
+30003,202003,100,7,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
+30004,202001,100,81,,0.030288689,,1.598925527,96.73383283,64,R,,10,12,,
+30004,202002,100,81,33.015625,11.42162162,6.802558774,2.995081605,76.3675837,2113,R,10,9,12,,
+30004,202003,100,81,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
+30005,202001,100,5,,0.941234172,,1.598925527,96.73383283,844,R,,10,12,,
+30005,202002,100,5,1.062434865,3.199201198,6.802558774,2.995081605,76.3675837,897,R,10,9,12,,
+30005,202003,100,5,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
+30006,202001,100,14,,0.995885563,,1.598925527,96.73383283,1869,R,,10,12,,
+30006,202002,100,14,1.004131435,1.368417982,6.802558774,2.995081605,76.3675837,1876,R,10,9,12,,
+30006,202003,100,14,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
+30007,202001,100,12,,4.475816911,,1.598925527,96.73383283,12769,R,,10,12,,
+30007,202002,100,12,0.223422901,0.248269056,6.802558774,2.995081605,76.3675837,2853,R,10,9,12,,
+30007,202003,100,12,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
+30008,202001,100,162,,0.023463069,,1.598925527,96.73383283,141,R,,10,12,,TRUE
+30008,202002,100,162,42.62017045,13.86213906,6.802558774,2.995081605,76.3675837,6001,R,10,9,12,TRUE,TRUE
+30008,202003,100,162,0.072138939,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
+30009,202001,100,26,,1.589639934,,1.598925527,96.73383283,6417,R,,10,12,,
+30009,202002,100,26,0.629073275,3.053782962,6.802558774,2.995081605,76.3675837,4037,R,10,9,12,,
+30009,202003,100,26,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
+30010,202001,100,144,,1.332623847,,1.598925527,96.73383283,28963,R,,10,12,,
+30010,202002,100,144,0.750399298,2.064295653,6.802558774,2.995081605,76.3675837,21734,R,10,9,12,,
+30010,202003,100,144,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
+30011,202001,100,5,,5.249464902,,1.598925527,96.73383283,6009,R,,10,12,,TRUE
+30011,202002,100,5,0.190495606,0.226047443,6.802558774,2.995081605,76.3675837,1145,R,10,9,12,TRUE,TRUE
+30011,202003,100,5,4.423850085,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
+30012,202001,100,275,,0.034032235,,1.598925527,96.73383283,256,R,,10,12,,
+30012,202002,100,275,29.38390625,,6.802558774,2.995081605,76.3675837,7522,R,10,9,12,,
+30012,202003,100,275,,,1.172391173,,76.13443331,8818.726403,FIR,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index ff10d6ea..caa7f2f0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
-30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.772802559,142.2694301,8444,R,,9,11,,
-30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.67357513,7476,R,9,9,11,,
-30001,202003,100,2003,51,0.267924024,,0.267924024,,1.172391173,,60.40866511,2003,R,9,,12,,
-30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.772802559,142.2694301,9343,R,,9,11,,
-30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.67357513,7818,R,9,9,11,,
-30002,202003,100,4897,72,0.626375032,,0.626375032,,1.172391173,,60.40866511,4897,R,9,,12,,
-30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.772802559,142.2694301,7511,R,,9,11,,
-30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.67357513,1761,R,9,9,11,,
-30003,202003,100,6492,7,3.686541738,,3.686541738,,1.172391173,,60.40866511,6492,R,9,,12,,
-30004,202001,100,64,81,,0.030288689,,0.030288689,,1.772802559,142.2694301,64,R,,9,11,,
-30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.67357513,2113,R,9,9,11,,
-30004,202003,100,185,81,0.087553242,,0.087553242,,1.172391173,,60.40866511,185,R,9,,12,,
-30005,202001,100,844,5,,0.941234172,,0.941234172,,1.772802559,142.2694301,844,R,,9,11,,
-30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.67357513,897,R,9,9,11,,
-30005,202003,100,280,5,0.312578027,,0.312578027,,1.172391173,,60.40866511,280,R,9,,12,,
-30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.772802559,142.2694301,1869,R,,9,11,,
-30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.67357513,1876,R,9,9,11,,
-30006,202003,100,1371,14,0.730770871,,0.730770871,,1.172391173,,60.40866511,1371,R,9,,12,,
-30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.772802559,142.2694301,12769,R,,9,11,,
-30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.67357513,2853,R,9,9,11,,
-30007,202003,100,11491,12,4.027888195,,4.027888195,,1.172391173,,60.40866511,11491,R,9,,12,,
-30008,202001,100,141,162,,0.023463069,,,,1.772802559,142.2694301,141,R,,9,11,,TRUE
-30008,202002,100,6001,162,42.62017045,13.86213906,,,4.293520165,2.995081605,99.67357513,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,433,162,0.072138939,,,,1.172391173,,60.40866511,433,R,9,,12,TRUE,
-30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.772802559,142.2694301,6417,R,,9,11,,
-30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.67357513,4037,R,9,9,11,,
-30009,202003,100,1322,26,0.327462695,,0.327462695,,1.172391173,,60.40866511,1322,R,9,,12,,
-30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.772802559,142.2694301,28963,R,,9,11,,
-30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.67357513,21734,R,9,9,11,,
-30010,202003,100,10529,144,0.484426733,,0.484426733,,1.172391173,,60.40866511,10529,R,9,,12,,
-30011,202001,100,6009,5,,5.249464902,,,,1.772802559,142.2694301,6009,R,,9,11,,TRUE
-30011,202002,100,1145,5,0.190495606,0.226047443,,,4.293520165,2.995081605,99.67357513,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5064,5,4.423850085,,,,1.172391173,,60.40866511,5064,R,9,,12,TRUE,
-30012,202001,100,,275,,,,,,1.772802559,142.2694301,46826.14142,BI,,9,11,,
-30012,202002,100,,275,,,,,4.293520165,2.995081605,99.67357513,26413.62467,BI,9,9,11,,
-30012,202003,100,7522,275,,,,,1.172391173,,60.40866511,8819,R,9,,12,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,51,,1.129481006,,1.772802559,142.2694301,8444,R,,9,11,,
+30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.67357513,7476,R,9,9,11,,
+30001,202003,100,51,0.267924024,,1.172391173,,60.40866511,2003,R,9,,12,,
+30002,202001,100,72,,1.195062676,,1.772802559,142.2694301,9343,R,,9,11,,
+30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.67357513,7818,R,9,9,11,,
+30002,202003,100,72,0.626375032,,1.172391173,,60.40866511,4897,R,9,,12,,
+30003,202001,100,7,,4.265190233,,1.772802559,142.2694301,7511,R,,9,11,,
+30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.67357513,1761,R,9,9,11,,
+30003,202003,100,7,3.686541738,,1.172391173,,60.40866511,6492,R,9,,12,,
+30004,202001,100,81,,0.030288689,,1.772802559,142.2694301,64,R,,9,11,,
+30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.67357513,2113,R,9,9,11,,
+30004,202003,100,81,0.087553242,,1.172391173,,60.40866511,185,R,9,,12,,
+30005,202001,100,5,,0.941234172,,1.772802559,142.2694301,844,R,,9,11,,
+30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.67357513,897,R,9,9,11,,
+30005,202003,100,5,0.312578027,,1.172391173,,60.40866511,280,R,9,,12,,
+30006,202001,100,14,,0.995885563,,1.772802559,142.2694301,1869,R,,9,11,,
+30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.67357513,1876,R,9,9,11,,
+30006,202003,100,14,0.730770871,,1.172391173,,60.40866511,1371,R,9,,12,,
+30007,202001,100,12,,4.475816911,,1.772802559,142.2694301,12769,R,,9,11,,
+30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.67357513,2853,R,9,9,11,,
+30007,202003,100,12,4.027888195,,1.172391173,,60.40866511,11491,R,9,,12,,
+30008,202001,100,162,,0.023463069,,1.772802559,142.2694301,141,R,,9,11,,TRUE
+30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.67357513,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,162,0.072138939,,1.172391173,,60.40866511,433,R,9,,12,TRUE,
+30009,202001,100,26,,1.589639934,,1.772802559,142.2694301,6417,R,,9,11,,
+30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.67357513,4037,R,9,9,11,,
+30009,202003,100,26,0.327462695,,1.172391173,,60.40866511,1322,R,9,,12,,
+30010,202001,100,144,,1.332623847,,1.772802559,142.2694301,28963,R,,9,11,,
+30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.67357513,21734,R,9,9,11,,
+30010,202003,100,144,0.484426733,,1.172391173,,60.40866511,10529,R,9,,12,,
+30011,202001,100,5,,5.249464902,,1.772802559,142.2694301,6009,R,,9,11,,TRUE
+30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.67357513,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5,4.423850085,,1.172391173,,60.40866511,5064,R,9,,12,TRUE,
+30012,202001,100,275,,,,1.772802559,142.2694301,46826.14142,BI,,9,11,,
+30012,202002,100,275,,,4.293520165,2.995081605,99.67357513,26413.62467,BI,9,9,11,,
+30012,202003,100,275,,,1.172391173,,60.40866511,8819,R,9,,12,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index 9d1d12f4..c9139879 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
-30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.772802559,142.3186593,8444,R,,9,11,,
-30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,7476,R,9,9,11,,
-30001,202003,100,2003,51,0.267924024,,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
-30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.772802559,142.3186593,9343,R,,9,11,,
-30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,7818,R,9,9,11,,
-30002,202003,100,4897,72,0.626375032,,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
-30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.772802559,142.3186593,7511,R,,9,11,,
-30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,1761,R,9,9,11,,
-30003,202003,100,6492,7,3.686541738,,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
-30004,202001,100,64,81,,0.030288689,,0.030288689,,1.772802559,142.3186593,64,R,,9,11,,
-30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2113,R,9,9,11,,
-30004,202003,100,185,81,0.087553242,,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
-30005,202001,100,844,5,,0.941234172,,0.941234172,,1.772802559,142.3186593,844,R,,9,11,,
-30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,897,R,9,9,11,,
-30005,202003,100,280,5,0.312578027,,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
-30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.772802559,142.3186593,1869,R,,9,11,,
-30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,1876,R,9,9,11,,
-30006,202003,100,1371,14,0.730770871,,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
-30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.772802559,142.3186593,12769,R,,9,11,,
-30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2853,R,9,9,11,,
-30007,202003,100,11491,12,4.027888195,,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
-30008,202001,100,141,162,,0.023463069,,,,1.772802559,142.3186593,141,R,,9,11,,TRUE
-30008,202002,100,6001,162,42.62017045,13.86213906,,,4.293520165,2.995081605,99.70786109,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,433,162,0.072138939,,,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
-30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.772802559,142.3186593,6417,R,,9,11,,
-30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,4037,R,9,9,11,,
-30009,202003,100,1322,26,0.327462695,,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
-30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.772802559,142.3186593,28963,R,,9,11,,
-30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,21734,R,9,9,11,,
-30010,202003,100,10529,144,0.484426733,,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
-30011,202001,100,6009,5,,5.249464902,,,,1.772802559,142.3186593,6009,R,,9,11,,TRUE
-30011,202002,100,1145,5,0.190495606,0.226047443,,,4.293520165,2.995081605,99.70786109,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5064,5,4.423850085,,,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
-30012,202001,100,,275,,,,,,1.772802559,142.3186593,39195,C,,9,11,,
-30012,202002,100,,275,,,,,4.293520165,2.995081605,99.70786109,168283,FIC,9,9,11,,
-30012,202003,100,,275,,,,,1.172391173,,76.13443331,197293,FIC,9,,11,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,51,,1.129481006,,1.772802559,142.3186593,8444,R,,9,11,,
+30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,7476,R,9,9,11,,
+30001,202003,100,51,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
+30002,202001,100,72,,1.195062676,,1.772802559,142.3186593,9343,R,,9,11,,
+30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,7818,R,9,9,11,,
+30002,202003,100,72,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
+30003,202001,100,7,,4.265190233,,1.772802559,142.3186593,7511,R,,9,11,,
+30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,1761,R,9,9,11,,
+30003,202003,100,7,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
+30004,202001,100,81,,0.030288689,,1.772802559,142.3186593,64,R,,9,11,,
+30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2113,R,9,9,11,,
+30004,202003,100,81,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
+30005,202001,100,5,,0.941234172,,1.772802559,142.3186593,844,R,,9,11,,
+30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,897,R,9,9,11,,
+30005,202003,100,5,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
+30006,202001,100,14,,0.995885563,,1.772802559,142.3186593,1869,R,,9,11,,
+30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,1876,R,9,9,11,,
+30006,202003,100,14,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
+30007,202001,100,12,,4.475816911,,1.772802559,142.3186593,12769,R,,9,11,,
+30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2853,R,9,9,11,,
+30007,202003,100,12,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
+30008,202001,100,162,,0.023463069,,1.772802559,142.3186593,141,R,,9,11,,TRUE
+30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,162,0.072138939,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
+30009,202001,100,26,,1.589639934,,1.772802559,142.3186593,6417,R,,9,11,,
+30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,4037,R,9,9,11,,
+30009,202003,100,26,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
+30010,202001,100,144,,1.332623847,,1.772802559,142.3186593,28963,R,,9,11,,
+30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,21734,R,9,9,11,,
+30010,202003,100,144,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
+30011,202001,100,5,,5.249464902,,1.772802559,142.3186593,6009,R,,9,11,,TRUE
+30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5,4.423850085,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
+30012,202001,100,275,,,,1.772802559,142.3186593,39195,C,,9,11,,
+30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,168283,FIC,9,9,11,,
+30012,202003,100,275,,,1.172391173,,76.13443331,197293,FIC,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index 5da3d0f4..bf838ad2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
-30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.455701667,96.73383283,8444,R,,11,12,,
-30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,6.201462122,2.718178189,76.3675837,7476,R,11,10,12,,
-30001,202003,100,2003,51,0.267924024,,0.267924024,,1.06236595,,76.13443331,2003,R,10,,11,,
-30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.455701667,96.73383283,9343,R,,11,12,,
-30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,6.201462122,2.718178189,76.3675837,7818,R,11,10,12,,
-30002,202003,100,4897,72,0.626375032,,0.626375032,,1.06236595,,76.13443331,4897,R,10,,11,,
-30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.455701667,96.73383283,7511,R,,11,12,,
-30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,6.201462122,2.718178189,76.3675837,1761,R,11,10,12,,
-30003,202003,100,6492,7,3.686541738,,3.686541738,,1.06236595,,76.13443331,6492,R,10,,11,,
-30004,202001,100,64,81,,0.030288689,,0.030288689,,1.455701667,96.73383283,64,R,,11,12,,
-30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,6.201462122,2.718178189,76.3675837,2113,R,11,10,12,,
-30004,202003,100,185,81,0.087553242,,0.087553242,,1.06236595,,76.13443331,185,R,10,,11,,
-30005,202001,100,844,5,,0.941234172,,0.941234172,,1.455701667,96.73383283,844,R,,11,12,,
-30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,6.201462122,2.718178189,76.3675837,897,R,11,10,12,,
-30005,202003,100,280,5,0.312578027,,0.312578027,,1.06236595,,76.13443331,280,R,10,,11,,
-30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.455701667,96.73383283,1869,R,,11,12,,
-30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,6.201462122,2.718178189,76.3675837,1876,R,11,10,12,,
-30006,202003,100,1371,14,0.730770871,,0.730770871,,1.06236595,,76.13443331,1371,R,10,,11,,
-30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.455701667,96.73383283,12769,R,,11,12,,
-30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,6.201462122,2.718178189,76.3675837,2853,R,11,10,12,,
-30007,202003,100,11491,12,4.027888195,,4.027888195,,1.06236595,,76.13443331,11491,R,10,,11,,
-30008,202001,100,141,162,,0.023463069,,0.023463069,,1.455701667,96.73383283,141,R,,11,12,,
-30008,202002,100,6001,162,42.62017045,13.86213906,,,6.201462122,2.718178189,76.3675837,6001,R,11,10,12,TRUE,TRUE
-30008,202003,100,433,162,0.072138939,,0.072138939,,1.06236595,,76.13443331,433,R,10,,11,,
-30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.455701667,96.73383283,6417,R,,11,12,,
-30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,6.201462122,2.718178189,76.3675837,4037,R,11,10,12,,
-30009,202003,100,1322,26,0.327462695,,0.327462695,,1.06236595,,76.13443331,1322,R,10,,11,,
-30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.455701667,96.73383283,28963,R,,11,12,,
-30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,6.201462122,2.718178189,76.3675837,21734,R,11,10,12,,
-30010,202003,100,10529,144,0.484426733,,0.484426733,,1.06236595,,76.13443331,10529,R,10,,11,,
-30011,202001,100,6009,5,,5.249464902,,,,1.455701667,96.73383283,6009,R,,11,12,,TRUE
-30011,202002,100,1145,5,0.190495606,0.226047443,0.190495606,0.226047443,6.201462122,2.718178189,76.3675837,1145,R,11,10,12,,
-30011,202003,100,5064,5,4.423850085,,,,1.06236595,,76.13443331,5064,R,10,,11,TRUE,
-30012,202001,100,256,275,,0.034032235,,0.034032235,,1.455701667,96.73383283,256,R,,11,12,,
-30012,202002,100,7522,275,29.38390625,,29.38390625,,6.201462122,2.718178189,76.3675837,7522,R,11,10,12,,
-30012,202003,100,,275,,,,,1.06236595,,76.13443331,7991.116673,FIR,10,,11,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,51,,1.129481006,,1.455701667,96.73383283,8444,R,,11,12,,
+30001,202002,100,51,0.885362387,3.732401398,6.201462122,2.718178189,76.3675837,7476,R,11,10,12,,
+30001,202003,100,51,0.267924024,,1.06236595,,76.13443331,2003,R,10,,11,,
+30002,202001,100,72,,1.195062676,,1.455701667,96.73383283,9343,R,,11,12,,
+30002,202002,100,72,0.836776196,1.596487645,6.201462122,2.718178189,76.3675837,7818,R,11,10,12,,
+30002,202003,100,72,0.626375032,,1.06236595,,76.13443331,4897,R,10,,11,,
+30003,202001,100,7,,4.265190233,,1.455701667,96.73383283,7511,R,,11,12,,
+30003,202002,100,7,0.234456131,0.271256932,6.201462122,2.718178189,76.3675837,1761,R,11,10,12,,
+30003,202003,100,7,3.686541738,,1.06236595,,76.13443331,6492,R,10,,11,,
+30004,202001,100,81,,0.030288689,,1.455701667,96.73383283,64,R,,11,12,,
+30004,202002,100,81,33.015625,11.42162162,6.201462122,2.718178189,76.3675837,2113,R,11,10,12,,
+30004,202003,100,81,0.087553242,,1.06236595,,76.13443331,185,R,10,,11,,
+30005,202001,100,5,,0.941234172,,1.455701667,96.73383283,844,R,,11,12,,
+30005,202002,100,5,1.062434865,3.199201198,6.201462122,2.718178189,76.3675837,897,R,11,10,12,,
+30005,202003,100,5,0.312578027,,1.06236595,,76.13443331,280,R,10,,11,,
+30006,202001,100,14,,0.995885563,,1.455701667,96.73383283,1869,R,,11,12,,
+30006,202002,100,14,1.004131435,1.368417982,6.201462122,2.718178189,76.3675837,1876,R,11,10,12,,
+30006,202003,100,14,0.730770871,,1.06236595,,76.13443331,1371,R,10,,11,,
+30007,202001,100,12,,4.475816911,,1.455701667,96.73383283,12769,R,,11,12,,
+30007,202002,100,12,0.223422901,0.248269056,6.201462122,2.718178189,76.3675837,2853,R,11,10,12,,
+30007,202003,100,12,4.027888195,,1.06236595,,76.13443331,11491,R,10,,11,,
+30008,202001,100,162,,0.023463069,,1.455701667,96.73383283,141,R,,11,12,,
+30008,202002,100,162,42.62017045,13.86213906,6.201462122,2.718178189,76.3675837,6001,R,11,10,12,TRUE,TRUE
+30008,202003,100,162,0.072138939,,1.06236595,,76.13443331,433,R,10,,11,,
+30009,202001,100,26,,1.589639934,,1.455701667,96.73383283,6417,R,,11,12,,
+30009,202002,100,26,0.629073275,3.053782962,6.201462122,2.718178189,76.3675837,4037,R,11,10,12,,
+30009,202003,100,26,0.327462695,,1.06236595,,76.13443331,1322,R,10,,11,,
+30010,202001,100,144,,1.332623847,,1.455701667,96.73383283,28963,R,,11,12,,
+30010,202002,100,144,0.750399298,2.064295653,6.201462122,2.718178189,76.3675837,21734,R,11,10,12,,
+30010,202003,100,144,0.484426733,,1.06236595,,76.13443331,10529,R,10,,11,,
+30011,202001,100,5,,5.249464902,,1.455701667,96.73383283,6009,R,,11,12,,TRUE
+30011,202002,100,5,0.190495606,0.226047443,6.201462122,2.718178189,76.3675837,1145,R,11,10,12,,
+30011,202003,100,5,4.423850085,,1.06236595,,76.13443331,5064,R,10,,11,TRUE,
+30012,202001,100,275,,0.034032235,,1.455701667,96.73383283,256,R,,11,12,,
+30012,202002,100,275,29.38390625,,6.201462122,2.718178189,76.3675837,7522,R,11,10,12,,
+30012,202003,100,275,,,1.06236595,,76.13443331,7991.116673,FIR,10,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index ca02b876..bf4f0e24 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
-30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.930792743,96.75644028,8444,R,,11,12,,
-30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,10.05870529,4.081787351,76.3852459,7476,R,11,10,12,,
-30001,202003,100,2003,51,0.267924024,,0.267924024,,1.497537064,,76.10880829,2003,R,10,,11,,
-30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.930792743,96.75644028,9343,R,,11,12,,
-30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,10.05870529,4.081787351,76.3852459,7818,R,11,10,12,,
-30002,202003,100,4897,72,0.626375032,,0.626375032,,1.497537064,,76.10880829,4897,R,10,,11,,
-30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.930792743,96.75644028,7511,R,,11,12,,
-30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,10.05870529,4.081787351,76.3852459,1761,R,11,10,12,,
-30003,202003,100,6492,7,3.686541738,,3.686541738,,1.497537064,,76.10880829,6492,R,10,,11,,
-30004,202001,100,64,81,,0.030288689,,0.030288689,,1.930792743,96.75644028,64,R,,11,12,,
-30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,10.05870529,4.081787351,76.3852459,2113,R,11,10,12,,
-30004,202003,100,185,81,0.087553242,,0.087553242,,1.497537064,,76.10880829,185,R,10,,11,,
-30005,202001,100,844,5,,0.941234172,,0.941234172,,1.930792743,96.75644028,844,R,,11,12,,
-30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,10.05870529,4.081787351,76.3852459,897,R,11,10,12,,
-30005,202003,100,280,5,0.312578027,,0.312578027,,1.497537064,,76.10880829,280,R,10,,11,,
-30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.930792743,96.75644028,1869,R,,11,12,,
-30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,10.05870529,4.081787351,76.3852459,1876,R,11,10,12,,
-30006,202003,100,1371,14,0.730770871,,0.730770871,,1.497537064,,76.10880829,1371,R,10,,11,,
-30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.930792743,96.75644028,12769,R,,11,12,,
-30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,10.05870529,4.081787351,76.3852459,2853,R,11,10,12,,
-30007,202003,100,11491,12,4.027888195,,4.027888195,,1.497537064,,76.10880829,11491,R,10,,11,,
-30008,202001,100,141,162,,0.023463069,,,,1.930792743,96.75644028,141,R,,11,12,,TRUE
-30008,202002,100,6001,162,42.62017045,13.86213906,42.62017045,13.86213906,10.05870529,4.081787351,76.3852459,6001,R,11,10,12,,
-30008,202003,100,433,162,0.072138939,,,,1.497537064,,76.10880829,433,R,10,,11,TRUE,
-30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.930792743,96.75644028,6417,R,,11,12,,
-30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,10.05870529,4.081787351,76.3852459,4037,R,11,10,12,,
-30009,202003,100,1322,26,0.327462695,,0.327462695,,1.497537064,,76.10880829,1322,R,10,,11,,
-30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.930792743,96.75644028,28963,R,,11,12,,
-30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,10.05870529,4.081787351,76.3852459,21734,R,11,10,12,,
-30010,202003,100,10529,144,0.484426733,,0.484426733,,1.497537064,,76.10880829,10529,R,10,,11,,
-30011,202001,100,6009,5,,5.249464902,,5.249464902,,1.930792743,96.75644028,6009,R,,11,12,,
-30011,202002,100,1145,5,0.190495606,0.226047443,,,10.05870529,4.081787351,76.3852459,1145,R,11,10,12,TRUE,TRUE
-30011,202003,100,5064,5,4.423850085,,4.423850085,,1.497537064,,76.10880829,5064,R,10,,11,,
-30012,202001,100,256,275,,0.034032235,,0.034032235,,1.930792743,96.75644028,256,R,,11,12,,
-30012,202002,100,7522,275,29.38390625,,29.38390625,,10.05870529,4.081787351,76.3852459,7522,R,11,10,12,,
-30012,202003,100,,275,,,,,1.497537064,,76.10880829,11264.4738,FIR,10,,11,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,51,,1.129481006,,1.930792743,96.75644028,8444,R,,11,12,,
+30001,202002,100,51,0.885362387,3.732401398,10.05870529,4.081787351,76.3852459,7476,R,11,10,12,,
+30001,202003,100,51,0.267924024,,1.497537064,,76.10880829,2003,R,10,,11,,
+30002,202001,100,72,,1.195062676,,1.930792743,96.75644028,9343,R,,11,12,,
+30002,202002,100,72,0.836776196,1.596487645,10.05870529,4.081787351,76.3852459,7818,R,11,10,12,,
+30002,202003,100,72,0.626375032,,1.497537064,,76.10880829,4897,R,10,,11,,
+30003,202001,100,7,,4.265190233,,1.930792743,96.75644028,7511,R,,11,12,,
+30003,202002,100,7,0.234456131,0.271256932,10.05870529,4.081787351,76.3852459,1761,R,11,10,12,,
+30003,202003,100,7,3.686541738,,1.497537064,,76.10880829,6492,R,10,,11,,
+30004,202001,100,81,,0.030288689,,1.930792743,96.75644028,64,R,,11,12,,
+30004,202002,100,81,33.015625,11.42162162,10.05870529,4.081787351,76.3852459,2113,R,11,10,12,,
+30004,202003,100,81,0.087553242,,1.497537064,,76.10880829,185,R,10,,11,,
+30005,202001,100,5,,0.941234172,,1.930792743,96.75644028,844,R,,11,12,,
+30005,202002,100,5,1.062434865,3.199201198,10.05870529,4.081787351,76.3852459,897,R,11,10,12,,
+30005,202003,100,5,0.312578027,,1.497537064,,76.10880829,280,R,10,,11,,
+30006,202001,100,14,,0.995885563,,1.930792743,96.75644028,1869,R,,11,12,,
+30006,202002,100,14,1.004131435,1.368417982,10.05870529,4.081787351,76.3852459,1876,R,11,10,12,,
+30006,202003,100,14,0.730770871,,1.497537064,,76.10880829,1371,R,10,,11,,
+30007,202001,100,12,,4.475816911,,1.930792743,96.75644028,12769,R,,11,12,,
+30007,202002,100,12,0.223422901,0.248269056,10.05870529,4.081787351,76.3852459,2853,R,11,10,12,,
+30007,202003,100,12,4.027888195,,1.497537064,,76.10880829,11491,R,10,,11,,
+30008,202001,100,162,,0.023463069,,1.930792743,96.75644028,141,R,,11,12,,TRUE
+30008,202002,100,162,42.62017045,13.86213906,10.05870529,4.081787351,76.3852459,6001,R,11,10,12,,
+30008,202003,100,162,0.072138939,,1.497537064,,76.10880829,433,R,10,,11,TRUE,
+30009,202001,100,26,,1.589639934,,1.930792743,96.75644028,6417,R,,11,12,,
+30009,202002,100,26,0.629073275,3.053782962,10.05870529,4.081787351,76.3852459,4037,R,11,10,12,,
+30009,202003,100,26,0.327462695,,1.497537064,,76.10880829,1322,R,10,,11,,
+30010,202001,100,144,,1.332623847,,1.930792743,96.75644028,28963,R,,11,12,,
+30010,202002,100,144,0.750399298,2.064295653,10.05870529,4.081787351,76.3852459,21734,R,11,10,12,,
+30010,202003,100,144,0.484426733,,1.497537064,,76.10880829,10529,R,10,,11,,
+30011,202001,100,5,,5.249464902,,1.930792743,96.75644028,6009,R,,11,12,,
+30011,202002,100,5,0.190495606,0.226047443,10.05870529,4.081787351,76.3852459,1145,R,11,10,12,TRUE,TRUE
+30011,202003,100,5,4.423850085,,1.497537064,,76.10880829,5064,R,10,,11,,
+30012,202001,100,275,,0.034032235,,1.930792743,96.75644028,256,R,,11,12,,
+30012,202002,100,275,29.38390625,,10.05870529,4.081787351,76.3852459,7522,R,11,10,12,,
+30012,202003,100,275,,,1.497537064,,76.10880829,11264.4738,FIR,10,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index 9ef86f5f..9cb900d0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.59786861,133.0400697,8444,R,,10,10
-30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,8.126185194,4.305953095,98.54703833,7476,R,10,9,10
-30001,202003,100,2003,51,0.267924024,,0.267924024,,1.126581418,,66.21860465,2003,R,9,,10
-30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.59786861,133.0400697,9343,R,,10,10
-30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,8.126185194,4.305953095,98.54703833,7818,R,10,9,10
-30002,202003,100,4897,72,0.626375032,,0.626375032,,1.126581418,,66.21860465,4897,R,9,,10
-30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.59786861,133.0400697,7511,R,,10,10
-30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,8.126185194,4.305953095,98.54703833,1761,R,10,9,10
-30003,202003,100,6492,7,3.686541738,,3.686541738,,1.126581418,,66.21860465,6492,R,9,,10
-30004,202001,100,64,81,,0.030288689,,0.030288689,,1.59786861,133.0400697,64,R,,10,10
-30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,8.126185194,4.305953095,98.54703833,2113,R,10,9,10
-30004,202003,100,185,81,0.087553242,,0.087553242,,1.126581418,,66.21860465,185,R,9,,10
-30005,202001,100,844,5,,0.941234172,,0.941234172,,1.59786861,133.0400697,844,R,,10,10
-30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,8.126185194,4.305953095,98.54703833,897,R,10,9,10
-30005,202003,100,280,5,0.312578027,,0.312578027,,1.126581418,,66.21860465,280,R,9,,10
-30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.59786861,133.0400697,1869,R,,10,10
-30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,8.126185194,4.305953095,98.54703833,1876,R,10,9,10
-30006,202003,100,1371,14,0.730770871,,0.730770871,,1.126581418,,66.21860465,1371,R,9,,10
-30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.59786861,133.0400697,12769,R,,10,10
-30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,8.126185194,4.305953095,98.54703833,2853,R,10,9,10
-30007,202003,100,11491,12,4.027888195,,4.027888195,,1.126581418,,66.21860465,11491,R,9,,10
-30008,202001,100,141,162,,0.023463069,,0.023463069,,1.59786861,133.0400697,141,R,,10,10
-30008,202002,100,6001,162,42.62017045,13.86213906,42.62017045,13.86213906,8.126185194,4.305953095,98.54703833,6001,R,10,9,10
-30008,202003,100,433,162,0.072138939,,0.072138939,,1.126581418,,66.21860465,433,R,9,,10
-30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.59786861,133.0400697,6417,R,,10,10
-30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,8.126185194,4.305953095,98.54703833,4037,R,10,9,10
-30009,202003,100,1322,26,0.327462695,,0.327462695,,1.126581418,,66.21860465,1322,R,9,,10
-30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.59786861,133.0400697,28963,R,,10,10
-30010,202002,100,21734,144,0.750399298,,0.750399298,,8.126185194,4.305953095,98.54703833,21734,R,10,9,10
-30010,202003,100,,144,,,,,1.126581418,,66.21860465,24485.12054,FIR,9,,10
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,51,,1.129481006,,1.59786861,133.0400697,8444,R,,10,10
+30001,202002,100,51,0.885362387,3.732401398,8.126185194,4.305953095,98.54703833,7476,R,10,9,10
+30001,202003,100,51,0.267924024,,1.126581418,,66.21860465,2003,R,9,,10
+30002,202001,100,72,,1.195062676,,1.59786861,133.0400697,9343,R,,10,10
+30002,202002,100,72,0.836776196,1.596487645,8.126185194,4.305953095,98.54703833,7818,R,10,9,10
+30002,202003,100,72,0.626375032,,1.126581418,,66.21860465,4897,R,9,,10
+30003,202001,100,7,,4.265190233,,1.59786861,133.0400697,7511,R,,10,10
+30003,202002,100,7,0.234456131,0.271256932,8.126185194,4.305953095,98.54703833,1761,R,10,9,10
+30003,202003,100,7,3.686541738,,1.126581418,,66.21860465,6492,R,9,,10
+30004,202001,100,81,,0.030288689,,1.59786861,133.0400697,64,R,,10,10
+30004,202002,100,81,33.015625,11.42162162,8.126185194,4.305953095,98.54703833,2113,R,10,9,10
+30004,202003,100,81,0.087553242,,1.126581418,,66.21860465,185,R,9,,10
+30005,202001,100,5,,0.941234172,,1.59786861,133.0400697,844,R,,10,10
+30005,202002,100,5,1.062434865,3.199201198,8.126185194,4.305953095,98.54703833,897,R,10,9,10
+30005,202003,100,5,0.312578027,,1.126581418,,66.21860465,280,R,9,,10
+30006,202001,100,14,,0.995885563,,1.59786861,133.0400697,1869,R,,10,10
+30006,202002,100,14,1.004131435,1.368417982,8.126185194,4.305953095,98.54703833,1876,R,10,9,10
+30006,202003,100,14,0.730770871,,1.126581418,,66.21860465,1371,R,9,,10
+30007,202001,100,12,,4.475816911,,1.59786861,133.0400697,12769,R,,10,10
+30007,202002,100,12,0.223422901,0.248269056,8.126185194,4.305953095,98.54703833,2853,R,10,9,10
+30007,202003,100,12,4.027888195,,1.126581418,,66.21860465,11491,R,9,,10
+30008,202001,100,162,,0.023463069,,1.59786861,133.0400697,141,R,,10,10
+30008,202002,100,162,42.62017045,13.86213906,8.126185194,4.305953095,98.54703833,6001,R,10,9,10
+30008,202003,100,162,0.072138939,,1.126581418,,66.21860465,433,R,9,,10
+30009,202001,100,26,,1.589639934,,1.59786861,133.0400697,6417,R,,10,10
+30009,202002,100,26,0.629073275,3.053782962,8.126185194,4.305953095,98.54703833,4037,R,10,9,10
+30009,202003,100,26,0.327462695,,1.126581418,,66.21860465,1322,R,9,,10
+30010,202001,100,144,,1.332623847,,1.59786861,133.0400697,28963,R,,10,10
+30010,202002,100,144,0.750399298,,8.126185194,4.305953095,98.54703833,21734,R,10,9,10
+30010,202003,100,144,,,1.126581418,,66.21860465,24485.12054,FIR,9,,10
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
index 3350b373..72a90977 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
-30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.773218509,96.73383283,8444,R,,9,12,,,
-30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,3.88999586,1.941764103,81.65588616,7476,R,9,8,11,,,
-30001,202003,100,2003,51,0.267924024,,0.267924024,,1.307995914,,76.13443331,2003,R,8,,11,,,
-30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.773218509,96.73383283,9343,R,,9,12,,,
-30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,3.88999586,1.941764103,81.65588616,7818,R,9,8,11,,,
-30002,202003,100,4897,72,0.626375032,,0.626375032,,1.307995914,,76.13443331,4897,R,8,,11,,,
-30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.773218509,96.73383283,7511,R,,9,12,,,
-30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,3.88999586,1.941764103,81.65588616,1761,R,9,8,11,,,
-30003,202003,100,6492,7,3.686541738,,3.686541738,,1.307995914,,76.13443331,6492,R,8,,11,,,
-30004,202001,100,64,81,,,,,,1.773218509,96.73383283,64,R,,9,12,,,
-30004,202002,100,2113,81,,,,,3.88999586,1.941764103,81.65588616,2113,R,9,8,11,,,TRUE
-30004,202003,100,185,81,,,,,1.307995914,,76.13443331,185,R,8,,11,,,
-30005,202001,100,844,5,,0.941234172,,0.941234172,,1.773218509,96.73383283,844,R,,9,12,,,
-30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,3.88999586,1.941764103,81.65588616,897,R,9,8,11,,,
-30005,202003,100,280,5,0.312578027,,0.312578027,,1.307995914,,76.13443331,280,R,8,,11,,,
-30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.773218509,96.73383283,1869,R,,9,12,,,
-30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,3.88999586,1.941764103,81.65588616,1876,R,9,8,11,,,
-30006,202003,100,1371,14,0.730770871,,0.730770871,,1.307995914,,76.13443331,1371,R,8,,11,,,
-30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.773218509,96.73383283,12769,R,,9,12,,,
-30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,3.88999586,1.941764103,81.65588616,2853,R,9,8,11,,,
-30007,202003,100,11491,12,4.027888195,,4.027888195,,1.307995914,,76.13443331,11491,R,8,,11,,,
-30008,202001,100,141,162,,0.023463069,,,,1.773218509,96.73383283,141,R,,9,12,,TRUE,
-30008,202002,100,6001,162,42.62017045,13.86213906,,,3.88999586,1.941764103,81.65588616,6001,R,9,8,11,TRUE,TRUE,
-30008,202003,100,433,162,0.072138939,,,,1.307995914,,76.13443331,433,R,8,,11,TRUE,,
-30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.773218509,96.73383283,6417,R,,9,12,,,
-30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,3.88999586,1.941764103,81.65588616,4037,R,9,8,11,,,
-30009,202003,100,1322,26,0.327462695,,0.327462695,,1.307995914,,76.13443331,1322,R,8,,11,,,
-30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.773218509,96.73383283,28963,R,,9,12,,,
-30010,202002,100,21734,144,0.750399298,2.064295653,0.750399298,2.064295653,3.88999586,1.941764103,81.65588616,21734,R,9,8,11,,,
-30010,202003,100,10529,144,0.484426733,,0.484426733,,1.307995914,,76.13443331,10529,R,8,,11,,,
-30011,202001,100,6009,5,,5.249464902,,,,1.773218509,96.73383283,6009,R,,9,12,,TRUE,
-30011,202002,100,1145,5,0.190495606,0.226047443,,,3.88999586,1.941764103,81.65588616,1145,R,9,8,11,TRUE,TRUE,
-30011,202003,100,5064,5,4.423850085,,,,1.307995914,,76.13443331,5064,R,8,,11,TRUE,,
-30012,202001,100,256,275,,0.034032235,,0.034032235,,1.773218509,96.73383283,256,R,,9,12,,,
-30012,202002,100,7522,275,29.38390625,,29.38390625,,3.88999586,1.941764103,81.65588616,7522,R,9,8,11,,,
-30012,202003,100,,275,,,,,1.307995914,,76.13443331,9838.745268,FIR,8,,11,,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+30001,202001,100,51,,1.129481006,,1.773218509,96.73383283,8444,R,,9,12,,,
+30001,202002,100,51,0.885362387,3.732401398,3.88999586,1.941764103,81.65588616,7476,R,9,8,11,,,
+30001,202003,100,51,0.267924024,,1.307995914,,76.13443331,2003,R,8,,11,,,
+30002,202001,100,72,,1.195062676,,1.773218509,96.73383283,9343,R,,9,12,,,
+30002,202002,100,72,0.836776196,1.596487645,3.88999586,1.941764103,81.65588616,7818,R,9,8,11,,,
+30002,202003,100,72,0.626375032,,1.307995914,,76.13443331,4897,R,8,,11,,,
+30003,202001,100,7,,4.265190233,,1.773218509,96.73383283,7511,R,,9,12,,,
+30003,202002,100,7,0.234456131,0.271256932,3.88999586,1.941764103,81.65588616,1761,R,9,8,11,,,
+30003,202003,100,7,3.686541738,,1.307995914,,76.13443331,6492,R,8,,11,,,
+30004,202001,100,81,,,,1.773218509,96.73383283,64,R,,9,12,,,
+30004,202002,100,81,,,3.88999586,1.941764103,81.65588616,2113,R,9,8,11,,,TRUE
+30004,202003,100,81,,,1.307995914,,76.13443331,185,R,8,,11,,,
+30005,202001,100,5,,0.941234172,,1.773218509,96.73383283,844,R,,9,12,,,
+30005,202002,100,5,1.062434865,3.199201198,3.88999586,1.941764103,81.65588616,897,R,9,8,11,,,
+30005,202003,100,5,0.312578027,,1.307995914,,76.13443331,280,R,8,,11,,,
+30006,202001,100,14,,0.995885563,,1.773218509,96.73383283,1869,R,,9,12,,,
+30006,202002,100,14,1.004131435,1.368417982,3.88999586,1.941764103,81.65588616,1876,R,9,8,11,,,
+30006,202003,100,14,0.730770871,,1.307995914,,76.13443331,1371,R,8,,11,,,
+30007,202001,100,12,,4.475816911,,1.773218509,96.73383283,12769,R,,9,12,,,
+30007,202002,100,12,0.223422901,0.248269056,3.88999586,1.941764103,81.65588616,2853,R,9,8,11,,,
+30007,202003,100,12,4.027888195,,1.307995914,,76.13443331,11491,R,8,,11,,,
+30008,202001,100,162,,0.023463069,,1.773218509,96.73383283,141,R,,9,12,,TRUE,
+30008,202002,100,162,42.62017045,13.86213906,3.88999586,1.941764103,81.65588616,6001,R,9,8,11,TRUE,TRUE,
+30008,202003,100,162,0.072138939,,1.307995914,,76.13443331,433,R,8,,11,TRUE,,
+30009,202001,100,26,,1.589639934,,1.773218509,96.73383283,6417,R,,9,12,,,
+30009,202002,100,26,0.629073275,3.053782962,3.88999586,1.941764103,81.65588616,4037,R,9,8,11,,,
+30009,202003,100,26,0.327462695,,1.307995914,,76.13443331,1322,R,8,,11,,,
+30010,202001,100,144,,1.332623847,,1.773218509,96.73383283,28963,R,,9,12,,,
+30010,202002,100,144,0.750399298,2.064295653,3.88999586,1.941764103,81.65588616,21734,R,9,8,11,,,
+30010,202003,100,144,0.484426733,,1.307995914,,76.13443331,10529,R,8,,11,,,
+30011,202001,100,5,,5.249464902,,1.773218509,96.73383283,6009,R,,9,12,,TRUE,
+30011,202002,100,5,0.190495606,0.226047443,3.88999586,1.941764103,81.65588616,1145,R,9,8,11,TRUE,TRUE,
+30011,202003,100,5,4.423850085,,1.307995914,,76.13443331,5064,R,8,,11,TRUE,,
+30012,202001,100,275,,0.034032235,,1.773218509,96.73383283,256,R,,9,12,,,
+30012,202002,100,275,29.38390625,,3.88999586,1.941764103,81.65588616,7522,R,9,8,11,,,
+30012,202003,100,275,,,1.307995914,,76.13443331,9838.745268,FIR,8,,11,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index cd43c31b..ca15a203 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
-80001,202001,100,9244,89,,1.036787797,,1.036787797,,2.076255394,107.1910333,9244,R,,10,12,,
-80001,202002,100,8916,89,0.964517525,1.43945754,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,8916,R,10,9,12,,
-80001,202003,100,6194,89,0.694706146,,0.694706146,,0.918490819,,69.22002885,6194,R,9,,11,,
-80002,202001,100,4826,83,,0.817550398,,0.817550398,,2.076255394,107.1910333,4826,R,,10,12,,
-80002,202002,100,5903,83,1.223166183,1.244570947,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,5903,R,10,9,12,,
-80002,202003,100,4743,83,0.803489751,,0.803489751,,0.918490819,,69.22002885,4743,R,9,,11,,
-80003,202001,100,7586,4,,7.466535433,,7.466535433,,2.076255394,107.1910333,7586,R,,10,12,,
-80003,202002,100,1016,4,0.133930925,0.710986704,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1016,R,10,9,12,,
-80003,202003,100,1429,4,1.406496063,,1.406496063,,0.918490819,,69.22002885,1429,R,9,,11,,
-80004,202001,100,3975,76,,1.305847569,,1.305847569,,2.076255394,107.1910333,3975,R,,10,12,,
-80004,202002,100,3044,76,0.765786164,0.82875034,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,3044,R,10,9,12,,
-80004,202003,100,3673,76,1.206636005,,1.206636005,,0.918490819,,69.22002885,3673,R,9,,11,,
-80005,202001,100,1941,18,,0.622072678,,,,2.076255394,107.1910333,1941,R,,10,12,,TRUE
-80005,202002,100,3121,18,1.607529208,2.583641738,,,0.884574402,1.133853978,67.10794565,3121,R,10,9,12,TRUE,TRUE
-80005,202003,100,1208,18,0.387050567,,0.387050567,,0.918490819,,69.22002885,1208,R,9,,11,,
-80006,202001,100,5405,94,,0.763047038,,0.763047038,,2.076255394,107.1910333,5405,R,,10,12,,
-80006,202002,100,7084,94,1.310535196,1.422366796,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,7084,R,10,9,12,,
-80006,202003,100,4980,94,0.703053532,,0.703053532,,0.918490819,,69.22002885,4980,R,9,,11,,
-80007,202001,100,15172,8,,5.333239595,,5.333239595,,2.076255394,107.1910333,15172,R,,10,12,,
-80007,202002,100,2845,8,0.187503296,0.812556233,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,2845,R,10,9,12,,
-80007,202003,100,3501,8,1.230684055,,1.230684055,,0.918490819,,69.22002885,3501,R,9,,11,,
-80008,202001,100,16298,304,,1.129530598,,1.129530598,,2.076255394,107.1910333,16298,R,,10,12,,
-80008,202002,100,14429,304,0.885323516,1.009357249,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,14429,R,10,9,12,,
-80008,202003,100,14295,304,0.990729498,,0.990729498,,0.918490819,,69.22002885,14295,R,9,,11,,
-80009,202001,100,3698,45,,0.740562712,,0.740562712,,2.076255394,107.1910333,3698,R,,10,12,,
-80009,202002,100,4993,45,1.350324535,1.185435621,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,4993,R,10,9,12,,
-80009,202003,100,4212,45,0.843571749,,0.843571749,,0.918490819,,69.22002885,4212,R,9,,11,,
-80010,202001,100,7722,100,,0.760511998,,0.760511998,,2.076255394,107.1910333,7722,R,,10,12,,
-80010,202002,100,10153,100,1.314903647,1.551204368,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,10153,R,10,9,12,,
-80010,202003,100,6545,100,0.644660382,,,,0.918490819,,69.22002885,6545,R,9,,11,TRUE,
-80011,202001,100,30344,19,,8.365866031,,,,2.076255394,107.1910333,30344,R,,10,12,,TRUE
-80011,202002,100,3627,19,0.119533351,0.497690693,,,0.884574402,1.133853978,67.10794565,3627,R,10,9,12,TRUE,TRUE
-80011,202003,100,7288,19,2.00928009,,,,0.918490819,,69.22002885,7288,R,9,,11,TRUE,
-80012,202001,100,16298,304,,1.408940798,,1.408940798,,2.076255394,107.1910333,16298,R,,10,12,,
-80012,202002,100,11567,304,0.70975303,,0.70975303,,0.884574402,1.133853978,67.10794565,11567,R,10,9,12,,
-80012,202003,100,,304,,,,,0.918490819,,69.22002885,10624.18,FIR,9,,11,,
-80013,202001,200,20190,54,,1.106799294,,1.106799294,,1.313944665,186.8459267,20190,R,,9,11,,
-80013,202002,200,18242,54,0.903506178,0.632817595,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,18242,R,9,10,12,,
-80013,202003,200,28826,54,1.58023419,,1.58023419,,1.246527322,,255.2315185,28826,R,10,,12,,
-80014,202001,200,4260,47,,0.845985046,,0.845985046,,1.313944665,186.8459267,4260,R,,9,11,,
-80014,202002,200,5036,42,1.182053991,0.776557765,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,5036,R,9,10,12,,
-80014,202003,200,6484,42,1.28773421,,1.28773421,,1.246527322,,255.2315185,6484,R,10,,12,,
-80015,202001,200,19236,57,,3.886845827,,,,1.313944665,186.8459267,19236,R,,9,11,,TRUE
-80015,202002,200,4949,57,0.25727802,1.396267404,,1.396267404,0.998929763,0.857954645,197.1492703,4949,R,9,10,12,TRUE,
-80015,202003,200,3544,57,0.716195191,,0.716195191,,1.246527322,,255.2315185,3544,R,10,,12,,
-80016,202001,200,14902,163,,0.906730921,,0.906730921,,1.313944665,186.8459267,14902,R,,9,11,,
-80016,202002,200,16435,163,1.102863018,0.666628808,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,16435,R,9,10,12,,
-80016,202003,200,24653,163,1.500085186,,1.500085186,,1.246527322,,255.2315185,24653,R,10,,12,,
-80017,202001,200,35476,149,,0.702275751,,0.702275751,,1.313944665,186.8459267,35476,R,,9,11,,
-80017,202002,200,50515,149,1.42394209,0.944611909,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,50515,R,9,10,12,,
-80017,202003,200,53477,149,1.058635817,,1.058635817,,1.246527322,,255.2315185,53477,R,10,,12,,
-80018,202001,200,13845,126,,0.543204684,,0.543204684,,1.313944665,186.8459267,13845,R,,9,11,,
-80018,202002,200,25488,126,1.840926688,0.929916997,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,25488,R,9,10,12,,
-80018,202003,200,27409,126,1.075364795,,1.075364795,,1.246527322,,255.2315185,27409,R,10,,12,,
-80019,202001,200,1099,6,,2.530969376,,2.530969376,,1.313944665,186.8459267,1099,R,,9,11,,
-80019,202002,200,434,6,0.395105531,3.51659919,0.395105531,,0.998929763,0.857954645,197.1492703,434,R,9,10,12,,TRUE
-80019,202003,200,124,6,0.284365646,,,,1.246527322,,255.2315185,124,R,10,,12,TRUE,
-80020,202001,200,3348,22,,1.677715809,,1.677715809,,1.313944665,186.8459267,3348,R,,9,11,,
-80020,202002,200,1996,22,0.596048505,0.395102278,0.596048505,,0.998929763,0.857954645,197.1492703,1996,R,9,10,12,,TRUE
-80020,202003,200,5051,22,2.530990214,,,,1.246527322,,255.2315185,5051,R,10,,12,TRUE,
-80021,202001,200,29215,108,,0.855047659,,0.855047659,,1.313944665,186.8459267,29215,R,,9,11,,
-80021,202002,200,34168,108,1.169525453,0.554422016,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,34168,R,9,10,12,,
-80021,202003,200,61628,108,1.803680177,,1.803680177,,1.246527322,,255.2315185,61628,R,10,,12,,
-80022,202001,200,6390,67,,0.502948427,,,,1.313944665,186.8459267,6390,R,,9,11,,TRUE
-80022,202002,200,12705,67,1.98827543,1.061751691,,1.061751691,0.998929763,0.857954645,197.1492703,12705,R,9,10,12,TRUE,
-80022,202003,200,11966,67,0.9418398,,0.9418398,,1.246527322,,255.2315185,11966,R,10,,12,,
-80023,202001,200,4562,18,,2.656773442,,2.656773442,,1.313944665,186.8459267,4562,R,,9,11,,
-80023,202002,200,1717,18,0.376396415,0.724105938,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,1717,R,9,10,12,,
-80023,202003,200,2371,18,1.381013395,,1.381013395,,1.246527322,,255.2315185,2371,R,10,,12,,
-80024,202001,200,,155,,,,,,1.313944665,186.8459267,24679.03,BI,,9,11,,
-80024,202002,200,18782,155,,0.892466323,,0.892466323,0.998929763,0.857954645,197.1492703,18782,R,9,10,12,,
-80024,202003,200,21046,155,1.120490459,,1.120490459,,1.246527322,,255.2315185,21046,R,10,,12,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+80001,202001,100,89,,1.036787797,,2.076255394,107.1910333,9244,R,,10,12,,
+80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,8916,R,10,9,12,,
+80001,202003,100,89,0.694706146,,0.918490819,,69.22002885,6194,R,9,,11,,
+80002,202001,100,83,,0.817550398,,2.076255394,107.1910333,4826,R,,10,12,,
+80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,5903,R,10,9,12,,
+80002,202003,100,83,0.803489751,,0.918490819,,69.22002885,4743,R,9,,11,,
+80003,202001,100,4,,7.466535433,,2.076255394,107.1910333,7586,R,,10,12,,
+80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1016,R,10,9,12,,
+80003,202003,100,4,1.406496063,,0.918490819,,69.22002885,1429,R,9,,11,,
+80004,202001,100,76,,1.305847569,,2.076255394,107.1910333,3975,R,,10,12,,
+80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,3044,R,10,9,12,,
+80004,202003,100,76,1.206636005,,0.918490819,,69.22002885,3673,R,9,,11,,
+80005,202001,100,18,,0.622072678,,2.076255394,107.1910333,1941,R,,10,12,,TRUE
+80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,3121,R,10,9,12,TRUE,TRUE
+80005,202003,100,18,0.387050567,,0.918490819,,69.22002885,1208,R,9,,11,,
+80006,202001,100,94,,0.763047038,,2.076255394,107.1910333,5405,R,,10,12,,
+80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,7084,R,10,9,12,,
+80006,202003,100,94,0.703053532,,0.918490819,,69.22002885,4980,R,9,,11,,
+80007,202001,100,8,,5.333239595,,2.076255394,107.1910333,15172,R,,10,12,,
+80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,2845,R,10,9,12,,
+80007,202003,100,8,1.230684055,,0.918490819,,69.22002885,3501,R,9,,11,,
+80008,202001,100,304,,1.129530598,,2.076255394,107.1910333,16298,R,,10,12,,
+80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,14429,R,10,9,12,,
+80008,202003,100,304,0.990729498,,0.918490819,,69.22002885,14295,R,9,,11,,
+80009,202001,100,45,,0.740562712,,2.076255394,107.1910333,3698,R,,10,12,,
+80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,4993,R,10,9,12,,
+80009,202003,100,45,0.843571749,,0.918490819,,69.22002885,4212,R,9,,11,,
+80010,202001,100,100,,0.760511998,,2.076255394,107.1910333,7722,R,,10,12,,
+80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,10153,R,10,9,12,,
+80010,202003,100,100,0.644660382,,0.918490819,,69.22002885,6545,R,9,,11,TRUE,
+80011,202001,100,19,,8.365866031,,2.076255394,107.1910333,30344,R,,10,12,,TRUE
+80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,3627,R,10,9,12,TRUE,TRUE
+80011,202003,100,19,2.00928009,,0.918490819,,69.22002885,7288,R,9,,11,TRUE,
+80012,202001,100,304,,1.408940798,,2.076255394,107.1910333,16298,R,,10,12,,
+80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,11567,R,10,9,12,,
+80012,202003,100,304,,,0.918490819,,69.22002885,10624.18,FIR,9,,11,,
+80013,202001,200,54,,1.106799294,,1.313944665,186.8459267,20190,R,,9,11,,
+80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,18242,R,9,10,12,,
+80013,202003,200,54,1.58023419,,1.246527322,,255.2315185,28826,R,10,,12,,
+80014,202001,200,47,,0.845985046,,1.313944665,186.8459267,4260,R,,9,11,,
+80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,5036,R,9,10,12,,
+80014,202003,200,42,1.28773421,,1.246527322,,255.2315185,6484,R,10,,12,,
+80015,202001,200,57,,3.886845827,,1.313944665,186.8459267,19236,R,,9,11,,TRUE
+80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,4949,R,9,10,12,TRUE,
+80015,202003,200,57,0.716195191,,1.246527322,,255.2315185,3544,R,10,,12,,
+80016,202001,200,163,,0.906730921,,1.313944665,186.8459267,14902,R,,9,11,,
+80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,16435,R,9,10,12,,
+80016,202003,200,163,1.500085186,,1.246527322,,255.2315185,24653,R,10,,12,,
+80017,202001,200,149,,0.702275751,,1.313944665,186.8459267,35476,R,,9,11,,
+80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,50515,R,9,10,12,,
+80017,202003,200,149,1.058635817,,1.246527322,,255.2315185,53477,R,10,,12,,
+80018,202001,200,126,,0.543204684,,1.313944665,186.8459267,13845,R,,9,11,,
+80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,25488,R,9,10,12,,
+80018,202003,200,126,1.075364795,,1.246527322,,255.2315185,27409,R,10,,12,,
+80019,202001,200,6,,2.530969376,,1.313944665,186.8459267,1099,R,,9,11,,
+80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,434,R,9,10,12,,TRUE
+80019,202003,200,6,0.284365646,,1.246527322,,255.2315185,124,R,10,,12,TRUE,
+80020,202001,200,22,,1.677715809,,1.313944665,186.8459267,3348,R,,9,11,,
+80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,1996,R,9,10,12,,TRUE
+80020,202003,200,22,2.530990214,,1.246527322,,255.2315185,5051,R,10,,12,TRUE,
+80021,202001,200,108,,0.855047659,,1.313944665,186.8459267,29215,R,,9,11,,
+80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,34168,R,9,10,12,,
+80021,202003,200,108,1.803680177,,1.246527322,,255.2315185,61628,R,10,,12,,
+80022,202001,200,67,,0.502948427,,1.313944665,186.8459267,6390,R,,9,11,,TRUE
+80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,12705,R,9,10,12,TRUE,
+80022,202003,200,67,0.9418398,,1.246527322,,255.2315185,11966,R,10,,12,,
+80023,202001,200,18,,2.656773442,,1.313944665,186.8459267,4562,R,,9,11,,
+80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,1717,R,9,10,12,,
+80023,202003,200,18,1.381013395,,1.246527322,,255.2315185,2371,R,10,,12,,
+80024,202001,200,155,,,,1.313944665,186.8459267,24679.03,BI,,9,11,,
+80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,18782,R,9,10,12,,
+80024,202003,200,155,1.120490459,,1.246527322,,255.2315185,21046,R,10,,12,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index 5c2598c3..fda7b709 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
-90001,202001,100,9244,89,,1.036787797,,1.036787797,,1.835663813,132.8421946,9244,R,,18,20,,
-90001,202002,100,8916,89,0.964517525,1.43945754,0.964517525,1.43945754,0.906337253,1.082813901,113.3255814,8916,R,18,18,20,,
-90001,202003,100,6194,89,0.694706146,,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,
-90002,202001,100,4826,83,,0.817550398,,0.817550398,,1.835663813,132.8421946,4826,R,,18,20,,
-90002,202002,100,5903,83,1.223166183,1.244570947,1.223166183,1.244570947,0.906337253,1.082813901,113.3255814,5903,R,18,18,20,,
-90002,202003,100,4743,83,0.803489751,,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,
-90003,202001,100,7586,4,,7.466535433,,7.466535433,,1.835663813,132.8421946,7586,R,,18,20,,
-90003,202002,100,1016,4,0.133930925,0.710986704,0.133930925,0.710986704,0.906337253,1.082813901,113.3255814,1016,R,18,18,20,,
-90003,202003,100,1429,4,1.406496063,,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,
-90004,202001,100,3975,76,,1.305847569,,1.305847569,,1.835663813,132.8421946,3975,R,,18,20,,
-90004,202002,100,3044,76,0.765786164,0.82875034,0.765786164,0.82875034,0.906337253,1.082813901,113.3255814,3044,R,18,18,20,,
-90004,202003,100,3673,76,1.206636005,,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,
-90005,202001,100,1941,18,,0.622072678,,0.622072678,,1.835663813,132.8421946,1941,R,,18,20,,
-90005,202002,100,3121,18,1.607529208,2.583641738,1.607529208,2.583641738,0.906337253,1.082813901,113.3255814,3121,R,18,18,20,,
-90005,202003,100,1208,18,0.387050567,,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,
-90006,202001,100,5405,94,,0.763047038,,0.763047038,,1.835663813,132.8421946,5405,R,,18,20,,
-90006,202002,100,7084,94,1.310535196,1.422366796,1.310535196,1.422366796,0.906337253,1.082813901,113.3255814,7084,R,18,18,20,,
-90006,202003,100,4980,94,0.703053532,,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,
-90007,202001,100,15172,8,,5.333239595,,5.333239595,,1.835663813,132.8421946,15172,R,,18,20,,
-90007,202002,100,2845,8,0.187503296,0.812556233,0.187503296,0.812556233,0.906337253,1.082813901,113.3255814,2845,R,18,18,20,,
-90007,202003,100,3501,8,1.230684055,,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,
-90008,202001,100,16298,304,,1.129530598,,1.129530598,,1.835663813,132.8421946,16298,R,,18,20,,
-90008,202002,100,14429,304,0.885323516,1.009357249,0.885323516,1.009357249,0.906337253,1.082813901,113.3255814,14429,R,18,18,20,,
-90008,202003,100,14295,304,0.990729498,,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,
-90009,202001,100,3698,45,,0.740562712,,0.740562712,,1.835663813,132.8421946,3698,R,,18,20,,
-90009,202002,100,4993,45,1.350324535,1.185435621,1.350324535,1.185435621,0.906337253,1.082813901,113.3255814,4993,R,18,18,20,,
-90009,202003,100,4212,45,0.843571749,,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,
-90010,202001,100,7722,100,,0.760511998,,0.760511998,,1.835663813,132.8421946,7722,R,,18,20,,
-90010,202002,100,10153,100,1.314903647,1.551204368,1.314903647,1.551204368,0.906337253,1.082813901,113.3255814,10153,R,18,18,20,,
-90010,202003,100,6545,100,0.644660382,,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,
-90011,202001,100,30344,19,,8.365866031,,,,1.835663813,132.8421946,30344,R,,18,20,,TRUE
-90011,202002,100,3627,19,0.119533351,0.497690693,,0.497690693,0.906337253,1.082813901,113.3255814,3627,R,18,18,20,TRUE,
-90011,202003,100,7288,19,2.00928009,,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,
-90012,202001,100,16298,304,,1.408940798,,1.408940798,,1.835663813,132.8421946,16298,R,,18,20,,
-90012,202002,100,11567,304,0.70975303,0.857831504,0.70975303,0.857831504,0.906337253,1.082813901,113.3255814,11567,R,18,18,20,,
-90012,202003,100,13484,304,1.165730094,,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,
-90013,202001,100,20190,54,,1.106799294,,1.106799294,,1.835663813,132.8421946,20190,R,,18,20,,
-90013,202002,100,18242,54,0.903506178,0.632817595,0.903506178,0.632817595,0.906337253,1.082813901,113.3255814,18242,R,18,18,20,,
-90013,202003,100,28826,54,1.58023419,,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,
-90014,202001,100,4260,47,,0.845985046,,0.845985046,,1.835663813,132.8421946,4260,R,,18,20,,
-90014,202002,100,5036,42,1.182053991,0.776557765,1.182053991,0.776557765,0.906337253,1.082813901,113.3255814,5036,R,18,18,20,,
-90014,202003,100,6484,42,1.28773421,,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,
-90015,202001,100,19236,57,,3.886845827,,3.886845827,,1.835663813,132.8421946,19236,R,,18,20,,
-90015,202002,100,4949,57,0.25727802,1.396267404,0.25727802,1.396267404,0.906337253,1.082813901,113.3255814,4949,R,18,18,20,,
-90015,202003,100,3544,57,0.716195191,,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,
-90016,202001,100,14902,163,,0.906730921,,0.906730921,,1.835663813,132.8421946,14902,R,,18,20,,
-90016,202002,100,16435,163,1.102863018,0.666628808,1.102863018,0.666628808,0.906337253,1.082813901,113.3255814,16435,R,18,18,20,,
-90016,202003,100,24653,163,1.500085186,,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,
-90017,202001,100,35476,149,,0.702275751,,0.702275751,,1.835663813,132.8421946,35476,R,,18,20,,
-90017,202002,100,50515,149,1.42394209,0.944611909,1.42394209,0.944611909,0.906337253,1.082813901,113.3255814,50515,R,18,18,20,,
-90017,202003,100,53477,149,1.058635817,,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,
-90018,202001,100,13845,126,,0.543204684,,,,1.835663813,132.8421946,13845,R,,18,20,,TRUE
-90018,202002,100,25488,126,1.840926688,0.929916997,,0.929916997,0.906337253,1.082813901,113.3255814,25488,R,18,18,20,TRUE,
-90018,202003,100,27409,126,1.075364795,,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,
-90019,202001,100,1099,6,,2.530969376,,2.530969376,,1.835663813,132.8421946,1099,R,,18,20,,
-90019,202002,100,434,6,0.395105531,3.51659919,0.395105531,,0.906337253,1.082813901,113.3255814,434,R,18,18,20,,TRUE
-90019,202003,100,124,6,0.284365646,,,,1.072463185,,126.2596455,124,R,18,,21,TRUE,
-90020,202001,100,3348,22,,1.677715809,,1.677715809,,1.835663813,132.8421946,3348,R,,18,20,,
-90020,202002,100,1996,22,0.596048505,0.395102278,0.596048505,,0.906337253,1.082813901,113.3255814,1996,R,18,18,20,,TRUE
-90020,202003,100,5051,22,2.530990214,,,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,
-90021,202001,100,,155,,,,,,1.835663813,132.8421946,41832.76156,BI,,18,20,,
-90021,202002,100,,155,,,,,0.906337253,1.082813901,113.3255814,22788.90135,BI,18,18,20,,
-90021,202003,100,21046,155,,,,,1.072463185,,126.2596455,21046,R,18,,21,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+90001,202001,100,89,,1.036787797,,1.835663813,132.8421946,9244,R,,18,20,,
+90001,202002,100,89,0.964517525,1.43945754,0.906337253,1.082813901,113.3255814,8916,R,18,18,20,,
+90001,202003,100,89,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,
+90002,202001,100,83,,0.817550398,,1.835663813,132.8421946,4826,R,,18,20,,
+90002,202002,100,83,1.223166183,1.244570947,0.906337253,1.082813901,113.3255814,5903,R,18,18,20,,
+90002,202003,100,83,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,
+90003,202001,100,4,,7.466535433,,1.835663813,132.8421946,7586,R,,18,20,,
+90003,202002,100,4,0.133930925,0.710986704,0.906337253,1.082813901,113.3255814,1016,R,18,18,20,,
+90003,202003,100,4,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,
+90004,202001,100,76,,1.305847569,,1.835663813,132.8421946,3975,R,,18,20,,
+90004,202002,100,76,0.765786164,0.82875034,0.906337253,1.082813901,113.3255814,3044,R,18,18,20,,
+90004,202003,100,76,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,
+90005,202001,100,18,,0.622072678,,1.835663813,132.8421946,1941,R,,18,20,,
+90005,202002,100,18,1.607529208,2.583641738,0.906337253,1.082813901,113.3255814,3121,R,18,18,20,,
+90005,202003,100,18,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,
+90006,202001,100,94,,0.763047038,,1.835663813,132.8421946,5405,R,,18,20,,
+90006,202002,100,94,1.310535196,1.422366796,0.906337253,1.082813901,113.3255814,7084,R,18,18,20,,
+90006,202003,100,94,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,
+90007,202001,100,8,,5.333239595,,1.835663813,132.8421946,15172,R,,18,20,,
+90007,202002,100,8,0.187503296,0.812556233,0.906337253,1.082813901,113.3255814,2845,R,18,18,20,,
+90007,202003,100,8,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,
+90008,202001,100,304,,1.129530598,,1.835663813,132.8421946,16298,R,,18,20,,
+90008,202002,100,304,0.885323516,1.009357249,0.906337253,1.082813901,113.3255814,14429,R,18,18,20,,
+90008,202003,100,304,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,
+90009,202001,100,45,,0.740562712,,1.835663813,132.8421946,3698,R,,18,20,,
+90009,202002,100,45,1.350324535,1.185435621,0.906337253,1.082813901,113.3255814,4993,R,18,18,20,,
+90009,202003,100,45,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,
+90010,202001,100,100,,0.760511998,,1.835663813,132.8421946,7722,R,,18,20,,
+90010,202002,100,100,1.314903647,1.551204368,0.906337253,1.082813901,113.3255814,10153,R,18,18,20,,
+90010,202003,100,100,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,
+90011,202001,100,19,,8.365866031,,1.835663813,132.8421946,30344,R,,18,20,,TRUE
+90011,202002,100,19,0.119533351,0.497690693,0.906337253,1.082813901,113.3255814,3627,R,18,18,20,TRUE,
+90011,202003,100,19,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,
+90012,202001,100,304,,1.408940798,,1.835663813,132.8421946,16298,R,,18,20,,
+90012,202002,100,304,0.70975303,0.857831504,0.906337253,1.082813901,113.3255814,11567,R,18,18,20,,
+90012,202003,100,304,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,
+90013,202001,100,54,,1.106799294,,1.835663813,132.8421946,20190,R,,18,20,,
+90013,202002,100,54,0.903506178,0.632817595,0.906337253,1.082813901,113.3255814,18242,R,18,18,20,,
+90013,202003,100,54,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,
+90014,202001,100,47,,0.845985046,,1.835663813,132.8421946,4260,R,,18,20,,
+90014,202002,100,42,1.182053991,0.776557765,0.906337253,1.082813901,113.3255814,5036,R,18,18,20,,
+90014,202003,100,42,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,
+90015,202001,100,57,,3.886845827,,1.835663813,132.8421946,19236,R,,18,20,,
+90015,202002,100,57,0.25727802,1.396267404,0.906337253,1.082813901,113.3255814,4949,R,18,18,20,,
+90015,202003,100,57,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,
+90016,202001,100,163,,0.906730921,,1.835663813,132.8421946,14902,R,,18,20,,
+90016,202002,100,163,1.102863018,0.666628808,0.906337253,1.082813901,113.3255814,16435,R,18,18,20,,
+90016,202003,100,163,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,
+90017,202001,100,149,,0.702275751,,1.835663813,132.8421946,35476,R,,18,20,,
+90017,202002,100,149,1.42394209,0.944611909,0.906337253,1.082813901,113.3255814,50515,R,18,18,20,,
+90017,202003,100,149,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,
+90018,202001,100,126,,0.543204684,,1.835663813,132.8421946,13845,R,,18,20,,TRUE
+90018,202002,100,126,1.840926688,0.929916997,0.906337253,1.082813901,113.3255814,25488,R,18,18,20,TRUE,
+90018,202003,100,126,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,
+90019,202001,100,6,,2.530969376,,1.835663813,132.8421946,1099,R,,18,20,,
+90019,202002,100,6,0.395105531,3.51659919,0.906337253,1.082813901,113.3255814,434,R,18,18,20,,TRUE
+90019,202003,100,6,0.284365646,,1.072463185,,126.2596455,124,R,18,,21,TRUE,
+90020,202001,100,22,,1.677715809,,1.835663813,132.8421946,3348,R,,18,20,,
+90020,202002,100,22,0.596048505,0.395102278,0.906337253,1.082813901,113.3255814,1996,R,18,18,20,,TRUE
+90020,202003,100,22,2.530990214,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,
+90021,202001,100,155,,,,1.835663813,132.8421946,41832.76156,BI,,18,20,,
+90021,202002,100,155,,,0.906337253,1.082813901,113.3255814,22788.90135,BI,18,18,20,,
+90021,202003,100,155,,,1.072463185,,126.2596455,21046,R,18,,21,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index 104523aa..0e2f4724 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-100001,202001,100,9244,89,,1.036787797,,1.036787797,,2.097550968,132.8421946,9244,R,,20,20
-100001,202002,100,8916,89,0.964517525,1.43945754,0.964517525,1.43945754,0.91372653,1.170117584,113.3255814,8916,R,20,20,20
-100001,202003,100,6194,89,0.694706146,,0.694706146,,1.105984659,,126.2596455,6194,R,20,,21
-100002,202001,100,4826,83,,0.817550398,,0.817550398,,2.097550968,132.8421946,4826,R,,20,20
-100002,202002,100,5903,83,1.223166183,1.244570947,1.223166183,1.244570947,0.91372653,1.170117584,113.3255814,5903,R,20,20,20
-100002,202003,100,4743,83,0.803489751,,0.803489751,,1.105984659,,126.2596455,4743,R,20,,21
-100003,202001,100,7586,4,,7.466535433,,7.466535433,,2.097550968,132.8421946,7586,R,,20,20
-100003,202002,100,1016,4,0.133930925,0.710986704,0.133930925,0.710986704,0.91372653,1.170117584,113.3255814,1016,R,20,20,20
-100003,202003,100,1429,4,1.406496063,,1.406496063,,1.105984659,,126.2596455,1429,R,20,,21
-100004,202001,100,3975,76,,1.305847569,,1.305847569,,2.097550968,132.8421946,3975,R,,20,20
-100004,202002,100,3044,76,0.765786164,0.82875034,0.765786164,0.82875034,0.91372653,1.170117584,113.3255814,3044,R,20,20,20
-100004,202003,100,3673,76,1.206636005,,1.206636005,,1.105984659,,126.2596455,3673,R,20,,21
-100005,202001,100,1941,18,,0.622072678,,0.622072678,,2.097550968,132.8421946,1941,R,,20,20
-100005,202002,100,3121,18,1.607529208,2.583641738,1.607529208,2.583641738,0.91372653,1.170117584,113.3255814,3121,R,20,20,20
-100005,202003,100,1208,18,0.387050567,,0.387050567,,1.105984659,,126.2596455,1208,R,20,,21
-100006,202001,100,5405,94,,0.763047038,,0.763047038,,2.097550968,132.8421946,5405,R,,20,20
-100006,202002,100,7084,94,1.310535196,1.422366796,1.310535196,1.422366796,0.91372653,1.170117584,113.3255814,7084,R,20,20,20
-100006,202003,100,4980,94,0.703053532,,0.703053532,,1.105984659,,126.2596455,4980,R,20,,21
-100007,202001,100,15172,8,,5.333239595,,5.333239595,,2.097550968,132.8421946,15172,R,,20,20
-100007,202002,100,2845,8,0.187503296,0.812556233,0.187503296,0.812556233,0.91372653,1.170117584,113.3255814,2845,R,20,20,20
-100007,202003,100,3501,8,1.230684055,,1.230684055,,1.105984659,,126.2596455,3501,R,20,,21
-100008,202001,100,16298,304,,1.129530598,,1.129530598,,2.097550968,132.8421946,16298,R,,20,20
-100008,202002,100,14429,304,0.885323516,1.009357249,0.885323516,1.009357249,0.91372653,1.170117584,113.3255814,14429,R,20,20,20
-100008,202003,100,14295,304,0.990729498,,0.990729498,,1.105984659,,126.2596455,14295,R,20,,21
-100009,202001,100,3698,45,,0.740562712,,0.740562712,,2.097550968,132.8421946,3698,R,,20,20
-100009,202002,100,4993,45,1.350324535,1.185435621,1.350324535,1.185435621,0.91372653,1.170117584,113.3255814,4993,R,20,20,20
-100009,202003,100,4212,45,0.843571749,,0.843571749,,1.105984659,,126.2596455,4212,R,20,,21
-100010,202001,100,7722,100,,0.760511998,,0.760511998,,2.097550968,132.8421946,7722,R,,20,20
-100010,202002,100,10153,100,1.314903647,1.551204368,1.314903647,1.551204368,0.91372653,1.170117584,113.3255814,10153,R,20,20,20
-100010,202003,100,6545,100,0.644660382,,0.644660382,,1.105984659,,126.2596455,6545,R,20,,21
-100011,202001,100,30344,19,,8.365866031,,8.365866031,,2.097550968,132.8421946,30344,R,,20,20
-100011,202002,100,3627,19,0.119533351,0.497690693,0.119533351,0.497690693,0.91372653,1.170117584,113.3255814,3627,R,20,20,20
-100011,202003,100,7288,19,2.00928009,,2.00928009,,1.105984659,,126.2596455,7288,R,20,,21
-100012,202001,100,16298,304,,1.408940798,,1.408940798,,2.097550968,132.8421946,16298,R,,20,20
-100012,202002,100,11567,304,0.70975303,0.857831504,0.70975303,0.857831504,0.91372653,1.170117584,113.3255814,11567,R,20,20,20
-100012,202003,100,13484,304,1.165730094,,1.165730094,,1.105984659,,126.2596455,13484,R,20,,21
-100013,202001,100,20190,54,,1.106799294,,1.106799294,,2.097550968,132.8421946,20190,R,,20,20
-100013,202002,100,18242,54,0.903506178,0.632817595,0.903506178,0.632817595,0.91372653,1.170117584,113.3255814,18242,R,20,20,20
-100013,202003,100,28826,54,1.58023419,,1.58023419,,1.105984659,,126.2596455,28826,R,20,,21
-100014,202001,100,4260,47,,0.845985046,,0.845985046,,2.097550968,132.8421946,4260,R,,20,20
-100014,202002,100,5036,42,1.182053991,0.776557765,1.182053991,0.776557765,0.91372653,1.170117584,113.3255814,5036,R,20,20,20
-100014,202003,100,6484,42,1.28773421,,1.28773421,,1.105984659,,126.2596455,6484,R,20,,21
-100015,202001,100,19236,57,,3.886845827,,3.886845827,,2.097550968,132.8421946,19236,R,,20,20
-100015,202002,100,4949,57,0.25727802,1.396267404,0.25727802,1.396267404,0.91372653,1.170117584,113.3255814,4949,R,20,20,20
-100015,202003,100,3544,57,0.716195191,,0.716195191,,1.105984659,,126.2596455,3544,R,20,,21
-100016,202001,100,14902,163,,0.906730921,,0.906730921,,2.097550968,132.8421946,14902,R,,20,20
-100016,202002,100,16435,163,1.102863018,0.666628808,1.102863018,0.666628808,0.91372653,1.170117584,113.3255814,16435,R,20,20,20
-100016,202003,100,24653,163,1.500085186,,1.500085186,,1.105984659,,126.2596455,24653,R,20,,21
-100017,202001,100,35476,149,,0.702275751,,0.702275751,,2.097550968,132.8421946,35476,R,,20,20
-100017,202002,100,50515,149,1.42394209,0.944611909,1.42394209,0.944611909,0.91372653,1.170117584,113.3255814,50515,R,20,20,20
-100017,202003,100,53477,149,1.058635817,,1.058635817,,1.105984659,,126.2596455,53477,R,20,,21
-100018,202001,100,13845,126,,0.543204684,,0.543204684,,2.097550968,132.8421946,13845,R,,20,20
-100018,202002,100,25488,126,1.840926688,0.929916997,1.840926688,0.929916997,0.91372653,1.170117584,113.3255814,25488,R,20,20,20
-100018,202003,100,27409,126,1.075364795,,1.075364795,,1.105984659,,126.2596455,27409,R,20,,21
-100019,202001,100,1099,6,,2.530969376,,2.530969376,,2.097550968,132.8421946,1099,R,,20,20
-100019,202002,100,434,6,0.395105531,3.51659919,0.395105531,3.51659919,0.91372653,1.170117584,113.3255814,434,R,20,20,20
-100019,202003,100,124,6,0.284365646,,0.284365646,,1.105984659,,126.2596455,124,R,20,,21
-100020,202001,100,3348,22,,1.677715809,,1.677715809,,2.097550968,132.8421946,3348,R,,20,20
-100020,202002,100,1996,22,0.596048505,0.395102278,0.596048505,0.395102278,0.91372653,1.170117584,113.3255814,1996,R,20,20,20
-100020,202003,100,5051,22,2.530990214,,2.530990214,,1.105984659,,126.2596455,5051,R,20,,21
-100021,202001,100,,155,,,,,,2.097550968,132.8421946,51654.90822,BI,,20,20
-100021,202002,100,,155,,,,,0.91372653,1.170117584,113.3255814,24626.29467,BI,20,20,20
-100021,202003,100,21046,155,,,,,1.105984659,,126.2596455,21046,R,20,,21
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+100001,202001,100,89,,1.036787797,,2.097550968,132.8421946,9244,R,,20,20
+100001,202002,100,89,0.964517525,1.43945754,0.91372653,1.170117584,113.3255814,8916,R,20,20,20
+100001,202003,100,89,0.694706146,,1.105984659,,126.2596455,6194,R,20,,21
+100002,202001,100,83,,0.817550398,,2.097550968,132.8421946,4826,R,,20,20
+100002,202002,100,83,1.223166183,1.244570947,0.91372653,1.170117584,113.3255814,5903,R,20,20,20
+100002,202003,100,83,0.803489751,,1.105984659,,126.2596455,4743,R,20,,21
+100003,202001,100,4,,7.466535433,,2.097550968,132.8421946,7586,R,,20,20
+100003,202002,100,4,0.133930925,0.710986704,0.91372653,1.170117584,113.3255814,1016,R,20,20,20
+100003,202003,100,4,1.406496063,,1.105984659,,126.2596455,1429,R,20,,21
+100004,202001,100,76,,1.305847569,,2.097550968,132.8421946,3975,R,,20,20
+100004,202002,100,76,0.765786164,0.82875034,0.91372653,1.170117584,113.3255814,3044,R,20,20,20
+100004,202003,100,76,1.206636005,,1.105984659,,126.2596455,3673,R,20,,21
+100005,202001,100,18,,0.622072678,,2.097550968,132.8421946,1941,R,,20,20
+100005,202002,100,18,1.607529208,2.583641738,0.91372653,1.170117584,113.3255814,3121,R,20,20,20
+100005,202003,100,18,0.387050567,,1.105984659,,126.2596455,1208,R,20,,21
+100006,202001,100,94,,0.763047038,,2.097550968,132.8421946,5405,R,,20,20
+100006,202002,100,94,1.310535196,1.422366796,0.91372653,1.170117584,113.3255814,7084,R,20,20,20
+100006,202003,100,94,0.703053532,,1.105984659,,126.2596455,4980,R,20,,21
+100007,202001,100,8,,5.333239595,,2.097550968,132.8421946,15172,R,,20,20
+100007,202002,100,8,0.187503296,0.812556233,0.91372653,1.170117584,113.3255814,2845,R,20,20,20
+100007,202003,100,8,1.230684055,,1.105984659,,126.2596455,3501,R,20,,21
+100008,202001,100,304,,1.129530598,,2.097550968,132.8421946,16298,R,,20,20
+100008,202002,100,304,0.885323516,1.009357249,0.91372653,1.170117584,113.3255814,14429,R,20,20,20
+100008,202003,100,304,0.990729498,,1.105984659,,126.2596455,14295,R,20,,21
+100009,202001,100,45,,0.740562712,,2.097550968,132.8421946,3698,R,,20,20
+100009,202002,100,45,1.350324535,1.185435621,0.91372653,1.170117584,113.3255814,4993,R,20,20,20
+100009,202003,100,45,0.843571749,,1.105984659,,126.2596455,4212,R,20,,21
+100010,202001,100,100,,0.760511998,,2.097550968,132.8421946,7722,R,,20,20
+100010,202002,100,100,1.314903647,1.551204368,0.91372653,1.170117584,113.3255814,10153,R,20,20,20
+100010,202003,100,100,0.644660382,,1.105984659,,126.2596455,6545,R,20,,21
+100011,202001,100,19,,8.365866031,,2.097550968,132.8421946,30344,R,,20,20
+100011,202002,100,19,0.119533351,0.497690693,0.91372653,1.170117584,113.3255814,3627,R,20,20,20
+100011,202003,100,19,2.00928009,,1.105984659,,126.2596455,7288,R,20,,21
+100012,202001,100,304,,1.408940798,,2.097550968,132.8421946,16298,R,,20,20
+100012,202002,100,304,0.70975303,0.857831504,0.91372653,1.170117584,113.3255814,11567,R,20,20,20
+100012,202003,100,304,1.165730094,,1.105984659,,126.2596455,13484,R,20,,21
+100013,202001,100,54,,1.106799294,,2.097550968,132.8421946,20190,R,,20,20
+100013,202002,100,54,0.903506178,0.632817595,0.91372653,1.170117584,113.3255814,18242,R,20,20,20
+100013,202003,100,54,1.58023419,,1.105984659,,126.2596455,28826,R,20,,21
+100014,202001,100,47,,0.845985046,,2.097550968,132.8421946,4260,R,,20,20
+100014,202002,100,42,1.182053991,0.776557765,0.91372653,1.170117584,113.3255814,5036,R,20,20,20
+100014,202003,100,42,1.28773421,,1.105984659,,126.2596455,6484,R,20,,21
+100015,202001,100,57,,3.886845827,,2.097550968,132.8421946,19236,R,,20,20
+100015,202002,100,57,0.25727802,1.396267404,0.91372653,1.170117584,113.3255814,4949,R,20,20,20
+100015,202003,100,57,0.716195191,,1.105984659,,126.2596455,3544,R,20,,21
+100016,202001,100,163,,0.906730921,,2.097550968,132.8421946,14902,R,,20,20
+100016,202002,100,163,1.102863018,0.666628808,0.91372653,1.170117584,113.3255814,16435,R,20,20,20
+100016,202003,100,163,1.500085186,,1.105984659,,126.2596455,24653,R,20,,21
+100017,202001,100,149,,0.702275751,,2.097550968,132.8421946,35476,R,,20,20
+100017,202002,100,149,1.42394209,0.944611909,0.91372653,1.170117584,113.3255814,50515,R,20,20,20
+100017,202003,100,149,1.058635817,,1.105984659,,126.2596455,53477,R,20,,21
+100018,202001,100,126,,0.543204684,,2.097550968,132.8421946,13845,R,,20,20
+100018,202002,100,126,1.840926688,0.929916997,0.91372653,1.170117584,113.3255814,25488,R,20,20,20
+100018,202003,100,126,1.075364795,,1.105984659,,126.2596455,27409,R,20,,21
+100019,202001,100,6,,2.530969376,,2.097550968,132.8421946,1099,R,,20,20
+100019,202002,100,6,0.395105531,3.51659919,0.91372653,1.170117584,113.3255814,434,R,20,20,20
+100019,202003,100,6,0.284365646,,1.105984659,,126.2596455,124,R,20,,21
+100020,202001,100,22,,1.677715809,,2.097550968,132.8421946,3348,R,,20,20
+100020,202002,100,22,0.596048505,0.395102278,0.91372653,1.170117584,113.3255814,1996,R,20,20,20
+100020,202003,100,22,2.530990214,,1.105984659,,126.2596455,5051,R,20,,21
+100021,202001,100,155,,,,2.097550968,132.8421946,51654.90822,BI,,20,20
+100021,202002,100,155,,,0.91372653,1.170117584,113.3255814,24626.29467,BI,20,20,20
+100021,202003,100,155,,,1.105984659,,126.2596455,21046,R,20,,21
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index e30d9287..08130be1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
-30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.598925527,96.75644028,8444,R,,10,12,,
-30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,3.732401398,6.802558774,4.305953095,76.3852459,7476,R,10,9,12,,
-30001,202003,100,2003,51,0.267924024,,0.267924024,,1.126581418,,66.21860465,2003,R,9,,9,,
-30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.930792743,96.75644028,9343,R,,10,12,,
-30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,1.596487645,6.802558774,4.305953095,76.3852459,7818,R,10,9,12,,
-30002,202003,100,4897,72,0.626375032,,0.626375032,,1.126581418,,66.21860465,4897,R,9,,9,,
-30003,202001,100,7511,7,,4.265190233,,4.265190233,,1.930792743,96.75644028,7511,R,,10,12,,
-30003,202002,100,1761,7,0.234456131,0.271256932,0.234456131,0.271256932,6.802558774,4.305953095,76.3852459,1761,R,10,9,12,,
-30003,202003,100,6492,7,3.686541738,,3.686541738,,1.126581418,,66.21860465,6492,R,9,,9,,
-30004,202001,100,64,81,,0.030288689,,0.030288689,,1.930792743,96.75644028,64,R,,10,12,,
-30004,202002,100,2113,81,33.015625,11.42162162,33.015625,11.42162162,6.802558774,4.305953095,76.3852459,2113,R,10,9,12,,
-30004,202003,100,185,81,0.087553242,,0.087553242,,1.126581418,,66.21860465,185,R,9,,9,,
-30005,202001,100,844,5,,0.941234172,,0.941234172,,1.930792743,96.75644028,844,R,,10,12,,
-30005,202002,100,897,5,1.062434865,3.199201198,1.062434865,3.199201198,6.802558774,4.305953095,76.3852459,897,R,10,9,12,,
-30005,202003,100,280,5,0.312578027,,0.312578027,,1.126581418,,66.21860465,280,R,9,,9,,
-30006,202001,100,1869,14,,0.995885563,,0.995885563,,1.930792743,96.75644028,1869,R,,10,12,,
-30006,202002,100,1876,14,1.004131435,1.368417982,1.004131435,1.368417982,6.802558774,4.305953095,76.3852459,1876,R,10,9,12,,
-30006,202003,100,1371,14,0.730770871,,0.730770871,,1.126581418,,66.21860465,1371,R,9,,9,,
-30007,202001,100,12769,12,,4.475816911,,4.475816911,,1.930792743,96.75644028,12769,R,,10,12,,
-30007,202002,100,2853,12,0.223422901,0.248269056,0.223422901,0.248269056,6.802558774,4.305953095,76.3852459,2853,R,10,9,12,,
-30007,202003,100,11491,12,4.027888195,,4.027888195,,1.126581418,,66.21860465,11491,R,9,,9,,
-30008,202001,100,141,162,,0.023463069,,,,1.930792743,96.75644028,141,R,,10,12,,TRUE
-30008,202002,100,6001,162,42.62017045,13.86213906,,13.86213906,6.802558774,4.305953095,76.3852459,6001,R,10,9,12,TRUE,
-30008,202003,100,433,162,0.072138939,,0.072138939,,1.126581418,,66.21860465,433,R,9,,9,,
-30009,202001,100,6417,26,,1.589639934,,1.589639934,,1.930792743,96.75644028,6417,R,,10,12,,
-30009,202002,100,4037,26,0.629073275,3.053782962,0.629073275,3.053782962,6.802558774,4.305953095,76.3852459,4037,R,10,9,12,,
-30009,202003,100,1322,26,0.327462695,,0.327462695,,1.126581418,,66.21860465,1322,R,9,,9,,
-30010,202001,100,28963,144,,1.332623847,,1.332623847,,1.930792743,96.75644028,28963,R,,10,12,,
-30010,202002,100,21734,144,0.750399298,,0.750399298,,6.802558774,4.305953095,76.3852459,21734,R,10,9,12,,
-30011,202001,100,6009,5,,5.249464902,,,,1.930792743,96.75644028,6009,R,,10,12,,TRUE
-30011,202002,100,1145,5,0.190495606,,,,6.802558774,4.305953095,76.3852459,1145,R,10,9,12,TRUE,
-30012,202001,100,256,275,,0.034032235,,0.034032235,,1.930792743,96.75644028,256,R,,10,12,,
-30012,202002,100,7522,275,29.38390625,,29.38390625,,6.802558774,4.305953095,76.3852459,7522,R,10,9,12,,
-30012,202003,100,,275,,,,,1.126581418,,66.21860465,8474.145427,FIR,9,,9,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,51,,1.129481006,,1.598925527,96.75644028,8444,R,,10,12,,
+30001,202002,100,51,0.885362387,3.732401398,6.802558774,4.305953095,76.3852459,7476,R,10,9,12,,
+30001,202003,100,51,0.267924024,,1.126581418,,66.21860465,2003,R,9,,9,,
+30002,202001,100,72,,1.195062676,,1.930792743,96.75644028,9343,R,,10,12,,
+30002,202002,100,72,0.836776196,1.596487645,6.802558774,4.305953095,76.3852459,7818,R,10,9,12,,
+30002,202003,100,72,0.626375032,,1.126581418,,66.21860465,4897,R,9,,9,,
+30003,202001,100,7,,4.265190233,,1.930792743,96.75644028,7511,R,,10,12,,
+30003,202002,100,7,0.234456131,0.271256932,6.802558774,4.305953095,76.3852459,1761,R,10,9,12,,
+30003,202003,100,7,3.686541738,,1.126581418,,66.21860465,6492,R,9,,9,,
+30004,202001,100,81,,0.030288689,,1.930792743,96.75644028,64,R,,10,12,,
+30004,202002,100,81,33.015625,11.42162162,6.802558774,4.305953095,76.3852459,2113,R,10,9,12,,
+30004,202003,100,81,0.087553242,,1.126581418,,66.21860465,185,R,9,,9,,
+30005,202001,100,5,,0.941234172,,1.930792743,96.75644028,844,R,,10,12,,
+30005,202002,100,5,1.062434865,3.199201198,6.802558774,4.305953095,76.3852459,897,R,10,9,12,,
+30005,202003,100,5,0.312578027,,1.126581418,,66.21860465,280,R,9,,9,,
+30006,202001,100,14,,0.995885563,,1.930792743,96.75644028,1869,R,,10,12,,
+30006,202002,100,14,1.004131435,1.368417982,6.802558774,4.305953095,76.3852459,1876,R,10,9,12,,
+30006,202003,100,14,0.730770871,,1.126581418,,66.21860465,1371,R,9,,9,,
+30007,202001,100,12,,4.475816911,,1.930792743,96.75644028,12769,R,,10,12,,
+30007,202002,100,12,0.223422901,0.248269056,6.802558774,4.305953095,76.3852459,2853,R,10,9,12,,
+30007,202003,100,12,4.027888195,,1.126581418,,66.21860465,11491,R,9,,9,,
+30008,202001,100,162,,0.023463069,,1.930792743,96.75644028,141,R,,10,12,,TRUE
+30008,202002,100,162,42.62017045,13.86213906,6.802558774,4.305953095,76.3852459,6001,R,10,9,12,TRUE,
+30008,202003,100,162,0.072138939,,1.126581418,,66.21860465,433,R,9,,9,,
+30009,202001,100,26,,1.589639934,,1.930792743,96.75644028,6417,R,,10,12,,
+30009,202002,100,26,0.629073275,3.053782962,6.802558774,4.305953095,76.3852459,4037,R,10,9,12,,
+30009,202003,100,26,0.327462695,,1.126581418,,66.21860465,1322,R,9,,9,,
+30010,202001,100,144,,1.332623847,,1.930792743,96.75644028,28963,R,,10,12,,
+30010,202002,100,144,0.750399298,,6.802558774,4.305953095,76.3852459,21734,R,10,9,12,,
+30011,202001,100,5,,5.249464902,,1.930792743,96.75644028,6009,R,,10,12,,TRUE
+30011,202002,100,5,0.190495606,,6.802558774,4.305953095,76.3852459,1145,R,10,9,12,TRUE,
+30012,202001,100,275,,0.034032235,,1.930792743,96.75644028,256,R,,10,12,,
+30012,202002,100,275,29.38390625,,6.802558774,4.305953095,76.3852459,7522,R,10,9,12,,
+30012,202003,100,275,,,1.126581418,,66.21860465,8474.145427,FIR,9,,9,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
index c467a5e5..d272a9de 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
-90001,202001,100,9244,89,,1.036787797,,1.036787797,,1.504436071,128.8429705,9244,R,,17,19,,,
-90001,202002,100,8916,89,0.964517525,1.43945754,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,8916,R,17,18,20,,,
-90001,202003,100,6194,89,0.694706146,,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,,
-90002,202001,100,4826,83,,0.817550398,,0.817550398,,1.504436071,128.8429705,4826,R,,17,19,,,
-90002,202002,100,5903,83,1.223166183,1.244570947,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,5903,R,17,18,20,,,
-90002,202003,100,4743,83,0.803489751,,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,,
-90003,202001,100,7586,4,,,,,,1.504436071,128.8429705,7586,R,,17,19,,,TRUE
-90003,202002,100,1016,4,,0.710986704,,0.710986704,0.95177292,1.082813901,113.3255814,1016,R,17,18,20,,,
-90003,202003,100,1429,4,1.406496063,,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,,
-90004,202001,100,3975,76,,1.305847569,,1.305847569,,1.504436071,128.8429705,3975,R,,17,19,,,
-90004,202002,100,3044,76,0.765786164,0.82875034,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,3044,R,17,18,20,,,
-90004,202003,100,3673,76,1.206636005,,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,,
-90005,202001,100,1941,18,,0.622072678,,0.622072678,,1.504436071,128.8429705,1941,R,,17,19,,,
-90005,202002,100,3121,18,1.607529208,2.583641738,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,3121,R,17,18,20,,,
-90005,202003,100,1208,18,0.387050567,,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,,
-90006,202001,100,5405,94,,0.763047038,,0.763047038,,1.504436071,128.8429705,5405,R,,17,19,,,
-90006,202002,100,7084,94,1.310535196,1.422366796,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,7084,R,17,18,20,,,
-90006,202003,100,4980,94,0.703053532,,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,,
-90007,202001,100,15172,8,,5.333239595,,5.333239595,,1.504436071,128.8429705,15172,R,,17,19,,,
-90007,202002,100,2845,8,0.187503296,0.812556233,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,2845,R,17,18,20,,,
-90007,202003,100,3501,8,1.230684055,,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,,
-90008,202001,100,16298,304,,1.129530598,,1.129530598,,1.504436071,128.8429705,16298,R,,17,19,,,
-90008,202002,100,14429,304,0.885323516,1.009357249,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,14429,R,17,18,20,,,
-90008,202003,100,14295,304,0.990729498,,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,,
-90009,202001,100,3698,45,,0.740562712,,0.740562712,,1.504436071,128.8429705,3698,R,,17,19,,,
-90009,202002,100,4993,45,1.350324535,1.185435621,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,4993,R,17,18,20,,,
-90009,202003,100,4212,45,0.843571749,,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,,
-90010,202001,100,7722,100,,0.760511998,,0.760511998,,1.504436071,128.8429705,7722,R,,17,19,,,
-90010,202002,100,10153,100,1.314903647,1.551204368,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,10153,R,17,18,20,,,
-90010,202003,100,6545,100,0.644660382,,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,,
-90011,202001,100,30344,19,,8.365866031,,,,1.504436071,128.8429705,30344,R,,17,19,,TRUE,
-90011,202002,100,3627,19,0.119533351,0.497690693,,0.497690693,0.95177292,1.082813901,113.3255814,3627,R,17,18,20,TRUE,,
-90011,202003,100,7288,19,2.00928009,,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,,
-90012,202001,100,16298,304,,1.408940798,,1.408940798,,1.504436071,128.8429705,16298,R,,17,19,,,
-90012,202002,100,11567,304,0.70975303,0.857831504,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,11567,R,17,18,20,,,
-90012,202003,100,13484,304,1.165730094,,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,,
-90013,202001,100,20190,54,,1.106799294,,1.106799294,,1.504436071,128.8429705,20190,R,,17,19,,,
-90013,202002,100,18242,54,0.903506178,0.632817595,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,18242,R,17,18,20,,,
-90013,202003,100,28826,54,1.58023419,,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,,
-90014,202001,100,4260,47,,0.845985046,,0.845985046,,1.504436071,128.8429705,4260,R,,17,19,,,
-90014,202002,100,5036,42,1.182053991,0.776557765,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,5036,R,17,18,20,,,
-90014,202003,100,6484,42,1.28773421,,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,,
-90015,202001,100,19236,57,,3.886845827,,3.886845827,,1.504436071,128.8429705,19236,R,,17,19,,,
-90015,202002,100,4949,57,0.25727802,1.396267404,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,4949,R,17,18,20,,,
-90015,202003,100,3544,57,0.716195191,,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,,
-90016,202001,100,14902,163,,0.906730921,,0.906730921,,1.504436071,128.8429705,14902,R,,17,19,,,
-90016,202002,100,16435,163,1.102863018,0.666628808,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,16435,R,17,18,20,,,
-90016,202003,100,24653,163,1.500085186,,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,,
-90017,202001,100,35476,149,,0.702275751,,0.702275751,,1.504436071,128.8429705,35476,R,,17,19,,,
-90017,202002,100,50515,149,1.42394209,0.944611909,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,50515,R,17,18,20,,,
-90017,202003,100,53477,149,1.058635817,,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,,
-90018,202001,100,13845,126,,0.543204684,,,,1.504436071,128.8429705,13845,R,,17,19,,TRUE,
-90018,202002,100,25488,126,1.840926688,0.929916997,,0.929916997,0.95177292,1.082813901,113.3255814,25488,R,17,18,20,TRUE,,
-90018,202003,100,27409,126,1.075364795,,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,,
-90019,202001,100,1099,6,,2.530969376,,2.530969376,,1.504436071,128.8429705,1099,R,,17,19,,,
-90019,202002,100,434,6,0.395105531,3.51659919,0.395105531,,0.95177292,1.082813901,113.3255814,434,R,17,18,20,,TRUE,
-90019,202003,100,124,6,0.284365646,,,,1.072463185,,126.2596455,124,R,18,,21,TRUE,,
-90020,202001,100,3348,22,,1.677715809,,1.677715809,,1.504436071,128.8429705,3348,R,,17,19,,,
-90020,202002,100,1996,22,0.596048505,0.395102278,0.596048505,,0.95177292,1.082813901,113.3255814,1996,R,17,18,20,,TRUE,
-90020,202003,100,5051,22,2.530990214,,,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,,
-90021,202001,100,,155,,,,,,1.504436071,128.8429705,34284.44522,BI,,17,19,,,
-90021,202002,100,,155,,,,,0.95177292,1.082813901,113.3255814,22788.90136,BI,17,18,20,,,
-90021,202003,100,21046,155,,,,,1.072463185,,126.2596455,21046,R,18,,21,,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+90001,202001,100,89,,1.036787797,,1.504436071,128.8429705,9244,R,,17,19,,,
+90001,202002,100,89,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,8916,R,17,18,20,,,
+90001,202003,100,89,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,,
+90002,202001,100,83,,0.817550398,,1.504436071,128.8429705,4826,R,,17,19,,,
+90002,202002,100,83,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,5903,R,17,18,20,,,
+90002,202003,100,83,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,,
+90003,202001,100,4,,,,1.504436071,128.8429705,7586,R,,17,19,,,TRUE
+90003,202002,100,4,,0.710986704,0.95177292,1.082813901,113.3255814,1016,R,17,18,20,,,
+90003,202003,100,4,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,,
+90004,202001,100,76,,1.305847569,,1.504436071,128.8429705,3975,R,,17,19,,,
+90004,202002,100,76,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,3044,R,17,18,20,,,
+90004,202003,100,76,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,,
+90005,202001,100,18,,0.622072678,,1.504436071,128.8429705,1941,R,,17,19,,,
+90005,202002,100,18,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,3121,R,17,18,20,,,
+90005,202003,100,18,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,,
+90006,202001,100,94,,0.763047038,,1.504436071,128.8429705,5405,R,,17,19,,,
+90006,202002,100,94,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,7084,R,17,18,20,,,
+90006,202003,100,94,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,,
+90007,202001,100,8,,5.333239595,,1.504436071,128.8429705,15172,R,,17,19,,,
+90007,202002,100,8,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,2845,R,17,18,20,,,
+90007,202003,100,8,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,,
+90008,202001,100,304,,1.129530598,,1.504436071,128.8429705,16298,R,,17,19,,,
+90008,202002,100,304,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,14429,R,17,18,20,,,
+90008,202003,100,304,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,,
+90009,202001,100,45,,0.740562712,,1.504436071,128.8429705,3698,R,,17,19,,,
+90009,202002,100,45,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,4993,R,17,18,20,,,
+90009,202003,100,45,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,,
+90010,202001,100,100,,0.760511998,,1.504436071,128.8429705,7722,R,,17,19,,,
+90010,202002,100,100,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,10153,R,17,18,20,,,
+90010,202003,100,100,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,,
+90011,202001,100,19,,8.365866031,,1.504436071,128.8429705,30344,R,,17,19,,TRUE,
+90011,202002,100,19,0.119533351,0.497690693,0.95177292,1.082813901,113.3255814,3627,R,17,18,20,TRUE,,
+90011,202003,100,19,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,,
+90012,202001,100,304,,1.408940798,,1.504436071,128.8429705,16298,R,,17,19,,,
+90012,202002,100,304,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,11567,R,17,18,20,,,
+90012,202003,100,304,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,,
+90013,202001,100,54,,1.106799294,,1.504436071,128.8429705,20190,R,,17,19,,,
+90013,202002,100,54,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,18242,R,17,18,20,,,
+90013,202003,100,54,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,,
+90014,202001,100,47,,0.845985046,,1.504436071,128.8429705,4260,R,,17,19,,,
+90014,202002,100,42,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,5036,R,17,18,20,,,
+90014,202003,100,42,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,,
+90015,202001,100,57,,3.886845827,,1.504436071,128.8429705,19236,R,,17,19,,,
+90015,202002,100,57,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,4949,R,17,18,20,,,
+90015,202003,100,57,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,,
+90016,202001,100,163,,0.906730921,,1.504436071,128.8429705,14902,R,,17,19,,,
+90016,202002,100,163,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,16435,R,17,18,20,,,
+90016,202003,100,163,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,,
+90017,202001,100,149,,0.702275751,,1.504436071,128.8429705,35476,R,,17,19,,,
+90017,202002,100,149,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,50515,R,17,18,20,,,
+90017,202003,100,149,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,,
+90018,202001,100,126,,0.543204684,,1.504436071,128.8429705,13845,R,,17,19,,TRUE,
+90018,202002,100,126,1.840926688,0.929916997,0.95177292,1.082813901,113.3255814,25488,R,17,18,20,TRUE,,
+90018,202003,100,126,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,,
+90019,202001,100,6,,2.530969376,,1.504436071,128.8429705,1099,R,,17,19,,,
+90019,202002,100,6,0.395105531,3.51659919,0.95177292,1.082813901,113.3255814,434,R,17,18,20,,TRUE,
+90019,202003,100,6,0.284365646,,1.072463185,,126.2596455,124,R,18,,21,TRUE,,
+90020,202001,100,22,,1.677715809,,1.504436071,128.8429705,3348,R,,17,19,,,
+90020,202002,100,22,0.596048505,0.395102278,0.95177292,1.082813901,113.3255814,1996,R,17,18,20,,TRUE,
+90020,202003,100,22,2.530990214,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,,
+90021,202001,100,155,,,,1.504436071,128.8429705,34284.44522,BI,,17,19,,,
+90021,202002,100,155,,,0.95177292,1.082813901,113.3255814,22788.90136,BI,17,18,20,,,
+90021,202003,100,155,,,1.072463185,,126.2596455,21046,R,18,,21,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index c3a9063d..be73ac7a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
-30001,202001,100,8444,51,,1.129481006,,1.129481006,,1.162271841,96.73383283,8444,R,,2,12,,
-30001,202002,100,7476,51,0.885362387,3.732401398,0.885362387,,0.861069292,2.064295653,76.3675837,7476,R,2,1,12,,TRUE
-30001,202003,100,2003,51,0.267924024,,,,0.484426733,,76.13443331,2003,R,1,,11,TRUE,
-30002,202001,100,9343,72,,1.195062676,,1.195062676,,1.162271841,96.73383283,9343,R,,2,12,,
-30002,202002,100,7818,72,0.836776196,1.596487645,0.836776196,,0.861069292,2.064295653,76.3675837,7818,R,2,1,12,,TRUE
-30002,202003,100,4897,72,0.626375032,,,,0.484426733,,76.13443331,4897,R,1,,11,TRUE,
-30003,202001,100,7511,7,,4.265190233,,,,1.162271841,96.73383283,7511,R,,2,12,,TRUE
-30003,202002,100,1761,7,0.234456131,0.271256932,,,0.861069292,2.064295653,76.3675837,1761,R,2,1,12,TRUE,TRUE
-30003,202003,100,6492,7,3.686541738,,,,0.484426733,,76.13443331,6492,R,1,,11,TRUE,
-30004,202001,100,64,81,,0.030288689,,,,1.162271841,96.73383283,64,R,,2,12,,TRUE
-30004,202002,100,2113,81,33.015625,11.42162162,,,0.861069292,2.064295653,76.3675837,2113,R,2,1,12,TRUE,TRUE
-30004,202003,100,185,81,0.087553242,,,,0.484426733,,76.13443331,185,R,1,,11,TRUE,
-30005,202001,100,844,5,,0.941234172,,,,1.162271841,96.73383283,844,R,,2,12,,TRUE
-30005,202002,100,897,5,1.062434865,3.199201198,,,0.861069292,2.064295653,76.3675837,897,R,2,1,12,TRUE,TRUE
-30005,202003,100,280,5,0.312578027,,,,0.484426733,,76.13443331,280,R,1,,11,TRUE,
-30006,202001,100,1869,14,,0.995885563,,,,1.162271841,96.73383283,1869,R,,2,12,,TRUE
-30006,202002,100,1876,14,1.004131435,1.368417982,,,0.861069292,2.064295653,76.3675837,1876,R,2,1,12,TRUE,TRUE
-30006,202003,100,1371,14,0.730770871,,,,0.484426733,,76.13443331,1371,R,1,,11,TRUE,
-30007,202001,100,12769,12,,4.475816911,,,,1.162271841,96.73383283,12769,R,,2,12,,TRUE
-30007,202002,100,2853,12,0.223422901,0.248269056,,,0.861069292,2.064295653,76.3675837,2853,R,2,1,12,TRUE,TRUE
-30007,202003,100,11491,12,4.027888195,,,,0.484426733,,76.13443331,11491,R,1,,11,TRUE,
-30008,202001,100,141,162,,0.023463069,,,,1.162271841,96.73383283,141,R,,2,12,,TRUE
-30008,202002,100,6001,162,42.62017045,13.86213906,,,0.861069292,2.064295653,76.3675837,6001,R,2,1,12,TRUE,TRUE
-30008,202003,100,433,162,0.072138939,,,,0.484426733,,76.13443331,433,R,1,,11,TRUE,
-30009,202001,100,6417,26,,1.589639934,,,,1.162271841,96.73383283,6417,R,,2,12,,TRUE
-30009,202002,100,4037,26,0.629073275,3.053782962,,,0.861069292,2.064295653,76.3675837,4037,R,2,1,12,TRUE,TRUE
-30009,202003,100,1322,26,0.327462695,,,,0.484426733,,76.13443331,1322,R,1,,11,TRUE,
-30010,202001,100,28963,144,,1.332623847,,,,1.162271841,96.73383283,28963,R,,2,12,,TRUE
-30010,202002,100,21734,144,0.750399298,2.064295653,,2.064295653,0.861069292,2.064295653,76.3675837,21734,R,2,1,12,TRUE,
-30010,202003,100,10529,144,0.484426733,,0.484426733,,0.484426733,,76.13443331,10529,R,1,,11,,
-30011,202001,100,6009,5,,5.249464902,,,,1.162271841,96.73383283,6009,R,,2,12,,TRUE
-30011,202002,100,1145,5,0.190495606,0.226047443,,,0.861069292,2.064295653,76.3675837,1145,R,2,1,12,TRUE,TRUE
-30011,202003,100,5064,5,4.423850085,,,,0.484426733,,76.13443331,5064,R,1,,11,TRUE,
-30012,202001,100,256,275,,0.034032235,,,,1.162271841,96.73383283,256,R,,2,12,,TRUE
-30012,202002,100,7522,275,29.38390625,,,,0.861069292,2.064295653,76.3675837,7522,R,2,1,12,TRUE,
-30012,202003,100,,275,,,,,0.484426733,,76.13443331,3643.857886,FIR,1,,11,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,51,,1.129481006,,1.162271841,96.73383283,8444,R,,2,12,,
+30001,202002,100,51,0.885362387,3.732401398,0.861069292,2.064295653,76.3675837,7476,R,2,1,12,,TRUE
+30001,202003,100,51,0.267924024,,0.484426733,,76.13443331,2003,R,1,,11,TRUE,
+30002,202001,100,72,,1.195062676,,1.162271841,96.73383283,9343,R,,2,12,,
+30002,202002,100,72,0.836776196,1.596487645,0.861069292,2.064295653,76.3675837,7818,R,2,1,12,,TRUE
+30002,202003,100,72,0.626375032,,0.484426733,,76.13443331,4897,R,1,,11,TRUE,
+30003,202001,100,7,,4.265190233,,1.162271841,96.73383283,7511,R,,2,12,,TRUE
+30003,202002,100,7,0.234456131,0.271256932,0.861069292,2.064295653,76.3675837,1761,R,2,1,12,TRUE,TRUE
+30003,202003,100,7,3.686541738,,0.484426733,,76.13443331,6492,R,1,,11,TRUE,
+30004,202001,100,81,,0.030288689,,1.162271841,96.73383283,64,R,,2,12,,TRUE
+30004,202002,100,81,33.015625,11.42162162,0.861069292,2.064295653,76.3675837,2113,R,2,1,12,TRUE,TRUE
+30004,202003,100,81,0.087553242,,0.484426733,,76.13443331,185,R,1,,11,TRUE,
+30005,202001,100,5,,0.941234172,,1.162271841,96.73383283,844,R,,2,12,,TRUE
+30005,202002,100,5,1.062434865,3.199201198,0.861069292,2.064295653,76.3675837,897,R,2,1,12,TRUE,TRUE
+30005,202003,100,5,0.312578027,,0.484426733,,76.13443331,280,R,1,,11,TRUE,
+30006,202001,100,14,,0.995885563,,1.162271841,96.73383283,1869,R,,2,12,,TRUE
+30006,202002,100,14,1.004131435,1.368417982,0.861069292,2.064295653,76.3675837,1876,R,2,1,12,TRUE,TRUE
+30006,202003,100,14,0.730770871,,0.484426733,,76.13443331,1371,R,1,,11,TRUE,
+30007,202001,100,12,,4.475816911,,1.162271841,96.73383283,12769,R,,2,12,,TRUE
+30007,202002,100,12,0.223422901,0.248269056,0.861069292,2.064295653,76.3675837,2853,R,2,1,12,TRUE,TRUE
+30007,202003,100,12,4.027888195,,0.484426733,,76.13443331,11491,R,1,,11,TRUE,
+30008,202001,100,162,,0.023463069,,1.162271841,96.73383283,141,R,,2,12,,TRUE
+30008,202002,100,162,42.62017045,13.86213906,0.861069292,2.064295653,76.3675837,6001,R,2,1,12,TRUE,TRUE
+30008,202003,100,162,0.072138939,,0.484426733,,76.13443331,433,R,1,,11,TRUE,
+30009,202001,100,26,,1.589639934,,1.162271841,96.73383283,6417,R,,2,12,,TRUE
+30009,202002,100,26,0.629073275,3.053782962,0.861069292,2.064295653,76.3675837,4037,R,2,1,12,TRUE,TRUE
+30009,202003,100,26,0.327462695,,0.484426733,,76.13443331,1322,R,1,,11,TRUE,
+30010,202001,100,144,,1.332623847,,1.162271841,96.73383283,28963,R,,2,12,,TRUE
+30010,202002,100,144,0.750399298,2.064295653,0.861069292,2.064295653,76.3675837,21734,R,2,1,12,TRUE,
+30010,202003,100,144,0.484426733,,0.484426733,,76.13443331,10529,R,1,,11,,
+30011,202001,100,5,,5.249464902,,1.162271841,96.73383283,6009,R,,2,12,,TRUE
+30011,202002,100,5,0.190495606,0.226047443,0.861069292,2.064295653,76.3675837,1145,R,2,1,12,TRUE,TRUE
+30011,202003,100,5,4.423850085,,0.484426733,,76.13443331,5064,R,1,,11,TRUE,
+30012,202001,100,275,,0.034032235,,1.162271841,96.73383283,256,R,,2,12,,TRUE
+30012,202002,100,275,29.38390625,,0.861069292,2.064295653,76.3675837,7522,R,2,1,12,TRUE,
+30012,202003,100,275,,,0.484426733,,76.13443331,3643.857886,FIR,1,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
index af208011..fc05669e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
-30001,202001,100,8444,51,,,,,,1,61.12436116,8444,R,,0,9,,,TRUE
-30001,202002,100,7476,51,,,,,1,1,48.04940375,7476,R,0,0,9,,,TRUE
-30001,202003,100,2003,51,,,,,1,,85.37820513,2003,R,0,,10,,,TRUE
-30002,202001,100,9343,72,,,,,,1,61.12436116,9343,R,,0,9,,,TRUE
-30002,202002,100,7818,72,,,,,1,1,48.04940375,7818,R,0,0,9,,,TRUE
-30002,202003,100,4897,72,,,,,1,,85.37820513,4897,R,0,,10,,,TRUE
-30003,202001,100,7511,7,,4.265190233,,,,1,61.12436116,7511,R,,0,9,,TRUE,
-30003,202002,100,1761,7,0.234456131,0.271256932,,,1,1,48.04940375,1761,R,0,0,9,TRUE,TRUE,
-30003,202003,100,6492,7,3.686541738,,,,1,,85.37820513,6492,R,0,,10,TRUE,,
-30004,202001,100,64,81,,0.030288689,,,,1,61.12436116,64,R,,0,9,,TRUE,
-30004,202002,100,2113,81,33.015625,11.42162162,,,1,1,48.04940375,2113,R,0,0,9,TRUE,TRUE,
-30004,202003,100,185,81,0.087553242,,,,1,,85.37820513,185,R,0,,10,TRUE,,
-30005,202001,100,844,5,,0.941234172,,,,1,61.12436116,844,R,,0,9,,TRUE,
-30005,202002,100,897,5,1.062434865,3.199201198,,,1,1,48.04940375,897,R,0,0,9,TRUE,TRUE,
-30005,202003,100,280,5,0.312578027,,,,1,,85.37820513,280,R,0,,10,TRUE,,
-30006,202001,100,1869,14,,0.995885563,,,,1,61.12436116,1869,R,,0,9,,TRUE,
-30006,202002,100,1876,14,1.004131435,1.368417982,,,1,1,48.04940375,1876,R,0,0,9,TRUE,TRUE,
-30006,202003,100,1371,14,0.730770871,,,,1,,85.37820513,1371,R,0,,10,TRUE,,
-30007,202001,100,12769,12,,4.475816911,,,,1,61.12436116,12769,R,,0,9,,TRUE,
-30007,202002,100,2853,12,0.223422901,0.248269056,,,1,1,48.04940375,2853,R,0,0,9,TRUE,TRUE,
-30007,202003,100,11491,12,4.027888195,,,,1,,85.37820513,11491,R,0,,10,TRUE,,
-30008,202001,100,141,162,,0.023463069,,,,1,61.12436116,141,R,,0,9,,TRUE,
-30008,202002,100,6001,162,42.62017045,13.86213906,,,1,1,48.04940375,6001,R,0,0,9,TRUE,TRUE,
-30008,202003,100,433,162,0.072138939,,,,1,,85.37820513,433,R,0,,10,TRUE,,
-30009,202001,100,6417,26,,1.589639934,,,,1,61.12436116,6417,R,,0,9,,TRUE,
-30009,202002,100,4037,26,0.629073275,3.053782962,,,1,1,48.04940375,4037,R,0,0,9,TRUE,TRUE,
-30009,202003,100,1322,26,0.327462695,,,,1,,85.37820513,1322,R,0,,10,TRUE,,
-30010,202001,100,28963,144,,,,,,1,61.12436116,28963,R,,0,9,,,TRUE
-30010,202002,100,21734,144,,,,,1,1,48.04940375,21734,R,0,0,9,,,TRUE
-30010,202003,100,10529,144,,,,,1,,85.37820513,10529,R,0,,10,,,TRUE
-30011,202001,100,6009,5,,5.249464902,,,,1,61.12436116,6009,R,,0,9,,TRUE,
-30011,202002,100,1145,5,0.190495606,0.226047443,,,1,1,48.04940375,1145,R,0,0,9,TRUE,TRUE,
-30011,202003,100,5064,5,4.423850085,,,,1,,85.37820513,5064,R,0,,10,TRUE,,
-30012,202001,100,256,275,,0.034032235,,,,1,61.12436116,256,R,,0,9,,TRUE,
-30012,202002,100,7522,275,29.38390625,,,,1,1,48.04940375,7522,R,0,0,9,TRUE,,
-30012,202003,100,,275,,,,,1,,85.37820513,7522,FIR,0,,10,,,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+30001,202001,100,51,,,,1,61.12436116,8444,R,,0,9,,,TRUE
+30001,202002,100,51,,,1,1,48.04940375,7476,R,0,0,9,,,TRUE
+30001,202003,100,51,,,1,,85.37820513,2003,R,0,,10,,,TRUE
+30002,202001,100,72,,,,1,61.12436116,9343,R,,0,9,,,TRUE
+30002,202002,100,72,,,1,1,48.04940375,7818,R,0,0,9,,,TRUE
+30002,202003,100,72,,,1,,85.37820513,4897,R,0,,10,,,TRUE
+30003,202001,100,7,,4.265190233,,1,61.12436116,7511,R,,0,9,,TRUE,
+30003,202002,100,7,0.234456131,0.271256932,1,1,48.04940375,1761,R,0,0,9,TRUE,TRUE,
+30003,202003,100,7,3.686541738,,1,,85.37820513,6492,R,0,,10,TRUE,,
+30004,202001,100,81,,0.030288689,,1,61.12436116,64,R,,0,9,,TRUE,
+30004,202002,100,81,33.015625,11.42162162,1,1,48.04940375,2113,R,0,0,9,TRUE,TRUE,
+30004,202003,100,81,0.087553242,,1,,85.37820513,185,R,0,,10,TRUE,,
+30005,202001,100,5,,0.941234172,,1,61.12436116,844,R,,0,9,,TRUE,
+30005,202002,100,5,1.062434865,3.199201198,1,1,48.04940375,897,R,0,0,9,TRUE,TRUE,
+30005,202003,100,5,0.312578027,,1,,85.37820513,280,R,0,,10,TRUE,,
+30006,202001,100,14,,0.995885563,,1,61.12436116,1869,R,,0,9,,TRUE,
+30006,202002,100,14,1.004131435,1.368417982,1,1,48.04940375,1876,R,0,0,9,TRUE,TRUE,
+30006,202003,100,14,0.730770871,,1,,85.37820513,1371,R,0,,10,TRUE,,
+30007,202001,100,12,,4.475816911,,1,61.12436116,12769,R,,0,9,,TRUE,
+30007,202002,100,12,0.223422901,0.248269056,1,1,48.04940375,2853,R,0,0,9,TRUE,TRUE,
+30007,202003,100,12,4.027888195,,1,,85.37820513,11491,R,0,,10,TRUE,,
+30008,202001,100,162,,0.023463069,,1,61.12436116,141,R,,0,9,,TRUE,
+30008,202002,100,162,42.62017045,13.86213906,1,1,48.04940375,6001,R,0,0,9,TRUE,TRUE,
+30008,202003,100,162,0.072138939,,1,,85.37820513,433,R,0,,10,TRUE,,
+30009,202001,100,26,,1.589639934,,1,61.12436116,6417,R,,0,9,,TRUE,
+30009,202002,100,26,0.629073275,3.053782962,1,1,48.04940375,4037,R,0,0,9,TRUE,TRUE,
+30009,202003,100,26,0.327462695,,1,,85.37820513,1322,R,0,,10,TRUE,,
+30010,202001,100,144,,,,1,61.12436116,28963,R,,0,9,,,TRUE
+30010,202002,100,144,,,1,1,48.04940375,21734,R,0,0,9,,,TRUE
+30010,202003,100,144,,,1,,85.37820513,10529,R,0,,10,,,TRUE
+30011,202001,100,5,,5.249464902,,1,61.12436116,6009,R,,0,9,,TRUE,
+30011,202002,100,5,0.190495606,0.226047443,1,1,48.04940375,1145,R,0,0,9,TRUE,TRUE,
+30011,202003,100,5,4.423850085,,1,,85.37820513,5064,R,0,,10,TRUE,,
+30012,202001,100,275,,0.034032235,,1,61.12436116,256,R,,0,9,,TRUE,
+30012,202002,100,275,29.38390625,,1,1,48.04940375,7522,R,0,0,9,TRUE,,
+30012,202003,100,275,,,1,,85.37820513,7522,FIR,0,,10,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
index 40c8c4b2..fd5cdd93 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,default_construction_link,filtered_marker
-30001,202001,100,8444,0,,,,,,1,1,8444,R,,0,9,,,TRUE,TRUE
-30001,202002,100,7476,0,,,,,1,1,1,7476,R,0,0,9,,,TRUE,TRUE
-30001,202003,100,2003,0,,,,,1,,1,2003,R,0,,10,,,TRUE,TRUE
-30002,202001,100,9343,0,,,,,,1,1,9343,R,,0,9,,,TRUE,TRUE
-30002,202002,100,7818,0,,,,,1,1,1,7818,R,0,0,9,,,TRUE,TRUE
-30002,202003,100,4897,0,,,,,1,,1,4897,R,0,,10,,,TRUE,TRUE
-30003,202001,100,7511,0,,4.265190233,,,,1,1,7511,R,,0,9,,TRUE,TRUE,
-30003,202002,100,1761,0,0.234456131,0.271256932,,,1,1,1,1761,R,0,0,9,TRUE,TRUE,TRUE,
-30003,202003,100,6492,0,3.686541738,,,,1,,1,6492,R,0,,10,TRUE,,TRUE,
-30004,202001,100,64,0,,0.030288689,,,,1,1,64,R,,0,9,,TRUE,TRUE,
-30004,202002,100,2113,0,33.015625,11.42162162,,,1,1,1,2113,R,0,0,9,TRUE,TRUE,TRUE,
-30004,202003,100,185,0,0.087553242,,,,1,,1,185,R,0,,10,TRUE,,TRUE,
-30005,202001,100,844,0,,0.941234172,,,,1,1,844,R,,0,9,,TRUE,TRUE,
-30005,202002,100,897,0,1.062434865,3.199201198,,,1,1,1,897,R,0,0,9,TRUE,TRUE,TRUE,
-30005,202003,100,280,0,0.312578027,,,,1,,1,280,R,0,,10,TRUE,,TRUE,
-30006,202001,100,1869,0,,0.995885563,,,,1,1,1869,R,,0,9,,TRUE,TRUE,
-30006,202002,100,1876,0,1.004131435,1.368417982,,,1,1,1,1876,R,0,0,9,TRUE,TRUE,TRUE,
-30006,202003,100,1371,0,0.730770871,,,,1,,1,1371,R,0,,10,TRUE,,TRUE,
-30007,202001,100,12769,0,,4.475816911,,,,1,1,12769,R,,0,9,,TRUE,TRUE,
-30007,202002,100,2853,0,0.223422901,0.248269056,,,1,1,1,2853,R,0,0,9,TRUE,TRUE,TRUE,
-30007,202003,100,11491,0,4.027888195,,,,1,,1,11491,R,0,,10,TRUE,,TRUE,
-30008,202001,100,141,0,,0.023463069,,,,1,1,141,R,,0,9,,TRUE,TRUE,
-30008,202002,100,6001,0,42.62017045,13.86213906,,,1,1,1,6001,R,0,0,9,TRUE,TRUE,TRUE,
-30008,202003,100,433,0,0.072138939,,,,1,,1,433,R,0,,10,TRUE,,TRUE,
-30009,202001,100,6417,0,,1.589639934,,,,1,1,6417,R,,0,9,,TRUE,TRUE,
-30009,202002,100,4037,0,0.629073275,3.053782962,,,1,1,1,4037,R,0,0,9,TRUE,TRUE,TRUE,
-30009,202003,100,1322,0,0.327462695,,,,1,,1,1322,R,0,,10,TRUE,,TRUE,
-30010,202001,100,28963,0,,,,,,1,1,28963,R,,0,9,,,TRUE,TRUE
-30010,202002,100,21734,0,,,,,1,1,1,21734,R,0,0,9,,,TRUE,TRUE
-30010,202003,100,10529,0,,,,,1,,1,10529,R,0,,10,,,TRUE,TRUE
-30011,202001,100,6009,0,,5.249464902,,,,1,1,6009,R,,0,9,,TRUE,TRUE,
-30011,202002,100,1145,0,0.190495606,0.226047443,,,1,1,1,1145,R,0,0,9,TRUE,TRUE,TRUE,
-30011,202003,100,5064,0,4.423850085,,,,1,,1,5064,R,0,,10,TRUE,,TRUE,
-30012,202001,100,256,0,,0.034032235,,,,1,1,256,R,,0,9,,TRUE,TRUE,
-30012,202002,100,7522,0,29.38390625,,,,1,1,1,7522,R,0,0,9,TRUE,,TRUE,
-30012,202003,100,,0,,,,,1,,1,7522,FIR,0,,10,,,TRUE,
+identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,default_construction_link,filtered_marker
+30001,202001,100,0,,,,1,1,8444,R,,0,9,,,TRUE,TRUE
+30001,202002,100,0,,,1,1,1,7476,R,0,0,9,,,TRUE,TRUE
+30001,202003,100,0,,,1,,1,2003,R,0,,10,,,TRUE,TRUE
+30002,202001,100,0,,,,1,1,9343,R,,0,9,,,TRUE,TRUE
+30002,202002,100,0,,,1,1,1,7818,R,0,0,9,,,TRUE,TRUE
+30002,202003,100,0,,,1,,1,4897,R,0,,10,,,TRUE,TRUE
+30003,202001,100,0,,4.265190233,,1,1,7511,R,,0,9,,TRUE,TRUE,
+30003,202002,100,0,0.234456131,0.271256932,1,1,1,1761,R,0,0,9,TRUE,TRUE,TRUE,
+30003,202003,100,0,3.686541738,,1,,1,6492,R,0,,10,TRUE,,TRUE,
+30004,202001,100,0,,0.030288689,,1,1,64,R,,0,9,,TRUE,TRUE,
+30004,202002,100,0,33.015625,11.42162162,1,1,1,2113,R,0,0,9,TRUE,TRUE,TRUE,
+30004,202003,100,0,0.087553242,,1,,1,185,R,0,,10,TRUE,,TRUE,
+30005,202001,100,0,,0.941234172,,1,1,844,R,,0,9,,TRUE,TRUE,
+30005,202002,100,0,1.062434865,3.199201198,1,1,1,897,R,0,0,9,TRUE,TRUE,TRUE,
+30005,202003,100,0,0.312578027,,1,,1,280,R,0,,10,TRUE,,TRUE,
+30006,202001,100,0,,0.995885563,,1,1,1869,R,,0,9,,TRUE,TRUE,
+30006,202002,100,0,1.004131435,1.368417982,1,1,1,1876,R,0,0,9,TRUE,TRUE,TRUE,
+30006,202003,100,0,0.730770871,,1,,1,1371,R,0,,10,TRUE,,TRUE,
+30007,202001,100,0,,4.475816911,,1,1,12769,R,,0,9,,TRUE,TRUE,
+30007,202002,100,0,0.223422901,0.248269056,1,1,1,2853,R,0,0,9,TRUE,TRUE,TRUE,
+30007,202003,100,0,4.027888195,,1,,1,11491,R,0,,10,TRUE,,TRUE,
+30008,202001,100,0,,0.023463069,,1,1,141,R,,0,9,,TRUE,TRUE,
+30008,202002,100,0,42.62017045,13.86213906,1,1,1,6001,R,0,0,9,TRUE,TRUE,TRUE,
+30008,202003,100,0,0.072138939,,1,,1,433,R,0,,10,TRUE,,TRUE,
+30009,202001,100,0,,1.589639934,,1,1,6417,R,,0,9,,TRUE,TRUE,
+30009,202002,100,0,0.629073275,3.053782962,1,1,1,4037,R,0,0,9,TRUE,TRUE,TRUE,
+30009,202003,100,0,0.327462695,,1,,1,1322,R,0,,10,TRUE,,TRUE,
+30010,202001,100,0,,,,1,1,28963,R,,0,9,,,TRUE,TRUE
+30010,202002,100,0,,,1,1,1,21734,R,0,0,9,,,TRUE,TRUE
+30010,202003,100,0,,,1,,1,10529,R,0,,10,,,TRUE,TRUE
+30011,202001,100,0,,5.249464902,,1,1,6009,R,,0,9,,TRUE,TRUE,
+30011,202002,100,0,0.190495606,0.226047443,1,1,1,1145,R,0,0,9,TRUE,TRUE,TRUE,
+30011,202003,100,0,4.423850085,,1,,1,5064,R,0,,10,TRUE,,TRUE,
+30012,202001,100,0,,0.034032235,,1,1,256,R,,0,9,,TRUE,TRUE,
+30012,202002,100,0,29.38390625,,1,1,1,7522,R,0,0,9,TRUE,,TRUE,
+30012,202003,100,0,,,1,,1,7522,FIR,0,,10,,,TRUE,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
index c46b2b1c..615f6163 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,0.5,,1.5274,50.3694
-30001,202002,100,7476,51,0.5,0.9685,1.8795,121.4187
-30001,202003,100,2003,51,0.5,1.113,,89.3761
-30002,202001,100,9343,72,0.5,,1.5274,50.3694
-30002,202002,100,7818,72,0.5,0.9685,1.8795,121.4187
-30002,202003,100,4897,72,0.5,1.113,,89.3761
-30003,202001,100,7511,7,0.5,,1.5274,50.3694
-30003,202002,100,1761,7,0.5,0.9685,1.8795,121.4187
-30003,202003,100,6492,7,0.5,1.113,,89.3761
-30004,202001,100,64,81,0.5,,1.5274,50.3694
-30004,202002,100,2113,81,0.5,0.9685,1.8795,121.4187
-30004,202003,100,,81,0.5,1.113,,89.3761
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,,1.5274,50.3694
+30001,202002,100,7476,51,0.9685,1.8795,121.4187
+30001,202003,100,2003,51,1.113,,89.3761
+30002,202001,100,9343,72,,1.5274,50.3694
+30002,202002,100,7818,72,0.9685,1.8795,121.4187
+30002,202003,100,4897,72,1.113,,89.3761
+30003,202001,100,7511,7,,1.5274,50.3694
+30003,202002,100,1761,7,0.9685,1.8795,121.4187
+30003,202003,100,6492,7,1.113,,89.3761
+30004,202001,100,64,81,,1.5274,50.3694
+30004,202002,100,2113,81,0.9685,1.8795,121.4187
+30004,202003,100,,81,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index e6195aad..eb80371a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,8444,51,0.5,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
-30001,202002,100,7476,51,0.5,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7476,R,4,3,4
-30001,202003,100,2003,51,0.5,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.3199735,,96.19575,2003,R,3,,3
-30002,202001,100,9343,72,0.5,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
-30002,202002,100,7818,72,0.5,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7818,R,4,3,4
-30002,202003,100,4897,72,0.5,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.3199735,,96.19575,4897,R,3,,3
-30003,202001,100,7511,7,0.5,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
-30003,202002,100,1761,7,0.5,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,1761,R,4,3,4
-30003,202003,100,6492,7,0.5,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.3199735,,96.19575,6492,R,3,,3
-30004,202001,100,64,81,0.5,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
-30004,202002,100,2113,81,0.5,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,2113,R,4,3,4
-30004,202003,100,,81,0.5,1.113,,89.3761,,,1.526947,,103.0154,1.3199735,,96.19575,2789.104006,FIR,3,,3
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,51,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
+30001,202002,100,51,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7476,R,4,3,4
+30001,202003,100,51,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.3199735,,96.19575,2003,R,3,,3
+30002,202001,100,72,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
+30002,202002,100,72,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7818,R,4,3,4
+30002,202003,100,72,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.3199735,,96.19575,4897,R,3,,3
+30003,202001,100,7,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
+30003,202002,100,7,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,1761,R,4,3,4
+30003,202003,100,7,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.3199735,,96.19575,6492,R,3,,3
+30004,202001,100,81,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
+30004,202002,100,81,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,2113,R,4,3,4
+30004,202003,100,81,1.113,,89.3761,,,1.526947,,103.0154,1.3199735,,96.19575,2789.104006,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
index 6923f208..615f6163 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,0.8,,1.5274,50.3694
-30001,202002,100,7476,51,0.8,0.9685,1.8795,121.4187
-30001,202003,100,2003,51,0.8,1.113,,89.3761
-30002,202001,100,9343,72,0.8,,1.5274,50.3694
-30002,202002,100,7818,72,0.8,0.9685,1.8795,121.4187
-30002,202003,100,4897,72,0.8,1.113,,89.3761
-30003,202001,100,7511,7,0.8,,1.5274,50.3694
-30003,202002,100,1761,7,0.8,0.9685,1.8795,121.4187
-30003,202003,100,6492,7,0.8,1.113,,89.3761
-30004,202001,100,64,81,0.8,,1.5274,50.3694
-30004,202002,100,2113,81,0.8,0.9685,1.8795,121.4187
-30004,202003,100,,81,0.8,1.113,,89.3761
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,,1.5274,50.3694
+30001,202002,100,7476,51,0.9685,1.8795,121.4187
+30001,202003,100,2003,51,1.113,,89.3761
+30002,202001,100,9343,72,,1.5274,50.3694
+30002,202002,100,7818,72,0.9685,1.8795,121.4187
+30002,202003,100,4897,72,1.113,,89.3761
+30003,202001,100,7511,7,,1.5274,50.3694
+30003,202002,100,1761,7,0.9685,1.8795,121.4187
+30003,202003,100,6492,7,1.113,,89.3761
+30004,202001,100,64,81,,1.5274,50.3694
+30004,202002,100,2113,81,0.9685,1.8795,121.4187
+30004,202003,100,,81,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index 34ebbeb8..cf448d61 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,8444,51,0.8,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.6294848,106.2331217,8444,R,,4,4
-30001,202002,100,7476,51,0.8,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7476,R,4,3,4
-30001,202003,100,2003,51,0.8,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.4441576,,100.28754,2003,R,3,,3
-30002,202001,100,9343,72,0.8,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.6294848,106.23316,9343,R,,4,4
-30002,202002,100,7818,72,0.8,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7818,R,4,3,4
-30002,202003,100,4897,72,0.8,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
-30003,202001,100,7511,7,0.8,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.6294848,106.23316,7511,R,,4,4
-30003,202002,100,1761,7,0.8,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,1761,R,4,3,4
-30003,202003,100,6492,7,0.8,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
-30004,202001,100,64,81,0.8,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.6294848,106.23316,64,R,,4,4
-30004,202002,100,2113,81,0.8,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,2113,R,4,3,4
-30004,202003,100,,81,0.8,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,3051.505009,FIR,3,,3
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,51,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.6294848,106.2331217,8444,R,,4,4
+30001,202002,100,51,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7476,R,4,3,4
+30001,202003,100,51,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.4441576,,100.28754,2003,R,3,,3
+30002,202001,100,72,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.6294848,106.23316,9343,R,,4,4
+30002,202002,100,72,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7818,R,4,3,4
+30002,202003,100,72,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
+30003,202001,100,7,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.6294848,106.23316,7511,R,,4,4
+30003,202002,100,7,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,1761,R,4,3,4
+30003,202003,100,7,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
+30004,202001,100,81,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.6294848,106.23316,64,R,,4,4
+30004,202002,100,81,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,2113,R,4,3,4
+30004,202003,100,81,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,3051.505009,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
index 3d4265d9..1addf119 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-60001,202001,100,5077,15,0.5,,1.5274,50.3694
-60001,202002,100,7830,15,0.5,0.9685,1.8795,121.4187
-60001,202003,100,1046,15,0.5,1.113,,89.3761
-60002,202001,100,1588,71,0.5,,1.5274,50.3694
-60002,202002,100,1213,71,0.5,0.9685,1.8795,121.4187
-60002,202003,100,3807,71,0.5,1.113,,89.3761
-60003,202001,100,6541,26,0.5,,1.5274,50.3694
-60003,202002,100,336,26,0.5,0.9685,1.8795,121.4187
-60003,202003,100,6351,26,0.5,1.113,,89.3761
-60004,202001,100,,3,0.5,,1.5274,50.3694
-60004,202002,100,,3,0.5,0.9685,1.8795,121.4187
-60004,202003,100,401,3,0.5,1.113,,89.3761
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+60001,202001,100,5077,15,,1.5274,50.3694
+60001,202002,100,7830,15,0.9685,1.8795,121.4187
+60001,202003,100,1046,15,1.113,,89.3761
+60002,202001,100,1588,71,,1.5274,50.3694
+60002,202002,100,1213,71,0.9685,1.8795,121.4187
+60002,202003,100,3807,71,1.113,,89.3761
+60003,202001,100,6541,26,,1.5274,50.3694
+60003,202002,100,336,26,0.9685,1.8795,121.4187
+60003,202003,100,6351,26,1.113,,89.3761
+60004,202001,100,,3,,1.5274,50.3694
+60004,202002,100,,3,0.9685,1.8795,121.4187
+60004,202003,100,401,3,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index e275f74c..f3bda139 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-60001,202001,100,5077,15,0.5,,1.5274,50.3694,,0.648403576,,7.141605449,117.9107143,,4.334502725,84.14005715,5077,R,,3,3
-60001,202002,100,7830,15,0.5,0.9685,1.8795,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,7830,R,3,3,3
-60001,202003,100,1046,15,0.5,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
-60002,202001,100,1588,71,0.5,,1.5274,50.3694,,1.309150866,,7.141605449,117.9107143,,4.334502725,84.14005715,1588,R,,3,3
-60002,202002,100,1213,71,0.5,0.9685,1.8795,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,1213,R,3,3,3
-60002,202003,100,3807,71,0.5,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
-60003,202001,100,6541,26,0.5,,1.5274,50.3694,,19.4672619,,7.141605449,117.9107143,,4.334502725,84.14005715,6541,R,,3,3
-60003,202002,100,336,26,0.5,0.9685,1.8795,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,336,R,3,3,3
-60003,202003,100,6351,26,0.5,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
-60004,202001,100,,3,0.5,,1.5274,50.3694,,,,7.141605449,117.9107143,,4.334502725,84.14005715,3909.556029,BI,,3,3
-60004,202002,100,,3,0.5,0.9685,1.8795,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,901.9618346,BI,3,3,3
-60004,202003,100,401,3,0.5,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+60001,202001,100,15,,1.5274,50.3694,,0.648403576,,7.141605449,117.9107143,,4.334502725,84.14005715,5077,R,,3,3
+60001,202002,100,15,0.9685,1.8795,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,7830,R,3,3,3
+60001,202003,100,15,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
+60002,202001,100,71,,1.5274,50.3694,,1.309150866,,7.141605449,117.9107143,,4.334502725,84.14005715,1588,R,,3,3
+60002,202002,100,71,0.9685,1.8795,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,1213,R,3,3,3
+60002,202003,100,71,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
+60003,202001,100,26,,1.5274,50.3694,,19.4672619,,7.141605449,117.9107143,,4.334502725,84.14005715,6541,R,,3,3
+60003,202002,100,26,0.9685,1.8795,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,336,R,3,3,3
+60003,202003,100,26,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
+60004,202001,100,3,,1.5274,50.3694,,,,7.141605449,117.9107143,,4.334502725,84.14005715,3909.556029,BI,,3,3
+60004,202002,100,3,0.9685,1.8795,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,901.9618346,BI,3,3,3
+60004,202003,100,3,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
index 39dd9334..81195c8d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,0.5,,1.5274,50.3694
-30001,202002,100,7476,51,0.5,0.9685,1.8795,121.4187
-30001,202003,100,2003,51,0.5,1.113,,89.3761
-30002,202001,100,9343,72,0.5,,1.5274,50.3694
-30002,202002,100,7818,72,0.5,0.9685,1.8795,121.4187
-30002,202003,100,4897,72,0.5,1.113,,89.3761
-30003,202001,100,7511,7,0.5,,1.5274,50.3694
-30003,202002,100,1761,7,0.5,0.9685,1.8795,121.4187
-30003,202003,100,6492,7,0.5,1.113,,89.3761
-30004,202001,100,,81,0.5,,1.5274,50.3694
-30004,202002,100,,81,0.5,0.9685,1.8795,121.4187
-30004,202003,100,,81,0.5,1.113,,89.3761
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,,1.5274,50.3694
+30001,202002,100,7476,51,0.9685,1.8795,121.4187
+30001,202003,100,2003,51,1.113,,89.3761
+30002,202001,100,9343,72,,1.5274,50.3694
+30002,202002,100,7818,72,0.9685,1.8795,121.4187
+30002,202003,100,4897,72,1.113,,89.3761
+30003,202001,100,7511,7,,1.5274,50.3694
+30003,202002,100,1761,7,0.9685,1.8795,121.4187
+30003,202003,100,6492,7,1.113,,89.3761
+30004,202001,100,,81,,1.5274,50.3694
+30004,202002,100,,81,0.9685,1.8795,121.4187
+30004,202003,100,,81,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index adf89474..bd1b83a1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,8444,51,0.5,,1.5274,50.3694,,1.129481006,,2.196577972,194.6,,2.062742377,165.75388,8444,R,,3,3
-30001,202002,100,7476,51,0.5,0.9685,1.8795,121.4187,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7476,R,3,3,3
-30001,202003,100,2003,51,0.5,1.113,,89.3761,0.267924024,,1.526946931,,103.0154,1.444157545,,100.28754,2003,R,3,,3
-30002,202001,100,9343,72,0.5,,1.5274,50.3694,,1.195062676,,2.196577972,194.6,,2.062742377,165.75388,9343,R,,3,3
-30002,202002,100,7818,72,0.5,0.9685,1.8795,121.4187,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7818,R,3,3,3
-30002,202003,100,4897,72,0.5,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
-30003,202001,100,7511,7,0.5,,1.5274,50.3694,,4.265190233,,2.196577972,194.6,,2.062742377,165.75388,7511,R,,3,3
-30003,202002,100,1761,7,0.5,0.9685,1.8795,121.4187,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,1761,R,3,3,3
-30003,202003,100,6492,7,0.5,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
-30004,202001,100,,81,0.5,,1.5274,50.3694,,,,2.196577972,194.6,,2.062742377,165.75388,13426.06428,C,,3,3
-30004,202002,100,,81,0.5,0.9685,1.8795,121.4187,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,9605.793024,FIC,3,3,3
-30004,202003,100,,81,0.5,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,13872.279,FIC,3,,3
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,51,,1.5274,50.3694,,1.129481006,,2.196577972,194.6,,2.062742377,165.75388,8444,R,,3,3
+30001,202002,100,51,0.9685,1.8795,121.4187,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7476,R,3,3,3
+30001,202003,100,51,1.113,,89.3761,0.267924024,,1.526946931,,103.0154,1.444157545,,100.28754,2003,R,3,,3
+30002,202001,100,72,,1.5274,50.3694,,1.195062676,,2.196577972,194.6,,2.062742377,165.75388,9343,R,,3,3
+30002,202002,100,72,0.9685,1.8795,121.4187,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7818,R,3,3,3
+30002,202003,100,72,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
+30003,202001,100,7,,1.5274,50.3694,,4.265190233,,2.196577972,194.6,,2.062742377,165.75388,7511,R,,3,3
+30003,202002,100,7,0.9685,1.8795,121.4187,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,1761,R,3,3,3
+30003,202003,100,7,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
+30004,202001,100,81,,1.5274,50.3694,,,,2.196577972,194.6,,2.062742377,165.75388,13426.06428,C,,3,3
+30004,202002,100,81,0.9685,1.8795,121.4187,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,9605.793024,FIC,3,3,3
+30004,202003,100,81,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,13872.279,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
index 461d6b1a..762619be 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-110001,202001,100,9244,89,0.5,,1.5274,50.3694
-110001,202002,100,8916,89,0.5,0.9685,1.8795,121.4187
-110001,202003,100,6194,89,0.5,1.113,,89.3761
-110002,202001,100,4826,83,0.5,,1.5274,50.3694
-110002,202002,100,5903,83,0.5,0.9685,1.8795,121.4187
-110002,202003,100,4743,83,0.5,1.113,,89.3761
-110003,202001,100,7586,4,0.5,,1.5274,50.3694
-110003,202002,100,1016,4,0.5,0.9685,1.8795,121.4187
-110003,202003,100,1429,4,0.5,1.113,,89.3761
-110004,202001,100,3975,76,0.5,,1.5274,50.3694
-110004,202002,100,3044,76,0.5,0.9685,1.8795,121.4187
-110004,202003,100,,76,0.5,1.113,,89.3761
-110005,202001,200,5217,27,0.5,,2.994350985,107.48
-110005,202002,200,7016,27,0.5,1.377938182,0.670608989,54.70285714
-110005,202003,200,9940,27,0.5,0.952585628,,98.26519337
-110006,202001,200,5325,42,0.5,,2.994350985,107.48
-110006,202002,200,7747,42,0.5,1.377938182,0.670608989,54.70285714
-110006,202003,200,6685,42,0.5,0.952585628,,98.26519337
-110007,202001,200,5496,19,0.5,,2.994350985,107.48
-110007,202002,200,1010,19,0.5,1.377938182,0.670608989,54.70285714
-110007,202003,200,1235,19,0.5,0.952585628,,98.26519337
-110008,202001,200,,43,0.5,,2.994350985,107.48
-110008,202002,200,3913,43,0.5,1.377938182,0.670608989,54.70285714
-110008,202003,200,6013,43,0.5,0.952585628,,98.26519337
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+110001,202001,100,9244,89,,1.5274,50.3694
+110001,202002,100,8916,89,0.9685,1.8795,121.4187
+110001,202003,100,6194,89,1.113,,89.3761
+110002,202001,100,4826,83,,1.5274,50.3694
+110002,202002,100,5903,83,0.9685,1.8795,121.4187
+110002,202003,100,4743,83,1.113,,89.3761
+110003,202001,100,7586,4,,1.5274,50.3694
+110003,202002,100,1016,4,0.9685,1.8795,121.4187
+110003,202003,100,1429,4,1.113,,89.3761
+110004,202001,100,3975,76,,1.5274,50.3694
+110004,202002,100,3044,76,0.9685,1.8795,121.4187
+110004,202003,100,,76,1.113,,89.3761
+110005,202001,200,5217,27,,2.994350985,107.48
+110005,202002,200,7016,27,1.377938182,0.670608989,54.70285714
+110005,202003,200,9940,27,0.952585628,,98.26519337
+110006,202001,200,5325,42,,2.994350985,107.48
+110006,202002,200,7747,42,1.377938182,0.670608989,54.70285714
+110006,202003,200,6685,42,0.952585628,,98.26519337
+110007,202001,200,5496,19,,2.994350985,107.48
+110007,202002,200,1010,19,1.377938182,0.670608989,54.70285714
+110007,202003,200,1235,19,0.952585628,,98.26519337
+110008,202001,200,,43,,2.994350985,107.48
+110008,202002,200,3913,43,1.377938182,0.670608989,54.70285714
+110008,202003,200,6013,43,0.952585628,,98.26519337
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index d9b9bce4..decc4181 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,9244,89,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
-110001,202002,100,8916,89,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
-110001,202003,100,6194,89,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
-110002,202001,100,4826,83,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
-110002,202002,100,5903,83,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
-110002,202003,100,4743,83,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
-110003,202001,100,7586,4,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
-110003,202002,100,1016,4,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
-110003,202003,100,1429,4,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
-110004,202001,100,3975,76,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
-110004,202002,100,3044,76,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
-110004,202003,100,,76,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
-110005,202001,200,5217,27,0.5,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3
-110005,202002,200,7016,27,0.5,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4
-110005,202003,200,9940,27,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
-110006,202001,200,5325,42,0.5,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3
-110006,202002,200,7747,42,0.5,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4
-110006,202003,200,6685,42,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
-110007,202001,200,5496,19,0.5,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3
-110007,202002,200,1010,19,0.5,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4
-110007,202003,200,1235,19,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
-110008,202001,200,,43,0.5,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3
-110008,202002,200,3913,43,0.5,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4
-110008,202003,200,6013,43,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,89,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
+110001,202002,100,89,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
+110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
+110002,202001,100,83,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
+110002,202002,100,83,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
+110002,202003,100,83,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
+110003,202001,100,4,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
+110003,202002,100,4,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
+110003,202003,100,4,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
+110004,202001,100,76,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
+110004,202002,100,76,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
+110004,202003,100,76,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
+110005,202001,200,27,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3
+110005,202002,200,27,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4
+110005,202003,200,27,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
+110006,202001,200,42,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3
+110006,202002,200,42,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4
+110006,202003,200,42,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
+110007,202001,200,19,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3
+110007,202002,200,19,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4
+110007,202003,200,19,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
+110008,202001,200,43,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3
+110008,202002,200,43,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4
+110008,202003,200,43,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
index a0f21e24..9021d7a0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,0.5,,1.5274,50.3694
-30001,202002,100,7476,51,0.5,,1.8795,121.4187
-30001,202003,100,2003,51,0.5,,,89.3761
-30002,202001,100,9343,72,0.5,,1.5274,50.3694
-30002,202002,100,7818,72,0.5,,1.8795,121.4187
-30002,202003,100,4897,72,0.5,,,89.3761
-30003,202001,100,7511,7,0.5,,1.5274,50.3694
-30003,202002,100,1761,7,0.5,,1.8795,121.4187
-30003,202003,100,6492,7,0.5,,,89.3761
-30004,202001,100,64,81,0.5,,1.5274,50.3694
-30004,202002,100,2113,81,0.5,,1.8795,121.4187
-30004,202003,100,,81,0.5,,,89.3761
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,,1.5274,50.3694
+30001,202002,100,7476,51,,1.8795,121.4187
+30001,202003,100,2003,51,,,89.3761
+30002,202001,100,9343,72,,1.5274,50.3694
+30002,202002,100,7818,72,,1.8795,121.4187
+30002,202003,100,4897,72,,,89.3761
+30003,202001,100,7511,7,,1.5274,50.3694
+30003,202002,100,1761,7,,1.8795,121.4187
+30003,202003,100,6492,7,,,89.3761
+30004,202001,100,64,81,,1.5274,50.3694
+30004,202002,100,2113,81,,1.8795,121.4187
+30004,202003,100,,81,,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index a1656849..0d692942 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,8444,51,0.5,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
-30001,202002,100,7476,51,0.5,,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4
-30001,202003,100,2003,51,0.5,,,89.3761,0.267924024,,1.526947,,103.0154,1.526947,,96.19575,2003,R,3,,3
-30002,202001,100,9343,72,0.5,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
-30002,202002,100,7818,72,0.5,,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4
-30002,202003,100,4897,72,0.5,,,89.3761,0.626375032,,1.526947,,103.0154,1.526947,,96.19575,4897,R,3,,3
-30003,202001,100,7511,7,0.5,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
-30003,202002,100,1761,7,0.5,,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4
-30003,202003,100,6492,7,0.5,,,89.3761,3.686541738,,1.526947,,103.0154,1.526947,,96.19575,6492,R,3,,3
-30004,202001,100,64,81,0.5,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
-30004,202002,100,2113,81,0.5,,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4
-30004,202003,100,,81,0.5,,,89.3761,,,1.526947,,103.0154,1.526947,,96.19575,3226.439011,FIR,3,,3
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,51,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
+30001,202002,100,51,,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4
+30001,202003,100,51,,,89.3761,0.267924024,,1.526947,,103.0154,1.526947,,96.19575,2003,R,3,,3
+30002,202001,100,72,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
+30002,202002,100,72,,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4
+30002,202003,100,72,,,89.3761,0.626375032,,1.526947,,103.0154,1.526947,,96.19575,4897,R,3,,3
+30003,202001,100,7,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
+30003,202002,100,7,,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4
+30003,202003,100,7,,,89.3761,3.686541738,,1.526947,,103.0154,1.526947,,96.19575,6492,R,3,,3
+30004,202001,100,81,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
+30004,202002,100,81,,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4
+30004,202003,100,81,,,89.3761,,,1.526947,,103.0154,1.526947,,96.19575,3226.439011,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
index 55fdf7eb..3b36b613 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-60001,202001,100,5077,15,0.5,,,50.3694
-60001,202002,100,7830,15,0.5,0.9685,,121.4187
-60001,202003,100,1046,15,0.5,1.113,,89.3761
-60002,202001,100,1588,71,0.5,,,50.3694
-60002,202002,100,1213,71,0.5,0.9685,,121.4187
-60002,202003,100,3807,71,0.5,1.113,,89.3761
-60003,202001,100,6541,26,0.5,,,50.3694
-60003,202002,100,336,26,0.5,0.9685,,121.4187
-60003,202003,100,6351,26,0.5,1.113,,89.3761
-60004,202001,100,,3,0.5,,,50.3694
-60004,202002,100,,3,0.5,0.9685,,121.4187
-60004,202003,100,401,3,0.5,1.113,,89.3761
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+60001,202001,100,5077,15,,,50.3694
+60001,202002,100,7830,15,0.9685,,121.4187
+60001,202003,100,1046,15,1.113,,89.3761
+60002,202001,100,1588,71,,,50.3694
+60002,202002,100,1213,71,0.9685,,121.4187
+60002,202003,100,3807,71,1.113,,89.3761
+60003,202001,100,6541,26,,,50.3694
+60003,202002,100,336,26,0.9685,,121.4187
+60003,202003,100,6351,26,1.113,,89.3761
+60004,202001,100,,3,,,50.3694
+60004,202002,100,,3,0.9685,,121.4187
+60004,202003,100,401,3,1.113,,89.3761
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index c02eec10..62d000c8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-60001,202001,100,5077,15,0.5,,,50.3694,,0.648403576,,7.141605449,117.9107143,,7.141605449,84.14005715,5077,R,,3,3
-60001,202002,100,7830,15,0.5,0.9685,,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3
-60001,202003,100,1046,15,0.5,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
-60002,202001,100,1588,71,0.5,,,50.3694,,1.309150866,,7.141605449,117.9107143,,7.141605449,84.14005715,1588,R,,3,3
-60002,202002,100,1213,71,0.5,0.9685,,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3
-60002,202003,100,3807,71,0.5,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
-60003,202001,100,6541,26,0.5,,,50.3694,,19.4672619,,7.141605449,117.9107143,,7.141605449,84.14005715,6541,R,,3,3
-60003,202002,100,336,26,0.5,0.9685,,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3
-60003,202003,100,6351,26,0.5,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
-60004,202001,100,,3,0.5,,,50.3694,,,,7.141605449,117.9107143,,7.141605449,84.14005715,7500.429481,BI,,3,3
-60004,202002,100,,3,0.5,0.9685,,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3
-60004,202003,100,401,3,0.5,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+60001,202001,100,15,,,50.3694,,0.648403576,,7.141605449,117.9107143,,7.141605449,84.14005715,5077,R,,3,3
+60001,202002,100,15,0.9685,,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3
+60001,202003,100,15,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
+60002,202001,100,71,,,50.3694,,1.309150866,,7.141605449,117.9107143,,7.141605449,84.14005715,1588,R,,3,3
+60002,202002,100,71,0.9685,,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3
+60002,202003,100,71,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
+60003,202001,100,26,,,50.3694,,19.4672619,,7.141605449,117.9107143,,7.141605449,84.14005715,6541,R,,3,3
+60003,202002,100,26,0.9685,,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3
+60003,202003,100,26,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
+60004,202001,100,3,,,50.3694,,,,7.141605449,117.9107143,,7.141605449,84.14005715,7500.429481,BI,,3,3
+60004,202002,100,3,0.9685,,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3
+60004,202003,100,3,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
index 06f70a65..67f11a03 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,0.5,,1.5274,
-30001,202002,100,7476,51,0.5,0.9685,1.8795,
-30001,202003,100,2003,51,0.5,1.113,,
-30002,202001,100,9343,72,0.5,,1.5274,
-30002,202002,100,7818,72,0.5,0.9685,1.8795,
-30002,202003,100,4897,72,0.5,1.113,,
-30003,202001,100,7511,7,0.5,,1.5274,
-30003,202002,100,1761,7,0.5,0.9685,1.8795,
-30003,202003,100,6492,7,0.5,1.113,,
-30004,202001,100,,81,0.5,,1.5274,
-30004,202002,100,,81,0.5,0.9685,1.8795,
-30004,202003,100,,81,0.5,1.113,,
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,,1.5274,
+30001,202002,100,7476,51,0.9685,1.8795,
+30001,202003,100,2003,51,1.113,,
+30002,202001,100,9343,72,,1.5274,
+30002,202002,100,7818,72,0.9685,1.8795,
+30002,202003,100,4897,72,1.113,,
+30003,202001,100,7511,7,,1.5274,
+30003,202002,100,1761,7,0.9685,1.8795,
+30003,202003,100,6492,7,1.113,,
+30004,202001,100,,81,,1.5274,
+30004,202002,100,,81,0.9685,1.8795,
+30004,202003,100,,81,1.113,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index f868511c..995d640e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,8444,51,0.5,,1.5274,,,1.129481006,,2.196577972,194.6,,2.062742377,194.6,8444,R,,3,3
-30001,202002,100,7476,51,0.5,0.9685,1.8795,,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3
-30001,202003,100,2003,51,0.5,1.113,,,0.267924024,,1.526946931,,103.0154,1.444157545,,103.0154,2003,R,3,,3
-30002,202001,100,9343,72,0.5,,1.5274,,,1.195062676,,2.196577972,194.6,,2.062742377,194.6,9343,R,,3,3
-30002,202002,100,7818,72,0.5,0.9685,1.8795,,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3
-30002,202003,100,4897,72,0.5,1.113,,,0.626375032,,1.526947,,103.0154,1.4441576,,103.0154,4897,R,3,,3
-30003,202001,100,7511,7,0.5,,1.5274,,,4.265190233,,2.196577972,194.6,,2.062742377,194.6,7511,R,,3,3
-30003,202002,100,1761,7,0.5,0.9685,1.8795,,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3
-30003,202003,100,6492,7,0.5,1.113,,,3.686541738,,1.526947,,103.0154,1.4441576,,103.0154,6492,R,3,,3
-30004,202001,100,,81,0.5,,1.5274,,,,,2.196577972,194.6,,2.062742377,194.6,15762.6,C,,3,3
-30004,202002,100,,81,0.5,0.9685,1.8795,,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3
-30004,202003,100,,81,0.5,1.113,,,,,1.526947,,103.0154,1.4441576,,103.0154,16286.46938,FIC,3,,3
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,51,,1.5274,,,1.129481006,,2.196577972,194.6,,2.062742377,194.6,8444,R,,3,3
+30001,202002,100,51,0.9685,1.8795,,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3
+30001,202003,100,51,1.113,,,0.267924024,,1.526946931,,103.0154,1.444157545,,103.0154,2003,R,3,,3
+30002,202001,100,72,,1.5274,,,1.195062676,,2.196577972,194.6,,2.062742377,194.6,9343,R,,3,3
+30002,202002,100,72,0.9685,1.8795,,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3
+30002,202003,100,72,1.113,,,0.626375032,,1.526947,,103.0154,1.4441576,,103.0154,4897,R,3,,3
+30003,202001,100,7,,1.5274,,,4.265190233,,2.196577972,194.6,,2.062742377,194.6,7511,R,,3,3
+30003,202002,100,7,0.9685,1.8795,,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3
+30003,202003,100,7,1.113,,,3.686541738,,1.526947,,103.0154,1.4441576,,103.0154,6492,R,3,,3
+30004,202001,100,81,,1.5274,,,,,2.196577972,194.6,,2.062742377,194.6,15762.6,C,,3,3
+30004,202002,100,81,0.9685,1.8795,,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3
+30004,202003,100,81,1.113,,,,,1.526947,,103.0154,1.4441576,,103.0154,16286.46938,FIC,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
index 2a73efb7..2dc33b50 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-110001,202001,100,9244,89,0.5,,1.5274,50.3694
-110001,202002,100,8916,89,0.5,0.9685,1.8795,121.4187
-110001,202003,100,6194,89,0.5,1.113,,89.3761
-110002,202001,100,4826,83,0.5,,1.5274,50.3694
-110002,202002,100,5903,83,0.5,0.9685,1.8795,121.4187
-110002,202003,100,4743,83,0.5,1.113,,89.3761
-110003,202001,100,7586,4,0.5,,1.5274,50.3694
-110003,202002,100,1016,4,0.5,0.9685,1.8795,121.4187
-110003,202003,100,1429,4,0.5,1.113,,89.3761
-110004,202001,100,3975,76,0.5,,1.5274,50.3694
-110004,202002,100,3044,76,0.5,0.9685,1.8795,121.4187
-110004,202003,100,,76,0.5,1.113,,89.3761
-110005,202001,200,5217,27,0.5,,,107.48
-110005,202002,200,7016,27,0.5,1.377938182,,54.70285714
-110005,202003,200,9940,27,0.5,0.952585628,,98.26519337
-110006,202001,200,5325,42,0.5,,,107.48
-110006,202002,200,7747,42,0.5,1.377938182,,54.70285714
-110006,202003,200,6685,42,0.5,0.952585628,,98.26519337
-110007,202001,200,5496,19,0.5,,,107.48
-110007,202002,200,1010,19,0.5,1.377938182,,54.70285714
-110007,202003,200,1235,19,0.5,0.952585628,,98.26519337
-110008,202001,200,,43,0.5,,,107.48
-110008,202002,200,3913,43,0.5,1.377938182,,54.70285714
-110008,202003,200,6013,43,0.5,0.952585628,,98.26519337
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+110001,202001,100,9244,89,,1.5274,50.3694
+110001,202002,100,8916,89,0.9685,1.8795,121.4187
+110001,202003,100,6194,89,1.113,,89.3761
+110002,202001,100,4826,83,,1.5274,50.3694
+110002,202002,100,5903,83,0.9685,1.8795,121.4187
+110002,202003,100,4743,83,1.113,,89.3761
+110003,202001,100,7586,4,,1.5274,50.3694
+110003,202002,100,1016,4,0.9685,1.8795,121.4187
+110003,202003,100,1429,4,1.113,,89.3761
+110004,202001,100,3975,76,,1.5274,50.3694
+110004,202002,100,3044,76,0.9685,1.8795,121.4187
+110004,202003,100,,76,1.113,,89.3761
+110005,202001,200,5217,27,,,107.48
+110005,202002,200,7016,27,1.377938182,,54.70285714
+110005,202003,200,9940,27,0.952585628,,98.26519337
+110006,202001,200,5325,42,,,107.48
+110006,202002,200,7747,42,1.377938182,,54.70285714
+110006,202003,200,6685,42,0.952585628,,98.26519337
+110007,202001,200,5496,19,,,107.48
+110007,202002,200,1010,19,1.377938182,,54.70285714
+110007,202003,200,1235,19,0.952585628,,98.26519337
+110008,202001,200,,43,,,107.48
+110008,202002,200,3913,43,1.377938182,,54.70285714
+110008,202003,200,6013,43,0.952585628,,98.26519337
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index 1ad6a7f9..d4ee026f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,9244,89,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
-110001,202002,100,8916,89,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
-110001,202003,100,6194,89,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
-110002,202001,100,4826,83,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
-110002,202002,100,5903,83,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
-110002,202003,100,4743,83,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
-110003,202001,100,7586,4,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
-110003,202002,100,1016,4,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
-110003,202003,100,1429,4,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
-110004,202001,100,3975,76,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
-110004,202002,100,3044,76,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
-110004,202003,100,,76,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
-110005,202001,200,5217,27,0.5,,,107.48,,0.743586089,,2.290844366,182.25,,2.290844366,144.865,5217,R,,3,3
-110005,202002,200,7016,27,0.5,1.377938182,,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4
-110005,202003,200,9940,27,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
-110006,202001,200,5325,42,0.5,,,107.48,,0.68736285,,2.290844366,182.25,,2.290844366,144.865,5325,R,,3,3
-110006,202002,200,7747,42,0.5,1.377938182,,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4
-110006,202003,200,6685,42,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
-110007,202001,200,5496,19,0.5,,,107.48,,5.441584158,,2.290844366,182.25,,2.290844366,144.865,5496,R,,3,3
-110007,202002,200,1010,19,0.5,1.377938182,,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4
-110007,202003,200,1235,19,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
-110008,202001,200,,43,0.5,,,107.48,,,,2.290844366,182.25,,2.290844366,144.865,8964.074004,BI,,3,3
-110008,202002,200,3913,43,0.5,1.377938182,,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4
-110008,202003,200,6013,43,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,89,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
+110001,202002,100,89,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
+110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
+110002,202001,100,83,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
+110002,202002,100,83,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
+110002,202003,100,83,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
+110003,202001,100,4,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
+110003,202002,100,4,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
+110003,202003,100,4,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
+110004,202001,100,76,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
+110004,202002,100,76,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
+110004,202003,100,76,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
+110005,202001,200,27,,,107.48,,0.743586089,,2.290844366,182.25,,2.290844366,144.865,5217,R,,3,3
+110005,202002,200,27,1.377938182,,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4
+110005,202003,200,27,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
+110006,202001,200,42,,,107.48,,0.68736285,,2.290844366,182.25,,2.290844366,144.865,5325,R,,3,3
+110006,202002,200,42,1.377938182,,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4
+110006,202003,200,42,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
+110007,202001,200,19,,,107.48,,5.441584158,,2.290844366,182.25,,2.290844366,144.865,5496,R,,3,3
+110007,202002,200,19,1.377938182,,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4
+110007,202003,200,19,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
+110008,202001,200,43,,,107.48,,,,2.290844366,182.25,,2.290844366,144.865,8964.074004,BI,,3,3
+110008,202002,200,43,1.377938182,,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4
+110008,202003,200,43,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv
index fb1f44f1..db75d8ec 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-210001,202001,1,547,10,0.5,,2.656680299,101.7103175
-210001,202002,1,362,10,0.5,0.771850199,1.13167173,74.91666667
-210001,202003,1,895,10,0.5,0.968230653,,70.26136364
-210002,202001,1,381,50,0.5,,2.656680299,101.7103175
-210002,202002,1,573,50,0.5,0.771850199,1.13167173,74.91666667
-210002,202003,1,214,50,0.5,0.968230653,,70.26136364
-210003,202001,2,961,12,0.5,,0.68736285,182.25
-210003,202002,2,267,12,0.5,0.994479964,1.158863126,150.2748092
-210003,202003,2,314,12,0.5,1.259780318,,182.2366412
-210004,202001,2,555,9,0.5,,0.68736285,182.25
-210004,202002,2,628,9,0.5,0.994479964,1.158863126,150.2748092
-210004,202003,2,736,9,0.5,1.259780318,,182.2366412
-210005,202001,1,100,18,0.5,,2.656680299,101.7103175
-210005,202002,2,,18,0.5,0.994479964,1.158863126,150.2748092
-210005,202003,2,,18,0.5,1.259780318,,182.2366412
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+210001,202001,1,547,10,,2.656680299,101.7103175
+210001,202002,1,362,10,0.771850199,1.13167173,74.91666667
+210001,202003,1,895,10,0.968230653,,70.26136364
+210002,202001,1,381,50,,2.656680299,101.7103175
+210002,202002,1,573,50,0.771850199,1.13167173,74.91666667
+210002,202003,1,214,50,0.968230653,,70.26136364
+210003,202001,2,961,12,,0.68736285,182.25
+210003,202002,2,267,12,0.994479964,1.158863126,150.2748092
+210003,202003,2,314,12,1.259780318,,182.2366412
+210004,202001,2,555,9,,0.68736285,182.25
+210004,202002,2,628,9,0.994479964,1.158863126,150.2748092
+210004,202003,2,736,9,1.259780318,,182.2366412
+210005,202001,1,100,18,,2.656680299,101.7103175
+210005,202002,2,,18,0.994479964,1.158863126,150.2748092
+210005,202003,2,,18,1.259780318,,182.2366412
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index 7e8027d8..13dd586e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-210001,202001,1,547,10,0.5,,2.656680299,101.7103175,,1.511049724,,1.087985595,13.17948718,,1.872332947,57.44490234,547,R,,2,3
-210001,202002,1,362,10,0.5,0.771850199,1.13167173,74.91666667,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2
-210001,202003,1,895,10,0.5,0.968230653,,70.26136364,2.472375691,,1.42292432,,18.48333333,1.195577487,,44.37234849,895,R,2,,2
-210002,202001,1,381,50,0.5,,2.656680299,101.7103175,,0.664921466,,1.087985595,13.17948718,,1.872332947,57.44490234,381,R,,2,3
-210002,202002,1,573,50,0.5,0.771850199,1.13167173,74.91666667,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2
-210002,202003,1,214,50,0.5,0.968230653,,70.26136364,0.373472949,,1.42292432,,18.48333333,1.195577487,,44.37234849,214,R,2,,2
-210003,202001,2,961,12,0.5,,0.68736285,182.25,,3.599250936,,2.241504449,72.19047619,,1.46443365,127.2202381,961,R,,2,2
-210003,202002,2,267,12,0.5,0.994479964,1.158863126,150.2748092,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2
-210003,202003,2,314,12,0.5,1.259780318,,182.2366412,1.176029963,,1.174002242,,50,1.21689128,,116.1183206,314,R,2,,2
-210004,202001,2,555,9,0.5,,0.68736285,182.25,,0.883757962,,2.241504449,72.19047619,,1.46443365,127.2202381,555,R,,2,2
-210004,202002,2,628,9,0.5,0.994479964,1.158863126,150.2748092,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2
-210004,202003,2,736,9,0.5,1.259780318,,182.2366412,1.171974522,,1.174002242,,50,1.21689128,,116.1183206,736,R,2,,2
-210005,202001,1,100,18,0.5,,2.656680299,101.7103175,,,,1.087985595,13.17948718,,1.872332947,57.44490234,100,R,,2,3
-210005,202002,2,,18,0.5,0.994479964,1.158863126,150.2748092,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2
-210005,202003,2,,18,0.5,1.259780318,,182.2366412,,,1.174002242,,50,1.21689128,,116.1183206,2112.577671,FIC,2,,2
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+210001,202001,1,10,,2.656680299,101.7103175,,1.511049724,,1.087985595,13.17948718,,1.872332947,57.44490234,547,R,,2,3
+210001,202002,1,10,0.771850199,1.13167173,74.91666667,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2
+210001,202003,1,10,0.968230653,,70.26136364,2.472375691,,1.42292432,,18.48333333,1.195577487,,44.37234849,895,R,2,,2
+210002,202001,1,50,,2.656680299,101.7103175,,0.664921466,,1.087985595,13.17948718,,1.872332947,57.44490234,381,R,,2,3
+210002,202002,1,50,0.771850199,1.13167173,74.91666667,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2
+210002,202003,1,50,0.968230653,,70.26136364,0.373472949,,1.42292432,,18.48333333,1.195577487,,44.37234849,214,R,2,,2
+210003,202001,2,12,,0.68736285,182.25,,3.599250936,,2.241504449,72.19047619,,1.46443365,127.2202381,961,R,,2,2
+210003,202002,2,12,0.994479964,1.158863126,150.2748092,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2
+210003,202003,2,12,1.259780318,,182.2366412,1.176029963,,1.174002242,,50,1.21689128,,116.1183206,314,R,2,,2
+210004,202001,2,9,,0.68736285,182.25,,0.883757962,,2.241504449,72.19047619,,1.46443365,127.2202381,555,R,,2,2
+210004,202002,2,9,0.994479964,1.158863126,150.2748092,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2
+210004,202003,2,9,1.259780318,,182.2366412,1.171974522,,1.174002242,,50,1.21689128,,116.1183206,736,R,2,,2
+210005,202001,1,18,,2.656680299,101.7103175,,,,1.087985595,13.17948718,,1.872332947,57.44490234,100,R,,2,3
+210005,202002,2,18,0.994479964,1.158863126,150.2748092,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2
+210005,202003,2,18,1.259780318,,182.2366412,,,1.174002242,,50,1.21689128,,116.1183206,2112.577671,FIC,2,,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv
index ae75b8f6..4a95e219 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv
@@ -1,29 +1,29 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-70001,202001,100,5951,39,0.5,,1.511049724,101.7103175
-70001,202002,100,1814,39,0.5,,,
-70001,202003,100,734,39,0.5,1.082864299,,70.26136364
-70001,202004,100,96,39,0.5,1.42292432,0.664921466,101.7103175
-70001,202005,100,9086,39,0.5,0.70468356,2.677570093,74.91666667
-70001,202006,100,3949,39,0.5,1.174002242,0.404469274,182.2366412
-70001,202007,100,49,39,0.5,,,
-70002,202001,100,6705,94,0.5,,1.511049724,101.7103175
-70002,202002,100,48,94,0.5,,,
-70002,202003,100,5361,94,0.5,1.082864299,,70.26136364
-70002,202004,100,8767,94,0.5,1.42292432,0.664921466,101.7103175
-70002,202005,100,9214,94,0.5,0.70468356,2.677570093,74.91666667
-70002,202006,100,7467,94,0.5,1.174002242,0.404469274,182.2366412
-70002,202007,100,3475,94,0.5,,,
-70003,202001,100,6153,42,0.5,,1.511049724,101.7103175
-70003,202002,100,7711,42,0.5,,,
-70003,202003,100,5403,42,0.5,1.082864299,,70.26136364
-70003,202004,100,7445,42,0.5,1.42292432,0.664921466,101.7103175
-70003,202005,100,7092,42,0.5,0.70468356,2.677570093,74.91666667
-70003,202006,100,2038,42,0.5,1.174002242,0.404469274,182.2366412
-70003,202007,100,8768,42,0.5,,,
-70004,202001,100,,6,0.5,,1.511049724,101.7103175
-70004,202002,100,,6,0.5,,,
-70004,202003,100,6288,6,0.5,1.082864299,,70.26136364
-70004,202004,100,,6,0.5,1.42292432,0.664921466,101.7103175
-70004,202005,100,,6,0.5,0.70468356,2.677570093,74.91666667
-70004,202006,100,5875,6,0.5,1.174002242,0.404469274,182.2366412
-70004,202007,100,,6,0.5,,,
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+70001,202001,100,5951,39,,1.511049724,101.7103175
+70001,202002,100,1814,39,,,
+70001,202003,100,734,39,1.082864299,,70.26136364
+70001,202004,100,96,39,1.42292432,0.664921466,101.7103175
+70001,202005,100,9086,39,0.70468356,2.677570093,74.91666667
+70001,202006,100,3949,39,1.174002242,0.404469274,182.2366412
+70001,202007,100,49,39,,,
+70002,202001,100,6705,94,,1.511049724,101.7103175
+70002,202002,100,48,94,,,
+70002,202003,100,5361,94,1.082864299,,70.26136364
+70002,202004,100,8767,94,1.42292432,0.664921466,101.7103175
+70002,202005,100,9214,94,0.70468356,2.677570093,74.91666667
+70002,202006,100,7467,94,1.174002242,0.404469274,182.2366412
+70002,202007,100,3475,94,,,
+70003,202001,100,6153,42,,1.511049724,101.7103175
+70003,202002,100,7711,42,,,
+70003,202003,100,5403,42,1.082864299,,70.26136364
+70003,202004,100,7445,42,1.42292432,0.664921466,101.7103175
+70003,202005,100,7092,42,0.70468356,2.677570093,74.91666667
+70003,202006,100,2038,42,1.174002242,0.404469274,182.2366412
+70003,202007,100,8768,42,,,
+70004,202001,100,,6,,1.511049724,101.7103175
+70004,202002,100,,6,,,
+70004,202003,100,6288,6,1.082864299,,70.26136364
+70004,202004,100,,6,1.42292432,0.664921466,101.7103175
+70004,202005,100,,6,0.70468356,2.677570093,74.91666667
+70004,202006,100,5875,6,1.174002242,0.404469274,182.2366412
+70004,202007,100,,6,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index 1cab8212..ddfd3522 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-70001,202001,100,5951,39,0.5,,1.511049724,101.7103175,,3.280595369,,47.92201545,107.48,,24.71653259,104.5951588,5951,R,,3,3
-70001,202002,100,1814,39,0.5,,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
-70001,202003,100,734,39,0.5,1.082864299,,70.26136364,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4
-70001,202004,100,96,39,0.5,1.42292432,0.664921466,101.7103175,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3
-70001,202005,100,9086,39,0.5,0.70468356,2.677570093,74.91666667,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3
-70001,202006,100,3949,39,0.5,1.174002242,0.404469274,182.2366412,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4
-70001,202007,100,49,39,0.5,,,,0.012408205,,1.593348776,,70.24,1.593348776,,70.24,49,R,3,,3
-70002,202001,100,6705,94,0.5,,1.511049724,101.7103175,,139.6875,,47.92201545,107.48,,24.71653259,104.5951588,6705,R,,3,3
-70002,202002,100,48,94,0.5,,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3
-70002,202003,100,5361,94,0.5,1.082864299,,70.26136364,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4
-70002,202004,100,8767,94,0.5,1.42292432,0.664921466,101.7103175,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3
-70002,202005,100,9214,94,0.5,0.70468356,2.677570093,74.91666667,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3
-70002,202006,100,7467,94,0.5,1.174002242,0.404469274,182.2366412,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4
-70002,202007,100,3475,94,0.5,,,,0.46538101,,1.593348776,,70.24,1.593348776,,70.24,3475,R,3,,3
-70003,202001,100,6153,42,0.5,,1.511049724,101.7103175,,0.797950979,,47.92201545,107.48,,24.71653259,104.5951588,6153,R,,3,3
-70003,202002,100,7711,42,0.5,,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
-70003,202003,100,5403,42,0.5,1.082864299,,70.26136364,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4
-70003,202004,100,7445,42,0.5,1.42292432,0.664921466,101.7103175,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3
-70003,202005,100,7092,42,0.5,0.70468356,2.677570093,74.91666667,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3
-70003,202006,100,2038,42,0.5,1.174002242,0.404469274,182.2366412,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4
-70003,202007,100,8768,42,0.5,,,,4.302257115,,1.593348776,,70.24,1.593348776,,70.24,8768,R,3,,3
-70004,202001,100,,6,0.5,,1.511049724,101.7103175,,,,47.92201545,107.48,,24.71653259,104.5951588,202432.0564,BI,,3,3
-70004,202002,100,,6,0.5,,,,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
-70004,202003,100,6288,6,0.5,1.082864299,,70.26136364,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4
-70004,202004,100,,6,0.5,1.42292432,0.664921466,101.7103175,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3
-70004,202005,100,,6,0.5,0.70468356,2.677570093,74.91666667,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3
-70004,202006,100,5875,6,0.5,1.174002242,0.404469274,182.2366412,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4
-70004,202007,100,,6,0.5,,,,,,1.593348776,,70.24,1.593348776,,70.24,9360.924059,FIR,3,,3
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+70001,202001,100,39,,1.511049724,101.7103175,,3.280595369,,47.92201545,107.48,,24.71653259,104.5951588,5951,R,,3,3
+70001,202002,100,39,,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
+70001,202003,100,39,1.082864299,,70.26136364,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4
+70001,202004,100,39,1.42292432,0.664921466,101.7103175,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3
+70001,202005,100,39,0.70468356,2.677570093,74.91666667,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3
+70001,202006,100,39,1.174002242,0.404469274,182.2366412,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4
+70001,202007,100,39,,,,0.012408205,,1.593348776,,70.24,1.593348776,,70.24,49,R,3,,3
+70002,202001,100,94,,1.511049724,101.7103175,,139.6875,,47.92201545,107.48,,24.71653259,104.5951588,6705,R,,3,3
+70002,202002,100,94,,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3
+70002,202003,100,94,1.082864299,,70.26136364,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4
+70002,202004,100,94,1.42292432,0.664921466,101.7103175,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3
+70002,202005,100,94,0.70468356,2.677570093,74.91666667,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3
+70002,202006,100,94,1.174002242,0.404469274,182.2366412,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4
+70002,202007,100,94,,,,0.46538101,,1.593348776,,70.24,1.593348776,,70.24,3475,R,3,,3
+70003,202001,100,42,,1.511049724,101.7103175,,0.797950979,,47.92201545,107.48,,24.71653259,104.5951588,6153,R,,3,3
+70003,202002,100,42,,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
+70003,202003,100,42,1.082864299,,70.26136364,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4
+70003,202004,100,42,1.42292432,0.664921466,101.7103175,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3
+70003,202005,100,42,0.70468356,2.677570093,74.91666667,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3
+70003,202006,100,42,1.174002242,0.404469274,182.2366412,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4
+70003,202007,100,42,,,,4.302257115,,1.593348776,,70.24,1.593348776,,70.24,8768,R,3,,3
+70004,202001,100,6,,1.511049724,101.7103175,,,,47.92201545,107.48,,24.71653259,104.5951588,202432.0564,BI,,3,3
+70004,202002,100,6,,,,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
+70004,202003,100,6,1.082864299,,70.26136364,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4
+70004,202004,100,6,1.42292432,0.664921466,101.7103175,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3
+70004,202005,100,6,0.70468356,2.677570093,74.91666667,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3
+70004,202006,100,6,1.174002242,0.404469274,182.2366412,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4
+70004,202007,100,6,,,,,,1.593348776,,70.24,1.593348776,,70.24,9360.924059,FIR,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
index 3d915821..a1a88ba4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-110001,202001,100,9244,89,0.5,,,
-110001,202002,100,8916,89,0.5,,,
-110001,202003,100,6194,89,0.5,,,
-110002,202001,100,4826,83,0.5,,,
-110002,202002,100,5903,83,0.5,,,
-110002,202003,100,4743,83,0.5,,,
-110003,202001,100,7586,4,0.5,,,
-110003,202002,100,1016,4,0.5,,,
-110003,202003,100,1429,4,0.5,,,
-110004,202001,100,3975,76,0.5,,,
-110004,202002,100,3044,76,0.5,,,
-110004,202003,100,,76,0.5,,,
-110005,202001,200,5217,27,0.5,,,
-110005,202002,200,7016,27,0.5,,,
-110005,202003,200,9940,27,0.5,,,
-110006,202001,200,5325,42,0.5,,,
-110006,202002,200,7747,42,0.5,,,
-110006,202003,200,6685,42,0.5,,,
-110007,202001,200,5496,19,0.5,,,
-110007,202002,200,1010,19,0.5,,,
-110007,202003,200,1235,19,0.5,,,
-110008,202001,200,,43,0.5,,,
-110008,202002,200,3913,43,0.5,,,
-110008,202003,200,6013,43,0.5,,,
-110009,202001,100,150000,85,0.5,,,
-110009,202002,100,180000,85,0.5,,,
-110009,202003,100,120000,85,0.5,,,
-110010,202001,100,,71,0.5,,,
-110010,202002,100,,71,0.5,,,
-110010,202003,100,,71,0.5,,,
-110011,202001,200,150000,85,0.5,,,
-110011,202002,200,180000,85,0.5,,,
-110011,202003,200,120000,85,0.5,,,
-110012,202001,200,,71,0.5,,,
-110012,202002,200,,71,0.5,,,
-110012,202003,200,,71,0.5,,,
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+110001,202001,100,9244,89,,,
+110001,202002,100,8916,89,,,
+110001,202003,100,6194,89,,,
+110002,202001,100,4826,83,,,
+110002,202002,100,5903,83,,,
+110002,202003,100,4743,83,,,
+110003,202001,100,7586,4,,,
+110003,202002,100,1016,4,,,
+110003,202003,100,1429,4,,,
+110004,202001,100,3975,76,,,
+110004,202002,100,3044,76,,,
+110004,202003,100,,76,,,
+110005,202001,200,5217,27,,,
+110005,202002,200,7016,27,,,
+110005,202003,200,9940,27,,,
+110006,202001,200,5325,42,,,
+110006,202002,200,7747,42,,,
+110006,202003,200,6685,42,,,
+110007,202001,200,5496,19,,,
+110007,202002,200,1010,19,,,
+110007,202003,200,1235,19,,,
+110008,202001,200,,43,,,
+110008,202002,200,3913,43,,,
+110008,202003,200,6013,43,,,
+110009,202001,100,150000,85,,,
+110009,202002,100,180000,85,,,
+110009,202003,100,120000,85,,,
+110010,202001,100,,71,,,
+110010,202002,100,,71,,,
+110010,202003,100,,71,,,
+110011,202001,200,150000,85,,,
+110011,202002,200,180000,85,,,
+110011,202003,200,120000,85,,,
+110012,202001,200,,71,,,
+110012,202002,200,,71,,,
+110012,202003,200,,71,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index 8593405a..b8cabab6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
-110001,202001,100,9244,89,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4,,,
-110001,202002,100,8916,89,0.5,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,,,
-110001,202003,100,6194,89,0.5,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3,,,
-110002,202001,100,4826,83,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4,,,
-110002,202002,100,5903,83,0.5,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,,,
-110002,202003,100,4743,83,0.5,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3,,,
-110003,202001,100,7586,4,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4,,,
-110003,202002,100,1016,4,0.5,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,,,
-110003,202003,100,1429,4,0.5,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3,,,
-110004,202001,100,3975,76,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4,,,
-110004,202002,100,3044,76,0.5,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,,,
-110004,202003,100,,76,0.5,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3,,,
-110005,202001,200,5217,27,0.5,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3,,,
-110005,202002,200,7016,27,0.5,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,,,
-110005,202003,200,9940,27,0.5,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4,,,
-110006,202001,200,5325,42,0.5,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3,,,
-110006,202002,200,7747,42,0.5,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,,,
-110006,202003,200,6685,42,0.5,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4,,,
-110007,202001,200,5496,19,0.5,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3,,,
-110007,202002,200,1010,19,0.5,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,,,
-110007,202003,200,1235,19,0.5,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4,,,
-110008,202001,200,,43,0.5,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3,,,
-110008,202002,200,3913,43,0.5,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,,
-110008,202003,200,6013,43,0.5,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4,,,
-110009,202001,100,150000,85,0.5,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,150000,R,,4,4,,,TRUE
-110009,202002,100,180000,85,0.5,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,,,TRUE
-110009,202003,100,120000,85,0.5,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,120000,R,3,,3,,,TRUE
-110010,202001,100,,71,0.5,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,5398.829971,C,,4,4,,,
-110010,202002,100,,71,0.5,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,
-110010,202003,100,,71,0.5,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,4888.735268,FIC,3,,3,,,
-110011,202001,200,150000,85,0.5,,,,,,,2.290844366,182.25,,2.642597676,144.865,150000,R,,3,3,,,TRUE
-110011,202002,200,180000,85,0.5,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,,,TRUE
-110011,202003,200,120000,85,0.5,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,120000,R,4,,4,,,TRUE
-110012,202001,200,,71,0.5,,,,,,,2.290844366,182.25,,2.642597676,144.865,10285.415,C,,3,3,,,
-110012,202002,200,,71,0.5,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,
-110012,202003,200,,71,0.5,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,13496.15416,FIC,4,,4,,,
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+110001,202001,100,89,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4,,,
+110001,202002,100,89,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,,,
+110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3,,,
+110002,202001,100,83,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4,,,
+110002,202002,100,83,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,,,
+110002,202003,100,83,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3,,,
+110003,202001,100,4,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4,,,
+110003,202002,100,4,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,,,
+110003,202003,100,4,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3,,,
+110004,202001,100,76,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4,,,
+110004,202002,100,76,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,,,
+110004,202003,100,76,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3,,,
+110005,202001,200,27,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3,,,
+110005,202002,200,27,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,,,
+110005,202003,200,27,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4,,,
+110006,202001,200,42,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3,,,
+110006,202002,200,42,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,,,
+110006,202003,200,42,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4,,,
+110007,202001,200,19,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3,,,
+110007,202002,200,19,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,,,
+110007,202003,200,19,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4,,,
+110008,202001,200,43,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3,,,
+110008,202002,200,43,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,,
+110008,202003,200,43,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4,,,
+110009,202001,100,85,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,150000,R,,4,4,,,TRUE
+110009,202002,100,85,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,,,TRUE
+110009,202003,100,85,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,120000,R,3,,3,,,TRUE
+110010,202001,100,71,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,5398.829971,C,,4,4,,,
+110010,202002,100,71,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,
+110010,202003,100,71,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,4888.735268,FIC,3,,3,,,
+110011,202001,200,85,,,,,,,2.290844366,182.25,,2.642597676,144.865,150000,R,,3,3,,,TRUE
+110011,202002,200,85,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,,,TRUE
+110011,202003,200,85,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,120000,R,4,,4,,,TRUE
+110012,202001,200,71,,,,,,,2.290844366,182.25,,2.642597676,144.865,10285.415,C,,3,3,,,
+110012,202002,200,71,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,
+110012,202003,200,71,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,13496.15416,FIC,4,,4,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv
index d7acf9dc..130de716 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv
@@ -1,22 +1,22 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-110001,202001,100,9244,89,0.5,,2.09204015,76.03985875
-110001,202002,100,8916,89,0.5,0.8701751,1.505585865,98.16768334
-110001,202003,100,6194,89,0.5,1.040615327,,79.81873182
-110002,202001,100,4826,83,0.5,,2.09204015,76.03985875
-110002,202002,100,5903,83,0.5,0.8701751,1.505585865,98.16768334
-110002,202003,100,4743,83,0.5,1.040615327,,79.81873182
-110003,202001,100,7586,4,0.5,,2.09204015,76.03985875
-110003,202002,100,1016,4,0.5,0.8701751,1.505585865,98.16768334
-110003,202003,100,1429,4,0.5,1.040615327,,79.81873182
-110004,202001,100,3975,76,0.5,,2.09204015,76.03985875
-110004,202002,100,3044,76,0.5,0.8701751,1.505585865,98.16768334
-110004,202003,100,,76,0.5,1.040615327,,79.81873182
-110005,202001,200,,27,0.5,,2.642597676,144.865
-110005,202002,200,,27,0.5,1.186209073,0.751963069,102.4888332
-110005,202003,200,9940,27,0.5,1.106182973,,140.2509173
-110006,202001,200,5325,42,0.5,,2.642597676,144.865
-110006,202002,200,,42,0.5,1.186209073,0.751963069,102.4888332
-110006,202003,200,,42,0.5,1.106182973,,140.2509173
-110007,202001,200,,19,0.5,,2.642597676,144.865
-110007,202002,200,,19,0.5,1.186209073,0.751963069,102.4888332
-110007,202003,200,,19,0.5,1.106182973,,140.2509173
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+110001,202001,100,9244,89,,2.09204015,76.03985875
+110001,202002,100,8916,89,0.8701751,1.505585865,98.16768334
+110001,202003,100,6194,89,1.040615327,,79.81873182
+110002,202001,100,4826,83,,2.09204015,76.03985875
+110002,202002,100,5903,83,0.8701751,1.505585865,98.16768334
+110002,202003,100,4743,83,1.040615327,,79.81873182
+110003,202001,100,7586,4,,2.09204015,76.03985875
+110003,202002,100,1016,4,0.8701751,1.505585865,98.16768334
+110003,202003,100,1429,4,1.040615327,,79.81873182
+110004,202001,100,3975,76,,2.09204015,76.03985875
+110004,202002,100,3044,76,0.8701751,1.505585865,98.16768334
+110004,202003,100,,76,1.040615327,,79.81873182
+110005,202001,200,,27,,2.642597676,144.865
+110005,202002,200,,27,1.186209073,0.751963069,102.4888332
+110005,202003,200,9940,27,1.106182973,,140.2509173
+110006,202001,200,5325,42,,2.642597676,144.865
+110006,202002,200,,42,1.186209073,0.751963069,102.4888332
+110006,202003,200,,42,1.106182973,,140.2509173
+110007,202001,200,,19,,2.642597676,144.865
+110007,202002,200,,19,1.186209073,0.751963069,102.4888332
+110007,202003,200,,19,1.106182973,,140.2509173
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
index fcacfd03..58dd0030 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,9244,89,0.5,,2.09204015,76.03985875,,1.036787797,,2.656680299,101.7103175,,2.374360225,88.87508813,9244,R,,4,4
-110001,202002,100,8916,89,0.5,0.8701751,1.505585865,98.16768334,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4
-110001,202003,100,6194,89,0.5,1.040615327,,79.81873182,0.694706146,,0.968230653,,70.26136364,1.00442299,,75.04004773,6194,R,3,,3
-110002,202001,100,4826,83,0.5,,2.09204015,76.03985875,,0.817550398,,2.656680299,101.7103175,,2.374360225,88.87508813,4826,R,,4,4
-110002,202002,100,5903,83,0.5,0.8701751,1.505585865,98.16768334,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4
-110002,202003,100,4743,83,0.5,1.040615327,,79.81873182,0.803489751,,0.968230653,,70.26136364,1.00442299,,75.04004773,4743,R,3,,3
-110003,202001,100,7586,4,0.5,,2.09204015,76.03985875,,7.466535433,,2.656680299,101.7103175,,2.374360225,88.87508813,7586,R,,4,4
-110003,202002,100,1016,4,0.5,0.8701751,1.505585865,98.16768334,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4
-110003,202003,100,1429,4,0.5,1.040615327,,79.81873182,1.406496063,,0.968230653,,70.26136364,1.00442299,,75.04004773,1429,R,3,,3
-110004,202001,100,3975,76,0.5,,2.09204015,76.03985875,,1.305847569,,2.656680299,101.7103175,,2.374360225,88.87508813,3975,R,,4,4
-110004,202002,100,3044,76,0.5,0.8701751,1.505585865,98.16768334,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4
-110004,202003,100,,76,0.5,1.040615327,,79.81873182,,,0.968230653,,70.26136364,1.00442299,,75.04004773,3057.463582,FIR,3,,3
-110005,202001,200,,27,0.5,,2.642597676,144.865,,,,1,1,,1.821298838,72.9325,9940,BI,,0,0
-110005,202002,200,,27,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0
-110005,202003,200,9940,27,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,9940,R,0,,1
-110006,202001,200,5325,42,0.5,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,5325,R,,0,1
-110006,202002,200,,42,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0
-110006,202003,200,,42,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,5325,FIR,0,,1
-110007,202001,200,,19,0.5,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,2580.681786,C,,0,1
-110007,202002,200,,19,0.5,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0
-110007,202003,200,,19,0.5,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,2970.72366,FIC,0,,1
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+110001,202001,100,89,,2.09204015,76.03985875,,1.036787797,,2.656680299,101.7103175,,2.374360225,88.87508813,9244,R,,4,4
+110001,202002,100,89,0.8701751,1.505585865,98.16768334,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4
+110001,202003,100,89,1.040615327,,79.81873182,0.694706146,,0.968230653,,70.26136364,1.00442299,,75.04004773,6194,R,3,,3
+110002,202001,100,83,,2.09204015,76.03985875,,0.817550398,,2.656680299,101.7103175,,2.374360225,88.87508813,4826,R,,4,4
+110002,202002,100,83,0.8701751,1.505585865,98.16768334,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4
+110002,202003,100,83,1.040615327,,79.81873182,0.803489751,,0.968230653,,70.26136364,1.00442299,,75.04004773,4743,R,3,,3
+110003,202001,100,4,,2.09204015,76.03985875,,7.466535433,,2.656680299,101.7103175,,2.374360225,88.87508813,7586,R,,4,4
+110003,202002,100,4,0.8701751,1.505585865,98.16768334,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4
+110003,202003,100,4,1.040615327,,79.81873182,1.406496063,,0.968230653,,70.26136364,1.00442299,,75.04004773,1429,R,3,,3
+110004,202001,100,76,,2.09204015,76.03985875,,1.305847569,,2.656680299,101.7103175,,2.374360225,88.87508813,3975,R,,4,4
+110004,202002,100,76,0.8701751,1.505585865,98.16768334,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4
+110004,202003,100,76,1.040615327,,79.81873182,,,0.968230653,,70.26136364,1.00442299,,75.04004773,3057.463582,FIR,3,,3
+110005,202001,200,27,,2.642597676,144.865,,,,1,1,,1.821298838,72.9325,9940,BI,,0,0
+110005,202002,200,27,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0
+110005,202003,200,27,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,9940,R,0,,1
+110006,202001,200,42,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,5325,R,,0,1
+110006,202002,200,42,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0
+110006,202003,200,42,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,5325,FIR,0,,1
+110007,202001,200,19,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,2580.681786,C,,0,1
+110007,202002,200,19,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0
+110007,202003,200,19,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,2970.72366,FIC,0,,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
index ab3c8acb..b4c563a0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
@@ -1,73 +1,73 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-80001,202001,100,9244,89,0.5,,2.642597676,144.865
-80001,202002,100,8916,89,0.5,1.186209073,0.751963069,102.4888332
-80001,202003,100,6194,89,0.5,1.106182973,,140.2509173
-80002,202001,100,4826,83,0.5,,2.642597676,144.865
-80002,202002,100,5903,83,0.5,1.186209073,0.751963069,102.4888332
-80002,202003,100,4743,83,0.5,1.106182973,,140.2509173
-80003,202001,100,7586,4,0.5,,2.642597676,144.865
-80003,202002,100,1016,4,0.5,1.186209073,0.751963069,102.4888332
-80003,202003,100,1429,4,0.5,1.106182973,,140.2509173
-80004,202001,100,3975,76,0.5,,2.642597676,144.865
-80004,202002,100,3044,76,0.5,1.186209073,0.751963069,102.4888332
-80004,202003,100,3673,76,0.5,1.106182973,,140.2509173
-80005,202001,100,1941,18,0.5,,2.642597676,144.865
-80005,202002,100,3121,18,0.5,1.186209073,0.751963069,102.4888332
-80005,202003,100,1208,18,0.5,1.106182973,,140.2509173
-80006,202001,100,5405,94,0.5,,2.642597676,144.865
-80006,202002,100,7084,94,0.5,1.186209073,0.751963069,102.4888332
-80006,202003,100,4980,94,0.5,1.106182973,,140.2509173
-80007,202001,100,15172,8,0.5,,2.642597676,144.865
-80007,202002,100,2845,8,0.5,1.186209073,0.751963069,102.4888332
-80007,202003,100,3501,8,0.5,1.106182973,,140.2509173
-80008,202001,100,16298,304,0.5,,2.642597676,144.865
-80008,202002,100,14429,304,0.5,1.186209073,0.751963069,102.4888332
-80008,202003,100,14295,304,0.5,1.106182973,,140.2509173
-80009,202001,100,3698,45,0.5,,2.642597676,144.865
-80009,202002,100,4993,45,0.5,1.186209073,0.751963069,102.4888332
-80009,202003,100,4212,45,0.5,1.106182973,,140.2509173
-80010,202001,100,7722,100,0.5,,2.642597676,144.865
-80010,202002,100,10153,100,0.5,1.186209073,0.751963069,102.4888332
-80010,202003,100,6545,100,0.5,1.106182973,,140.2509173
-80011,202001,100,30344,19,0.5,,2.642597676,144.865
-80011,202002,100,3627,19,0.5,1.186209073,0.751963069,102.4888332
-80011,202003,100,7288,19,0.5,1.106182973,,140.2509173
-80012,202001,100,16298,304,0.5,,2.642597676,144.865
-80012,202002,100,11567,304,0.5,1.186209073,0.751963069,102.4888332
-80012,202003,100,,304,0.5,1.106182973,,140.2509173
-80013,202001,200,20190,54,0.5,,2.09204015,76.03985875
-80013,202002,200,18242,54,0.5,0.8701751,1.505585865,98.16768334
-80013,202003,200,28826,54,0.5,1.040615327,,79.81873182
-80014,202001,200,4260,47,0.5,,2.09204015,76.03985875
-80014,202002,200,5036,42,0.5,0.8701751,1.505585865,98.16768334
-80014,202003,200,6484,42,0.5,1.040615327,,79.81873182
-80015,202001,200,19236,57,0.5,,2.09204015,76.03985875
-80015,202002,200,4949,57,0.5,0.8701751,1.505585865,98.16768334
-80015,202003,200,3544,57,0.5,1.040615327,,79.81873182
-80016,202001,200,14902,163,0.5,,2.09204015,76.03985875
-80016,202002,200,16435,163,0.5,0.8701751,1.505585865,98.16768334
-80016,202003,200,24653,163,0.5,1.040615327,,79.81873182
-80017,202001,200,35476,149,0.5,,2.09204015,76.03985875
-80017,202002,200,50515,149,0.5,0.8701751,1.505585865,98.16768334
-80017,202003,200,53477,149,0.5,1.040615327,,79.81873182
-80018,202001,200,13845,126,0.5,,2.09204015,76.03985875
-80018,202002,200,25488,126,0.5,0.8701751,1.505585865,98.16768334
-80018,202003,200,27409,126,0.5,1.040615327,,79.81873182
-80019,202001,200,1099,6,0.5,,2.09204015,76.03985875
-80019,202002,200,434,6,0.5,0.8701751,1.505585865,98.16768334
-80019,202003,200,124,6,0.5,1.040615327,,79.81873182
-80020,202001,200,3348,22,0.5,,2.09204015,76.03985875
-80020,202002,200,1996,22,0.5,0.8701751,1.505585865,98.16768334
-80020,202003,200,5051,22,0.5,1.040615327,,79.81873182
-80021,202001,200,29215,108,0.5,,2.09204015,76.03985875
-80021,202002,200,34168,108,0.5,0.8701751,1.505585865,98.16768334
-80021,202003,200,61628,108,0.5,1.040615327,,79.81873182
-80022,202001,200,6390,67,0.5,,2.09204015,76.03985875
-80022,202002,200,12705,67,0.5,0.8701751,1.505585865,98.16768334
-80022,202003,200,11966,67,0.5,1.040615327,,79.81873182
-80023,202001,200,4562,18,0.5,,2.09204015,76.03985875
-80023,202002,200,1717,18,0.5,0.8701751,1.505585865,98.16768334
-80023,202003,200,2371,18,0.5,1.040615327,,79.81873182
-80024,202001,200,,155,0.5,,2.09204015,76.03985875
-80024,202002,200,18782,155,0.5,0.8701751,1.505585865,98.16768334
-80024,202003,200,21046,155,0.5,1.040615327,,79.81873182
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+80001,202001,100,9244,89,,2.642597676,144.865
+80001,202002,100,8916,89,1.186209073,0.751963069,102.4888332
+80001,202003,100,6194,89,1.106182973,,140.2509173
+80002,202001,100,4826,83,,2.642597676,144.865
+80002,202002,100,5903,83,1.186209073,0.751963069,102.4888332
+80002,202003,100,4743,83,1.106182973,,140.2509173
+80003,202001,100,7586,4,,2.642597676,144.865
+80003,202002,100,1016,4,1.186209073,0.751963069,102.4888332
+80003,202003,100,1429,4,1.106182973,,140.2509173
+80004,202001,100,3975,76,,2.642597676,144.865
+80004,202002,100,3044,76,1.186209073,0.751963069,102.4888332
+80004,202003,100,3673,76,1.106182973,,140.2509173
+80005,202001,100,1941,18,,2.642597676,144.865
+80005,202002,100,3121,18,1.186209073,0.751963069,102.4888332
+80005,202003,100,1208,18,1.106182973,,140.2509173
+80006,202001,100,5405,94,,2.642597676,144.865
+80006,202002,100,7084,94,1.186209073,0.751963069,102.4888332
+80006,202003,100,4980,94,1.106182973,,140.2509173
+80007,202001,100,15172,8,,2.642597676,144.865
+80007,202002,100,2845,8,1.186209073,0.751963069,102.4888332
+80007,202003,100,3501,8,1.106182973,,140.2509173
+80008,202001,100,16298,304,,2.642597676,144.865
+80008,202002,100,14429,304,1.186209073,0.751963069,102.4888332
+80008,202003,100,14295,304,1.106182973,,140.2509173
+80009,202001,100,3698,45,,2.642597676,144.865
+80009,202002,100,4993,45,1.186209073,0.751963069,102.4888332
+80009,202003,100,4212,45,1.106182973,,140.2509173
+80010,202001,100,7722,100,,2.642597676,144.865
+80010,202002,100,10153,100,1.186209073,0.751963069,102.4888332
+80010,202003,100,6545,100,1.106182973,,140.2509173
+80011,202001,100,30344,19,,2.642597676,144.865
+80011,202002,100,3627,19,1.186209073,0.751963069,102.4888332
+80011,202003,100,7288,19,1.106182973,,140.2509173
+80012,202001,100,16298,304,,2.642597676,144.865
+80012,202002,100,11567,304,1.186209073,0.751963069,102.4888332
+80012,202003,100,,304,1.106182973,,140.2509173
+80013,202001,200,20190,54,,2.09204015,76.03985875
+80013,202002,200,18242,54,0.8701751,1.505585865,98.16768334
+80013,202003,200,28826,54,1.040615327,,79.81873182
+80014,202001,200,4260,47,,2.09204015,76.03985875
+80014,202002,200,5036,42,0.8701751,1.505585865,98.16768334
+80014,202003,200,6484,42,1.040615327,,79.81873182
+80015,202001,200,19236,57,,2.09204015,76.03985875
+80015,202002,200,4949,57,0.8701751,1.505585865,98.16768334
+80015,202003,200,3544,57,1.040615327,,79.81873182
+80016,202001,200,14902,163,,2.09204015,76.03985875
+80016,202002,200,16435,163,0.8701751,1.505585865,98.16768334
+80016,202003,200,24653,163,1.040615327,,79.81873182
+80017,202001,200,35476,149,,2.09204015,76.03985875
+80017,202002,200,50515,149,0.8701751,1.505585865,98.16768334
+80017,202003,200,53477,149,1.040615327,,79.81873182
+80018,202001,200,13845,126,,2.09204015,76.03985875
+80018,202002,200,25488,126,0.8701751,1.505585865,98.16768334
+80018,202003,200,27409,126,1.040615327,,79.81873182
+80019,202001,200,1099,6,,2.09204015,76.03985875
+80019,202002,200,434,6,0.8701751,1.505585865,98.16768334
+80019,202003,200,124,6,1.040615327,,79.81873182
+80020,202001,200,3348,22,,2.09204015,76.03985875
+80020,202002,200,1996,22,0.8701751,1.505585865,98.16768334
+80020,202003,200,5051,22,1.040615327,,79.81873182
+80021,202001,200,29215,108,,2.09204015,76.03985875
+80021,202002,200,34168,108,0.8701751,1.505585865,98.16768334
+80021,202003,200,61628,108,1.040615327,,79.81873182
+80022,202001,200,6390,67,,2.09204015,76.03985875
+80022,202002,200,12705,67,0.8701751,1.505585865,98.16768334
+80022,202003,200,11966,67,1.040615327,,79.81873182
+80023,202001,200,4562,18,,2.09204015,76.03985875
+80023,202002,200,1717,18,0.8701751,1.505585865,98.16768334
+80023,202003,200,2371,18,1.040615327,,79.81873182
+80024,202001,200,,155,,2.09204015,76.03985875
+80024,202002,200,18782,155,0.8701751,1.505585865,98.16768334
+80024,202003,200,21046,155,1.040615327,,79.81873182
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index f2d399ef..7eea2d0f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
-80001,202001,100,9244,89,0.5,,2.642597676,144.865,,1.036787797,,1.036787797,,2.076255394,107.1910333,,2.359426535,126.0280167,9244,R,,10,12,,,
-80001,202002,100,8916,89,0.5,1.186209073,0.751963069,102.4888332,0.964517525,1.43945754,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,
-80001,202003,100,6194,89,0.5,1.106182973,,140.2509173,0.694706146,,0.694706146,,0.918490819,,69.22002885,1.012336896,,104.7354731,6194,R,9,,11,,,
-80002,202001,100,4826,83,0.5,,2.642597676,144.865,,0.817550398,,0.817550398,,2.076255394,107.1910333,,2.359426535,126.0280167,4826,R,,10,12,,,
-80002,202002,100,5903,83,0.5,1.186209073,0.751963069,102.4888332,1.223166183,1.244570947,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,,,
-80002,202003,100,4743,83,0.5,1.106182973,,140.2509173,0.803489751,,0.803489751,,0.918490819,,69.22002885,1.012336896,,104.7354731,4743,R,9,,11,,,
-80003,202001,100,7586,4,0.5,,2.642597676,144.865,,7.466535433,,7.466535433,,2.076255394,107.1910333,,2.359426535,126.0280167,7586,R,,10,12,,,
-80003,202002,100,1016,4,0.5,1.186209073,0.751963069,102.4888332,0.133930925,0.710986704,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,,,
-80003,202003,100,1429,4,0.5,1.106182973,,140.2509173,1.406496063,,1.406496063,,0.918490819,,69.22002885,1.012336896,,104.7354731,1429,R,9,,11,,,
-80004,202001,100,3975,76,0.5,,2.642597676,144.865,,1.305847569,,1.305847569,,2.076255394,107.1910333,,2.359426535,126.0280167,3975,R,,10,12,,,
-80004,202002,100,3044,76,0.5,1.186209073,0.751963069,102.4888332,0.765786164,0.82875034,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,,,
-80004,202003,100,3673,76,0.5,1.106182973,,140.2509173,1.206636005,,1.206636005,,0.918490819,,69.22002885,1.012336896,,104.7354731,3673,R,9,,11,,,
-80005,202001,100,1941,18,0.5,,2.642597676,144.865,,0.622072678,,,,2.076255394,107.1910333,,2.359426535,126.0280167,1941,R,,10,12,,TRUE,
-80005,202002,100,3121,18,0.5,1.186209073,0.751963069,102.4888332,1.607529208,2.583641738,,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,TRUE,TRUE,
-80005,202003,100,1208,18,0.5,1.106182973,,140.2509173,0.387050567,,0.387050567,,0.918490819,,69.22002885,1.012336896,,104.7354731,1208,R,9,,11,,,
-80006,202001,100,5405,94,0.5,,2.642597676,144.865,,0.763047038,,0.763047038,,2.076255394,107.1910333,,2.359426535,126.0280167,5405,R,,10,12,,,
-80006,202002,100,7084,94,0.5,1.186209073,0.751963069,102.4888332,1.310535196,1.422366796,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,,,
-80006,202003,100,4980,94,0.5,1.106182973,,140.2509173,0.703053532,,0.703053532,,0.918490819,,69.22002885,1.012336896,,104.7354731,4980,R,9,,11,,,
-80007,202001,100,15172,8,0.5,,2.642597676,144.865,,5.333239595,,5.333239595,,2.076255394,107.1910333,,2.359426535,126.0280167,15172,R,,10,12,,,
-80007,202002,100,2845,8,0.5,1.186209073,0.751963069,102.4888332,0.187503296,0.812556233,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,,,
-80007,202003,100,3501,8,0.5,1.106182973,,140.2509173,1.230684055,,1.230684055,,0.918490819,,69.22002885,1.012336896,,104.7354731,3501,R,9,,11,,,
-80008,202001,100,16298,304,0.5,,2.642597676,144.865,,1.129530598,,1.129530598,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
-80008,202002,100,14429,304,0.5,1.186209073,0.751963069,102.4888332,0.885323516,1.009357249,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,,,
-80008,202003,100,14295,304,0.5,1.106182973,,140.2509173,0.990729498,,0.990729498,,0.918490819,,69.22002885,1.012336896,,104.7354731,14295,R,9,,11,,,
-80009,202001,100,3698,45,0.5,,2.642597676,144.865,,0.740562712,,0.740562712,,2.076255394,107.1910333,,2.359426535,126.0280167,3698,R,,10,12,,,
-80009,202002,100,4993,45,0.5,1.186209073,0.751963069,102.4888332,1.350324535,1.185435621,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,,,
-80009,202003,100,4212,45,0.5,1.106182973,,140.2509173,0.843571749,,0.843571749,,0.918490819,,69.22002885,1.012336896,,104.7354731,4212,R,9,,11,,,
-80010,202001,100,7722,100,0.5,,2.642597676,144.865,,0.760511998,,0.760511998,,2.076255394,107.1910333,,2.359426535,126.0280167,7722,R,,10,12,,,
-80010,202002,100,10153,100,0.5,1.186209073,0.751963069,102.4888332,1.314903647,1.551204368,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,,,
-80010,202003,100,6545,100,0.5,1.106182973,,140.2509173,0.644660382,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,6545,R,9,,11,TRUE,,
-80011,202001,100,30344,19,0.5,,2.642597676,144.865,,8.365866031,,,,2.076255394,107.1910333,,2.359426535,126.0280167,30344,R,,10,12,,TRUE,
-80011,202002,100,3627,19,0.5,1.186209073,0.751963069,102.4888332,0.119533351,0.497690693,,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,TRUE,TRUE,
-80011,202003,100,7288,19,0.5,1.106182973,,140.2509173,2.00928009,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,7288,R,9,,11,TRUE,,
-80012,202001,100,16298,304,0.5,,2.642597676,144.865,,1.408940798,,1.408940798,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
-80012,202002,100,11567,304,0.5,1.186209073,0.751963069,102.4888332,0.70975303,,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,,,
-80012,202003,100,,304,0.5,1.106182973,,140.2509173,,,,,0.918490819,,69.22002885,1.012336896,,104.7354731,11709.70088,FIR,9,,11,,,
-80013,202001,200,20190,54,0.5,,2.09204015,76.03985875,,1.106799294,,1.106799294,,1.313944665,186.8459267,,1.702992408,131.4428927,20190,R,,9,11,,,
-80013,202002,200,18242,54,0.5,0.8701751,1.505585865,98.16768334,0.903506178,0.632817595,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,,,
-80013,202003,200,28826,54,0.5,1.040615327,,79.81873182,1.58023419,,1.58023419,,1.246527322,,255.2315185,1.143571325,,167.5251252,28826,R,10,,12,,,
-80014,202001,200,4260,47,0.5,,2.09204015,76.03985875,,0.845985046,,0.845985046,,1.313944665,186.8459267,,1.702992408,131.4428927,4260,R,,9,11,,,
-80014,202002,200,5036,42,0.5,0.8701751,1.505585865,98.16768334,1.182053991,0.776557765,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,,,
-80014,202003,200,6484,42,0.5,1.040615327,,79.81873182,1.28773421,,1.28773421,,1.246527322,,255.2315185,1.143571325,,167.5251252,6484,R,10,,12,,,
-80015,202001,200,19236,57,0.5,,2.09204015,76.03985875,,3.886845827,,,,1.313944665,186.8459267,,1.702992408,131.4428927,19236,R,,9,11,,TRUE,
-80015,202002,200,4949,57,0.5,0.8701751,1.505585865,98.16768334,0.25727802,1.396267404,,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,TRUE,,
-80015,202003,200,3544,57,0.5,1.040615327,,79.81873182,0.716195191,,0.716195191,,1.246527322,,255.2315185,1.143571325,,167.5251252,3544,R,10,,12,,,
-80016,202001,200,14902,163,0.5,,2.09204015,76.03985875,,0.906730921,,0.906730921,,1.313944665,186.8459267,,1.702992408,131.4428927,14902,R,,9,11,,,
-80016,202002,200,16435,163,0.5,0.8701751,1.505585865,98.16768334,1.102863018,0.666628808,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,,,
-80016,202003,200,24653,163,0.5,1.040615327,,79.81873182,1.500085186,,1.500085186,,1.246527322,,255.2315185,1.143571325,,167.5251252,24653,R,10,,12,,,
-80017,202001,200,35476,149,0.5,,2.09204015,76.03985875,,0.702275751,,0.702275751,,1.313944665,186.8459267,,1.702992408,131.4428927,35476,R,,9,11,,,
-80017,202002,200,50515,149,0.5,0.8701751,1.505585865,98.16768334,1.42394209,0.944611909,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,,,
-80017,202003,200,53477,149,0.5,1.040615327,,79.81873182,1.058635817,,1.058635817,,1.246527322,,255.2315185,1.143571325,,167.5251252,53477,R,10,,12,,,
-80018,202001,200,13845,126,0.5,,2.09204015,76.03985875,,0.543204684,,0.543204684,,1.313944665,186.8459267,,1.702992408,131.4428927,13845,R,,9,11,,,
-80018,202002,200,25488,126,0.5,0.8701751,1.505585865,98.16768334,1.840926688,0.929916997,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,,,
-80018,202003,200,27409,126,0.5,1.040615327,,79.81873182,1.075364795,,1.075364795,,1.246527322,,255.2315185,1.143571325,,167.5251252,27409,R,10,,12,,,
-80019,202001,200,1099,6,0.5,,2.09204015,76.03985875,,2.530969376,,2.530969376,,1.313944665,186.8459267,,1.702992408,131.4428927,1099,R,,9,11,,,
-80019,202002,200,434,6,0.5,0.8701751,1.505585865,98.16768334,0.395105531,3.51659919,0.395105531,,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,,TRUE,
-80019,202003,200,124,6,0.5,1.040615327,,79.81873182,0.284365646,,,,1.246527322,,255.2315185,1.143571325,,167.5251252,124,R,10,,12,TRUE,,
-80020,202001,200,3348,22,0.5,,2.09204015,76.03985875,,1.677715809,,1.677715809,,1.313944665,186.8459267,,1.702992408,131.4428927,3348,R,,9,11,,,
-80020,202002,200,1996,22,0.5,0.8701751,1.505585865,98.16768334,0.596048505,0.395102278,0.596048505,,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,,TRUE,
-80020,202003,200,5051,22,0.5,1.040615327,,79.81873182,2.530990214,,,,1.246527322,,255.2315185,1.143571325,,167.5251252,5051,R,10,,12,TRUE,,
-80021,202001,200,29215,108,0.5,,2.09204015,76.03985875,,0.855047659,,0.855047659,,1.313944665,186.8459267,,1.702992408,131.4428927,29215,R,,9,11,,,
-80021,202002,200,34168,108,0.5,0.8701751,1.505585865,98.16768334,1.169525453,0.554422016,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,,,
-80021,202003,200,61628,108,0.5,1.040615327,,79.81873182,1.803680177,,1.803680177,,1.246527322,,255.2315185,1.143571325,,167.5251252,61628,R,10,,12,,,
-80022,202001,200,6390,67,0.5,,2.09204015,76.03985875,,0.502948427,,,,1.313944665,186.8459267,,1.702992408,131.4428927,6390,R,,9,11,,TRUE,
-80022,202002,200,12705,67,0.5,0.8701751,1.505585865,98.16768334,1.98827543,1.061751691,,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,,TRUE,
-80022,202003,200,11966,67,0.5,1.040615327,,79.81873182,0.9418398,,0.9418398,,1.246527322,,255.2315185,1.143571325,,167.5251252,11966,R,10,,12,,,
-80023,202001,200,4562,18,0.5,,2.09204015,76.03985875,,2.656773442,,2.656773442,,1.313944665,186.8459267,,1.702992408,131.4428927,4562,R,,9,11,,,
-80023,202002,200,1717,18,0.5,0.8701751,1.505585865,98.16768334,0.376396415,0.724105938,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,,,
-80023,202003,200,2371,18,0.5,1.040615327,,79.81873182,1.381013395,,1.381013395,,1.246527322,,255.2315185,1.143571325,,167.5251252,2371,R,10,,12,,,
-80024,202001,200,,155,0.5,,2.09204015,76.03985875,,,,,,1.313944665,186.8459267,,1.702992408,131.4428927,31985.6034,BI,,9,11,,,
-80024,202002,200,18782,155,0.5,0.8701751,1.505585865,98.16768334,,0.892466323,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,,
-80024,202003,200,21046,155,0.5,1.040615327,,79.81873182,1.120490459,,1.120490459,,1.246527322,,255.2315185,1.143571325,,167.5251252,21046,R,10,,12,,,
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+80001,202001,100,89,,2.642597676,144.865,,1.036787797,,2.076255394,107.1910333,,2.359426535,126.0280167,9244,R,,10,12,,,
+80001,202002,100,89,1.186209073,0.751963069,102.4888332,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,
+80001,202003,100,89,1.106182973,,140.2509173,0.694706146,,0.918490819,,69.22002885,1.012336896,,104.7354731,6194,R,9,,11,,,
+80002,202001,100,83,,2.642597676,144.865,,0.817550398,,2.076255394,107.1910333,,2.359426535,126.0280167,4826,R,,10,12,,,
+80002,202002,100,83,1.186209073,0.751963069,102.4888332,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,,,
+80002,202003,100,83,1.106182973,,140.2509173,0.803489751,,0.918490819,,69.22002885,1.012336896,,104.7354731,4743,R,9,,11,,,
+80003,202001,100,4,,2.642597676,144.865,,7.466535433,,2.076255394,107.1910333,,2.359426535,126.0280167,7586,R,,10,12,,,
+80003,202002,100,4,1.186209073,0.751963069,102.4888332,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,,,
+80003,202003,100,4,1.106182973,,140.2509173,1.406496063,,0.918490819,,69.22002885,1.012336896,,104.7354731,1429,R,9,,11,,,
+80004,202001,100,76,,2.642597676,144.865,,1.305847569,,2.076255394,107.1910333,,2.359426535,126.0280167,3975,R,,10,12,,,
+80004,202002,100,76,1.186209073,0.751963069,102.4888332,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,,,
+80004,202003,100,76,1.106182973,,140.2509173,1.206636005,,0.918490819,,69.22002885,1.012336896,,104.7354731,3673,R,9,,11,,,
+80005,202001,100,18,,2.642597676,144.865,,0.622072678,,2.076255394,107.1910333,,2.359426535,126.0280167,1941,R,,10,12,,TRUE,
+80005,202002,100,18,1.186209073,0.751963069,102.4888332,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,TRUE,TRUE,
+80005,202003,100,18,1.106182973,,140.2509173,0.387050567,,0.918490819,,69.22002885,1.012336896,,104.7354731,1208,R,9,,11,,,
+80006,202001,100,94,,2.642597676,144.865,,0.763047038,,2.076255394,107.1910333,,2.359426535,126.0280167,5405,R,,10,12,,,
+80006,202002,100,94,1.186209073,0.751963069,102.4888332,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,,,
+80006,202003,100,94,1.106182973,,140.2509173,0.703053532,,0.918490819,,69.22002885,1.012336896,,104.7354731,4980,R,9,,11,,,
+80007,202001,100,8,,2.642597676,144.865,,5.333239595,,2.076255394,107.1910333,,2.359426535,126.0280167,15172,R,,10,12,,,
+80007,202002,100,8,1.186209073,0.751963069,102.4888332,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,,,
+80007,202003,100,8,1.106182973,,140.2509173,1.230684055,,0.918490819,,69.22002885,1.012336896,,104.7354731,3501,R,9,,11,,,
+80008,202001,100,304,,2.642597676,144.865,,1.129530598,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
+80008,202002,100,304,1.186209073,0.751963069,102.4888332,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,,,
+80008,202003,100,304,1.106182973,,140.2509173,0.990729498,,0.918490819,,69.22002885,1.012336896,,104.7354731,14295,R,9,,11,,,
+80009,202001,100,45,,2.642597676,144.865,,0.740562712,,2.076255394,107.1910333,,2.359426535,126.0280167,3698,R,,10,12,,,
+80009,202002,100,45,1.186209073,0.751963069,102.4888332,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,,,
+80009,202003,100,45,1.106182973,,140.2509173,0.843571749,,0.918490819,,69.22002885,1.012336896,,104.7354731,4212,R,9,,11,,,
+80010,202001,100,100,,2.642597676,144.865,,0.760511998,,2.076255394,107.1910333,,2.359426535,126.0280167,7722,R,,10,12,,,
+80010,202002,100,100,1.186209073,0.751963069,102.4888332,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,,,
+80010,202003,100,100,1.106182973,,140.2509173,0.644660382,,0.918490819,,69.22002885,1.012336896,,104.7354731,6545,R,9,,11,TRUE,,
+80011,202001,100,19,,2.642597676,144.865,,8.365866031,,2.076255394,107.1910333,,2.359426535,126.0280167,30344,R,,10,12,,TRUE,
+80011,202002,100,19,1.186209073,0.751963069,102.4888332,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,TRUE,TRUE,
+80011,202003,100,19,1.106182973,,140.2509173,2.00928009,,0.918490819,,69.22002885,1.012336896,,104.7354731,7288,R,9,,11,TRUE,,
+80012,202001,100,304,,2.642597676,144.865,,1.408940798,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
+80012,202002,100,304,1.186209073,0.751963069,102.4888332,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,,,
+80012,202003,100,304,1.106182973,,140.2509173,,,0.918490819,,69.22002885,1.012336896,,104.7354731,11709.70088,FIR,9,,11,,,
+80013,202001,200,54,,2.09204015,76.03985875,,1.106799294,,1.313944665,186.8459267,,1.702992408,131.4428927,20190,R,,9,11,,,
+80013,202002,200,54,0.8701751,1.505585865,98.16768334,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,,,
+80013,202003,200,54,1.040615327,,79.81873182,1.58023419,,1.246527322,,255.2315185,1.143571325,,167.5251252,28826,R,10,,12,,,
+80014,202001,200,47,,2.09204015,76.03985875,,0.845985046,,1.313944665,186.8459267,,1.702992408,131.4428927,4260,R,,9,11,,,
+80014,202002,200,42,0.8701751,1.505585865,98.16768334,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,,,
+80014,202003,200,42,1.040615327,,79.81873182,1.28773421,,1.246527322,,255.2315185,1.143571325,,167.5251252,6484,R,10,,12,,,
+80015,202001,200,57,,2.09204015,76.03985875,,3.886845827,,1.313944665,186.8459267,,1.702992408,131.4428927,19236,R,,9,11,,TRUE,
+80015,202002,200,57,0.8701751,1.505585865,98.16768334,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,TRUE,,
+80015,202003,200,57,1.040615327,,79.81873182,0.716195191,,1.246527322,,255.2315185,1.143571325,,167.5251252,3544,R,10,,12,,,
+80016,202001,200,163,,2.09204015,76.03985875,,0.906730921,,1.313944665,186.8459267,,1.702992408,131.4428927,14902,R,,9,11,,,
+80016,202002,200,163,0.8701751,1.505585865,98.16768334,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,,,
+80016,202003,200,163,1.040615327,,79.81873182,1.500085186,,1.246527322,,255.2315185,1.143571325,,167.5251252,24653,R,10,,12,,,
+80017,202001,200,149,,2.09204015,76.03985875,,0.702275751,,1.313944665,186.8459267,,1.702992408,131.4428927,35476,R,,9,11,,,
+80017,202002,200,149,0.8701751,1.505585865,98.16768334,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,,,
+80017,202003,200,149,1.040615327,,79.81873182,1.058635817,,1.246527322,,255.2315185,1.143571325,,167.5251252,53477,R,10,,12,,,
+80018,202001,200,126,,2.09204015,76.03985875,,0.543204684,,1.313944665,186.8459267,,1.702992408,131.4428927,13845,R,,9,11,,,
+80018,202002,200,126,0.8701751,1.505585865,98.16768334,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,,,
+80018,202003,200,126,1.040615327,,79.81873182,1.075364795,,1.246527322,,255.2315185,1.143571325,,167.5251252,27409,R,10,,12,,,
+80019,202001,200,6,,2.09204015,76.03985875,,2.530969376,,1.313944665,186.8459267,,1.702992408,131.4428927,1099,R,,9,11,,,
+80019,202002,200,6,0.8701751,1.505585865,98.16768334,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,,TRUE,
+80019,202003,200,6,1.040615327,,79.81873182,0.284365646,,1.246527322,,255.2315185,1.143571325,,167.5251252,124,R,10,,12,TRUE,,
+80020,202001,200,22,,2.09204015,76.03985875,,1.677715809,,1.313944665,186.8459267,,1.702992408,131.4428927,3348,R,,9,11,,,
+80020,202002,200,22,0.8701751,1.505585865,98.16768334,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,,TRUE,
+80020,202003,200,22,1.040615327,,79.81873182,2.530990214,,1.246527322,,255.2315185,1.143571325,,167.5251252,5051,R,10,,12,TRUE,,
+80021,202001,200,108,,2.09204015,76.03985875,,0.855047659,,1.313944665,186.8459267,,1.702992408,131.4428927,29215,R,,9,11,,,
+80021,202002,200,108,0.8701751,1.505585865,98.16768334,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,,,
+80021,202003,200,108,1.040615327,,79.81873182,1.803680177,,1.246527322,,255.2315185,1.143571325,,167.5251252,61628,R,10,,12,,,
+80022,202001,200,67,,2.09204015,76.03985875,,0.502948427,,1.313944665,186.8459267,,1.702992408,131.4428927,6390,R,,9,11,,TRUE,
+80022,202002,200,67,0.8701751,1.505585865,98.16768334,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,,TRUE,
+80022,202003,200,67,1.040615327,,79.81873182,0.9418398,,1.246527322,,255.2315185,1.143571325,,167.5251252,11966,R,10,,12,,,
+80023,202001,200,18,,2.09204015,76.03985875,,2.656773442,,1.313944665,186.8459267,,1.702992408,131.4428927,4562,R,,9,11,,,
+80023,202002,200,18,0.8701751,1.505585865,98.16768334,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,,,
+80023,202003,200,18,1.040615327,,79.81873182,1.381013395,,1.246527322,,255.2315185,1.143571325,,167.5251252,2371,R,10,,12,,,
+80024,202001,200,155,,2.09204015,76.03985875,,,,1.313944665,186.8459267,,1.702992408,131.4428927,31985.6034,BI,,9,11,,,
+80024,202002,200,155,0.8701751,1.505585865,98.16768334,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,,
+80024,202003,200,155,1.040615327,,79.81873182,1.120490459,,1.246527322,,255.2315185,1.143571325,,167.5251252,21046,R,10,,12,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
index c1b2645a..ffd7a9f4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,0.5,,2.09204015,76.03985875
-30001,202002,100,7476,51,0.5,0.8701751,1.505585865,123.1676833
-30001,202003,100,2003,51,0.5,2.040615327,,84.81873182
-30002,202001,100,9343,72,0.5,,2.09204015,76.03985875
-30002,202002,100,7818,72,0.5,0.8701751,1.505585865,123.1676833
-30002,202003,100,4897,72,0.5,2.040615327,,84.81873182
-30003,202001,100,7511,7,0.5,,2.09204015,76.03985875
-30003,202002,100,1761,7,0.5,0.8701751,1.505585865,123.1676833
-30003,202003,100,6492,7,0.5,2.040615327,,84.81873182
-30004,202001,100,64,81,0.5,,2.09204015,76.03985875
-30004,202002,100,2113,81,0.5,0.8701751,1.505585865,123.1676833
-30004,202003,100,185,81,0.5,2.040615327,,84.81873182
-30005,202001,100,844,5,0.5,,2.09204015,76.03985875
-30005,202002,100,897,5,0.5,0.8701751,1.505585865,123.1676833
-30005,202003,100,280,5,0.5,2.040615327,,84.81873182
-30006,202001,100,1869,14,0.5,,2.09204015,76.03985875
-30006,202002,100,1876,14,0.5,0.8701751,1.505585865,123.1676833
-30006,202003,100,1371,14,0.5,2.040615327,,84.81873182
-30007,202001,100,12769,12,0.5,,2.09204015,76.03985875
-30007,202002,100,2853,12,0.5,0.8701751,1.505585865,123.1676833
-30007,202003,100,11491,12,0.5,2.040615327,,84.81873182
-30008,202001,100,141,162,0.5,,2.09204015,76.03985875
-30008,202002,100,6001,162,0.5,0.8701751,1.505585865,123.1676833
-30008,202003,100,433,162,0.5,2.040615327,,84.81873182
-30009,202001,100,6417,26,0.5,,2.09204015,76.03985875
-30009,202002,100,4037,26,0.5,0.8701751,1.505585865,123.1676833
-30009,202003,100,1322,26,0.5,2.040615327,,84.81873182
-30010,202001,100,28963,144,0.5,,2.09204015,76.03985875
-30010,202002,100,21734,144,0.5,0.8701751,1.505585865,123.1676833
-30010,202003,100,10529,144,0.5,2.040615327,,84.81873182
-30011,202001,100,6009,5,0.5,,2.09204015,76.03985875
-30011,202002,100,1145,5,0.5,0.8701751,1.505585865,123.1676833
-30011,202003,100,5064,5,0.5,2.040615327,,84.81873182
-30012,202001,100,,275,0.5,,2.09204015,76.03985875
-30012,202002,100,,275,0.5,0.8701751,1.505585865,123.1676833
-30012,202003,100,,275,0.5,2.040615327,,84.81873182
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,,2.09204015,76.03985875
+30001,202002,100,7476,51,0.8701751,1.505585865,123.1676833
+30001,202003,100,2003,51,2.040615327,,84.81873182
+30002,202001,100,9343,72,,2.09204015,76.03985875
+30002,202002,100,7818,72,0.8701751,1.505585865,123.1676833
+30002,202003,100,4897,72,2.040615327,,84.81873182
+30003,202001,100,7511,7,,2.09204015,76.03985875
+30003,202002,100,1761,7,0.8701751,1.505585865,123.1676833
+30003,202003,100,6492,7,2.040615327,,84.81873182
+30004,202001,100,64,81,,2.09204015,76.03985875
+30004,202002,100,2113,81,0.8701751,1.505585865,123.1676833
+30004,202003,100,185,81,2.040615327,,84.81873182
+30005,202001,100,844,5,,2.09204015,76.03985875
+30005,202002,100,897,5,0.8701751,1.505585865,123.1676833
+30005,202003,100,280,5,2.040615327,,84.81873182
+30006,202001,100,1869,14,,2.09204015,76.03985875
+30006,202002,100,1876,14,0.8701751,1.505585865,123.1676833
+30006,202003,100,1371,14,2.040615327,,84.81873182
+30007,202001,100,12769,12,,2.09204015,76.03985875
+30007,202002,100,2853,12,0.8701751,1.505585865,123.1676833
+30007,202003,100,11491,12,2.040615327,,84.81873182
+30008,202001,100,141,162,,2.09204015,76.03985875
+30008,202002,100,6001,162,0.8701751,1.505585865,123.1676833
+30008,202003,100,433,162,2.040615327,,84.81873182
+30009,202001,100,6417,26,,2.09204015,76.03985875
+30009,202002,100,4037,26,0.8701751,1.505585865,123.1676833
+30009,202003,100,1322,26,2.040615327,,84.81873182
+30010,202001,100,28963,144,,2.09204015,76.03985875
+30010,202002,100,21734,144,0.8701751,1.505585865,123.1676833
+30010,202003,100,10529,144,2.040615327,,84.81873182
+30011,202001,100,6009,5,,2.09204015,76.03985875
+30011,202002,100,1145,5,0.8701751,1.505585865,123.1676833
+30011,202003,100,5064,5,2.040615327,,84.81873182
+30012,202001,100,,275,,2.09204015,76.03985875
+30012,202002,100,,275,0.8701751,1.505585865,123.1676833
+30012,202003,100,,275,2.040615327,,84.81873182
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index 10db4e5f..d51588ba 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
-30001,202001,100,8444,51,0.5,,2.09204015,76.03985875,,1.129481006,,1.129481006,,1.772802559,142.3186593,,1.932421355,109.179259,8444,R,,9,11,,
-30001,202002,100,7476,51,0.5,0.8701751,1.505585865,123.1676833,0.885362387,3.732401398,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,,
-30001,202003,100,2003,51,0.5,2.040615327,,84.81873182,0.267924024,,0.267924024,,1.172391173,,76.13443331,1.60650325,,80.47658257,2003,R,9,,11,,
-30002,202001,100,9343,72,0.5,,2.09204015,76.03985875,,1.195062676,,1.195062676,,1.772802559,142.3186593,,1.932421355,109.179259,9343,R,,9,11,,
-30002,202002,100,7818,72,0.5,0.8701751,1.505585865,123.1676833,0.836776196,1.596487645,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,,
-30002,202003,100,4897,72,0.5,2.040615327,,84.81873182,0.626375032,,0.626375032,,1.172391173,,76.13443331,1.60650325,,80.47658257,4897,R,9,,11,,
-30003,202001,100,7511,7,0.5,,2.09204015,76.03985875,,4.265190233,,4.265190233,,1.772802559,142.3186593,,1.932421355,109.179259,7511,R,,9,11,,
-30003,202002,100,1761,7,0.5,0.8701751,1.505585865,123.1676833,0.234456131,0.271256932,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,,
-30003,202003,100,6492,7,0.5,2.040615327,,84.81873182,3.686541738,,3.686541738,,1.172391173,,76.13443331,1.60650325,,80.47658257,6492,R,9,,11,,
-30004,202001,100,64,81,0.5,,2.09204015,76.03985875,,0.030288689,,0.030288689,,1.772802559,142.3186593,,1.932421355,109.179259,64,R,,9,11,,
-30004,202002,100,2113,81,0.5,0.8701751,1.505585865,123.1676833,33.015625,11.42162162,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,,
-30004,202003,100,185,81,0.5,2.040615327,,84.81873182,0.087553242,,0.087553242,,1.172391173,,76.13443331,1.60650325,,80.47658257,185,R,9,,11,,
-30005,202001,100,844,5,0.5,,2.09204015,76.03985875,,0.941234172,,0.941234172,,1.772802559,142.3186593,,1.932421355,109.179259,844,R,,9,11,,
-30005,202002,100,897,5,0.5,0.8701751,1.505585865,123.1676833,1.062434865,3.199201198,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,,
-30005,202003,100,280,5,0.5,2.040615327,,84.81873182,0.312578027,,0.312578027,,1.172391173,,76.13443331,1.60650325,,80.47658257,280,R,9,,11,,
-30006,202001,100,1869,14,0.5,,2.09204015,76.03985875,,0.995885563,,0.995885563,,1.772802559,142.3186593,,1.932421355,109.179259,1869,R,,9,11,,
-30006,202002,100,1876,14,0.5,0.8701751,1.505585865,123.1676833,1.004131435,1.368417982,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,,
-30006,202003,100,1371,14,0.5,2.040615327,,84.81873182,0.730770871,,0.730770871,,1.172391173,,76.13443331,1.60650325,,80.47658257,1371,R,9,,11,,
-30007,202001,100,12769,12,0.5,,2.09204015,76.03985875,,4.475816911,,4.475816911,,1.772802559,142.3186593,,1.932421355,109.179259,12769,R,,9,11,,
-30007,202002,100,2853,12,0.5,0.8701751,1.505585865,123.1676833,0.223422901,0.248269056,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,,
-30007,202003,100,11491,12,0.5,2.040615327,,84.81873182,4.027888195,,4.027888195,,1.172391173,,76.13443331,1.60650325,,80.47658257,11491,R,9,,11,,
-30008,202001,100,141,162,0.5,,2.09204015,76.03985875,,0.023463069,,,,1.772802559,142.3186593,,1.932421355,109.179259,141,R,,9,11,,TRUE
-30008,202002,100,6001,162,0.5,0.8701751,1.505585865,123.1676833,42.62017045,13.86213906,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,433,162,0.5,2.040615327,,84.81873182,0.072138939,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,433,R,9,,11,TRUE,
-30009,202001,100,6417,26,0.5,,2.09204015,76.03985875,,1.589639934,,1.589639934,,1.772802559,142.3186593,,1.932421355,109.179259,6417,R,,9,11,,
-30009,202002,100,4037,26,0.5,0.8701751,1.505585865,123.1676833,0.629073275,3.053782962,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,,
-30009,202003,100,1322,26,0.5,2.040615327,,84.81873182,0.327462695,,0.327462695,,1.172391173,,76.13443331,1.60650325,,80.47658257,1322,R,9,,11,,
-30010,202001,100,28963,144,0.5,,2.09204015,76.03985875,,1.332623847,,1.332623847,,1.772802559,142.3186593,,1.932421355,109.179259,28963,R,,9,11,,
-30010,202002,100,21734,144,0.5,0.8701751,1.505585865,123.1676833,0.750399298,2.064295653,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,,
-30010,202003,100,10529,144,0.5,2.040615327,,84.81873182,0.484426733,,0.484426733,,1.172391173,,76.13443331,1.60650325,,80.47658257,10529,R,9,,11,,
-30011,202001,100,6009,5,0.5,,2.09204015,76.03985875,,5.249464902,,,,1.772802559,142.3186593,,1.932421355,109.179259,6009,R,,9,11,,TRUE
-30011,202002,100,1145,5,0.5,0.8701751,1.505585865,123.1676833,0.190495606,0.226047443,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5064,5,0.5,2.040615327,,84.81873182,4.423850085,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,5064,R,9,,11,TRUE,
-30012,202001,100,,275,0.5,,2.09204015,76.03985875,,,,,,1.772802559,142.3186593,,1.932421355,109.179259,30024.29623,C,,9,11,,
-30012,202002,100,,275,0.5,0.8701751,1.505585865,123.1676833,,,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,
-30012,202003,100,,275,0.5,2.040615327,,84.81873182,,,,,1.172391173,,76.13443331,1.60650325,,80.47658257,124533.173,FIC,9,,11,,
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+30001,202001,100,51,,2.09204015,76.03985875,,1.129481006,,1.772802559,142.3186593,,1.932421355,109.179259,8444,R,,9,11,,
+30001,202002,100,51,0.8701751,1.505585865,123.1676833,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,,
+30001,202003,100,51,2.040615327,,84.81873182,0.267924024,,1.172391173,,76.13443331,1.60650325,,80.47658257,2003,R,9,,11,,
+30002,202001,100,72,,2.09204015,76.03985875,,1.195062676,,1.772802559,142.3186593,,1.932421355,109.179259,9343,R,,9,11,,
+30002,202002,100,72,0.8701751,1.505585865,123.1676833,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,,
+30002,202003,100,72,2.040615327,,84.81873182,0.626375032,,1.172391173,,76.13443331,1.60650325,,80.47658257,4897,R,9,,11,,
+30003,202001,100,7,,2.09204015,76.03985875,,4.265190233,,1.772802559,142.3186593,,1.932421355,109.179259,7511,R,,9,11,,
+30003,202002,100,7,0.8701751,1.505585865,123.1676833,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,,
+30003,202003,100,7,2.040615327,,84.81873182,3.686541738,,1.172391173,,76.13443331,1.60650325,,80.47658257,6492,R,9,,11,,
+30004,202001,100,81,,2.09204015,76.03985875,,0.030288689,,1.772802559,142.3186593,,1.932421355,109.179259,64,R,,9,11,,
+30004,202002,100,81,0.8701751,1.505585865,123.1676833,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,,
+30004,202003,100,81,2.040615327,,84.81873182,0.087553242,,1.172391173,,76.13443331,1.60650325,,80.47658257,185,R,9,,11,,
+30005,202001,100,5,,2.09204015,76.03985875,,0.941234172,,1.772802559,142.3186593,,1.932421355,109.179259,844,R,,9,11,,
+30005,202002,100,5,0.8701751,1.505585865,123.1676833,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,,
+30005,202003,100,5,2.040615327,,84.81873182,0.312578027,,1.172391173,,76.13443331,1.60650325,,80.47658257,280,R,9,,11,,
+30006,202001,100,14,,2.09204015,76.03985875,,0.995885563,,1.772802559,142.3186593,,1.932421355,109.179259,1869,R,,9,11,,
+30006,202002,100,14,0.8701751,1.505585865,123.1676833,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,,
+30006,202003,100,14,2.040615327,,84.81873182,0.730770871,,1.172391173,,76.13443331,1.60650325,,80.47658257,1371,R,9,,11,,
+30007,202001,100,12,,2.09204015,76.03985875,,4.475816911,,1.772802559,142.3186593,,1.932421355,109.179259,12769,R,,9,11,,
+30007,202002,100,12,0.8701751,1.505585865,123.1676833,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,,
+30007,202003,100,12,2.040615327,,84.81873182,4.027888195,,1.172391173,,76.13443331,1.60650325,,80.47658257,11491,R,9,,11,,
+30008,202001,100,162,,2.09204015,76.03985875,,0.023463069,,1.772802559,142.3186593,,1.932421355,109.179259,141,R,,9,11,,TRUE
+30008,202002,100,162,0.8701751,1.505585865,123.1676833,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,162,2.040615327,,84.81873182,0.072138939,,1.172391173,,76.13443331,1.60650325,,80.47658257,433,R,9,,11,TRUE,
+30009,202001,100,26,,2.09204015,76.03985875,,1.589639934,,1.772802559,142.3186593,,1.932421355,109.179259,6417,R,,9,11,,
+30009,202002,100,26,0.8701751,1.505585865,123.1676833,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,,
+30009,202003,100,26,2.040615327,,84.81873182,0.327462695,,1.172391173,,76.13443331,1.60650325,,80.47658257,1322,R,9,,11,,
+30010,202001,100,144,,2.09204015,76.03985875,,1.332623847,,1.772802559,142.3186593,,1.932421355,109.179259,28963,R,,9,11,,
+30010,202002,100,144,0.8701751,1.505585865,123.1676833,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,,
+30010,202003,100,144,2.040615327,,84.81873182,0.484426733,,1.172391173,,76.13443331,1.60650325,,80.47658257,10529,R,9,,11,,
+30011,202001,100,5,,2.09204015,76.03985875,,5.249464902,,1.772802559,142.3186593,,1.932421355,109.179259,6009,R,,9,11,,TRUE
+30011,202002,100,5,0.8701751,1.505585865,123.1676833,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5,2.040615327,,84.81873182,4.423850085,,1.172391173,,76.13443331,1.60650325,,80.47658257,5064,R,9,,11,TRUE,
+30012,202001,100,275,,2.09204015,76.03985875,,,,1.772802559,142.3186593,,1.932421355,109.179259,30024.29623,C,,9,11,,
+30012,202002,100,275,0.8701751,1.505585865,123.1676833,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,
+30012,202003,100,275,2.040615327,,84.81873182,,,1.172391173,,76.13443331,1.60650325,,80.47658257,124533.173,FIC,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
index 73f13173..49371146 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
@@ -1,64 +1,64 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-90001,202001,100,9244,89,0.5,,2.09204015,76.03985875
-90001,202002,100,8916,89,0.5,0.8701751,1.505585865,123.1676833
-90001,202003,100,6194,89,0.5,2.040615327,,84.81873182
-90002,202001,100,4826,83,0.5,,2.09204015,76.03985875
-90002,202002,100,5903,83,0.5,0.8701751,1.505585865,123.1676833
-90002,202003,100,4743,83,0.5,2.040615327,,84.81873182
-90003,202001,100,7586,4,0.5,,2.09204015,76.03985875
-90003,202002,100,1016,4,0.5,0.8701751,1.505585865,123.1676833
-90003,202003,100,1429,4,0.5,2.040615327,,84.81873182
-90004,202001,100,3975,76,0.5,,2.09204015,76.03985875
-90004,202002,100,3044,76,0.5,0.8701751,1.505585865,123.1676833
-90004,202003,100,3673,76,0.5,2.040615327,,84.81873182
-90005,202001,100,1941,18,0.5,,2.09204015,76.03985875
-90005,202002,100,3121,18,0.5,0.8701751,1.505585865,123.1676833
-90005,202003,100,1208,18,0.5,2.040615327,,84.81873182
-90006,202001,100,5405,94,0.5,,2.09204015,76.03985875
-90006,202002,100,7084,94,0.5,0.8701751,1.505585865,123.1676833
-90006,202003,100,4980,94,0.5,2.040615327,,84.81873182
-90007,202001,100,15172,8,0.5,,2.09204015,76.03985875
-90007,202002,100,2845,8,0.5,0.8701751,1.505585865,123.1676833
-90007,202003,100,3501,8,0.5,2.040615327,,84.81873182
-90008,202001,100,16298,304,0.5,,2.09204015,76.03985875
-90008,202002,100,14429,304,0.5,0.8701751,1.505585865,123.1676833
-90008,202003,100,14295,304,0.5,2.040615327,,84.81873182
-90009,202001,100,3698,45,0.5,,2.09204015,76.03985875
-90009,202002,100,4993,45,0.5,0.8701751,1.505585865,123.1676833
-90009,202003,100,4212,45,0.5,2.040615327,,84.81873182
-90010,202001,100,7722,100,0.5,,2.09204015,76.03985875
-90010,202002,100,10153,100,0.5,0.8701751,1.505585865,123.1676833
-90010,202003,100,6545,100,0.5,2.040615327,,84.81873182
-90011,202001,100,30344,19,0.5,,2.09204015,76.03985875
-90011,202002,100,3627,19,0.5,0.8701751,1.505585865,123.1676833
-90011,202003,100,7288,19,0.5,2.040615327,,84.81873182
-90012,202001,100,16298,304,0.5,,2.09204015,76.03985875
-90012,202002,100,11567,304,0.5,0.8701751,1.505585865,123.1676833
-90012,202003,100,13484,304,0.5,2.040615327,,84.81873182
-90013,202001,100,20190,54,0.5,,2.09204015,76.03985875
-90013,202002,100,18242,54,0.5,0.8701751,1.505585865,123.1676833
-90013,202003,100,28826,54,0.5,2.040615327,,84.81873182
-90014,202001,100,4260,47,0.5,,2.09204015,76.03985875
-90014,202002,100,5036,42,0.5,0.8701751,1.505585865,123.1676833
-90014,202003,100,6484,42,0.5,2.040615327,,84.81873182
-90015,202001,100,19236,57,0.5,,2.09204015,76.03985875
-90015,202002,100,4949,57,0.5,0.8701751,1.505585865,123.1676833
-90015,202003,100,3544,57,0.5,2.040615327,,84.81873182
-90016,202001,100,14902,163,0.5,,2.09204015,76.03985875
-90016,202002,100,16435,163,0.5,0.8701751,1.505585865,123.1676833
-90016,202003,100,24653,163,0.5,2.040615327,,84.81873182
-90017,202001,100,35476,149,0.5,,2.09204015,76.03985875
-90017,202002,100,50515,149,0.5,0.8701751,1.505585865,123.1676833
-90017,202003,100,53477,149,0.5,2.040615327,,84.81873182
-90018,202001,100,13845,126,0.5,,2.09204015,76.03985875
-90018,202002,100,25488,126,0.5,0.8701751,1.505585865,123.1676833
-90018,202003,100,27409,126,0.5,2.040615327,,84.81873182
-90019,202001,100,1099,6,0.5,,2.09204015,76.03985875
-90019,202002,100,434,6,0.5,0.8701751,1.505585865,123.1676833
-90019,202003,100,124,6,0.5,2.040615327,,84.81873182
-90020,202001,100,3348,22,0.5,,2.09204015,76.03985875
-90020,202002,100,1996,22,0.5,0.8701751,1.505585865,123.1676833
-90020,202003,100,5051,22,0.5,2.040615327,,84.81873182
-90021,202001,100,,155,0.5,,2.09204015,76.03985875
-90021,202002,100,,155,0.5,0.8701751,1.505585865,123.1676833
-90021,202003,100,21046,155,0.5,2.040615327,,84.81873182
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+90001,202001,100,9244,89,,2.09204015,76.03985875
+90001,202002,100,8916,89,0.8701751,1.505585865,123.1676833
+90001,202003,100,6194,89,2.040615327,,84.81873182
+90002,202001,100,4826,83,,2.09204015,76.03985875
+90002,202002,100,5903,83,0.8701751,1.505585865,123.1676833
+90002,202003,100,4743,83,2.040615327,,84.81873182
+90003,202001,100,7586,4,,2.09204015,76.03985875
+90003,202002,100,1016,4,0.8701751,1.505585865,123.1676833
+90003,202003,100,1429,4,2.040615327,,84.81873182
+90004,202001,100,3975,76,,2.09204015,76.03985875
+90004,202002,100,3044,76,0.8701751,1.505585865,123.1676833
+90004,202003,100,3673,76,2.040615327,,84.81873182
+90005,202001,100,1941,18,,2.09204015,76.03985875
+90005,202002,100,3121,18,0.8701751,1.505585865,123.1676833
+90005,202003,100,1208,18,2.040615327,,84.81873182
+90006,202001,100,5405,94,,2.09204015,76.03985875
+90006,202002,100,7084,94,0.8701751,1.505585865,123.1676833
+90006,202003,100,4980,94,2.040615327,,84.81873182
+90007,202001,100,15172,8,,2.09204015,76.03985875
+90007,202002,100,2845,8,0.8701751,1.505585865,123.1676833
+90007,202003,100,3501,8,2.040615327,,84.81873182
+90008,202001,100,16298,304,,2.09204015,76.03985875
+90008,202002,100,14429,304,0.8701751,1.505585865,123.1676833
+90008,202003,100,14295,304,2.040615327,,84.81873182
+90009,202001,100,3698,45,,2.09204015,76.03985875
+90009,202002,100,4993,45,0.8701751,1.505585865,123.1676833
+90009,202003,100,4212,45,2.040615327,,84.81873182
+90010,202001,100,7722,100,,2.09204015,76.03985875
+90010,202002,100,10153,100,0.8701751,1.505585865,123.1676833
+90010,202003,100,6545,100,2.040615327,,84.81873182
+90011,202001,100,30344,19,,2.09204015,76.03985875
+90011,202002,100,3627,19,0.8701751,1.505585865,123.1676833
+90011,202003,100,7288,19,2.040615327,,84.81873182
+90012,202001,100,16298,304,,2.09204015,76.03985875
+90012,202002,100,11567,304,0.8701751,1.505585865,123.1676833
+90012,202003,100,13484,304,2.040615327,,84.81873182
+90013,202001,100,20190,54,,2.09204015,76.03985875
+90013,202002,100,18242,54,0.8701751,1.505585865,123.1676833
+90013,202003,100,28826,54,2.040615327,,84.81873182
+90014,202001,100,4260,47,,2.09204015,76.03985875
+90014,202002,100,5036,42,0.8701751,1.505585865,123.1676833
+90014,202003,100,6484,42,2.040615327,,84.81873182
+90015,202001,100,19236,57,,2.09204015,76.03985875
+90015,202002,100,4949,57,0.8701751,1.505585865,123.1676833
+90015,202003,100,3544,57,2.040615327,,84.81873182
+90016,202001,100,14902,163,,2.09204015,76.03985875
+90016,202002,100,16435,163,0.8701751,1.505585865,123.1676833
+90016,202003,100,24653,163,2.040615327,,84.81873182
+90017,202001,100,35476,149,,2.09204015,76.03985875
+90017,202002,100,50515,149,0.8701751,1.505585865,123.1676833
+90017,202003,100,53477,149,2.040615327,,84.81873182
+90018,202001,100,13845,126,,2.09204015,76.03985875
+90018,202002,100,25488,126,0.8701751,1.505585865,123.1676833
+90018,202003,100,27409,126,2.040615327,,84.81873182
+90019,202001,100,1099,6,,2.09204015,76.03985875
+90019,202002,100,434,6,0.8701751,1.505585865,123.1676833
+90019,202003,100,124,6,2.040615327,,84.81873182
+90020,202001,100,3348,22,,2.09204015,76.03985875
+90020,202002,100,1996,22,0.8701751,1.505585865,123.1676833
+90020,202003,100,5051,22,2.040615327,,84.81873182
+90021,202001,100,,155,,2.09204015,76.03985875
+90021,202002,100,,155,0.8701751,1.505585865,123.1676833
+90021,202003,100,21046,155,2.040615327,,84.81873182
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index 0af751b4..ed9c9a09 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,disc_count_fi,disc_count_bi,disc_count_c,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
-90001,202001,100,9244,89,0.5,,2.09204015,76.03985875,,1.036787797,,1.036787797,,1.504436071,128.8429705,,1.798238111,102.4414146,9244,R,,17,19,,3,1,,,
-90001,202002,100,8916,89,0.5,0.8701751,1.505585865,123.1676833,0.964517525,1.43945754,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,3,2,0,,,
-90001,202003,100,6194,89,0.5,2.040615327,,84.81873182,0.694706146,,0.694706146,,1.072463185,,126.2596455,1.556539256,,105.5391887,6194,R,18,,21,2,,0,,,
-90002,202001,100,4826,83,0.5,,2.09204015,76.03985875,,0.817550398,,0.817550398,,1.504436071,128.8429705,,1.798238111,102.4414146,4826,R,,17,19,,3,1,,,
-90002,202002,100,5903,83,0.5,0.8701751,1.505585865,123.1676833,1.223166183,1.244570947,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,3,2,0,,,
-90002,202003,100,4743,83,0.5,2.040615327,,84.81873182,0.803489751,,0.803489751,,1.072463185,,126.2596455,1.556539256,,105.5391887,4743,R,18,,21,2,,0,,,
-90003,202001,100,7586,4,0.5,,2.09204015,76.03985875,,,,,,1.504436071,128.8429705,,1.798238111,102.4414146,7586,R,,17,19,,3,1,,,TRUE
-90003,202002,100,1016,4,0.5,0.8701751,1.505585865,123.1676833,,0.710986704,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,3,2,0,,,
-90003,202003,100,1429,4,0.5,2.040615327,,84.81873182,1.406496063,,1.406496063,,1.072463185,,126.2596455,1.556539256,,105.5391887,1429,R,18,,21,2,,0,,,
-90004,202001,100,3975,76,0.5,,2.09204015,76.03985875,,1.305847569,,1.305847569,,1.504436071,128.8429705,,1.798238111,102.4414146,3975,R,,17,19,,3,1,,,
-90004,202002,100,3044,76,0.5,0.8701751,1.505585865,123.1676833,0.765786164,0.82875034,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,3,2,0,,,
-90004,202003,100,3673,76,0.5,2.040615327,,84.81873182,1.206636005,,1.206636005,,1.072463185,,126.2596455,1.556539256,,105.5391887,3673,R,18,,21,2,,0,,,
-90005,202001,100,1941,18,0.5,,2.09204015,76.03985875,,0.622072678,,0.622072678,,1.504436071,128.8429705,,1.798238111,102.4414146,1941,R,,17,19,,3,1,,,
-90005,202002,100,3121,18,0.5,0.8701751,1.505585865,123.1676833,1.607529208,2.583641738,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,3,2,0,,,
-90005,202003,100,1208,18,0.5,2.040615327,,84.81873182,0.387050567,,0.387050567,,1.072463185,,126.2596455,1.556539256,,105.5391887,1208,R,18,,21,2,,0,,,
-90006,202001,100,5405,94,0.5,,2.09204015,76.03985875,,0.763047038,,0.763047038,,1.504436071,128.8429705,,1.798238111,102.4414146,5405,R,,17,19,,3,1,,,
-90006,202002,100,7084,94,0.5,0.8701751,1.505585865,123.1676833,1.310535196,1.422366796,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,3,2,0,,,
-90006,202003,100,4980,94,0.5,2.040615327,,84.81873182,0.703053532,,0.703053532,,1.072463185,,126.2596455,1.556539256,,105.5391887,4980,R,18,,21,2,,0,,,
-90007,202001,100,15172,8,0.5,,2.09204015,76.03985875,,5.333239595,,5.333239595,,1.504436071,128.8429705,,1.798238111,102.4414146,15172,R,,17,19,,3,1,,,
-90007,202002,100,2845,8,0.5,0.8701751,1.505585865,123.1676833,0.187503296,0.812556233,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,3,2,0,,,
-90007,202003,100,3501,8,0.5,2.040615327,,84.81873182,1.230684055,,1.230684055,,1.072463185,,126.2596455,1.556539256,,105.5391887,3501,R,18,,21,2,,0,,,
-90008,202001,100,16298,304,0.5,,2.09204015,76.03985875,,1.129530598,,1.129530598,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
-90008,202002,100,14429,304,0.5,0.8701751,1.505585865,123.1676833,0.885323516,1.009357249,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,3,2,0,,,
-90008,202003,100,14295,304,0.5,2.040615327,,84.81873182,0.990729498,,0.990729498,,1.072463185,,126.2596455,1.556539256,,105.5391887,14295,R,18,,21,2,,0,,,
-90009,202001,100,3698,45,0.5,,2.09204015,76.03985875,,0.740562712,,0.740562712,,1.504436071,128.8429705,,1.798238111,102.4414146,3698,R,,17,19,,3,1,,,
-90009,202002,100,4993,45,0.5,0.8701751,1.505585865,123.1676833,1.350324535,1.185435621,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,3,2,0,,,
-90009,202003,100,4212,45,0.5,2.040615327,,84.81873182,0.843571749,,0.843571749,,1.072463185,,126.2596455,1.556539256,,105.5391887,4212,R,18,,21,2,,0,,,
-90010,202001,100,7722,100,0.5,,2.09204015,76.03985875,,0.760511998,,0.760511998,,1.504436071,128.8429705,,1.798238111,102.4414146,7722,R,,17,19,,3,1,,,
-90010,202002,100,10153,100,0.5,0.8701751,1.505585865,123.1676833,1.314903647,1.551204368,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,3,2,0,,,
-90010,202003,100,6545,100,0.5,2.040615327,,84.81873182,0.644660382,,0.644660382,,1.072463185,,126.2596455,1.556539256,,105.5391887,6545,R,18,,21,2,,0,,,
-90011,202001,100,30344,19,0.5,,2.09204015,76.03985875,,8.365866031,,,,1.504436071,128.8429705,,1.798238111,102.4414146,30344,R,,17,19,,3,1,,TRUE,
-90011,202002,100,3627,19,0.5,0.8701751,1.505585865,123.1676833,0.119533351,0.497690693,,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,3,2,0,TRUE,,
-90011,202003,100,7288,19,0.5,2.040615327,,84.81873182,2.00928009,,2.00928009,,1.072463185,,126.2596455,1.556539256,,105.5391887,7288,R,18,,21,2,,0,,,
-90012,202001,100,16298,304,0.5,,2.09204015,76.03985875,,1.408940798,,1.408940798,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
-90012,202002,100,11567,304,0.5,0.8701751,1.505585865,123.1676833,0.70975303,0.857831504,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,3,2,0,,,
-90012,202003,100,13484,304,0.5,2.040615327,,84.81873182,1.165730094,,1.165730094,,1.072463185,,126.2596455,1.556539256,,105.5391887,13484,R,18,,21,2,,0,,,
-90013,202001,100,20190,54,0.5,,2.09204015,76.03985875,,1.106799294,,1.106799294,,1.504436071,128.8429705,,1.798238111,102.4414146,20190,R,,17,19,,3,1,,,
-90013,202002,100,18242,54,0.5,0.8701751,1.505585865,123.1676833,0.903506178,0.632817595,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,3,2,0,,,
-90013,202003,100,28826,54,0.5,2.040615327,,84.81873182,1.58023419,,1.58023419,,1.072463185,,126.2596455,1.556539256,,105.5391887,28826,R,18,,21,2,,0,,,
-90014,202001,100,4260,47,0.5,,2.09204015,76.03985875,,0.845985046,,0.845985046,,1.504436071,128.8429705,,1.798238111,102.4414146,4260,R,,17,19,,3,1,,,
-90014,202002,100,5036,42,0.5,0.8701751,1.505585865,123.1676833,1.182053991,0.776557765,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,3,2,0,,,
-90014,202003,100,6484,42,0.5,2.040615327,,84.81873182,1.28773421,,1.28773421,,1.072463185,,126.2596455,1.556539256,,105.5391887,6484,R,18,,21,2,,0,,,
-90015,202001,100,19236,57,0.5,,2.09204015,76.03985875,,3.886845827,,3.886845827,,1.504436071,128.8429705,,1.798238111,102.4414146,19236,R,,17,19,,3,1,,,
-90015,202002,100,4949,57,0.5,0.8701751,1.505585865,123.1676833,0.25727802,1.396267404,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,3,2,0,,,
-90015,202003,100,3544,57,0.5,2.040615327,,84.81873182,0.716195191,,0.716195191,,1.072463185,,126.2596455,1.556539256,,105.5391887,3544,R,18,,21,2,,0,,,
-90016,202001,100,14902,163,0.5,,2.09204015,76.03985875,,0.906730921,,0.906730921,,1.504436071,128.8429705,,1.798238111,102.4414146,14902,R,,17,19,,3,1,,,
-90016,202002,100,16435,163,0.5,0.8701751,1.505585865,123.1676833,1.102863018,0.666628808,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,3,2,0,,,
-90016,202003,100,24653,163,0.5,2.040615327,,84.81873182,1.500085186,,1.500085186,,1.072463185,,126.2596455,1.556539256,,105.5391887,24653,R,18,,21,2,,0,,,
-90017,202001,100,35476,149,0.5,,2.09204015,76.03985875,,0.702275751,,0.702275751,,1.504436071,128.8429705,,1.798238111,102.4414146,35476,R,,17,19,,3,1,,,
-90017,202002,100,50515,149,0.5,0.8701751,1.505585865,123.1676833,1.42394209,0.944611909,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,3,2,0,,,
-90017,202003,100,53477,149,0.5,2.040615327,,84.81873182,1.058635817,,1.058635817,,1.072463185,,126.2596455,1.556539256,,105.5391887,53477,R,18,,21,2,,0,,,
-90018,202001,100,13845,126,0.5,,2.09204015,76.03985875,,0.543204684,,,,1.504436071,128.8429705,,1.798238111,102.4414146,13845,R,,17,19,,3,1,,TRUE,
-90018,202002,100,25488,126,0.5,0.8701751,1.505585865,123.1676833,1.840926688,0.929916997,,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,3,2,0,TRUE,,
-90018,202003,100,27409,126,0.5,2.040615327,,84.81873182,1.075364795,,1.075364795,,1.072463185,,126.2596455,1.556539256,,105.5391887,27409,R,18,,21,2,,0,,,
-90019,202001,100,1099,6,0.5,,2.09204015,76.03985875,,2.530969376,,2.530969376,,1.504436071,128.8429705,,1.798238111,102.4414146,1099,R,,17,19,,3,1,,,
-90019,202002,100,434,6,0.5,0.8701751,1.505585865,123.1676833,0.395105531,3.51659919,0.395105531,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,3,2,0,,TRUE,
-90019,202003,100,124,6,0.5,2.040615327,,84.81873182,0.284365646,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,124,R,18,,21,2,,0,TRUE,,
-90020,202001,100,3348,22,0.5,,2.09204015,76.03985875,,1.677715809,,1.677715809,,1.504436071,128.8429705,,1.798238111,102.4414146,3348,R,,17,19,,3,1,,,
-90020,202002,100,1996,22,0.5,0.8701751,1.505585865,123.1676833,0.596048505,0.395102278,0.596048505,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,3,2,0,,TRUE,
-90020,202003,100,5051,22,0.5,2.040615327,,84.81873182,2.530990214,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,5051,R,18,,21,2,,0,TRUE,,
-90021,202001,100,,155,0.5,,2.09204015,76.03985875,,,,,,1.504436071,128.8429705,,1.798238111,102.4414146,48979.92546,BI,,17,19,,3,1,,,
-90021,202002,100,,155,0.5,0.8701751,1.505585865,123.1676833,,,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,3,2,0,,,
-90021,202003,100,21046,155,0.5,2.040615327,,84.81873182,,,,,1.072463185,,126.2596455,1.556539256,,105.5391887,21046,R,18,,21,2,,0,,,
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,disc_count_fi,disc_count_bi,disc_count_c,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+90001,202001,100,89,,2.09204015,76.03985875,,1.036787797,,1.504436071,128.8429705,,1.798238111,102.4414146,9244,R,,17,19,,3,1,,,
+90001,202002,100,89,0.8701751,1.505585865,123.1676833,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,3,2,0,,,
+90001,202003,100,89,2.040615327,,84.81873182,0.694706146,,1.072463185,,126.2596455,1.556539256,,105.5391887,6194,R,18,,21,2,,0,,,
+90002,202001,100,83,,2.09204015,76.03985875,,0.817550398,,1.504436071,128.8429705,,1.798238111,102.4414146,4826,R,,17,19,,3,1,,,
+90002,202002,100,83,0.8701751,1.505585865,123.1676833,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,3,2,0,,,
+90002,202003,100,83,2.040615327,,84.81873182,0.803489751,,1.072463185,,126.2596455,1.556539256,,105.5391887,4743,R,18,,21,2,,0,,,
+90003,202001,100,4,,2.09204015,76.03985875,,,,1.504436071,128.8429705,,1.798238111,102.4414146,7586,R,,17,19,,3,1,,,TRUE
+90003,202002,100,4,0.8701751,1.505585865,123.1676833,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,3,2,0,,,
+90003,202003,100,4,2.040615327,,84.81873182,1.406496063,,1.072463185,,126.2596455,1.556539256,,105.5391887,1429,R,18,,21,2,,0,,,
+90004,202001,100,76,,2.09204015,76.03985875,,1.305847569,,1.504436071,128.8429705,,1.798238111,102.4414146,3975,R,,17,19,,3,1,,,
+90004,202002,100,76,0.8701751,1.505585865,123.1676833,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,3,2,0,,,
+90004,202003,100,76,2.040615327,,84.81873182,1.206636005,,1.072463185,,126.2596455,1.556539256,,105.5391887,3673,R,18,,21,2,,0,,,
+90005,202001,100,18,,2.09204015,76.03985875,,0.622072678,,1.504436071,128.8429705,,1.798238111,102.4414146,1941,R,,17,19,,3,1,,,
+90005,202002,100,18,0.8701751,1.505585865,123.1676833,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,3,2,0,,,
+90005,202003,100,18,2.040615327,,84.81873182,0.387050567,,1.072463185,,126.2596455,1.556539256,,105.5391887,1208,R,18,,21,2,,0,,,
+90006,202001,100,94,,2.09204015,76.03985875,,0.763047038,,1.504436071,128.8429705,,1.798238111,102.4414146,5405,R,,17,19,,3,1,,,
+90006,202002,100,94,0.8701751,1.505585865,123.1676833,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,3,2,0,,,
+90006,202003,100,94,2.040615327,,84.81873182,0.703053532,,1.072463185,,126.2596455,1.556539256,,105.5391887,4980,R,18,,21,2,,0,,,
+90007,202001,100,8,,2.09204015,76.03985875,,5.333239595,,1.504436071,128.8429705,,1.798238111,102.4414146,15172,R,,17,19,,3,1,,,
+90007,202002,100,8,0.8701751,1.505585865,123.1676833,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,3,2,0,,,
+90007,202003,100,8,2.040615327,,84.81873182,1.230684055,,1.072463185,,126.2596455,1.556539256,,105.5391887,3501,R,18,,21,2,,0,,,
+90008,202001,100,304,,2.09204015,76.03985875,,1.129530598,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
+90008,202002,100,304,0.8701751,1.505585865,123.1676833,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,3,2,0,,,
+90008,202003,100,304,2.040615327,,84.81873182,0.990729498,,1.072463185,,126.2596455,1.556539256,,105.5391887,14295,R,18,,21,2,,0,,,
+90009,202001,100,45,,2.09204015,76.03985875,,0.740562712,,1.504436071,128.8429705,,1.798238111,102.4414146,3698,R,,17,19,,3,1,,,
+90009,202002,100,45,0.8701751,1.505585865,123.1676833,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,3,2,0,,,
+90009,202003,100,45,2.040615327,,84.81873182,0.843571749,,1.072463185,,126.2596455,1.556539256,,105.5391887,4212,R,18,,21,2,,0,,,
+90010,202001,100,100,,2.09204015,76.03985875,,0.760511998,,1.504436071,128.8429705,,1.798238111,102.4414146,7722,R,,17,19,,3,1,,,
+90010,202002,100,100,0.8701751,1.505585865,123.1676833,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,3,2,0,,,
+90010,202003,100,100,2.040615327,,84.81873182,0.644660382,,1.072463185,,126.2596455,1.556539256,,105.5391887,6545,R,18,,21,2,,0,,,
+90011,202001,100,19,,2.09204015,76.03985875,,8.365866031,,1.504436071,128.8429705,,1.798238111,102.4414146,30344,R,,17,19,,3,1,,TRUE,
+90011,202002,100,19,0.8701751,1.505585865,123.1676833,0.119533351,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,3,2,0,TRUE,,
+90011,202003,100,19,2.040615327,,84.81873182,2.00928009,,1.072463185,,126.2596455,1.556539256,,105.5391887,7288,R,18,,21,2,,0,,,
+90012,202001,100,304,,2.09204015,76.03985875,,1.408940798,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
+90012,202002,100,304,0.8701751,1.505585865,123.1676833,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,3,2,0,,,
+90012,202003,100,304,2.040615327,,84.81873182,1.165730094,,1.072463185,,126.2596455,1.556539256,,105.5391887,13484,R,18,,21,2,,0,,,
+90013,202001,100,54,,2.09204015,76.03985875,,1.106799294,,1.504436071,128.8429705,,1.798238111,102.4414146,20190,R,,17,19,,3,1,,,
+90013,202002,100,54,0.8701751,1.505585865,123.1676833,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,3,2,0,,,
+90013,202003,100,54,2.040615327,,84.81873182,1.58023419,,1.072463185,,126.2596455,1.556539256,,105.5391887,28826,R,18,,21,2,,0,,,
+90014,202001,100,47,,2.09204015,76.03985875,,0.845985046,,1.504436071,128.8429705,,1.798238111,102.4414146,4260,R,,17,19,,3,1,,,
+90014,202002,100,42,0.8701751,1.505585865,123.1676833,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,3,2,0,,,
+90014,202003,100,42,2.040615327,,84.81873182,1.28773421,,1.072463185,,126.2596455,1.556539256,,105.5391887,6484,R,18,,21,2,,0,,,
+90015,202001,100,57,,2.09204015,76.03985875,,3.886845827,,1.504436071,128.8429705,,1.798238111,102.4414146,19236,R,,17,19,,3,1,,,
+90015,202002,100,57,0.8701751,1.505585865,123.1676833,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,3,2,0,,,
+90015,202003,100,57,2.040615327,,84.81873182,0.716195191,,1.072463185,,126.2596455,1.556539256,,105.5391887,3544,R,18,,21,2,,0,,,
+90016,202001,100,163,,2.09204015,76.03985875,,0.906730921,,1.504436071,128.8429705,,1.798238111,102.4414146,14902,R,,17,19,,3,1,,,
+90016,202002,100,163,0.8701751,1.505585865,123.1676833,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,3,2,0,,,
+90016,202003,100,163,2.040615327,,84.81873182,1.500085186,,1.072463185,,126.2596455,1.556539256,,105.5391887,24653,R,18,,21,2,,0,,,
+90017,202001,100,149,,2.09204015,76.03985875,,0.702275751,,1.504436071,128.8429705,,1.798238111,102.4414146,35476,R,,17,19,,3,1,,,
+90017,202002,100,149,0.8701751,1.505585865,123.1676833,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,3,2,0,,,
+90017,202003,100,149,2.040615327,,84.81873182,1.058635817,,1.072463185,,126.2596455,1.556539256,,105.5391887,53477,R,18,,21,2,,0,,,
+90018,202001,100,126,,2.09204015,76.03985875,,0.543204684,,1.504436071,128.8429705,,1.798238111,102.4414146,13845,R,,17,19,,3,1,,TRUE,
+90018,202002,100,126,0.8701751,1.505585865,123.1676833,1.840926688,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,3,2,0,TRUE,,
+90018,202003,100,126,2.040615327,,84.81873182,1.075364795,,1.072463185,,126.2596455,1.556539256,,105.5391887,27409,R,18,,21,2,,0,,,
+90019,202001,100,6,,2.09204015,76.03985875,,2.530969376,,1.504436071,128.8429705,,1.798238111,102.4414146,1099,R,,17,19,,3,1,,,
+90019,202002,100,6,0.8701751,1.505585865,123.1676833,0.395105531,3.51659919,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,3,2,0,,TRUE,
+90019,202003,100,6,2.040615327,,84.81873182,0.284365646,,1.072463185,,126.2596455,1.556539256,,105.5391887,124,R,18,,21,2,,0,TRUE,,
+90020,202001,100,22,,2.09204015,76.03985875,,1.677715809,,1.504436071,128.8429705,,1.798238111,102.4414146,3348,R,,17,19,,3,1,,,
+90020,202002,100,22,0.8701751,1.505585865,123.1676833,0.596048505,0.395102278,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,3,2,0,,TRUE,
+90020,202003,100,22,2.040615327,,84.81873182,2.530990214,,1.072463185,,126.2596455,1.556539256,,105.5391887,5051,R,18,,21,2,,0,TRUE,,
+90021,202001,100,155,,2.09204015,76.03985875,,,,1.504436071,128.8429705,,1.798238111,102.4414146,48979.92546,BI,,17,19,,3,1,,,
+90021,202002,100,155,0.8701751,1.505585865,123.1676833,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,3,2,0,,,
+90021,202003,100,155,2.040615327,,84.81873182,,,1.072463185,,126.2596455,1.556539256,,105.5391887,21046,R,18,,21,2,,0,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
index c87e8ecb..7c87b6dc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,0.5,,2.656680299,101.7103175
-30001,202002,100,7476,51,0.5,0.771850199,1.13167173,74.91666667
-30001,202003,100,2003,51,0.5,0.968230653,,70.26136364
-30002,202001,100,9343,72,0.5,,2.656680299,101.7103175
-30002,202002,100,7818,72,0.5,0.771850199,1.13167173,74.91666667
-30002,202003,100,4897,72,0.5,0.968230653,,70.26136364
-30003,202001,100,7511,7,0.5,,2.656680299,101.7103175
-30003,202002,100,1761,7,0.5,0.771850199,1.13167173,74.91666667
-30003,202003,100,6492,7,0.5,0.968230653,,70.26136364
-30004,202001,100,64,81,0.5,,2.656680299,101.7103175
-30004,202002,100,2113,81,0.5,0.771850199,1.13167173,74.91666667
-30004,202003,100,185,81,0.5,0.968230653,,70.26136364
-30005,202001,100,844,5,0.5,,2.656680299,101.7103175
-30005,202002,100,897,5,0.5,0.771850199,1.13167173,74.91666667
-30005,202003,100,280,5,0.5,0.968230653,,70.26136364
-30006,202001,100,1869,14,0.5,,2.656680299,101.7103175
-30006,202002,100,1876,14,0.5,0.771850199,1.13167173,74.91666667
-30006,202003,100,1371,14,0.5,0.968230653,,70.26136364
-30007,202001,100,12769,12,0.5,,2.656680299,101.7103175
-30007,202002,100,2853,12,0.5,0.771850199,1.13167173,74.91666667
-30007,202003,100,11491,12,0.5,0.968230653,,70.26136364
-30008,202001,100,141,162,0.5,,2.656680299,101.7103175
-30008,202002,100,6001,162,0.5,0.771850199,1.13167173,74.91666667
-30008,202003,100,433,162,0.5,0.968230653,,70.26136364
-30009,202001,100,6417,26,0.5,,2.656680299,101.7103175
-30009,202002,100,4037,26,0.5,0.771850199,1.13167173,74.91666667
-30009,202003,100,1322,26,0.5,0.968230653,,70.26136364
-30010,202001,100,28963,144,0.5,,2.656680299,101.7103175
-30010,202002,100,21734,144,0.5,0.771850199,1.13167173,74.91666667
-30010,202003,100,10529,144,0.5,0.968230653,,70.26136364
-30011,202001,100,6009,5,0.5,,2.656680299,101.7103175
-30011,202002,100,1145,5,0.5,0.771850199,1.13167173,74.91666667
-30011,202003,100,5064,5,0.5,0.968230653,,70.26136364
-30012,202001,100,256,275,0.5,,2.656680299,101.7103175
-30012,202002,100,7522,275,0.5,0.771850199,1.13167173,74.91666667
-30012,202003,100,,275,0.5,0.968230653,,70.26136364
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,51,,2.656680299,101.7103175
+30001,202002,100,7476,51,0.771850199,1.13167173,74.91666667
+30001,202003,100,2003,51,0.968230653,,70.26136364
+30002,202001,100,9343,72,,2.656680299,101.7103175
+30002,202002,100,7818,72,0.771850199,1.13167173,74.91666667
+30002,202003,100,4897,72,0.968230653,,70.26136364
+30003,202001,100,7511,7,,2.656680299,101.7103175
+30003,202002,100,1761,7,0.771850199,1.13167173,74.91666667
+30003,202003,100,6492,7,0.968230653,,70.26136364
+30004,202001,100,64,81,,2.656680299,101.7103175
+30004,202002,100,2113,81,0.771850199,1.13167173,74.91666667
+30004,202003,100,185,81,0.968230653,,70.26136364
+30005,202001,100,844,5,,2.656680299,101.7103175
+30005,202002,100,897,5,0.771850199,1.13167173,74.91666667
+30005,202003,100,280,5,0.968230653,,70.26136364
+30006,202001,100,1869,14,,2.656680299,101.7103175
+30006,202002,100,1876,14,0.771850199,1.13167173,74.91666667
+30006,202003,100,1371,14,0.968230653,,70.26136364
+30007,202001,100,12769,12,,2.656680299,101.7103175
+30007,202002,100,2853,12,0.771850199,1.13167173,74.91666667
+30007,202003,100,11491,12,0.968230653,,70.26136364
+30008,202001,100,141,162,,2.656680299,101.7103175
+30008,202002,100,6001,162,0.771850199,1.13167173,74.91666667
+30008,202003,100,433,162,0.968230653,,70.26136364
+30009,202001,100,6417,26,,2.656680299,101.7103175
+30009,202002,100,4037,26,0.771850199,1.13167173,74.91666667
+30009,202003,100,1322,26,0.968230653,,70.26136364
+30010,202001,100,28963,144,,2.656680299,101.7103175
+30010,202002,100,21734,144,0.771850199,1.13167173,74.91666667
+30010,202003,100,10529,144,0.968230653,,70.26136364
+30011,202001,100,6009,5,,2.656680299,101.7103175
+30011,202002,100,1145,5,0.771850199,1.13167173,74.91666667
+30011,202003,100,5064,5,0.968230653,,70.26136364
+30012,202001,100,256,275,,2.656680299,101.7103175
+30012,202002,100,7522,275,0.771850199,1.13167173,74.91666667
+30012,202003,100,,275,0.968230653,,70.26136364
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index 5c2347a5..bbd9a334 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
-30001,202001,100,8444,51,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,8444,R,,0,9,,,TRUE,
-30001,202002,100,7476,51,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,,,TRUE,
-30001,202003,100,2003,51,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,2003,R,0,,10,,,TRUE,
-30002,202001,100,9343,72,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,9343,R,,0,9,,,TRUE,
-30002,202002,100,7818,72,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,,,TRUE,
-30002,202003,100,4897,72,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,4897,R,0,,10,,,TRUE,
-30003,202001,100,7511,7,0.5,,2.656680299,101.7103175,,4.265190233,,,,1,61.12436116,,1.82834015,81.41733933,7511,R,,0,9,,TRUE,,
-30003,202002,100,1761,7,0.5,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,TRUE,TRUE,,
-30003,202003,100,6492,7,0.5,0.968230653,,70.26136364,3.686541738,,,,1,,85.37820513,0.984115327,,77.81978439,6492,R,0,,10,TRUE,,,
-30004,202001,100,64,81,0.5,,2.656680299,101.7103175,,0.030288689,,,,1,61.12436116,,1.82834015,81.41733933,64,R,,0,9,,TRUE,,
-30004,202002,100,2113,81,0.5,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,TRUE,TRUE,,
-30004,202003,100,185,81,0.5,0.968230653,,70.26136364,0.087553242,,,,1,,85.37820513,0.984115327,,77.81978439,185,R,0,,10,TRUE,,,
-30005,202001,100,844,5,0.5,,2.656680299,101.7103175,,0.941234172,,,,1,61.12436116,,1.82834015,81.41733933,844,R,,0,9,,TRUE,,
-30005,202002,100,897,5,0.5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,TRUE,TRUE,,
-30005,202003,100,280,5,0.5,0.968230653,,70.26136364,0.312578027,,,,1,,85.37820513,0.984115327,,77.81978439,280,R,0,,10,TRUE,,,
-30006,202001,100,1869,14,0.5,,2.656680299,101.7103175,,0.995885563,,,,1,61.12436116,,1.82834015,81.41733933,1869,R,,0,9,,TRUE,,
-30006,202002,100,1876,14,0.5,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,TRUE,TRUE,,
-30006,202003,100,1371,14,0.5,0.968230653,,70.26136364,0.730770871,,,,1,,85.37820513,0.984115327,,77.81978439,1371,R,0,,10,TRUE,,,
-30007,202001,100,12769,12,0.5,,2.656680299,101.7103175,,4.475816911,,,,1,61.12436116,,1.82834015,81.41733933,12769,R,,0,9,,TRUE,,
-30007,202002,100,2853,12,0.5,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,TRUE,TRUE,,
-30007,202003,100,11491,12,0.5,0.968230653,,70.26136364,4.027888195,,,,1,,85.37820513,0.984115327,,77.81978439,11491,R,0,,10,TRUE,,,
-30008,202001,100,141,162,0.5,,2.656680299,101.7103175,,0.023463069,,,,1,61.12436116,,1.82834015,81.41733933,141,R,,0,9,,TRUE,,
-30008,202002,100,6001,162,0.5,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,TRUE,TRUE,,
-30008,202003,100,433,162,0.5,0.968230653,,70.26136364,0.072138939,,,,1,,85.37820513,0.984115327,,77.81978439,433,R,0,,10,TRUE,,,
-30009,202001,100,6417,26,0.5,,2.656680299,101.7103175,,1.589639934,,,,1,61.12436116,,1.82834015,81.41733933,6417,R,,0,9,,TRUE,,
-30009,202002,100,4037,26,0.5,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,TRUE,TRUE,,
-30009,202003,100,1322,26,0.5,0.968230653,,70.26136364,0.327462695,,,,1,,85.37820513,0.984115327,,77.81978439,1322,R,0,,10,TRUE,,,
-30010,202001,100,28963,144,0.5,,2.656680299,101.7103175,,,,,,1,61.12436116,,1.82834015,81.41733933,28963,R,,0,9,,,TRUE,
-30010,202002,100,21734,144,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,,,TRUE,
-30010,202003,100,10529,144,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,10529,R,0,,10,,,TRUE,
-30011,202001,100,6009,5,0.5,,2.656680299,101.7103175,,5.249464902,,,,1,61.12436116,,1.82834015,81.41733933,6009,R,,0,9,,TRUE,,
-30011,202002,100,1145,5,0.5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,TRUE,TRUE,,
-30011,202003,100,5064,5,0.5,0.968230653,,70.26136364,4.423850085,,,,1,,85.37820513,0.984115327,,77.81978439,5064,R,0,,10,TRUE,,,
-30012,202001,100,256,275,0.5,,2.656680299,101.7103175,,0.034032235,,,,1,61.12436116,,1.82834015,81.41733933,256,R,,0,9,,TRUE,,
-30012,202002,100,7522,275,0.5,0.771850199,1.13167173,74.91666667,29.38390625,,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,TRUE,,,
-30012,202003,100,,275,0.5,0.968230653,,70.26136364,,,,,1,,85.37820513,0.984115327,,77.81978439,7402.515486,FIR,0,,10,,,,
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+30001,202001,100,51,,2.656680299,101.7103175,,,,1,61.12436116,,1.82834015,81.41733933,8444,R,,0,9,,,TRUE,
+30001,202002,100,51,0.771850199,1.13167173,74.91666667,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,,,TRUE,
+30001,202003,100,51,0.968230653,,70.26136364,,,1,,85.37820513,0.984115327,,77.81978439,2003,R,0,,10,,,TRUE,
+30002,202001,100,72,,2.656680299,101.7103175,,,,1,61.12436116,,1.82834015,81.41733933,9343,R,,0,9,,,TRUE,
+30002,202002,100,72,0.771850199,1.13167173,74.91666667,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,,,TRUE,
+30002,202003,100,72,0.968230653,,70.26136364,,,1,,85.37820513,0.984115327,,77.81978439,4897,R,0,,10,,,TRUE,
+30003,202001,100,7,,2.656680299,101.7103175,,4.265190233,,1,61.12436116,,1.82834015,81.41733933,7511,R,,0,9,,TRUE,,
+30003,202002,100,7,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,TRUE,TRUE,,
+30003,202003,100,7,0.968230653,,70.26136364,3.686541738,,1,,85.37820513,0.984115327,,77.81978439,6492,R,0,,10,TRUE,,,
+30004,202001,100,81,,2.656680299,101.7103175,,0.030288689,,1,61.12436116,,1.82834015,81.41733933,64,R,,0,9,,TRUE,,
+30004,202002,100,81,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,TRUE,TRUE,,
+30004,202003,100,81,0.968230653,,70.26136364,0.087553242,,1,,85.37820513,0.984115327,,77.81978439,185,R,0,,10,TRUE,,,
+30005,202001,100,5,,2.656680299,101.7103175,,0.941234172,,1,61.12436116,,1.82834015,81.41733933,844,R,,0,9,,TRUE,,
+30005,202002,100,5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,TRUE,TRUE,,
+30005,202003,100,5,0.968230653,,70.26136364,0.312578027,,1,,85.37820513,0.984115327,,77.81978439,280,R,0,,10,TRUE,,,
+30006,202001,100,14,,2.656680299,101.7103175,,0.995885563,,1,61.12436116,,1.82834015,81.41733933,1869,R,,0,9,,TRUE,,
+30006,202002,100,14,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,TRUE,TRUE,,
+30006,202003,100,14,0.968230653,,70.26136364,0.730770871,,1,,85.37820513,0.984115327,,77.81978439,1371,R,0,,10,TRUE,,,
+30007,202001,100,12,,2.656680299,101.7103175,,4.475816911,,1,61.12436116,,1.82834015,81.41733933,12769,R,,0,9,,TRUE,,
+30007,202002,100,12,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,TRUE,TRUE,,
+30007,202003,100,12,0.968230653,,70.26136364,4.027888195,,1,,85.37820513,0.984115327,,77.81978439,11491,R,0,,10,TRUE,,,
+30008,202001,100,162,,2.656680299,101.7103175,,0.023463069,,1,61.12436116,,1.82834015,81.41733933,141,R,,0,9,,TRUE,,
+30008,202002,100,162,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,TRUE,TRUE,,
+30008,202003,100,162,0.968230653,,70.26136364,0.072138939,,1,,85.37820513,0.984115327,,77.81978439,433,R,0,,10,TRUE,,,
+30009,202001,100,26,,2.656680299,101.7103175,,1.589639934,,1,61.12436116,,1.82834015,81.41733933,6417,R,,0,9,,TRUE,,
+30009,202002,100,26,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,TRUE,TRUE,,
+30009,202003,100,26,0.968230653,,70.26136364,0.327462695,,1,,85.37820513,0.984115327,,77.81978439,1322,R,0,,10,TRUE,,,
+30010,202001,100,144,,2.656680299,101.7103175,,,,1,61.12436116,,1.82834015,81.41733933,28963,R,,0,9,,,TRUE,
+30010,202002,100,144,0.771850199,1.13167173,74.91666667,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,,,TRUE,
+30010,202003,100,144,0.968230653,,70.26136364,,,1,,85.37820513,0.984115327,,77.81978439,10529,R,0,,10,,,TRUE,
+30011,202001,100,5,,2.656680299,101.7103175,,5.249464902,,1,61.12436116,,1.82834015,81.41733933,6009,R,,0,9,,TRUE,,
+30011,202002,100,5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,TRUE,TRUE,,
+30011,202003,100,5,0.968230653,,70.26136364,4.423850085,,1,,85.37820513,0.984115327,,77.81978439,5064,R,0,,10,TRUE,,,
+30012,202001,100,275,,2.656680299,101.7103175,,0.034032235,,1,61.12436116,,1.82834015,81.41733933,256,R,,0,9,,TRUE,,
+30012,202002,100,275,0.771850199,1.13167173,74.91666667,29.38390625,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,TRUE,,,
+30012,202003,100,275,0.968230653,,70.26136364,,,1,,85.37820513,0.984115327,,77.81978439,7402.515486,FIR,0,,10,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
index 7b0def10..430292b1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,0,0.5,,2.656680299,101.7103175
-30001,202002,100,7476,0,0.5,0.771850199,1.13167173,74.91666667
-30001,202003,100,2003,0,0.5,0.968230653,,70.26136364
-30002,202001,100,9343,0,0.5,,2.656680299,101.7103175
-30002,202002,100,7818,0,0.5,0.771850199,1.13167173,74.91666667
-30002,202003,100,4897,0,0.5,0.968230653,,70.26136364
-30003,202001,100,7511,0,0.5,,2.656680299,101.7103175
-30003,202002,100,1761,0,0.5,0.771850199,1.13167173,74.91666667
-30003,202003,100,6492,0,0.5,0.968230653,,70.26136364
-30004,202001,100,64,0,0.5,,2.656680299,101.7103175
-30004,202002,100,2113,0,0.5,0.771850199,1.13167173,74.91666667
-30004,202003,100,185,0,0.5,0.968230653,,70.26136364
-30005,202001,100,844,0,0.5,,2.656680299,101.7103175
-30005,202002,100,897,0,0.5,0.771850199,1.13167173,74.91666667
-30005,202003,100,280,0,0.5,0.968230653,,70.26136364
-30006,202001,100,1869,0,0.5,,2.656680299,101.7103175
-30006,202002,100,1876,0,0.5,0.771850199,1.13167173,74.91666667
-30006,202003,100,1371,0,0.5,0.968230653,,70.26136364
-30007,202001,100,12769,0,0.5,,2.656680299,101.7103175
-30007,202002,100,2853,0,0.5,0.771850199,1.13167173,74.91666667
-30007,202003,100,11491,0,0.5,0.968230653,,70.26136364
-30008,202001,100,141,0,0.5,,2.656680299,101.7103175
-30008,202002,100,6001,0,0.5,0.771850199,1.13167173,74.91666667
-30008,202003,100,433,0,0.5,0.968230653,,70.26136364
-30009,202001,100,6417,0,0.5,,2.656680299,101.7103175
-30009,202002,100,4037,0,0.5,0.771850199,1.13167173,74.91666667
-30009,202003,100,1322,0,0.5,0.968230653,,70.26136364
-30010,202001,100,28963,0,0.5,,2.656680299,101.7103175
-30010,202002,100,21734,0,0.5,0.771850199,1.13167173,74.91666667
-30010,202003,100,10529,0,0.5,0.968230653,,70.26136364
-30011,202001,100,6009,0,0.5,,2.656680299,101.7103175
-30011,202002,100,1145,0,0.5,0.771850199,1.13167173,74.91666667
-30011,202003,100,5064,0,0.5,0.968230653,,70.26136364
-30012,202001,100,256,0,0.5,,2.656680299,101.7103175
-30012,202002,100,7522,0,0.5,0.771850199,1.13167173,74.91666667
-30012,202003,100,,0,0.5,0.968230653,,70.26136364
+identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
+30001,202001,100,8444,0,,2.656680299,101.7103175
+30001,202002,100,7476,0,0.771850199,1.13167173,74.91666667
+30001,202003,100,2003,0,0.968230653,,70.26136364
+30002,202001,100,9343,0,,2.656680299,101.7103175
+30002,202002,100,7818,0,0.771850199,1.13167173,74.91666667
+30002,202003,100,4897,0,0.968230653,,70.26136364
+30003,202001,100,7511,0,,2.656680299,101.7103175
+30003,202002,100,1761,0,0.771850199,1.13167173,74.91666667
+30003,202003,100,6492,0,0.968230653,,70.26136364
+30004,202001,100,64,0,,2.656680299,101.7103175
+30004,202002,100,2113,0,0.771850199,1.13167173,74.91666667
+30004,202003,100,185,0,0.968230653,,70.26136364
+30005,202001,100,844,0,,2.656680299,101.7103175
+30005,202002,100,897,0,0.771850199,1.13167173,74.91666667
+30005,202003,100,280,0,0.968230653,,70.26136364
+30006,202001,100,1869,0,,2.656680299,101.7103175
+30006,202002,100,1876,0,0.771850199,1.13167173,74.91666667
+30006,202003,100,1371,0,0.968230653,,70.26136364
+30007,202001,100,12769,0,,2.656680299,101.7103175
+30007,202002,100,2853,0,0.771850199,1.13167173,74.91666667
+30007,202003,100,11491,0,0.968230653,,70.26136364
+30008,202001,100,141,0,,2.656680299,101.7103175
+30008,202002,100,6001,0,0.771850199,1.13167173,74.91666667
+30008,202003,100,433,0,0.968230653,,70.26136364
+30009,202001,100,6417,0,,2.656680299,101.7103175
+30009,202002,100,4037,0,0.771850199,1.13167173,74.91666667
+30009,202003,100,1322,0,0.968230653,,70.26136364
+30010,202001,100,28963,0,,2.656680299,101.7103175
+30010,202002,100,21734,0,0.771850199,1.13167173,74.91666667
+30010,202003,100,10529,0,0.968230653,,70.26136364
+30011,202001,100,6009,0,,2.656680299,101.7103175
+30011,202002,100,1145,0,0.771850199,1.13167173,74.91666667
+30011,202003,100,5064,0,0.968230653,,70.26136364
+30012,202001,100,256,0,,2.656680299,101.7103175
+30012,202002,100,7522,0,0.771850199,1.13167173,74.91666667
+30012,202003,100,,0,0.968230653,,70.26136364
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index d7bc8124..501057c9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,weight,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward_growth_trimmed,backward_growth_trimmed,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
-30001,202001,100,8444,0,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,8444,R,,0,9,TRUE,,,TRUE
-30001,202002,100,7476,0,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,TRUE,,,TRUE
-30001,202003,100,2003,0,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,2003,R,0,,10,TRUE,,,TRUE
-30002,202001,100,9343,0,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,9343,R,,0,9,TRUE,,,TRUE
-30002,202002,100,7818,0,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,TRUE,,,TRUE
-30002,202003,100,4897,0,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,4897,R,0,,10,TRUE,,,TRUE
-30003,202001,100,7511,0,0.5,,2.656680299,101.7103175,,4.265190233,,,,1,1,,1.82834015,51.35515875,7511,R,,0,9,TRUE,,TRUE,
-30003,202002,100,1761,0,0.5,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,,,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,TRUE,TRUE,TRUE,
-30003,202003,100,6492,0,0.5,0.968230653,,70.26136364,3.686541738,,,,1,,1,0.984115327,,35.63068182,6492,R,0,,10,TRUE,TRUE,,
-30004,202001,100,64,0,0.5,,2.656680299,101.7103175,,0.030288689,,,,1,1,,1.82834015,51.35515875,64,R,,0,9,TRUE,,TRUE,
-30004,202002,100,2113,0,0.5,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,,,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,TRUE,TRUE,TRUE,
-30004,202003,100,185,0,0.5,0.968230653,,70.26136364,0.087553242,,,,1,,1,0.984115327,,35.63068182,185,R,0,,10,TRUE,TRUE,,
-30005,202001,100,844,0,0.5,,2.656680299,101.7103175,,0.941234172,,,,1,1,,1.82834015,51.35515875,844,R,,0,9,TRUE,,TRUE,
-30005,202002,100,897,0,0.5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,,,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,TRUE,TRUE,TRUE,
-30005,202003,100,280,0,0.5,0.968230653,,70.26136364,0.312578027,,,,1,,1,0.984115327,,35.63068182,280,R,0,,10,TRUE,TRUE,,
-30006,202001,100,1869,0,0.5,,2.656680299,101.7103175,,0.995885563,,,,1,1,,1.82834015,51.35515875,1869,R,,0,9,TRUE,,TRUE,
-30006,202002,100,1876,0,0.5,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,,,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,TRUE,TRUE,TRUE,
-30006,202003,100,1371,0,0.5,0.968230653,,70.26136364,0.730770871,,,,1,,1,0.984115327,,35.63068182,1371,R,0,,10,TRUE,TRUE,,
-30007,202001,100,12769,0,0.5,,2.656680299,101.7103175,,4.475816911,,,,1,1,,1.82834015,51.35515875,12769,R,,0,9,TRUE,,TRUE,
-30007,202002,100,2853,0,0.5,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,,,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,TRUE,TRUE,TRUE,
-30007,202003,100,11491,0,0.5,0.968230653,,70.26136364,4.027888195,,,,1,,1,0.984115327,,35.63068182,11491,R,0,,10,TRUE,TRUE,,
-30008,202001,100,141,0,0.5,,2.656680299,101.7103175,,0.023463069,,,,1,1,,1.82834015,51.35515875,141,R,,0,9,TRUE,,TRUE,
-30008,202002,100,6001,0,0.5,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,,,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,TRUE,TRUE,TRUE,
-30008,202003,100,433,0,0.5,0.968230653,,70.26136364,0.072138939,,,,1,,1,0.984115327,,35.63068182,433,R,0,,10,TRUE,TRUE,,
-30009,202001,100,6417,0,0.5,,2.656680299,101.7103175,,1.589639934,,,,1,1,,1.82834015,51.35515875,6417,R,,0,9,TRUE,,TRUE,
-30009,202002,100,4037,0,0.5,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,,,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,TRUE,TRUE,TRUE,
-30009,202003,100,1322,0,0.5,0.968230653,,70.26136364,0.327462695,,,,1,,1,0.984115327,,35.63068182,1322,R,0,,10,TRUE,TRUE,,
-30010,202001,100,28963,0,0.5,,2.656680299,101.7103175,,,,,,1,1,,1.82834015,51.35515875,28963,R,,0,9,TRUE,,,TRUE
-30010,202002,100,21734,0,0.5,0.771850199,1.13167173,74.91666667,,,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,TRUE,,,TRUE
-30010,202003,100,10529,0,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,10529,R,0,,10,TRUE,,,TRUE
-30011,202001,100,6009,0,0.5,,2.656680299,101.7103175,,5.249464902,,,,1,1,,1.82834015,51.35515875,6009,R,,0,9,TRUE,,TRUE,
-30011,202002,100,1145,0,0.5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,,,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,TRUE,TRUE,TRUE,
-30011,202003,100,5064,0,0.5,0.968230653,,70.26136364,4.423850085,,,,1,,1,0.984115327,,35.63068182,5064,R,0,,10,TRUE,TRUE,,
-30012,202001,100,256,0,0.5,,2.656680299,101.7103175,,0.034032235,,,,1,1,,1.82834015,51.35515875,256,R,,0,9,TRUE,,TRUE,
-30012,202002,100,7522,0,0.5,0.771850199,1.13167173,74.91666667,29.38390625,,,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,TRUE,TRUE,,
-30012,202003,100,,0,0.5,0.968230653,,70.26136364,,,,,1,,1,0.984115327,,35.63068182,7402.515486,FIR,0,,10,TRUE,,,
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+30001,202001,100,0,,2.656680299,101.7103175,,,,1,1,,1.82834015,51.35515875,8444,R,,0,9,TRUE,,,TRUE
+30001,202002,100,0,0.771850199,1.13167173,74.91666667,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,TRUE,,,TRUE
+30001,202003,100,0,0.968230653,,70.26136364,,,1,,1,0.984115327,,35.63068182,2003,R,0,,10,TRUE,,,TRUE
+30002,202001,100,0,,2.656680299,101.7103175,,,,1,1,,1.82834015,51.35515875,9343,R,,0,9,TRUE,,,TRUE
+30002,202002,100,0,0.771850199,1.13167173,74.91666667,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,TRUE,,,TRUE
+30002,202003,100,0,0.968230653,,70.26136364,,,1,,1,0.984115327,,35.63068182,4897,R,0,,10,TRUE,,,TRUE
+30003,202001,100,0,,2.656680299,101.7103175,,4.265190233,,1,1,,1.82834015,51.35515875,7511,R,,0,9,TRUE,,TRUE,
+30003,202002,100,0,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,TRUE,TRUE,TRUE,
+30003,202003,100,0,0.968230653,,70.26136364,3.686541738,,1,,1,0.984115327,,35.63068182,6492,R,0,,10,TRUE,TRUE,,
+30004,202001,100,0,,2.656680299,101.7103175,,0.030288689,,1,1,,1.82834015,51.35515875,64,R,,0,9,TRUE,,TRUE,
+30004,202002,100,0,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,TRUE,TRUE,TRUE,
+30004,202003,100,0,0.968230653,,70.26136364,0.087553242,,1,,1,0.984115327,,35.63068182,185,R,0,,10,TRUE,TRUE,,
+30005,202001,100,0,,2.656680299,101.7103175,,0.941234172,,1,1,,1.82834015,51.35515875,844,R,,0,9,TRUE,,TRUE,
+30005,202002,100,0,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,TRUE,TRUE,TRUE,
+30005,202003,100,0,0.968230653,,70.26136364,0.312578027,,1,,1,0.984115327,,35.63068182,280,R,0,,10,TRUE,TRUE,,
+30006,202001,100,0,,2.656680299,101.7103175,,0.995885563,,1,1,,1.82834015,51.35515875,1869,R,,0,9,TRUE,,TRUE,
+30006,202002,100,0,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,TRUE,TRUE,TRUE,
+30006,202003,100,0,0.968230653,,70.26136364,0.730770871,,1,,1,0.984115327,,35.63068182,1371,R,0,,10,TRUE,TRUE,,
+30007,202001,100,0,,2.656680299,101.7103175,,4.475816911,,1,1,,1.82834015,51.35515875,12769,R,,0,9,TRUE,,TRUE,
+30007,202002,100,0,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,TRUE,TRUE,TRUE,
+30007,202003,100,0,0.968230653,,70.26136364,4.027888195,,1,,1,0.984115327,,35.63068182,11491,R,0,,10,TRUE,TRUE,,
+30008,202001,100,0,,2.656680299,101.7103175,,0.023463069,,1,1,,1.82834015,51.35515875,141,R,,0,9,TRUE,,TRUE,
+30008,202002,100,0,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,TRUE,TRUE,TRUE,
+30008,202003,100,0,0.968230653,,70.26136364,0.072138939,,1,,1,0.984115327,,35.63068182,433,R,0,,10,TRUE,TRUE,,
+30009,202001,100,0,,2.656680299,101.7103175,,1.589639934,,1,1,,1.82834015,51.35515875,6417,R,,0,9,TRUE,,TRUE,
+30009,202002,100,0,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,TRUE,TRUE,TRUE,
+30009,202003,100,0,0.968230653,,70.26136364,0.327462695,,1,,1,0.984115327,,35.63068182,1322,R,0,,10,TRUE,TRUE,,
+30010,202001,100,0,,2.656680299,101.7103175,,,,1,1,,1.82834015,51.35515875,28963,R,,0,9,TRUE,,,TRUE
+30010,202002,100,0,0.771850199,1.13167173,74.91666667,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,TRUE,,,TRUE
+30010,202003,100,0,0.968230653,,70.26136364,,,1,,1,0.984115327,,35.63068182,10529,R,0,,10,TRUE,,,TRUE
+30011,202001,100,0,,2.656680299,101.7103175,,5.249464902,,1,1,,1.82834015,51.35515875,6009,R,,0,9,TRUE,,TRUE,
+30011,202002,100,0,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,TRUE,TRUE,TRUE,
+30011,202003,100,0,0.968230653,,70.26136364,4.423850085,,1,,1,0.984115327,,35.63068182,5064,R,0,,10,TRUE,TRUE,,
+30012,202001,100,0,,2.656680299,101.7103175,,0.034032235,,1,1,,1.82834015,51.35515875,256,R,,0,9,TRUE,,TRUE,
+30012,202002,100,0,0.771850199,1.13167173,74.91666667,29.38390625,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,TRUE,TRUE,,
+30012,202003,100,0,0.968230653,,70.26136364,,,1,,1,0.984115327,,35.63068182,7402.515486,FIR,0,,10,TRUE,,,

From 3305e9e25ea90fed5dbc2b9c499b5c82742994c8 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 17 Apr 2023 16:11:26 +0100
Subject: [PATCH 201/531] Corrected Mis Named Standard Columns. Started
 updating tests to be more config driven.

---
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv | 26 +++++++++----------
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |  2 +-
 .../28_link_columns_filtered_output.csv       |  2 +-
 .../29_mixed_data_filtered_output.csv         |  2 +-
 ...30_class_change_C_C_FI_filtered_output.csv |  2 +-
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  2 +-
 .../32_C_FI_FI_no_response_output.csv         |  2 +-
 .../33_partial_link_columns_output.csv        |  2 +-
 .../34_default_link_output.csv                |  2 +-
 .../35_TB_10_R_R_FI_output.csv                |  2 +-
 .../36_TB_10_BI_BI_R_output.csv               |  2 +-
 .../37_TB_10_C_FI_FI_output.csv               |  2 +-
 .../38_T_10_R_R_FI_output.csv                 |  2 +-
 .../39_B_10_R_R_FI_output.csv                 |  2 +-
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  2 +-
 .../41_TB_10_R_R_FI_filtered_output.csv       |  2 +-
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         |  2 +-
 .../43_TB_10_BI_BI_R_boundary_output.csv      |  2 +-
 .../44_TB_5_BI_BI_R_boundary_output.csv       |  2 +-
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |  2 +-
 .../46_TB_10_BI_BI_R_filtered_output.csv      |  2 +-
 .../methodology_scenarios/47_TB_50_output.csv |  2 +-
 ..._TB_50_filtered_partial_default_output.csv |  2 +-
 .../49_TB_50_filtered_full_default_output.csv |  2 +-
 .../50_R_R_FI_50_weight_output.csv            |  2 +-
 .../51_R_R_FI_80_weight_output.csv            |  2 +-
 .../52_BI_BI_R_50_weight_output.csv           |  2 +-
 .../53_C_FI_FI_50_weight_output.csv           |  2 +-
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  2 +-
 .../55_R_R_FI_50_weight_default_output.csv    |  2 +-
 .../56_BI_BI_R_50_weight_default_output.csv   |  2 +-
 .../57_C_FI_FI_50_weight_default_output.csv   |  2 +-
 ...I_R_R_50_weight_partial_default_output.csv |  2 +-
 .../59_class_change_50_weight_output.csv      |  2 +-
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv |  2 +-
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv |  2 +-
 .../62_CLARIFY_WITH_ELLIE_output.csv          |  2 +-
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv |  2 +-
 .../64_TB_10_C_FI_FI_50_weight_output.csv     |  2 +-
 ...B_10_BI_BI_R_50_weight_filtered_output.csv |  2 +-
 ...weight_filtered_partial_default_output.csv |  2 +-
 ...50_weight_filtered_full_default_output.csv |  2 +-
 tests/imputation/test_mean_of_ratios.py       |  9 ++++---
 43 files changed, 59 insertions(+), 58 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 2139738a..507c6705 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-140001,202001,100,27,,0.790205162,,0.534118956,47.13567839,3582,R,,3,3,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+140001,202001,100,27,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,
 140001,202002,100,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,
 140001,202003,100,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,
 140001,202004,100,27,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,
 140001,202005,100,27,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,
 140001,202006,100,27,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,
-140001,202007,100,27,1.148331415,,0.520242185,,91.63876652,9979,R,3,,4,
-140002,202001,100,83,,0.755746721,,0.534118956,47.13567839,5359,R,,3,3,
+140001,202007,100,27,1.148331415,,0.520242185,1,91.63876652,9979,R,3,0,4,
+140002,202001,100,83,,0.755746721,1,0.534118956,47.13567839,5359,R,0,3,3,
 140002,202002,100,83,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,
 140002,202003,100,83,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,
 140002,202004,100,83,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,
 140002,202005,100,83,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,
 140002,202006,100,83,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,
-140002,202007,100,83,0.156757562,,0.520242185,,91.63876652,1052,R,3,,4,
-140003,202001,100,89,,0.056404985,,0.534118956,47.13567839,439,R,,3,3,
+140002,202007,100,83,0.156757562,,0.520242185,1,91.63876652,1052,R,3,0,4,
+140003,202001,100,89,,0.056404985,1,0.534118956,47.13567839,439,R,0,3,3,
 140003,202002,100,89,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,
 140003,202003,100,89,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,
 140003,202004,100,89,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,
 140003,202005,100,89,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,
 140003,202006,100,89,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,
-140003,202007,100,89,0.255637577,,0.520242185,,91.63876652,2528,R,3,,4,
-140004,202001,100,28,,,,0.534118956,47.13567839,1319.798995,C,,3,3,
+140003,202007,100,89,0.255637577,,0.520242185,1,91.63876652,2528,R,3,0,4,
+140004,202001,100,28,,,1,0.534118956,47.13567839,1319.798995,C,0,3,3,
 140004,202002,100,28,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,
 140004,202003,100,28,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,
 140004,202005,100,28,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3,
 140004,202006,100,28,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3,
-140004,202007,100,28,,,0.520242185,,91.63876652,7243,R,3,,4,
-140005,202001,100,85,,,,0.534118956,47.13567839,150000,R,,3,3,TRUE
+140004,202007,100,28,,,0.520242185,1,91.63876652,7243,R,3,0,4,
+140005,202001,100,85,,,1,0.534118956,47.13567839,150000,R,0,3,3,TRUE
 140005,202002,100,85,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,TRUE
 140005,202003,100,85,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,TRUE
 140005,202004,100,85,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,TRUE
 140005,202005,100,85,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,TRUE
 140005,202006,100,85,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,TRUE
-140005,202007,100,85,,,0.520242185,,91.63876652,160000,R,3,,4,TRUE
-140006,202001,100,71,,,,0.534118956,47.13567839,3346.633166,C,,3,3,
+140005,202007,100,85,,,0.520242185,1,91.63876652,160000,R,3,0,4,TRUE
+140006,202001,100,71,,,1,0.534118956,47.13567839,3346.633166,C,0,3,3,
 140006,202002,100,71,,,6.772539383,3.563193687,97.52261307,22665.20492,FIC,3,3,3,
 140006,202003,100,71,,,0.700853626,0.84489759,62.64321608,15884.99105,FIC,3,3,3,
 140006,202004,100,71,,,3.724667279,2.674093602,95.10050251,59166.30639,FIC,3,3,3,
 140006,202005,100,71,,,1.108042751,0.497376695,63.63316583,65558.7969,FIC,3,3,3,
 140006,202006,100,71,,,2.988483968,3.720631427,127.0854271,195921.4135,FIC,3,3,3,
-140006,202007,100,71,,,0.520242185,,91.63876652,101926.5842,FIC,3,,4,
+140006,202007,100,71,,,0.520242185,1,91.63876652,101926.5842,FIC,3,0,4,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index ec501553..704e0dd5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
 150001,202001,100,15,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3,
 150001,202002,100,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,
 150001,202003,100,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
index 83ba9a2f..9e32b29f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
 190001,202001,100,95,,1.853682946,,0.9214,50.3694,9261,R,,,,
 190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,,,,
 190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
index bbf20ec2..244075c1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,
 200001,202001,100,56,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4,
 200001,202002,100,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,
 200001,202003,100,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 550cd441..dda88646 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
 230001,202001,1,10,,1.511049724,,1.087985595,15.46666667,547,R,,2,2,
 230001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,
 230001,202003,1,10,2.472375691,,1.42292432,,18.48333333,895,R,2,,2,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index c2cc80b1..241b78ac 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
 110001,202001,100,89,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
 110001,202003,100,89,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index 0d51ca07..9b568cbb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
 110001,202001,100,89,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
 110001,202003,100,89,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index 15cdd3f5..49b3f5b5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
 190001,202001,100,95,,1.853682946,,0.9214,96.16299559,9261,R,,,4
 190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,,,3
 190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index 94663014..2f90991b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_construction_link
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_construction_link
 120001,202001,100,0,,2.104417671,,1.589860068,1,5240,R,,3,3,TRUE
 120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,TRUE
 120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,TRUE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 65c42d68..e04b774b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
 30001,202001,100,51,,1.129481006,,1.598925527,96.73383283,8444,R,,10,12,,
 30001,202002,100,51,0.885362387,3.732401398,6.802558774,2.995081605,76.3675837,7476,R,10,9,12,,
 30001,202003,100,51,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index caa7f2f0..f68345a2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
 30001,202001,100,51,,1.129481006,,1.772802559,142.2694301,8444,R,,9,11,,
 30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.67357513,7476,R,9,9,11,,
 30001,202003,100,51,0.267924024,,1.172391173,,60.40866511,2003,R,9,,12,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index c9139879..bc47ba75 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
 30001,202001,100,51,,1.129481006,,1.772802559,142.3186593,8444,R,,9,11,,
 30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,7476,R,9,9,11,,
 30001,202003,100,51,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index bf838ad2..d9cdbcf4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
 30001,202001,100,51,,1.129481006,,1.455701667,96.73383283,8444,R,,11,12,,
 30001,202002,100,51,0.885362387,3.732401398,6.201462122,2.718178189,76.3675837,7476,R,11,10,12,,
 30001,202003,100,51,0.267924024,,1.06236595,,76.13443331,2003,R,10,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index bf4f0e24..be9e2894 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
 30001,202001,100,51,,1.129481006,,1.930792743,96.75644028,8444,R,,11,12,,
 30001,202002,100,51,0.885362387,3.732401398,10.05870529,4.081787351,76.3852459,7476,R,11,10,12,,
 30001,202003,100,51,0.267924024,,1.497537064,,76.10880829,2003,R,10,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index 9cb900d0..d23f9d49 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
 30001,202001,100,51,,1.129481006,,1.59786861,133.0400697,8444,R,,10,10
 30001,202002,100,51,0.885362387,3.732401398,8.126185194,4.305953095,98.54703833,7476,R,10,9,10
 30001,202003,100,51,0.267924024,,1.126581418,,66.21860465,2003,R,9,,10
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
index 72a90977..82d1656a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
 30001,202001,100,51,,1.129481006,,1.773218509,96.73383283,8444,R,,9,12,,,
 30001,202002,100,51,0.885362387,3.732401398,3.88999586,1.941764103,81.65588616,7476,R,9,8,11,,,
 30001,202003,100,51,0.267924024,,1.307995914,,76.13443331,2003,R,8,,11,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index ca15a203..6653ed29 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
 80001,202001,100,89,,1.036787797,,2.076255394,107.1910333,9244,R,,10,12,,
 80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,8916,R,10,9,12,,
 80001,202003,100,89,0.694706146,,0.918490819,,69.22002885,6194,R,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index fda7b709..0c370690 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
 90001,202001,100,89,,1.036787797,,1.835663813,132.8421946,9244,R,,18,20,,
 90001,202002,100,89,0.964517525,1.43945754,0.906337253,1.082813901,113.3255814,8916,R,18,18,20,,
 90001,202003,100,89,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index 0e2f4724..1d98a64a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
 100001,202001,100,89,,1.036787797,,2.097550968,132.8421946,9244,R,,20,20
 100001,202002,100,89,0.964517525,1.43945754,0.91372653,1.170117584,113.3255814,8916,R,20,20,20
 100001,202003,100,89,0.694706146,,1.105984659,,126.2596455,6194,R,20,,21
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index 08130be1..2f8502ed 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
 30001,202001,100,51,,1.129481006,,1.598925527,96.75644028,8444,R,,10,12,,
 30001,202002,100,51,0.885362387,3.732401398,6.802558774,4.305953095,76.3852459,7476,R,10,9,12,,
 30001,202003,100,51,0.267924024,,1.126581418,,66.21860465,2003,R,9,,9,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
index d272a9de..52e2abc3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
 90001,202001,100,89,,1.036787797,,1.504436071,128.8429705,9244,R,,17,19,,,
 90001,202002,100,89,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,8916,R,17,18,20,,,
 90001,202003,100,89,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index be73ac7a..9c04db54 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
 30001,202001,100,51,,1.129481006,,1.162271841,96.73383283,8444,R,,2,12,,
 30001,202002,100,51,0.885362387,3.732401398,0.861069292,2.064295653,76.3675837,7476,R,2,1,12,,TRUE
 30001,202003,100,51,0.267924024,,0.484426733,,76.13443331,2003,R,1,,11,TRUE,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
index fc05669e..2c693039 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
 30001,202001,100,51,,,,1,61.12436116,8444,R,,0,9,,,TRUE
 30001,202002,100,51,,,1,1,48.04940375,7476,R,0,0,9,,,TRUE
 30001,202003,100,51,,,1,,85.37820513,2003,R,0,,10,,,TRUE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
index fd5cdd93..1d0992a4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward_growth,backward_growth,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,default_construction_link,filtered_marker
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,default_construction_link,filtered_marker
 30001,202001,100,0,,,,1,1,8444,R,,0,9,,,TRUE,TRUE
 30001,202002,100,0,,,1,1,1,7476,R,0,0,9,,,TRUE,TRUE
 30001,202003,100,0,,,1,,1,2003,R,0,,10,,,TRUE,TRUE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index eb80371a..26bc49fb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 30001,202001,100,51,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
 30001,202002,100,51,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7476,R,4,3,4
 30001,202003,100,51,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.3199735,,96.19575,2003,R,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index cf448d61..cd4cdca3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 30001,202001,100,51,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.6294848,106.2331217,8444,R,,4,4
 30001,202002,100,51,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7476,R,4,3,4
 30001,202003,100,51,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.4441576,,100.28754,2003,R,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index f3bda139..a2283da5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 60001,202001,100,15,,1.5274,50.3694,,0.648403576,,7.141605449,117.9107143,,4.334502725,84.14005715,5077,R,,3,3
 60001,202002,100,15,0.9685,1.8795,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,7830,R,3,3,3
 60001,202003,100,15,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index bd1b83a1..69d5c572 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 30001,202001,100,51,,1.5274,50.3694,,1.129481006,,2.196577972,194.6,,2.062742377,165.75388,8444,R,,3,3
 30001,202002,100,51,0.9685,1.8795,121.4187,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7476,R,3,3,3
 30001,202003,100,51,1.113,,89.3761,0.267924024,,1.526946931,,103.0154,1.444157545,,100.28754,2003,R,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index decc4181..f666225d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 110001,202001,100,89,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
 110001,202002,100,89,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
 110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 0d692942..7cc5fea9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 30001,202001,100,51,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
 30001,202002,100,51,,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4
 30001,202003,100,51,,,89.3761,0.267924024,,1.526947,,103.0154,1.526947,,96.19575,2003,R,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index 62d000c8..fd6ff68e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 60001,202001,100,15,,,50.3694,,0.648403576,,7.141605449,117.9107143,,7.141605449,84.14005715,5077,R,,3,3
 60001,202002,100,15,0.9685,,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3
 60001,202003,100,15,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index 995d640e..647d675a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 30001,202001,100,51,,1.5274,,,1.129481006,,2.196577972,194.6,,2.062742377,194.6,8444,R,,3,3
 30001,202002,100,51,0.9685,1.8795,,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3
 30001,202003,100,51,1.113,,,0.267924024,,1.526946931,,103.0154,1.444157545,,103.0154,2003,R,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index d4ee026f..8940be65 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 110001,202001,100,89,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
 110001,202002,100,89,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
 110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index 13dd586e..f97fcb80 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 210001,202001,1,10,,2.656680299,101.7103175,,1.511049724,,1.087985595,13.17948718,,1.872332947,57.44490234,547,R,,2,3
 210001,202002,1,10,0.771850199,1.13167173,74.91666667,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2
 210001,202003,1,10,0.968230653,,70.26136364,2.472375691,,1.42292432,,18.48333333,1.195577487,,44.37234849,895,R,2,,2
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index ddfd3522..9be16699 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 70001,202001,100,39,,1.511049724,101.7103175,,3.280595369,,47.92201545,107.48,,24.71653259,104.5951588,5951,R,,3,3
 70001,202002,100,39,,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
 70001,202003,100,39,1.082864299,,70.26136364,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index b8cabab6..0234fbbe 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
 110001,202001,100,89,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4,,,
 110001,202002,100,89,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,,,
 110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
index 58dd0030..0d99640a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
 110001,202001,100,89,,2.09204015,76.03985875,,1.036787797,,2.656680299,101.7103175,,2.374360225,88.87508813,9244,R,,4,4
 110001,202002,100,89,0.8701751,1.505585865,98.16768334,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4
 110001,202003,100,89,1.040615327,,79.81873182,0.694706146,,0.968230653,,70.26136364,1.00442299,,75.04004773,6194,R,3,,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 7eea2d0f..952e6074 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
 80001,202001,100,89,,2.642597676,144.865,,1.036787797,,2.076255394,107.1910333,,2.359426535,126.0280167,9244,R,,10,12,,,
 80001,202002,100,89,1.186209073,0.751963069,102.4888332,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,
 80001,202003,100,89,1.106182973,,140.2509173,0.694706146,,0.918490819,,69.22002885,1.012336896,,104.7354731,6194,R,9,,11,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index d51588ba..6fbae21c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,forward_growth_trimmed_marker,backward_growth_trimmed_marker
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
 30001,202001,100,51,,2.09204015,76.03985875,,1.129481006,,1.772802559,142.3186593,,1.932421355,109.179259,8444,R,,9,11,,
 30001,202002,100,51,0.8701751,1.505585865,123.1676833,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,,
 30001,202003,100,51,2.040615327,,84.81873182,0.267924024,,1.172391173,,76.13443331,1.60650325,,80.47658257,2003,R,9,,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index ed9c9a09..9684af7f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,disc_count_fi,disc_count_bi,disc_count_c,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,disc_count_fi,disc_count_bi,disc_count_c,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
 90001,202001,100,89,,2.09204015,76.03985875,,1.036787797,,1.504436071,128.8429705,,1.798238111,102.4414146,9244,R,,17,19,,3,1,,,
 90001,202002,100,89,0.8701751,1.505585865,123.1676833,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,3,2,0,,,
 90001,202003,100,89,2.040615327,,84.81873182,0.694706146,,1.072463185,,126.2596455,1.556539256,,105.5391887,6194,R,18,,21,2,,0,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index bbd9a334..f8615075 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
 30001,202001,100,51,,2.656680299,101.7103175,,,,1,61.12436116,,1.82834015,81.41733933,8444,R,,0,9,,,TRUE,
 30001,202002,100,51,0.771850199,1.13167173,74.91666667,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,,,TRUE,
 30001,202003,100,51,0.968230653,,70.26136364,,,1,,85.37820513,0.984115327,,77.81978439,2003,R,0,,10,,,TRUE,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index 501057c9..92c58a9b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,forward_growth,backward_growth,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,forward_growth_trimmed_marker,backward_growth_trimmed_marker,filtered_marker
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
 30001,202001,100,0,,2.656680299,101.7103175,,,,1,1,,1.82834015,51.35515875,8444,R,,0,9,TRUE,,,TRUE
 30001,202002,100,0,0.771850199,1.13167173,74.91666667,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,TRUE,,,TRUE
 30001,202003,100,0,0.968230653,,70.26136364,,,1,,1,0.984115327,,35.63068182,2003,R,0,,10,TRUE,,,TRUE
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index bc6343cd..ec8c6a5c 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -1,4 +1,5 @@
 import glob
+import json
 import os
 import pathlib
 
@@ -181,9 +182,9 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         if "dev" in scenario_type:
             imputation_kwargs["link_filter"] = "(" + exclude_col + ' == "N")'
         else:
-            imputation_kwargs["link_filter"] = (
-                "(" + auxiliary_col + " != 71) and (" + target_col + " < 100000)"
-            )
+            with open('tests/conf.json') as f:
+                d = json.load(f)
+            imputation_kwargs["link_filter"] = d["mean_of_ratios"][scenario[0:2]]
 
     if scenario_type.startswith("back_data"):
         min_period_df = scenario_expected_output.selectExpr("min(" + period_col + ")")
@@ -192,7 +193,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
             min_period_df, [col(period_col) == col("min(" + period_col + ")")]
         )
 
-        if scenario.endswith("filtered"):
+        if "filtered" in scenario:
             if "dev" in scenario_type:
                 back_data_df = back_data_df.join(
                     scenario_input.select(reference_col, period_col, exclude_col),

From 26f70da67f0d1c9c705764c5c916c1349338e48f Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 17 Apr 2023 16:12:01 +0100
Subject: [PATCH 202/531] Would help to include initial config.

---
 tests/conf.json | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 tests/conf.json

diff --git a/tests/conf.json b/tests/conf.json
new file mode 100644
index 00000000..6d544132
--- /dev/null
+++ b/tests/conf.json
@@ -0,0 +1,17 @@
+{
+    "mean_of_ratios" : {
+        "26" : "identifier != '140005'",
+        "27" : "identifier NOT IN ('150005', '150006')",
+        "28" : "identifier != '190007'",
+        "29" : "identifier NOT IN ('200013', '200014')",
+        "30" : "identifier NOT IN ('230006', '230008')",
+        "41" : "NOT(identifier = '30004' AND date = '202002')",
+        "46" : "NOT(identifier = '90003' AND date = '202001')",
+        "48" : "identifier NOT IN ('30001', '30002', '30010')",
+        "49" : "identifier NOT IN ('30001', '30002', '30010')",
+        "61" : "identifier NOT IN ('110009', '110009')",
+        "65" : "NOT(identifier = '90003' AND date = '202001')",
+        "66" : "identifier NOT IN ('30001', '30002', '30010')",
+        "67" : "identifier NOT IN ('30001', '30002', '30010')"
+    }
+}
\ No newline at end of file

From 3917ad3ee0c6635ff66a1c1e8a6f3fd86cb61574 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 19 Apr 2023 11:02:14 +0100
Subject: [PATCH 203/531] Reformat winsorisation docs to new format

---
 .../outliering/winsorisation.py               | 70 ++++++++-----------
 1 file changed, 29 insertions(+), 41 deletions(-)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index b5ac4a9c..1272b1ad 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -1,5 +1,5 @@
 """
-This module performs Winsorisation.
+Perform Winsorisation on a data frame.
 
 Currently only One-sided Winsorisation is implemented.
 For Copyright information, please see LICENCE.
@@ -45,50 +45,38 @@ def outlier(
     """
     Perform One-sided Winsorisation.
 
-    ###Arguments
-    * input_df: The input data frame.
-    * reference_col: The name of the column to reference a unique contributor.
-    * period_col: The name of the column containing the period information for
-      a contributor.
-    * grouping_col: The name of the column containing the grouping information
-      for a contributor.
-    * target_col: The name of the column containing the target variable.
-    * design_col: The name of the column containing the design weight.
-    * l_value_col: The name of the column containing the l value.
-    * outlier_col: The name of the column which will contain the calculated
-      outlier weight. Defaults to `outlier_weight`.
-    * calibration_col: The name of the column containing the calibration factor
-      if Ratio Winsorisation is to be performed.
-    * auxiliary_col: The name of the column containing the auxiliary values if
-      Ratio Winsorisation is to be performed.
-    * marker_col: The name of the column which will contain the
-      marker for winsorisation. Defaults to `winsorisation_marker`.
-
-    ###Returns
-    A new data frame containing:
-
-    * `reference_col`
-    * `period_col`
-    * `outlier_col`
-    * `marker_col`
-
-    ###Notes
+    Args:
+        input_df: The input data frame.
+        reference_col: The name of the column to reference a unique contributor.
+        period_col: The name of the column containing the period information for
+          a contributor.
+        grouping_col: The name of the column containing the grouping information
+          for a contributor.
+        target_col: The name of the column containing the target variable.
+        design_col: The name of the column containing the design weight.
+        l_value_col: The name of the column containing the l value.
+        outlier_col: The name of the column which will contain the calculated
+          outlier weight. Defaults to `outlier_weight`.
+        calibration_col: The name of the column containing the calibration factor
+          if Ratio Winsorisation is to be performed.
+        auxiliary_col: The name of the column containing the auxiliary values if
+          Ratio Winsorisation is to be performed.
+        marker_col: The name of the column which will contain the
+          marker for winsorisation (one of the values defined by the `Marker`
+          class). Defaults to `winsorisation_marker`. 
+
+    Returns:
+    A new data frame containing the columns as described by the arguments
+    `reference_col`, `period_col`, `outlier_col` and `marker_col`.
 
     The provided columns containing input values must be fully
-    populated. Otherwise an error is raised.
-
-    If a stratum contains multiple l-values in the same period then an error
-    will be raised.
+    populated. In addition there must only be one l-value per stratum and
+    period.
 
     Both or neither of `calibration_col` and `auxiliary_col` must be
-    specified. Specifying one without the other raises an error.
-
-    If these columns are specified then they are used in calculations so
-    Ratio Winsorisation is performed. If not then Expansion Winsorisation is
-    performed.
-
-    `marker_col` will contain one of the marker constants defined in the
-    `Marker` enum.
+    specified. If these columns are specified then they are used in
+    calculations so Ratio Winsorisation is performed. If not then Expansion
+    Winsorisation is performed.
     """
 
     ratio_cols = [auxiliary_col, calibration_col]

From 2e534eef0212c023596ad735ee3c001596aec173 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 19 Apr 2023 11:34:59 +0100
Subject: [PATCH 204/531] Reformat ht ratio documentation

---
 .../estimation/ht_ratio.py                    | 119 +++++++-----------
 1 file changed, 45 insertions(+), 74 deletions(-)

diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index 563007c3..f1219a3b 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -1,5 +1,5 @@
 """
-Estimates design weights and calibration factors based on Expansion and Ratio estimation.
+Estimate design weights and calibration factors based on Expansion and Ratio estimation.
 For Copyright information, please see LICENCE.
 """
 
@@ -28,86 +28,57 @@ def estimate(
     calibration_factor_col: typing.Optional[str] = "calibration_factor",
 ) -> DataFrame:
     """
-    Perform Horvitz-Thompson estimation of design weights and calibration factors
-    using Expansion and Ratio estimation.
-
-    ###Arguments
-    * `input_df`: The input data frame.
-    * `unique_identifier_col`: The name of the column containing the unique identifier
-      for the contributors.
-    * `period_col`: The name of the column containing the period information for
-      the contributor.
-    * `strata_col`: The name of the column containing the strata of the contributor.
-    * `sample_marker_col`: The name of the column containing a marker
-      for whether to include the contributor in the sample or only in the
-      population. This column must be boolean where false means
-      to exclude the contributor from the sample and true means the contributor
-      will be included in the sample count.
-    * `adjustment_marker_col`: The name of the column containing a marker for whether
-      the contributor is in scope (I), out of scope (O) or dead (D).
-    * `h_value_col`: The name of the column containing the boolean h value for the strata.
-    * out_of_scope_full: A parameter that specifies what type of out of scope
-      to run when an `out_of_scope_marker_col` is provided. True specifies
-      that the out of scope is used on both sides of the adjustment fraction.
-      False specifies that the out of scope is used only on the denominator of
-      the adjustment fraction.
-    * auxiliary_col: The name of the column containing the auxiliary value for
-      the contributor.
-    * calibration_group_col: The name of the column containing the calibration
-      group for the contributor.
-    * unadjusted_design_weight_col: The name of the column which will contain
-      the unadjusted design weight for the contributor. The column isn't
-      output unless a name is provided.
-    * design_weight_col: The name of the column which will contain the
-      design weight for the contributor. Defaults to `design_weight`.
-    * calibration_factor_col: The name of the column which will contain the
-      calibration factor for the contributor. Defaults to `calibration_factor`.
-
-    ###Returns
-
+    Perform Horvitz-Thompson estimation.
+    
+    Design weights and calibration factors are estimated using Expansion and
+    Ratio estimation.
+
+    Args:
+        input_df: The input data frame.
+        unique_identifier_col: The name of the column containing the unique
+          identifier for a contributor.
+        period_col: The name of the column containing the period.
+        strata_col: The name of the column containing the stratum.
+        sample_marker_col: The name of the column containing a boolean marker
+          where True means to include the contributor in the sample otherwise
+          the contributor is just included in the population.
+        adjustment_marker_col: The name of the column marking a contributor as
+          in scope ("I"), out of scope ("O") or dead ("D").
+        h_value_col: The name of the column containing the boolean h value for
+          the stratum. The value must be the same per stratum and period.
+        out_of_scope_full: The type of out of scope adjustment to use when an
+          `out_of_scope_marker_col` is provided. True causes the out of
+          scope adjustment to be used on both sides of the adjustment
+          fraction whereas False causes the out of scopeadjustment only on
+          the denominator of the adjustment fraction.
+        auxiliary_col: The name of the column containing the auxiliary value.
+          Providing this column causes Ratio Estimation to be performed,
+          otherwise only Expansion Estimation takes place.
+        calibration_group_col: The name of the column containing the calibration
+          group. This column can only be provided when `auxiliary_col` is also
+          provided and it causes Combined Ratio Estimation to be performed,
+          otherwise Separate Ratio Estimation takes place.
+        unadjusted_design_weight_col: The name of the column which will contain
+          the unadjusted design weight. The column isn't output unless this
+          column is specified.
+        design_weight_col: The name of the column which will contain the
+          design weight. If birth-death adjustment is being performed this
+          will contain the adjusted value.
+        calibration_factor_col: The name of the column which will contain the
+          calibration factor.
+
+    Returns:
     A data frame containing the estimated weights. The exact columns depend on
-    the type of estimation performed as specified below.
-
-    ####Common Columns
-
-    In all cases the data frame will contain:
-
-    * `period_col`
-    * `strata_col`
-    * `design_weight_col`
-
-    ####Ratio Estimation
-
-    In the case of either Separate or Combined Ratio Estimation, the data frame
-    will also contain the column specified by `calibration_factor_col`.
-
-    ####Combined Ratio Estimation
-
-    When Combined Ratio Estimation is performed, the data frame will also
-    contain the column specified by `calibration_factor_col`.
-
-    ###Notes
+    the type of estimation performed as specified by the provided arguments.
 
     Either both or neither of `adjustment_marker_col` and `h_value_col` must be specified.
     If they are then the design weight is adjusted using birth-death
-    adjustment, otherwise it is not. In addition, since birth-death adjustment
-    is per-stratum, the `h_value_col` must not change within a given period and
-    stratum.
-
+    adjustment, otherwise it is not.
     If `out_of_scope_full` is also specified, out of scope adjustment
     is performed during birth-death adjustment.
 
-    If `auxiliary_col` is specified then one of Separate Ratio or Combined Ratio
-    estimation is performed. This depends on whether `calibration_group_col`
-    is specified. If so then Combined Ratio estimation is performed, otherwise
-    Separate Ratio estimation is performed. If `auxiliary_col` is not
-    specified then only Expansion estimation is performed and specifying
-    `calibration_group_col` raises an error.
-
-    `unadjusted_design_weight_col` is only in the output if a column name is specified.
-
-    All specified input columns must be fully populated. If not an error is
-    raised. Since `design_weight_col` and `calibration_factor_col` are both
+    All specified input columns must be fully populated.
+    Since `design_weight_col` and `calibration_factor_col` are both
     output columns this does not apply to them, and any values they contain prior
     to calling the method will be ignored.
     """

From c4246dc4a1f7ff24fdaffd16f7fb1d1271d72944 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 19 Apr 2023 11:35:56 +0100
Subject: [PATCH 205/531] Stop documenting defaults as they are clearly visible
 in the function signature

---
 statistical_methods_library/outliering/winsorisation.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index 1272b1ad..ec431e94 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -56,14 +56,14 @@ def outlier(
         design_col: The name of the column containing the design weight.
         l_value_col: The name of the column containing the l value.
         outlier_col: The name of the column which will contain the calculated
-          outlier weight. Defaults to `outlier_weight`.
+          outlier weight.
         calibration_col: The name of the column containing the calibration factor
           if Ratio Winsorisation is to be performed.
         auxiliary_col: The name of the column containing the auxiliary values if
           Ratio Winsorisation is to be performed.
         marker_col: The name of the column which will contain the
           marker for winsorisation (one of the values defined by the `Marker`
-          class). Defaults to `winsorisation_marker`. 
+          class).
 
     Returns:
     A new data frame containing the columns as described by the arguments

From 529efd39a30bb182cc1a66440f6aadcd70eac2c5 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 19 Apr 2023 11:56:43 +0100
Subject: [PATCH 206/531] Reformat with black

---
 statistical_methods_library/estimation/ht_ratio.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index f1219a3b..f868e1f1 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -29,7 +29,7 @@ def estimate(
 ) -> DataFrame:
     """
     Perform Horvitz-Thompson estimation.
-    
+
     Design weights and calibration factors are estimated using Expansion and
     Ratio estimation.
 

From e5d7be3ac1fd659d6fdfdd8cd94af7c9c6bcd742 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 19 Apr 2023 11:59:25 +0100
Subject: [PATCH 207/531] Add missing __init__.py files

---
 statistical_methods_library/estimation/__init__.py | 0
 statistical_methods_library/outliering/__init__.py | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 statistical_methods_library/estimation/__init__.py
 create mode 100644 statistical_methods_library/outliering/__init__.py

diff --git a/statistical_methods_library/estimation/__init__.py b/statistical_methods_library/estimation/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/statistical_methods_library/outliering/__init__.py b/statistical_methods_library/outliering/__init__.py
new file mode 100644
index 00000000..e69de29b

From 17c661fac522030e208531e919242b0dce937e06 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 19 Apr 2023 12:12:32 +0100
Subject: [PATCH 208/531] Fix init py files to improve user experience by
 making importing the top level package work as expected

---
 statistical_methods_library/__init__.py            | 1 +
 statistical_methods_library/estimation/__init__.py | 1 +
 statistical_methods_library/outliering/__init__.py | 1 +
 3 files changed, 3 insertions(+)

diff --git a/statistical_methods_library/__init__.py b/statistical_methods_library/__init__.py
index e69de29b..4bee7225 100644
--- a/statistical_methods_library/__init__.py
+++ b/statistical_methods_library/__init__.py
@@ -0,0 +1 @@
+from . import estimation, imputation, outliering, utilities
diff --git a/statistical_methods_library/estimation/__init__.py b/statistical_methods_library/estimation/__init__.py
index e69de29b..9b4c7d94 100644
--- a/statistical_methods_library/estimation/__init__.py
+++ b/statistical_methods_library/estimation/__init__.py
@@ -0,0 +1 @@
+from . import ht_ratio
diff --git a/statistical_methods_library/outliering/__init__.py b/statistical_methods_library/outliering/__init__.py
index e69de29b..eb9817a7 100644
--- a/statistical_methods_library/outliering/__init__.py
+++ b/statistical_methods_library/outliering/__init__.py
@@ -0,0 +1 @@
+from . import winsorisation

From 80570efcf088d56f66d3c7dfc8baec6c241d0e01 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 19 Apr 2023 15:31:38 +0100
Subject: [PATCH 209/531] Doing More Data Updates

---
 .../imputation/ratio_calculators.py           |   6 +-
 tests/conf.json                               |  30 ++--
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv |  16 +--
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |  46 +++----
 .../28_link_columns_filtered_input.csv        |  64 ++++-----
 .../28_link_columns_filtered_output.csv       |  34 ++---
 .../29_mixed_data_filtered_output.csv         |  80 +++++------
 ...30_class_change_C_C_FI_filtered_output.csv |  38 +++---
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  34 ++---
 .../32_C_FI_FI_no_response_output.csv         |  22 +--
 .../33_partial_link_columns_output.csv        |  24 ++--
 .../34_default_link_output.csv                |  16 +--
 .../35_TB_10_R_R_FI_output.csv                |  48 +++----
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv |  16 +--
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv |  48 +++----
 .../62_CLARIFY_WITH_ELLIE_output.csv          |  28 ++--
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv |  96 ++++++-------
 .../64_TB_10_C_FI_FI_50_weight_output.csv     |  48 +++----
 ...B_10_BI_BI_R_50_weight_filtered_output.csv | 128 +++++++++---------
 ...weight_filtered_partial_default_output.csv |  48 +++----
 ...50_weight_filtered_full_default_output.csv |  48 +++----
 tests/imputation/test_mean_of_ratios.py       |  30 +---
 22 files changed, 467 insertions(+), 481 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index a69acec9..4552b36b 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -103,7 +103,7 @@ def mean_of_ratios(
         def lower_bound(c):
             return sql_ceil(c * lower_trim / 100)
 
-        def upper_bound(c, f):
+        def upper_bound(c):
             return 1 + sql_floor(c * (100 - upper_trim) / 100)
 
         df = (
@@ -134,13 +134,15 @@ def upper_bound(c, f):
                         expr(
                             """
                             sum(cast(filtered_backward AS integer))
-                            AS count_filtered_forward
+                            AS count_filtered_backward
                         """
                         ),
                     )
                     .select(
                         col("period"),
                         col("grouping"),
+                        col("count_filtered_forward"),
+                        col("count_filtered_backward"),
                         lower_bound(
                             col("count_forward"),
                         ).alias("lower_forward"),
diff --git a/tests/conf.json b/tests/conf.json
index 6d544132..bcaa3bb4 100644
--- a/tests/conf.json
+++ b/tests/conf.json
@@ -1,17 +1,21 @@
 {
     "mean_of_ratios" : {
-        "26" : "identifier != '140005'",
-        "27" : "identifier NOT IN ('150005', '150006')",
-        "28" : "identifier != '190007'",
-        "29" : "identifier NOT IN ('200013', '200014')",
-        "30" : "identifier NOT IN ('230006', '230008')",
-        "41" : "NOT(identifier = '30004' AND date = '202002')",
-        "46" : "NOT(identifier = '90003' AND date = '202001')",
-        "48" : "identifier NOT IN ('30001', '30002', '30010')",
-        "49" : "identifier NOT IN ('30001', '30002', '30010')",
-        "61" : "identifier NOT IN ('110009', '110009')",
-        "65" : "NOT(identifier = '90003' AND date = '202001')",
-        "66" : "identifier NOT IN ('30001', '30002', '30010')",
-        "67" : "identifier NOT IN ('30001', '30002', '30010')"
+        "16.2": {"include_zeros": true},
+        "19" : {"forward_link_col": "forward", "backward_link_col": "backward", "construction_link_col": "construction"},
+        "26" : {"link_filter" : "identifier != '140005'"},
+        "27" : {"link_filter" : "identifier NOT IN ('150005', '150006')"},
+        "28" : {"forward_link_col": "forward", "backward_link_col": "backward", "construction_link_col": "construction", "link_filter" : "identifier != '190007'"},
+        "29" : {"link_filter" : "identifier NOT IN ('200013', '200014')"},
+        "30" : {"link_filter" : "identifier NOT IN ('230006', '230008')"},
+        "35" : {"lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
+        "41" : {"link_filter" : "NOT(identifier = '30004' AND date = '202002')"},
+        "43" : {"forward_link_col": "forward", "backward_link_col": "backward"},
+        "46" : {"link_filter" : "NOT(identifier = '90003' AND date = '202001')"},
+        "48" : {"link_filter" : "identifier NOT IN ('30001', '30002', '30010')"},
+        "49" : {"link_filter" : "identifier NOT IN ('30001', '30002', '30010')"},
+        "61" : {"link_filter" : "identifier NOT IN ('110009', '110009')"},
+        "65" : {"link_filter" : "NOT(identifier = '90003' AND date = '202001')"},
+        "66" : {"link_filter" : "identifier NOT IN ('30001', '30002', '30010')"},
+        "67" : {"link_filter" : "identifier NOT IN ('30001', '30002', '30010')"}
     }
 }
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 507c6705..0c191bfa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -23,8 +23,8 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 140004,202001,100,28,,,1,0.534118956,47.13567839,1319.798995,C,0,3,3,
 140004,202002,100,28,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,
 140004,202003,100,28,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,
-140004,202005,100,28,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3,
-140004,202006,100,28,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3,
+140004,202005,100,28,,,1.108042751,0.497376695,63.63316583,13403.572478,BI,3,3,3,
+140004,202006,100,28,,,2.988483968,3.720631427,127.0854271,26948.533427,BI,3,3,3,
 140004,202007,100,28,,,0.520242185,1,91.63876652,7243,R,3,0,4,
 140005,202001,100,85,,,1,0.534118956,47.13567839,150000,R,0,3,3,TRUE
 140005,202002,100,85,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,TRUE
@@ -34,9 +34,9 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 140005,202006,100,85,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,TRUE
 140005,202007,100,85,,,0.520242185,1,91.63876652,160000,R,3,0,4,TRUE
 140006,202001,100,71,,,1,0.534118956,47.13567839,3346.633166,C,0,3,3,
-140006,202002,100,71,,,6.772539383,3.563193687,97.52261307,22665.20492,FIC,3,3,3,
-140006,202003,100,71,,,0.700853626,0.84489759,62.64321608,15884.99105,FIC,3,3,3,
-140006,202004,100,71,,,3.724667279,2.674093602,95.10050251,59166.30639,FIC,3,3,3,
-140006,202005,100,71,,,1.108042751,0.497376695,63.63316583,65558.7969,FIC,3,3,3,
-140006,202006,100,71,,,2.988483968,3.720631427,127.0854271,195921.4135,FIC,3,3,3,
-140006,202007,100,71,,,0.520242185,1,91.63876652,101926.5842,FIC,3,0,4,
+140006,202002,100,71,,,6.772539383,3.563193687,97.52261307,22665.204916,FIC,3,3,3,
+140006,202003,100,71,,,0.700853626,0.84489759,62.64321608,15884.991057,FIC,3,3,3,
+140006,202004,100,71,,,3.724667279,2.674093602,95.10050251,59166.306423,FIC,3,3,3,
+140006,202005,100,71,,,1.108042751,0.497376695,63.63316583,65558.796938,FIC,3,3,3,
+140006,202006,100,71,,,2.988483968,3.720631427,127.0854271,195921.413606,FIC,3,3,3,
+140006,202007,100,71,,,0.520242185,1,91.63876652,101926.584286,FIC,3,0,4,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index 704e0dd5..c0c6168d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-150001,202001,100,15,,1.285963763,,0.917399451,181.0909091,5891,R,,3,3,
+150001,202001,100,15,,1.285963763,1,0.917399451,181.0909091,5891,R,0,3,3,
 150001,202002,100,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,
 150001,202003,100,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,
 150001,202004,100,15,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,
-150001,202005,100,15,0.336999506,1.154041473,1.028150423,3.035462652,124.8511905,2727,R,3,3,4,
+150001,202005,100,15,0.336999506,1.154041473,1.028150423,3.035462652,124.851190,2727,R,3,3,4,
 150001,202006,100,15,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,
-150001,202007,100,15,4.041049513,,2.111448113,,152.5353535,9549,R,3,,3,
-150002,202001,100,5,,0.917723543,,0.917399451,181.0909091,8611,R,,3,3,
+150001,202007,100,15,4.041049513,,2.111448113,1,152.5353535,9549,R,3,0,3,
+150002,202001,100,5,,0.917723543,1,0.917399451,181.0909091,8611,R,0,3,3,
 150002,202002,100,5,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,
 150002,202003,100,5,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,
 150002,202004,100,5,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,
-150002,202005,100,5,1.343442512,7.155061019,1.028150423,3.035462652,124.8511905,9967,R,3,3,4,
+150002,202005,100,5,1.343442512,7.155061019,1.028150423,3.035462652,124.851190,9967,R,3,3,4,
 150002,202006,100,5,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,
-150002,202007,100,5,1.861450108,,2.111448113,,152.5353535,2593,R,3,,3,
-150003,202001,100,79,,0.548511047,,0.917399451,181.0909091,3426,R,,3,3,
+150002,202007,100,5,1.861450108,,2.111448113,1,152.5353535,2593,R,3,0,3,
+150003,202001,100,79,,0.548511047,1,0.917399451,181.0909091,3426,R,0,3,3,
 150003,202002,100,79,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,
 150003,202003,100,79,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,
 150003,202004,100,79,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,
-150003,202005,100,79,1.404009252,0.797285464,1.028150423,3.035462652,124.8511905,5463,R,3,3,4,
+150003,202005,100,79,1.404009252,0.797285464,1.028150423,3.035462652,124.851190,5463,R,3,3,4,
 150003,202006,100,79,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,
-150003,202007,100,79,0.431844717,,2.111448113,,152.5353535,2959,R,3,,3,
-150004,202001,100,69,,,,0.917399451,181.0909091,13547.81819,BI,,3,3,
-150004,202002,100,69,,,1.230132332,3.509418433,204.1414141,14767.63276,BI,3,3,3,
+150003,202007,100,79,0.431844717,,2.111448113,1,152.5353535,2959,R,3,0,3,
+150004,202001,100,69,,,1,0.917399451,181.0909091,13547.818191,BI,0,3,3,
+150004,202002,100,69,,,1.230132332,3.509418433,204.1414141,14767.632765,BI,3,3,3,
 150004,202003,100,69,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,
-150004,202005,100,69,,,1.028150423,3.035462652,124.8511905,2818,R,3,3,4,
+150004,202005,100,69,,,1.028150423,3.035462652,124.851190,2818,R,3,3,4,
 150004,202006,100,69,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,
-150004,202007,100,69,,,2.111448113,,152.5353535,4483.444383,FIR,3,,3,
-150005,202001,100,85,,,,0.917399451,181.0909091,150000,R,,3,3,TRUE
+150004,202007,100,69,,,2.111448113,1,152.5353535,4483.444383,FIR,3,0,3,
+150005,202001,100,85,,,1,0.917399451,181.0909091,150000,R,0,3,3,TRUE
 150005,202002,100,85,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,TRUE
 150005,202003,100,85,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,TRUE
 150005,202004,100,85,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,TRUE
-150006,202005,100,85,,,1.028150423,3.035462652,124.8511905,105000,R,3,3,4,TRUE
+150006,202005,100,85,,,1.028150423,3.035462652,124.851190,105000,R,3,3,4,TRUE
 150006,202006,100,85,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,TRUE
-150006,202007,100,85,,,2.111448113,,152.5353535,160000,R,3,,3,TRUE
-150007,202001,100,71,,,,0.917399451,181.0909091,12857.45455,C,,3,3,
-150007,202002,100,71,,,1.230132332,3.509418433,204.1414141,15816.37054,FIC,3,3,3,
-150007,202003,100,71,,,0.831168119,0.962881641,109.6130952,13146.06295,FIC,3,3,4,
-150007,202004,100,71,,,3.047553764,1.474655266,195.979798,40063.33364,FIC,3,3,3,
-150007,202005,100,71,,,1.028150423,3.035462652,124.8511905,41191.13343,FIC,3,3,4,
-150007,202006,100,71,,,0.753512367,1.033441075,107.1515152,31038.02845,FIC,3,3,3,
-150007,202007,100,71,,,2.111448113,,152.5353535,65535.1866,FIC,3,,3,
+150006,202007,100,85,,,2.111448113,1,152.5353535,160000,R,3,0,3,TRUE
+150007,202001,100,71,,,1,0.917399451,181.0909091,12857.454545,C,0,3,3,
+150007,202002,100,71,,,1.230132332,3.509418433,204.1414141,15816.370544,FIC,3,3,3,
+150007,202003,100,71,,,0.831168119,0.962881641,109.6130952,13146.062949,FIC,3,3,4,
+150007,202004,100,71,,,3.047553764,1.474655266,195.979798,40063.333624,FIC,3,3,3,
+150007,202005,100,71,,,1.028150423,3.035462652,124.851190,41191.133429,FIC,3,3,4,
+150007,202006,100,71,,,0.753512367,1.033441075,107.1515152,31038.028445,FIC,3,3,3,
+150007,202007,100,71,,,2.111448113,1,152.5353535,65535.186580,FIC,3,0,3,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
index 8f22bf2d..a14f243f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
@@ -1,33 +1,33 @@
 identifier,date,group,question,other,forward,backward,construction
-190001,202001,100,9261,95,,,
-190001,202002,100,4996,95,,,
-190001,202003,100,1480,95,,,
-190001,202004,100,4350,95,,,
-190002,202001,100,2433,17,,,
-190002,202002,100,4324,17,,,
-190002,202003,100,6598,17,,,
-190002,202004,100,700,17,,,
-190003,202001,100,7888,64,,,
-190003,202002,100,4218,64,,,
-190003,202003,100,7591,64,,,
-190003,202004,100,4077,64,,,
-190004,202001,100,2247,51,,,
-190004,202002,100,,51,,,
-190004,202003,100,,51,,,
-190004,202004,100,8608,51,,,
-190005,202001,100,,34,,,
-190005,202002,100,,34,,,
-190005,202003,100,4456,34,,,
-190005,202004,100,5134,34,,,
-190006,202001,100,,8,,,
-190006,202002,100,,8,,,
-190006,202003,100,,8,,,
-190006,202004,100,,8,,,
-190007,202001,100,150000,85,,,
-190007,202002,100,120000,85,,,
-190007,202003,100,110000,85,,,
-190007,202004,100,180000,85,,,
-190008,202001,100,,71,,,
-190008,202002,100,,71,,,
-190008,202003,100,,71,,,
-190008,202004,100,,71,,,
+190001,202001,100,9261,95,1,0.9214,50.3694
+190001,202002,100,4996,95,0.8521,1.5274,121.4187
+190001,202003,100,1480,95,0.9685,1.8795,89.3761
+190001,202004,100,4350,95,1.113,1,110.5473
+190002,202001,100,2433,17,,0.9214,50.3694
+190002,202002,100,4324,17,0.8521,1.5274,121.4187
+190002,202003,100,6598,17,0.9685,1.8795,89.3761
+190002,202004,100,700,17,1.113,1,110.5473
+190003,202001,100,7888,64,1,0.9214,50.3694
+190003,202002,100,4218,64,0.8521,1.5274,121.4187
+190003,202003,100,7591,64,0.9685,1.8795,89.3761
+190003,202004,100,4077,64,1.113,1,110.5473
+190004,202001,100,2247,51,1,0.9214,50.3694
+190004,202002,100,,51,0.8521,1.5274,121.4187
+190004,202003,100,,51,0.9685,1.8795,89.3761
+190004,202004,100,8608,51,1.113,1,110.5473
+190005,202001,100,,34,1,0.9214,50.3694
+190005,202002,100,,34,0.8521,1.5274,121.4187
+190005,202003,100,4456,34,0.9685,1.8795,89.3761
+190005,202004,100,5134,34,1.113,1,110.5473
+190006,202001,100,,8,1,0.9214,50.3694
+190006,202002,100,,8,0.8521,1.5274,121.4187
+190006,202003,100,,8,0.9685,1.8795,89.3761
+190006,202004,100,,8,1.113,1,110.5473
+190007,202001,100,150000,85,1,0.9214,50.3694
+190007,202002,100,120000,85,0.8521,1.5274,121.4187
+190007,202003,100,110000,85,0.9685,1.8795,89.3761
+190007,202004,100,180000,85,1.113,1,110.5473
+190008,202001,100,,71,1,0.9214,50.3694
+190008,202002,100,,71,0.8521,1.5274,121.4187
+190008,202003,100,,71,0.9685,1.8795,89.3761
+190008,202004,100,,71,1.113,1,110.5473
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
index 9e32b29f..08c0caef 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-190001,202001,100,95,,1.853682946,,0.9214,50.3694,9261,R,,,,
+190001,202001,100,95,,1.853682946,1,0.9214,50.3694,9261,R,,,,
 190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,,,,
 190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,,,,
-190001,202004,100,95,2.939189189,,1.113,,110.5473,4350,R,,,,
-190002,202001,100,17,,0.562673451,,0.9214,50.3694,2433,R,,,,
+190001,202004,100,95,2.939189189,,1.113,1,110.5473,4350,R,,,,
+190002,202001,100,17,,0.562673451,1,0.9214,50.3694,2433,R,,,,
 190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,,,,
 190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,,,,
-190002,202004,100,17,11.26857143,,1.113,,110.5473,700,R,,,,
-190003,202001,100,64,,1.870080607,,0.9214,50.3694,7888,R,,,,
+190002,202004,100,17,11.26857143,,1.113,1,110.5473,700,R,,,,
+190003,202001,100,64,,1.870080607,1,0.9214,50.3694,7888,R,,,,
 190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,,,,
 190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,,,,
-190003,202004,100,64,0.537083388,,1.113,,110.5473,4077,R,,,,
-190004,202001,100,51,,,,0.9214,50.3694,2247,R,,,,
+190003,202004,100,64,0.537083388,,1.113,1,110.5473,4077,R,,,,
+190004,202001,100,51,,,1,0.9214,50.3694,2247,R,,,,
 190004,202002,100,51,,,0.8521,1.5274,121.4187,1914.6687,FIR,,,,
 190004,202003,100,51,,,0.9685,1.8795,89.3761,1854.356636,FIR,,,,
-190004,202004,100,51,,,1.113,,110.5473,8608,R,,,,
-190005,202001,100,34,,,,0.9214,50.3694,6271.13538,BI,,,,
+190004,202004,100,51,,,1.113,1,110.5473,8608,R,,,,
+190005,202001,100,34,,,1,0.9214,50.3694,6271.13538,BI,,,,
 190005,202002,100,34,,,0.8521,1.5274,121.4187,6806.0944,BI,,,,
 190005,202003,100,34,,0.867939229,0.9685,1.8795,89.3761,4456,R,,,,
-190005,202004,100,34,1.152154399,,1.113,,110.5473,5134,R,,,,
-190006,202001,100,8,,,,0.9214,50.3694,402.9552,C,,,,
+190005,202004,100,34,1.152154399,,1.113,1,110.5473,5134,R,,,,
+190006,202001,100,8,,,1,0.9214,50.3694,402.9552,C,,,,
 190006,202002,100,8,,,0.8521,1.5274,121.4187,343.3581259,FIC,,,,
 190006,202003,100,8,,,0.9685,1.8795,89.3761,332.542345,FIC,,,,
-190006,202004,100,8,,,1.113,,110.5473,370.1196299,FIC,,,,
-190007,202001,100,85,,,,0.9214,50.3694,150000,R,,,,TRUE
+190006,202004,100,8,,,1.113,1,110.5473,370.1196299,FIC,,,,
+190007,202001,100,85,,,1,0.9214,50.3694,150000,R,,,,TRUE
 190007,202002,100,85,,,0.8521,1.5274,121.4187,120000,R,,,,TRUE
 190007,202003,100,85,,,0.9685,1.8795,89.3761,110000,R,,,,TRUE
-190007,202004,100,85,,,1.113,,110.5473,180000,R,,,,TRUE
-190008,202001,100,71,,,,0.9214,50.3694,3576.2274,C,,,,
+190007,202004,100,85,,,1.113,1,110.5473,180000,R,,,,TRUE
+190008,202001,100,71,,,1,0.9214,50.3694,3576.2274,C,,,,
 190008,202002,100,71,,,0.8521,1.5274,121.4187,3047.303368,FIC,,,,
-190008,202003,100,71,,,0.9685,1.8795,89.3761,2951.313311,FIC,,,,
-190008,202004,100,71,,,1.113,,110.5473,3284.811716,FIC,,,,
+190008,202003,100,71,,,0.9685,1.8795,89.3761,2951.313312,FIC,,,,
+190008,202004,100,71,,,1.113,1,110.5473,3284.811716,FIC,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
index 244075c1..1bcfbb62 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,64 +1,64 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,
-200001,202001,100,56,,1.262441238,,0.597514698,71.63436123,7788,R,,4,4,
+200001,202001,100,56,,1.262441238,1,0.597514698,71.63436123,7788,R,0,4,4,
 200001,202002,100,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,
 200001,202003,100,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,
-200001,202004,100,56,0.25617284,,0.276010255,,42.68681319,1577,R,4,,4,
-200002,202001,100,75,,0.806244601,,0.597514698,71.63436123,6533,R,,4,4,
+200001,202004,100,56,0.25617284,,0.276010255,1,42.68681319,1577,R,4,0,4,
+200002,202001,100,75,,0.806244601,1,0.597514698,71.63436123,6533,R,0,4,4,
 200002,202002,100,75,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,
 200002,202003,100,75,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,
-200002,202004,100,75,0.439419795,,0.276010255,,42.68681319,2575,R,4,,4,
-200003,202001,100,10,,0.011249498,,0.597514698,71.63436123,56,R,,4,4,
+200002,202004,100,75,0.439419795,,0.276010255,1,42.68681319,2575,R,4,0,4,
+200003,202001,100,10,,0.011249498,1,0.597514698,71.63436123,56,R,0,4,4,
 200003,202002,100,10,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,
 200003,202003,100,10,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,
-200003,202004,100,10,0.103224336,,0.276010255,,42.68681319,906,R,4,,4,
-200004,202001,100,86,,0.310123457,,0.597514698,71.63436123,1884,R,,4,4,
+200003,202004,100,10,0.103224336,,0.276010255,1,42.68681319,906,R,4,0,4,
+200004,202001,100,86,,0.310123457,1,0.597514698,71.63436123,1884,R,0,4,4,
 200004,202002,100,86,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,
 200004,202003,100,86,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,
-200004,202004,100,86,,,0.276010255,,42.68681319,1947.413826,FIR,4,,4,
-200005,202001,100,6,,,,0.597514698,71.63436123,429.8061674,C,,4,4,
-200005,202002,100,6,,,23.53745347,0.984013482,111.5638767,10116.54267,FIC,4,3,4,
-200005,202003,100,6,,,1.161413175,4.785815599,163.0494505,11749.48594,FIC,3,4,4,
-200005,202004,100,6,,,0.276010255,,42.68681319,3242.978611,FIC,4,,4,
-200006,202001,100,41,,,,0.597514698,71.63436123,8740.605259,BI,,4,4,
+200004,202004,100,86,,,0.276010255,1,42.68681319,1947.413826,FIR,4,0,4,
+200005,202001,100,6,,,1,0.597514698,71.63436123,429.8061674,C,0,4,4,
+200005,202002,100,6,,,23.53745347,0.984013482,111.5638767,10116.542659,FIC,4,3,4,
+200005,202003,100,6,,,1.161413175,4.785815599,163.0494505,11749.485934,FIC,3,4,4,
+200005,202004,100,6,,,0.276010255,1,42.68681319,3242.978608,FIC,4,0,4,
+200006,202001,100,41,,,1,0.597514698,71.63436123,5222.283092,BI,0,4,4,
 200006,202002,100,41,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,
 200006,202003,100,41,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,
-200006,202004,100,41,0.305224049,,0.276010255,,42.68681319,2711,R,4,,4,
-200007,202001,200,4,,0.252093023,,2.163456777,132.3214286,2439,R,,3,4,
+200006,202004,100,41,0.305224049,,0.276010255,1,42.68681319,2711,R,4,0,4,
+200007,202001,200,4,,0.252093023,1,2.163456777,132.3214286,2439,R,0,3,4,
 200007,202002,200,4,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,
 200007,202003,200,4,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,
-200007,202004,200,4,0.084963587,,0.197315737,,99.37735849,595,R,3,,3,
-200008,202001,200,4,,0.287290242,,2.163456777,132.3214286,1849,R,,3,4,
+200007,202004,200,4,0.084963587,,0.197315737,1,99.37735849,595,R,3,0,3,
+200008,202001,200,4,,0.287290242,1,2.163456777,132.3214286,1849,R,0,3,4,
 200008,202002,200,4,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,
 200008,202003,200,4,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,
-200008,202004,200,4,0.280873416,,0.197315737,,99.37735849,2727,R,3,,3,
-200009,202001,200,45,,5.950987066,,2.163456777,132.3214286,8742,R,,3,4,
+200008,202004,200,4,0.280873416,,0.197315737,1,99.37735849,2727,R,3,0,3,
+200009,202001,200,45,,5.950987066,1,2.163456777,132.3214286,8742,R,0,3,4,
 200009,202002,200,45,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,
 200009,202003,200,45,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,
-200009,202004,200,45,0.226110207,,0.197315737,,99.37735849,1945,R,3,,3,
-200010,202001,200,85,,,,2.163456777,132.3214286,14038.67103,BI,,3,4,
+200009,202004,200,45,0.226110207,,0.197315737,1,99.37735849,1945,R,3,0,3,
+200010,202001,200,85,,,1,2.163456777,132.3214286,14038.671027,BI,0,3,4,
 200010,202002,200,85,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,
 200010,202003,200,85,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,
-200010,202004,200,85,,,0.197315737,,99.37735849,354.3790633,FIR,3,,3,
-200011,202001,200,79,,,,2.163456777,132.3214286,4166.817753,BI,,3,4,
+200010,202004,200,85,,,0.197315737,1,99.37735849,354.3790633,FIR,3,0,3,
+200011,202001,200,79,,,1,2.163456777,132.3214286,4166.817753,BI,0,3,4,
 200011,202002,200,79,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,
-200011,202004,200,79,,,0.197315737,,99.37735849,7850.811321,C,3,,3,
-200012,202001,200,87,,,,2.163456777,132.3214286,5495,R,,3,4,
-200012,202002,200,87,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5,
-200012,202003,200,87,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4,
-200012,202004,200,87,,,0.197315737,,99.37735849,5755.871742,FIR,3,,3,
-200013,202001,100,85,,,,0.597514698,71.63436123,150000,R,,4,4,TRUE
+200011,202004,200,79,,,0.197315737,1,99.37735849,7850.811321,C,3,0,3,
+200012,202001,200,87,,,1,2.163456777,132.3214286,5495,R,0,3,4,
+200012,202002,200,87,,,2.53854315,1.457061014,119.7926267,13949.294611,FIR,3,4,5,
+200012,202003,200,87,,,2.091207548,6.584230902,196.4492754,29170.870177,FIR,4,3,4,
+200012,202004,200,87,,,0.197315737,1,99.37735849,5755.871742,FIR,3,0,3,
+200013,202001,100,85,,,1,0.597514698,71.63436123,150000,R,0,4,4,TRUE
 200013,202002,100,85,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,TRUE
 200013,202003,100,85,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,TRUE
-200013,202004,100,85,,,0.276010255,,42.68681319,105000,R,4,,4,TRUE
-200014,202001,200,96,,,,2.163456777,132.3214286,150000,R,,3,4,TRUE
+200013,202004,100,85,,,0.276010255,1,42.68681319,105000,R,4,0,4,TRUE
+200014,202001,200,96,,,1,2.163456777,132.3214286,150000,R,0,3,4,TRUE
 200014,202002,200,96,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,TRUE
 200014,202003,200,96,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,TRUE
-200014,202004,200,96,,,0.197315737,,99.37735849,105000,R,3,,3,TRUE
-200015,202001,100,71,,,,0.597514698,71.63436123,5086.039647,C,,4,4,
-200015,202002,100,71,,,23.53745347,0.984013482,111.5638767,119712.4215,FIC,4,3,4,
-200015,202003,100,71,,,1.161413175,4.785815599,163.0494505,139035.5836,FIC,3,4,4,
-200015,202004,100,71,,,0.276010255,,42.68681319,38375.24688,FIC,4,,4,
-200016,202001,200,48,,,,2.163456777,132.3214286,6351.428573,C,,3,4,
-200016,202002,200,48,,,2.53854315,1.457061014,119.7926267,16123.3755,FIC,3,4,5,
-200016,202003,200,48,,,2.091207548,6.584230902,196.4492754,33717.32454,FIC,4,3,4,
-200016,202004,200,48,,,0.197315737,,99.37735849,6652.958741,FIC,3,,3,
+200014,202004,200,96,,,0.197315737,1,99.37735849,105000,R,3,0,3,TRUE
+200015,202001,100,71,,,1,0.597514698,71.63436123,5086.039648,C,0,4,4,
+200015,202002,100,71,,,23.53745347,0.984013482,111.5638767,119712.421581,FIC,4,3,4,
+200015,202003,100,71,,,1.161413175,4.785815599,163.0494505,139035.583689,FIC,3,4,4,
+200015,202004,100,71,,,0.276010255,1,42.68681319,38375.246898,FIC,4,0,4,
+200016,202001,200,48,,,1,2.163456777,132.3214286,6351.428571,C,0,3,4,
+200016,202002,200,48,,,2.53854315,1.457061014,119.7926267,16123.375493,FIC,3,4,5,
+200016,202003,200,48,,,2.091207548,6.584230902,196.4492754,33717.324528,FIC,4,3,4,
+200016,202004,200,48,,,0.197315737,1,99.37735849,6652.958732,FIC,3,0,3,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index dda88646..4fed12c5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-230001,202001,1,10,,1.511049724,,1.087985595,15.46666667,547,R,,2,2,
+230001,202001,1,10,,1.511049724,1,1.087985595,15.46666667,547,R,0,2,2,
 230001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,
-230001,202003,1,10,2.472375691,,1.42292432,,18.48333333,895,R,2,,2,
-230002,202001,1,50,,0.664921466,,1.087985595,15.46666667,381,R,,2,2,
+230001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,895,R,2,0,2,
+230002,202001,1,50,,0.664921466,1,1.087985595,15.46666667,381,R,0,2,2,
 230002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,
-230002,202003,1,50,0.373472949,,1.42292432,,18.48333333,214,R,2,,2,
-230003,202001,2,12,,3.599250936,,2.241504449,72.19047619,961,R,,2,2,
+230002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,214,R,2,0,2,
+230003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,961,R,0,2,2,
 230003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,
-230003,202003,2,12,1.176029963,,1.174002242,,50,314,R,2,,2,
-230004,202001,2,9,,0.883757962,,2.241504449,72.19047619,555,R,,2,2,
+230003,202003,2,12,1.176029963,,1.174002242,1,50,314,R,2,0,2,
+230004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,555,R,0,2,2,
 230004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,
-230004,202003,2,9,1.171974522,,1.174002242,,50,736,R,2,,2,
-230005,202001,1,18,,,,1.087985595,15.46666667,278.4,C,,2,2,
+230004,202003,2,9,1.171974522,,1.174002242,1,50,736,R,2,0,2,
+230005,202001,1,18,,,1,1.087985595,15.46666667,278.4,C,0,2,2,
 230005,202002,2,18,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,
-230005,202003,2,18,,,1.174002242,,50,900.6274345,FIC,2,,2,
-230006,202001,1,85,,,,1.087985595,15.46666667,150000,R,,2,2,TRUE
+230005,202003,2,18,,,1.174002242,1,50,900.627434,FIC,2,0,2,
+230006,202001,1,85,,,1,1.087985595,15.46666667,150000,R,0,2,2,TRUE
 230006,202002,1,85,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,TRUE
-230006,202003,1,85,,,1.42292432,,18.48333333,120000,R,2,,2,TRUE
-230007,202001,1,71,,,,1.087985595,15.46666667,1098.133334,C,,2,2,
+230006,202003,1,85,,,1.42292432,1,18.48333333,120000,R,2,0,2,TRUE
+230007,202001,1,71,,,1,1.087985595,15.46666667,1098.133333,C,0,2,2,
 230007,202002,1,71,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,
-230007,202003,1,71,,,1.42292432,,18.48333333,1692.041118,FIC,2,,2,
-230008,202001,2,85,,,,2.241504449,72.19047619,150000,R,,2,2,TRUE
+230007,202003,1,71,,,1.42292432,1,18.48333333,1692.041117,FIC,2,0,2,
+230008,202001,2,85,,,1,2.241504449,72.19047619,150000,R,0,2,2,TRUE
 230008,202002,2,85,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,TRUE
-230008,202003,2,85,,,1.174002242,,50,120000,R,2,,2,TRUE
-230009,202001,2,71,,,,2.241504449,72.19047619,5125.523809,C,,2,2,
-230009,202002,2,71,,,0.70468356,0.85178967,42.61904762,3611.872365,FIC,2,2,2,
-230009,202003,2,71,,,1.174002242,,50,4240.346254,FIC,2,,2,
+230008,202003,2,85,,,1.174002242,1,50,120000,R,2,0,2,TRUE
+230009,202001,2,71,,,1,2.241504449,72.19047619,5125.523810,C,0,2,2,
+230009,202002,2,71,,,0.70468356,0.85178967,42.61904762,3611.872364,FIC,2,2,2,
+230009,202003,2,71,,,1.174002242,1,50,4240.346255,FIC,2,0,2,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index 241b78ac..370346db 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,22 +1,22 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,89,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
-110001,202003,100,89,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
-110002,202001,100,83,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4
 110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
-110002,202003,100,83,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
-110003,202001,100,4,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4
 110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
-110003,202003,100,4,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
-110004,202001,100,76,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4
 110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
-110004,202003,100,76,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
-110005,202001,200,27,,,,1,1,9940,BI,,0,0
-110005,202002,200,27,,,1,1,1,9940,BI,0,0,0
-110005,202003,200,27,,,1,,368.1481481,9940,R,0,,1
-110006,202001,200,42,,,,1,126.7857143,5325,R,,0,1
-110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0
-110006,202003,200,42,,,1,,368.1481481,5325,FIR,0,,1
-110007,202001,200,19,,,,1,126.7857143,2408.928571,C,,0,1
-110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0
-110007,202003,200,19,,,1,,368.1481481,2408.928571,FIC,0,,1
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3
+110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1
+110005,202002,200,27,,,1,1,1,9940,BI,,,
+110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1
+110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1
+110006,202002,200,42,,,1,1,1,5325,FIR,,,
+110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1
+110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1
+110007,202002,200,19,,,1,1,1,2408.928571,FIC,,,
+110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index 9b568cbb..733d8276 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,89,,1.036787797,,2.656680299,101.7103175,9244,R,,4,4
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
-110001,202003,100,89,0.694706146,,0.968230653,,70.26136364,6194,R,3,,3
-110002,202001,100,83,,0.817550398,,2.656680299,101.7103175,4826,R,,4,4
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4
 110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
-110002,202003,100,83,0.803489751,,0.968230653,,70.26136364,4743,R,3,,3
-110003,202001,100,4,,7.466535433,,2.656680299,101.7103175,7586,R,,4,4
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4
 110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
-110003,202003,100,4,1.406496063,,0.968230653,,70.26136364,1429,R,3,,3
-110004,202001,100,76,,1.305847569,,2.656680299,101.7103175,3975,R,,4,4
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4
 110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
-110004,202003,100,76,,,0.968230653,,70.26136364,2947.294109,FIR,3,,3
-110005,202001,200,27,,,,1,1,27,C,,0,0
-110005,202002,200,27,,,1,1,1,27,FIC,0,0,0
-110005,202003,200,27,,,1,,1,27,FIC,0,,0
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3
+110005,202001,200,27,,,1,1,1,27,C,,,
+110005,202002,200,27,,,1,1,1,27,FIC,,,
+110005,202003,200,27,,,1,1,1,27,FIC,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index 49b3f5b5..4984b2e2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-190001,202001,100,95,,1.853682946,,0.9214,96.16299559,9261,R,,,4
+190001,202001,100,95,,1.853682946,1,0.9214,96.16299559,9261,R,,,4
 190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,,,3
 190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,,,4
-190001,202004,100,95,2.939189189,,1.113,,87.62068966,4350,R,,,5
-190002,202001,100,17,,0.562673451,,0.9214,96.16299559,2433,R,,,4
+190001,202004,100,95,2.939189189,,1.113,1,87.62068966,4350,R,,,5
+190002,202001,100,17,,0.562673451,1,0.9214,96.16299559,2433,R,,,4
 190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,,,3
 190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,,,4
-190002,202004,100,17,11.26857143,,1.113,,87.62068966,700,R,,,5
-190003,202001,100,64,,1.870080607,,0.9214,96.16299559,7888,R,,,4
+190002,202004,100,17,11.26857143,,1.113,1,87.62068966,700,R,,,5
+190003,202001,100,64,,1.870080607,1,0.9214,96.16299559,7888,R,,,4
 190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,,,3
 190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,,,4
-190003,202004,100,64,0.537083388,,1.113,,87.62068966,4077,R,,,5
-190004,202001,100,51,,,,0.9214,96.16299559,2247,R,,,4
+190003,202004,100,64,0.537083388,,1.113,1,87.62068966,4077,R,,,5
+190004,202001,100,51,,,1,0.9214,96.16299559,2247,R,,,4
 190004,202002,100,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,,,3
 190004,202003,100,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,,,4
-190004,202004,100,51,,,1.113,,87.62068966,8608,R,,,5
-190005,202001,100,34,,,,0.9214,96.16299559,6271.13538,BI,,,4
+190004,202004,100,51,,,1.113,1,87.62068966,8608,R,,,5
+190005,202001,100,34,,,1,0.9214,96.16299559,6271.13538,BI,,,4
 190005,202002,100,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,,,3
 190005,202003,100,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,,,4
-190005,202004,100,34,1.152154399,,1.113,,87.62068966,5134,R,,,5
-190006,202001,100,8,,,,0.9214,96.16299559,769.3039647,C,,,4
+190005,202004,100,34,1.152154399,,1.113,1,87.62068966,5134,R,,,5
+190006,202001,100,8,,,1,0.9214,96.16299559,769.3039647,C,,,4
 190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.5239083,FIC,,,3
 190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.8749052,FIC,,,4
-190006,202004,100,8,,,1.113,,87.62068966,706.6157695,FIC,,,5
+190006,202004,100,8,,,1.113,1,87.62068966,706.6157695,FIC,,,5
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index 2f90991b..ed347092 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,21 +1,21 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_construction_link
-120001,202001,100,0,,2.104417671,,1.589860068,1,5240,R,,3,3,TRUE
+120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,TRUE
 120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,TRUE
 120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,TRUE
 120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,TRUE
-120001,202005,100,0,0.294078212,,5.357333441,,1,1316,R,3,,3,TRUE
-120002,202001,100,0,,2.05719045,,1.589860068,1,7410,R,,3,3,TRUE
+120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,TRUE
+120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,TRUE
 120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,TRUE
 120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,TRUE
 120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,TRUE
-120002,202005,100,0,0.173681828,,5.357333441,,1,1535,R,3,,3,TRUE
-120003,202001,100,0,,0.607972084,,1.589860068,1,4530,R,,3,3,TRUE
+120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,TRUE
+120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,TRUE
 120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,TRUE
 120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,TRUE
 120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,TRUE
-120003,202005,100,0,15.60424028,,5.357333441,,1,4416,R,3,,3,TRUE
-120004,202001,100,3,,,,1.589860068,1,3,C,,3,3,TRUE
+120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,TRUE
+120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,TRUE
 120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,TRUE
 120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,TRUE
 120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,TRUE
-120004,202005,100,3,,,5.357333441,,1,18.28784061,FIC,3,,3,TRUE
+120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,TRUE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index e04b774b..8a36aac4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,,1.598925527,96.73383283,8444,R,,10,12,,
+30001,202001,100,51,,1.129481006,1,1.598925527,96.73383283,8444,R,0,10,12,,
 30001,202002,100,51,0.885362387,3.732401398,6.802558774,2.995081605,76.3675837,7476,R,10,9,12,,
-30001,202003,100,51,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
-30002,202001,100,72,,1.195062676,,1.598925527,96.73383283,9343,R,,10,12,,
+30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,2003,R,9,0,11,,
+30002,202001,100,72,,1.195062676,1,1.598925527,96.73383283,9343,R,0,10,12,,
 30002,202002,100,72,0.836776196,1.596487645,6.802558774,2.995081605,76.3675837,7818,R,10,9,12,,
-30002,202003,100,72,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
-30003,202001,100,7,,4.265190233,,1.598925527,96.73383283,7511,R,,10,12,,
+30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,4897,R,9,0,11,,
+30003,202001,100,7,,4.265190233,1,1.598925527,96.73383283,7511,R,0,10,12,,
 30003,202002,100,7,0.234456131,0.271256932,6.802558774,2.995081605,76.3675837,1761,R,10,9,12,,
-30003,202003,100,7,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
-30004,202001,100,81,,0.030288689,,1.598925527,96.73383283,64,R,,10,12,,
+30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,6492,R,9,0,11,,
+30004,202001,100,81,,0.030288689,1,1.598925527,96.73383283,64,R,0,10,12,,
 30004,202002,100,81,33.015625,11.42162162,6.802558774,2.995081605,76.3675837,2113,R,10,9,12,,
-30004,202003,100,81,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
-30005,202001,100,5,,0.941234172,,1.598925527,96.73383283,844,R,,10,12,,
+30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,185,R,9,0,11,,
+30005,202001,100,5,,0.941234172,1,1.598925527,96.73383283,844,R,0,10,12,,
 30005,202002,100,5,1.062434865,3.199201198,6.802558774,2.995081605,76.3675837,897,R,10,9,12,,
-30005,202003,100,5,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
-30006,202001,100,14,,0.995885563,,1.598925527,96.73383283,1869,R,,10,12,,
+30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,280,R,9,0,11,,
+30006,202001,100,14,,0.995885563,1,1.598925527,96.73383283,1869,R,0,10,12,,
 30006,202002,100,14,1.004131435,1.368417982,6.802558774,2.995081605,76.3675837,1876,R,10,9,12,,
-30006,202003,100,14,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
-30007,202001,100,12,,4.475816911,,1.598925527,96.73383283,12769,R,,10,12,,
+30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1371,R,9,0,11,,
+30007,202001,100,12,,4.475816911,1,1.598925527,96.73383283,12769,R,0,10,12,,
 30007,202002,100,12,0.223422901,0.248269056,6.802558774,2.995081605,76.3675837,2853,R,10,9,12,,
-30007,202003,100,12,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
-30008,202001,100,162,,0.023463069,,1.598925527,96.73383283,141,R,,10,12,,TRUE
+30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,11491,R,9,0,11,,
+30008,202001,100,162,,0.023463069,1,1.598925527,96.73383283,141,R,0,10,12,,TRUE
 30008,202002,100,162,42.62017045,13.86213906,6.802558774,2.995081605,76.3675837,6001,R,10,9,12,TRUE,TRUE
-30008,202003,100,162,0.072138939,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
-30009,202001,100,26,,1.589639934,,1.598925527,96.73383283,6417,R,,10,12,,
+30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,433,R,9,0,11,TRUE,
+30009,202001,100,26,,1.589639934,1,1.598925527,96.73383283,6417,R,0,10,12,,
 30009,202002,100,26,0.629073275,3.053782962,6.802558774,2.995081605,76.3675837,4037,R,10,9,12,,
-30009,202003,100,26,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
-30010,202001,100,144,,1.332623847,,1.598925527,96.73383283,28963,R,,10,12,,
+30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1322,R,9,0,11,,
+30010,202001,100,144,,1.332623847,1,1.598925527,96.73383283,28963,R,0,10,12,,
 30010,202002,100,144,0.750399298,2.064295653,6.802558774,2.995081605,76.3675837,21734,R,10,9,12,,
-30010,202003,100,144,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
-30011,202001,100,5,,5.249464902,,1.598925527,96.73383283,6009,R,,10,12,,TRUE
+30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,10529,R,9,0,11,,
+30011,202001,100,5,,5.249464902,1,1.598925527,96.73383283,6009,R,0,10,12,,TRUE
 30011,202002,100,5,0.190495606,0.226047443,6.802558774,2.995081605,76.3675837,1145,R,10,9,12,TRUE,TRUE
-30011,202003,100,5,4.423850085,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
-30012,202001,100,275,,0.034032235,,1.598925527,96.73383283,256,R,,10,12,,
+30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,5064,R,9,0,11,TRUE,
+30012,202001,100,275,,0.034032235,1,1.598925527,96.73383283,256,R,0,10,12,,
 30012,202002,100,275,29.38390625,,6.802558774,2.995081605,76.3675837,7522,R,10,9,12,,
-30012,202003,100,275,,,1.172391173,,76.13443331,8818.726403,FIR,9,,11,,
+30012,202003,100,275,,,1.172391173,1,76.13443331,8818.726403,FIR,9,0,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index 9be16699..6e1718ee 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,29 +1,29 @@
 identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-70001,202001,100,39,,1.511049724,101.7103175,,3.280595369,,47.92201545,107.48,,24.71653259,104.5951588,5951,R,,3,3
+70001,202001,100,39,,1.511049724,101.7103175,,3.280595369,1,47.92201545,107.48,,24.71653259,104.5951588,5951,R,0,3,3
 70001,202002,100,39,,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
 70001,202003,100,39,1.082864299,,70.26136364,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4
 70001,202004,100,39,1.42292432,0.664921466,101.7103175,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3
 70001,202005,100,39,0.70468356,2.677570093,74.91666667,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3
 70001,202006,100,39,1.174002242,0.404469274,182.2366412,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4
-70001,202007,100,39,,,,0.012408205,,1.593348776,,70.24,1.593348776,,70.24,49,R,3,,3
-70002,202001,100,94,,1.511049724,101.7103175,,139.6875,,47.92201545,107.48,,24.71653259,104.5951588,6705,R,,3,3
+70001,202007,100,39,,,,0.012408205,,1.593348776,1,70.24,1.593348776,,70.24,49,R,3,0,3
+70002,202001,100,94,,1.511049724,101.7103175,,139.6875,1,47.92201545,107.48,,24.71653259,104.5951588,6705,R,0,3,3
 70002,202002,100,94,,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3
 70002,202003,100,94,1.082864299,,70.26136364,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4
 70002,202004,100,94,1.42292432,0.664921466,101.7103175,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3
 70002,202005,100,94,0.70468356,2.677570093,74.91666667,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3
 70002,202006,100,94,1.174002242,0.404469274,182.2366412,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4
-70002,202007,100,94,,,,0.46538101,,1.593348776,,70.24,1.593348776,,70.24,3475,R,3,,3
-70003,202001,100,42,,1.511049724,101.7103175,,0.797950979,,47.92201545,107.48,,24.71653259,104.5951588,6153,R,,3,3
+70002,202007,100,94,,,,0.46538101,,1.593348776,1,70.24,1.593348776,,70.24,3475,R,3,0,3
+70003,202001,100,42,,1.511049724,101.7103175,,0.797950979,1,47.92201545,107.48,,24.71653259,104.5951588,6153,R,0,3,3
 70003,202002,100,42,,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
 70003,202003,100,42,1.082864299,,70.26136364,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4
 70003,202004,100,42,1.42292432,0.664921466,101.7103175,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3
 70003,202005,100,42,0.70468356,2.677570093,74.91666667,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3
 70003,202006,100,42,1.174002242,0.404469274,182.2366412,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4
-70003,202007,100,42,,,,4.302257115,,1.593348776,,70.24,1.593348776,,70.24,8768,R,3,,3
-70004,202001,100,6,,1.511049724,101.7103175,,,,47.92201545,107.48,,24.71653259,104.5951588,202432.0564,BI,,3,3
+70003,202007,100,42,,,,4.302257115,,1.593348776,1,70.24,1.593348776,,70.24,8768,R,3,0,3
+70004,202001,100,6,,1.511049724,101.7103175,,,1,47.92201545,107.48,,24.71653259,104.5951588,202432.0564,BI,0,3,3
 70004,202002,100,6,,,,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
 70004,202003,100,6,1.082864299,,70.26136364,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4
 70004,202004,100,6,1.42292432,0.664921466,101.7103175,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3
 70004,202005,100,6,0.70468356,2.677570093,74.91666667,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3
 70004,202006,100,6,1.174002242,0.404469274,182.2366412,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4
-70004,202007,100,6,,,,,,1.593348776,,70.24,1.593348776,,70.24,9360.924059,FIR,3,,3
+70004,202007,100,6,,,,,,1.593348776,1,70.24,1.593348776,,70.24,9360.924059,FIR,3,0,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index 0234fbbe..efe407d5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-110001,202001,100,89,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4,,,
+110001,202001,100,89,,1.5274,50.3694,,1.036787797,1,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,0,4,4,,,
 110001,202002,100,89,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,,,
-110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3,,,
-110002,202001,100,83,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4,,,
+110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,1,70.26136364,1.040615327,,79.81873182,6194,R,3,0,3,,,
+110002,202001,100,83,,1.5274,50.3694,,0.817550398,1,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,0,4,4,,,
 110002,202002,100,83,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,,,
-110002,202003,100,83,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3,,,
-110003,202001,100,4,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4,,,
+110002,202003,100,83,1.113,,89.3761,0.803489751,,0.968230653,1,70.26136364,1.040615327,,79.81873182,4743,R,3,0,3,,,
+110003,202001,100,4,,1.5274,50.3694,,7.466535433,1,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,0,4,4,,,
 110003,202002,100,4,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,,,
-110003,202003,100,4,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3,,,
-110004,202001,100,76,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4,,,
+110003,202003,100,4,1.113,,89.3761,1.406496063,,0.968230653,1,70.26136364,1.040615327,,79.81873182,1429,R,3,0,3,,,
+110004,202001,100,76,,1.5274,50.3694,,1.305847569,1,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,0,4,4,,,
 110004,202002,100,76,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,,,
-110004,202003,100,76,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3,,,
-110005,202001,200,27,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3,,,
+110004,202003,100,76,1.113,,89.3761,,,0.968230653,1,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,0,3,,,
+110005,202001,200,27,,2.994350985,107.48,,0.743586089,1,2.290844366,182.25,,2.642597676,144.865,5217,R,0,3,3,,,
 110005,202002,200,27,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,,,
-110005,202003,200,27,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4,,,
-110006,202001,200,42,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3,,,
+110005,202003,200,27,0.952585628,,98.26519337,1.416761688,,1.259780318,1,182.2366412,1.106182973,,140.2509173,9940,R,4,0,4,,,
+110006,202001,200,42,,2.994350985,107.48,,0.68736285,1,2.290844366,182.25,,2.642597676,144.865,5325,R,0,3,3,,,
 110006,202002,200,42,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,,,
-110006,202003,200,42,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4,,,
-110007,202001,200,19,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3,,,
+110006,202003,200,42,0.952585628,,98.26519337,0.862914677,,1.259780318,1,182.2366412,1.106182973,,140.2509173,6685,R,4,0,4,,,
+110007,202001,200,19,,2.994350985,107.48,,5.441584158,1,2.290844366,182.25,,2.642597676,144.865,5496,R,0,3,3,,,
 110007,202002,200,19,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,,,
-110007,202003,200,19,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4,,,
-110008,202001,200,43,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3,,,
+110007,202003,200,19,0.952585628,,98.26519337,1.222772277,,1.259780318,1,182.2366412,1.106182973,,140.2509173,1235,R,4,0,4,,,
+110008,202001,200,43,,2.994350985,107.48,,,1,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,0,3,3,,,
 110008,202002,200,43,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,,
-110008,202003,200,43,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4,,,
-110009,202001,100,85,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,150000,R,,4,4,,,TRUE
+110008,202003,200,43,0.952585628,,98.26519337,1.53667263,,1.259780318,1,182.2366412,1.106182973,,140.2509173,6013,R,4,0,4,,,
+110009,202001,100,85,,,,,,1,2.656680299,101.7103175,,2.09204015,76.03985875,150000,R,0,4,4,,,TRUE
 110009,202002,100,85,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,,,TRUE
-110009,202003,100,85,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,120000,R,3,,3,,,TRUE
-110010,202001,100,71,,,,,,,2.656680299,101.7103175,,2.09204015,76.03985875,5398.829971,C,,4,4,,,
+110009,202003,100,85,,,,,,0.968230653,1,70.26136364,1.040615327,,79.81873182,120000,R,3,0,3,,,TRUE
+110010,202001,100,71,,,,,,1,2.656680299,101.7103175,,2.09204015,76.03985875,5398.829971,C,0,4,4,,,
 110010,202002,100,71,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,
-110010,202003,100,71,,,,,,0.968230653,,70.26136364,1.040615327,,79.81873182,4888.735268,FIC,3,,3,,,
-110011,202001,200,85,,,,,,,2.290844366,182.25,,2.642597676,144.865,150000,R,,3,3,,,TRUE
+110010,202003,100,71,,,,,,0.968230653,1,70.26136364,1.040615327,,79.81873182,4888.735268,FIC,3,0,3,,,
+110011,202001,200,85,,,,,,1,2.290844366,182.25,,2.642597676,144.865,150000,R,0,3,3,,,TRUE
 110011,202002,200,85,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,,,TRUE
-110011,202003,200,85,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,120000,R,4,,4,,,TRUE
-110012,202001,200,71,,,,,,,2.290844366,182.25,,2.642597676,144.865,10285.415,C,,3,3,,,
+110011,202003,200,85,,,,,,1.259780318,1,182.2366412,1.106182973,,140.2509173,120000,R,4,0,4,,,TRUE
+110012,202001,200,71,,,,,,1,2.290844366,182.25,,2.642597676,144.865,10285.415,C,0,3,3,,,
 110012,202002,200,71,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,
-110012,202003,200,71,,,,,,1.259780318,,182.2366412,1.106182973,,140.2509173,13496.15416,FIC,4,,4,,,
+110012,202003,200,71,,,,,,1.259780318,1,182.2366412,1.106182973,,140.2509173,13496.15416,FIC,4,0,4,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
index 0d99640a..01d139cf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
@@ -1,22 +1,22 @@
 identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,89,,2.09204015,76.03985875,,1.036787797,,2.656680299,101.7103175,,2.374360225,88.87508813,9244,R,,4,4
+110001,202001,100,89,,2.09204015,76.03985875,,1.036787797,1,2.656680299,101.7103175,,2.374360225,88.87508813,9244,R,0,4,4
 110001,202002,100,89,0.8701751,1.505585865,98.16768334,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4
-110001,202003,100,89,1.040615327,,79.81873182,0.694706146,,0.968230653,,70.26136364,1.00442299,,75.04004773,6194,R,3,,3
-110002,202001,100,83,,2.09204015,76.03985875,,0.817550398,,2.656680299,101.7103175,,2.374360225,88.87508813,4826,R,,4,4
+110001,202003,100,89,1.040615327,,79.81873182,0.694706146,,0.968230653,1,70.26136364,1.00442299,,75.04004773,6194,R,3,0,3
+110002,202001,100,83,,2.09204015,76.03985875,,0.817550398,1,2.656680299,101.7103175,,2.374360225,88.87508813,4826,R,0,4,4
 110002,202002,100,83,0.8701751,1.505585865,98.16768334,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4
-110002,202003,100,83,1.040615327,,79.81873182,0.803489751,,0.968230653,,70.26136364,1.00442299,,75.04004773,4743,R,3,,3
-110003,202001,100,4,,2.09204015,76.03985875,,7.466535433,,2.656680299,101.7103175,,2.374360225,88.87508813,7586,R,,4,4
+110002,202003,100,83,1.040615327,,79.81873182,0.803489751,,0.968230653,1,70.26136364,1.00442299,,75.04004773,4743,R,3,0,3
+110003,202001,100,4,,2.09204015,76.03985875,,7.466535433,1,2.656680299,101.7103175,,2.374360225,88.87508813,7586,R,0,4,4
 110003,202002,100,4,0.8701751,1.505585865,98.16768334,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4
-110003,202003,100,4,1.040615327,,79.81873182,1.406496063,,0.968230653,,70.26136364,1.00442299,,75.04004773,1429,R,3,,3
-110004,202001,100,76,,2.09204015,76.03985875,,1.305847569,,2.656680299,101.7103175,,2.374360225,88.87508813,3975,R,,4,4
+110003,202003,100,4,1.040615327,,79.81873182,1.406496063,,0.968230653,1,70.26136364,1.00442299,,75.04004773,1429,R,3,0,3
+110004,202001,100,76,,2.09204015,76.03985875,,1.305847569,1,2.656680299,101.7103175,,2.374360225,88.87508813,3975,R,0,4,4
 110004,202002,100,76,0.8701751,1.505585865,98.16768334,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4
-110004,202003,100,76,1.040615327,,79.81873182,,,0.968230653,,70.26136364,1.00442299,,75.04004773,3057.463582,FIR,3,,3
-110005,202001,200,27,,2.642597676,144.865,,,,1,1,,1.821298838,72.9325,9940,BI,,0,0
+110004,202003,100,76,1.040615327,,79.81873182,,,0.968230653,1,70.26136364,1.00442299,,75.04004773,3057.463582,FIR,3,0,3
+110005,202001,200,27,,2.642597676,144.865,,,1,1,1,,1.821298838,72.9325,9940,BI,0,0,0
 110005,202002,200,27,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0
-110005,202003,200,27,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,9940,R,0,,1
-110006,202001,200,42,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,5325,R,,0,1
+110005,202003,200,27,1.106182973,,140.2509173,,,1,1,368.1481481,1.053091487,,254.1995327,9940,R,0,0,1
+110006,202001,200,42,,2.642597676,144.865,,,1,1,126.7857143,,1.821298838,135.8253572,5325,R,0,0,1
 110006,202002,200,42,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0
-110006,202003,200,42,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,5325,FIR,0,,1
-110007,202001,200,19,,2.642597676,144.865,,,,1,126.7857143,,1.821298838,135.8253572,2580.681786,C,,0,1
+110006,202003,200,42,1.106182973,,140.2509173,,,1,1,368.1481481,1.053091487,,254.1995327,5325,FIR,0,0,1
+110007,202001,200,19,,2.642597676,144.865,,,1,1,126.7857143,,1.821298838,135.8253572,2580.681786,C,0,0,1
 110007,202002,200,19,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0
-110007,202003,200,19,1.106182973,,140.2509173,,,1,,368.1481481,1.053091487,,254.1995327,2970.72366,FIC,0,,1
+110007,202003,200,19,1.106182973,,140.2509173,,,1,1,368.1481481,1.053091487,,254.1995327,2970.72366,FIC,0,0,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 952e6074..026a6f8d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,73 +1,73 @@
 identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-80001,202001,100,89,,2.642597676,144.865,,1.036787797,,2.076255394,107.1910333,,2.359426535,126.0280167,9244,R,,10,12,,,
+80001,202001,100,89,,2.642597676,144.865,,1.036787797,1,2.076255394,107.1910333,,2.359426535,126.0280167,9244,R,0,10,12,,,
 80001,202002,100,89,1.186209073,0.751963069,102.4888332,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,
-80001,202003,100,89,1.106182973,,140.2509173,0.694706146,,0.918490819,,69.22002885,1.012336896,,104.7354731,6194,R,9,,11,,,
-80002,202001,100,83,,2.642597676,144.865,,0.817550398,,2.076255394,107.1910333,,2.359426535,126.0280167,4826,R,,10,12,,,
+80001,202003,100,89,1.106182973,,140.2509173,0.694706146,,0.918490819,1,69.22002885,1.012336896,,104.7354731,6194,R,9,0,11,,,
+80002,202001,100,83,,2.642597676,144.865,,0.817550398,1,2.076255394,107.1910333,,2.359426535,126.0280167,4826,R,0,10,12,,,
 80002,202002,100,83,1.186209073,0.751963069,102.4888332,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,,,
-80002,202003,100,83,1.106182973,,140.2509173,0.803489751,,0.918490819,,69.22002885,1.012336896,,104.7354731,4743,R,9,,11,,,
-80003,202001,100,4,,2.642597676,144.865,,7.466535433,,2.076255394,107.1910333,,2.359426535,126.0280167,7586,R,,10,12,,,
+80002,202003,100,83,1.106182973,,140.2509173,0.803489751,,0.918490819,1,69.22002885,1.012336896,,104.7354731,4743,R,9,0,11,,,
+80003,202001,100,4,,2.642597676,144.865,,7.466535433,1,2.076255394,107.1910333,,2.359426535,126.0280167,7586,R,0,10,12,,,
 80003,202002,100,4,1.186209073,0.751963069,102.4888332,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,,,
-80003,202003,100,4,1.106182973,,140.2509173,1.406496063,,0.918490819,,69.22002885,1.012336896,,104.7354731,1429,R,9,,11,,,
-80004,202001,100,76,,2.642597676,144.865,,1.305847569,,2.076255394,107.1910333,,2.359426535,126.0280167,3975,R,,10,12,,,
+80003,202003,100,4,1.106182973,,140.2509173,1.406496063,,0.918490819,1,69.22002885,1.012336896,,104.7354731,1429,R,9,0,11,,,
+80004,202001,100,76,,2.642597676,144.865,,1.305847569,1,2.076255394,107.1910333,,2.359426535,126.0280167,3975,R,0,10,12,,,
 80004,202002,100,76,1.186209073,0.751963069,102.4888332,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,,,
-80004,202003,100,76,1.106182973,,140.2509173,1.206636005,,0.918490819,,69.22002885,1.012336896,,104.7354731,3673,R,9,,11,,,
-80005,202001,100,18,,2.642597676,144.865,,0.622072678,,2.076255394,107.1910333,,2.359426535,126.0280167,1941,R,,10,12,,TRUE,
+80004,202003,100,76,1.106182973,,140.2509173,1.206636005,,0.918490819,1,69.22002885,1.012336896,,104.7354731,3673,R,9,0,11,,,
+80005,202001,100,18,,2.642597676,144.865,,0.622072678,1,2.076255394,107.1910333,,2.359426535,126.0280167,1941,R,0,10,12,,TRUE,
 80005,202002,100,18,1.186209073,0.751963069,102.4888332,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,TRUE,TRUE,
-80005,202003,100,18,1.106182973,,140.2509173,0.387050567,,0.918490819,,69.22002885,1.012336896,,104.7354731,1208,R,9,,11,,,
-80006,202001,100,94,,2.642597676,144.865,,0.763047038,,2.076255394,107.1910333,,2.359426535,126.0280167,5405,R,,10,12,,,
+80005,202003,100,18,1.106182973,,140.2509173,0.387050567,,0.918490819,1,69.22002885,1.012336896,,104.7354731,1208,R,9,0,11,,,
+80006,202001,100,94,,2.642597676,144.865,,0.763047038,1,2.076255394,107.1910333,,2.359426535,126.0280167,5405,R,0,10,12,,,
 80006,202002,100,94,1.186209073,0.751963069,102.4888332,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,,,
-80006,202003,100,94,1.106182973,,140.2509173,0.703053532,,0.918490819,,69.22002885,1.012336896,,104.7354731,4980,R,9,,11,,,
-80007,202001,100,8,,2.642597676,144.865,,5.333239595,,2.076255394,107.1910333,,2.359426535,126.0280167,15172,R,,10,12,,,
+80006,202003,100,94,1.106182973,,140.2509173,0.703053532,,0.918490819,1,69.22002885,1.012336896,,104.7354731,4980,R,9,0,11,,,
+80007,202001,100,8,,2.642597676,144.865,,5.333239595,1,2.076255394,107.1910333,,2.359426535,126.0280167,15172,R,0,10,12,,,
 80007,202002,100,8,1.186209073,0.751963069,102.4888332,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,,,
-80007,202003,100,8,1.106182973,,140.2509173,1.230684055,,0.918490819,,69.22002885,1.012336896,,104.7354731,3501,R,9,,11,,,
-80008,202001,100,304,,2.642597676,144.865,,1.129530598,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
+80007,202003,100,8,1.106182973,,140.2509173,1.230684055,,0.918490819,1,69.22002885,1.012336896,,104.7354731,3501,R,9,0,11,,,
+80008,202001,100,304,,2.642597676,144.865,,1.129530598,1,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,0,10,12,,,
 80008,202002,100,304,1.186209073,0.751963069,102.4888332,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,,,
-80008,202003,100,304,1.106182973,,140.2509173,0.990729498,,0.918490819,,69.22002885,1.012336896,,104.7354731,14295,R,9,,11,,,
-80009,202001,100,45,,2.642597676,144.865,,0.740562712,,2.076255394,107.1910333,,2.359426535,126.0280167,3698,R,,10,12,,,
+80008,202003,100,304,1.106182973,,140.2509173,0.990729498,,0.918490819,1,69.22002885,1.012336896,,104.7354731,14295,R,9,0,11,,,
+80009,202001,100,45,,2.642597676,144.865,,0.740562712,1,2.076255394,107.1910333,,2.359426535,126.0280167,3698,R,0,10,12,,,
 80009,202002,100,45,1.186209073,0.751963069,102.4888332,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,,,
-80009,202003,100,45,1.106182973,,140.2509173,0.843571749,,0.918490819,,69.22002885,1.012336896,,104.7354731,4212,R,9,,11,,,
-80010,202001,100,100,,2.642597676,144.865,,0.760511998,,2.076255394,107.1910333,,2.359426535,126.0280167,7722,R,,10,12,,,
+80009,202003,100,45,1.106182973,,140.2509173,0.843571749,,0.918490819,1,69.22002885,1.012336896,,104.7354731,4212,R,9,0,11,,,
+80010,202001,100,100,,2.642597676,144.865,,0.760511998,1,2.076255394,107.1910333,,2.359426535,126.0280167,7722,R,0,10,12,,,
 80010,202002,100,100,1.186209073,0.751963069,102.4888332,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,,,
-80010,202003,100,100,1.106182973,,140.2509173,0.644660382,,0.918490819,,69.22002885,1.012336896,,104.7354731,6545,R,9,,11,TRUE,,
-80011,202001,100,19,,2.642597676,144.865,,8.365866031,,2.076255394,107.1910333,,2.359426535,126.0280167,30344,R,,10,12,,TRUE,
+80010,202003,100,100,1.106182973,,140.2509173,0.644660382,,0.918490819,1,69.22002885,1.012336896,,104.7354731,6545,R,9,0,11,TRUE,,
+80011,202001,100,19,,2.642597676,144.865,,8.365866031,1,2.076255394,107.1910333,,2.359426535,126.0280167,30344,R,0,10,12,,TRUE,
 80011,202002,100,19,1.186209073,0.751963069,102.4888332,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,TRUE,TRUE,
-80011,202003,100,19,1.106182973,,140.2509173,2.00928009,,0.918490819,,69.22002885,1.012336896,,104.7354731,7288,R,9,,11,TRUE,,
-80012,202001,100,304,,2.642597676,144.865,,1.408940798,,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,,10,12,,,
+80011,202003,100,19,1.106182973,,140.2509173,2.00928009,,0.918490819,1,69.22002885,1.012336896,,104.7354731,7288,R,9,0,11,TRUE,,
+80012,202001,100,304,,2.642597676,144.865,,1.408940798,1,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,0,10,12,,,
 80012,202002,100,304,1.186209073,0.751963069,102.4888332,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,,,
-80012,202003,100,304,1.106182973,,140.2509173,,,0.918490819,,69.22002885,1.012336896,,104.7354731,11709.70088,FIR,9,,11,,,
-80013,202001,200,54,,2.09204015,76.03985875,,1.106799294,,1.313944665,186.8459267,,1.702992408,131.4428927,20190,R,,9,11,,,
+80012,202003,100,304,1.106182973,,140.2509173,,,0.918490819,1,69.22002885,1.012336896,,104.7354731,11709.70088,FIR,9,0,11,,,
+80013,202001,200,54,,2.09204015,76.03985875,,1.106799294,1,1.313944665,186.8459267,,1.702992408,131.4428927,20190,R,0,9,11,,,
 80013,202002,200,54,0.8701751,1.505585865,98.16768334,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,,,
-80013,202003,200,54,1.040615327,,79.81873182,1.58023419,,1.246527322,,255.2315185,1.143571325,,167.5251252,28826,R,10,,12,,,
-80014,202001,200,47,,2.09204015,76.03985875,,0.845985046,,1.313944665,186.8459267,,1.702992408,131.4428927,4260,R,,9,11,,,
+80013,202003,200,54,1.040615327,,79.81873182,1.58023419,,1.246527322,1,255.2315185,1.143571325,,167.5251252,28826,R,10,0,12,,,
+80014,202001,200,47,,2.09204015,76.03985875,,0.845985046,1,1.313944665,186.8459267,,1.702992408,131.4428927,4260,R,0,9,11,,,
 80014,202002,200,42,0.8701751,1.505585865,98.16768334,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,,,
-80014,202003,200,42,1.040615327,,79.81873182,1.28773421,,1.246527322,,255.2315185,1.143571325,,167.5251252,6484,R,10,,12,,,
-80015,202001,200,57,,2.09204015,76.03985875,,3.886845827,,1.313944665,186.8459267,,1.702992408,131.4428927,19236,R,,9,11,,TRUE,
+80014,202003,200,42,1.040615327,,79.81873182,1.28773421,,1.246527322,1,255.2315185,1.143571325,,167.5251252,6484,R,10,0,12,,,
+80015,202001,200,57,,2.09204015,76.03985875,,3.886845827,1,1.313944665,186.8459267,,1.702992408,131.4428927,19236,R,0,9,11,,TRUE,
 80015,202002,200,57,0.8701751,1.505585865,98.16768334,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,TRUE,,
-80015,202003,200,57,1.040615327,,79.81873182,0.716195191,,1.246527322,,255.2315185,1.143571325,,167.5251252,3544,R,10,,12,,,
-80016,202001,200,163,,2.09204015,76.03985875,,0.906730921,,1.313944665,186.8459267,,1.702992408,131.4428927,14902,R,,9,11,,,
+80015,202003,200,57,1.040615327,,79.81873182,0.716195191,,1.246527322,1,255.2315185,1.143571325,,167.5251252,3544,R,10,0,12,,,
+80016,202001,200,163,,2.09204015,76.03985875,,0.906730921,1,1.313944665,186.8459267,,1.702992408,131.4428927,14902,R,0,9,11,,,
 80016,202002,200,163,0.8701751,1.505585865,98.16768334,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,,,
-80016,202003,200,163,1.040615327,,79.81873182,1.500085186,,1.246527322,,255.2315185,1.143571325,,167.5251252,24653,R,10,,12,,,
-80017,202001,200,149,,2.09204015,76.03985875,,0.702275751,,1.313944665,186.8459267,,1.702992408,131.4428927,35476,R,,9,11,,,
+80016,202003,200,163,1.040615327,,79.81873182,1.500085186,,1.246527322,1,255.2315185,1.143571325,,167.5251252,24653,R,10,0,12,,,
+80017,202001,200,149,,2.09204015,76.03985875,,0.702275751,1,1.313944665,186.8459267,,1.702992408,131.4428927,35476,R,0,9,11,,,
 80017,202002,200,149,0.8701751,1.505585865,98.16768334,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,,,
-80017,202003,200,149,1.040615327,,79.81873182,1.058635817,,1.246527322,,255.2315185,1.143571325,,167.5251252,53477,R,10,,12,,,
-80018,202001,200,126,,2.09204015,76.03985875,,0.543204684,,1.313944665,186.8459267,,1.702992408,131.4428927,13845,R,,9,11,,,
+80017,202003,200,149,1.040615327,,79.81873182,1.058635817,,1.246527322,1,255.2315185,1.143571325,,167.5251252,53477,R,10,0,12,,,
+80018,202001,200,126,,2.09204015,76.03985875,,0.543204684,1,1.313944665,186.8459267,,1.702992408,131.4428927,13845,R,0,9,11,,,
 80018,202002,200,126,0.8701751,1.505585865,98.16768334,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,,,
-80018,202003,200,126,1.040615327,,79.81873182,1.075364795,,1.246527322,,255.2315185,1.143571325,,167.5251252,27409,R,10,,12,,,
-80019,202001,200,6,,2.09204015,76.03985875,,2.530969376,,1.313944665,186.8459267,,1.702992408,131.4428927,1099,R,,9,11,,,
+80018,202003,200,126,1.040615327,,79.81873182,1.075364795,,1.246527322,1,255.2315185,1.143571325,,167.5251252,27409,R,10,0,12,,,
+80019,202001,200,6,,2.09204015,76.03985875,,2.530969376,1,1.313944665,186.8459267,,1.702992408,131.4428927,1099,R,0,9,11,,,
 80019,202002,200,6,0.8701751,1.505585865,98.16768334,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,,TRUE,
-80019,202003,200,6,1.040615327,,79.81873182,0.284365646,,1.246527322,,255.2315185,1.143571325,,167.5251252,124,R,10,,12,TRUE,,
-80020,202001,200,22,,2.09204015,76.03985875,,1.677715809,,1.313944665,186.8459267,,1.702992408,131.4428927,3348,R,,9,11,,,
+80019,202003,200,6,1.040615327,,79.81873182,0.284365646,,1.246527322,1,255.2315185,1.143571325,,167.5251252,124,R,10,0,12,TRUE,,
+80020,202001,200,22,,2.09204015,76.03985875,,1.677715809,1,1.313944665,186.8459267,,1.702992408,131.4428927,3348,R,0,9,11,,,
 80020,202002,200,22,0.8701751,1.505585865,98.16768334,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,,TRUE,
-80020,202003,200,22,1.040615327,,79.81873182,2.530990214,,1.246527322,,255.2315185,1.143571325,,167.5251252,5051,R,10,,12,TRUE,,
-80021,202001,200,108,,2.09204015,76.03985875,,0.855047659,,1.313944665,186.8459267,,1.702992408,131.4428927,29215,R,,9,11,,,
+80020,202003,200,22,1.040615327,,79.81873182,2.530990214,,1.246527322,1,255.2315185,1.143571325,,167.5251252,5051,R,10,0,12,TRUE,,
+80021,202001,200,108,,2.09204015,76.03985875,,0.855047659,1,1.313944665,186.8459267,,1.702992408,131.4428927,29215,R,0,9,11,,,
 80021,202002,200,108,0.8701751,1.505585865,98.16768334,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,,,
-80021,202003,200,108,1.040615327,,79.81873182,1.803680177,,1.246527322,,255.2315185,1.143571325,,167.5251252,61628,R,10,,12,,,
-80022,202001,200,67,,2.09204015,76.03985875,,0.502948427,,1.313944665,186.8459267,,1.702992408,131.4428927,6390,R,,9,11,,TRUE,
+80021,202003,200,108,1.040615327,,79.81873182,1.803680177,,1.246527322,1,255.2315185,1.143571325,,167.5251252,61628,R,10,0,12,,,
+80022,202001,200,67,,2.09204015,76.03985875,,0.502948427,1,1.313944665,186.8459267,,1.702992408,131.4428927,6390,R,0,9,11,,TRUE,
 80022,202002,200,67,0.8701751,1.505585865,98.16768334,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,,TRUE,
-80022,202003,200,67,1.040615327,,79.81873182,0.9418398,,1.246527322,,255.2315185,1.143571325,,167.5251252,11966,R,10,,12,,,
-80023,202001,200,18,,2.09204015,76.03985875,,2.656773442,,1.313944665,186.8459267,,1.702992408,131.4428927,4562,R,,9,11,,,
+80022,202003,200,67,1.040615327,,79.81873182,0.9418398,,1.246527322,1,255.2315185,1.143571325,,167.5251252,11966,R,10,0,12,,,
+80023,202001,200,18,,2.09204015,76.03985875,,2.656773442,1,1.313944665,186.8459267,,1.702992408,131.4428927,4562,R,0,9,11,,,
 80023,202002,200,18,0.8701751,1.505585865,98.16768334,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,,,
-80023,202003,200,18,1.040615327,,79.81873182,1.381013395,,1.246527322,,255.2315185,1.143571325,,167.5251252,2371,R,10,,12,,,
-80024,202001,200,155,,2.09204015,76.03985875,,,,1.313944665,186.8459267,,1.702992408,131.4428927,31985.6034,BI,,9,11,,,
+80023,202003,200,18,1.040615327,,79.81873182,1.381013395,,1.246527322,1,255.2315185,1.143571325,,167.5251252,2371,R,10,0,12,,,
+80024,202001,200,155,,2.09204015,76.03985875,,,1,1.313944665,186.8459267,,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,
 80024,202002,200,155,0.8701751,1.505585865,98.16768334,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,,
-80024,202003,200,155,1.040615327,,79.81873182,1.120490459,,1.246527322,,255.2315185,1.143571325,,167.5251252,21046,R,10,,12,,,
+80024,202003,200,155,1.040615327,,79.81873182,1.120490459,,1.246527322,1,255.2315185,1.143571325,,167.5251252,21046,R,10,0,12,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index 6fbae21c..bb9950dc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,2.09204015,76.03985875,,1.129481006,,1.772802559,142.3186593,,1.932421355,109.179259,8444,R,,9,11,,
+30001,202001,100,51,,2.09204015,76.03985875,,1.129481006,1,1.772802559,142.3186593,,1.932421355,109.179259,8444,R,0,9,11,,
 30001,202002,100,51,0.8701751,1.505585865,123.1676833,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,,
-30001,202003,100,51,2.040615327,,84.81873182,0.267924024,,1.172391173,,76.13443331,1.60650325,,80.47658257,2003,R,9,,11,,
-30002,202001,100,72,,2.09204015,76.03985875,,1.195062676,,1.772802559,142.3186593,,1.932421355,109.179259,9343,R,,9,11,,
+30001,202003,100,51,2.040615327,,84.81873182,0.267924024,,1.172391173,1,76.13443331,1.60650325,,80.47658257,2003,R,9,0,11,,
+30002,202001,100,72,,2.09204015,76.03985875,,1.195062676,1,1.772802559,142.3186593,,1.932421355,109.179259,9343,R,0,9,11,,
 30002,202002,100,72,0.8701751,1.505585865,123.1676833,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,,
-30002,202003,100,72,2.040615327,,84.81873182,0.626375032,,1.172391173,,76.13443331,1.60650325,,80.47658257,4897,R,9,,11,,
-30003,202001,100,7,,2.09204015,76.03985875,,4.265190233,,1.772802559,142.3186593,,1.932421355,109.179259,7511,R,,9,11,,
+30002,202003,100,72,2.040615327,,84.81873182,0.626375032,,1.172391173,1,76.13443331,1.60650325,,80.47658257,4897,R,9,0,11,,
+30003,202001,100,7,,2.09204015,76.03985875,,4.265190233,1,1.772802559,142.3186593,,1.932421355,109.179259,7511,R,0,9,11,,
 30003,202002,100,7,0.8701751,1.505585865,123.1676833,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,,
-30003,202003,100,7,2.040615327,,84.81873182,3.686541738,,1.172391173,,76.13443331,1.60650325,,80.47658257,6492,R,9,,11,,
-30004,202001,100,81,,2.09204015,76.03985875,,0.030288689,,1.772802559,142.3186593,,1.932421355,109.179259,64,R,,9,11,,
+30003,202003,100,7,2.040615327,,84.81873182,3.686541738,,1.172391173,1,76.13443331,1.60650325,,80.47658257,6492,R,9,0,11,,
+30004,202001,100,81,,2.09204015,76.03985875,,0.030288689,1,1.772802559,142.3186593,,1.932421355,109.179259,64,R,0,9,11,,
 30004,202002,100,81,0.8701751,1.505585865,123.1676833,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,,
-30004,202003,100,81,2.040615327,,84.81873182,0.087553242,,1.172391173,,76.13443331,1.60650325,,80.47658257,185,R,9,,11,,
-30005,202001,100,5,,2.09204015,76.03985875,,0.941234172,,1.772802559,142.3186593,,1.932421355,109.179259,844,R,,9,11,,
+30004,202003,100,81,2.040615327,,84.81873182,0.087553242,,1.172391173,1,76.13443331,1.60650325,,80.47658257,185,R,9,0,11,,
+30005,202001,100,5,,2.09204015,76.03985875,,0.941234172,1,1.772802559,142.3186593,,1.932421355,109.179259,844,R,0,9,11,,
 30005,202002,100,5,0.8701751,1.505585865,123.1676833,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,,
-30005,202003,100,5,2.040615327,,84.81873182,0.312578027,,1.172391173,,76.13443331,1.60650325,,80.47658257,280,R,9,,11,,
-30006,202001,100,14,,2.09204015,76.03985875,,0.995885563,,1.772802559,142.3186593,,1.932421355,109.179259,1869,R,,9,11,,
+30005,202003,100,5,2.040615327,,84.81873182,0.312578027,,1.172391173,1,76.13443331,1.60650325,,80.47658257,280,R,9,0,11,,
+30006,202001,100,14,,2.09204015,76.03985875,,0.995885563,1,1.772802559,142.3186593,,1.932421355,109.179259,1869,R,0,9,11,,
 30006,202002,100,14,0.8701751,1.505585865,123.1676833,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,,
-30006,202003,100,14,2.040615327,,84.81873182,0.730770871,,1.172391173,,76.13443331,1.60650325,,80.47658257,1371,R,9,,11,,
-30007,202001,100,12,,2.09204015,76.03985875,,4.475816911,,1.772802559,142.3186593,,1.932421355,109.179259,12769,R,,9,11,,
+30006,202003,100,14,2.040615327,,84.81873182,0.730770871,,1.172391173,1,76.13443331,1.60650325,,80.47658257,1371,R,9,0,11,,
+30007,202001,100,12,,2.09204015,76.03985875,,4.475816911,1,1.772802559,142.3186593,,1.932421355,109.179259,12769,R,0,9,11,,
 30007,202002,100,12,0.8701751,1.505585865,123.1676833,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,,
-30007,202003,100,12,2.040615327,,84.81873182,4.027888195,,1.172391173,,76.13443331,1.60650325,,80.47658257,11491,R,9,,11,,
-30008,202001,100,162,,2.09204015,76.03985875,,0.023463069,,1.772802559,142.3186593,,1.932421355,109.179259,141,R,,9,11,,TRUE
+30007,202003,100,12,2.040615327,,84.81873182,4.027888195,,1.172391173,1,76.13443331,1.60650325,,80.47658257,11491,R,9,0,11,,
+30008,202001,100,162,,2.09204015,76.03985875,,0.023463069,1,1.772802559,142.3186593,,1.932421355,109.179259,141,R,0,9,11,,TRUE
 30008,202002,100,162,0.8701751,1.505585865,123.1676833,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,162,2.040615327,,84.81873182,0.072138939,,1.172391173,,76.13443331,1.60650325,,80.47658257,433,R,9,,11,TRUE,
-30009,202001,100,26,,2.09204015,76.03985875,,1.589639934,,1.772802559,142.3186593,,1.932421355,109.179259,6417,R,,9,11,,
+30008,202003,100,162,2.040615327,,84.81873182,0.072138939,,1.172391173,1,76.13443331,1.60650325,,80.47658257,433,R,9,0,11,TRUE,
+30009,202001,100,26,,2.09204015,76.03985875,,1.589639934,1,1.772802559,142.3186593,,1.932421355,109.179259,6417,R,0,9,11,,
 30009,202002,100,26,0.8701751,1.505585865,123.1676833,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,,
-30009,202003,100,26,2.040615327,,84.81873182,0.327462695,,1.172391173,,76.13443331,1.60650325,,80.47658257,1322,R,9,,11,,
-30010,202001,100,144,,2.09204015,76.03985875,,1.332623847,,1.772802559,142.3186593,,1.932421355,109.179259,28963,R,,9,11,,
+30009,202003,100,26,2.040615327,,84.81873182,0.327462695,,1.172391173,1,76.13443331,1.60650325,,80.47658257,1322,R,9,0,11,,
+30010,202001,100,144,,2.09204015,76.03985875,,1.332623847,1,1.772802559,142.3186593,,1.932421355,109.179259,28963,R,0,9,11,,
 30010,202002,100,144,0.8701751,1.505585865,123.1676833,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,,
-30010,202003,100,144,2.040615327,,84.81873182,0.484426733,,1.172391173,,76.13443331,1.60650325,,80.47658257,10529,R,9,,11,,
-30011,202001,100,5,,2.09204015,76.03985875,,5.249464902,,1.772802559,142.3186593,,1.932421355,109.179259,6009,R,,9,11,,TRUE
+30010,202003,100,144,2.040615327,,84.81873182,0.484426733,,1.172391173,1,76.13443331,1.60650325,,80.47658257,10529,R,9,0,11,,
+30011,202001,100,5,,2.09204015,76.03985875,,5.249464902,1,1.772802559,142.3186593,,1.932421355,109.179259,6009,R,0,9,11,,TRUE
 30011,202002,100,5,0.8701751,1.505585865,123.1676833,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5,2.040615327,,84.81873182,4.423850085,,1.172391173,,76.13443331,1.60650325,,80.47658257,5064,R,9,,11,TRUE,
-30012,202001,100,275,,2.09204015,76.03985875,,,,1.772802559,142.3186593,,1.932421355,109.179259,30024.29623,C,,9,11,,
+30011,202003,100,5,2.040615327,,84.81873182,4.423850085,,1.172391173,1,76.13443331,1.60650325,,80.47658257,5064,R,9,0,11,TRUE,
+30012,202001,100,275,,2.09204015,76.03985875,,,1,1.772802559,142.3186593,,1.932421355,109.179259,30024.29623,C,0,9,11,,
 30012,202002,100,275,0.8701751,1.505585865,123.1676833,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,
-30012,202003,100,275,2.040615327,,84.81873182,,,1.172391173,,76.13443331,1.60650325,,80.47658257,124533.173,FIC,9,,11,,
+30012,202003,100,275,2.040615327,,84.81873182,,,1.172391173,1,76.13443331,1.60650325,,80.47658257,124533.173,FIC,9,0,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index 9684af7f..3c241bf3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,disc_count_fi,disc_count_bi,disc_count_c,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-90001,202001,100,89,,2.09204015,76.03985875,,1.036787797,,1.504436071,128.8429705,,1.798238111,102.4414146,9244,R,,17,19,,3,1,,,
-90001,202002,100,89,0.8701751,1.505585865,123.1676833,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,3,2,0,,,
-90001,202003,100,89,2.040615327,,84.81873182,0.694706146,,1.072463185,,126.2596455,1.556539256,,105.5391887,6194,R,18,,21,2,,0,,,
-90002,202001,100,83,,2.09204015,76.03985875,,0.817550398,,1.504436071,128.8429705,,1.798238111,102.4414146,4826,R,,17,19,,3,1,,,
-90002,202002,100,83,0.8701751,1.505585865,123.1676833,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,3,2,0,,,
-90002,202003,100,83,2.040615327,,84.81873182,0.803489751,,1.072463185,,126.2596455,1.556539256,,105.5391887,4743,R,18,,21,2,,0,,,
-90003,202001,100,4,,2.09204015,76.03985875,,,,1.504436071,128.8429705,,1.798238111,102.4414146,7586,R,,17,19,,3,1,,,TRUE
-90003,202002,100,4,0.8701751,1.505585865,123.1676833,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,3,2,0,,,
-90003,202003,100,4,2.040615327,,84.81873182,1.406496063,,1.072463185,,126.2596455,1.556539256,,105.5391887,1429,R,18,,21,2,,0,,,
-90004,202001,100,76,,2.09204015,76.03985875,,1.305847569,,1.504436071,128.8429705,,1.798238111,102.4414146,3975,R,,17,19,,3,1,,,
-90004,202002,100,76,0.8701751,1.505585865,123.1676833,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,3,2,0,,,
-90004,202003,100,76,2.040615327,,84.81873182,1.206636005,,1.072463185,,126.2596455,1.556539256,,105.5391887,3673,R,18,,21,2,,0,,,
-90005,202001,100,18,,2.09204015,76.03985875,,0.622072678,,1.504436071,128.8429705,,1.798238111,102.4414146,1941,R,,17,19,,3,1,,,
-90005,202002,100,18,0.8701751,1.505585865,123.1676833,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,3,2,0,,,
-90005,202003,100,18,2.040615327,,84.81873182,0.387050567,,1.072463185,,126.2596455,1.556539256,,105.5391887,1208,R,18,,21,2,,0,,,
-90006,202001,100,94,,2.09204015,76.03985875,,0.763047038,,1.504436071,128.8429705,,1.798238111,102.4414146,5405,R,,17,19,,3,1,,,
-90006,202002,100,94,0.8701751,1.505585865,123.1676833,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,3,2,0,,,
-90006,202003,100,94,2.040615327,,84.81873182,0.703053532,,1.072463185,,126.2596455,1.556539256,,105.5391887,4980,R,18,,21,2,,0,,,
-90007,202001,100,8,,2.09204015,76.03985875,,5.333239595,,1.504436071,128.8429705,,1.798238111,102.4414146,15172,R,,17,19,,3,1,,,
-90007,202002,100,8,0.8701751,1.505585865,123.1676833,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,3,2,0,,,
-90007,202003,100,8,2.040615327,,84.81873182,1.230684055,,1.072463185,,126.2596455,1.556539256,,105.5391887,3501,R,18,,21,2,,0,,,
-90008,202001,100,304,,2.09204015,76.03985875,,1.129530598,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
-90008,202002,100,304,0.8701751,1.505585865,123.1676833,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,3,2,0,,,
-90008,202003,100,304,2.040615327,,84.81873182,0.990729498,,1.072463185,,126.2596455,1.556539256,,105.5391887,14295,R,18,,21,2,,0,,,
-90009,202001,100,45,,2.09204015,76.03985875,,0.740562712,,1.504436071,128.8429705,,1.798238111,102.4414146,3698,R,,17,19,,3,1,,,
-90009,202002,100,45,0.8701751,1.505585865,123.1676833,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,3,2,0,,,
-90009,202003,100,45,2.040615327,,84.81873182,0.843571749,,1.072463185,,126.2596455,1.556539256,,105.5391887,4212,R,18,,21,2,,0,,,
-90010,202001,100,100,,2.09204015,76.03985875,,0.760511998,,1.504436071,128.8429705,,1.798238111,102.4414146,7722,R,,17,19,,3,1,,,
-90010,202002,100,100,0.8701751,1.505585865,123.1676833,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,3,2,0,,,
-90010,202003,100,100,2.040615327,,84.81873182,0.644660382,,1.072463185,,126.2596455,1.556539256,,105.5391887,6545,R,18,,21,2,,0,,,
-90011,202001,100,19,,2.09204015,76.03985875,,8.365866031,,1.504436071,128.8429705,,1.798238111,102.4414146,30344,R,,17,19,,3,1,,TRUE,
-90011,202002,100,19,0.8701751,1.505585865,123.1676833,0.119533351,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,3,2,0,TRUE,,
-90011,202003,100,19,2.040615327,,84.81873182,2.00928009,,1.072463185,,126.2596455,1.556539256,,105.5391887,7288,R,18,,21,2,,0,,,
-90012,202001,100,304,,2.09204015,76.03985875,,1.408940798,,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,,17,19,,3,1,,,
-90012,202002,100,304,0.8701751,1.505585865,123.1676833,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,3,2,0,,,
-90012,202003,100,304,2.040615327,,84.81873182,1.165730094,,1.072463185,,126.2596455,1.556539256,,105.5391887,13484,R,18,,21,2,,0,,,
-90013,202001,100,54,,2.09204015,76.03985875,,1.106799294,,1.504436071,128.8429705,,1.798238111,102.4414146,20190,R,,17,19,,3,1,,,
-90013,202002,100,54,0.8701751,1.505585865,123.1676833,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,3,2,0,,,
-90013,202003,100,54,2.040615327,,84.81873182,1.58023419,,1.072463185,,126.2596455,1.556539256,,105.5391887,28826,R,18,,21,2,,0,,,
-90014,202001,100,47,,2.09204015,76.03985875,,0.845985046,,1.504436071,128.8429705,,1.798238111,102.4414146,4260,R,,17,19,,3,1,,,
-90014,202002,100,42,0.8701751,1.505585865,123.1676833,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,3,2,0,,,
-90014,202003,100,42,2.040615327,,84.81873182,1.28773421,,1.072463185,,126.2596455,1.556539256,,105.5391887,6484,R,18,,21,2,,0,,,
-90015,202001,100,57,,2.09204015,76.03985875,,3.886845827,,1.504436071,128.8429705,,1.798238111,102.4414146,19236,R,,17,19,,3,1,,,
-90015,202002,100,57,0.8701751,1.505585865,123.1676833,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,3,2,0,,,
-90015,202003,100,57,2.040615327,,84.81873182,0.716195191,,1.072463185,,126.2596455,1.556539256,,105.5391887,3544,R,18,,21,2,,0,,,
-90016,202001,100,163,,2.09204015,76.03985875,,0.906730921,,1.504436071,128.8429705,,1.798238111,102.4414146,14902,R,,17,19,,3,1,,,
-90016,202002,100,163,0.8701751,1.505585865,123.1676833,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,3,2,0,,,
-90016,202003,100,163,2.040615327,,84.81873182,1.500085186,,1.072463185,,126.2596455,1.556539256,,105.5391887,24653,R,18,,21,2,,0,,,
-90017,202001,100,149,,2.09204015,76.03985875,,0.702275751,,1.504436071,128.8429705,,1.798238111,102.4414146,35476,R,,17,19,,3,1,,,
-90017,202002,100,149,0.8701751,1.505585865,123.1676833,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,3,2,0,,,
-90017,202003,100,149,2.040615327,,84.81873182,1.058635817,,1.072463185,,126.2596455,1.556539256,,105.5391887,53477,R,18,,21,2,,0,,,
-90018,202001,100,126,,2.09204015,76.03985875,,0.543204684,,1.504436071,128.8429705,,1.798238111,102.4414146,13845,R,,17,19,,3,1,,TRUE,
-90018,202002,100,126,0.8701751,1.505585865,123.1676833,1.840926688,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,3,2,0,TRUE,,
-90018,202003,100,126,2.040615327,,84.81873182,1.075364795,,1.072463185,,126.2596455,1.556539256,,105.5391887,27409,R,18,,21,2,,0,,,
-90019,202001,100,6,,2.09204015,76.03985875,,2.530969376,,1.504436071,128.8429705,,1.798238111,102.4414146,1099,R,,17,19,,3,1,,,
-90019,202002,100,6,0.8701751,1.505585865,123.1676833,0.395105531,3.51659919,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,3,2,0,,TRUE,
-90019,202003,100,6,2.040615327,,84.81873182,0.284365646,,1.072463185,,126.2596455,1.556539256,,105.5391887,124,R,18,,21,2,,0,TRUE,,
-90020,202001,100,22,,2.09204015,76.03985875,,1.677715809,,1.504436071,128.8429705,,1.798238111,102.4414146,3348,R,,17,19,,3,1,,,
-90020,202002,100,22,0.8701751,1.505585865,123.1676833,0.596048505,0.395102278,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,3,2,0,,TRUE,
-90020,202003,100,22,2.040615327,,84.81873182,2.530990214,,1.072463185,,126.2596455,1.556539256,,105.5391887,5051,R,18,,21,2,,0,TRUE,,
-90021,202001,100,155,,2.09204015,76.03985875,,,,1.504436071,128.8429705,,1.798238111,102.4414146,48979.92546,BI,,17,19,,3,1,,,
-90021,202002,100,155,0.8701751,1.505585865,123.1676833,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,3,2,0,,,
-90021,202003,100,155,2.040615327,,84.81873182,,,1.072463185,,126.2596455,1.556539256,,105.5391887,21046,R,18,,21,2,,0,,,
+identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
+90001,202001,100,89,,2.09204015,76.03985875,,1.036787797,1,1.504436071,128.8429705,,1.798238111,102.4414146,9244,R,0,17,19,,,
+90001,202002,100,89,0.8701751,1.505585865,123.1676833,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,,,
+90001,202003,100,89,2.040615327,,84.81873182,0.694706146,,1.072463185,1,126.2596455,1.556539256,,105.5391887,6194,R,18,0,21,,,
+90002,202001,100,83,,2.09204015,76.03985875,,0.817550398,1,1.504436071,128.8429705,,1.798238111,102.4414146,4826,R,0,17,19,,,
+90002,202002,100,83,0.8701751,1.505585865,123.1676833,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,,,
+90002,202003,100,83,2.040615327,,84.81873182,0.803489751,,1.072463185,1,126.2596455,1.556539256,,105.5391887,4743,R,18,0,21,,,
+90003,202001,100,4,,2.09204015,76.03985875,,,1,1.504436071,128.8429705,,1.798238111,102.4414146,7586,R,0,17,19,,,TRUE
+90003,202002,100,4,0.8701751,1.505585865,123.1676833,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,,,
+90003,202003,100,4,2.040615327,,84.81873182,1.406496063,,1.072463185,1,126.2596455,1.556539256,,105.5391887,1429,R,18,0,21,,,
+90004,202001,100,76,,2.09204015,76.03985875,,1.305847569,1,1.504436071,128.8429705,,1.798238111,102.4414146,3975,R,0,17,19,,,
+90004,202002,100,76,0.8701751,1.505585865,123.1676833,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,,,
+90004,202003,100,76,2.040615327,,84.81873182,1.206636005,,1.072463185,1,126.2596455,1.556539256,,105.5391887,3673,R,18,0,21,,,
+90005,202001,100,18,,2.09204015,76.03985875,,0.622072678,1,1.504436071,128.8429705,,1.798238111,102.4414146,1941,R,0,17,19,,,
+90005,202002,100,18,0.8701751,1.505585865,123.1676833,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,,,
+90005,202003,100,18,2.040615327,,84.81873182,0.387050567,,1.072463185,1,126.2596455,1.556539256,,105.5391887,1208,R,18,0,21,,,
+90006,202001,100,94,,2.09204015,76.03985875,,0.763047038,1,1.504436071,128.8429705,,1.798238111,102.4414146,5405,R,0,17,19,,,
+90006,202002,100,94,0.8701751,1.505585865,123.1676833,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,,,
+90006,202003,100,94,2.040615327,,84.81873182,0.703053532,,1.072463185,1,126.2596455,1.556539256,,105.5391887,4980,R,18,0,21,,,
+90007,202001,100,8,,2.09204015,76.03985875,,5.333239595,1,1.504436071,128.8429705,,1.798238111,102.4414146,15172,R,0,17,19,,,
+90007,202002,100,8,0.8701751,1.505585865,123.1676833,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,,,
+90007,202003,100,8,2.040615327,,84.81873182,1.230684055,,1.072463185,1,126.2596455,1.556539256,,105.5391887,3501,R,18,0,21,,,
+90008,202001,100,304,,2.09204015,76.03985875,,1.129530598,1,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,0,17,19,,,
+90008,202002,100,304,0.8701751,1.505585865,123.1676833,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,,,
+90008,202003,100,304,2.040615327,,84.81873182,0.990729498,,1.072463185,1,126.2596455,1.556539256,,105.5391887,14295,R,18,0,21,,,
+90009,202001,100,45,,2.09204015,76.03985875,,0.740562712,1,1.504436071,128.8429705,,1.798238111,102.4414146,3698,R,0,17,19,,,
+90009,202002,100,45,0.8701751,1.505585865,123.1676833,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,,,
+90009,202003,100,45,2.040615327,,84.81873182,0.843571749,,1.072463185,1,126.2596455,1.556539256,,105.5391887,4212,R,18,0,21,,,
+90010,202001,100,100,,2.09204015,76.03985875,,0.760511998,1,1.504436071,128.8429705,,1.798238111,102.4414146,7722,R,0,17,19,,,
+90010,202002,100,100,0.8701751,1.505585865,123.1676833,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,,,
+90010,202003,100,100,2.040615327,,84.81873182,0.644660382,,1.072463185,1,126.2596455,1.556539256,,105.5391887,6545,R,18,0,21,,,
+90011,202001,100,19,,2.09204015,76.03985875,,8.365866031,1,1.504436071,128.8429705,,1.798238111,102.4414146,30344,R,0,17,19,,TRUE,
+90011,202002,100,19,0.8701751,1.505585865,123.1676833,0.119533351,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,TRUE,,
+90011,202003,100,19,2.040615327,,84.81873182,2.00928009,,1.072463185,1,126.2596455,1.556539256,,105.5391887,7288,R,18,0,21,,,
+90012,202001,100,304,,2.09204015,76.03985875,,1.408940798,1,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,0,17,19,,,
+90012,202002,100,304,0.8701751,1.505585865,123.1676833,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,,,
+90012,202003,100,304,2.040615327,,84.81873182,1.165730094,,1.072463185,1,126.2596455,1.556539256,,105.5391887,13484,R,18,0,21,,,
+90013,202001,100,54,,2.09204015,76.03985875,,1.106799294,1,1.504436071,128.8429705,,1.798238111,102.4414146,20190,R,0,17,19,,,
+90013,202002,100,54,0.8701751,1.505585865,123.1676833,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,,,
+90013,202003,100,54,2.040615327,,84.81873182,1.58023419,,1.072463185,1,126.2596455,1.556539256,,105.5391887,28826,R,18,0,21,,,
+90014,202001,100,47,,2.09204015,76.03985875,,0.845985046,1,1.504436071,128.8429705,,1.798238111,102.4414146,4260,R,0,17,19,,,
+90014,202002,100,42,0.8701751,1.505585865,123.1676833,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,,,
+90014,202003,100,42,2.040615327,,84.81873182,1.28773421,,1.072463185,1,126.2596455,1.556539256,,105.5391887,6484,R,18,0,21,,,
+90015,202001,100,57,,2.09204015,76.03985875,,3.886845827,1,1.504436071,128.8429705,,1.798238111,102.4414146,19236,R,0,17,19,,,
+90015,202002,100,57,0.8701751,1.505585865,123.1676833,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,,,
+90015,202003,100,57,2.040615327,,84.81873182,0.716195191,,1.072463185,1,126.2596455,1.556539256,,105.5391887,3544,R,18,0,21,,,
+90016,202001,100,163,,2.09204015,76.03985875,,0.906730921,1,1.504436071,128.8429705,,1.798238111,102.4414146,14902,R,0,17,19,,,
+90016,202002,100,163,0.8701751,1.505585865,123.1676833,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,,,
+90016,202003,100,163,2.040615327,,84.81873182,1.500085186,,1.072463185,1,126.2596455,1.556539256,,105.5391887,24653,R,18,0,21,,,
+90017,202001,100,149,,2.09204015,76.03985875,,0.702275751,1,1.504436071,128.8429705,,1.798238111,102.4414146,35476,R,0,17,19,,,
+90017,202002,100,149,0.8701751,1.505585865,123.1676833,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,,,
+90017,202003,100,149,2.040615327,,84.81873182,1.058635817,,1.072463185,1,126.2596455,1.556539256,,105.5391887,53477,R,18,0,21,,,
+90018,202001,100,126,,2.09204015,76.03985875,,0.543204684,1,1.504436071,128.8429705,,1.798238111,102.4414146,13845,R,0,17,19,,TRUE,
+90018,202002,100,126,0.8701751,1.505585865,123.1676833,1.840926688,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,TRUE,,
+90018,202003,100,126,2.040615327,,84.81873182,1.075364795,,1.072463185,1,126.2596455,1.556539256,,105.5391887,27409,R,18,0,21,,,
+90019,202001,100,6,,2.09204015,76.03985875,,2.530969376,1,1.504436071,128.8429705,,1.798238111,102.4414146,1099,R,0,17,19,,,
+90019,202002,100,6,0.8701751,1.505585865,123.1676833,0.395105531,3.51659919,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,,TRUE,
+90019,202003,100,6,2.040615327,,84.81873182,0.284365646,,1.072463185,1,126.2596455,1.556539256,,105.5391887,124,R,18,0,21,TRUE,,
+90020,202001,100,22,,2.09204015,76.03985875,,1.677715809,1,1.504436071,128.8429705,,1.798238111,102.4414146,3348,R,0,17,19,,,
+90020,202002,100,22,0.8701751,1.505585865,123.1676833,0.596048505,0.395102278,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,,TRUE,
+90020,202003,100,22,2.040615327,,84.81873182,2.530990214,,1.072463185,1,126.2596455,1.556539256,,105.5391887,5051,R,18,0,21,TRUE,,
+90021,202001,100,155,,2.09204015,76.03985875,,,1,1.504436071,128.8429705,,1.798238111,102.4414146,48979.92546,BI,0,17,19,,,
+90021,202002,100,155,0.8701751,1.505585865,123.1676833,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,,,
+90021,202003,100,155,2.040615327,,84.81873182,,,1.072463185,1,126.2596455,1.556539256,,105.5391887,21046,R,18,0,21,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index f8615075..de39d342 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-30001,202001,100,51,,2.656680299,101.7103175,,,,1,61.12436116,,1.82834015,81.41733933,8444,R,,0,9,,,TRUE,
+30001,202001,100,51,,2.656680299,101.7103175,,,1,1,61.12436116,,1.82834015,81.41733933,8444,R,0,0,9,,,TRUE,
 30001,202002,100,51,0.771850199,1.13167173,74.91666667,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,,,TRUE,
-30001,202003,100,51,0.968230653,,70.26136364,,,1,,85.37820513,0.984115327,,77.81978439,2003,R,0,,10,,,TRUE,
-30002,202001,100,72,,2.656680299,101.7103175,,,,1,61.12436116,,1.82834015,81.41733933,9343,R,,0,9,,,TRUE,
+30001,202003,100,51,0.968230653,,70.26136364,,,1,1,85.37820513,0.984115327,,77.81978439,2003,R,0,0,10,,,TRUE,
+30002,202001,100,72,,2.656680299,101.7103175,,,1,1,61.12436116,,1.82834015,81.41733933,9343,R,0,0,9,,,TRUE,
 30002,202002,100,72,0.771850199,1.13167173,74.91666667,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,,,TRUE,
-30002,202003,100,72,0.968230653,,70.26136364,,,1,,85.37820513,0.984115327,,77.81978439,4897,R,0,,10,,,TRUE,
-30003,202001,100,7,,2.656680299,101.7103175,,4.265190233,,1,61.12436116,,1.82834015,81.41733933,7511,R,,0,9,,TRUE,,
+30002,202003,100,72,0.968230653,,70.26136364,,,1,1,85.37820513,0.984115327,,77.81978439,4897,R,0,0,10,,,TRUE,
+30003,202001,100,7,,2.656680299,101.7103175,,4.265190233,1,1,61.12436116,,1.82834015,81.41733933,7511,R,0,0,9,,TRUE,,
 30003,202002,100,7,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,TRUE,TRUE,,
-30003,202003,100,7,0.968230653,,70.26136364,3.686541738,,1,,85.37820513,0.984115327,,77.81978439,6492,R,0,,10,TRUE,,,
-30004,202001,100,81,,2.656680299,101.7103175,,0.030288689,,1,61.12436116,,1.82834015,81.41733933,64,R,,0,9,,TRUE,,
+30003,202003,100,7,0.968230653,,70.26136364,3.686541738,,1,1,85.37820513,0.984115327,,77.81978439,6492,R,0,0,10,TRUE,,,
+30004,202001,100,81,,2.656680299,101.7103175,,0.030288689,1,1,61.12436116,,1.82834015,81.41733933,64,R,0,0,9,,TRUE,,
 30004,202002,100,81,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,TRUE,TRUE,,
-30004,202003,100,81,0.968230653,,70.26136364,0.087553242,,1,,85.37820513,0.984115327,,77.81978439,185,R,0,,10,TRUE,,,
-30005,202001,100,5,,2.656680299,101.7103175,,0.941234172,,1,61.12436116,,1.82834015,81.41733933,844,R,,0,9,,TRUE,,
+30004,202003,100,81,0.968230653,,70.26136364,0.087553242,,1,1,85.37820513,0.984115327,,77.81978439,185,R,0,0,10,TRUE,,,
+30005,202001,100,5,,2.656680299,101.7103175,,0.941234172,1,1,61.12436116,,1.82834015,81.41733933,844,R,0,0,9,,TRUE,,
 30005,202002,100,5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,TRUE,TRUE,,
-30005,202003,100,5,0.968230653,,70.26136364,0.312578027,,1,,85.37820513,0.984115327,,77.81978439,280,R,0,,10,TRUE,,,
-30006,202001,100,14,,2.656680299,101.7103175,,0.995885563,,1,61.12436116,,1.82834015,81.41733933,1869,R,,0,9,,TRUE,,
+30005,202003,100,5,0.968230653,,70.26136364,0.312578027,,1,1,85.37820513,0.984115327,,77.81978439,280,R,0,0,10,TRUE,,,
+30006,202001,100,14,,2.656680299,101.7103175,,0.995885563,1,1,61.12436116,,1.82834015,81.41733933,1869,R,0,0,9,,TRUE,,
 30006,202002,100,14,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,TRUE,TRUE,,
-30006,202003,100,14,0.968230653,,70.26136364,0.730770871,,1,,85.37820513,0.984115327,,77.81978439,1371,R,0,,10,TRUE,,,
-30007,202001,100,12,,2.656680299,101.7103175,,4.475816911,,1,61.12436116,,1.82834015,81.41733933,12769,R,,0,9,,TRUE,,
+30006,202003,100,14,0.968230653,,70.26136364,0.730770871,,1,1,85.37820513,0.984115327,,77.81978439,1371,R,0,0,10,TRUE,,,
+30007,202001,100,12,,2.656680299,101.7103175,,4.475816911,1,1,61.12436116,,1.82834015,81.41733933,12769,R,0,0,9,,TRUE,,
 30007,202002,100,12,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,TRUE,TRUE,,
-30007,202003,100,12,0.968230653,,70.26136364,4.027888195,,1,,85.37820513,0.984115327,,77.81978439,11491,R,0,,10,TRUE,,,
-30008,202001,100,162,,2.656680299,101.7103175,,0.023463069,,1,61.12436116,,1.82834015,81.41733933,141,R,,0,9,,TRUE,,
+30007,202003,100,12,0.968230653,,70.26136364,4.027888195,,1,1,85.37820513,0.984115327,,77.81978439,11491,R,0,0,10,TRUE,,,
+30008,202001,100,162,,2.656680299,101.7103175,,0.023463069,1,1,61.12436116,,1.82834015,81.41733933,141,R,0,0,9,,TRUE,,
 30008,202002,100,162,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,TRUE,TRUE,,
-30008,202003,100,162,0.968230653,,70.26136364,0.072138939,,1,,85.37820513,0.984115327,,77.81978439,433,R,0,,10,TRUE,,,
-30009,202001,100,26,,2.656680299,101.7103175,,1.589639934,,1,61.12436116,,1.82834015,81.41733933,6417,R,,0,9,,TRUE,,
+30008,202003,100,162,0.968230653,,70.26136364,0.072138939,,1,1,85.37820513,0.984115327,,77.81978439,433,R,0,0,10,TRUE,,,
+30009,202001,100,26,,2.656680299,101.7103175,,1.589639934,1,1,61.12436116,,1.82834015,81.41733933,6417,R,0,0,9,,TRUE,,
 30009,202002,100,26,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,TRUE,TRUE,,
-30009,202003,100,26,0.968230653,,70.26136364,0.327462695,,1,,85.37820513,0.984115327,,77.81978439,1322,R,0,,10,TRUE,,,
-30010,202001,100,144,,2.656680299,101.7103175,,,,1,61.12436116,,1.82834015,81.41733933,28963,R,,0,9,,,TRUE,
+30009,202003,100,26,0.968230653,,70.26136364,0.327462695,,1,1,85.37820513,0.984115327,,77.81978439,1322,R,0,0,10,TRUE,,,
+30010,202001,100,144,,2.656680299,101.7103175,,,1,1,61.12436116,,1.82834015,81.41733933,28963,R,0,0,9,,,TRUE,
 30010,202002,100,144,0.771850199,1.13167173,74.91666667,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,,,TRUE,
-30010,202003,100,144,0.968230653,,70.26136364,,,1,,85.37820513,0.984115327,,77.81978439,10529,R,0,,10,,,TRUE,
-30011,202001,100,5,,2.656680299,101.7103175,,5.249464902,,1,61.12436116,,1.82834015,81.41733933,6009,R,,0,9,,TRUE,,
+30010,202003,100,144,0.968230653,,70.26136364,,,1,1,85.37820513,0.984115327,,77.81978439,10529,R,0,0,10,,,TRUE,
+30011,202001,100,5,,2.656680299,101.7103175,,5.249464902,1,1,61.12436116,,1.82834015,81.41733933,6009,R,0,0,9,,TRUE,,
 30011,202002,100,5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,TRUE,TRUE,,
-30011,202003,100,5,0.968230653,,70.26136364,4.423850085,,1,,85.37820513,0.984115327,,77.81978439,5064,R,0,,10,TRUE,,,
-30012,202001,100,275,,2.656680299,101.7103175,,0.034032235,,1,61.12436116,,1.82834015,81.41733933,256,R,,0,9,,TRUE,,
+30011,202003,100,5,0.968230653,,70.26136364,4.423850085,,1,1,85.37820513,0.984115327,,77.81978439,5064,R,0,0,10,TRUE,,,
+30012,202001,100,275,,2.656680299,101.7103175,,0.034032235,1,1,61.12436116,,1.82834015,81.41733933,256,R,0,0,9,,TRUE,,
 30012,202002,100,275,0.771850199,1.13167173,74.91666667,29.38390625,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,TRUE,,,
-30012,202003,100,275,0.968230653,,70.26136364,,,1,,85.37820513,0.984115327,,77.81978439,7402.515486,FIR,0,,10,,,,
+30012,202003,100,275,0.968230653,,70.26136364,,,1,1,85.37820513,0.984115327,,77.81978439,7402.515486,FIR,0,0,10,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index 92c58a9b..dbff450e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-30001,202001,100,0,,2.656680299,101.7103175,,,,1,1,,1.82834015,51.35515875,8444,R,,0,9,TRUE,,,TRUE
+30001,202001,100,0,,2.656680299,101.7103175,,,1,1,1,,1.82834015,51.35515875,8444,R,0,0,9,TRUE,,,TRUE
 30001,202002,100,0,0.771850199,1.13167173,74.91666667,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,TRUE,,,TRUE
-30001,202003,100,0,0.968230653,,70.26136364,,,1,,1,0.984115327,,35.63068182,2003,R,0,,10,TRUE,,,TRUE
-30002,202001,100,0,,2.656680299,101.7103175,,,,1,1,,1.82834015,51.35515875,9343,R,,0,9,TRUE,,,TRUE
+30001,202003,100,0,0.968230653,,70.26136364,,,1,1,1,0.984115327,,35.63068182,2003,R,0,0,10,TRUE,,,TRUE
+30002,202001,100,0,,2.656680299,101.7103175,,,1,1,1,,1.82834015,51.35515875,9343,R,0,0,9,TRUE,,,TRUE
 30002,202002,100,0,0.771850199,1.13167173,74.91666667,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,TRUE,,,TRUE
-30002,202003,100,0,0.968230653,,70.26136364,,,1,,1,0.984115327,,35.63068182,4897,R,0,,10,TRUE,,,TRUE
-30003,202001,100,0,,2.656680299,101.7103175,,4.265190233,,1,1,,1.82834015,51.35515875,7511,R,,0,9,TRUE,,TRUE,
+30002,202003,100,0,0.968230653,,70.26136364,,,1,1,1,0.984115327,,35.63068182,4897,R,0,0,10,TRUE,,,TRUE
+30003,202001,100,0,,2.656680299,101.7103175,,4.265190233,1,1,1,,1.82834015,51.35515875,7511,R,0,0,9,TRUE,,TRUE,
 30003,202002,100,0,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,TRUE,TRUE,TRUE,
-30003,202003,100,0,0.968230653,,70.26136364,3.686541738,,1,,1,0.984115327,,35.63068182,6492,R,0,,10,TRUE,TRUE,,
-30004,202001,100,0,,2.656680299,101.7103175,,0.030288689,,1,1,,1.82834015,51.35515875,64,R,,0,9,TRUE,,TRUE,
+30003,202003,100,0,0.968230653,,70.26136364,3.686541738,,1,1,1,0.984115327,,35.63068182,6492,R,0,0,10,TRUE,TRUE,,
+30004,202001,100,0,,2.656680299,101.7103175,,0.030288689,1,1,1,,1.82834015,51.35515875,64,R,0,0,9,TRUE,,TRUE,
 30004,202002,100,0,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,TRUE,TRUE,TRUE,
-30004,202003,100,0,0.968230653,,70.26136364,0.087553242,,1,,1,0.984115327,,35.63068182,185,R,0,,10,TRUE,TRUE,,
-30005,202001,100,0,,2.656680299,101.7103175,,0.941234172,,1,1,,1.82834015,51.35515875,844,R,,0,9,TRUE,,TRUE,
+30004,202003,100,0,0.968230653,,70.26136364,0.087553242,,1,1,1,0.984115327,,35.63068182,185,R,0,0,10,TRUE,TRUE,,
+30005,202001,100,0,,2.656680299,101.7103175,,0.941234172,1,1,1,,1.82834015,51.35515875,844,R,0,0,9,TRUE,,TRUE,
 30005,202002,100,0,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,TRUE,TRUE,TRUE,
-30005,202003,100,0,0.968230653,,70.26136364,0.312578027,,1,,1,0.984115327,,35.63068182,280,R,0,,10,TRUE,TRUE,,
-30006,202001,100,0,,2.656680299,101.7103175,,0.995885563,,1,1,,1.82834015,51.35515875,1869,R,,0,9,TRUE,,TRUE,
+30005,202003,100,0,0.968230653,,70.26136364,0.312578027,,1,1,1,0.984115327,,35.63068182,280,R,0,0,10,TRUE,TRUE,,
+30006,202001,100,0,,2.656680299,101.7103175,,0.995885563,1,1,1,,1.82834015,51.35515875,1869,R,0,0,9,TRUE,,TRUE,
 30006,202002,100,0,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,TRUE,TRUE,TRUE,
-30006,202003,100,0,0.968230653,,70.26136364,0.730770871,,1,,1,0.984115327,,35.63068182,1371,R,0,,10,TRUE,TRUE,,
-30007,202001,100,0,,2.656680299,101.7103175,,4.475816911,,1,1,,1.82834015,51.35515875,12769,R,,0,9,TRUE,,TRUE,
+30006,202003,100,0,0.968230653,,70.26136364,0.730770871,,1,1,1,0.984115327,,35.63068182,1371,R,0,0,10,TRUE,TRUE,,
+30007,202001,100,0,,2.656680299,101.7103175,,4.475816911,1,1,1,,1.82834015,51.35515875,12769,R,0,0,9,TRUE,,TRUE,
 30007,202002,100,0,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,TRUE,TRUE,TRUE,
-30007,202003,100,0,0.968230653,,70.26136364,4.027888195,,1,,1,0.984115327,,35.63068182,11491,R,0,,10,TRUE,TRUE,,
-30008,202001,100,0,,2.656680299,101.7103175,,0.023463069,,1,1,,1.82834015,51.35515875,141,R,,0,9,TRUE,,TRUE,
+30007,202003,100,0,0.968230653,,70.26136364,4.027888195,,1,1,1,0.984115327,,35.63068182,11491,R,0,0,10,TRUE,TRUE,,
+30008,202001,100,0,,2.656680299,101.7103175,,0.023463069,1,1,1,,1.82834015,51.35515875,141,R,0,0,9,TRUE,,TRUE,
 30008,202002,100,0,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,TRUE,TRUE,TRUE,
-30008,202003,100,0,0.968230653,,70.26136364,0.072138939,,1,,1,0.984115327,,35.63068182,433,R,0,,10,TRUE,TRUE,,
-30009,202001,100,0,,2.656680299,101.7103175,,1.589639934,,1,1,,1.82834015,51.35515875,6417,R,,0,9,TRUE,,TRUE,
+30008,202003,100,0,0.968230653,,70.26136364,0.072138939,,1,1,1,0.984115327,,35.63068182,433,R,0,0,10,TRUE,TRUE,,
+30009,202001,100,0,,2.656680299,101.7103175,,1.589639934,1,1,1,,1.82834015,51.35515875,6417,R,0,0,9,TRUE,,TRUE,
 30009,202002,100,0,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,TRUE,TRUE,TRUE,
-30009,202003,100,0,0.968230653,,70.26136364,0.327462695,,1,,1,0.984115327,,35.63068182,1322,R,0,,10,TRUE,TRUE,,
-30010,202001,100,0,,2.656680299,101.7103175,,,,1,1,,1.82834015,51.35515875,28963,R,,0,9,TRUE,,,TRUE
+30009,202003,100,0,0.968230653,,70.26136364,0.327462695,,1,1,1,0.984115327,,35.63068182,1322,R,0,0,10,TRUE,TRUE,,
+30010,202001,100,0,,2.656680299,101.7103175,,,1,1,1,,1.82834015,51.35515875,28963,R,0,0,9,TRUE,,,TRUE
 30010,202002,100,0,0.771850199,1.13167173,74.91666667,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,TRUE,,,TRUE
-30010,202003,100,0,0.968230653,,70.26136364,,,1,,1,0.984115327,,35.63068182,10529,R,0,,10,TRUE,,,TRUE
-30011,202001,100,0,,2.656680299,101.7103175,,5.249464902,,1,1,,1.82834015,51.35515875,6009,R,,0,9,TRUE,,TRUE,
+30010,202003,100,0,0.968230653,,70.26136364,,,1,1,1,0.984115327,,35.63068182,10529,R,0,0,10,TRUE,,,TRUE
+30011,202001,100,0,,2.656680299,101.7103175,,5.249464902,1,1,1,,1.82834015,51.35515875,6009,R,0,0,9,TRUE,,TRUE,
 30011,202002,100,0,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,TRUE,TRUE,TRUE,
-30011,202003,100,0,0.968230653,,70.26136364,4.423850085,,1,,1,0.984115327,,35.63068182,5064,R,0,,10,TRUE,TRUE,,
-30012,202001,100,0,,2.656680299,101.7103175,,0.034032235,,1,1,,1.82834015,51.35515875,256,R,,0,9,TRUE,,TRUE,
+30011,202003,100,0,0.968230653,,70.26136364,4.423850085,,1,1,1,0.984115327,,35.63068182,5064,R,0,0,10,TRUE,TRUE,,
+30012,202001,100,0,,2.656680299,101.7103175,,0.034032235,1,1,1,,1.82834015,51.35515875,256,R,0,0,9,TRUE,,TRUE,
 30012,202002,100,0,0.771850199,1.13167173,74.91666667,29.38390625,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,TRUE,TRUE,,
-30012,202003,100,0,0.968230653,,70.26136364,,,1,,1,0.984115327,,35.63068182,7402.515486,FIR,0,,10,TRUE,,,
+30012,202003,100,0,0.968230653,,70.26136364,,,1,1,1,0.984115327,,35.63068182,7402.515486,FIR,0,0,10,TRUE,,,
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index ec8c6a5c..101db0a5 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -166,25 +166,11 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         f"{scenario}_output",
     )
     imputation_kwargs = params.copy()
-    if forward_col in scenario_input.columns:
-        imputation_kwargs.update(
-            {
-                "forward_link_col": forward_col,
-                "backward_link_col": backward_col,
-                "construction_link_col": construction_col,
-            }
-        )
-
-    if "zeros_included" in scenario:
-        imputation_kwargs.update({"include_zeros": True})
 
-    if scenario.endswith("filtered"):
-        if "dev" in scenario_type:
-            imputation_kwargs["link_filter"] = "(" + exclude_col + ' == "N")'
-        else:
-            with open('tests/conf.json') as f:
-                d = json.load(f)
-            imputation_kwargs["link_filter"] = d["mean_of_ratios"][scenario[0:2]]
+    with open('tests/conf.json') as f:
+        d = json.load(f)
+    if scenario[0:2] in d["mean_of_ratios"].keys():
+        imputation_kwargs.update(d["mean_of_ratios"][scenario[0:2]])
 
     if scenario_type.startswith("back_data"):
         min_period_df = scenario_expected_output.selectExpr("min(" + period_col + ")")
@@ -194,13 +180,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         )
 
         if "filtered" in scenario:
-            if "dev" in scenario_type:
-                back_data_df = back_data_df.join(
-                    scenario_input.select(reference_col, period_col, exclude_col),
-                    [reference_col, period_col],
-                )
-            else:
-                back_data_df = back_data_df.withColumn(target_col, col(output_col))
+            back_data_df = back_data_df.withColumn(target_col, col(output_col))
 
         imputation_kwargs["back_data_df"] = back_data_df
 

From f0d0301e9aa5857260cb7add88428f03d6bf9686 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 20 Apr 2023 13:47:54 +0100
Subject: [PATCH 210/531] More Brackets Needed

---
 .../imputation/ratio_calculators.py                    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 4552b36b..efac3f79 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -143,6 +143,8 @@ def upper_bound(c):
                         col("grouping"),
                         col("count_filtered_forward"),
                         col("count_filtered_backward"),
+                        col("count_forward"),
+                        col("count_backward"),
                         lower_bound(
                             col("count_forward"),
                         ).alias("lower_forward"),
@@ -187,8 +189,8 @@ def upper_bound(c):
                     col("num_forward").between(
                         col("lower_forward"), col("upper_forward")
                     )
-                    | trim_threshold - col("count_filtered_forward")
-                    >= col("count_forward")
+                    | ((trim_threshold - col("count_filtered_forward"))
+                    >= col("count_forward"))
                 ),
             )
             .withColumn(
@@ -197,8 +199,8 @@ def upper_bound(c):
                     col("num_backward").between(
                         col("lower_backward"), col("upper_backward")
                     )
-                    | trim_threshold - col("count_filtered_backward")
-                    >= col("count_backward")
+                    | ((trim_threshold - col("count_filtered_backward"))
+                    >= col("count_backward"))
                 ),
             )
         )

From cad5bf6ef26768c7e8d51257827346f61fc30c42 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 20 Apr 2023 17:41:02 +0100
Subject: [PATCH 211/531] Make trimming account# in the presence of nulls

---
 .../imputation/ratio_calculators.py                        | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index efac3f79..7ee2356c 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -161,13 +161,16 @@ def upper_bound(c):
                 ),
                 ["period", "grouping"],
             )
+            # When calculating row numbers we put the null values last to avoid
+            # them impacting the trimmed mean. This works because the upper
+            # bound is calculated based on the count of non-null growth ratios.
             .withColumn(
                 "num_forward",
                 expr(
                     """
                     row_number() OVER (
                         PARTITION BY period, grouping
-                        ORDER BY growth_forward ASC
+                        ORDER BY growth_forward ASC NULLS LAST
                     )
                 """
                 ),
@@ -178,7 +181,7 @@ def upper_bound(c):
                     """
                     row_number() OVER (
                         PARTITION BY period, grouping
-                        ORDER BY growth_backward ASC
+                        ORDER BY growth_backward ASC NULLS LAST
                     )
                 """
                 ),

From e5928759860909e368c7a7d3e9e88e2e3f88d208 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 21 Apr 2023 15:35:42 +0100
Subject: [PATCH 212/531] Correcting More Test Data.

---
 tests/conf.json                               |  7 +-
 .../35_TB_10_R_R_FI_output.csv                | 72 +++++++++----------
 .../36_TB_10_BI_BI_R_output.csv               | 72 +++++++++----------
 .../37_TB_10_C_FI_FI_output.csv               | 72 +++++++++----------
 .../38_T_10_R_R_FI_output.csv                 | 72 +++++++++----------
 .../39_B_10_R_R_FI_output.csv                 | 72 +++++++++----------
 .../40_TB_10_R_R_FI_no_trim_output.csv        | 60 ++++++++--------
 7 files changed, 216 insertions(+), 211 deletions(-)

diff --git a/tests/conf.json b/tests/conf.json
index bcaa3bb4..1962b5ac 100644
--- a/tests/conf.json
+++ b/tests/conf.json
@@ -8,7 +8,12 @@
         "29" : {"link_filter" : "identifier NOT IN ('200013', '200014')"},
         "30" : {"link_filter" : "identifier NOT IN ('230006', '230008')"},
         "35" : {"lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
-        "41" : {"link_filter" : "NOT(identifier = '30004' AND date = '202002')"},
+        "36" : {"lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
+        "37" : {"lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
+        "38" : {"lower_trim" : 0, "upper_trim" : 10, "trim_threshold" : 10},
+        "39" : {"lower_trim" : 10, "upper_trim" : 0, "trim_threshold" : 10},
+        "40" : {"lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
+        "41" : {"link_filter" : "NOT(identifier = '30004' AND date = '202002')", "lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
         "43" : {"forward_link_col": "forward", "backward_link_col": "backward"},
         "46" : {"link_filter" : "NOT(identifier = '90003' AND date = '202001')"},
         "48" : {"link_filter" : "identifier NOT IN ('30001', '30002', '30010')"},
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 8a36aac4..2d3fadd1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,1,1.598925527,96.73383283,8444,R,0,10,12,,
-30001,202002,100,51,0.885362387,3.732401398,6.802558774,2.995081605,76.3675837,7476,R,10,9,12,,
-30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,2003,R,9,0,11,,
-30002,202001,100,72,,1.195062676,1,1.598925527,96.73383283,9343,R,0,10,12,,
-30002,202002,100,72,0.836776196,1.596487645,6.802558774,2.995081605,76.3675837,7818,R,10,9,12,,
-30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,4897,R,9,0,11,,
-30003,202001,100,7,,4.265190233,1,1.598925527,96.73383283,7511,R,0,10,12,,
-30003,202002,100,7,0.234456131,0.271256932,6.802558774,2.995081605,76.3675837,1761,R,10,9,12,,
-30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,6492,R,9,0,11,,
-30004,202001,100,81,,0.030288689,1,1.598925527,96.73383283,64,R,0,10,12,,
-30004,202002,100,81,33.015625,11.42162162,6.802558774,2.995081605,76.3675837,2113,R,10,9,12,,
-30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,185,R,9,0,11,,
-30005,202001,100,5,,0.941234172,1,1.598925527,96.73383283,844,R,0,10,12,,
-30005,202002,100,5,1.062434865,3.199201198,6.802558774,2.995081605,76.3675837,897,R,10,9,12,,
-30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,280,R,9,0,11,,
-30006,202001,100,14,,0.995885563,1,1.598925527,96.73383283,1869,R,0,10,12,,
-30006,202002,100,14,1.004131435,1.368417982,6.802558774,2.995081605,76.3675837,1876,R,10,9,12,,
-30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1371,R,9,0,11,,
-30007,202001,100,12,,4.475816911,1,1.598925527,96.73383283,12769,R,0,10,12,,
-30007,202002,100,12,0.223422901,0.248269056,6.802558774,2.995081605,76.3675837,2853,R,10,9,12,,
-30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,11491,R,9,0,11,,
-30008,202001,100,162,,0.023463069,1,1.598925527,96.73383283,141,R,0,10,12,,TRUE
-30008,202002,100,162,42.62017045,13.86213906,6.802558774,2.995081605,76.3675837,6001,R,10,9,12,TRUE,TRUE
-30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,433,R,9,0,11,TRUE,
-30009,202001,100,26,,1.589639934,1,1.598925527,96.73383283,6417,R,0,10,12,,
-30009,202002,100,26,0.629073275,3.053782962,6.802558774,2.995081605,76.3675837,4037,R,10,9,12,,
-30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1322,R,9,0,11,,
-30010,202001,100,144,,1.332623847,1,1.598925527,96.73383283,28963,R,0,10,12,,
-30010,202002,100,144,0.750399298,2.064295653,6.802558774,2.995081605,76.3675837,21734,R,10,9,12,,
-30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,10529,R,9,0,11,,
-30011,202001,100,5,,5.249464902,1,1.598925527,96.73383283,6009,R,0,10,12,,TRUE
-30011,202002,100,5,0.190495606,0.226047443,6.802558774,2.995081605,76.3675837,1145,R,10,9,12,TRUE,TRUE
-30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,5064,R,9,0,11,TRUE,
-30012,202001,100,275,,0.034032235,1,1.598925527,96.73383283,256,R,0,10,12,,
-30012,202002,100,275,29.38390625,,6.802558774,2.995081605,76.3675837,7522,R,10,9,12,,
-30012,202003,100,275,,,1.172391173,1,76.13443331,8818.726403,FIR,9,0,11,,
+30001,202001,100,51,,1.129481006,1,1.598904,96.756440,8444,R,0,10,12,,
+30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,,
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,,
+30002,202001,100,72,,1.195062676,1,1.598904,96.756440,9343,R,0,10,12,,
+30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,,
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,,
+30003,202001,100,7,,4.265190233,1,1.598904,96.756440,7511,R,0,10,12,,
+30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,,
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,,
+30004,202001,100,81,,0.030288689,1,1.598904,96.756440,64,R,0,10,12,,
+30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,,
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,,
+30005,202001,100,5,,0.940914,1,1.598904,96.756440,844,R,0,10,12,,
+30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,,
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,,
+30006,202001,100,14,,0.996269,1,1.598904,96.756440,1869,R,0,10,12,,
+30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,,
+30006,202003,100,14,0.730810,,1.172329,1,76.108808,1371,R,9,0,11,,
+30007,202001,100,12,,4.475640,1,1.598904,96.756440,12769,R,0,10,12,,
+30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,,
+30007,202003,100,12,4.027690,,1.172329,1,76.108808,11491,R,9,0,11,,
+30008,202001,100,162,,0.023496,1,1.598904,96.756440,141,R,0,10,12,,TRUE
+30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,TRUE,TRUE
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,TRUE,
+30009,202001,100,26,,1.589547,1,1.598904,96.756440,6417,R,0,10,12,,
+30009,202002,100,26,0.629110,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,,
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,,
+30010,202001,100,144,,1.332612,1,1.598904,96.756440,28963,R,0,10,12,,
+30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,,
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,,
+30011,202001,100,5,,5.248035,1,1.598904,96.756440,6009,R,0,10,12,,TRUE
+30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,TRUE,TRUE
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,TRUE,
+30012,202001,100,275,,0.034034,1,1.598904,96.756440,256,R,0,10,12,,
+30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,,
+30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index f68345a2..5ef55af1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,,1.772802559,142.2694301,8444,R,,9,11,,
-30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.67357513,7476,R,9,9,11,,
-30001,202003,100,51,0.267924024,,1.172391173,,60.40866511,2003,R,9,,12,,
-30002,202001,100,72,,1.195062676,,1.772802559,142.2694301,9343,R,,9,11,,
-30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.67357513,7818,R,9,9,11,,
-30002,202003,100,72,0.626375032,,1.172391173,,60.40866511,4897,R,9,,12,,
-30003,202001,100,7,,4.265190233,,1.772802559,142.2694301,7511,R,,9,11,,
-30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.67357513,1761,R,9,9,11,,
-30003,202003,100,7,3.686541738,,1.172391173,,60.40866511,6492,R,9,,12,,
-30004,202001,100,81,,0.030288689,,1.772802559,142.2694301,64,R,,9,11,,
-30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.67357513,2113,R,9,9,11,,
-30004,202003,100,81,0.087553242,,1.172391173,,60.40866511,185,R,9,,12,,
-30005,202001,100,5,,0.941234172,,1.772802559,142.2694301,844,R,,9,11,,
-30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.67357513,897,R,9,9,11,,
-30005,202003,100,5,0.312578027,,1.172391173,,60.40866511,280,R,9,,12,,
-30006,202001,100,14,,0.995885563,,1.772802559,142.2694301,1869,R,,9,11,,
-30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.67357513,1876,R,9,9,11,,
-30006,202003,100,14,0.730770871,,1.172391173,,60.40866511,1371,R,9,,12,,
-30007,202001,100,12,,4.475816911,,1.772802559,142.2694301,12769,R,,9,11,,
-30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.67357513,2853,R,9,9,11,,
-30007,202003,100,12,4.027888195,,1.172391173,,60.40866511,11491,R,9,,12,,
-30008,202001,100,162,,0.023463069,,1.772802559,142.2694301,141,R,,9,11,,TRUE
-30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.67357513,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,162,0.072138939,,1.172391173,,60.40866511,433,R,9,,12,TRUE,
-30009,202001,100,26,,1.589639934,,1.772802559,142.2694301,6417,R,,9,11,,
-30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.67357513,4037,R,9,9,11,,
-30009,202003,100,26,0.327462695,,1.172391173,,60.40866511,1322,R,9,,12,,
-30010,202001,100,144,,1.332623847,,1.772802559,142.2694301,28963,R,,9,11,,
-30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.67357513,21734,R,9,9,11,,
-30010,202003,100,144,0.484426733,,1.172391173,,60.40866511,10529,R,9,,12,,
-30011,202001,100,5,,5.249464902,,1.772802559,142.2694301,6009,R,,9,11,,TRUE
-30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.67357513,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5,4.423850085,,1.172391173,,60.40866511,5064,R,9,,12,TRUE,
-30012,202001,100,275,,,,1.772802559,142.2694301,46826.14142,BI,,9,11,,
-30012,202002,100,275,,,4.293520165,2.995081605,99.67357513,26413.62467,BI,9,9,11,,
-30012,202003,100,275,,,1.172391173,,60.40866511,8819,R,9,,12,,
+30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,,
+30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,,
+30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,,
+30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,,
+30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,,
+30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,,
+30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,,
+30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,,
+30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,,
+30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,,
+30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,,
+30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,,
+30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,,
+30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,,
+30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,TRUE
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,TRUE,
+30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,,
+30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,,
+30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,,
+30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,,
+30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,TRUE
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,TRUE,
+30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,
+30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,
+30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index bc47ba75..97ec11c4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,,1.772802559,142.3186593,8444,R,,9,11,,
-30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,7476,R,9,9,11,,
-30001,202003,100,51,0.267924024,,1.172391173,,76.13443331,2003,R,9,,11,,
-30002,202001,100,72,,1.195062676,,1.772802559,142.3186593,9343,R,,9,11,,
-30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,7818,R,9,9,11,,
-30002,202003,100,72,0.626375032,,1.172391173,,76.13443331,4897,R,9,,11,,
-30003,202001,100,7,,4.265190233,,1.772802559,142.3186593,7511,R,,9,11,,
-30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,1761,R,9,9,11,,
-30003,202003,100,7,3.686541738,,1.172391173,,76.13443331,6492,R,9,,11,,
-30004,202001,100,81,,0.030288689,,1.772802559,142.3186593,64,R,,9,11,,
-30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2113,R,9,9,11,,
-30004,202003,100,81,0.087553242,,1.172391173,,76.13443331,185,R,9,,11,,
-30005,202001,100,5,,0.941234172,,1.772802559,142.3186593,844,R,,9,11,,
-30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,897,R,9,9,11,,
-30005,202003,100,5,0.312578027,,1.172391173,,76.13443331,280,R,9,,11,,
-30006,202001,100,14,,0.995885563,,1.772802559,142.3186593,1869,R,,9,11,,
-30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,1876,R,9,9,11,,
-30006,202003,100,14,0.730770871,,1.172391173,,76.13443331,1371,R,9,,11,,
-30007,202001,100,12,,4.475816911,,1.772802559,142.3186593,12769,R,,9,11,,
-30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2853,R,9,9,11,,
-30007,202003,100,12,4.027888195,,1.172391173,,76.13443331,11491,R,9,,11,,
-30008,202001,100,162,,0.023463069,,1.772802559,142.3186593,141,R,,9,11,,TRUE
-30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,162,0.072138939,,1.172391173,,76.13443331,433,R,9,,11,TRUE,
-30009,202001,100,26,,1.589639934,,1.772802559,142.3186593,6417,R,,9,11,,
-30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,4037,R,9,9,11,,
-30009,202003,100,26,0.327462695,,1.172391173,,76.13443331,1322,R,9,,11,,
-30010,202001,100,144,,1.332623847,,1.772802559,142.3186593,28963,R,,9,11,,
-30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,21734,R,9,9,11,,
-30010,202003,100,144,0.484426733,,1.172391173,,76.13443331,10529,R,9,,11,,
-30011,202001,100,5,,5.249464902,,1.772802559,142.3186593,6009,R,,9,11,,TRUE
-30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5,4.423850085,,1.172391173,,76.13443331,5064,R,9,,11,TRUE,
-30012,202001,100,275,,,,1.772802559,142.3186593,39195,C,,9,11,,
-30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,168283,FIC,9,9,11,,
-30012,202003,100,275,,,1.172391173,,76.13443331,197293,FIC,9,,11,,
+30001,202001,100,51,,1.129481006,1,1.772778,142.269430,8444,R,0,9,11,,
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,,
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,,
+30002,202001,100,72,,1.195062676,1,1.772778,142.269430,9343,R,0,9,11,,
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,,
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,,
+30003,202001,100,7,,4.265190233,1,1.772778,142.269430,7511,R,0,9,11,,
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,,
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,,
+30004,202001,100,81,,0.030288689,1,1.772778,142.269430,64,R,0,9,11,,
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,,
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,,
+30005,202001,100,5,,0.940914,1,1.772778,142.269430,844,R,0,9,11,,
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,,
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,,
+30006,202001,100,14,,0.996269,1,1.772778,142.269430,1869,R,0,9,11,,
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,,
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,,
+30007,202001,100,12,,4.47564,1,1.772778,142.269430,12769,R,0,9,11,,
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,,
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,,
+30008,202001,100,162,,0.023496,1,1.772778,142.269430,141,R,0,9,11,,TRUE
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,TRUE,TRUE
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,TRUE,
+30009,202001,100,26,,1.589547,1,1.772778,142.269430,6417,R,0,9,11,,
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,,
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,,
+30010,202001,100,144,,1.332612,1,1.772778,142.269430,28963,R,0,9,11,,
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,,
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,,
+30011,202001,100,5,,5.248035,1,1.772778,142.269430,6009,R,0,9,11,,TRUE
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,TRUE,TRUE
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,TRUE,
+30012,202001,100,275,,,1,1.772778,142.269430,39124.093264,C,0,9,11,,
+30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,
+30012,202003,100,275,,,1.172329,1,76.108808,196928.142170,FIC,9,0,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index d9cdbcf4..45304732 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,,1.455701667,96.73383283,8444,R,,11,12,,
-30001,202002,100,51,0.885362387,3.732401398,6.201462122,2.718178189,76.3675837,7476,R,11,10,12,,
-30001,202003,100,51,0.267924024,,1.06236595,,76.13443331,2003,R,10,,11,,
-30002,202001,100,72,,1.195062676,,1.455701667,96.73383283,9343,R,,11,12,,
-30002,202002,100,72,0.836776196,1.596487645,6.201462122,2.718178189,76.3675837,7818,R,11,10,12,,
-30002,202003,100,72,0.626375032,,1.06236595,,76.13443331,4897,R,10,,11,,
-30003,202001,100,7,,4.265190233,,1.455701667,96.73383283,7511,R,,11,12,,
-30003,202002,100,7,0.234456131,0.271256932,6.201462122,2.718178189,76.3675837,1761,R,11,10,12,,
-30003,202003,100,7,3.686541738,,1.06236595,,76.13443331,6492,R,10,,11,,
-30004,202001,100,81,,0.030288689,,1.455701667,96.73383283,64,R,,11,12,,
-30004,202002,100,81,33.015625,11.42162162,6.201462122,2.718178189,76.3675837,2113,R,11,10,12,,
-30004,202003,100,81,0.087553242,,1.06236595,,76.13443331,185,R,10,,11,,
-30005,202001,100,5,,0.941234172,,1.455701667,96.73383283,844,R,,11,12,,
-30005,202002,100,5,1.062434865,3.199201198,6.201462122,2.718178189,76.3675837,897,R,11,10,12,,
-30005,202003,100,5,0.312578027,,1.06236595,,76.13443331,280,R,10,,11,,
-30006,202001,100,14,,0.995885563,,1.455701667,96.73383283,1869,R,,11,12,,
-30006,202002,100,14,1.004131435,1.368417982,6.201462122,2.718178189,76.3675837,1876,R,11,10,12,,
-30006,202003,100,14,0.730770871,,1.06236595,,76.13443331,1371,R,10,,11,,
-30007,202001,100,12,,4.475816911,,1.455701667,96.73383283,12769,R,,11,12,,
-30007,202002,100,12,0.223422901,0.248269056,6.201462122,2.718178189,76.3675837,2853,R,11,10,12,,
-30007,202003,100,12,4.027888195,,1.06236595,,76.13443331,11491,R,10,,11,,
-30008,202001,100,162,,0.023463069,,1.455701667,96.73383283,141,R,,11,12,,
-30008,202002,100,162,42.62017045,13.86213906,6.201462122,2.718178189,76.3675837,6001,R,11,10,12,TRUE,TRUE
-30008,202003,100,162,0.072138939,,1.06236595,,76.13443331,433,R,10,,11,,
-30009,202001,100,26,,1.589639934,,1.455701667,96.73383283,6417,R,,11,12,,
-30009,202002,100,26,0.629073275,3.053782962,6.201462122,2.718178189,76.3675837,4037,R,11,10,12,,
-30009,202003,100,26,0.327462695,,1.06236595,,76.13443331,1322,R,10,,11,,
-30010,202001,100,144,,1.332623847,,1.455701667,96.73383283,28963,R,,11,12,,
-30010,202002,100,144,0.750399298,2.064295653,6.201462122,2.718178189,76.3675837,21734,R,11,10,12,,
-30010,202003,100,144,0.484426733,,1.06236595,,76.13443331,10529,R,10,,11,,
-30011,202001,100,5,,5.249464902,,1.455701667,96.73383283,6009,R,,11,12,,TRUE
-30011,202002,100,5,0.190495606,0.226047443,6.201462122,2.718178189,76.3675837,1145,R,11,10,12,,
-30011,202003,100,5,4.423850085,,1.06236595,,76.13443331,5064,R,10,,11,TRUE,
-30012,202001,100,275,,0.034032235,,1.455701667,96.73383283,256,R,,11,12,,
-30012,202002,100,275,29.38390625,,6.201462122,2.718178189,76.3675837,7522,R,11,10,12,,
-30012,202003,100,275,,,1.06236595,,76.13443331,7991.116673,FIR,10,,11,,
+30001,202001,100,51,,1.129481006,1,1.455685,96.756440,8444,R,0,11,12,,
+30001,202002,100,51,0.885362387,3.732401398,6.201370,2.718598,76.385246,7476,R,11,10,12,,
+30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,,
+30002,202001,100,72,,1.195062676,1,1.455685,96.756440,9343,R,0,11,12,,
+30002,202002,100,72,0.836776196,1.596487645,6.201370,2.718598,76.385246,7818,R,11,10,12,,
+30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,,
+30003,202001,100,7,,4.265190233,1,1.455685,96.756440,7511,R,0,11,12,,
+30003,202002,100,7,0.234456131,0.271256932,6.201370,2.718598,76.385246,1761,R,11,10,12,,
+30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,,
+30004,202001,100,81,,0.030288689,1,1.455685,96.756440,64,R,0,11,12,,
+30004,202002,100,81,33.015625,11.42162162,6.201370,2.718598,76.385246,2113,R,11,10,12,,
+30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,,
+30005,202001,100,5,,0.940914,1,1.455685,96.756440,844,R,0,11,12,,
+30005,202002,100,5,1.062796,3.203571,6.201370,2.718598,76.385246,897,R,11,10,12,,
+30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,,
+30006,202001,100,14,,0.996269,1,1.455685,96.756440,1869,R,0,11,12,,
+30006,202002,100,14,1.003745,1.368344,6.201370,2.718598,76.385246,1876,R,11,10,12,,
+30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,,
+30007,202001,100,12,,4.47564,1,1.455685,96.756440,12769,R,0,11,12,,
+30007,202002,100,12,0.223432,0.248281,6.201370,2.718598,76.385246,2853,R,11,10,12,,
+30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,,
+30008,202001,100,162,,0.023496,1,1.455685,96.756440,141,R,0,11,12,,
+30008,202002,100,162,42.560284,13.859122,6.201370,2.718598,76.385246,6001,R,11,10,12,TRUE,TRUE
+30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,,
+30009,202001,100,26,,1.589547,1,1.455685,96.756440,6417,R,0,11,12,,
+30009,202002,100,26,0.62911,3.053707,6.201370,2.718598,76.385246,4037,R,11,10,12,,
+30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,,
+30010,202001,100,144,,1.332612,1,1.455685,96.756440,28963,R,0,11,12,,
+30010,202002,100,144,0.750406,2.064204,6.201370,2.718598,76.385246,21734,R,11,10,12,,
+30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,,
+30011,202001,100,5,,5.248035,1,1.455685,96.756440,6009,R,0,11,12,,TRUE
+30011,202002,100,5,0.190548,0.226106,6.201370,2.718598,76.385246,1145,R,11,10,12,,
+30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,TRUE,
+30012,202001,100,275,,0.034034,1,1.455685,96.756440,256,R,0,11,12,,
+30012,202002,100,275,29.382813,,6.201370,2.718598,76.385246,7522,R,11,10,12,,
+30012,202003,100,275,,,1.062312,1,76.108808,7990.710790,FIR,10,0,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index be9e2894..3588910b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,,1.930792743,96.75644028,8444,R,,11,12,,
-30001,202002,100,51,0.885362387,3.732401398,10.05870529,4.081787351,76.3852459,7476,R,11,10,12,,
-30001,202003,100,51,0.267924024,,1.497537064,,76.10880829,2003,R,10,,11,,
-30002,202001,100,72,,1.195062676,,1.930792743,96.75644028,9343,R,,11,12,,
-30002,202002,100,72,0.836776196,1.596487645,10.05870529,4.081787351,76.3852459,7818,R,11,10,12,,
-30002,202003,100,72,0.626375032,,1.497537064,,76.10880829,4897,R,10,,11,,
-30003,202001,100,7,,4.265190233,,1.930792743,96.75644028,7511,R,,11,12,,
-30003,202002,100,7,0.234456131,0.271256932,10.05870529,4.081787351,76.3852459,1761,R,11,10,12,,
-30003,202003,100,7,3.686541738,,1.497537064,,76.10880829,6492,R,10,,11,,
-30004,202001,100,81,,0.030288689,,1.930792743,96.75644028,64,R,,11,12,,
-30004,202002,100,81,33.015625,11.42162162,10.05870529,4.081787351,76.3852459,2113,R,11,10,12,,
-30004,202003,100,81,0.087553242,,1.497537064,,76.10880829,185,R,10,,11,,
-30005,202001,100,5,,0.941234172,,1.930792743,96.75644028,844,R,,11,12,,
-30005,202002,100,5,1.062434865,3.199201198,10.05870529,4.081787351,76.3852459,897,R,11,10,12,,
-30005,202003,100,5,0.312578027,,1.497537064,,76.10880829,280,R,10,,11,,
-30006,202001,100,14,,0.995885563,,1.930792743,96.75644028,1869,R,,11,12,,
-30006,202002,100,14,1.004131435,1.368417982,10.05870529,4.081787351,76.3852459,1876,R,11,10,12,,
-30006,202003,100,14,0.730770871,,1.497537064,,76.10880829,1371,R,10,,11,,
-30007,202001,100,12,,4.475816911,,1.930792743,96.75644028,12769,R,,11,12,,
-30007,202002,100,12,0.223422901,0.248269056,10.05870529,4.081787351,76.3852459,2853,R,11,10,12,,
-30007,202003,100,12,4.027888195,,1.497537064,,76.10880829,11491,R,10,,11,,
-30008,202001,100,162,,0.023463069,,1.930792743,96.75644028,141,R,,11,12,,TRUE
-30008,202002,100,162,42.62017045,13.86213906,10.05870529,4.081787351,76.3852459,6001,R,11,10,12,,
-30008,202003,100,162,0.072138939,,1.497537064,,76.10880829,433,R,10,,11,TRUE,
-30009,202001,100,26,,1.589639934,,1.930792743,96.75644028,6417,R,,11,12,,
-30009,202002,100,26,0.629073275,3.053782962,10.05870529,4.081787351,76.3852459,4037,R,11,10,12,,
-30009,202003,100,26,0.327462695,,1.497537064,,76.10880829,1322,R,10,,11,,
-30010,202001,100,144,,1.332623847,,1.930792743,96.75644028,28963,R,,11,12,,
-30010,202002,100,144,0.750399298,2.064295653,10.05870529,4.081787351,76.3852459,21734,R,11,10,12,,
-30010,202003,100,144,0.484426733,,1.497537064,,76.10880829,10529,R,10,,11,,
-30011,202001,100,5,,5.249464902,,1.930792743,96.75644028,6009,R,,11,12,,
-30011,202002,100,5,0.190495606,0.226047443,10.05870529,4.081787351,76.3852459,1145,R,11,10,12,TRUE,TRUE
-30011,202003,100,5,4.423850085,,1.497537064,,76.10880829,5064,R,10,,11,,
-30012,202001,100,275,,0.034032235,,1.930792743,96.75644028,256,R,,11,12,,
-30012,202002,100,275,29.38390625,,10.05870529,4.081787351,76.3852459,7522,R,11,10,12,,
-30012,202003,100,275,,,1.497537064,,76.10880829,11264.4738,FIR,10,,11,,
+30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,
+30001,202002,100,51,0.885362387,3.732401398,10.053164,4.081900,76.3852459,7476,R,11,10,12,,
+30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,,
+30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,
+30002,202002,100,72,0.836776196,1.596487645,10.053164,4.081900,76.3852459,7818,R,11,10,12,,
+30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,,
+30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,
+30003,202002,100,7,0.234456131,0.271256932,10.053164,4.081900,76.3852459,1761,R,11,10,12,,
+30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,,
+30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,
+30004,202002,100,81,33.015625,11.42162162,10.053164,4.081900,76.3852459,2113,R,11,10,12,,
+30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,,
+30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,
+30005,202002,100,5,1.062796,3.203571,10.053164,4.081900,76.3852459,897,R,11,10,12,,
+30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,,
+30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,
+30006,202002,100,14,1.003745,1.368344,10.053164,4.081900,76.3852459,1876,R,11,10,12,,
+30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,,
+30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,
+30007,202002,100,12,0.223432,0.248281,10.053164,4.081900,76.3852459,2853,R,11,10,12,,
+30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,,
+30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,TRUE
+30008,202002,100,162,42.560284,13.859122,10.053164,4.081900,76.3852459,6001,R,11,10,12,,
+30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,TRUE,
+30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,
+30009,202002,100,26,0.62911,3.053707,10.053164,4.081900,76.3852459,4037,R,11,10,12,,
+30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,,
+30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,
+30010,202002,100,144,0.750406,2.064204,10.053164,4.081900,76.3852459,21734,R,11,10,12,,
+30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,,
+30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,
+30011,202002,100,5,0.190548,0.226106,10.053164,4.081900,76.3852459,1145,R,11,10,12,TRUE,TRUE
+30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,,
+30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,
+30012,202002,100,275,29.382813,,10.053164,4.081900,76.3852459,7522,R,11,10,12,,
+30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index d23f9d49..3dfe7128 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,51,,1.129481006,,1.59786861,133.0400697,8444,R,,10,10
-30001,202002,100,51,0.885362387,3.732401398,8.126185194,4.305953095,98.54703833,7476,R,10,9,10
-30001,202003,100,51,0.267924024,,1.126581418,,66.21860465,2003,R,9,,10
-30002,202001,100,72,,1.195062676,,1.59786861,133.0400697,9343,R,,10,10
-30002,202002,100,72,0.836776196,1.596487645,8.126185194,4.305953095,98.54703833,7818,R,10,9,10
-30002,202003,100,72,0.626375032,,1.126581418,,66.21860465,4897,R,9,,10
-30003,202001,100,7,,4.265190233,,1.59786861,133.0400697,7511,R,,10,10
-30003,202002,100,7,0.234456131,0.271256932,8.126185194,4.305953095,98.54703833,1761,R,10,9,10
-30003,202003,100,7,3.686541738,,1.126581418,,66.21860465,6492,R,9,,10
-30004,202001,100,81,,0.030288689,,1.59786861,133.0400697,64,R,,10,10
-30004,202002,100,81,33.015625,11.42162162,8.126185194,4.305953095,98.54703833,2113,R,10,9,10
-30004,202003,100,81,0.087553242,,1.126581418,,66.21860465,185,R,9,,10
-30005,202001,100,5,,0.941234172,,1.59786861,133.0400697,844,R,,10,10
-30005,202002,100,5,1.062434865,3.199201198,8.126185194,4.305953095,98.54703833,897,R,10,9,10
-30005,202003,100,5,0.312578027,,1.126581418,,66.21860465,280,R,9,,10
-30006,202001,100,14,,0.995885563,,1.59786861,133.0400697,1869,R,,10,10
-30006,202002,100,14,1.004131435,1.368417982,8.126185194,4.305953095,98.54703833,1876,R,10,9,10
-30006,202003,100,14,0.730770871,,1.126581418,,66.21860465,1371,R,9,,10
-30007,202001,100,12,,4.475816911,,1.59786861,133.0400697,12769,R,,10,10
-30007,202002,100,12,0.223422901,0.248269056,8.126185194,4.305953095,98.54703833,2853,R,10,9,10
-30007,202003,100,12,4.027888195,,1.126581418,,66.21860465,11491,R,9,,10
-30008,202001,100,162,,0.023463069,,1.59786861,133.0400697,141,R,,10,10
-30008,202002,100,162,42.62017045,13.86213906,8.126185194,4.305953095,98.54703833,6001,R,10,9,10
-30008,202003,100,162,0.072138939,,1.126581418,,66.21860465,433,R,9,,10
-30009,202001,100,26,,1.589639934,,1.59786861,133.0400697,6417,R,,10,10
-30009,202002,100,26,0.629073275,3.053782962,8.126185194,4.305953095,98.54703833,4037,R,10,9,10
-30009,202003,100,26,0.327462695,,1.126581418,,66.21860465,1322,R,9,,10
-30010,202001,100,144,,1.332623847,,1.59786861,133.0400697,28963,R,,10,10
-30010,202002,100,144,0.750399298,,8.126185194,4.305953095,98.54703833,21734,R,10,9,10
-30010,202003,100,144,,,1.126581418,,66.21860465,24485.12054,FIR,9,,10
+30001,202001,100,51,,1.129481006,1,1.597850,133.0400697,8444,R,0,10,10
+30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10
+30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9
+30002,202001,100,72,,1.195062676,1,1.597850,133.0400697,9343,R,0,10,10
+30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10
+30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9
+30003,202001,100,7,,4.265190233,1,1.597850,133.0400697,7511,R,0,10,10
+30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10
+30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9
+30004,202001,100,81,,0.030288689,1,1.597850,133.0400697,64,R,0,10,10
+30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10
+30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9
+30005,202001,100,5,,0.940914,1,1.597850,133.0400697,844,R,0,10,10
+30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10
+30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9
+30006,202001,100,14,,0.996269,1,1.597850,133.0400697,1869,R,0,10,10
+30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10
+30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9
+30007,202001,100,12,,4.47564,1,1.597850,133.0400697,12769,R,0,10,10
+30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10
+30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9
+30008,202001,100,162,,0.023496,1,1.597850,133.0400697,141,R,0,10,10
+30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10
+30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9
+30009,202001,100,26,,1.589547,1,1.597850,133.0400697,6417,R,0,10,10
+30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10
+30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9
+30010,202001,100,144,,1.332612,1,1.597850,133.0400697,28963,R,0,10,10
+30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10
+30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9

From d75db3b206f8631de0a0fec2d3aebe15df1a42bd Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 21 Apr 2023 17:03:03 +0100
Subject: [PATCH 213/531] Changed from JSON config to TOML. TOML nests on .  so
 renamed tests.

---
 poetry.lock                                   |  26 +++-
 pyproject.toml                                |   1 +
 tests/conf.json                               |  26 ----
 ...ut.csv => 16_BI_BI_R_NS_C_FI_FI_input.csv} |   0
 ...t.csv => 16_BI_BI_R_NS_C_FI_FI_output.csv} |   0
 ..._BI_R_NS_C_FI_FI_zeros_included_input.csv} |   0
 ...BI_R_NS_C_FI_FI_zeros_included_output.csv} |   0
 ..._BI_R_NS_C_FI_FI_zeros_excluded_input.csv} |   0
 ...BI_R_NS_C_FI_FI_zeros_excluded_output.csv} |   0
 tests/imputation/mean_of_ratios.toml          | 130 ++++++++++++++++++
 tests/imputation/test_mean_of_ratios.py       |  11 +-
 11 files changed, 157 insertions(+), 37 deletions(-)
 delete mode 100644 tests/conf.json
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{16.1_BI_BI_R_NS_C_FI_FI_input.csv => 16_BI_BI_R_NS_C_FI_FI_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{16.1_BI_BI_R_NS_C_FI_FI_output.csv => 16_BI_BI_R_NS_C_FI_FI_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{16.2_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv => 68_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv => 68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv => 69_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv => 69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv} (100%)
 create mode 100644 tests/imputation/mean_of_ratios.toml

diff --git a/poetry.lock b/poetry.lock
index ade858c7..c3b66664 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -267,14 +267,14 @@ files = [
 
 [[package]]
 name = "packaging"
-version = "23.0"
+version = "23.1"
 description = "Core utilities for Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"},
-    {file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"},
+    {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"},
+    {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"},
 ]
 
 [[package]]
@@ -384,14 +384,14 @@ sql = ["pandas (>=0.23.2)", "pyarrow (>=1.0.0)"]
 
 [[package]]
 name = "pytest"
-version = "7.3.0"
+version = "7.3.1"
 description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pytest-7.3.0-py3-none-any.whl", hash = "sha256:933051fa1bfbd38a21e73c3960cebdad4cf59483ddba7696c48509727e17f201"},
-    {file = "pytest-7.3.0.tar.gz", hash = "sha256:58ecc27ebf0ea643ebfdf7fb1249335da761a00c9f955bcd922349bcb68ee57d"},
+    {file = "pytest-7.3.1-py3-none-any.whl", hash = "sha256:3799fa815351fea3a5e96ac7e503a96fa51cc9942c3753cda7651b93c1cfa362"},
+    {file = "pytest-7.3.1.tar.gz", hash = "sha256:434afafd78b1d78ed0addf160ad2b77a30d35d4bdf8af234fe621919d9ed15e3"},
 ]
 
 [package.dependencies]
@@ -470,6 +470,18 @@ files = [
 [package.extras]
 yaml = ["PyYAML (>=5.1)", "more-itertools"]
 
+[[package]]
+name = "toml"
+version = "0.10.2"
+description = "Python Library for Tom's Obvious, Minimal Language"
+category = "dev"
+optional = false
+python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
+files = [
+    {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"},
+    {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"},
+]
+
 [[package]]
 name = "tomli"
 version = "2.0.1"
@@ -547,4 +559,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.7"
-content-hash = "030886887dc78ab5e32a2e6181cb497f6655eb7a1e73a0285c47905680ea15b9"
+content-hash = "73f6897180fd909cf89761915dc4c38f0cad5a444696dc463dda7a400c8fbb23"
diff --git a/pyproject.toml b/pyproject.toml
index bd84e3b8..fafaba98 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -19,6 +19,7 @@ pytest-cov = "^4.0.0"
 chispa = "*"
 pytest-dependency = "^0.5.1"
 pytest-tap = "^3.3"
+toml = "^0.10.0"
 [tool.isort]
 profile = "black"
 
diff --git a/tests/conf.json b/tests/conf.json
deleted file mode 100644
index 1962b5ac..00000000
--- a/tests/conf.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-    "mean_of_ratios" : {
-        "16.2": {"include_zeros": true},
-        "19" : {"forward_link_col": "forward", "backward_link_col": "backward", "construction_link_col": "construction"},
-        "26" : {"link_filter" : "identifier != '140005'"},
-        "27" : {"link_filter" : "identifier NOT IN ('150005', '150006')"},
-        "28" : {"forward_link_col": "forward", "backward_link_col": "backward", "construction_link_col": "construction", "link_filter" : "identifier != '190007'"},
-        "29" : {"link_filter" : "identifier NOT IN ('200013', '200014')"},
-        "30" : {"link_filter" : "identifier NOT IN ('230006', '230008')"},
-        "35" : {"lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
-        "36" : {"lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
-        "37" : {"lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
-        "38" : {"lower_trim" : 0, "upper_trim" : 10, "trim_threshold" : 10},
-        "39" : {"lower_trim" : 10, "upper_trim" : 0, "trim_threshold" : 10},
-        "40" : {"lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
-        "41" : {"link_filter" : "NOT(identifier = '30004' AND date = '202002')", "lower_trim" : 10, "upper_trim" : 10, "trim_threshold" : 10},
-        "43" : {"forward_link_col": "forward", "backward_link_col": "backward"},
-        "46" : {"link_filter" : "NOT(identifier = '90003' AND date = '202001')"},
-        "48" : {"link_filter" : "identifier NOT IN ('30001', '30002', '30010')"},
-        "49" : {"link_filter" : "identifier NOT IN ('30001', '30002', '30010')"},
-        "61" : {"link_filter" : "identifier NOT IN ('110009', '110009')"},
-        "65" : {"link_filter" : "NOT(identifier = '90003' AND date = '202001')"},
-        "66" : {"link_filter" : "identifier NOT IN ('30001', '30002', '30010')"},
-        "67" : {"link_filter" : "identifier NOT IN ('30001', '30002', '30010')"}
-    }
-}
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.1_BI_BI_R_NS_C_FI_FI_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.2_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16.3_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
new file mode 100644
index 00000000..19514f39
--- /dev/null
+++ b/tests/imputation/mean_of_ratios.toml
@@ -0,0 +1,130 @@
+[19_link_columns]
+forward_link_col = "forward"
+backward_link_col = "backward"
+construction_link_col = "construction"
+
+[26_C_FI_FI_NS_BI_BI_R_filtered]
+link_filter = "identifier != '140005'"
+
+[27_BI_BI_R_NS_R_FI_FI_filtered]
+link_filter = "identifier NOT IN ('150005', '150006')"
+
+[28_link_columns_filtered]
+forward_link_col = "forward"
+backward_link_col = "backward"
+construction_link_col = "construction"
+link_filter = "identifier != '190007'"
+
+[29_mixed_data_filtered]
+link_filter = "identifier NOT IN ('200013', '200014')"
+
+[30_class_change_C_C_FI_filtered]
+link_filter = "identifier NOT IN ('230006', '230008')"
+
+[35_TB_10_R_R_FI]
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
+
+[36_TB_10_BI_BI_R]
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
+
+[37_TB_10_C_FI_FI]
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
+
+[38_T_10_R_R_FI]
+lower_trim = 0
+upper_trim = 10
+trim_threshold = 10
+
+[39_B_10_R_R_FI]
+lower_trim = 10
+upper_trim = 0
+trim_threshold = 10
+
+[40_TB_10_R_R_FI_no_trim]
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
+
+[41_TB_10_R_R_FI_filtered]
+link_filter = "NOT(identifier = '30004' AND date = '202002')"
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
+
+[42_TB_10_R_R_FI-BI_R_R]
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
+
+[43_TB_10_BI_BI_R_boundary]
+forward_link_col = "forward"
+backward_link_col = "backward"
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
+
+[44_TB_5_BI_BI_R_boundary]
+lower_trim = 5
+upper_trim = 5
+trim_threshold = 10
+
+[45_TB_10_R_R_FI_partial_no_trim]
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
+
+[46_TB_10_BI_BI_R_filtered]
+link_filter = "NOT(identifier = '90003' AND date = '202001')"
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
+
+[47_TB_50]
+lower_trim = 50
+upper_trim = 50
+trim_threshold = 10
+
+[48_TB_50_filtered_partial_default]
+link_filter = "identifier NOT IN ('30001', '30002', '30010')"
+lower_trim = 50
+upper_trim = 50
+trim_threshold = 10
+
+[49_TB_50_filtered_full_default]
+link_filter = "identifier NOT IN ('30001', '30002', '30010')"
+lower_trim = 50
+upper_trim = 50
+trim_threshold = 10
+
+[61_R_R_FI-BI_R_R_50_weight_filtered]
+link_filter = "identifier NOT IN ('110009', '110009')"
+lower_trim = 50
+upper_trim = 50
+trim_threshold = 10
+
+[65_TB_10_BI_BI_R_50_weight_filtered]
+link_filter = "NOT(identifier = '90003' AND date = '202001')"
+lower_trim = 50
+upper_trim = 50
+trim_threshold = 10
+
+[66_TB_50_50_weight_filtered_partial_default]
+link_filter = "identifier NOT IN ('30001', '30002', '30010')"
+lower_trim = 50
+upper_trim = 50
+trim_threshold = 10
+
+[67_TB_50_50_weight_filtered_full_default]
+link_filter = "identifier NOT IN ('30001', '30002', '30010')"
+lower_trim = 50
+upper_trim = 50
+trim_threshold = 10
+
+[68_BI_BI_R_NS_C_FI_FI_zeros_included]
+include_zeros = true
\ No newline at end of file
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 101db0a5..35c04ff4 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -2,6 +2,7 @@
 import json
 import os
 import pathlib
+import toml
 
 import pytest
 from chispa.dataframe_comparer import assert_df_equality
@@ -167,10 +168,12 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     )
     imputation_kwargs = params.copy()
 
-    with open('tests/conf.json') as f:
-        d = json.load(f)
-    if scenario[0:2] in d["mean_of_ratios"].keys():
-        imputation_kwargs.update(d["mean_of_ratios"][scenario[0:2]])
+    with open('tests/imputation/mean_of_ratios.toml', 'r') as f:
+        new_toml_string = toml.load(f)
+        print(new_toml_string)
+    if scenario in new_toml_string.keys():
+        imputation_kwargs.update(new_toml_string[scenario])
+        print(imputation_kwargs)
 
     if scenario_type.startswith("back_data"):
         min_period_df = scenario_expected_output.selectExpr("min(" + period_col + ")")

From 5a909e26308191d7c5dadd75aae9d0497d5d2b37 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 26 Apr 2023 16:26:55 +0100
Subject: [PATCH 214/531] More Data Updates. Mostly Rounding With The
 occasional output recalculating.

---
 .../imputation/ratio_calculators.py           |   4 +
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  20 +--
 .../41_TB_10_R_R_FI_filtered_output.csv       |  74 ++++-----
 .../42_TB_10_R_R_FI-BI_R_R_input.csv          | 144 +++++++++---------
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 144 +++++++++---------
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 126 +++++++--------
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 126 +++++++--------
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |  68 ++++-----
 .../46_TB_10_BI_BI_R_filtered_output.csv      | 126 +++++++--------
 .../methodology_scenarios/47_TB_50_output.csv |  72 ++++-----
 ..._TB_50_filtered_partial_default_output.csv |  66 ++++----
 tests/imputation/mean_of_ratios.toml          |   6 +-
 tests/imputation/test_mean_of_ratios.py       |   2 -
 13 files changed, 491 insertions(+), 487 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 7ee2356c..e5436d2d 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -248,6 +248,8 @@ def upper_bound(c):
         "filtered_backward",
         "trimmed_forward",
         "trimmed_backward",
+        "num_forward",
+        "num_backward",
     )
 
     return [
@@ -261,6 +263,8 @@ def upper_bound(c):
                 "filtered_backward": filtered_backward_col,
                 "trimmed_forward": trimmed_forward_col,
                 "trimmed_backward": trimmed_backward_col,
+                "num_forward": "num_forward",
+                "num_backward": "num_backward",
             },
         ),
         RatioCalculationResult(
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index 3dfe7128..52329c6d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,51,,1.129481006,1,1.597850,133.0400697,8444,R,0,10,10
+30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10
 30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10
 30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9
-30002,202001,100,72,,1.195062676,1,1.597850,133.0400697,9343,R,0,10,10
+30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10
 30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10
 30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9
-30003,202001,100,7,,4.265190233,1,1.597850,133.0400697,7511,R,0,10,10
+30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10
 30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10
 30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9
-30004,202001,100,81,,0.030288689,1,1.597850,133.0400697,64,R,0,10,10
+30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10
 30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10
 30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9
-30005,202001,100,5,,0.940914,1,1.597850,133.0400697,844,R,0,10,10
+30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10
 30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10
 30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9
-30006,202001,100,14,,0.996269,1,1.597850,133.0400697,1869,R,0,10,10
+30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10
 30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10
 30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9
-30007,202001,100,12,,4.47564,1,1.597850,133.0400697,12769,R,0,10,10
+30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10
 30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10
 30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9
-30008,202001,100,162,,0.023496,1,1.597850,133.0400697,141,R,0,10,10
+30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10
 30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10
 30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9
-30009,202001,100,26,,1.589547,1,1.597850,133.0400697,6417,R,0,10,10
+30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10
 30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10
 30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9
-30010,202001,100,144,,1.332612,1,1.597850,133.0400697,28963,R,0,10,10
+30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10
 30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10
 30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
index 82d1656a..31125d9d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-30001,202001,100,51,,1.129481006,,1.773218509,96.73383283,8444,R,,9,12,,,
-30001,202002,100,51,0.885362387,3.732401398,3.88999586,1.941764103,81.65588616,7476,R,9,8,11,,,
-30001,202003,100,51,0.267924024,,1.307995914,,76.13443331,2003,R,8,,11,,,
-30002,202001,100,72,,1.195062676,,1.773218509,96.73383283,9343,R,,9,12,,,
-30002,202002,100,72,0.836776196,1.596487645,3.88999586,1.941764103,81.65588616,7818,R,9,8,11,,,
-30002,202003,100,72,0.626375032,,1.307995914,,76.13443331,4897,R,8,,11,,,
-30003,202001,100,7,,4.265190233,,1.773218509,96.73383283,7511,R,,9,12,,,
-30003,202002,100,7,0.234456131,0.271256932,3.88999586,1.941764103,81.65588616,1761,R,9,8,11,,,
-30003,202003,100,7,3.686541738,,1.307995914,,76.13443331,6492,R,8,,11,,,
-30004,202001,100,81,,,,1.773218509,96.73383283,64,R,,9,12,,,
-30004,202002,100,81,,,3.88999586,1.941764103,81.65588616,2113,R,9,8,11,,,TRUE
-30004,202003,100,81,,,1.307995914,,76.13443331,185,R,8,,11,,,
-30005,202001,100,5,,0.941234172,,1.773218509,96.73383283,844,R,,9,12,,,
-30005,202002,100,5,1.062434865,3.199201198,3.88999586,1.941764103,81.65588616,897,R,9,8,11,,,
-30005,202003,100,5,0.312578027,,1.307995914,,76.13443331,280,R,8,,11,,,
-30006,202001,100,14,,0.995885563,,1.773218509,96.73383283,1869,R,,9,12,,,
-30006,202002,100,14,1.004131435,1.368417982,3.88999586,1.941764103,81.65588616,1876,R,9,8,11,,,
-30006,202003,100,14,0.730770871,,1.307995914,,76.13443331,1371,R,8,,11,,,
-30007,202001,100,12,,4.475816911,,1.773218509,96.73383283,12769,R,,9,12,,,
-30007,202002,100,12,0.223422901,0.248269056,3.88999586,1.941764103,81.65588616,2853,R,9,8,11,,,
-30007,202003,100,12,4.027888195,,1.307995914,,76.13443331,11491,R,8,,11,,,
-30008,202001,100,162,,0.023463069,,1.773218509,96.73383283,141,R,,9,12,,TRUE,
-30008,202002,100,162,42.62017045,13.86213906,3.88999586,1.941764103,81.65588616,6001,R,9,8,11,TRUE,TRUE,
-30008,202003,100,162,0.072138939,,1.307995914,,76.13443331,433,R,8,,11,TRUE,,
-30009,202001,100,26,,1.589639934,,1.773218509,96.73383283,6417,R,,9,12,,,
-30009,202002,100,26,0.629073275,3.053782962,3.88999586,1.941764103,81.65588616,4037,R,9,8,11,,,
-30009,202003,100,26,0.327462695,,1.307995914,,76.13443331,1322,R,8,,11,,,
-30010,202001,100,144,,1.332623847,,1.773218509,96.73383283,28963,R,,9,12,,,
-30010,202002,100,144,0.750399298,2.064295653,3.88999586,1.941764103,81.65588616,21734,R,9,8,11,,,
-30010,202003,100,144,0.484426733,,1.307995914,,76.13443331,10529,R,8,,11,,,
-30011,202001,100,5,,5.249464902,,1.773218509,96.73383283,6009,R,,9,12,,TRUE,
-30011,202002,100,5,0.190495606,0.226047443,3.88999586,1.941764103,81.65588616,1145,R,9,8,11,TRUE,TRUE,
-30011,202003,100,5,4.423850085,,1.307995914,,76.13443331,5064,R,8,,11,TRUE,,
-30012,202001,100,275,,0.034032235,,1.773218509,96.73383283,256,R,,9,12,,,
-30012,202002,100,275,29.38390625,,3.88999586,1.941764103,81.65588616,7522,R,9,8,11,,,
-30012,202003,100,275,,,1.307995914,,76.13443331,9838.745268,FIR,8,,11,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,forward_filtered,backward_filtered
+30001,202001,100,51,,1.129481006,1,1.773194,96.75644,8444,R,0,9,12,,,,,
+30001,202002,100,51,0.885362387,3.732401398,3.889877,2.962348,81.65588616,7476,R,9,10,11,,,,,
+30001,202003,100,51,0.267924024,,1.495827,1,76.108808,2003,R,10,0,11,,,,,
+30002,202001,100,72,,1.195062676,1,1.773194,96.75644,9343,R,0,9,12,,,,,
+30002,202002,100,72,0.836776196,1.596487645,3.889877,2.962348,81.65588616,7818,R,9,10,11,,,,,
+30002,202003,100,72,0.626375032,,1.495827,1,76.108808,4897,R,10,0,11,,,,,
+30003,202001,100,7,,4.265190233,1,1.773194,96.75644,7511,R,0,9,12,,,,,
+30003,202002,100,7,0.234456131,0.271256932,3.889877,2.962348,81.65588616,1761,R,9,10,11,,,,,
+30003,202003,100,7,3.686541738,,1.495827,1,76.108808,6492,R,10,0,11,,,,,
+30004,202001,100,81,,,1,1.773194,96.75644,64,R,0,9,12,,,,,TRUE
+30004,202002,100,81,,,3.889877,2.962348,81.65588616,2113,R,9,10,11,,,TRUE,,
+30004,202003,100,81,,,1.495827,1,76.108808,185,R,10,0,11,,,,TRUE,
+30005,202001,100,5,,0.940914,1,1.773194,96.75644,844,R,0,9,12,,,,,
+30005,202002,100,5,1.062796,3.203571,3.889877,2.962348,81.65588616,897,R,9,10,11,,,,,
+30005,202003,100,5,0.312152,,1.495827,1,76.108808,280,R,10,0,11,,,,,
+30006,202001,100,14,,0.996269,1,1.773194,96.75644,1869,R,0,9,12,,,,,
+30006,202002,100,14,1.003745,1.368344,3.889877,2.962348,81.65588616,1876,R,9,10,11,,,,,
+30006,202003,100,14,0.73081,,1.495827,1,76.108808,1371,R,10,0,11,,,,,
+30007,202001,100,12,,4.47564,1,1.773194,96.75644,12769,R,0,9,12,,,,,
+30007,202002,100,12,0.223432,0.248281,3.889877,2.962348,81.65588616,2853,R,9,10,11,,,,,
+30007,202003,100,12,4.02769,,1.495827,1,76.108808,11491,R,10,0,11,,,,,
+30008,202001,100,162,,0.023496,1,1.773194,96.75644,141,R,0,9,12,,TRUE,,,
+30008,202002,100,162,42.560284,13.859122,3.889877,2.962348,81.65588616,6001,R,9,10,11,TRUE,,,,
+30008,202003,100,162,0.072155,,1.495827,1,76.108808,433,R,10,0,11,,,,,
+30009,202001,100,26,,1.589547,1,1.773194,96.75644,6417,R,0,9,12,,,,,
+30009,202002,100,26,0.62911,3.053707,3.889877,2.962348,81.65588616,4037,R,9,10,11,,,,,
+30009,202003,100,26,0.327471,,1.495827,1,76.108808,1322,R,10,0,11,,,,,
+30010,202001,100,144,,1.332612,1,1.773194,96.75644,28963,R,0,9,12,,,,,
+30010,202002,100,144,0.750406,2.064204,3.889877,2.962348,81.65588616,21734,R,9,10,11,,,,,
+30010,202003,100,144,0.484448,,1.495827,1,76.108808,10529,R,10,0,11,,,,,
+30011,202001,100,5,,5.248035,1,1.773194,96.75644,6009,R,0,9,12,,TRUE,,,
+30011,202002,100,5,0.190548,0.226106,3.889877,2.962348,81.65588616,1145,R,9,10,11,TRUE,,,,
+30011,202003,100,5,4.422707,,1.495827,1,76.108808,5064,R,10,0,11,,,,,
+30012,202001,100,275,,0.034034,1,1.773194,96.75644,256,R,0,9,12,,,,,
+30012,202002,100,275,29.382813,,3.889877,2.962348,81.65588616,7522,R,9,10,11,,,,,
+30012,202003,100,275,,,1.495827,1,76.108808,11251.613766,FIR,10,0,11,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv
index 8efac202..5ba4f67b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_input.csv
@@ -1,73 +1,73 @@
 identifier,date,group,question,other
-110001,202001,100,9244,89
-110001,202002,100,8916,89
-110001,202003,100,6194,89
-110002,202001,100,4826,83
-110002,202002,100,5903,83
-110002,202003,100,4743,83
-110003,202001,100,7586,4
-110003,202002,100,1016,4
-110003,202003,100,1429,4
-110004,202001,100,3975,76
-110004,202002,100,3044,76
-110004,202003,100,3673,76
-110005,202001,100,1941,18
-110005,202002,100,3121,18
-110005,202003,100,1208,18
-110006,202001,100,5405,94
-110006,202002,100,7084,94
-110006,202003,100,4980,94
-110007,202001,100,15172,8
-110007,202002,100,2845,8
-110007,202003,100,3501,8
-110008,202001,100,16298,304
-110008,202002,100,14429,304
-110008,202003,100,14295,304
-110009,202001,100,3698,45
-110009,202002,100,4993,45
-110009,202003,100,4212,45
-110010,202001,100,7722,100
-110010,202002,100,10153,100
-110010,202003,100,6545,100
-110011,202001,100,30344,19
-110011,202002,100,3627,19
-110011,202003,100,7288,19
-110012,202001,100,16298,304
-110012,202002,100,11567,304
-110012,202003,100,,304
-110013,202001,200,20190,54
-110013,202002,200,18242,54
-110013,202003,200,28826,54
-110014,202001,200,4260,47
-110014,202002,200,5036,42
-110014,202003,200,6484,42
-110015,202001,200,19236,57
-110015,202002,200,4949,57
-110015,202003,200,3544,57
-110016,202001,200,14902,163
-110016,202002,200,16435,163
-110016,202003,200,24653,163
-110017,202001,200,35476,149
-110017,202002,200,50515,149
-110017,202003,200,53477,149
-110018,202001,200,13845,126
-110018,202002,200,25488,126
-110018,202003,200,27409,126
-110019,202001,200,1099,6
-110019,202002,200,434,6
-110019,202003,200,124,6
-110020,202001,200,3348,22
-110020,202002,200,1996,22
-110020,202003,200,5051,22
-110021,202001,200,29215,108
-110021,202002,200,34168,108
-110021,202003,200,61628,108
-110022,202001,200,6390,67
-110022,202002,200,12705,67
-110022,202003,200,11966,67
-110023,202001,200,4562,18
-110023,202002,200,1717,18
-110023,202003,200,2371,18
-110024,202001,200,,155
-110024,202002,200,18782,155
-110024,202003,200,21046,155
+80001,202001,100,9244,89
+80001,202002,100,8916,89
+80001,202003,100,6194,89
+80002,202001,100,4826,83
+80002,202002,100,5903,83
+80002,202003,100,4743,83
+80003,202001,100,7586,4
+80003,202002,100,1016,4
+80003,202003,100,1429,4
+80004,202001,100,3975,76
+80004,202002,100,3044,76
+80004,202003,100,3673,76
+80005,202001,100,1941,18
+80005,202002,100,3121,18
+80005,202003,100,1208,18
+80006,202001,100,5405,94
+80006,202002,100,7084,94
+80006,202003,100,4980,94
+80007,202001,100,15172,8
+80007,202002,100,2845,8
+80007,202003,100,3501,8
+80008,202001,100,16298,304
+80008,202002,100,14429,304
+80008,202003,100,14295,304
+80009,202001,100,3698,45
+80009,202002,100,4993,45
+80009,202003,100,4212,45
+80010,202001,100,7722,100
+80010,202002,100,10153,100
+80010,202003,100,6545,100
+80011,202001,100,30344,19
+80011,202002,100,3627,19
+80011,202003,100,7288,19
+80012,202001,100,16298,304
+80012,202002,100,11567,304
+80012,202003,100,,304
+80013,202001,200,20190,54
+80013,202002,200,18242,54
+80013,202003,200,28826,54
+80014,202001,200,4260,47
+80014,202002,200,5036,42
+80014,202003,200,6484,42
+80015,202001,200,19236,57
+80015,202002,200,4949,57
+80015,202003,200,3544,57
+80016,202001,200,14902,163
+80016,202002,200,16435,163
+80016,202003,200,24653,163
+80017,202001,200,35476,149
+80017,202002,200,50515,149
+80017,202003,200,53477,149
+80018,202001,200,13845,126
+80018,202002,200,25488,126
+80018,202003,200,27409,126
+80019,202001,200,1099,6
+80019,202002,200,434,6
+80019,202003,200,124,6
+80020,202001,200,3348,22
+80020,202002,200,1996,22
+80020,202003,200,5051,22
+80021,202001,200,29215,108
+80021,202002,200,34168,108
+80021,202003,200,61628,108
+80022,202001,200,6390,67
+80022,202002,200,12705,67
+80022,202003,200,11966,67
+80023,202001,200,4562,18
+80023,202002,200,1717,18
+80023,202003,200,2371,18
+80024,202001,200,,155
+80024,202002,200,18782,155
+80024,202003,200,21046,155
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 6653ed29..1bbd1a22 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,73 +1,73 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-80001,202001,100,89,,1.036787797,,2.076255394,107.1910333,9244,R,,10,12,,
-80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,8916,R,10,9,12,,
-80001,202003,100,89,0.694706146,,0.918490819,,69.22002885,6194,R,9,,11,,
-80002,202001,100,83,,0.817550398,,2.076255394,107.1910333,4826,R,,10,12,,
-80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,5903,R,10,9,12,,
-80002,202003,100,83,0.803489751,,0.918490819,,69.22002885,4743,R,9,,11,,
-80003,202001,100,4,,7.466535433,,2.076255394,107.1910333,7586,R,,10,12,,
-80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1016,R,10,9,12,,
-80003,202003,100,4,1.406496063,,0.918490819,,69.22002885,1429,R,9,,11,,
-80004,202001,100,76,,1.305847569,,2.076255394,107.1910333,3975,R,,10,12,,
-80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,3044,R,10,9,12,,
-80004,202003,100,76,1.206636005,,0.918490819,,69.22002885,3673,R,9,,11,,
-80005,202001,100,18,,0.622072678,,2.076255394,107.1910333,1941,R,,10,12,,TRUE
-80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,3121,R,10,9,12,TRUE,TRUE
-80005,202003,100,18,0.387050567,,0.918490819,,69.22002885,1208,R,9,,11,,
-80006,202001,100,94,,0.763047038,,2.076255394,107.1910333,5405,R,,10,12,,
-80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,7084,R,10,9,12,,
-80006,202003,100,94,0.703053532,,0.918490819,,69.22002885,4980,R,9,,11,,
-80007,202001,100,8,,5.333239595,,2.076255394,107.1910333,15172,R,,10,12,,
-80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,2845,R,10,9,12,,
-80007,202003,100,8,1.230684055,,0.918490819,,69.22002885,3501,R,9,,11,,
-80008,202001,100,304,,1.129530598,,2.076255394,107.1910333,16298,R,,10,12,,
-80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,14429,R,10,9,12,,
-80008,202003,100,304,0.990729498,,0.918490819,,69.22002885,14295,R,9,,11,,
-80009,202001,100,45,,0.740562712,,2.076255394,107.1910333,3698,R,,10,12,,
-80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,4993,R,10,9,12,,
-80009,202003,100,45,0.843571749,,0.918490819,,69.22002885,4212,R,9,,11,,
-80010,202001,100,100,,0.760511998,,2.076255394,107.1910333,7722,R,,10,12,,
-80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,10153,R,10,9,12,,
-80010,202003,100,100,0.644660382,,0.918490819,,69.22002885,6545,R,9,,11,TRUE,
-80011,202001,100,19,,8.365866031,,2.076255394,107.1910333,30344,R,,10,12,,TRUE
-80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,3627,R,10,9,12,TRUE,TRUE
-80011,202003,100,19,2.00928009,,0.918490819,,69.22002885,7288,R,9,,11,TRUE,
-80012,202001,100,304,,1.408940798,,2.076255394,107.1910333,16298,R,,10,12,,
-80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,11567,R,10,9,12,,
-80012,202003,100,304,,,0.918490819,,69.22002885,10624.18,FIR,9,,11,,
-80013,202001,200,54,,1.106799294,,1.313944665,186.8459267,20190,R,,9,11,,
-80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,18242,R,9,10,12,,
-80013,202003,200,54,1.58023419,,1.246527322,,255.2315185,28826,R,10,,12,,
-80014,202001,200,47,,0.845985046,,1.313944665,186.8459267,4260,R,,9,11,,
-80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,5036,R,9,10,12,,
-80014,202003,200,42,1.28773421,,1.246527322,,255.2315185,6484,R,10,,12,,
-80015,202001,200,57,,3.886845827,,1.313944665,186.8459267,19236,R,,9,11,,TRUE
-80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,4949,R,9,10,12,TRUE,
-80015,202003,200,57,0.716195191,,1.246527322,,255.2315185,3544,R,10,,12,,
-80016,202001,200,163,,0.906730921,,1.313944665,186.8459267,14902,R,,9,11,,
-80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,16435,R,9,10,12,,
-80016,202003,200,163,1.500085186,,1.246527322,,255.2315185,24653,R,10,,12,,
-80017,202001,200,149,,0.702275751,,1.313944665,186.8459267,35476,R,,9,11,,
-80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,50515,R,9,10,12,,
-80017,202003,200,149,1.058635817,,1.246527322,,255.2315185,53477,R,10,,12,,
-80018,202001,200,126,,0.543204684,,1.313944665,186.8459267,13845,R,,9,11,,
-80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,25488,R,9,10,12,,
-80018,202003,200,126,1.075364795,,1.246527322,,255.2315185,27409,R,10,,12,,
-80019,202001,200,6,,2.530969376,,1.313944665,186.8459267,1099,R,,9,11,,
-80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,434,R,9,10,12,,TRUE
-80019,202003,200,6,0.284365646,,1.246527322,,255.2315185,124,R,10,,12,TRUE,
-80020,202001,200,22,,1.677715809,,1.313944665,186.8459267,3348,R,,9,11,,
-80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,1996,R,9,10,12,,TRUE
-80020,202003,200,22,2.530990214,,1.246527322,,255.2315185,5051,R,10,,12,TRUE,
-80021,202001,200,108,,0.855047659,,1.313944665,186.8459267,29215,R,,9,11,,
-80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,34168,R,9,10,12,,
-80021,202003,200,108,1.803680177,,1.246527322,,255.2315185,61628,R,10,,12,,
-80022,202001,200,67,,0.502948427,,1.313944665,186.8459267,6390,R,,9,11,,TRUE
-80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,12705,R,9,10,12,TRUE,
-80022,202003,200,67,0.9418398,,1.246527322,,255.2315185,11966,R,10,,12,,
-80023,202001,200,18,,2.656773442,,1.313944665,186.8459267,4562,R,,9,11,,
-80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,1717,R,9,10,12,,
-80023,202003,200,18,1.381013395,,1.246527322,,255.2315185,2371,R,10,,12,,
-80024,202001,200,155,,,,1.313944665,186.8459267,24679.03,BI,,9,11,,
-80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,18782,R,9,10,12,,
-80024,202003,200,155,1.120490459,,1.246527322,,255.2315185,21046,R,10,,12,,
+80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,
+80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,,
+80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,,
+80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,
+80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,,
+80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,,
+80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,
+80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,,
+80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,,
+80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,
+80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,,
+80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,,
+80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,TRUE
+80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,TRUE,TRUE
+80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,,
+80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,
+80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,,
+80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,,
+80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,
+80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,,
+80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,,
+80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,
+80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,,
+80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,,
+80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,
+80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,,
+80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,,
+80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,
+80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,,
+80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,TRUE,
+80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,TRUE
+80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,TRUE,TRUE
+80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,TRUE,
+80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,
+80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,,
+80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,
+80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,
+80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,,
+80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,,
+80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,
+80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,,
+80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,,
+80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,TRUE
+80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,TRUE,
+80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,,
+80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,
+80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,,
+80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,,
+80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,
+80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,,
+80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,,
+80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,
+80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,,
+80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,,
+80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,
+80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,,TRUE
+80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,TRUE,
+80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,
+80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,,TRUE
+80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,TRUE,
+80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,
+80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,,
+80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,,
+80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,TRUE
+80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,TRUE,
+80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,,
+80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,
+80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,,
+80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,,
+80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,
+80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,
+80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index 0c370690..a5f0bea3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-90001,202001,100,89,,1.036787797,,1.835663813,132.8421946,9244,R,,18,20,,
-90001,202002,100,89,0.964517525,1.43945754,0.906337253,1.082813901,113.3255814,8916,R,18,18,20,,
-90001,202003,100,89,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,
-90002,202001,100,83,,0.817550398,,1.835663813,132.8421946,4826,R,,18,20,,
-90002,202002,100,83,1.223166183,1.244570947,0.906337253,1.082813901,113.3255814,5903,R,18,18,20,,
-90002,202003,100,83,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,
-90003,202001,100,4,,7.466535433,,1.835663813,132.8421946,7586,R,,18,20,,
-90003,202002,100,4,0.133930925,0.710986704,0.906337253,1.082813901,113.3255814,1016,R,18,18,20,,
-90003,202003,100,4,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,
-90004,202001,100,76,,1.305847569,,1.835663813,132.8421946,3975,R,,18,20,,
-90004,202002,100,76,0.765786164,0.82875034,0.906337253,1.082813901,113.3255814,3044,R,18,18,20,,
-90004,202003,100,76,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,
-90005,202001,100,18,,0.622072678,,1.835663813,132.8421946,1941,R,,18,20,,
-90005,202002,100,18,1.607529208,2.583641738,0.906337253,1.082813901,113.3255814,3121,R,18,18,20,,
-90005,202003,100,18,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,
-90006,202001,100,94,,0.763047038,,1.835663813,132.8421946,5405,R,,18,20,,
-90006,202002,100,94,1.310535196,1.422366796,0.906337253,1.082813901,113.3255814,7084,R,18,18,20,,
-90006,202003,100,94,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,
-90007,202001,100,8,,5.333239595,,1.835663813,132.8421946,15172,R,,18,20,,
-90007,202002,100,8,0.187503296,0.812556233,0.906337253,1.082813901,113.3255814,2845,R,18,18,20,,
-90007,202003,100,8,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,
-90008,202001,100,304,,1.129530598,,1.835663813,132.8421946,16298,R,,18,20,,
-90008,202002,100,304,0.885323516,1.009357249,0.906337253,1.082813901,113.3255814,14429,R,18,18,20,,
-90008,202003,100,304,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,
-90009,202001,100,45,,0.740562712,,1.835663813,132.8421946,3698,R,,18,20,,
-90009,202002,100,45,1.350324535,1.185435621,0.906337253,1.082813901,113.3255814,4993,R,18,18,20,,
-90009,202003,100,45,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,
-90010,202001,100,100,,0.760511998,,1.835663813,132.8421946,7722,R,,18,20,,
-90010,202002,100,100,1.314903647,1.551204368,0.906337253,1.082813901,113.3255814,10153,R,18,18,20,,
-90010,202003,100,100,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,
-90011,202001,100,19,,8.365866031,,1.835663813,132.8421946,30344,R,,18,20,,TRUE
-90011,202002,100,19,0.119533351,0.497690693,0.906337253,1.082813901,113.3255814,3627,R,18,18,20,TRUE,
-90011,202003,100,19,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,
-90012,202001,100,304,,1.408940798,,1.835663813,132.8421946,16298,R,,18,20,,
-90012,202002,100,304,0.70975303,0.857831504,0.906337253,1.082813901,113.3255814,11567,R,18,18,20,,
-90012,202003,100,304,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,
-90013,202001,100,54,,1.106799294,,1.835663813,132.8421946,20190,R,,18,20,,
-90013,202002,100,54,0.903506178,0.632817595,0.906337253,1.082813901,113.3255814,18242,R,18,18,20,,
-90013,202003,100,54,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,
-90014,202001,100,47,,0.845985046,,1.835663813,132.8421946,4260,R,,18,20,,
-90014,202002,100,42,1.182053991,0.776557765,0.906337253,1.082813901,113.3255814,5036,R,18,18,20,,
-90014,202003,100,42,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,
-90015,202001,100,57,,3.886845827,,1.835663813,132.8421946,19236,R,,18,20,,
-90015,202002,100,57,0.25727802,1.396267404,0.906337253,1.082813901,113.3255814,4949,R,18,18,20,,
-90015,202003,100,57,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,
-90016,202001,100,163,,0.906730921,,1.835663813,132.8421946,14902,R,,18,20,,
-90016,202002,100,163,1.102863018,0.666628808,0.906337253,1.082813901,113.3255814,16435,R,18,18,20,,
-90016,202003,100,163,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,
-90017,202001,100,149,,0.702275751,,1.835663813,132.8421946,35476,R,,18,20,,
-90017,202002,100,149,1.42394209,0.944611909,0.906337253,1.082813901,113.3255814,50515,R,18,18,20,,
-90017,202003,100,149,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,
-90018,202001,100,126,,0.543204684,,1.835663813,132.8421946,13845,R,,18,20,,TRUE
-90018,202002,100,126,1.840926688,0.929916997,0.906337253,1.082813901,113.3255814,25488,R,18,18,20,TRUE,
-90018,202003,100,126,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,
-90019,202001,100,6,,2.530969376,,1.835663813,132.8421946,1099,R,,18,20,,
-90019,202002,100,6,0.395105531,3.51659919,0.906337253,1.082813901,113.3255814,434,R,18,18,20,,TRUE
-90019,202003,100,6,0.284365646,,1.072463185,,126.2596455,124,R,18,,21,TRUE,
-90020,202001,100,22,,1.677715809,,1.835663813,132.8421946,3348,R,,18,20,,
-90020,202002,100,22,0.596048505,0.395102278,0.906337253,1.082813901,113.3255814,1996,R,18,18,20,,TRUE
-90020,202003,100,22,2.530990214,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,
-90021,202001,100,155,,,,1.835663813,132.8421946,41832.76156,BI,,18,20,,
-90021,202002,100,155,,,0.906337253,1.082813901,113.3255814,22788.90135,BI,18,18,20,,
-90021,202003,100,155,,,1.072463185,,126.2596455,21046,R,18,,21,,
+90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,
+90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,,
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,,
+90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,
+90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,,
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,,
+90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,
+90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,,
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,,
+90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,
+90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,,
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,,
+90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,
+90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,,
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,,
+90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,
+90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,,
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,,
+90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,
+90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,,
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,,
+90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,
+90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,,
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,,
+90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,
+90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,,
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,,
+90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,
+90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,,
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,,
+90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,TRUE
+90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,TRUE,
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,,
+90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,
+90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,,
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,,
+90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,
+90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,,
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,,
+90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,
+90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,,
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,,
+90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,
+90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,,
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,,
+90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,
+90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,,
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,,
+90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,
+90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,,
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,,
+90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,TRUE
+90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,TRUE,
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,,
+90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,
+90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,,TRUE
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,TRUE,
+90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,
+90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,,TRUE
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,TRUE,
+90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,
+90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index 1d98a64a..6a190dd4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-100001,202001,100,89,,1.036787797,,2.097550968,132.8421946,9244,R,,20,20
-100001,202002,100,89,0.964517525,1.43945754,0.91372653,1.170117584,113.3255814,8916,R,20,20,20
-100001,202003,100,89,0.694706146,,1.105984659,,126.2596455,6194,R,20,,21
-100002,202001,100,83,,0.817550398,,2.097550968,132.8421946,4826,R,,20,20
-100002,202002,100,83,1.223166183,1.244570947,0.91372653,1.170117584,113.3255814,5903,R,20,20,20
-100002,202003,100,83,0.803489751,,1.105984659,,126.2596455,4743,R,20,,21
-100003,202001,100,4,,7.466535433,,2.097550968,132.8421946,7586,R,,20,20
-100003,202002,100,4,0.133930925,0.710986704,0.91372653,1.170117584,113.3255814,1016,R,20,20,20
-100003,202003,100,4,1.406496063,,1.105984659,,126.2596455,1429,R,20,,21
-100004,202001,100,76,,1.305847569,,2.097550968,132.8421946,3975,R,,20,20
-100004,202002,100,76,0.765786164,0.82875034,0.91372653,1.170117584,113.3255814,3044,R,20,20,20
-100004,202003,100,76,1.206636005,,1.105984659,,126.2596455,3673,R,20,,21
-100005,202001,100,18,,0.622072678,,2.097550968,132.8421946,1941,R,,20,20
-100005,202002,100,18,1.607529208,2.583641738,0.91372653,1.170117584,113.3255814,3121,R,20,20,20
-100005,202003,100,18,0.387050567,,1.105984659,,126.2596455,1208,R,20,,21
-100006,202001,100,94,,0.763047038,,2.097550968,132.8421946,5405,R,,20,20
-100006,202002,100,94,1.310535196,1.422366796,0.91372653,1.170117584,113.3255814,7084,R,20,20,20
-100006,202003,100,94,0.703053532,,1.105984659,,126.2596455,4980,R,20,,21
-100007,202001,100,8,,5.333239595,,2.097550968,132.8421946,15172,R,,20,20
-100007,202002,100,8,0.187503296,0.812556233,0.91372653,1.170117584,113.3255814,2845,R,20,20,20
-100007,202003,100,8,1.230684055,,1.105984659,,126.2596455,3501,R,20,,21
-100008,202001,100,304,,1.129530598,,2.097550968,132.8421946,16298,R,,20,20
-100008,202002,100,304,0.885323516,1.009357249,0.91372653,1.170117584,113.3255814,14429,R,20,20,20
-100008,202003,100,304,0.990729498,,1.105984659,,126.2596455,14295,R,20,,21
-100009,202001,100,45,,0.740562712,,2.097550968,132.8421946,3698,R,,20,20
-100009,202002,100,45,1.350324535,1.185435621,0.91372653,1.170117584,113.3255814,4993,R,20,20,20
-100009,202003,100,45,0.843571749,,1.105984659,,126.2596455,4212,R,20,,21
-100010,202001,100,100,,0.760511998,,2.097550968,132.8421946,7722,R,,20,20
-100010,202002,100,100,1.314903647,1.551204368,0.91372653,1.170117584,113.3255814,10153,R,20,20,20
-100010,202003,100,100,0.644660382,,1.105984659,,126.2596455,6545,R,20,,21
-100011,202001,100,19,,8.365866031,,2.097550968,132.8421946,30344,R,,20,20
-100011,202002,100,19,0.119533351,0.497690693,0.91372653,1.170117584,113.3255814,3627,R,20,20,20
-100011,202003,100,19,2.00928009,,1.105984659,,126.2596455,7288,R,20,,21
-100012,202001,100,304,,1.408940798,,2.097550968,132.8421946,16298,R,,20,20
-100012,202002,100,304,0.70975303,0.857831504,0.91372653,1.170117584,113.3255814,11567,R,20,20,20
-100012,202003,100,304,1.165730094,,1.105984659,,126.2596455,13484,R,20,,21
-100013,202001,100,54,,1.106799294,,2.097550968,132.8421946,20190,R,,20,20
-100013,202002,100,54,0.903506178,0.632817595,0.91372653,1.170117584,113.3255814,18242,R,20,20,20
-100013,202003,100,54,1.58023419,,1.105984659,,126.2596455,28826,R,20,,21
-100014,202001,100,47,,0.845985046,,2.097550968,132.8421946,4260,R,,20,20
-100014,202002,100,42,1.182053991,0.776557765,0.91372653,1.170117584,113.3255814,5036,R,20,20,20
-100014,202003,100,42,1.28773421,,1.105984659,,126.2596455,6484,R,20,,21
-100015,202001,100,57,,3.886845827,,2.097550968,132.8421946,19236,R,,20,20
-100015,202002,100,57,0.25727802,1.396267404,0.91372653,1.170117584,113.3255814,4949,R,20,20,20
-100015,202003,100,57,0.716195191,,1.105984659,,126.2596455,3544,R,20,,21
-100016,202001,100,163,,0.906730921,,2.097550968,132.8421946,14902,R,,20,20
-100016,202002,100,163,1.102863018,0.666628808,0.91372653,1.170117584,113.3255814,16435,R,20,20,20
-100016,202003,100,163,1.500085186,,1.105984659,,126.2596455,24653,R,20,,21
-100017,202001,100,149,,0.702275751,,2.097550968,132.8421946,35476,R,,20,20
-100017,202002,100,149,1.42394209,0.944611909,0.91372653,1.170117584,113.3255814,50515,R,20,20,20
-100017,202003,100,149,1.058635817,,1.105984659,,126.2596455,53477,R,20,,21
-100018,202001,100,126,,0.543204684,,2.097550968,132.8421946,13845,R,,20,20
-100018,202002,100,126,1.840926688,0.929916997,0.91372653,1.170117584,113.3255814,25488,R,20,20,20
-100018,202003,100,126,1.075364795,,1.105984659,,126.2596455,27409,R,20,,21
-100019,202001,100,6,,2.530969376,,2.097550968,132.8421946,1099,R,,20,20
-100019,202002,100,6,0.395105531,3.51659919,0.91372653,1.170117584,113.3255814,434,R,20,20,20
-100019,202003,100,6,0.284365646,,1.105984659,,126.2596455,124,R,20,,21
-100020,202001,100,22,,1.677715809,,2.097550968,132.8421946,3348,R,,20,20
-100020,202002,100,22,0.596048505,0.395102278,0.91372653,1.170117584,113.3255814,1996,R,20,20,20
-100020,202003,100,22,2.530990214,,1.105984659,,126.2596455,5051,R,20,,21
-100021,202001,100,155,,,,2.097550968,132.8421946,51654.90822,BI,,20,20
-100021,202002,100,155,,,0.91372653,1.170117584,113.3255814,24626.29467,BI,20,20,20
-100021,202003,100,155,,,1.105984659,,126.2596455,21046,R,20,,21
+100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20
+100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20
+100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21
+100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20
+100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20
+100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21
+100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20
+100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20
+100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21
+100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20
+100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20
+100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21
+100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20
+100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20
+100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21
+100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20
+100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20
+100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21
+100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20
+100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20
+100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21
+100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20
+100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20
+100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21
+100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20
+100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20
+100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21
+100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20
+100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20
+100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21
+100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20
+100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20
+100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21
+100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20
+100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20
+100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21
+100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20
+100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20
+100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21
+100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20
+100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20
+100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21
+100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20
+100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20
+100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21
+100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20
+100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20
+100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21
+100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20
+100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20
+100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21
+100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20
+100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20
+100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21
+100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20
+100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20
+100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21
+100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20
+100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20
+100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21
+100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20
+100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20
+100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index 2f8502ed..8cac5716 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,35 +1,35 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,,1.598925527,96.75644028,8444,R,,10,12,,
-30001,202002,100,51,0.885362387,3.732401398,6.802558774,4.305953095,76.3852459,7476,R,10,9,12,,
-30001,202003,100,51,0.267924024,,1.126581418,,66.21860465,2003,R,9,,9,,
-30002,202001,100,72,,1.195062676,,1.930792743,96.75644028,9343,R,,10,12,,
-30002,202002,100,72,0.836776196,1.596487645,6.802558774,4.305953095,76.3852459,7818,R,10,9,12,,
-30002,202003,100,72,0.626375032,,1.126581418,,66.21860465,4897,R,9,,9,,
-30003,202001,100,7,,4.265190233,,1.930792743,96.75644028,7511,R,,10,12,,
-30003,202002,100,7,0.234456131,0.271256932,6.802558774,4.305953095,76.3852459,1761,R,10,9,12,,
-30003,202003,100,7,3.686541738,,1.126581418,,66.21860465,6492,R,9,,9,,
-30004,202001,100,81,,0.030288689,,1.930792743,96.75644028,64,R,,10,12,,
-30004,202002,100,81,33.015625,11.42162162,6.802558774,4.305953095,76.3852459,2113,R,10,9,12,,
-30004,202003,100,81,0.087553242,,1.126581418,,66.21860465,185,R,9,,9,,
-30005,202001,100,5,,0.941234172,,1.930792743,96.75644028,844,R,,10,12,,
-30005,202002,100,5,1.062434865,3.199201198,6.802558774,4.305953095,76.3852459,897,R,10,9,12,,
-30005,202003,100,5,0.312578027,,1.126581418,,66.21860465,280,R,9,,9,,
-30006,202001,100,14,,0.995885563,,1.930792743,96.75644028,1869,R,,10,12,,
-30006,202002,100,14,1.004131435,1.368417982,6.802558774,4.305953095,76.3852459,1876,R,10,9,12,,
-30006,202003,100,14,0.730770871,,1.126581418,,66.21860465,1371,R,9,,9,,
-30007,202001,100,12,,4.475816911,,1.930792743,96.75644028,12769,R,,10,12,,
-30007,202002,100,12,0.223422901,0.248269056,6.802558774,4.305953095,76.3852459,2853,R,10,9,12,,
-30007,202003,100,12,4.027888195,,1.126581418,,66.21860465,11491,R,9,,9,,
-30008,202001,100,162,,0.023463069,,1.930792743,96.75644028,141,R,,10,12,,TRUE
-30008,202002,100,162,42.62017045,13.86213906,6.802558774,4.305953095,76.3852459,6001,R,10,9,12,TRUE,
-30008,202003,100,162,0.072138939,,1.126581418,,66.21860465,433,R,9,,9,,
-30009,202001,100,26,,1.589639934,,1.930792743,96.75644028,6417,R,,10,12,,
-30009,202002,100,26,0.629073275,3.053782962,6.802558774,4.305953095,76.3852459,4037,R,10,9,12,,
-30009,202003,100,26,0.327462695,,1.126581418,,66.21860465,1322,R,9,,9,,
-30010,202001,100,144,,1.332623847,,1.930792743,96.75644028,28963,R,,10,12,,
-30010,202002,100,144,0.750399298,,6.802558774,4.305953095,76.3852459,21734,R,10,9,12,,
-30011,202001,100,5,,5.249464902,,1.930792743,96.75644028,6009,R,,10,12,,TRUE
-30011,202002,100,5,0.190495606,,6.802558774,4.305953095,76.3852459,1145,R,10,9,12,TRUE,
-30012,202001,100,275,,0.034032235,,1.930792743,96.75644028,256,R,,10,12,,
-30012,202002,100,275,29.38390625,,6.802558774,4.305953095,76.3852459,7522,R,10,9,12,,
-30012,202003,100,275,,,1.126581418,,66.21860465,8474.145427,FIR,9,,9,,
+30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,
+30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,,
+30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,,
+30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,
+30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,,
+30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,,
+30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,
+30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,,
+30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,,
+30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,
+30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,,
+30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,,
+30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,
+30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,,
+30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,,
+30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,
+30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,,
+30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,,
+30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,
+30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,,
+30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,,
+30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,TRUE
+30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,TRUE,
+30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,,
+30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,
+30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,,
+30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,,
+30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,
+30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,,
+30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,TRUE
+30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,TRUE,
+30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,
+30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,,
+30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
index 52e2abc3..f46adf5d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -1,64 +1,64 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-90001,202001,100,89,,1.036787797,,1.504436071,128.8429705,9244,R,,17,19,,,
-90001,202002,100,89,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,8916,R,17,18,20,,,
-90001,202003,100,89,0.694706146,,1.072463185,,126.2596455,6194,R,18,,21,,,
-90002,202001,100,83,,0.817550398,,1.504436071,128.8429705,4826,R,,17,19,,,
-90002,202002,100,83,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,5903,R,17,18,20,,,
-90002,202003,100,83,0.803489751,,1.072463185,,126.2596455,4743,R,18,,21,,,
-90003,202001,100,4,,,,1.504436071,128.8429705,7586,R,,17,19,,,TRUE
-90003,202002,100,4,,0.710986704,0.95177292,1.082813901,113.3255814,1016,R,17,18,20,,,
-90003,202003,100,4,1.406496063,,1.072463185,,126.2596455,1429,R,18,,21,,,
-90004,202001,100,76,,1.305847569,,1.504436071,128.8429705,3975,R,,17,19,,,
-90004,202002,100,76,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,3044,R,17,18,20,,,
-90004,202003,100,76,1.206636005,,1.072463185,,126.2596455,3673,R,18,,21,,,
-90005,202001,100,18,,0.622072678,,1.504436071,128.8429705,1941,R,,17,19,,,
-90005,202002,100,18,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,3121,R,17,18,20,,,
-90005,202003,100,18,0.387050567,,1.072463185,,126.2596455,1208,R,18,,21,,,
-90006,202001,100,94,,0.763047038,,1.504436071,128.8429705,5405,R,,17,19,,,
-90006,202002,100,94,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,7084,R,17,18,20,,,
-90006,202003,100,94,0.703053532,,1.072463185,,126.2596455,4980,R,18,,21,,,
-90007,202001,100,8,,5.333239595,,1.504436071,128.8429705,15172,R,,17,19,,,
-90007,202002,100,8,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,2845,R,17,18,20,,,
-90007,202003,100,8,1.230684055,,1.072463185,,126.2596455,3501,R,18,,21,,,
-90008,202001,100,304,,1.129530598,,1.504436071,128.8429705,16298,R,,17,19,,,
-90008,202002,100,304,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,14429,R,17,18,20,,,
-90008,202003,100,304,0.990729498,,1.072463185,,126.2596455,14295,R,18,,21,,,
-90009,202001,100,45,,0.740562712,,1.504436071,128.8429705,3698,R,,17,19,,,
-90009,202002,100,45,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,4993,R,17,18,20,,,
-90009,202003,100,45,0.843571749,,1.072463185,,126.2596455,4212,R,18,,21,,,
-90010,202001,100,100,,0.760511998,,1.504436071,128.8429705,7722,R,,17,19,,,
-90010,202002,100,100,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,10153,R,17,18,20,,,
-90010,202003,100,100,0.644660382,,1.072463185,,126.2596455,6545,R,18,,21,,,
-90011,202001,100,19,,8.365866031,,1.504436071,128.8429705,30344,R,,17,19,,TRUE,
-90011,202002,100,19,0.119533351,0.497690693,0.95177292,1.082813901,113.3255814,3627,R,17,18,20,TRUE,,
-90011,202003,100,19,2.00928009,,1.072463185,,126.2596455,7288,R,18,,21,,,
-90012,202001,100,304,,1.408940798,,1.504436071,128.8429705,16298,R,,17,19,,,
-90012,202002,100,304,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,11567,R,17,18,20,,,
-90012,202003,100,304,1.165730094,,1.072463185,,126.2596455,13484,R,18,,21,,,
-90013,202001,100,54,,1.106799294,,1.504436071,128.8429705,20190,R,,17,19,,,
-90013,202002,100,54,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,18242,R,17,18,20,,,
-90013,202003,100,54,1.58023419,,1.072463185,,126.2596455,28826,R,18,,21,,,
-90014,202001,100,47,,0.845985046,,1.504436071,128.8429705,4260,R,,17,19,,,
-90014,202002,100,42,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,5036,R,17,18,20,,,
-90014,202003,100,42,1.28773421,,1.072463185,,126.2596455,6484,R,18,,21,,,
-90015,202001,100,57,,3.886845827,,1.504436071,128.8429705,19236,R,,17,19,,,
-90015,202002,100,57,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,4949,R,17,18,20,,,
-90015,202003,100,57,0.716195191,,1.072463185,,126.2596455,3544,R,18,,21,,,
-90016,202001,100,163,,0.906730921,,1.504436071,128.8429705,14902,R,,17,19,,,
-90016,202002,100,163,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,16435,R,17,18,20,,,
-90016,202003,100,163,1.500085186,,1.072463185,,126.2596455,24653,R,18,,21,,,
-90017,202001,100,149,,0.702275751,,1.504436071,128.8429705,35476,R,,17,19,,,
-90017,202002,100,149,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,50515,R,17,18,20,,,
-90017,202003,100,149,1.058635817,,1.072463185,,126.2596455,53477,R,18,,21,,,
-90018,202001,100,126,,0.543204684,,1.504436071,128.8429705,13845,R,,17,19,,TRUE,
-90018,202002,100,126,1.840926688,0.929916997,0.95177292,1.082813901,113.3255814,25488,R,17,18,20,TRUE,,
-90018,202003,100,126,1.075364795,,1.072463185,,126.2596455,27409,R,18,,21,,,
-90019,202001,100,6,,2.530969376,,1.504436071,128.8429705,1099,R,,17,19,,,
-90019,202002,100,6,0.395105531,3.51659919,0.95177292,1.082813901,113.3255814,434,R,17,18,20,,TRUE,
-90019,202003,100,6,0.284365646,,1.072463185,,126.2596455,124,R,18,,21,TRUE,,
-90020,202001,100,22,,1.677715809,,1.504436071,128.8429705,3348,R,,17,19,,,
-90020,202002,100,22,0.596048505,0.395102278,0.95177292,1.082813901,113.3255814,1996,R,17,18,20,,TRUE,
-90020,202003,100,22,2.530990214,,1.072463185,,126.2596455,5051,R,18,,21,TRUE,,
-90021,202001,100,155,,,,1.504436071,128.8429705,34284.44522,BI,,17,19,,,
-90021,202002,100,155,,,0.95177292,1.082813901,113.3255814,22788.90136,BI,17,18,20,,,
-90021,202003,100,155,,,1.072463185,,126.2596455,21046,R,18,,21,,,
+90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,,
+90001,202002,100,89,0.964517524881004,1.43945753955441,0.951790,1.082843,113.3255814,8916,R,17,18,20,,,
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,,,
+90002,202001,100,83,,0.81755039810266,1,1.504462,128.8429705,4826,R,0,17,19,,,
+90002,202002,100,83,1.22316618317447,1.24457094665823,0.951790,1.082843,113.3255814,5903,R,17,18,20,,,
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,,,
+90003,202001,100,4,,,1,1.504462,128.8429705,7586,R,0,17,19,,,TRUE
+90003,202002,100,4,,0.710986703988803,0.951790,1.082843,113.3255814,1016,R,17,18,20,,,
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,,,
+90004,202001,100,76,,1.30584756898817,1,1.504462,128.8429705,3975,R,0,17,19,,,
+90004,202002,100,76,0.765786163522013,0.828750340321263,0.951790,1.082843,113.3255814,3044,R,17,18,20,,,
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,,,
+90005,202001,100,18,,0.62191605254726,1,1.504462,128.8429705,1941,R,0,17,19,,,
+90005,202002,100,18,1.60793405461103,2.58360927152318,0.951790,1.082843,113.3255814,3121,R,17,18,20,,,
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,,,
+90006,202001,100,94,,0.762987012987013,1,1.504462,128.8429705,5405,R,0,17,19,,,
+90006,202002,100,94,1.31063829787234,1.42248995983936,0.951790,1.082843,113.3255814,7084,R,17,18,20,,,
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,,,
+90007,202001,100,8,,5.33286467486819,1,1.504462,128.8429705,15172,R,0,17,19,,,
+90007,202002,100,8,0.18751647772212,0.812624964295915,0.951790,1.082843,113.3255814,2845,R,17,18,20,,,
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,,,
+90008,202001,100,304,,1.12953080601566,1,1.504462,128.8429705,16298,R,0,17,19,,,
+90008,202002,100,304,0.885323352558596,1.00937390696048,0.951790,1.082843,113.3255814,14429,R,17,18,20,,,
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,,,
+90009,202001,100,45,,0.740636891648308,1,1.504462,128.8429705,3698,R,0,17,19,,,
+90009,202002,100,45,1.35018929150892,1.18542260208927,0.951790,1.082843,113.3255814,4993,R,17,18,20,,,
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,,,
+90010,202001,100,100,,0.76056338028169,1,1.504462,128.8429705,7722,R,0,17,19,,,
+90010,202002,100,100,1.31481481481481,1.55126050420168,0.951790,1.082843,113.3255814,10153,R,17,18,20,,,
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,,,
+90011,202001,100,19,,8.36614281775572,1,1.504462,128.8429705,30344,R,0,17,19,,TRUE,
+90011,202002,100,19,0.119529396256262,0.497667398463227,0.951790,1.082843,113.3255814,3627,R,17,18,20,TRUE,,
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,,,
+90012,202001,100,304,,1.40900838592548,1,1.504462,128.8429705,16298,R,0,17,19,,,
+90012,202002,100,304,0.709718983924408,0.857831504004746,0.951790,1.082843,113.3255814,11567,R,17,18,20,,,
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,,,
+90013,202001,100,54,,1.10678653656397,1,1.504462,128.8429705,20190,R,0,17,19,,,
+90013,202002,100,54,0.903516592372462,0.63283147158815,0.951790,1.082843,113.3255814,18242,R,17,18,20,,,
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,,,
+90014,202001,100,47,,0.845909451945989,1,1.504462,128.8429705,4260,R,0,17,19,,,
+90014,202002,100,42,1.18215962441315,0.776681061073411,0.951790,1.082843,113.3255814,5036,R,17,18,20,,,
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,,,
+90015,202001,100,57,,3.88684582743989,1,1.504462,128.8429705,19236,R,0,17,19,,,
+90015,202002,100,57,0.257278020378457,1.39644469525959,0.951790,1.082843,113.3255814,4949,R,17,18,20,,,
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,,,
+90016,202001,100,163,,0.906723456038941,1,1.504462,128.8429705,14902,R,0,17,19,,,
+90016,202002,100,163,1.10287209770501,0.666653145661786,0.951790,1.082843,113.3255814,16435,R,17,18,20,,,
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,,,
+90017,202001,100,149,,0.702286449569435,1,1.504462,128.8429705,35476,R,0,17,19,,,
+90017,202002,100,149,1.42392039688804,0.944611702227126,0.951790,1.082843,113.3255814,50515,R,17,18,20,,,
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,,,
+90018,202001,100,126,,0.543196798493409,1,1.504462,128.8429705,13845,R,0,17,19,,TRUE,
+90018,202002,100,126,1.8409534127844,0.929913532051516,0.951790,1.082843,113.3255814,25488,R,17,18,20,TRUE,,
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,,,
+90019,202001,100,6,,2.53225806451613,1,1.504462,128.8429705,1099,R,0,17,19,,,
+90019,202002,100,6,0.394904458598726,3.5,0.951790,1.082843,113.3255814,434,R,17,18,20,,TRUE,
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,TRUE,,
+90020,202001,100,22,,1.67735470941884,1,1.504462,128.8429705,3348,R,0,17,19,,,
+90020,202002,100,22,0.596176821983274,0.395169273411206,0.951790,1.082843,113.3255814,1996,R,17,18,20,,TRUE,
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,TRUE,,
+90021,202001,100,155,,,1,1.504462,128.8429705,34285.974874,BI,0,17,19,,,
+90021,202002,100,155,,,0.951790,1.082843,113.3255814,22789.522255,BI,17,18,20,,,
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index 9c04db54..d48b5918 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,,1.162271841,96.73383283,8444,R,,2,12,,
-30001,202002,100,51,0.885362387,3.732401398,0.861069292,2.064295653,76.3675837,7476,R,2,1,12,,TRUE
-30001,202003,100,51,0.267924024,,0.484426733,,76.13443331,2003,R,1,,11,TRUE,
-30002,202001,100,72,,1.195062676,,1.162271841,96.73383283,9343,R,,2,12,,
-30002,202002,100,72,0.836776196,1.596487645,0.861069292,2.064295653,76.3675837,7818,R,2,1,12,,TRUE
-30002,202003,100,72,0.626375032,,0.484426733,,76.13443331,4897,R,1,,11,TRUE,
-30003,202001,100,7,,4.265190233,,1.162271841,96.73383283,7511,R,,2,12,,TRUE
-30003,202002,100,7,0.234456131,0.271256932,0.861069292,2.064295653,76.3675837,1761,R,2,1,12,TRUE,TRUE
-30003,202003,100,7,3.686541738,,0.484426733,,76.13443331,6492,R,1,,11,TRUE,
-30004,202001,100,81,,0.030288689,,1.162271841,96.73383283,64,R,,2,12,,TRUE
-30004,202002,100,81,33.015625,11.42162162,0.861069292,2.064295653,76.3675837,2113,R,2,1,12,TRUE,TRUE
-30004,202003,100,81,0.087553242,,0.484426733,,76.13443331,185,R,1,,11,TRUE,
-30005,202001,100,5,,0.941234172,,1.162271841,96.73383283,844,R,,2,12,,TRUE
-30005,202002,100,5,1.062434865,3.199201198,0.861069292,2.064295653,76.3675837,897,R,2,1,12,TRUE,TRUE
-30005,202003,100,5,0.312578027,,0.484426733,,76.13443331,280,R,1,,11,TRUE,
-30006,202001,100,14,,0.995885563,,1.162271841,96.73383283,1869,R,,2,12,,TRUE
-30006,202002,100,14,1.004131435,1.368417982,0.861069292,2.064295653,76.3675837,1876,R,2,1,12,TRUE,TRUE
-30006,202003,100,14,0.730770871,,0.484426733,,76.13443331,1371,R,1,,11,TRUE,
-30007,202001,100,12,,4.475816911,,1.162271841,96.73383283,12769,R,,2,12,,TRUE
-30007,202002,100,12,0.223422901,0.248269056,0.861069292,2.064295653,76.3675837,2853,R,2,1,12,TRUE,TRUE
-30007,202003,100,12,4.027888195,,0.484426733,,76.13443331,11491,R,1,,11,TRUE,
-30008,202001,100,162,,0.023463069,,1.162271841,96.73383283,141,R,,2,12,,TRUE
-30008,202002,100,162,42.62017045,13.86213906,0.861069292,2.064295653,76.3675837,6001,R,2,1,12,TRUE,TRUE
-30008,202003,100,162,0.072138939,,0.484426733,,76.13443331,433,R,1,,11,TRUE,
-30009,202001,100,26,,1.589639934,,1.162271841,96.73383283,6417,R,,2,12,,TRUE
-30009,202002,100,26,0.629073275,3.053782962,0.861069292,2.064295653,76.3675837,4037,R,2,1,12,TRUE,TRUE
-30009,202003,100,26,0.327462695,,0.484426733,,76.13443331,1322,R,1,,11,TRUE,
-30010,202001,100,144,,1.332623847,,1.162271841,96.73383283,28963,R,,2,12,,TRUE
-30010,202002,100,144,0.750399298,2.064295653,0.861069292,2.064295653,76.3675837,21734,R,2,1,12,TRUE,
-30010,202003,100,144,0.484426733,,0.484426733,,76.13443331,10529,R,1,,11,,
-30011,202001,100,5,,5.249464902,,1.162271841,96.73383283,6009,R,,2,12,,TRUE
-30011,202002,100,5,0.190495606,0.226047443,0.861069292,2.064295653,76.3675837,1145,R,2,1,12,TRUE,TRUE
-30011,202003,100,5,4.423850085,,0.484426733,,76.13443331,5064,R,1,,11,TRUE,
-30012,202001,100,275,,0.034032235,,1.162271841,96.73383283,256,R,,2,12,,TRUE
-30012,202002,100,275,29.38390625,,0.861069292,2.064295653,76.3675837,7522,R,2,1,12,TRUE,
-30012,202003,100,275,,,0.484426733,,76.13443331,3643.857886,FIR,1,,11,,
+30001,202001,100,51,,1.1294810058855,1,1.162271841,96.756440,8444,R,0,2,12,,
+30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,,TRUE
+30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,TRUE,
+30002,202001,100,72,,1.19506267587618,1,1.162271841,96.756440,9343,R,0,2,12,,
+30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,,TRUE
+30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,TRUE,
+30003,202001,100,7,,4.26519023282226,1,1.162271841,96.756440,7511,R,0,2,12,,TRUE
+30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,TRUE,TRUE
+30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,TRUE,
+30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.756440,64,R,0,2,12,,TRUE
+30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,TRUE,TRUE
+30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,TRUE,
+30005,202001,100,5,,0.940914158305463,1,1.162271841,96.756440,844,R,0,2,12,,TRUE
+30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,TRUE,TRUE
+30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,TRUE,
+30006,202001,100,14,,0.996268656716418,1,1.162271841,96.756440,1869,R,0,2,12,,TRUE
+30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,TRUE,TRUE
+30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,TRUE,
+30007,202001,100,12,,4.47563967753242,1,1.162271841,96.756440,12769,R,0,2,12,,TRUE
+30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,TRUE,TRUE
+30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,TRUE,
+30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.756440,141,R,0,2,12,,TRUE
+30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,TRUE,TRUE
+30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,TRUE,
+30009,202001,100,26,,1.58954669308893,1,1.162271841,96.756440,6417,R,0,2,12,,TRUE
+30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,TRUE,TRUE
+30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,TRUE,
+30010,202001,100,144,,1.33261249654919,1,1.162271841,96.756440,28963,R,0,2,12,,TRUE
+30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,TRUE,
+30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,,
+30011,202001,100,5,,5.24803493449782,1,1.162271841,96.756440,6009,R,0,2,12,,TRUE
+30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,TRUE,TRUE
+30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,TRUE,
+30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.756440,256,R,0,2,12,,TRUE
+30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,TRUE,
+30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
index 2c693039..061e3c1a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-30001,202001,100,51,,,,1,61.12436116,8444,R,,0,9,,,TRUE
+30001,202001,100,51,,,1,1,61.12436116,8444,R,0,0,9,,,TRUE
 30001,202002,100,51,,,1,1,48.04940375,7476,R,0,0,9,,,TRUE
-30001,202003,100,51,,,1,,85.37820513,2003,R,0,,10,,,TRUE
-30002,202001,100,72,,,,1,61.12436116,9343,R,,0,9,,,TRUE
+30001,202003,100,51,,,1,1,85.37820513,2003,R,0,0,10,,,TRUE
+30002,202001,100,72,,,1,1,61.12436116,9343,R,0,0,9,,,TRUE
 30002,202002,100,72,,,1,1,48.04940375,7818,R,0,0,9,,,TRUE
-30002,202003,100,72,,,1,,85.37820513,4897,R,0,,10,,,TRUE
-30003,202001,100,7,,4.265190233,,1,61.12436116,7511,R,,0,9,,TRUE,
-30003,202002,100,7,0.234456131,0.271256932,1,1,48.04940375,1761,R,0,0,9,TRUE,TRUE,
-30003,202003,100,7,3.686541738,,1,,85.37820513,6492,R,0,,10,TRUE,,
-30004,202001,100,81,,0.030288689,,1,61.12436116,64,R,,0,9,,TRUE,
-30004,202002,100,81,33.015625,11.42162162,1,1,48.04940375,2113,R,0,0,9,TRUE,TRUE,
-30004,202003,100,81,0.087553242,,1,,85.37820513,185,R,0,,10,TRUE,,
-30005,202001,100,5,,0.941234172,,1,61.12436116,844,R,,0,9,,TRUE,
-30005,202002,100,5,1.062434865,3.199201198,1,1,48.04940375,897,R,0,0,9,TRUE,TRUE,
-30005,202003,100,5,0.312578027,,1,,85.37820513,280,R,0,,10,TRUE,,
-30006,202001,100,14,,0.995885563,,1,61.12436116,1869,R,,0,9,,TRUE,
-30006,202002,100,14,1.004131435,1.368417982,1,1,48.04940375,1876,R,0,0,9,TRUE,TRUE,
-30006,202003,100,14,0.730770871,,1,,85.37820513,1371,R,0,,10,TRUE,,
-30007,202001,100,12,,4.475816911,,1,61.12436116,12769,R,,0,9,,TRUE,
-30007,202002,100,12,0.223422901,0.248269056,1,1,48.04940375,2853,R,0,0,9,TRUE,TRUE,
-30007,202003,100,12,4.027888195,,1,,85.37820513,11491,R,0,,10,TRUE,,
-30008,202001,100,162,,0.023463069,,1,61.12436116,141,R,,0,9,,TRUE,
-30008,202002,100,162,42.62017045,13.86213906,1,1,48.04940375,6001,R,0,0,9,TRUE,TRUE,
-30008,202003,100,162,0.072138939,,1,,85.37820513,433,R,0,,10,TRUE,,
-30009,202001,100,26,,1.589639934,,1,61.12436116,6417,R,,0,9,,TRUE,
-30009,202002,100,26,0.629073275,3.053782962,1,1,48.04940375,4037,R,0,0,9,TRUE,TRUE,
-30009,202003,100,26,0.327462695,,1,,85.37820513,1322,R,0,,10,TRUE,,
-30010,202001,100,144,,,,1,61.12436116,28963,R,,0,9,,,TRUE
+30002,202003,100,72,,,1,1,85.37820513,4897,R,0,0,10,,,TRUE
+30003,202001,100,7,,4.26519023282226,1,1,61.12436116,7511,R,0,0,9,,TRUE,
+30003,202002,100,7,0.234456131007855,0.271256931608133,1,1,48.04940375,1761,R,0,0,9,TRUE,TRUE,
+30003,202003,100,7,3.68654173764906,,1,1,85.37820513,6492,R,0,0,10,TRUE,,
+30004,202001,100,81,,0.0302886890676763,1,1,61.12436116,64,R,0,0,9,,TRUE,
+30004,202002,100,81,33.015625,11.4216216216216,1,1,48.04940375,2113,R,0,0,9,TRUE,TRUE,
+30004,202003,100,81,0.0875532418362518,,1,1,85.37820513,185,R,0,0,10,TRUE,,
+30005,202001,100,5,,0.940914158305463,1,1,61.12436116,844,R,0,0,9,,TRUE,
+30005,202002,100,5,1.06279620853081,3.20357142857143,1,1,48.04940375,897,R,0,0,9,TRUE,TRUE,
+30005,202003,100,5,0.312151616499443,,1,1,85.37820513,280,R,0,0,10,TRUE,,
+30006,202001,100,14,,0.996268656716418,1,1,61.12436116,1869,R,0,0,9,,TRUE,
+30006,202002,100,14,1.00374531835206,1.36834427425237,1,1,48.04940375,1876,R,0,0,9,TRUE,TRUE,
+30006,202003,100,14,0.730810234541578,,1,1,85.37820513,1371,R,0,0,10,TRUE,,
+30007,202001,100,12,,4.47563967753242,1,1,61.12436116,12769,R,0,0,9,,TRUE,
+30007,202002,100,12,0.223431748766544,0.248281263597598,1,1,48.04940375,2853,R,0,0,9,TRUE,TRUE,
+30007,202003,100,12,4.02769015071854,,1,1,85.37820513,11491,R,0,0,10,TRUE,,
+30008,202001,100,162,,0.0234960839860023,1,1,61.12436116,141,R,0,0,9,,TRUE,
+30008,202002,100,162,42.5602836879433,13.8591224018476,1,1,48.04940375,6001,R,0,0,9,TRUE,TRUE,
+30008,202003,100,162,0.0721546408931845,,1,1,85.37820513,433,R,0,0,10,TRUE,,
+30009,202001,100,26,,1.58954669308893,1,1,61.12436116,6417,R,0,0,9,,TRUE,
+30009,202002,100,26,0.629110176094748,3.05370650529501,1,1,48.04940375,4037,R,0,0,9,TRUE,TRUE,
+30009,202003,100,26,0.327470894228387,,1,1,85.37820513,1322,R,0,0,10,TRUE,,
+30010,202001,100,144,,,1,1,61.12436116,28963,R,0,0,9,,,TRUE
 30010,202002,100,144,,,1,1,48.04940375,21734,R,0,0,9,,,TRUE
-30010,202003,100,144,,,1,,85.37820513,10529,R,0,,10,,,TRUE
-30011,202001,100,5,,5.249464902,,1,61.12436116,6009,R,,0,9,,TRUE,
-30011,202002,100,5,0.190495606,0.226047443,1,1,48.04940375,1145,R,0,0,9,TRUE,TRUE,
-30011,202003,100,5,4.423850085,,1,,85.37820513,5064,R,0,,10,TRUE,,
-30012,202001,100,275,,0.034032235,,1,61.12436116,256,R,,0,9,,TRUE,
-30012,202002,100,275,29.38390625,,1,1,48.04940375,7522,R,0,0,9,TRUE,,
-30012,202003,100,275,,,1,,85.37820513,7522,FIR,0,,10,,,
+30010,202003,100,144,,,1,1,85.37820513,10529,R,0,0,10,,,TRUE
+30011,202001,100,5,,5.24803493449782,1,1,61.12436116,6009,R,0,0,9,,TRUE,
+30011,202002,100,5,0.190547512065235,0.226105845181675,1,1,48.04940375,1145,R,0,0,9,TRUE,TRUE,
+30011,202003,100,5,4.42270742358079,,1,1,85.37820513,5064,R,0,0,10,TRUE,,
+30012,202001,100,275,,0.0340335017282638,1,1,61.12436116,256,R,0,0,9,,TRUE,
+30012,202002,100,275,29.3828125,,1,1,48.04940375,7522,R,0,0,9,TRUE,,
+30012,202003,100,275,,,1,1,85.37820513,7522,FIR,0,0,10,,,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 19514f39..ec50d727 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -63,8 +63,6 @@ upper_trim = 10
 trim_threshold = 10
 
 [43_TB_10_BI_BI_R_boundary]
-forward_link_col = "forward"
-backward_link_col = "backward"
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
@@ -108,6 +106,10 @@ lower_trim = 50
 upper_trim = 50
 trim_threshold = 10
 
+[50_R_R_FI_50_weight]
+weight = 0.5
+weight_periodicity = 12
+
 [65_TB_10_BI_BI_R_50_weight_filtered]
 link_filter = "NOT(identifier = '90003' AND date = '202001')"
 lower_trim = 50
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 35c04ff4..8982fb3f 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -170,10 +170,8 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
 
     with open('tests/imputation/mean_of_ratios.toml', 'r') as f:
         new_toml_string = toml.load(f)
-        print(new_toml_string)
     if scenario in new_toml_string.keys():
         imputation_kwargs.update(new_toml_string[scenario])
-        print(imputation_kwargs)
 
     if scenario_type.startswith("back_data"):
         min_period_df = scenario_expected_output.selectExpr("min(" + period_col + ")")

From 2328cae13934eaa7de84454d42aef0fc8491c824 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 26 Apr 2023 16:33:09 +0100
Subject: [PATCH 215/531] Update poetry lock file

---
 poetry.lock | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index c3b66664..e5f66e3f 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -291,22 +291,22 @@ files = [
 
 [[package]]
 name = "platformdirs"
-version = "3.2.0"
+version = "3.3.0"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-3.2.0-py3-none-any.whl", hash = "sha256:ebe11c0d7a805086e99506aa331612429a72ca7cd52a1f0d277dc4adc20cb10e"},
-    {file = "platformdirs-3.2.0.tar.gz", hash = "sha256:d5b638ca397f25f979350ff789db335903d7ea010ab28903f57b27e1b16c2b08"},
+    {file = "platformdirs-3.3.0-py3-none-any.whl", hash = "sha256:ea61fd7b85554beecbbd3e9b37fb26689b227ffae38f73353cbcc1cf8bd01878"},
+    {file = "platformdirs-3.3.0.tar.gz", hash = "sha256:64370d47dc3fca65b4879f89bdead8197e93e05d696d6d1816243ebae8595da5"},
 ]
 
 [package.dependencies]
 typing-extensions = {version = ">=4.5", markers = "python_version < \"3.8\""}
 
 [package.extras]
-docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"]
-test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"]
+docs = ["furo (>=2023.3.27)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"]
+test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"]
 
 [[package]]
 name = "pluggy"

From 6170243edc18c0fed22a2b0948a4343fef5e2fe6 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 26 Apr 2023 16:43:47 +0100
Subject: [PATCH 216/531] Removed testing code.

---
 statistical_methods_library/imputation/ratio_calculators.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index e5436d2d..7ee2356c 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -248,8 +248,6 @@ def upper_bound(c):
         "filtered_backward",
         "trimmed_forward",
         "trimmed_backward",
-        "num_forward",
-        "num_backward",
     )
 
     return [
@@ -263,8 +261,6 @@ def upper_bound(c):
                 "filtered_backward": filtered_backward_col,
                 "trimmed_forward": trimmed_forward_col,
                 "trimmed_backward": trimmed_backward_col,
-                "num_forward": "num_forward",
-                "num_backward": "num_backward",
             },
         ),
         RatioCalculationResult(

From ea5dfd73884979a4266c0bf155dd2a2093e1a16b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 27 Apr 2023 13:19:08 +0100
Subject: [PATCH 217/531] Simplify column name mapping creation and reformat
 with Black

---
 .../imputation/engine.py                      | 32 +++++++++----------
 .../imputation/ratio_calculators.py           | 12 ++++---
 2 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index edac3497..ec12b4b1 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -80,14 +80,8 @@ def impute(
         "aux": auxiliary_col,
     }
 
-    optional_params = {
-        "forward": forward_link_col,
-        "backward": backward_link_col,
-        "construction": construction_link_col,
-    }
-
     # Mapping of column aliases to parameters
-    created_col_mapping = {
+    full_col_mapping = {
         "output": output_col,
         "marker": marker_col,
         "count_construction": count_construction_col,
@@ -95,19 +89,25 @@ def impute(
         "count_backward": count_backward_col,
     }
 
-    new_link_map = {
-        "forward": "forward",
-        "backward": "backward",
-        "construction": "construction",
-    }
-
     if forward_link_col is not None:
-        input_params.update(optional_params)
+        input_params.update(
+            {
+                "forward": forward_link_col,
+                "backward": backward_link_col,
+                "construction": construction_link_col,
+            }
+        )
 
-    full_col_mapping = {**input_params, **created_col_mapping}
+    full_col_mapping.update(input_params)
 
     if forward_link_col is None:
-        full_col_mapping = {**full_col_mapping, **new_link_map}
+        full_col_mapping.update(
+            {
+                "forward": "forward",
+                "backward": "backward",
+                "construction": "construction",
+            }
+        )
 
     back_expected_columns = {
         "ref": reference_col,
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 7ee2356c..072c7a92 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -192,8 +192,10 @@ def upper_bound(c):
                     col("num_forward").between(
                         col("lower_forward"), col("upper_forward")
                     )
-                    | ((trim_threshold - col("count_filtered_forward"))
-                    >= col("count_forward"))
+                    | (
+                        (trim_threshold - col("count_filtered_forward"))
+                        >= col("count_forward")
+                    )
                 ),
             )
             .withColumn(
@@ -202,8 +204,10 @@ def upper_bound(c):
                     col("num_backward").between(
                         col("lower_backward"), col("upper_backward")
                     )
-                    | ((trim_threshold - col("count_filtered_backward"))
-                    >= col("count_backward"))
+                    | (
+                        (trim_threshold - col("count_filtered_backward"))
+                        >= col("count_backward")
+                    )
                 ),
             )
         )

From d25fc361f823e7a4323ac1228e470258337f437b Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 27 Apr 2023 14:02:19 +0100
Subject: [PATCH 218/531] Replaced tests 48/49. Added test 70.

---
 .../46_TB_10_BI_BI_R_filtered_output.csv      | 128 +++++++++---------
 ...-R_R_FI_filtered_partial_default_input.csv |  22 +++
 ...R_R_FI_filtered_partial_default_output.csv |  22 +++
 ...8_TB_50_filtered_partial_default_input.csv |  37 -----
 ..._TB_50_filtered_partial_default_output.csv |  37 -----
 ...49_C_FI_FI_filtered_full_default_input.csv |  22 +++
 ...9_C_FI_FI_filtered_full_default_output.csv |  22 +++
 .../49_TB_50_filtered_full_default_input.csv  |  37 -----
 .../49_TB_50_filtered_full_default_output.csv |  37 -----
 ..._FI_FI_R_FI_alternating_filtered_input.csv |  29 ++++
 ...FI_FI_R_FI_alternating_filtered_output.csv |  29 ++++
 tests/imputation/mean_of_ratios.toml          |  27 ++--
 12 files changed, 222 insertions(+), 227 deletions(-)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
index f46adf5d..12de5ea1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,,
-90001,202002,100,89,0.964517524881004,1.43945753955441,0.951790,1.082843,113.3255814,8916,R,17,18,20,,,
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,,,
-90002,202001,100,83,,0.81755039810266,1,1.504462,128.8429705,4826,R,0,17,19,,,
-90002,202002,100,83,1.22316618317447,1.24457094665823,0.951790,1.082843,113.3255814,5903,R,17,18,20,,,
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,,,
-90003,202001,100,4,,,1,1.504462,128.8429705,7586,R,0,17,19,,,TRUE
-90003,202002,100,4,,0.710986703988803,0.951790,1.082843,113.3255814,1016,R,17,18,20,,,
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,,,
-90004,202001,100,76,,1.30584756898817,1,1.504462,128.8429705,3975,R,0,17,19,,,
-90004,202002,100,76,0.765786163522013,0.828750340321263,0.951790,1.082843,113.3255814,3044,R,17,18,20,,,
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,,,
-90005,202001,100,18,,0.62191605254726,1,1.504462,128.8429705,1941,R,0,17,19,,,
-90005,202002,100,18,1.60793405461103,2.58360927152318,0.951790,1.082843,113.3255814,3121,R,17,18,20,,,
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,,,
-90006,202001,100,94,,0.762987012987013,1,1.504462,128.8429705,5405,R,0,17,19,,,
-90006,202002,100,94,1.31063829787234,1.42248995983936,0.951790,1.082843,113.3255814,7084,R,17,18,20,,,
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,,,
-90007,202001,100,8,,5.33286467486819,1,1.504462,128.8429705,15172,R,0,17,19,,,
-90007,202002,100,8,0.18751647772212,0.812624964295915,0.951790,1.082843,113.3255814,2845,R,17,18,20,,,
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,,,
-90008,202001,100,304,,1.12953080601566,1,1.504462,128.8429705,16298,R,0,17,19,,,
-90008,202002,100,304,0.885323352558596,1.00937390696048,0.951790,1.082843,113.3255814,14429,R,17,18,20,,,
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,,,
-90009,202001,100,45,,0.740636891648308,1,1.504462,128.8429705,3698,R,0,17,19,,,
-90009,202002,100,45,1.35018929150892,1.18542260208927,0.951790,1.082843,113.3255814,4993,R,17,18,20,,,
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,,,
-90010,202001,100,100,,0.76056338028169,1,1.504462,128.8429705,7722,R,0,17,19,,,
-90010,202002,100,100,1.31481481481481,1.55126050420168,0.951790,1.082843,113.3255814,10153,R,17,18,20,,,
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,,,
-90011,202001,100,19,,8.36614281775572,1,1.504462,128.8429705,30344,R,0,17,19,,TRUE,
-90011,202002,100,19,0.119529396256262,0.497667398463227,0.951790,1.082843,113.3255814,3627,R,17,18,20,TRUE,,
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,,,
-90012,202001,100,304,,1.40900838592548,1,1.504462,128.8429705,16298,R,0,17,19,,,
-90012,202002,100,304,0.709718983924408,0.857831504004746,0.951790,1.082843,113.3255814,11567,R,17,18,20,,,
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,,,
-90013,202001,100,54,,1.10678653656397,1,1.504462,128.8429705,20190,R,0,17,19,,,
-90013,202002,100,54,0.903516592372462,0.63283147158815,0.951790,1.082843,113.3255814,18242,R,17,18,20,,,
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,,,
-90014,202001,100,47,,0.845909451945989,1,1.504462,128.8429705,4260,R,0,17,19,,,
-90014,202002,100,42,1.18215962441315,0.776681061073411,0.951790,1.082843,113.3255814,5036,R,17,18,20,,,
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,,,
-90015,202001,100,57,,3.88684582743989,1,1.504462,128.8429705,19236,R,0,17,19,,,
-90015,202002,100,57,0.257278020378457,1.39644469525959,0.951790,1.082843,113.3255814,4949,R,17,18,20,,,
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,,,
-90016,202001,100,163,,0.906723456038941,1,1.504462,128.8429705,14902,R,0,17,19,,,
-90016,202002,100,163,1.10287209770501,0.666653145661786,0.951790,1.082843,113.3255814,16435,R,17,18,20,,,
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,,,
-90017,202001,100,149,,0.702286449569435,1,1.504462,128.8429705,35476,R,0,17,19,,,
-90017,202002,100,149,1.42392039688804,0.944611702227126,0.951790,1.082843,113.3255814,50515,R,17,18,20,,,
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,,,
-90018,202001,100,126,,0.543196798493409,1,1.504462,128.8429705,13845,R,0,17,19,,TRUE,
-90018,202002,100,126,1.8409534127844,0.929913532051516,0.951790,1.082843,113.3255814,25488,R,17,18,20,TRUE,,
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,,,
-90019,202001,100,6,,2.53225806451613,1,1.504462,128.8429705,1099,R,0,17,19,,,
-90019,202002,100,6,0.394904458598726,3.5,0.951790,1.082843,113.3255814,434,R,17,18,20,,TRUE,
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,TRUE,,
-90020,202001,100,22,,1.67735470941884,1,1.504462,128.8429705,3348,R,0,17,19,,,
-90020,202002,100,22,0.596176821983274,0.395169273411206,0.951790,1.082843,113.3255814,1996,R,17,18,20,,TRUE,
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,TRUE,,
-90021,202001,100,155,,,1,1.504462,128.8429705,34285.974874,BI,0,17,19,,,
-90021,202002,100,155,,,0.951790,1.082843,113.3255814,22789.522255,BI,17,18,20,,,
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,forward_filter,backward_filter
+90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,,,,
+90001,202002,100,89,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,8916,R,17,18,20,,,,,
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,,,,,
+90002,202001,100,83,,0.81755039810266,1,1.504462,128.8429705,4826,R,0,17,19,,,,,
+90002,202002,100,83,1.22316618317447,1.24457094665823,0.95179,1.082843,113.3255814,5903,R,17,18,20,,,,,
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,,,,,
+90003,202001,100,4,,,1,1.504462,128.8429705,7586,R,0,17,19,,,TRUE,,
+90003,202002,100,4,,0.710986703988803,0.95179,1.082843,113.3255814,1016,R,17,18,20,,,,TRUE,
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,,,,,
+90004,202001,100,76,,1.30584756898817,1,1.504462,128.8429705,3975,R,0,17,19,,,,,
+90004,202002,100,76,0.765786163522013,0.828750340321263,0.95179,1.082843,113.3255814,3044,R,17,18,20,,,,,
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,,,,,
+90005,202001,100,18,,0.62191605254726,1,1.504462,128.8429705,1941,R,0,17,19,,,,,
+90005,202002,100,18,1.60793405461103,2.58360927152318,0.95179,1.082843,113.3255814,3121,R,17,18,20,,,,,
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,,,,,
+90006,202001,100,94,,0.762987012987013,1,1.504462,128.8429705,5405,R,0,17,19,,,,,
+90006,202002,100,94,1.31063829787234,1.42248995983936,0.95179,1.082843,113.3255814,7084,R,17,18,20,,,,,
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,,,,,
+90007,202001,100,8,,5.33286467486819,1,1.504462,128.8429705,15172,R,0,17,19,,,,,
+90007,202002,100,8,0.18751647772212,0.812624964295915,0.95179,1.082843,113.3255814,2845,R,17,18,20,,,,,
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,,,,,
+90008,202001,100,304,,1.12953080601566,1,1.504462,128.8429705,16298,R,0,17,19,,,,,
+90008,202002,100,304,0.885323352558596,1.00937390696048,0.95179,1.082843,113.3255814,14429,R,17,18,20,,,,,
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,,,,,
+90009,202001,100,45,,0.740636891648308,1,1.504462,128.8429705,3698,R,0,17,19,,,,,
+90009,202002,100,45,1.35018929150892,1.18542260208927,0.95179,1.082843,113.3255814,4993,R,17,18,20,,,,,
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,,,,,
+90010,202001,100,100,,0.76056338028169,1,1.504462,128.8429705,7722,R,0,17,19,,,,,
+90010,202002,100,100,1.31481481481481,1.55126050420168,0.95179,1.082843,113.3255814,10153,R,17,18,20,,,,,
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,,,,,
+90011,202001,100,19,,8.36614281775572,1,1.504462,128.8429705,30344,R,0,17,19,,TRUE,,,
+90011,202002,100,19,0.119529396256262,0.497667398463227,0.95179,1.082843,113.3255814,3627,R,17,18,20,TRUE,,,,
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,,,,,
+90012,202001,100,304,,1.40900838592548,1,1.504462,128.8429705,16298,R,0,17,19,,,,,
+90012,202002,100,304,0.709718983924408,0.857831504004746,0.95179,1.082843,113.3255814,11567,R,17,18,20,,,,,
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,,,,,
+90013,202001,100,54,,1.10678653656397,1,1.504462,128.8429705,20190,R,0,17,19,,,,,
+90013,202002,100,54,0.903516592372462,0.63283147158815,0.95179,1.082843,113.3255814,18242,R,17,18,20,,,,,
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,,,,,
+90014,202001,100,47,,0.845909451945989,1,1.504462,128.8429705,4260,R,0,17,19,,,,,
+90014,202002,100,42,1.18215962441315,0.776681061073411,0.95179,1.082843,113.3255814,5036,R,17,18,20,,,,,
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,,,,,
+90015,202001,100,57,,3.88684582743989,1,1.504462,128.8429705,19236,R,0,17,19,,,,,
+90015,202002,100,57,0.257278020378457,1.39644469525959,0.95179,1.082843,113.3255814,4949,R,17,18,20,,,,,
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,,,,,
+90016,202001,100,163,,0.906723456038941,1,1.504462,128.8429705,14902,R,0,17,19,,,,,
+90016,202002,100,163,1.10287209770501,0.666653145661786,0.95179,1.082843,113.3255814,16435,R,17,18,20,,,,,
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,,,,,
+90017,202001,100,149,,0.702286449569435,1,1.504462,128.8429705,35476,R,0,17,19,,,,,
+90017,202002,100,149,1.42392039688804,0.944611702227126,0.95179,1.082843,113.3255814,50515,R,17,18,20,,,,,
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,,,,,
+90018,202001,100,126,,0.543196798493409,1,1.504462,128.8429705,13845,R,0,17,19,,TRUE,,,
+90018,202002,100,126,1.8409534127844,0.929913532051516,0.95179,1.082843,113.3255814,25488,R,17,18,20,TRUE,,,,
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,,,,,
+90019,202001,100,6,,2.53225806451613,1,1.504462,128.8429705,1099,R,0,17,19,,,,,
+90019,202002,100,6,0.394904458598726,3.5,0.95179,1.082843,113.3255814,434,R,17,18,20,,TRUE,,,
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,TRUE,,,,
+90020,202001,100,22,,1.67735470941884,1,1.504462,128.8429705,3348,R,0,17,19,,,,,
+90020,202002,100,22,0.596176821983274,0.395169273411206,0.95179,1.082843,113.3255814,1996,R,17,18,20,,TRUE,,,
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,TRUE,,,,
+90021,202001,100,155,,,1,1.504462,128.8429705,34285.974874,BI,0,17,19,,,,,
+90021,202002,100,155,,,0.95179,1.082843,113.3255814,22789.522255,BI,17,18,20,,,,,
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_input.csv
new file mode 100644
index 00000000..26501471
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_input.csv
@@ -0,0 +1,22 @@
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,,76
+110005,202001,200,,27
+110005,202002,200,,27
+110005,202003,200,280,27
+110006,202001,200,1869,42
+110006,202002,200,1876,42
+110006,202003,200,1371,42
+110007,202001,200,12769,19
+110007,202002,200,2853,19
+110007,202003,200,,19
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv
new file mode 100644
index 00000000..b3283a97
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv
@@ -0,0 +1,22 @@
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,
+110005,202001,200,27,,,1,1,1,280,BI,0,0,0,TRUE
+110005,202002,200,27,,,1,1,1,280,BI,0,0,0,TRUE
+110005,202003,200,27,,,1,1,1,280,R,0,0,0,TRUE
+110006,202001,200,42,,,1,1,1,1869,R,0,0,0,TRUE
+110006,202002,200,42,,,1,1,1,1876,R,0,0,0,TRUE
+110006,202003,200,42,,,1,1,1,1371,R,0,0,0,TRUE
+110007,202001,200,19,,,1,1,1,12769,R,0,0,0,TRUE
+110007,202002,200,19,,,1,1,1,2853,R,0,0,0,TRUE
+110007,202003,200,19,,,1,1,1,2853,FIR,0,0,0,TRUE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_input.csv
deleted file mode 100644
index 5d0a69d4..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_input.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-identifier,date,group,question,other
-30001,202001,100,8444,51
-30001,202002,100,7476,51
-30001,202003,100,2003,51
-30002,202001,100,9343,72
-30002,202002,100,7818,72
-30002,202003,100,4897,72
-30003,202001,100,7511,7
-30003,202002,100,1761,7
-30003,202003,100,6492,7
-30004,202001,100,64,81
-30004,202002,100,2113,81
-30004,202003,100,185,81
-30005,202001,100,844,5
-30005,202002,100,897,5
-30005,202003,100,280,5
-30006,202001,100,1869,14
-30006,202002,100,1876,14
-30006,202003,100,1371,14
-30007,202001,100,12769,12
-30007,202002,100,2853,12
-30007,202003,100,11491,12
-30008,202001,100,141,162
-30008,202002,100,6001,162
-30008,202003,100,433,162
-30009,202001,100,6417,26
-30009,202002,100,4037,26
-30009,202003,100,1322,26
-30010,202001,100,28963,144
-30010,202002,100,21734,144
-30010,202003,100,10529,144
-30011,202001,100,6009,5
-30011,202002,100,1145,5
-30011,202003,100,5064,5
-30012,202001,100,256,275
-30012,202002,100,7522,275
-30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
deleted file mode 100644
index 061e3c1a..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_TB_50_filtered_partial_default_output.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-30001,202001,100,51,,,1,1,61.12436116,8444,R,0,0,9,,,TRUE
-30001,202002,100,51,,,1,1,48.04940375,7476,R,0,0,9,,,TRUE
-30001,202003,100,51,,,1,1,85.37820513,2003,R,0,0,10,,,TRUE
-30002,202001,100,72,,,1,1,61.12436116,9343,R,0,0,9,,,TRUE
-30002,202002,100,72,,,1,1,48.04940375,7818,R,0,0,9,,,TRUE
-30002,202003,100,72,,,1,1,85.37820513,4897,R,0,0,10,,,TRUE
-30003,202001,100,7,,4.26519023282226,1,1,61.12436116,7511,R,0,0,9,,TRUE,
-30003,202002,100,7,0.234456131007855,0.271256931608133,1,1,48.04940375,1761,R,0,0,9,TRUE,TRUE,
-30003,202003,100,7,3.68654173764906,,1,1,85.37820513,6492,R,0,0,10,TRUE,,
-30004,202001,100,81,,0.0302886890676763,1,1,61.12436116,64,R,0,0,9,,TRUE,
-30004,202002,100,81,33.015625,11.4216216216216,1,1,48.04940375,2113,R,0,0,9,TRUE,TRUE,
-30004,202003,100,81,0.0875532418362518,,1,1,85.37820513,185,R,0,0,10,TRUE,,
-30005,202001,100,5,,0.940914158305463,1,1,61.12436116,844,R,0,0,9,,TRUE,
-30005,202002,100,5,1.06279620853081,3.20357142857143,1,1,48.04940375,897,R,0,0,9,TRUE,TRUE,
-30005,202003,100,5,0.312151616499443,,1,1,85.37820513,280,R,0,0,10,TRUE,,
-30006,202001,100,14,,0.996268656716418,1,1,61.12436116,1869,R,0,0,9,,TRUE,
-30006,202002,100,14,1.00374531835206,1.36834427425237,1,1,48.04940375,1876,R,0,0,9,TRUE,TRUE,
-30006,202003,100,14,0.730810234541578,,1,1,85.37820513,1371,R,0,0,10,TRUE,,
-30007,202001,100,12,,4.47563967753242,1,1,61.12436116,12769,R,0,0,9,,TRUE,
-30007,202002,100,12,0.223431748766544,0.248281263597598,1,1,48.04940375,2853,R,0,0,9,TRUE,TRUE,
-30007,202003,100,12,4.02769015071854,,1,1,85.37820513,11491,R,0,0,10,TRUE,,
-30008,202001,100,162,,0.0234960839860023,1,1,61.12436116,141,R,0,0,9,,TRUE,
-30008,202002,100,162,42.5602836879433,13.8591224018476,1,1,48.04940375,6001,R,0,0,9,TRUE,TRUE,
-30008,202003,100,162,0.0721546408931845,,1,1,85.37820513,433,R,0,0,10,TRUE,,
-30009,202001,100,26,,1.58954669308893,1,1,61.12436116,6417,R,0,0,9,,TRUE,
-30009,202002,100,26,0.629110176094748,3.05370650529501,1,1,48.04940375,4037,R,0,0,9,TRUE,TRUE,
-30009,202003,100,26,0.327470894228387,,1,1,85.37820513,1322,R,0,0,10,TRUE,,
-30010,202001,100,144,,,1,1,61.12436116,28963,R,0,0,9,,,TRUE
-30010,202002,100,144,,,1,1,48.04940375,21734,R,0,0,9,,,TRUE
-30010,202003,100,144,,,1,1,85.37820513,10529,R,0,0,10,,,TRUE
-30011,202001,100,5,,5.24803493449782,1,1,61.12436116,6009,R,0,0,9,,TRUE,
-30011,202002,100,5,0.190547512065235,0.226105845181675,1,1,48.04940375,1145,R,0,0,9,TRUE,TRUE,
-30011,202003,100,5,4.42270742358079,,1,1,85.37820513,5064,R,0,0,10,TRUE,,
-30012,202001,100,275,,0.0340335017282638,1,1,61.12436116,256,R,0,0,9,,TRUE,
-30012,202002,100,275,29.3828125,,1,1,48.04940375,7522,R,0,0,9,TRUE,,
-30012,202003,100,275,,,1,1,85.37820513,7522,FIR,0,0,10,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_input.csv
new file mode 100644
index 00000000..ea279331
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_input.csv
@@ -0,0 +1,22 @@
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,,76
+110005,202001,200,1074,0
+110005,202002,200,648,0
+110005,202003,200,280,0
+110006,202001,200,1869,0
+110006,202002,200,1876,0
+110006,202003,200,1371,0
+110007,202001,200,,0
+110007,202002,200,,0
+110007,202003,200,,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv
new file mode 100644
index 00000000..39afdd31
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv
@@ -0,0 +1,22 @@
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,filtered_marker
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,,
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,,
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,,
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,,
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,,
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,,
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,,
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,
+110005,202001,200,0,,,1,1,1,1074,R,0,0,0,TRUE,TRUE
+110005,202002,200,0,,,1,1,1,648,R,0,0,0,TRUE,TRUE
+110005,202003,200,0,,,1,1,1,280,R,0,0,0,TRUE,TRUE
+110006,202001,200,0,,,1,1,1,1869,R,0,0,0,TRUE,TRUE
+110006,202002,200,0,,,1,1,1,1876,R,0,0,0,TRUE,TRUE
+110006,202003,200,0,,,1,1,1,1371,R,0,0,0,TRUE,TRUE
+110007,202001,200,0,,,1,1,1,0,C,0,0,0,TRUE,
+110007,202002,200,0,,,1,1,1,0,FIC,0,0,0,TRUE,
+110007,202003,200,0,,,1,1,1,0,FIC,0,0,0,TRUE,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_input.csv
deleted file mode 100644
index f4a7b4aa..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_input.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-identifier,date,group,question,other
-30001,202001,100,8444,0
-30001,202002,100,7476,0
-30001,202003,100,2003,0
-30002,202001,100,9343,0
-30002,202002,100,7818,0
-30002,202003,100,4897,0
-30003,202001,100,7511,0
-30003,202002,100,1761,0
-30003,202003,100,6492,0
-30004,202001,100,64,0
-30004,202002,100,2113,0
-30004,202003,100,185,0
-30005,202001,100,844,0
-30005,202002,100,897,0
-30005,202003,100,280,0
-30006,202001,100,1869,0
-30006,202002,100,1876,0
-30006,202003,100,1371,0
-30007,202001,100,12769,0
-30007,202002,100,2853,0
-30007,202003,100,11491,0
-30008,202001,100,141,0
-30008,202002,100,6001,0
-30008,202003,100,433,0
-30009,202001,100,6417,0
-30009,202002,100,4037,0
-30009,202003,100,1322,0
-30010,202001,100,28963,0
-30010,202002,100,21734,0
-30010,202003,100,10529,0
-30011,202001,100,6009,0
-30011,202002,100,1145,0
-30011,202003,100,5064,0
-30012,202001,100,256,0
-30012,202002,100,7522,0
-30012,202003,100,,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
deleted file mode 100644
index 1d0992a4..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_TB_50_filtered_full_default_output.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,default_construction_link,filtered_marker
-30001,202001,100,0,,,,1,1,8444,R,,0,9,,,TRUE,TRUE
-30001,202002,100,0,,,1,1,1,7476,R,0,0,9,,,TRUE,TRUE
-30001,202003,100,0,,,1,,1,2003,R,0,,10,,,TRUE,TRUE
-30002,202001,100,0,,,,1,1,9343,R,,0,9,,,TRUE,TRUE
-30002,202002,100,0,,,1,1,1,7818,R,0,0,9,,,TRUE,TRUE
-30002,202003,100,0,,,1,,1,4897,R,0,,10,,,TRUE,TRUE
-30003,202001,100,0,,4.265190233,,1,1,7511,R,,0,9,,TRUE,TRUE,
-30003,202002,100,0,0.234456131,0.271256932,1,1,1,1761,R,0,0,9,TRUE,TRUE,TRUE,
-30003,202003,100,0,3.686541738,,1,,1,6492,R,0,,10,TRUE,,TRUE,
-30004,202001,100,0,,0.030288689,,1,1,64,R,,0,9,,TRUE,TRUE,
-30004,202002,100,0,33.015625,11.42162162,1,1,1,2113,R,0,0,9,TRUE,TRUE,TRUE,
-30004,202003,100,0,0.087553242,,1,,1,185,R,0,,10,TRUE,,TRUE,
-30005,202001,100,0,,0.941234172,,1,1,844,R,,0,9,,TRUE,TRUE,
-30005,202002,100,0,1.062434865,3.199201198,1,1,1,897,R,0,0,9,TRUE,TRUE,TRUE,
-30005,202003,100,0,0.312578027,,1,,1,280,R,0,,10,TRUE,,TRUE,
-30006,202001,100,0,,0.995885563,,1,1,1869,R,,0,9,,TRUE,TRUE,
-30006,202002,100,0,1.004131435,1.368417982,1,1,1,1876,R,0,0,9,TRUE,TRUE,TRUE,
-30006,202003,100,0,0.730770871,,1,,1,1371,R,0,,10,TRUE,,TRUE,
-30007,202001,100,0,,4.475816911,,1,1,12769,R,,0,9,,TRUE,TRUE,
-30007,202002,100,0,0.223422901,0.248269056,1,1,1,2853,R,0,0,9,TRUE,TRUE,TRUE,
-30007,202003,100,0,4.027888195,,1,,1,11491,R,0,,10,TRUE,,TRUE,
-30008,202001,100,0,,0.023463069,,1,1,141,R,,0,9,,TRUE,TRUE,
-30008,202002,100,0,42.62017045,13.86213906,1,1,1,6001,R,0,0,9,TRUE,TRUE,TRUE,
-30008,202003,100,0,0.072138939,,1,,1,433,R,0,,10,TRUE,,TRUE,
-30009,202001,100,0,,1.589639934,,1,1,6417,R,,0,9,,TRUE,TRUE,
-30009,202002,100,0,0.629073275,3.053782962,1,1,1,4037,R,0,0,9,TRUE,TRUE,TRUE,
-30009,202003,100,0,0.327462695,,1,,1,1322,R,0,,10,TRUE,,TRUE,
-30010,202001,100,0,,,,1,1,28963,R,,0,9,,,TRUE,TRUE
-30010,202002,100,0,,,1,1,1,21734,R,0,0,9,,,TRUE,TRUE
-30010,202003,100,0,,,1,,1,10529,R,0,,10,,,TRUE,TRUE
-30011,202001,100,0,,5.249464902,,1,1,6009,R,,0,9,,TRUE,TRUE,
-30011,202002,100,0,0.190495606,0.226047443,1,1,1,1145,R,0,0,9,TRUE,TRUE,TRUE,
-30011,202003,100,0,4.423850085,,1,,1,5064,R,0,,10,TRUE,,TRUE,
-30012,202001,100,0,,0.034032235,,1,1,256,R,,0,9,,TRUE,TRUE,
-30012,202002,100,0,29.38390625,,1,1,1,7522,R,0,0,9,TRUE,,TRUE,
-30012,202003,100,0,,,1,,1,7522,FIR,0,,10,,,TRUE,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv
new file mode 100644
index 00000000..04eceefa
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv
@@ -0,0 +1,29 @@
+identifier,date,group,question,other
+70001,202001,100,5951,39
+70001,202002,100,1814,39
+70001,202003,100,734,39
+70001,202004,100,96,39
+70001,202005,100,9086,39
+70001,202006,100,3949,39
+70001,202007,100,49,39
+70002,202001,100,6705,94
+70002,202002,100,48,94
+70002,202003,100,5361,94
+70002,202004,100,8767,94
+70002,202005,100,9214,94
+70002,202006,100,7467,94
+70002,202007,100,3475,94
+70003,202001,100,6153,42
+70003,202002,100,7711,42
+70003,202003,100,5403,42
+70003,202004,100,7445,42
+70003,202005,100,7092,42
+70003,202006,100,2038,42
+70003,202007,100,8768,42
+70004,202001,100,,6
+70004,202002,100,,6
+70004,202003,100,6288,6
+70004,202004,100,,6
+70004,202005,100,,6
+70004,202006,100,5875,6
+70004,202007,100,,6
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
new file mode 100644
index 00000000..f01e987b
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
@@ -0,0 +1,29 @@
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,forward_filter,backward_filter
+70001,202001,100,39,,3.280595369,1,47.92201545,107.48,5951,R,0,3,3,,,
+70001,202002,100,39,0.304822719,,0.521730457,0.718061822,54.70285714,1814,R,3,2,3,,,TRUE
+70001,202003,100,39,,,56.19409367,0.668609812,120.084507,734,R,2,2,3,TRUE,,
+70001,202004,100,39,,,1.506633706,1.000630631,93.18857143,96,R,2,2,3,,TRUE,TRUE
+70001,202005,100,39,,,1.001786141,2.356922504,119.8970588,9086,R,2,2,2,TRUE,,
+70001,202006,100,39,,80.59183673,0.548881634,27.65768328,106.7900552,3949,R,2,3,4,,TRUE,
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,49,R,3,0,3,,,
+70002,202001,100,94,,139.6875,1,47.92201545,107.48,6705,R,0,3,3,,,
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,0.718061822,54.70285714,48,R,3,2,3,,,
+70002,202003,100,94,111.6875,0.611497662,56.19409367,0.668609812,120.084507,5361,R,2,2,3,,,
+70002,202004,100,94,1.63532923,0.951486868,1.506633706,1.000630631,93.18857143,8767,R,2,2,3,,,
+70002,202005,100,94,1.050986654,1.23396277,1.001786141,2.356922504,119.8970588,9214,R,2,2,2,,,
+70002,202006,100,94,0.810397222,2.148776978,0.548881634,27.65768328,106.7900552,7467,R,2,3,4,,,
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,3475,R,3,0,3,,,
+70003,202001,100,42,,0.797950979,1,47.92201545,107.48,6153,R,0,3,3,,,
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,0.718061822,54.70285714,7711,R,3,2,3,,,
+70003,202003,100,42,0.70068733,0.725721961,56.19409367,0.668609812,120.084507,5403,R,2,2,3,,,
+70003,202004,100,42,1.377938182,1.049774394,1.506633706,1.000630631,93.18857143,7445,R,2,2,3,,,
+70003,202005,100,42,0.952585628,3.479882237,1.001786141,2.356922504,119.8970588,7092,R,2,2,2,,,
+70003,202006,100,42,0.287366046,0.232436131,0.548881634,27.65768328,106.7900552,2038,R,2,3,4,,,
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,8768,R,3,0,3,,,
+70004,202001,100,6,,,1,47.92201545,107.48,216376.177660,BI,0,3,3,,,
+70004,202002,100,6,,,0.521730457,0.718061822,54.70285714,4515.172737,BI,3,2,3,,,
+70004,202003,100,6,,,56.19409367,0.668609812,120.084507,6288,R,2,2,3,,,
+70004,202004,100,6,,,1.506633706,1.000630631,93.18857143,9473.712744,FIR,2,2,3,,,
+70004,202005,100,6,,,1.001786141,2.356922504,119.8970588,9490.634133,FIR,2,2,2,,,
+70004,202006,100,6,,,0.548881634,27.65768328,106.7900552,5875,R,2,3,4,,,
+70004,202007,100,6,,,1.593348776,1,70.24,9360.924061,FIR,3,0,3,,,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index ec50d727..2f1d01a9 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -88,17 +88,15 @@ lower_trim = 50
 upper_trim = 50
 trim_threshold = 10
 
-[48_TB_50_filtered_partial_default]
-link_filter = "identifier NOT IN ('30001', '30002', '30010')"
-lower_trim = 50
-upper_trim = 50
-trim_threshold = 10
+[48_BI_BI_R-R_R_FI_filtered_partial_default]
+link_filter = "identifier NOT IN ('110005', '110006', '110007')"
 
-[49_TB_50_filtered_full_default]
-link_filter = "identifier NOT IN ('30001', '30002', '30010')"
-lower_trim = 50
-upper_trim = 50
-trim_threshold = 10
+[49_C_FI_FI_filtered_full_default]
+link_filter = "identifier NOT IN ('110005', '110006')"
+
+[50_R_R_FI_50_weight]
+weight = 0.5
+weight_periodicity = 12
 
 [61_R_R_FI-BI_R_R_50_weight_filtered]
 link_filter = "identifier NOT IN ('110009', '110009')"
@@ -106,10 +104,6 @@ lower_trim = 50
 upper_trim = 50
 trim_threshold = 10
 
-[50_R_R_FI_50_weight]
-weight = 0.5
-weight_periodicity = 12
-
 [65_TB_10_BI_BI_R_50_weight_filtered]
 link_filter = "NOT(identifier = '90003' AND date = '202001')"
 lower_trim = 50
@@ -129,4 +123,7 @@ upper_trim = 50
 trim_threshold = 10
 
 [68_BI_BI_R_NS_C_FI_FI_zeros_included]
-include_zeros = true
\ No newline at end of file
+include_zeros = true
+
+[70_BI_BI_R_FI_FI_R_FI_alternating_filtered]
+link_filter = "NOT(identifier = '70001' AND date IN ('202003', '202005'))"

From 19258c9e34bfcf209d6550199721d11a673aa344 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 27 Apr 2023 14:13:10 +0100
Subject: [PATCH 219/531] Some Linting

---
 statistical_methods_library/__init__.py            | 2 +-
 statistical_methods_library/estimation/__init__.py | 2 +-
 statistical_methods_library/outliering/__init__.py | 2 +-
 tests/imputation/test_mean_of_ratios.py            | 5 ++---
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/statistical_methods_library/__init__.py b/statistical_methods_library/__init__.py
index 4bee7225..b3bdbebe 100644
--- a/statistical_methods_library/__init__.py
+++ b/statistical_methods_library/__init__.py
@@ -1 +1 @@
-from . import estimation, imputation, outliering, utilities
+from . import estimation, imputation, outliering, utilities  # noqa: F401
diff --git a/statistical_methods_library/estimation/__init__.py b/statistical_methods_library/estimation/__init__.py
index 9b4c7d94..ccefa182 100644
--- a/statistical_methods_library/estimation/__init__.py
+++ b/statistical_methods_library/estimation/__init__.py
@@ -1 +1 @@
-from . import ht_ratio
+from . import ht_ratio  # noqa: F401
diff --git a/statistical_methods_library/outliering/__init__.py b/statistical_methods_library/outliering/__init__.py
index eb9817a7..cf1d3526 100644
--- a/statistical_methods_library/outliering/__init__.py
+++ b/statistical_methods_library/outliering/__init__.py
@@ -1 +1 @@
-from . import winsorisation
+from . import winsorisation  # noqa: F401
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 8982fb3f..a15e1b13 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -1,10 +1,9 @@
 import glob
-import json
 import os
 import pathlib
-import toml
 
 import pytest
+import toml
 from chispa.dataframe_comparer import assert_df_equality
 from pyspark.sql.functions import bround, col
 from pyspark.sql.types import BooleanType, DecimalType, LongType, StringType
@@ -168,7 +167,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     )
     imputation_kwargs = params.copy()
 
-    with open('tests/imputation/mean_of_ratios.toml', 'r') as f:
+    with open("tests/imputation/mean_of_ratios.toml", "r") as f:
         new_toml_string = toml.load(f)
     if scenario in new_toml_string.keys():
         imputation_kwargs.update(new_toml_string[scenario])

From 18b75cd168a3c3a64386244e364cb1da30096e71 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 27 Apr 2023 14:22:54 +0100
Subject: [PATCH 220/531] Renamed Test

---
 ...ITH_ELLIE_input.csv => 62_mixed_data_50_weight_input.csv} | 0
 ...H_ELLIE_output.csv => 62_mixed_data_50_weight_output.csv} | 0
 tests/imputation/mean_of_ratios.toml                         | 5 ++---
 3 files changed, 2 insertions(+), 3 deletions(-)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{62_CLARIFY_WITH_ELLIE_input.csv => 62_mixed_data_50_weight_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{62_CLARIFY_WITH_ELLIE_output.csv => 62_mixed_data_50_weight_output.csv} (100%)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_CLARIFY_WITH_ELLIE_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 2f1d01a9..84e6fce2 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -100,9 +100,8 @@ weight_periodicity = 12
 
 [61_R_R_FI-BI_R_R_50_weight_filtered]
 link_filter = "identifier NOT IN ('110009', '110009')"
-lower_trim = 50
-upper_trim = 50
-trim_threshold = 10
+
+[62_mixed_data_50_weight]
 
 [65_TB_10_BI_BI_R_50_weight_filtered]
 link_filter = "NOT(identifier = '90003' AND date = '202001')"

From 026b30e2a34bfb477cf51e619f1ee0e7589090eb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 27 Apr 2023 16:58:40 +0100
Subject: [PATCH 221/531] Make construction and forward and backward link cols
 handled separately

---
 .../imputation/engine.py                      | 37 +++++++++++++++----
 .../imputation/ratio_calculators.py           | 33 ++++++++++-------
 2 files changed, 49 insertions(+), 21 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index ec12b4b1..df3ea463 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -14,7 +14,7 @@
 
 from statistical_methods_library.utilities import validation
 
-from .ratio_calculators import RatioCalculator
+from .ratio_calculators import construction, RatioCalculator
 
 # --- Marker constants ---
 
@@ -65,7 +65,7 @@ def impute(
 ) -> DataFrame:
     additional_outputs = {}
     # --- Validate params ---
-    link_cols = [forward_link_col, backward_link_col, construction_link_col]
+    link_cols = [forward_link_col, backward_link_col]
     if any(link_cols) and not all(link_cols):
         raise TypeError("Either all or no link columns must be specified")
 
@@ -94,10 +94,12 @@ def impute(
             {
                 "forward": forward_link_col,
                 "backward": backward_link_col,
-                "construction": construction_link_col,
             }
         )
 
+    if construction_link_col is not None:
+        input_params["construction"] = construction_link_col
+
     full_col_mapping.update(input_params)
 
     if forward_link_col is None:
@@ -105,10 +107,12 @@ def impute(
             {
                 "forward": "forward",
                 "backward": "backward",
-                "construction": "construction",
             }
         )
 
+    if construction_link_col is None:
+        full_col_mapping["construction"] = "construction"
+
     back_expected_columns = {
         "ref": reference_col,
         "period": period_col,
@@ -233,13 +237,26 @@ def prepare_df(df: DataFrame) -> DataFrame:
     # --- Calculate Ratios ---
 
     def calculate_ratios(df: DataFrame) -> DataFrame:
+        ratio_calculators = []
         if "forward" in df.columns:
             df = (
-                df.fillna(1.0, ["forward", "backward", "construction"])
+                df.fillna(1.0, ["forward", "backward"])
                 .withColumn("count_forward", lit(None).cast("long"))
                 .withColumn("count_backward", lit(None).cast("long"))
-                .withColumn("count_construction", lit(None).cast("long"))
             )
+
+        else:
+            ratio_calculators.append(ratio_calculator)
+
+        if "construction" in df.columns:
+            df = df.fillna(1.0, ["construction"]).withColumn(
+                "count_construction", lit(None).cast("long")
+            )
+
+        else:
+            ratio_calculators.append(construction)
+
+        if not ratio_calculators:
             return df
 
         # Since we're going to join on to the main df at the end filtering here
@@ -303,7 +320,13 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         # Join the grouping ratios onto the input such that each contributor has
         # a set of ratios.
         all_fill_cols = []
-        for result in ratio_calculator(df=working_df, **ratio_calculator_params):
+        for result in sum(
+            (
+                calculator(df=working_df, **ratio_calculator_params)
+                for calculator in ratio_calculators
+            ),
+            [],
+        ):
             df = df.join(result.data, result.join_columns, "left")
             all_fill_cols += result.fill_columns
             additional_outputs.update(result.additional_outputs)
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 072c7a92..9cb16ada 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -228,7 +228,6 @@ def upper_bound(c):
                 CASE WHEN NOT trimmed_backward THEN growth_backward END
             ) AS backward"""
         ),
-        expr("sum(current_output)/sum(aux) AS construction"),
         expr(
             """sum(cast(
                 NOT trimmed_forward AND growth_forward IS NOT NULL AS integer
@@ -239,7 +238,6 @@ def upper_bound(c):
                 NOT trimmed_backward AND growth_backward IS NOT NULL AS integer
             )) AS count_backward"""
         ),
-        expr("count(aux) AS count_construction"),
     )
 
     growth_df = df.select(
@@ -270,7 +268,7 @@ def upper_bound(c):
         RatioCalculationResult(
             data=ratio_df,
             join_columns=["period", "grouping"],
-            fill_columns=["forward", "backward", "construction"],
+            fill_columns=["forward", "backward"],
         ),
     ]
 
@@ -300,7 +298,6 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
                     )/sum(next.output) AS backward
                 """
             ),
-            expr("sum(current.output)/sum(aux) AS construction"),
             expr(
                 """
                     CASE
@@ -321,21 +318,29 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
                     END AS count_backward
                 """
             ),
-            expr(
-                """
-                    CASE
-                        WHEN sum(aux) = 0
-                        THEN 0
-                        ELSE count(current.output)
-                    END AS count_construction
-                """
-            ),
         )
     )
     return [
         RatioCalculationResult(
             data=df,
             join_columns=["period", "grouping"],
-            fill_columns=["forward", "backward", "construction"],
+            fill_columns=["forward", "backward"],
+        )
+    ]
+
+
+def construction(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
+    return [
+        RatioCalculationResult(
+            data=(
+                df.filter(col("current.match"))
+                .groupBy("period", "grouping")
+                .agg(
+                    expr("sum(current.output)/sum(aux) AS construction"),
+                    expr("count(aux) AS count_construction"),
+                )
+            ),
+            join_columns=["period", "grouping"],
+            fill_columns=["construction"],
         )
     ]

From 53649b557ab5f581f1d877128d53b1d60e54b1b0 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 27 Apr 2023 16:59:17 +0100
Subject: [PATCH 222/531] Specifying a construction col without forward and
 backward cols is now allowed so fix test

---
 tests/imputation/test_ratio_of_means.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 78d6f3b7..fba0a7e0 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -244,7 +244,7 @@ def test_params_missing_link_column(fxt_load_test_csv):
     )
     with pytest.raises(TypeError):
         impute(
-            input_df=test_dataframe, **params, construction_link_col=construction_col
+            input_df=test_dataframe, **params, forward_link_col=construction_col
         )
 
 

From 1218663ff43184beb9559500309724ef23763098 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 27 Apr 2023 17:08:37 +0100
Subject: [PATCH 223/531] Fix with isort

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index df3ea463..c3ba2f76 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -14,7 +14,7 @@
 
 from statistical_methods_library.utilities import validation
 
-from .ratio_calculators import construction, RatioCalculator
+from .ratio_calculators import RatioCalculator, construction
 
 # --- Marker constants ---
 

From 0b1aba30afd359b7f2b03003398360d1f37d261c Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 2 May 2023 10:20:55 +0100
Subject: [PATCH 224/531] Fix Conflict

---
 tests/imputation/test_engine.py         | 415 ++++++++++++++++++++++++
 tests/imputation/test_mean_of_ratios.py |   4 +
 tests/imputation/test_ratio_of_means.py | 365 +--------------------
 3 files changed, 420 insertions(+), 364 deletions(-)
 create mode 100644 tests/imputation/test_engine.py

diff --git a/tests/imputation/test_engine.py b/tests/imputation/test_engine.py
new file mode 100644
index 00000000..2d0d0f73
--- /dev/null
+++ b/tests/imputation/test_engine.py
@@ -0,0 +1,415 @@
+import pytest
+from pyspark.sql.functions import lit
+from pyspark.sql.types import DecimalType, LongType, StringType
+
+from statistical_methods_library.imputation import impute, ratio_of_means
+from statistical_methods_library.utilities.exceptions import ValidationError
+
+auxiliary_col = "other"
+backward_col = "backward"
+forward_col = "forward"
+marker_col = "marker"
+output_col = "output"
+period_col = "date"
+reference_col = "identifier"
+grouping_col = "group"
+target_col = "question"
+construction_col = "construction"
+count_forward_col = "count_forward"
+count_backward_col = "count_backward"
+count_construction_col = "count_construction"
+exclude_col = "exclude"
+
+decimal_type = DecimalType(15, 6)
+
+reference_type = StringType()
+period_type = StringType()
+grouping_type = StringType()
+target_type = decimal_type
+auxiliary_type = decimal_type
+min_accuracy = decimal_type
+marker_type = StringType()
+backward_type = decimal_type
+forward_type = decimal_type
+construction_type = decimal_type
+count_forward_type = LongType()
+count_backward_type = LongType()
+count_construction_type = LongType()
+exclude_type = StringType()
+
+# Columns we expect in either our input or output test dataframes and their
+# respective types
+dataframe_columns = (
+    reference_col,
+    period_col,
+    grouping_col,
+    target_col,
+    auxiliary_col,
+    output_col,
+    marker_col,
+    forward_col,
+    backward_col,
+    construction_col,
+    count_forward_col,
+    count_backward_col,
+    count_construction_col,
+    exclude_col,
+)
+
+dataframe_types = {
+    reference_col: reference_type,
+    period_col: period_type,
+    grouping_col: grouping_type,
+    target_col: target_type,
+    auxiliary_col: auxiliary_type,
+    output_col: min_accuracy,
+    marker_col: marker_type,
+    backward_col: backward_type,
+    forward_col: forward_type,
+    construction_col: construction_type,
+    count_forward_col: count_forward_type,
+    count_backward_col: count_backward_type,
+    count_construction_col: count_construction_type,
+    exclude_col: exclude_type,
+}
+
+bad_dataframe_types = dataframe_types.copy()
+bad_dataframe_types[target_col] = reference_type
+
+# Params used when calling impute
+params = {
+    "reference_col": reference_col,
+    "period_col": period_col,
+    "grouping_col": grouping_col,
+    "target_col": target_col,
+    "auxiliary_col": auxiliary_col,
+    "output_col": output_col,
+    "marker_col": marker_col,
+    "ratio_calculator": ratio_of_means,
+}
+
+test_scenarios = []
+
+# --- Test type validation on the input dataframe(s) ---
+
+
+def test_input_not_a_dataframe():
+    with pytest.raises(TypeError):
+        # noinspection PyTypeChecker
+        impute(input_df="not_a_dataframe", **params)
+
+
+# --- Test type validation on the back_data dataframe(s) ---
+
+
+def test_back_data_not_a_dataframe(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    with pytest.raises(TypeError):
+        # noinspection PyTypeChecker
+        impute(input_df=test_dataframe, **params, back_data_df="not_a_dataframe")
+
+
+# --- Test if cols missing from input dataframe(s) ---
+
+
+def test_dataframe_column_missing(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    bad_dataframe = test_dataframe.drop(grouping_col)
+    with pytest.raises(ValidationError):
+        impute(input_df=bad_dataframe, **params)
+
+
+# --- Test if dataframe has duplicate rows ---
+
+
+def test_dataframe_duplicate_rows(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "duplicate_rows",
+    )
+    with pytest.raises(ValidationError):
+        impute(input_df=test_dataframe, **params)
+
+
+# --- Test if target missing from input dataframe(s) ---
+
+
+def test_dataframe_target_missing(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    bad_dataframe = test_dataframe.drop(target_col)
+    with pytest.raises(ValidationError):
+        impute(input_df=bad_dataframe, **params)
+
+
+# --- Test if params null ---
+
+
+def test_params_none(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    bad_params = params.copy()
+    bad_params["target_col"] = None
+    with pytest.raises(TypeError):
+        impute(input_df=test_dataframe, **bad_params)
+
+
+def test_params_empty_string(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    bad_params = params.copy()
+    bad_params["target_col"] = ""
+    with pytest.raises(ValueError):
+        impute(input_df=test_dataframe, **bad_params)
+
+
+def test_params_missing_link_column(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    with pytest.raises(TypeError):
+        impute(
+            input_df=test_dataframe, **params, construction_link_col=construction_col
+        )
+
+
+def test_params_not_string(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    bad_params = params.copy()
+    bad_params["reference_col"] = 23
+    with pytest.raises(TypeError):
+        impute(input_df=test_dataframe, **bad_params)
+
+
+# --- Test if output contents are as expected, both new columns and data ---
+
+
+def test_dataframe_returned_as_expected(fxt_spark_session, fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    # Make sure that no extra columns pass through.
+    test_dataframe = test_dataframe.withColumn("bonus_column", lit(0))
+    ret_val = impute(input_df=test_dataframe, **params)
+    assert isinstance(ret_val, type(test_dataframe))
+    ret_cols = ret_val.columns
+    assert "bonus_column" not in ret_cols
+
+
+# --- Test that when provided back data does not match input schema then fails ---
+def test_back_data_missing_column(fxt_load_test_csv, fxt_spark_session):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    bad_back_data = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "back_data_missing_column",
+    )
+    with pytest.raises(ValidationError):
+        impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
+
+
+def test_back_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    bad_back_data = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "back_data_nulls",
+    )
+
+    with pytest.raises(ValidationError):
+        impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
+
+
+def test_back_data_without_output_is_invalid(fxt_load_test_csv, fxt_spark_session):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    bad_back_data = fxt_load_test_csv(
+        [
+            reference_col,
+            period_col,
+            grouping_col,
+            target_col,
+            marker_col,
+            auxiliary_col,
+        ],
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "back_data_no_output",
+    )
+
+    with pytest.raises(ValidationError):
+        impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
+
+
+# Test if when the back data input has link cols and the main data input does not
+# then the columns are ignored.
+def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_session):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+
+    back_data = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "back_data_with_link_cols",
+    )
+
+    ret_val = impute(input_df=test_dataframe, **params, back_data_df=back_data)
+
+    assert ret_val.count() == 1
+
+
+# Test when main data input has link cols and the back data input does not
+# then columns aren't lost.
+def test_input_has_link_cols_and_back_data_does_not_have_link_cols(
+    fxt_load_test_csv, fxt_spark_session
+):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality_with_link_cols",
+    )
+
+    back_data = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "back_data_without_link_cols",
+    )
+
+    imputation_kwargs = params.copy()
+    imputation_kwargs.update(
+        {
+            "forward_link_col": forward_col,
+            "backward_link_col": backward_col,
+            "construction_link_col": construction_col,
+            "input_df": test_dataframe,
+            "back_data_df": back_data,
+        }
+    )
+
+    ret_val = impute(**imputation_kwargs)
+
+    assert ret_val.count() == 1
+
+
+# Test if columns of the incorrect type are caught.
+def test_incorrect_column_types(fxt_load_test_csv):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        bad_dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "basic_functionality",
+    )
+    with pytest.raises(ValidationError):
+        impute(input_df=test_dataframe, **params)
+
+
+def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "ratio_of_means",
+        "unit",
+        "input_data_nulls",
+    )
+
+    with pytest.raises(ValidationError):
+        impute(input_df=test_dataframe, **params)
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index a15e1b13..80301ab4 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -26,6 +26,7 @@
 exclude_col = "exclude"
 forward_growth_col = "growth_forward"
 backward_growth_col = "growth_backward"
+filtered_marker_col = "filtered_marker"
 filtered_forward_col = "filtered_forward"
 filtered_backward_col = "filtered_backward"
 trimmed_forward_col = "trimmed_forward"
@@ -49,6 +50,7 @@
 exclude_type = StringType()
 forward_growth_type = decimal_type
 backward_growth_type = decimal_type
+filtered_marker_type = BooleanType()
 filtered_forward_type = BooleanType()
 filtered_backward_type = BooleanType()
 trimmed_forward_type = BooleanType()
@@ -73,6 +75,7 @@
     exclude_col,
     forward_growth_col,
     backward_growth_col,
+    filtered_marker_col,
     filtered_forward_col,
     filtered_backward_col,
     trimmed_forward_col,
@@ -96,6 +99,7 @@
     exclude_col: exclude_type,
     forward_growth_col: forward_growth_type,
     backward_growth_col: backward_growth_type,
+    filtered_marker_col: filtered_marker_type,
     filtered_forward_col: filtered_forward_type,
     filtered_backward_col: filtered_backward_type,
     trimmed_forward_col: trimmed_forward_type,
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index fba0a7e0..e5116bda 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -4,11 +4,10 @@
 
 import pytest
 from chispa.dataframe_comparer import assert_df_equality
-from pyspark.sql.functions import bround, col, lit
+from pyspark.sql.functions import bround, col
 from pyspark.sql.types import DecimalType, LongType, StringType
 
 from statistical_methods_library.imputation import impute, ratio_of_means
-from statistical_methods_library.utilities.exceptions import ValidationError
 
 auxiliary_col = "other"
 backward_col = "backward"
@@ -115,349 +114,6 @@
     if scenario_type.split("_", 1)[0] in ("dev", "methodology")
 ]
 
-
-# --- Test type validation on the input dataframe(s) ---
-
-
-@pytest.mark.dependency()
-def test_input_not_a_dataframe():
-    with pytest.raises(TypeError):
-        # noinspection PyTypeChecker
-        impute(input_df="not_a_dataframe", **params)
-
-
-# --- Test type validation on the back_data dataframe(s) ---
-
-
-@pytest.mark.dependency()
-def test_back_data_not_a_dataframe(fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    with pytest.raises(TypeError):
-        # noinspection PyTypeChecker
-        impute(input_df=test_dataframe, **params, back_data_df="not_a_dataframe")
-
-
-# --- Test if cols missing from input dataframe(s) ---
-
-
-@pytest.mark.dependency()
-def test_dataframe_column_missing(fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    bad_dataframe = test_dataframe.drop(grouping_col)
-    with pytest.raises(ValidationError):
-        impute(input_df=bad_dataframe, **params)
-
-
-# --- Test if dataframe has duplicate rows ---
-
-
-@pytest.mark.dependency()
-def test_dataframe_duplicate_rows(fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "duplicate_rows",
-    )
-    with pytest.raises(ValidationError):
-        impute(input_df=test_dataframe, **params)
-
-
-# --- Test if target missing from input dataframe(s) ---
-
-
-@pytest.mark.dependency()
-def test_dataframe_target_missing(fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    bad_dataframe = test_dataframe.drop(target_col)
-    with pytest.raises(ValidationError):
-        impute(input_df=bad_dataframe, **params)
-
-
-# --- Test if params null ---
-
-
-@pytest.mark.dependency()
-def test_params_none(fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    bad_params = params.copy()
-    bad_params["target_col"] = None
-    with pytest.raises(TypeError):
-        impute(input_df=test_dataframe, **bad_params)
-
-
-@pytest.mark.dependency()
-def test_params_empty_string(fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    bad_params = params.copy()
-    bad_params["target_col"] = ""
-    with pytest.raises(ValueError):
-        impute(input_df=test_dataframe, **bad_params)
-
-
-@pytest.mark.dependency()
-def test_params_missing_link_column(fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    with pytest.raises(TypeError):
-        impute(
-            input_df=test_dataframe, **params, forward_link_col=construction_col
-        )
-
-
-@pytest.mark.dependency()
-def test_params_not_string(fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    bad_params = params.copy()
-    bad_params["reference_col"] = 23
-    with pytest.raises(TypeError):
-        impute(input_df=test_dataframe, **bad_params)
-
-
-# --- Test if output contents are as expected, both new columns and data ---
-
-
-@pytest.mark.dependency()
-def test_dataframe_returned_as_expected(fxt_spark_session, fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    # Make sure that no extra columns pass through.
-    test_dataframe = test_dataframe.withColumn("bonus_column", lit(0))
-    ret_val = impute(input_df=test_dataframe, **params)
-    assert isinstance(ret_val, type(test_dataframe))
-    ret_cols = ret_val.columns
-    assert "bonus_column" not in ret_cols
-
-
-# --- Test that when provided back data does not match input schema then fails ---
-@pytest.mark.dependency()
-def test_back_data_missing_column(fxt_load_test_csv, fxt_spark_session):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    bad_back_data = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "back_data_missing_column",
-    )
-    with pytest.raises(ValidationError):
-        impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
-
-
-@pytest.mark.dependency()
-def test_back_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    bad_back_data = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "back_data_nulls",
-    )
-
-    with pytest.raises(ValidationError):
-        impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
-
-
-@pytest.mark.dependency()
-def test_back_data_without_output_is_invalid(fxt_load_test_csv, fxt_spark_session):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    bad_back_data = fxt_load_test_csv(
-        [
-            reference_col,
-            period_col,
-            grouping_col,
-            target_col,
-            marker_col,
-            auxiliary_col,
-        ],
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "back_data_no_output",
-    )
-
-    with pytest.raises(ValidationError):
-        impute(input_df=test_dataframe, **params, back_data_df=bad_back_data)
-
-
-# Test if when the back data input has link cols and the main data input does not
-# then the columns are ignored.
-@pytest.mark.dependency()
-def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_session):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-
-    back_data = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "back_data_with_link_cols",
-    )
-
-    ret_val = impute(input_df=test_dataframe, **params, back_data_df=back_data)
-
-    assert ret_val.count() == 1
-
-
-# Test when main data input has link cols and the back data input does not
-# then columns aren't lost.
-@pytest.mark.dependency()
-def test_input_has_link_cols_and_back_data_does_not_have_link_cols(
-    fxt_load_test_csv, fxt_spark_session
-):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality_with_link_cols",
-    )
-
-    back_data = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "back_data_without_link_cols",
-    )
-
-    imputation_kwargs = params.copy()
-    imputation_kwargs.update(
-        {
-            "forward_link_col": forward_col,
-            "backward_link_col": backward_col,
-            "construction_link_col": construction_col,
-            "input_df": test_dataframe,
-            "back_data_df": back_data,
-        }
-    )
-
-    ret_val = impute(**imputation_kwargs)
-
-    assert ret_val.count() == 1
-
-
-# Test if columns of the incorrect type are caught.
-@pytest.mark.dependency()
-def test_incorrect_column_types(fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        bad_dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "basic_functionality",
-    )
-    with pytest.raises(ValidationError):
-        impute(input_df=test_dataframe, **params)
-
-
-@pytest.mark.dependency()
-def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        "unit",
-        "input_data_nulls",
-    )
-
-    with pytest.raises(ValidationError):
-        impute(input_df=test_dataframe, **params)
-
-
 # --- Test Scenarios.
 
 
@@ -465,25 +121,6 @@ def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
     "scenario_type, scenario",
     test_scenarios,
 )
-@pytest.mark.dependency(
-    depends=[
-        "test_dataframe_returned_as_expected",
-        "test_params_not_string",
-        "test_params_none",
-        "test_params_empty_string",
-        "test_params_missing_link_column",
-        "test_dataframe_column_missing",
-        "test_input_not_a_dataframe",
-        "test_incorrect_column_types",
-        "test_input_data_contains_nulls",
-        "test_back_data_not_a_dataframe",
-        "test_back_data_missing_column",
-        "test_back_data_contains_nulls",
-        "test_back_data_without_output_is_invalid",
-        "test_back_data_drops_link_cols_when_present",
-        "test_input_has_link_cols_and_back_data_does_not_have_link_cols",
-    ]
-)
 def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     scenario_file_type = scenario_type.replace("back_data_", "")
     scenario_input = fxt_load_test_csv(

From 51ae00065ad098a10d331332b2dad30446f00316 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 2 May 2023 11:06:02 +0100
Subject: [PATCH 225/531] Partial Links Now Working

---
 poetry.lock                                   | 110 +++++++++---------
 .../33_partial_link_columns_output.csv        |   4 +-
 tests/imputation/mean_of_ratios.toml          |   4 +
 tests/imputation/test_mean_of_ratios.py       |   1 -
 4 files changed, 61 insertions(+), 58 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index e5f66e3f..0d77fea9 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -93,63 +93,63 @@ files = [
 
 [[package]]
 name = "coverage"
-version = "7.2.3"
+version = "7.2.5"
 description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "coverage-7.2.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e58c0d41d336569d63d1b113bd573db8363bc4146f39444125b7f8060e4e04f5"},
-    {file = "coverage-7.2.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:344e714bd0fe921fc72d97404ebbdbf9127bac0ca1ff66d7b79efc143cf7c0c4"},
-    {file = "coverage-7.2.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:974bc90d6f6c1e59ceb1516ab00cf1cdfbb2e555795d49fa9571d611f449bcb2"},
-    {file = "coverage-7.2.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0743b0035d4b0e32bc1df5de70fba3059662ace5b9a2a86a9f894cfe66569013"},
-    {file = "coverage-7.2.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d0391fb4cfc171ce40437f67eb050a340fdbd0f9f49d6353a387f1b7f9dd4fa"},
-    {file = "coverage-7.2.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4a42e1eff0ca9a7cb7dc9ecda41dfc7cbc17cb1d02117214be0561bd1134772b"},
-    {file = "coverage-7.2.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:be19931a8dcbe6ab464f3339966856996b12a00f9fe53f346ab3be872d03e257"},
-    {file = "coverage-7.2.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:72fcae5bcac3333a4cf3b8f34eec99cea1187acd55af723bcbd559adfdcb5535"},
-    {file = "coverage-7.2.3-cp310-cp310-win32.whl", hash = "sha256:aeae2aa38395b18106e552833f2a50c27ea0000122bde421c31d11ed7e6f9c91"},
-    {file = "coverage-7.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:83957d349838a636e768251c7e9979e899a569794b44c3728eaebd11d848e58e"},
-    {file = "coverage-7.2.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dfd393094cd82ceb9b40df4c77976015a314b267d498268a076e940fe7be6b79"},
-    {file = "coverage-7.2.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:182eb9ac3f2b4874a1f41b78b87db20b66da6b9cdc32737fbbf4fea0c35b23fc"},
-    {file = "coverage-7.2.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bb1e77a9a311346294621be905ea8a2c30d3ad371fc15bb72e98bfcfae532df"},
-    {file = "coverage-7.2.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca0f34363e2634deffd390a0fef1aa99168ae9ed2af01af4a1f5865e362f8623"},
-    {file = "coverage-7.2.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55416d7385774285b6e2a5feca0af9652f7f444a4fa3d29d8ab052fafef9d00d"},
-    {file = "coverage-7.2.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:06ddd9c0249a0546997fdda5a30fbcb40f23926df0a874a60a8a185bc3a87d93"},
-    {file = "coverage-7.2.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:fff5aaa6becf2c6a1699ae6a39e2e6fb0672c2d42eca8eb0cafa91cf2e9bd312"},
-    {file = "coverage-7.2.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ea53151d87c52e98133eb8ac78f1206498c015849662ca8dc246255265d9c3c4"},
-    {file = "coverage-7.2.3-cp311-cp311-win32.whl", hash = "sha256:8f6c930fd70d91ddee53194e93029e3ef2aabe26725aa3c2753df057e296b925"},
-    {file = "coverage-7.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:fa546d66639d69aa967bf08156eb8c9d0cd6f6de84be9e8c9819f52ad499c910"},
-    {file = "coverage-7.2.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b2317d5ed777bf5a033e83d4f1389fd4ef045763141d8f10eb09a7035cee774c"},
-    {file = "coverage-7.2.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be9824c1c874b73b96288c6d3de793bf7f3a597770205068c6163ea1f326e8b9"},
-    {file = "coverage-7.2.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c3b2803e730dc2797a017335827e9da6da0e84c745ce0f552e66400abdfb9a1"},
-    {file = "coverage-7.2.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f69770f5ca1994cb32c38965e95f57504d3aea96b6c024624fdd5bb1aa494a1"},
-    {file = "coverage-7.2.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1127b16220f7bfb3f1049ed4a62d26d81970a723544e8252db0efde853268e21"},
-    {file = "coverage-7.2.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:aa784405f0c640940595fa0f14064d8e84aff0b0f762fa18393e2760a2cf5841"},
-    {file = "coverage-7.2.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3146b8e16fa60427e03884301bf8209221f5761ac754ee6b267642a2fd354c48"},
-    {file = "coverage-7.2.3-cp37-cp37m-win32.whl", hash = "sha256:1fd78b911aea9cec3b7e1e2622c8018d51c0d2bbcf8faaf53c2497eb114911c1"},
-    {file = "coverage-7.2.3-cp37-cp37m-win_amd64.whl", hash = "sha256:0f3736a5d34e091b0a611964c6262fd68ca4363df56185902528f0b75dbb9c1f"},
-    {file = "coverage-7.2.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:981b4df72c93e3bc04478153df516d385317628bd9c10be699c93c26ddcca8ab"},
-    {file = "coverage-7.2.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c0045f8f23a5fb30b2eb3b8a83664d8dc4fb58faddf8155d7109166adb9f2040"},
-    {file = "coverage-7.2.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f760073fcf8f3d6933178d67754f4f2d4e924e321f4bb0dcef0424ca0215eba1"},
-    {file = "coverage-7.2.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c86bd45d1659b1ae3d0ba1909326b03598affbc9ed71520e0ff8c31a993ad911"},
-    {file = "coverage-7.2.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:172db976ae6327ed4728e2507daf8a4de73c7cc89796483e0a9198fd2e47b462"},
-    {file = "coverage-7.2.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d2a3a6146fe9319926e1d477842ca2a63fe99af5ae690b1f5c11e6af074a6b5c"},
-    {file = "coverage-7.2.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f649dd53833b495c3ebd04d6eec58479454a1784987af8afb77540d6c1767abd"},
-    {file = "coverage-7.2.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7c4ed4e9f3b123aa403ab424430b426a1992e6f4c8fd3cb56ea520446e04d152"},
-    {file = "coverage-7.2.3-cp38-cp38-win32.whl", hash = "sha256:eb0edc3ce9760d2f21637766c3aa04822030e7451981ce569a1b3456b7053f22"},
-    {file = "coverage-7.2.3-cp38-cp38-win_amd64.whl", hash = "sha256:63cdeaac4ae85a179a8d6bc09b77b564c096250d759eed343a89d91bce8b6367"},
-    {file = "coverage-7.2.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:20d1a2a76bb4eb00e4d36b9699f9b7aba93271c9c29220ad4c6a9581a0320235"},
-    {file = "coverage-7.2.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ea748802cc0de4de92ef8244dd84ffd793bd2e7be784cd8394d557a3c751e21"},
-    {file = "coverage-7.2.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21b154aba06df42e4b96fc915512ab39595105f6c483991287021ed95776d934"},
-    {file = "coverage-7.2.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd214917cabdd6f673a29d708574e9fbdb892cb77eb426d0eae3490d95ca7859"},
-    {file = "coverage-7.2.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c2e58e45fe53fab81f85474e5d4d226eeab0f27b45aa062856c89389da2f0d9"},
-    {file = "coverage-7.2.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:87ecc7c9a1a9f912e306997ffee020297ccb5ea388421fe62a2a02747e4d5539"},
-    {file = "coverage-7.2.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:387065e420aed3c71b61af7e82c7b6bc1c592f7e3c7a66e9f78dd178699da4fe"},
-    {file = "coverage-7.2.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ea3f5bc91d7d457da7d48c7a732beaf79d0c8131df3ab278e6bba6297e23c6c4"},
-    {file = "coverage-7.2.3-cp39-cp39-win32.whl", hash = "sha256:ae7863a1d8db6a014b6f2ff9c1582ab1aad55a6d25bac19710a8df68921b6e30"},
-    {file = "coverage-7.2.3-cp39-cp39-win_amd64.whl", hash = "sha256:3f04becd4fcda03c0160d0da9c8f0c246bc78f2f7af0feea1ec0930e7c93fa4a"},
-    {file = "coverage-7.2.3-pp37.pp38.pp39-none-any.whl", hash = "sha256:965ee3e782c7892befc25575fa171b521d33798132692df428a09efacaffe8d0"},
-    {file = "coverage-7.2.3.tar.gz", hash = "sha256:d298c2815fa4891edd9abe5ad6e6cb4207104c7dd9fd13aea3fdebf6f9b91259"},
+    {file = "coverage-7.2.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:883123d0bbe1c136f76b56276074b0c79b5817dd4238097ffa64ac67257f4b6c"},
+    {file = "coverage-7.2.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d2fbc2a127e857d2f8898aaabcc34c37771bf78a4d5e17d3e1f5c30cd0cbc62a"},
+    {file = "coverage-7.2.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f3671662dc4b422b15776cdca89c041a6349b4864a43aa2350b6b0b03bbcc7f"},
+    {file = "coverage-7.2.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780551e47d62095e088f251f5db428473c26db7829884323e56d9c0c3118791a"},
+    {file = "coverage-7.2.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:066b44897c493e0dcbc9e6a6d9f8bbb6607ef82367cf6810d387c09f0cd4fe9a"},
+    {file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b9a4ee55174b04f6af539218f9f8083140f61a46eabcaa4234f3c2a452c4ed11"},
+    {file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:706ec567267c96717ab9363904d846ec009a48d5f832140b6ad08aad3791b1f5"},
+    {file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ae453f655640157d76209f42c62c64c4d4f2c7f97256d3567e3b439bd5c9b06c"},
+    {file = "coverage-7.2.5-cp310-cp310-win32.whl", hash = "sha256:f81c9b4bd8aa747d417407a7f6f0b1469a43b36a85748145e144ac4e8d303cb5"},
+    {file = "coverage-7.2.5-cp310-cp310-win_amd64.whl", hash = "sha256:dc945064a8783b86fcce9a0a705abd7db2117d95e340df8a4333f00be5efb64c"},
+    {file = "coverage-7.2.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:40cc0f91c6cde033da493227797be2826cbf8f388eaa36a0271a97a332bfd7ce"},
+    {file = "coverage-7.2.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a66e055254a26c82aead7ff420d9fa8dc2da10c82679ea850d8feebf11074d88"},
+    {file = "coverage-7.2.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c10fbc8a64aa0f3ed136b0b086b6b577bc64d67d5581acd7cc129af52654384e"},
+    {file = "coverage-7.2.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9a22cbb5ede6fade0482111fa7f01115ff04039795d7092ed0db43522431b4f2"},
+    {file = "coverage-7.2.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:292300f76440651529b8ceec283a9370532f4ecba9ad67d120617021bb5ef139"},
+    {file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7ff8f3fb38233035028dbc93715551d81eadc110199e14bbbfa01c5c4a43f8d8"},
+    {file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:a08c7401d0b24e8c2982f4e307124b671c6736d40d1c39e09d7a8687bddf83ed"},
+    {file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ef9659d1cda9ce9ac9585c045aaa1e59223b143f2407db0eaee0b61a4f266fb6"},
+    {file = "coverage-7.2.5-cp311-cp311-win32.whl", hash = "sha256:30dcaf05adfa69c2a7b9f7dfd9f60bc8e36b282d7ed25c308ef9e114de7fc23b"},
+    {file = "coverage-7.2.5-cp311-cp311-win_amd64.whl", hash = "sha256:97072cc90f1009386c8a5b7de9d4fc1a9f91ba5ef2146c55c1f005e7b5c5e068"},
+    {file = "coverage-7.2.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bebea5f5ed41f618797ce3ffb4606c64a5de92e9c3f26d26c2e0aae292f015c1"},
+    {file = "coverage-7.2.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:828189fcdda99aae0d6bf718ea766b2e715eabc1868670a0a07bf8404bf58c33"},
+    {file = "coverage-7.2.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e8a95f243d01ba572341c52f89f3acb98a3b6d1d5d830efba86033dd3687ade"},
+    {file = "coverage-7.2.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8834e5f17d89e05697c3c043d3e58a8b19682bf365048837383abfe39adaed5"},
+    {file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d1f25ee9de21a39b3a8516f2c5feb8de248f17da7eead089c2e04aa097936b47"},
+    {file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1637253b11a18f453e34013c665d8bf15904c9e3c44fbda34c643fbdc9d452cd"},
+    {file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8e575a59315a91ccd00c7757127f6b2488c2f914096077c745c2f1ba5b8c0969"},
+    {file = "coverage-7.2.5-cp37-cp37m-win32.whl", hash = "sha256:509ecd8334c380000d259dc66feb191dd0a93b21f2453faa75f7f9cdcefc0718"},
+    {file = "coverage-7.2.5-cp37-cp37m-win_amd64.whl", hash = "sha256:12580845917b1e59f8a1c2ffa6af6d0908cb39220f3019e36c110c943dc875b0"},
+    {file = "coverage-7.2.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b5016e331b75310610c2cf955d9f58a9749943ed5f7b8cfc0bb89c6134ab0a84"},
+    {file = "coverage-7.2.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:373ea34dca98f2fdb3e5cb33d83b6d801007a8074f992b80311fc589d3e6b790"},
+    {file = "coverage-7.2.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a063aad9f7b4c9f9da7b2550eae0a582ffc7623dca1c925e50c3fbde7a579771"},
+    {file = "coverage-7.2.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38c0a497a000d50491055805313ed83ddba069353d102ece8aef5d11b5faf045"},
+    {file = "coverage-7.2.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2b3b05e22a77bb0ae1a3125126a4e08535961c946b62f30985535ed40e26614"},
+    {file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0342a28617e63ad15d96dca0f7ae9479a37b7d8a295f749c14f3436ea59fdcb3"},
+    {file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:cf97ed82ca986e5c637ea286ba2793c85325b30f869bf64d3009ccc1a31ae3fd"},
+    {file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c2c41c1b1866b670573657d584de413df701f482574bad7e28214a2362cb1fd1"},
+    {file = "coverage-7.2.5-cp38-cp38-win32.whl", hash = "sha256:10b15394c13544fce02382360cab54e51a9e0fd1bd61ae9ce012c0d1e103c813"},
+    {file = "coverage-7.2.5-cp38-cp38-win_amd64.whl", hash = "sha256:a0b273fe6dc655b110e8dc89b8ec7f1a778d78c9fd9b4bda7c384c8906072212"},
+    {file = "coverage-7.2.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c587f52c81211d4530fa6857884d37f514bcf9453bdeee0ff93eaaf906a5c1b"},
+    {file = "coverage-7.2.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4436cc9ba5414c2c998eaedee5343f49c02ca93b21769c5fdfa4f9d799e84200"},
+    {file = "coverage-7.2.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6599bf92f33ab041e36e06d25890afbdf12078aacfe1f1d08c713906e49a3fe5"},
+    {file = "coverage-7.2.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:857abe2fa6a4973f8663e039ead8d22215d31db613ace76e4a98f52ec919068e"},
+    {file = "coverage-7.2.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6f5cab2d7f0c12f8187a376cc6582c477d2df91d63f75341307fcdcb5d60303"},
+    {file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:aa387bd7489f3e1787ff82068b295bcaafbf6f79c3dad3cbc82ef88ce3f48ad3"},
+    {file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:156192e5fd3dbbcb11cd777cc469cf010a294f4c736a2b2c891c77618cb1379a"},
+    {file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bd3b4b8175c1db502adf209d06136c000df4d245105c8839e9d0be71c94aefe1"},
+    {file = "coverage-7.2.5-cp39-cp39-win32.whl", hash = "sha256:ddc5a54edb653e9e215f75de377354e2455376f416c4378e1d43b08ec50acc31"},
+    {file = "coverage-7.2.5-cp39-cp39-win_amd64.whl", hash = "sha256:338aa9d9883aaaad53695cb14ccdeb36d4060485bb9388446330bef9c361c252"},
+    {file = "coverage-7.2.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:8877d9b437b35a85c18e3c6499b23674684bf690f5d96c1006a1ef61f9fdf0f3"},
+    {file = "coverage-7.2.5.tar.gz", hash = "sha256:f99ef080288f09ffc687423b8d60978cf3a465d3f404a18d1a05474bd8575a47"},
 ]
 
 [package.dependencies]
@@ -291,14 +291,14 @@ files = [
 
 [[package]]
 name = "platformdirs"
-version = "3.3.0"
+version = "3.5.0"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-3.3.0-py3-none-any.whl", hash = "sha256:ea61fd7b85554beecbbd3e9b37fb26689b227ffae38f73353cbcc1cf8bd01878"},
-    {file = "platformdirs-3.3.0.tar.gz", hash = "sha256:64370d47dc3fca65b4879f89bdead8197e93e05d696d6d1816243ebae8595da5"},
+    {file = "platformdirs-3.5.0-py3-none-any.whl", hash = "sha256:47692bc24c1958e8b0f13dd727307cff1db103fca36399f457da8e05f222fdc4"},
+    {file = "platformdirs-3.5.0.tar.gz", hash = "sha256:7954a68d0ba23558d753f73437c55f89027cf8f5108c19844d4b82e5af396335"},
 ]
 
 [package.dependencies]
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index 4984b2e2..582736d6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -20,6 +20,6 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 190005,202003,100,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,,,4
 190005,202004,100,34,1.152154399,,1.113,1,87.62068966,5134,R,,,5
 190006,202001,100,8,,,1,0.9214,96.16299559,769.3039647,C,,,4
-190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.5239083,FIC,,,3
-190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.8749052,FIC,,,4
+190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.523909,FIC,,,3
+190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.874906,FIC,,,4
 190006,202004,100,8,,,1.113,1,87.62068966,706.6157695,FIC,,,5
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 84e6fce2..35515557 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -21,6 +21,10 @@ link_filter = "identifier NOT IN ('200013', '200014')"
 [30_class_change_C_C_FI_filtered]
 link_filter = "identifier NOT IN ('230006', '230008')"
 
+[33_partial_link_columns]
+forward_link_col = "forward"
+backward_link_col = "backward"
+
 [35_TB_10_R_R_FI]
 lower_trim = 10
 upper_trim = 10
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 80301ab4..36975b1f 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -75,7 +75,6 @@
     exclude_col,
     forward_growth_col,
     backward_growth_col,
-    filtered_marker_col,
     filtered_forward_col,
     filtered_backward_col,
     trimmed_forward_col,

From cb2f5033634e75ec0f2d50afb47e489c4b82801a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 2 May 2023 12:01:59 +0100
Subject: [PATCH 226/531] More Unit Engine tests to separate folder.

---
 .../unit/back_data_missing_column.csv         |  0
 .../unit/back_data_no_output.csv              |  0
 .../unit/back_data_nulls.csv                  |  0
 .../unit/back_data_with_link_cols.csv         |  0
 .../unit/back_data_without_link_cols.csv      |  0
 .../unit/basic_functionality.csv              |  0
 .../basic_functionality_with_link_cols.csv    |  0
 .../unit/duplicate_rows.csv                   |  0
 .../unit/input_data_nulls.csv                 |  0
 tests/imputation/test_engine.py               | 44 +++++++++----------
 10 files changed, 22 insertions(+), 22 deletions(-)
 rename tests/fixture_data/imputation/{ratio_of_means => engine}/unit/back_data_missing_column.csv (100%)
 rename tests/fixture_data/imputation/{ratio_of_means => engine}/unit/back_data_no_output.csv (100%)
 rename tests/fixture_data/imputation/{ratio_of_means => engine}/unit/back_data_nulls.csv (100%)
 rename tests/fixture_data/imputation/{ratio_of_means => engine}/unit/back_data_with_link_cols.csv (100%)
 rename tests/fixture_data/imputation/{ratio_of_means => engine}/unit/back_data_without_link_cols.csv (100%)
 rename tests/fixture_data/imputation/{ratio_of_means => engine}/unit/basic_functionality.csv (100%)
 rename tests/fixture_data/imputation/{ratio_of_means => engine}/unit/basic_functionality_with_link_cols.csv (100%)
 rename tests/fixture_data/imputation/{ratio_of_means => engine}/unit/duplicate_rows.csv (100%)
 rename tests/fixture_data/imputation/{ratio_of_means => engine}/unit/input_data_nulls.csv (100%)

diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/back_data_missing_column.csv b/tests/fixture_data/imputation/engine/unit/back_data_missing_column.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/unit/back_data_missing_column.csv
rename to tests/fixture_data/imputation/engine/unit/back_data_missing_column.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/back_data_no_output.csv b/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/unit/back_data_no_output.csv
rename to tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/back_data_nulls.csv b/tests/fixture_data/imputation/engine/unit/back_data_nulls.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/unit/back_data_nulls.csv
rename to tests/fixture_data/imputation/engine/unit/back_data_nulls.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/back_data_with_link_cols.csv b/tests/fixture_data/imputation/engine/unit/back_data_with_link_cols.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/unit/back_data_with_link_cols.csv
rename to tests/fixture_data/imputation/engine/unit/back_data_with_link_cols.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/back_data_without_link_cols.csv b/tests/fixture_data/imputation/engine/unit/back_data_without_link_cols.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/unit/back_data_without_link_cols.csv
rename to tests/fixture_data/imputation/engine/unit/back_data_without_link_cols.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/basic_functionality.csv b/tests/fixture_data/imputation/engine/unit/basic_functionality.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/unit/basic_functionality.csv
rename to tests/fixture_data/imputation/engine/unit/basic_functionality.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/basic_functionality_with_link_cols.csv b/tests/fixture_data/imputation/engine/unit/basic_functionality_with_link_cols.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/unit/basic_functionality_with_link_cols.csv
rename to tests/fixture_data/imputation/engine/unit/basic_functionality_with_link_cols.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/duplicate_rows.csv b/tests/fixture_data/imputation/engine/unit/duplicate_rows.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/unit/duplicate_rows.csv
rename to tests/fixture_data/imputation/engine/unit/duplicate_rows.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/unit/input_data_nulls.csv b/tests/fixture_data/imputation/engine/unit/input_data_nulls.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/unit/input_data_nulls.csv
rename to tests/fixture_data/imputation/engine/unit/input_data_nulls.csv
diff --git a/tests/imputation/test_engine.py b/tests/imputation/test_engine.py
index 2d0d0f73..24ad396c 100644
--- a/tests/imputation/test_engine.py
+++ b/tests/imputation/test_engine.py
@@ -107,7 +107,7 @@ def test_back_data_not_a_dataframe(fxt_load_test_csv):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -124,7 +124,7 @@ def test_dataframe_column_missing(fxt_load_test_csv):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -141,7 +141,7 @@ def test_dataframe_duplicate_rows(fxt_load_test_csv):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "duplicate_rows",
     )
@@ -157,7 +157,7 @@ def test_dataframe_target_missing(fxt_load_test_csv):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -174,7 +174,7 @@ def test_params_none(fxt_load_test_csv):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -189,7 +189,7 @@ def test_params_empty_string(fxt_load_test_csv):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -204,13 +204,13 @@ def test_params_missing_link_column(fxt_load_test_csv):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
     with pytest.raises(TypeError):
         impute(
-            input_df=test_dataframe, **params, construction_link_col=construction_col
+            input_df=test_dataframe, **params, forward_link_col=forward_col
         )
 
 
@@ -219,7 +219,7 @@ def test_params_not_string(fxt_load_test_csv):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -237,7 +237,7 @@ def test_dataframe_returned_as_expected(fxt_spark_session, fxt_load_test_csv):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -255,7 +255,7 @@ def test_back_data_missing_column(fxt_load_test_csv, fxt_spark_session):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -263,7 +263,7 @@ def test_back_data_missing_column(fxt_load_test_csv, fxt_spark_session):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "back_data_missing_column",
     )
@@ -276,7 +276,7 @@ def test_back_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -284,7 +284,7 @@ def test_back_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "back_data_nulls",
     )
@@ -298,7 +298,7 @@ def test_back_data_without_output_is_invalid(fxt_load_test_csv, fxt_spark_sessio
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -313,7 +313,7 @@ def test_back_data_without_output_is_invalid(fxt_load_test_csv, fxt_spark_sessio
         ],
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "back_data_no_output",
     )
@@ -329,7 +329,7 @@ def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_ses
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -338,7 +338,7 @@ def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_ses
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "back_data_with_link_cols",
     )
@@ -357,7 +357,7 @@ def test_input_has_link_cols_and_back_data_does_not_have_link_cols(
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality_with_link_cols",
     )
@@ -366,7 +366,7 @@ def test_input_has_link_cols_and_back_data_does_not_have_link_cols(
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "back_data_without_link_cols",
     )
@@ -393,7 +393,7 @@ def test_incorrect_column_types(fxt_load_test_csv):
         dataframe_columns,
         bad_dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "basic_functionality",
     )
@@ -406,7 +406,7 @@ def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
         dataframe_columns,
         dataframe_types,
         "imputation",
-        "ratio_of_means",
+        "engine",
         "unit",
         "input_data_nulls",
     )

From e9fe9ec6f23a932e7ce48c17a8ea7ffcccd2dbdd Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 12:09:58 +0100
Subject: [PATCH 227/531] Correctly default construction count to 0

---
 statistical_methods_library/imputation/engine.py       | 10 ++++++----
 .../imputation/ratio_calculators.py                    |  8 +++++---
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index c3ba2f76..7a6c4177 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -319,7 +319,8 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
 
         # Join the grouping ratios onto the input such that each contributor has
         # a set of ratios.
-        all_fill_cols = []
+        fill_columns = []
+        fill_values = {}
         for result in sum(
             (
                 calculator(df=working_df, **ratio_calculator_params)
@@ -328,11 +329,12 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             [],
         ):
             df = df.join(result.data, result.join_columns, "left")
-            all_fill_cols += result.fill_columns
+            fill_columns += result.fill_columns
+            fill_values.update(result.all_fill_values)
             additional_outputs.update(result.additional_outputs)
 
-        if all_fill_cols:
-            df = df.fillna(1.0, all_fill_cols)
+        for fill_column in fill_columns:
+            df = df.fillna(fill_values.get(fill_column, 1.0), fill_column)
 
         if weight is not None:
 
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 9cb16ada..983a6923 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -14,8 +14,9 @@
 @dataclass
 class RatioCalculationResult:
     data: DataFrame
-    join_columns: List[Union[str, Column]]
-    fill_columns: List[Union[str, Column]] = field(default_factory=list)
+    join_columns: List[str]
+    fill_columns: List[str] = field(default_factory=list)
+    fill_values: Optional[Dict[str, str]] = field(default_factory=dict)
     additional_outputs: Optional[Dict[str, str]] = field(default_factory=dict)
 
 
@@ -341,6 +342,7 @@ def construction(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
                 )
             ),
             join_columns=["period", "grouping"],
-            fill_columns=["construction"],
+            fill_columns=["construction", "count_construction"],
+            fill_values={"count_construction": 0},
         )
     ]

From 1bddf765b476b4d2c874ebd61413d3b8d932d25e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 12:11:35 +0100
Subject: [PATCH 228/531] Correct fill values attribute name

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 7a6c4177..c16d79f3 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -330,7 +330,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         ):
             df = df.join(result.data, result.join_columns, "left")
             fill_columns += result.fill_columns
-            fill_values.update(result.all_fill_values)
+            fill_values.update(result.fill_values)
             additional_outputs.update(result.additional_outputs)
 
         for fill_column in fill_columns:

From 711dd95391316d9385b2de99f058f36c655810d5 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 2 May 2023 12:37:59 +0100
Subject: [PATCH 229/531] These should default to 0

---
 .../dev_scenarios/zero_links_output.csv       | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_output.csv
index 6becf260..67774d14 100644
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_output.csv
@@ -1,26 +1,26 @@
 identifier,date,group,other,output,marker,forward,backward,count_forward,count_backward
-1111,202105,9000,2,0,FIR,0,1,4,
+1111,202105,9000,2,0,FIR,0,1,4,0
 1111,202104,9000,2,200,FIR,2,1,4,0
 1111,202103,9000,2,100,R,2,0.5,4,4
 1111,202102,9000,2,50,BI,1,0.5,0,4
-1111,202101,9000,2,0,BI,1,0,,4
-2222,202105,9000,2,0,R,0,1,4,
+1111,202101,9000,2,0,BI,1,0,0,4
+2222,202105,9000,2,0,R,0,1,4,0
 2222,202104,9000,2,200,R,2,1,4,0
 2222,202103,9000,2,100,R,2,0.5,4,4
 2222,202102,9000,2,50,R,1,0.5,0,4
-2222,202101,9000,2,0,R,1,0,,4
-3333,202105,9000,2,0,R,0,1,4,
+2222,202101,9000,2,0,R,1,0,0,4
+3333,202105,9000,2,0,R,0,1,4,0
 3333,202104,9000,2,200,R,2,1,4,0
 3333,202103,9000,2,100,R,2,0.5,4,4
 3333,202102,9000,2,50,R,1,0.5,0,4
-3333,202101,9000,2,0,R,1,0,,4
-4444,202105,9000,2,0,R,0,1,4,
+3333,202101,9000,2,0,R,1,0,0,4
+4444,202105,9000,2,0,R,0,1,4,0
 4444,202104,9000,2,200,R,2,1,4,0
 4444,202103,9000,2,100,R,2,0.5,4,4
 4444,202102,9000,2,50,R,1,0.5,0,4
-4444,202101,9000,2,0,R,1,0,,4
-5555,202105,9000,2,0,R,0,1,4,
+4444,202101,9000,2,0,R,1,0,0,4
+5555,202105,9000,2,0,R,0,1,4,0
 5555,202104,9000,2,200,R,2,1,4,0
 5555,202103,9000,2,100,R,2,0.5,4,4
 5555,202102,9000,2,50,R,1,0.5,0,4
-5555,202101,9000,2,0,R,1,0,,4
+5555,202101,9000,2,0,R,1,0,0,4

From ee0633900a1f3a10bea20ce1f7967d4f6b3fa396 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 12:47:08 +0100
Subject: [PATCH 230/531] Correct observation counts in ratio of means prior to
 adding defaulting columns

---
 .../imputation/ratio_calculators.py           | 22 ++-----------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 983a6923..b3f41b63 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -299,26 +299,8 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
                     )/sum(next.output) AS backward
                 """
             ),
-            expr(
-                """
-                    CASE
-                        WHEN sum(previous.output) = 0
-                        THEN 0
-                        WHEN sum(previous.output) IS NOT NULL
-                        THEN sum(cast(previous.output IS NOT NULL AS integer))
-                    END AS count_forward
-                """
-            ),
-            expr(
-                """
-                    CASE
-                        WHEN sum(next.output) = 0
-                        THEN 0
-                        WHEN sum(next.output) IS NOT NULL
-                        THEN sum(cast(next.output IS NOT NULL AS integer))
-                    END AS count_backward
-                """
-            ),
+            expr("count(previous.output) AS count_forward"),
+            expr("count(next.output) AS count_backward"),
         )
     )
     return [

From 81cfa37097ca4fdd91928324d898b5f48202b3f1 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 13:10:32 +0100
Subject: [PATCH 231/531] Default forward backward and construction columns for
 ratio of means and construction

---
 .../imputation/ratio_calculators.py           | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index b3f41b63..fa4370a5 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -301,13 +301,21 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
             ),
             expr("count(previous.output) AS count_forward"),
             expr("count(next.output) AS count_backward"),
+            expr(coalesce(sum(previous.output), 0) = 0 AS default_forward),
+            expr(coalesce(sum(next.output), 0) = 0 AS default_backward),
         )
     )
     return [
         RatioCalculationResult(
             data=df,
             join_columns=["period", "grouping"],
-            fill_columns=["forward", "backward"],
+            fill_columns=[
+                "forward",
+                "backward",
+                "default_forward",
+                "default_backward"
+            ],
+        fill_values={"default_forward": True, "default_backward": True}
         )
     ]
 
@@ -321,10 +329,15 @@ def construction(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
                 .agg(
                     expr("sum(current.output)/sum(aux) AS construction"),
                     expr("count(aux) AS count_construction"),
+                    expr(coalesce(sum(aux), 0) = 0 AS default_construction),
                 )
             ),
             join_columns=["period", "grouping"],
-            fill_columns=["construction", "count_construction"],
-            fill_values={"count_construction": 0},
+            fill_columns=[
+                "construction",
+                "count_construction",
+                "default_construction"
+            ],
+            fill_values={"count_construction": 0, "default_construction": True},
         )
     ]

From b5e32b849d4f0f78966367ff4aa99b1a65881178 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 13:19:30 +0100
Subject: [PATCH 232/531] Correct filling of count columns in ratio of means

---
 .../imputation/ratio_calculators.py                      | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index fa4370a5..74d2cd5b 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -312,10 +312,17 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
             fill_columns=[
                 "forward",
                 "backward",
+                "count_forward",
+                "count_backward",
                 "default_forward",
                 "default_backward"
             ],
-        fill_values={"default_forward": True, "default_backward": True}
+            fill_values={
+                "count_forward": 0,
+                "count_backward": 0,
+                "default_forward": True,
+                "default_backward": True
+            }
         )
     ]
 

From 2b7b81e50e3d4ffb29f4bf091d1fa38b37d495b9 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 13:22:06 +0100
Subject: [PATCH 233/531] Fix missing quotes

---
 statistical_methods_library/imputation/ratio_calculators.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 74d2cd5b..3e3a4a44 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -301,8 +301,8 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
             ),
             expr("count(previous.output) AS count_forward"),
             expr("count(next.output) AS count_backward"),
-            expr(coalesce(sum(previous.output), 0) = 0 AS default_forward),
-            expr(coalesce(sum(next.output), 0) = 0 AS default_backward),
+            expr("coalesce(sum(previous.output), 0) = 0 AS default_forward"),
+            expr("coalesce(sum(next.output), 0) = 0 AS default_backward"),
         )
     )
     return [
@@ -336,7 +336,7 @@ def construction(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
                 .agg(
                     expr("sum(current.output)/sum(aux) AS construction"),
                     expr("count(aux) AS count_construction"),
-                    expr(coalesce(sum(aux), 0) = 0 AS default_construction),
+                    expr("coalesce(sum(aux), 0) = 0 AS default_construction"),
                 )
             ),
             join_columns=["period", "grouping"],

From aadb16808e2a64d4b1fad894303baf27c49a098a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 2 May 2023 13:36:24 +0100
Subject: [PATCH 234/531] Start adjusting tests to match new functionality

---
 .../dev_scenarios/cal_year_span_output.csv    | 100 +++++++++---------
 .../dev_scenarios/divide_by_zero_output.csv   |  26 ++---
 .../single_contributor_output.csv             |  52 ++++-----
 .../dev_scenarios/zero_links_input.csv        |  26 -----
 .../dev_scenarios/zero_links_output.csv       |  26 -----
 .../methodology_scenarios/01_C_output.csv     |   8 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  16 +--
 .../03_R_R_FI_output.csv                      |  16 +--
 8 files changed, 109 insertions(+), 161 deletions(-)
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_output.csv

diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_output.csv
index 00ff6fd7..bfc91017 100644
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_output.csv
@@ -1,51 +1,51 @@
 identifier,date,group,other,output,marker,forward,backward,count_forward,count_backward
-1111,202012,9000,2.0,1000.0,R,1.0,0.9090909090909091,,5
-1111,202101,9000,2.0,1100.0,R,1.1,0.9090909090909091,5,4
-1111,202102,9000,2.0,1210.0,FIR,1.1,0.9090909090909091,4,3
-1111,202103,9000,2.0,1331.0,R,1.1,0.9090909090909092,3,3
-1111,202104,9000,2.0,1464.1,R,1.0999999999999999,1.0,3,
-2222,202012,9000,2.0,2000.0,R,1.0,0.9090909090909091,,5
-2222,202101,9000,2.0,2200.0,R,1.1,0.9090909090909091,5,4
-2222,202102,9000,2.0,2420.0,R,1.1,0.9090909090909091,4,3
-2222,202103,9000,2.0,2662.0,R,1.1,0.9090909090909092,3,3
-2222,202104,9000,2.0,2928.2,R,1.0999999999999999,1.0,3,
-3333,202012,9000,2.0,3000.0,R,1.0,0.9090909090909091,,5
-3333,202101,9000,2.0,3300.0,R,1.1,0.9090909090909091,5,4
-3333,202102,9000,2.0,3630.0,R,1.1,0.9090909090909091,4,3
-3333,202103,9000,2.0,3993.0,R,1.1,0.9090909090909092,3,3
-3333,202104,9000,2.0,4392.3,R,1.0999999999999999,1.0,3,
-4444,202012,9000,2.0,4000.0,R,1.0,0.9090909090909091,,5
-4444,202101,9000,2.0,4400.0,R,1.1,0.9090909090909091,5,4
-4444,202102,9000,2.0,4840.0,R,1.1,0.9090909090909091,4,3
-4444,202103,9000,2.0,5324.0,R,1.1,0.9090909090909092,3,3
-4444,202104,9000,2.0,5856.4,FIR,1.0999999999999999,1.0,3,
-5555,202012,9000,2.0,5000.0,R,1.0,0.9090909090909091,,5
-5555,202101,9000,2.0,5500.0,R,1.1,0.9090909090909091,5,4
-5555,202102,9000,2.0,6050.0,R,1.1,0.9090909090909091,4,3
-5555,202103,9000,2.0,6655.0,FIR,1.1,0.9090909090909092,3,3
-5555,202104,9000,2.0,7320.5,FIR,1.0999999999999999,1.0,3,
-1010,202012,9900,2.0,1000.0,R,1.0,0.9090909090909091,,3
-1010,202101,9900,2.0,1100.0,R,1.1,0.9090909090909091,3,3
-1010,202102,9900,2.0,1210.0,FIR,1.1,0.9090909090909091,3,4
-1010,202103,9900,2.0,1331.0,FIR,1.1,0.9090909090909091,4,4
-1010,202104,9900,2.0,1464.1,R,1.1,1.0,4,
-2020,202012,9900,2.0,2000.0,R,1.0,0.9090909090909091,,3
-2020,202101,9900,2.0,2200.0,R,1.1,0.9090909090909091,3,3
-2020,202102,9900,2.0,2420.0,R,1.1,0.9090909090909091,3,4
-2020,202103,9900,2.0,2662.0,R,1.1,0.9090909090909091,4,4
-2020,202104,9900,2.0,2928.2,R,1.1,1.0,4,
-3030,202012,9900,2.0,3000.0,R,1.0,0.9090909090909091,,3
-3030,202101,9900,2.0,3300.0,R,1.1,0.9090909090909091,3,3
-3030,202102,9900,2.0,3630.0,R,1.1,0.9090909090909091,3,4
-3030,202103,9900,2.0,3993.0,R,1.1,0.9090909090909091,4,4
-3030,202104,9900,2.0,4392.3,R,1.1,1.0,4,
-4040,202012,9900,2.0,4000.0,BI,1.0,0.9090909090909091,,3
-4040,202101,9900,2.0,4400.0,R,1.1,0.9090909090909091,3,3
-4040,202102,9900,2.0,4840.0,R,1.1,0.9090909090909091,3,4
-4040,202103,9900,2.0,5324.0,R,1.1,0.9090909090909091,4,4
-4040,202104,9900,2.0,5856.4,R,1.1,1.0,4,
-5050,202012,9900,2.0,5000.0,BI,1.0,0.9090909090909091,,3
-5050,202101,9900,2.0,5500.0,BI,1.1,0.9090909090909091,3,3
-5050,202102,9900,2.0,6050.0,R,1.1,0.9090909090909091,3,4
-5050,202103,9900,2.0,6655.0,R,1.1,0.9090909090909091,4,4
-5050,202104,9900,2.0,7320.5,R,1.1,1.0,4,
+1111,202012,9000,2,1000,R,1,0.909090909090909,0,5
+1111,202101,9000,2,1100,R,1.1,0.909090909090909,5,4
+1111,202102,9000,2,1210,FIR,1.1,0.909090909090909,4,3
+1111,202103,9000,2,1331,R,1.1,0.909090909090909,3,3
+1111,202104,9000,2,1464.1,R,1.1,1,3,0
+2222,202012,9000,2,2000,R,1,0.909090909090909,0,5
+2222,202101,9000,2,2200,R,1.1,0.909090909090909,5,4
+2222,202102,9000,2,2420,R,1.1,0.909090909090909,4,3
+2222,202103,9000,2,2662,R,1.1,0.909090909090909,3,3
+2222,202104,9000,2,2928.2,R,1.1,1,3,0
+3333,202012,9000,2,3000,R,1,0.909090909090909,0,5
+3333,202101,9000,2,3300,R,1.1,0.909090909090909,5,4
+3333,202102,9000,2,3630,R,1.1,0.909090909090909,4,3
+3333,202103,9000,2,3993,R,1.1,0.909090909090909,3,3
+3333,202104,9000,2,4392.3,R,1.1,1,3,0
+4444,202012,9000,2,4000,R,1,0.909090909090909,0,5
+4444,202101,9000,2,4400,R,1.1,0.909090909090909,5,4
+4444,202102,9000,2,4840,R,1.1,0.909090909090909,4,3
+4444,202103,9000,2,5324,R,1.1,0.909090909090909,3,3
+4444,202104,9000,2,5856.4,FIR,1.1,1,3,0
+5555,202012,9000,2,5000,R,1,0.909090909090909,0,5
+5555,202101,9000,2,5500,R,1.1,0.909090909090909,5,4
+5555,202102,9000,2,6050,R,1.1,0.909090909090909,4,3
+5555,202103,9000,2,6655,FIR,1.1,0.909090909090909,3,3
+5555,202104,9000,2,7320.5,FIR,1.1,1,3,0
+1010,202012,9900,2,1000,R,1,0.909090909090909,0,3
+1010,202101,9900,2,1100,R,1.1,0.909090909090909,3,3
+1010,202102,9900,2,1210,FIR,1.1,0.909090909090909,3,4
+1010,202103,9900,2,1331,FIR,1.1,0.909090909090909,4,4
+1010,202104,9900,2,1464.1,R,1.1,1,4,0
+2020,202012,9900,2,2000,R,1,0.909090909090909,0,3
+2020,202101,9900,2,2200,R,1.1,0.909090909090909,3,3
+2020,202102,9900,2,2420,R,1.1,0.909090909090909,3,4
+2020,202103,9900,2,2662,R,1.1,0.909090909090909,4,4
+2020,202104,9900,2,2928.2,R,1.1,1,4,0
+3030,202012,9900,2,3000,R,1,0.909090909090909,0,3
+3030,202101,9900,2,3300,R,1.1,0.909090909090909,3,3
+3030,202102,9900,2,3630,R,1.1,0.909090909090909,3,4
+3030,202103,9900,2,3993,R,1.1,0.909090909090909,4,4
+3030,202104,9900,2,4392.3,R,1.1,1,4,0
+4040,202012,9900,2,4000,BI,1,0.909090909090909,0,3
+4040,202101,9900,2,4400,R,1.1,0.909090909090909,3,3
+4040,202102,9900,2,4840,R,1.1,0.909090909090909,3,4
+4040,202103,9900,2,5324,R,1.1,0.909090909090909,4,4
+4040,202104,9900,2,5856.4,R,1.1,1,4,0
+5050,202012,9900,2,5000,BI,1,0.909090909090909,0,3
+5050,202101,9900,2,5500,BI,1.1,0.909090909090909,3,3
+5050,202102,9900,2,6050,R,1.1,0.909090909090909,3,4
+5050,202103,9900,2,6655,R,1.1,0.909090909090909,4,4
+5050,202104,9900,2,7320.5,R,1.1,1,4,0
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/divide_by_zero_output.csv
index af75a31c..1044cc57 100644
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/divide_by_zero_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/divide_by_zero_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_foward,count_backward,count_construction
-1,202001,1,1,10,R,1,0.5,10,,2,4
-1,202002,1,1,20,R,2,1,20,2,0,2
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
+1,202001,1,1,10,R,1,0.5,10,0,2,4
+1,202002,1,1,20,R,2,1,20,2,1,2
 1,202003,1,1,0,FIR,0,0,10,1,1,2
-1,202004,1,1,0,FIR,1,1,30,0,,1
-2,202001,1,1,10,R,1,0.5,10,,2,4
-2,202002,1,1,20,R,2,1,20,2,0,2
+1,202004,1,1,0,FIR,1,1,30,1,0,1
+2,202001,1,1,10,R,1,0.5,10,0,2,4
+2,202002,1,1,20,R,2,1,20,2,1,2
 2,202003,1,1,0,R,0,0,10,1,1,2
-2,202004,1,1,30,R,1,1,30,0,,1
-3,202001,1,1,10,R,1,0.5,10,,2,4
-3,202002,1,1,20,FIR,2,1,20,2,0,2
+2,202004,1,1,30,R,1,1,30,1,0,1
+3,202001,1,1,10,R,1,0.5,10,0,2,4
+3,202002,1,1,20,FIR,2,1,20,2,1,2
 3,202003,1,1,20,R,0,0,10,1,1,2
-3,202004,1,1,20,FIR,1,1,30,0,,1
-4,202001,1,1,10,R,1,0.5,10,,2,4
-4,202002,1,1,20,FIR,2,1,20,2,0,2
+3,202004,1,1,20,FIR,1,1,30,1,0,1
+4,202001,1,1,10,R,1,0.5,10,0,2,4
+4,202002,1,1,20,FIR,2,1,20,2,1,2
 4,202003,1,1,0,FIR,0,0,10,1,1,2
-4,202004,1,1,0,FIR,1,1,30,0,,1
+4,202004,1,1,0,FIR,1,1,30,1,0,1
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv
index 63e1f355..d65c6d99 100644
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv
@@ -1,27 +1,27 @@
 identifier,date,group,other,output,marker,forward,backward,count_forward,count_backward
-1111,202101,9000,2.0,1000.0,R,1.0,0.9090909090909091,,5
-1111,202102,9000,2.0,1100.0,R,1.1,0.9090909090909091,5,4
-1111,202103,9000,2.0,1210.0,FIR,1.1,0.9090909090909091,4,3
-1111,202104,9000,2.0,1331.0,R,1.1,0.9090909090909092,3,3
-1111,202105,9000,2.0,1464.1,R,1.0999999999999999,1.0,3,
-1111,202106,9000,2.0,1464.1,FIR,1.0,1.0,,
-2222,202101,9000,2.0,2000.0,R,1.0,0.9090909090909091,,5
-2222,202102,9000,2.0,2200.0,R,1.1,0.9090909090909091,5,4
-2222,202103,9000,2.0,2420.0,R,1.1,0.9090909090909091,4,3
-2222,202104,9000,2.0,2662.0,R,1.1,0.9090909090909092,3,3
-2222,202105,9000,2.0,2928.2,R,1.0999999999999999,1.0,3,
-3333,202101,9000,2.0,3000.0,R,1.0,0.9090909090909091,,5
-3333,202102,9000,2.0,3300.0,R,1.1,0.9090909090909091,5,4
-3333,202103,9000,2.0,3630.0,R,1.1,0.9090909090909091,4,3
-3333,202104,9000,2.0,3993.0,R,1.1,0.9090909090909092,3,3
-3333,202105,9000,2.0,4392.3,R,1.0999999999999999,1.0,3,
-4444,202101,9000,2.0,4000.0,R,1.0,0.9090909090909091,,5
-4444,202102,9000,2.0,4400.0,R,1.1,0.9090909090909091,5,4
-4444,202103,9000,2.0,4840.0,R,1.1,0.9090909090909091,4,3
-4444,202104,9000,2.0,5324.0,R,1.1,0.9090909090909092,3,3
-4444,202105,9000,2.0,5856.4,FIR,1.0999999999999999,1.0,3,
-5555,202101,9000,2.0,5000.0,R,1.0,0.9090909090909091,,5
-5555,202102,9000,2.0,5500.0,R,1.1,0.9090909090909091,5,4
-5555,202103,9000,2.0,6050.0,R,1.1,0.9090909090909091,4,3
-5555,202104,9000,2.0,6655.0,FIR,1.1,0.9090909090909092,3,3
-5555,202105,9000,2.0,7320.5,FIR,1.0999999999999999,1.0,3,
+1111,202101,9000,2,1000,R,1,0.909090909090909,0,5
+1111,202102,9000,2,1100,R,1.1,0.909090909090909,5,4
+1111,202103,9000,2,1210,FIR,1.1,0.909090909090909,4,3
+1111,202104,9000,2,1331,R,1.1,0.909090909090909,3,3
+1111,202105,9000,2,1464.1,R,1.1,1,3,0
+1111,202106,9000,2,1464.1,FIR,1,1,0,0
+2222,202101,9000,2,2000,R,1,0.909090909090909,0,5
+2222,202102,9000,2,2200,R,1.1,0.909090909090909,5,4
+2222,202103,9000,2,2420,R,1.1,0.909090909090909,4,3
+2222,202104,9000,2,2662,R,1.1,0.909090909090909,3,3
+2222,202105,9000,2,2928.2,R,1.1,1,3,0
+3333,202101,9000,2,3000,R,1,0.909090909090909,0,5
+3333,202102,9000,2,3300,R,1.1,0.909090909090909,5,4
+3333,202103,9000,2,3630,R,1.1,0.909090909090909,4,3
+3333,202104,9000,2,3993,R,1.1,0.909090909090909,3,3
+3333,202105,9000,2,4392.3,R,1.1,1,3,0
+4444,202101,9000,2,4000,R,1,0.909090909090909,0,5
+4444,202102,9000,2,4400,R,1.1,0.909090909090909,5,4
+4444,202103,9000,2,4840,R,1.1,0.909090909090909,4,3
+4444,202104,9000,2,5324,R,1.1,0.909090909090909,3,3
+4444,202105,9000,2,5856.4,FIR,1.1,1,3,0
+5555,202101,9000,2,5000,R,1,0.909090909090909,0,5
+5555,202102,9000,2,5500,R,1.1,0.909090909090909,5,4
+5555,202103,9000,2,6050,R,1.1,0.909090909090909,4,3
+5555,202104,9000,2,6655,FIR,1.1,0.909090909090909,3,3
+5555,202105,9000,2,7320.5,FIR,1.1,1,3,0
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_input.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_input.csv
deleted file mode 100644
index ae02a041..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_input.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,question,other
-1111,"202105","9000",,2
-1111,"202104","9000",,2
-1111,"202103","9000",100,2
-1111,"202102","9000",,2
-1111,"202101","9000",,2
-2222,"202105","9000",0,2
-2222,"202104","9000",200,2
-2222,"202103","9000",100,2
-2222,"202102","9000",50,2
-2222,"202101","9000",0,2
-3333,"202105","9000",0,2
-3333,"202104","9000",200,2
-3333,"202103","9000",100,2
-3333,"202102","9000",50,2
-3333,"202101","9000",0,2
-4444,"202105","9000",0,2
-4444,"202104","9000",200,2
-4444,"202103","9000",100,2
-4444,"202102","9000",50,2
-4444,"202101","9000",0,2
-5555,"202105","9000",0,2
-5555,"202104","9000",200,2
-5555,"202103","9000",100,2
-5555,"202102","9000",50,2
-5555,"202101","9000",0,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_output.csv
deleted file mode 100644
index 67774d14..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/zero_links_output.csv
+++ /dev/null
@@ -1,26 +0,0 @@
-identifier,date,group,other,output,marker,forward,backward,count_forward,count_backward
-1111,202105,9000,2,0,FIR,0,1,4,0
-1111,202104,9000,2,200,FIR,2,1,4,0
-1111,202103,9000,2,100,R,2,0.5,4,4
-1111,202102,9000,2,50,BI,1,0.5,0,4
-1111,202101,9000,2,0,BI,1,0,0,4
-2222,202105,9000,2,0,R,0,1,4,0
-2222,202104,9000,2,200,R,2,1,4,0
-2222,202103,9000,2,100,R,2,0.5,4,4
-2222,202102,9000,2,50,R,1,0.5,0,4
-2222,202101,9000,2,0,R,1,0,0,4
-3333,202105,9000,2,0,R,0,1,4,0
-3333,202104,9000,2,200,R,2,1,4,0
-3333,202103,9000,2,100,R,2,0.5,4,4
-3333,202102,9000,2,50,R,1,0.5,0,4
-3333,202101,9000,2,0,R,1,0,0,4
-4444,202105,9000,2,0,R,0,1,4,0
-4444,202104,9000,2,200,R,2,1,4,0
-4444,202103,9000,2,100,R,2,0.5,4,4
-4444,202102,9000,2,50,R,1,0.5,0,4
-4444,202101,9000,2,0,R,1,0,0,4
-5555,202105,9000,2,0,R,0,1,4,0
-5555,202104,9000,2,200,R,2,1,4,0
-5555,202103,9000,2,100,R,2,0.5,4,4
-5555,202102,9000,2,50,R,1,0.5,0,4
-5555,202101,9000,2,0,R,1,0,0,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index 76faf533..faa3dde8 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-10001,202001,100,1,3892,R,1.0,1.0,147.88764,,,3
-10002,202001,100,75,3873,R,1.0,1.0,147.88764,,,3
-10003,202001,100,13,5397,R,1.0,1.0,147.88764,,,3
-10004,202001,100,71,10500.022472,C,1.0,1.0,147.88764,,,3
+10001,202001,100,1,3892,R,1,1,147.88764,0,0,3
+10002,202001,100,75,3873,R,1,1,147.88764,0,0,3
+10003,202001,100,13,5397,R,1,1,147.88764,0,0,3
+10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index 80152ff7..23517411 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction
-20001,202001,100,35,2536,R,1.0,1.412595981,93.98369565,3,,3
-20001,202002,100,35,8283,R,0.707916498,1.0,66.5326087,,3,3
-20002,202001,100,72,9113,R,1.0,1.412595981,93.98369565,3,,3
-20002,202002,100,72,2970,R,0.707916498,1.0,66.5326087,,3,3
-20003,202001,100,77,5644,R,1.0,1.412595981,93.98369565,3,,3
-20003,202002,100,77,989,R,0.707916498,1.0,66.5326087,,3,3
-20004,202001,100,30,2819.51087,C,1.0,1.412595981,93.98369565,3,,3
-20004,202002,100,30,1995.978261,FIC,0.707916498,1.0,66.5326087,,3,3
+20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3
+20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3
+20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3
+20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3
+20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3
+20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3
+20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3
+20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index dc64db05..40074e98 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction
-30001,202001,100,51,8444,R,1.0,1.323142738,120.1990521,4,,4
+30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4
 30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4
-30001,202003,100,51,2003,R,0.785224274,1.0,103.0153846,,3,3
-30002,202001,100,72,9343,R,1.0,1.323142738,120.1990521,4,,4
+30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3
+30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4
 30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4
-30002,202003,100,72,4897,R,0.785224274,1.0,103.0153846,,3,3
-30003,202001,100,7,7511,R,1.0,1.323142738,120.1990521,4,,4
+30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3
+30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4
 30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4
-30003,202003,100,7,6492,R,0.785224274,1.0,103.0153846,,3,3
-30004,202001,100,81,64,R,1.0,1.323142738,120.1990521,4,,4
+30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3
+30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4
 30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4
-30004,202003,100,81,1659.178892,FIR,0.785224274,1.0,103.0153846,,3,3
+30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3

From c20b2a7cc37aed1594deb5bb6902df162b7ccfc6 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 2 May 2023 13:37:54 +0100
Subject: [PATCH 235/531] Shorten Link

---
 .../single_contributor_output.csv             | 40 +++++++++----------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv
index d65c6d99..73124e0c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv
@@ -1,27 +1,27 @@
 identifier,date,group,other,output,marker,forward,backward,count_forward,count_backward
-1111,202101,9000,2,1000,R,1,0.909090909090909,0,5
-1111,202102,9000,2,1100,R,1.1,0.909090909090909,5,4
-1111,202103,9000,2,1210,FIR,1.1,0.909090909090909,4,3
-1111,202104,9000,2,1331,R,1.1,0.909090909090909,3,3
+1111,202101,9000,2,1000,R,1,0.9090909,0,5
+1111,202102,9000,2,1100,R,1.1,0.9090909,5,4
+1111,202103,9000,2,1210,FIR,1.1,0.9090909,4,3
+1111,202104,9000,2,1331,R,1.1,0.9090909,3,3
 1111,202105,9000,2,1464.1,R,1.1,1,3,0
 1111,202106,9000,2,1464.1,FIR,1,1,0,0
-2222,202101,9000,2,2000,R,1,0.909090909090909,0,5
-2222,202102,9000,2,2200,R,1.1,0.909090909090909,5,4
-2222,202103,9000,2,2420,R,1.1,0.909090909090909,4,3
-2222,202104,9000,2,2662,R,1.1,0.909090909090909,3,3
+2222,202101,9000,2,2000,R,1,0.9090909,0,5
+2222,202102,9000,2,2200,R,1.1,0.9090909,5,4
+2222,202103,9000,2,2420,R,1.1,0.9090909,4,3
+2222,202104,9000,2,2662,R,1.1,0.9090909,3,3
 2222,202105,9000,2,2928.2,R,1.1,1,3,0
-3333,202101,9000,2,3000,R,1,0.909090909090909,0,5
-3333,202102,9000,2,3300,R,1.1,0.909090909090909,5,4
-3333,202103,9000,2,3630,R,1.1,0.909090909090909,4,3
-3333,202104,9000,2,3993,R,1.1,0.909090909090909,3,3
+3333,202101,9000,2,3000,R,1,0.9090909,0,5
+3333,202102,9000,2,3300,R,1.1,0.9090909,5,4
+3333,202103,9000,2,3630,R,1.1,0.9090909,4,3
+3333,202104,9000,2,3993,R,1.1,0.9090909,3,3
 3333,202105,9000,2,4392.3,R,1.1,1,3,0
-4444,202101,9000,2,4000,R,1,0.909090909090909,0,5
-4444,202102,9000,2,4400,R,1.1,0.909090909090909,5,4
-4444,202103,9000,2,4840,R,1.1,0.909090909090909,4,3
-4444,202104,9000,2,5324,R,1.1,0.909090909090909,3,3
+4444,202101,9000,2,4000,R,1,0.9090909,0,5
+4444,202102,9000,2,4400,R,1.1,0.9090909,5,4
+4444,202103,9000,2,4840,R,1.1,0.9090909,4,3
+4444,202104,9000,2,5324,R,1.1,0.9090909,3,3
 4444,202105,9000,2,5856.4,FIR,1.1,1,3,0
-5555,202101,9000,2,5000,R,1,0.909090909090909,0,5
-5555,202102,9000,2,5500,R,1.1,0.909090909090909,5,4
-5555,202103,9000,2,6050,R,1.1,0.909090909090909,4,3
-5555,202104,9000,2,6655,FIR,1.1,0.909090909090909,3,3
+5555,202101,9000,2,5000,R,1,0.9090909,0,5
+5555,202102,9000,2,5500,R,1.1,0.9090909,5,4
+5555,202103,9000,2,6050,R,1.1,0.9090909,4,3
+5555,202104,9000,2,6655,FIR,1.1,0.9090909,3,3
 5555,202105,9000,2,7320.5,FIR,1.1,1,3,0

From 400e8e597166235df4df83129528d8d32af07881 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 13:41:10 +0100
Subject: [PATCH 236/531] Correct filling of count and default columns in mean
 of ratios and remove unnecessary fill_columns list

---
 .../imputation/engine.py                      |  6 +-
 .../imputation/ratio_calculators.py           | 66 ++++++++++---------
 2 files changed, 37 insertions(+), 35 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index c16d79f3..cdfcdd06 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -319,7 +319,6 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
 
         # Join the grouping ratios onto the input such that each contributor has
         # a set of ratios.
-        fill_columns = []
         fill_values = {}
         for result in sum(
             (
@@ -329,12 +328,11 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             [],
         ):
             df = df.join(result.data, result.join_columns, "left")
-            fill_columns += result.fill_columns
             fill_values.update(result.fill_values)
             additional_outputs.update(result.additional_outputs)
 
-        for fill_column in fill_columns:
-            df = df.fillna(fill_values.get(fill_column, 1.0), fill_column)
+        for fill_column, fill_value in fill_values.items():
+            df = df.fillna(fill_value, fill_column)
 
         if weight is not None:
 
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 3e3a4a44..29653b20 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -15,7 +15,6 @@
 class RatioCalculationResult:
     data: DataFrame
     join_columns: List[str]
-    fill_columns: List[str] = field(default_factory=list)
     fill_values: Optional[Dict[str, str]] = field(default_factory=dict)
     additional_outputs: Optional[Dict[str, str]] = field(default_factory=dict)
 
@@ -218,27 +217,32 @@ def upper_bound(c):
             "trimmed_backward", lit(False)
         )
 
-    ratio_df = df.groupBy("period", "grouping").agg(
-        expr(
-            """mean(
+    ratio_df = (
+        df.groupBy("period", "grouping")
+        .agg(
+            expr(
+                """mean(
                 CASE WHEN NOT trimmed_forward THEN growth_forward END
             ) AS forward"""
-        ),
-        expr(
-            """mean(
+            ),
+            expr(
+                """mean(
                 CASE WHEN NOT trimmed_backward THEN growth_backward END
             ) AS backward"""
-        ),
-        expr(
-            """sum(cast(
+            ),
+            expr(
+                """sum(cast(
                 NOT trimmed_forward AND growth_forward IS NOT NULL AS integer
             )) AS count_forward"""
-        ),
-        expr(
-            """sum(cast(
+            ),
+            expr(
+                """sum(cast(
                 NOT trimmed_backward AND growth_backward IS NOT NULL AS integer
             )) AS count_backward"""
-        ),
+            ),
+        )
+        .withColumn("default_forward", expr("forward IS NOT NULL"))
+        .withColumn("default_backward", expr("backward IS NOT NULL"))
     )
 
     growth_df = df.select(
@@ -269,7 +273,14 @@ def upper_bound(c):
         RatioCalculationResult(
             data=ratio_df,
             join_columns=["period", "grouping"],
-            fill_columns=["forward", "backward"],
+            fill_values={
+                "forward": 1,
+                "backward": 1,
+                "count_forward": 0,
+                "count_backward": 0,
+                "default_forward": True,
+                "default_backward": True,
+            },
         ),
     ]
 
@@ -309,20 +320,14 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
         RatioCalculationResult(
             data=df,
             join_columns=["period", "grouping"],
-            fill_columns=[
-                "forward",
-                "backward",
-                "count_forward",
-                "count_backward",
-                "default_forward",
-                "default_backward"
-            ],
             fill_values={
+                "forward": 1,
+                "backward": 1,
                 "count_forward": 0,
                 "count_backward": 0,
                 "default_forward": True,
-                "default_backward": True
-            }
+                "default_backward": True,
+            },
         )
     ]
 
@@ -340,11 +345,10 @@ def construction(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
                 )
             ),
             join_columns=["period", "grouping"],
-            fill_columns=[
-                "construction",
-                "count_construction",
-                "default_construction"
-            ],
-            fill_values={"count_construction": 0, "default_construction": True},
+            fill_values={
+                "construction": 1,
+                "count_construction": 0,
+                "default_construction": True,
+            },
         )
     ]

From 9eaa0b59c14144d3dcbb25834731b95dd307f898 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 15:05:21 +0100
Subject: [PATCH 237/531] Fill in counts

---
 .../04_R_R_FI_FI_output.csv                   | 16 ++---
 .../05_R_R_FI_FI_FI_output.csv                | 16 ++---
 .../06_BI_BI_R_output.csv                     | 16 ++---
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          | 16 ++---
 .../methodology_scenarios/08_R_R_R_output.csv | 16 ++---
 .../09_R_NS_C_output.csv                      | 16 ++---
 .../10_C_FI_NS_R_output.csv                   | 16 ++---
 .../11_R_R_FI-BI_R_R_output.csv               | 32 +++++-----
 .../12_C_FI_FI_FI_FI_output.csv               | 16 ++---
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          | 16 ++---
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          | 16 ++---
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          | 16 ++---
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          | 16 ++---
 .../17_NS_R_FI_NS_output.csv                  | 12 ++--
 .../18_NS_BI_R_NS_output.csv                  | 12 ++--
 .../19_link_columns_output.csv                | 48 +++++++-------
 .../20_mixed_data_output.csv                  | 48 +++++++-------
 .../21_class_change_R_C_FI_output.csv         | 20 +++---
 .../22_class_change_C_BI_R_output.csv         | 20 +++---
 .../23_class_change_C_C_FI_output.csv         | 20 +++---
 .../24_class_change_R_BI_R_output.csv         | 20 +++---
 .../25_class_change_C_FI_FI_output.csv        | 28 ++++----
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv | 24 +++----
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv | 24 +++----
 .../28_link_columns_filtered_output.csv       | 64 +++++++++----------
 .../29_mixed_data_filtered_output.csv         | 64 +++++++++----------
 ...30_class_change_C_C_FI_filtered_output.csv | 36 +++++------
 27 files changed, 332 insertions(+), 332 deletions(-)

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index 30d6f2c2..f0c45592 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-40001,202001,100,35,9491,R,1.0,1.060305409,128.0208333,,4,4
+40001,202001,100,35,9491,R,1.0,1.060305409,128.0208333,0,4,4
 40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4
 40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3
-40001,202004,100,35,4911,R,0.637121844,1.0,73.71052632,3,,3
-40002,202001,100,63,2095,R,1.0,1.060305409,128.0208333,,4,4
+40001,202004,100,35,4911,R,0.637121844,1.0,73.71052632,3,0,3
+40002,202001,100,63,2095,R,1.0,1.060305409,128.0208333,0,4,4
 40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4
 40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3
-40002,202004,100,63,2115,R,0.637121844,1.0,73.71052632,3,,3
-40003,202001,100,16,7863,R,1.0,1.060305409,128.0208333,,4,4
+40002,202004,100,63,2115,R,0.637121844,1.0,73.71052632,3,0,3
+40003,202001,100,16,7863,R,1.0,1.060305409,128.0208333,0,4,4
 40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4
 40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3
-40003,202004,100,16,1377,R,0.637121844,1.0,73.71052632,3,,3
-40004,202001,100,78,5131,R,1.0,1.060305409,128.0208333,,4,4
+40003,202004,100,16,1377,R,0.637121844,1.0,73.71052632,3,0,3
+40004,202001,100,78,5131,R,1.0,1.060305409,128.0208333,0,4,4
 40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4
 40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3
-40004,202004,100,78,6193.009741,FIR,0.637121844,1.0,73.71052632,3,,3
+40004,202004,100,78,6193.009741,FIR,0.637121844,1.0,73.71052632,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
index c598c28e..efcf3da5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-50001,202001,100,59,6362,R,1.0,0.659160839,70.34328358,,4,4
+50001,202001,100,59,6362,R,1.0,0.659160839,70.34328358,0,4,4
 50001,202002,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4
 50001,202003,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3
 50001,202004,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3
-50001,202005,100,59,4687,R,0.481224628,1.0,49.9122807,3,,3
-50002,202001,100,36,4851,R,1.0,0.659160839,70.34328358,,4,4
+50001,202005,100,59,4687,R,0.481224628,1.0,49.9122807,3,0,3
+50002,202001,100,36,4851,R,1.0,0.659160839,70.34328358,0,4,4
 50002,202002,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4
 50002,202003,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3
 50002,202004,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3
-50002,202005,100,36,2327,R,0.481224628,1.0,49.9122807,3,,3
-50003,202001,100,76,2238,R,1.0,0.659160839,70.34328358,,4,4
+50002,202005,100,36,2327,R,0.481224628,1.0,49.9122807,3,0,3
+50003,202001,100,76,2238,R,1.0,0.659160839,70.34328358,0,4,4
 50003,202002,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4
 50003,202003,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3
 50003,202004,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3
-50003,202005,100,76,1521,R,0.481224628,1.0,49.9122807,3,,3
-50004,202001,100,30,688,R,1.0,0.659160839,70.34328358,,4,4
+50003,202005,100,76,1521,R,0.481224628,1.0,49.9122807,3,0,3
+50004,202001,100,30,688,R,1.0,0.659160839,70.34328358,0,4,4
 50004,202002,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4
 50004,202003,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3
 50004,202004,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3
-50004,202005,100,30,1521.344411,FIR,0.481224628,1.0,49.9122807,3,,3
+50004,202005,100,30,1521.344411,FIR,0.481224628,1.0,49.9122807,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index a38b9051..cc6e8b75 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-60001,202001,100,15,5077,R,1.0,1.408039237,117.9107143,,3,3
+60001,202001,100,15,5077,R,1.0,1.408039237,117.9107143,0,3,3
 60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3
-60001,202003,100,15,1046,R,1.194583644,1.0,100.913043,3,,4
-60002,202001,100,71,1588,R,1.0,1.408039237,117.9107143,,3,3
+60001,202003,100,15,1046,R,1.194583644,1.0,100.913043,3,0,4
+60002,202001,100,71,1588,R,1.0,1.408039237,117.9107143,0,3,3
 60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3
-60002,202003,100,71,3807,R,1.194583644,1.0,100.913043,3,,4
-60003,202001,100,26,6541,R,1.0,1.408039237,117.9107143,,3,3
+60002,202003,100,71,3807,R,1.194583644,1.0,100.913043,3,0,4
+60003,202001,100,26,6541,R,1.0,1.408039237,117.9107143,0,3,3
 60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3
-60003,202003,100,26,6351,R,1.194583644,1.0,100.913043,3,,4
-60004,202001,100,3,472.653159,BI,1.0,1.408039237,117.9107143,,3,3
+60003,202003,100,26,6351,R,1.194583644,1.0,100.913043,3,0,4
+60004,202001,100,3,472.653159,BI,1.0,1.408039237,117.9107143,0,3,3
 60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3
-60004,202003,100,3,401,R,1.194583644,1.0,100.913043,3,,4
+60004,202003,100,3,401,R,1.194583644,1.0,100.913043,3,0,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 40e6e6db..efa7df25 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-70001,202001,100,39,5951,R,1.0,1.964796824,107.48,,3,3
+70001,202001,100,39,5951,R,1.0,1.964796824,107.48,0,3,3
 70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3
 70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4
 70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3
 70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3
 70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4
-70001,202007,100,39,49,R,0.913631634,1.0,70.24,3,,3
-70002,202001,100,94,6705,R,1.0,1.964796824,107.48,,3,3
+70001,202007,100,39,49,R,0.913631634,1.0,70.24,3,0,3
+70002,202001,100,94,6705,R,1.0,1.964796824,107.48,0,3,3
 70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3
 70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4
 70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3
 70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3
 70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4
-70002,202007,100,94,3475,R,0.913631634,1.0,70.24,3,,3
-70003,202001,100,42,6153,R,1.0,1.964796824,107.48,,3,3
+70002,202007,100,94,3475,R,0.913631634,1.0,70.24,3,0,3
+70003,202001,100,42,6153,R,1.0,1.964796824,107.48,0,3,3
 70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3
 70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4
 70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3
 70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3
 70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4
-70003,202007,100,42,8768,R,0.913631634,1.0,70.24,3,,3
-70004,202001,100,6,10286.222995,BI,1.0,1.964796824,107.48,,3,3
+70003,202007,100,42,8768,R,0.913631634,1.0,70.24,3,0,3
+70004,202001,100,6,10286.222995,BI,1.0,1.964796824,107.48,0,3,3
 70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3
 70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4
 70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3
 70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3
 70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4
-70004,202007,100,6,5367.585848,FIR,0.913631634,1.0,70.24,3,,3
+70004,202007,100,6,5367.585848,FIR,0.913631634,1.0,70.24,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
index 98009fbb..03a59c30 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-80001,202001,100,91,4042,R,1.0,1.646151294,69.14982578,,4,4
+80001,202001,100,91,4042,R,1.0,1.646151294,69.14982578,0,4,4
 80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4
-80001,202003,100,91,644,R,1.711844725,1.0,71.90940767,4,,4
-80002,202001,100,85,7138,R,1.0,1.646151294,69.14982578,,4,4
+80001,202003,100,91,644,R,1.711844725,1.0,71.90940767,4,0,4
+80002,202001,100,85,7138,R,1.0,1.646151294,69.14982578,0,4,4
 80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4
-80002,202003,100,85,2746,R,1.711844725,1.0,71.90940767,4,,4
-80003,202001,100,41,2846,R,1.0,1.646151294,69.14982578,,4,4
+80002,202003,100,85,2746,R,1.711844725,1.0,71.90940767,4,0,4
+80003,202001,100,41,2846,R,1.0,1.646151294,69.14982578,0,4,4
 80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4
-80003,202003,100,41,9015,R,1.711844725,1.0,71.90940767,4,,4
-80004,202001,100,70,5820,R,1.0,1.646151294,69.14982578,,4,4
+80003,202003,100,41,9015,R,1.711844725,1.0,71.90940767,4,0,4
+80004,202001,100,70,5820,R,1.0,1.646151294,69.14982578,0,4,4
 80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4
-80004,202003,100,70,8233,R,1.711844725,1.0,71.90940767,4,,4
+80004,202003,100,70,8233,R,1.711844725,1.0,71.90940767,4,0,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index 582b2a8c..95903868 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-90001,202001,100,66,2417,R,1.0,0.294381131,71.77777778,,3,4
+90001,202001,100,66,2417,R,1.0,0.294381131,71.77777778,0,3,4
 90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3
-90001,202003,100,66,7319,R,1.027612406,1.0,169.3831776,3,,3
-90002,202001,100,27,1706,R,1.0,0.294381131,71.77777778,,3,4
+90001,202003,100,66,7319,R,1.027612406,1.0,169.3831776,3,0,3
+90002,202001,100,27,1706,R,1.0,0.294381131,71.77777778,0,3,4
 90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3
-90002,202003,100,27,8390,R,1.027612406,1.0,169.3831776,3,,3
-90003,202001,100,14,1069,R,1.0,0.294381131,71.77777778,,3,4
+90002,202003,100,27,8390,R,1.027612406,1.0,169.3831776,3,0,3
+90003,202001,100,14,1069,R,1.0,0.294381131,71.77777778,0,3,4
 90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3
-90003,202003,100,14,2415,R,1.027612406,1.0,169.3831776,3,,3
-90004,202001,100,73,7728,R,1.0,0.294381131,71.77777778,,3,4
-90004,202003,100,73,12364.971963,C,1.027612406,1.0,169.3831776,3,,3
+90003,202003,100,14,2415,R,1.027612406,1.0,169.3831776,3,0,3
+90004,202001,100,73,7728,R,1.0,0.294381131,71.77777778,0,3,4
+90004,202003,100,73,12364.971963,C,1.027612406,1.0,169.3831776,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index fb51cbfe..44868d0c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-100001,202001,100,26,3074,R,1.0,1.046156805,179.3296703,,3,3
+100001,202001,100,26,3074,R,1.0,1.046156805,179.3296703,0,3,3
 100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3
 100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3
-100001,202004,100,26,3540,R,3.027849407,1.0,119.1751412,3,,4
-100002,202001,100,19,8084,R,1.0,1.046156805,179.3296703,,3,3
+100001,202004,100,26,3540,R,3.027849407,1.0,119.1751412,3,0,4
+100002,202001,100,19,8084,R,1.0,1.046156805,179.3296703,0,3,3
 100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3
 100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3
-100002,202004,100,19,5608,R,3.027849407,1.0,119.1751412,3,,4
-100003,202001,100,46,5161,R,1.0,1.046156805,179.3296703,,3,3
+100002,202004,100,19,5608,R,3.027849407,1.0,119.1751412,3,0,4
+100003,202001,100,46,5161,R,1.0,1.046156805,179.3296703,0,3,3
 100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3
 100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3
-100003,202004,100,46,2594,R,3.027849407,1.0,119.1751412,3,,4
-100004,202001,100,86,15422.351648,C,1.0,1.046156805,179.3296703,,3,3
+100003,202004,100,46,2594,R,3.027849407,1.0,119.1751412,3,0,4
+100004,202001,100,86,15422.351648,C,1.0,1.046156805,179.3296703,0,3,3
 100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3
-100004,202004,100,86,9352,R,3.027849407,1.0,119.1751412,3,,4
+100004,202004,100,86,9352,R,3.027849407,1.0,119.1751412,3,0,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index a0ae4ae4..d3d3775e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-110001,202001,100,89,9244,R,1.0,1.357646062,101.710317,,4,4
+110001,202001,100,89,9244,R,1.0,1.357646062,101.710317,0,4,4
 110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4
-110001,202003,100,89,6194,R,0.780928323,1.0,70.26136364,3,,3
-110002,202001,100,83,4826,R,1.0,1.357646062,101.710317,,4,4
+110001,202003,100,89,6194,R,0.780928323,1.0,70.26136364,3,0,3
+110002,202001,100,83,4826,R,1.0,1.357646062,101.710317,0,4,4
 110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4
-110002,202003,100,83,4743,R,0.780928323,1.0,70.26136364,3,,3
-110003,202001,100,4,7586,R,1.0,1.357646062,101.710317,,4,4
+110002,202003,100,83,4743,R,0.780928323,1.0,70.26136364,3,0,3
+110003,202001,100,4,7586,R,1.0,1.357646062,101.710317,0,4,4
 110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4
-110003,202003,100,4,1429,R,0.780928323,1.0,70.26136364,3,,3
-110004,202001,100,76,3975,R,1.0,1.357646062,101.710317,,4,4
+110003,202003,100,4,1429,R,0.780928323,1.0,70.26136364,3,0,3
+110004,202001,100,76,3975,R,1.0,1.357646062,101.710317,0,4,4
 110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4
-110004,202003,100,76,2377.145816,FIR,0.780928323,1.0,70.26136364,3,,3
-110005,202001,200,27,5217,R,1.0,1.016800862,182.25,,3,3
+110004,202003,100,76,2377.145816,FIR,0.780928323,1.0,70.26136364,3,0,3
+110005,202001,200,27,5217,R,1.0,1.016800862,182.25,0,3,3
 110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4
-110005,202003,200,27,9940,R,1.212689221,1.0,182.2366412,4,,4
-110006,202001,200,42,5325,R,1.0,1.016800862,182.25,,3,3
+110005,202003,200,27,9940,R,1.212689221,1.0,182.2366412,4,0,4
+110006,202001,200,42,5325,R,1.0,1.016800862,182.25,0,3,3
 110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4
-110006,202003,200,42,6685,R,1.212689221,1.0,182.2366412,4,,4
-110007,202001,200,19,5496,R,1.0,1.016800862,182.25,,3,3
+110006,202003,200,42,6685,R,1.212689221,1.0,182.2366412,4,0,4
+110007,202001,200,19,5496,R,1.0,1.016800862,182.25,0,3,3
 110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4
-110007,202003,200,19,1235,R,1.212689221,1.0,182.2366412,4,,4
-110008,202001,200,43,3978.741774,BI,1.0,1.016800862,182.25,,3,3
+110007,202003,200,19,1235,R,1.212689221,1.0,182.2366412,4,0,4
+110008,202001,200,43,3978.741774,BI,1.0,1.016800862,182.25,0,3,3
 110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4
-110008,202003,200,43,6013,R,1.212689221,1.0,182.2366412,4,,4
+110008,202003,200,43,6013,R,1.212689221,1.0,182.2366412,4,0,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 096d10dd..e9b89d82 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-120001,202001,100,50,5240,R,1.0,1.268552019,77.38738739,,3,3
+120001,202001,100,50,5240,R,1.0,1.268552019,77.38738739,0,3,3
 120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3
 120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3
 120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3
-120001,202005,100,50,1316,R,0.53449544,1.0,32.73423423,3,,3
-120002,202001,100,78,7410,R,1.0,1.268552019,77.38738739,,3,3
+120001,202005,100,50,1316,R,0.53449544,1.0,32.73423423,3,0,3
+120002,202001,100,78,7410,R,1.0,1.268552019,77.38738739,0,3,3
 120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3
 120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3
 120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3
-120002,202005,100,78,1535,R,0.53449544,1.0,32.73423423,3,,3
-120003,202001,100,94,4530,R,1.0,1.268552019,77.38738739,,3,3
+120002,202005,100,78,1535,R,0.53449544,1.0,32.73423423,3,0,3
+120003,202001,100,94,4530,R,1.0,1.268552019,77.38738739,0,3,3
 120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3
 120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3
 120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3
-120003,202005,100,94,4416,R,0.53449544,1.0,32.73423423,3,,3
-120004,202001,100,100,7738.738739,C,1.0,1.268552019,77.38738739,,3,3
+120003,202005,100,94,4416,R,0.53449544,1.0,32.73423423,3,0,3
+120004,202001,100,100,7738.738739,C,1.0,1.268552019,77.38738739,0,3,3
 120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3
 120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3
 120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3
-120004,202005,100,100,3273.423424,FIC,0.53449544,1.0,32.73423423,3,,3
+120004,202005,100,100,3273.423424,FIC,0.53449544,1.0,32.73423423,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 96de84f4..fddd0ad6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-130001,202001,100,20,6583,R,1.0,0.6743401,102.7515152,,3,4
+130001,202001,100,20,6583,R,1.0,0.6743401,102.7515152,0,3,4
 130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3
 130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3
 130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3
 130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3
 130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3
-130001,202007,100,20,3282,R,0.798832987,1.0,158.7757576,3,,4
-130002,202001,100,69,687,R,1.0,0.6743401,102.7515152,,3,4
+130001,202007,100,20,3282,R,0.798832987,1.0,158.7757576,3,0,4
+130002,202001,100,69,687,R,1.0,0.6743401,102.7515152,0,3,4
 130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3
 130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3
 130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3
 130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3
 130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3
-130002,202007,100,69,9834,R,0.798832987,1.0,158.7757576,3,,4
-130003,202001,100,39,7113,R,1.0,0.6743401,102.7515152,,3,4
+130002,202007,100,69,9834,R,0.798832987,1.0,158.7757576,3,0,4
+130003,202001,100,39,7113,R,1.0,0.6743401,102.7515152,0,3,4
 130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3
 130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3
 130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3
 130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3
 130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3
-130003,202007,100,39,6461,R,0.798832987,1.0,158.7757576,3,,4
-130004,202001,100,37,2571,R,1.0,0.6743401,102.7515152,,3,4
+130003,202007,100,39,6461,R,0.798832987,1.0,158.7757576,3,0,4
+130004,202001,100,37,2571,R,1.0,0.6743401,102.7515152,0,3,4
 130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3
 130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3
 130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3
 130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3
-130004,202007,100,37,6621,R,0.798832987,1.0,158.7757576,3,,4
+130004,202007,100,37,6621,R,0.798832987,1.0,158.7757576,3,0,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 6cd63fa3..bf47961a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,,3,3
+140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,0,3,3
 140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3
 140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3
 140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3
 140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3
 140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3
-140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,,4
-140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,,3,3
+140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,0,4
+140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,0,3,3
 140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3
 140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3
 140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3
 140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3
 140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3
-140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,,4
-140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,,3,3
+140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,0,4
+140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,0,3,3
 140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3
 140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3
 140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3
 140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3
 140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3
-140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,,4
-140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,,3,3
+140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,0,4
+140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,0,3,3
 140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3
 140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3
 140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3
 140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3
-140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,,4
+140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,0,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 6356faf7..384c5134 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-150001,202001,100,15,5891,R,1.0,0.887085601,181.0909091,,3,3
+150001,202001,100,15,5891,R,1.0,0.887085601,181.0909091,0,3,3
 150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3
 150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4
 150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3
 150001,202005,100,15,2727,R,0.935831358,1.71163273,124.851190,3,3,4
 150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3
-150001,202007,100,15,9549,R,1.423548265,1.0,152.5353535,3,,3
-150002,202001,100,5,8611,R,1.0,0.887085601,181.0909091,,3,3
+150001,202007,100,15,9549,R,1.423548265,1.0,152.5353535,3,0,3
+150002,202001,100,5,8611,R,1.0,0.887085601,181.0909091,0,3,3
 150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3
 150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4
 150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3
 150002,202005,100,5,9967,R,0.935831358,1.71163273,124.851190,3,3,4
 150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3
-150002,202007,100,5,2593,R,1.423548265,1.0,152.5353535,3,,3
-150003,202001,100,79,3426,R,1.0,0.887085601,181.0909091,,3,3
+150002,202007,100,5,2593,R,1.423548265,1.0,152.5353535,3,0,3
+150003,202001,100,79,3426,R,1.0,0.887085601,181.0909091,0,3,3
 150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3
 150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4
 150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3
 150003,202005,100,79,5463,R,0.935831358,1.71163273,124.851190,3,3,4
 150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3
-150003,202007,100,79,2959,R,1.423548265,1.0,152.5353535,3,,3
-150004,202001,100,69,5310.130499,BI,1.0,0.887085601,181.0909091,,3,3
+150003,202007,100,79,2959,R,1.423548265,1.0,152.5353535,3,0,3
+150004,202001,100,69,5310.130499,BI,1.0,0.887085601,181.0909091,0,3,3
 150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3
 150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4
 150004,202005,100,69,2818,R,0.935831358,1.71163273,124.851190,3,3,4
 150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3
-150004,202007,100,69,2343.703144,FIR,1.423548265,1.0,152.5353535,3,,3
+150004,202007,100,69,2343.703144,FIR,1.423548265,1.0,152.5353535,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index ecb3c5b9..f384188c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-160001,202001,100,76,2086,R,1.0,0.285048351,29.78238342,,3,3
+160001,202001,100,76,2086,R,1.0,0.285048351,29.78238342,0,3,3
 160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3
 160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4
 160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3
 160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3
 160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3
-160001,202007,100,76,1666,R,0.819547983,1.0,71.77202073,3,,3
-160002,202001,100,32,430,R,1.0,0.285048351,29.78238342,,3,3
+160001,202007,100,76,1666,R,0.819547983,1.0,71.77202073,3,0,3
+160002,202001,100,32,430,R,1.0,0.285048351,29.78238342,0,3,3
 160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3
 160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4
 160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3
 160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3
 160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3
-160002,202007,100,32,2678,R,0.819547983,1.0,71.77202073,3,,3
-160003,202001,100,85,3232,R,1.0,0.285048351,29.78238342,,3,3
+160002,202007,100,32,2678,R,0.819547983,1.0,71.77202073,3,0,3
+160003,202001,100,85,3232,R,1.0,0.285048351,29.78238342,0,3,3
 160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3
 160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4
 160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3
 160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3
 160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3
-160003,202007,100,85,9508,R,0.819547983,1.0,71.77202073,3,,3
-160004,202001,100,33,1022.611409,BI,1.0,0.285048351,29.78238342,,3,3
+160003,202007,100,85,9508,R,0.819547983,1.0,71.77202073,3,0,3
+160004,202001,100,33,1022.611409,BI,1.0,0.285048351,29.78238342,0,3,3
 160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3
 160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4
 160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3
 160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3
-160004,202007,100,33,2368.476683,FIC,0.819547983,1.0,71.77202073,3,,3
+160004,202007,100,33,2368.476683,FIC,0.819547983,1.0,71.77202073,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 4f799723..ced03986 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-170001,202001,100,69,6480,R,1.0,0.41470355,41.93396226,,3,3
+170001,202001,100,69,6480,R,1.0,0.41470355,41.93396226,0,3,3
 170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4
 170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3
-170001,202004,100,69,7120,R,1.231814548,1.0,109.0330189,3,,3
-170002,202001,100,62,449,R,1.0,0.41470355,41.93396226,,3,3
+170001,202004,100,69,7120,R,1.231814548,1.0,109.0330189,3,0,3
+170002,202001,100,62,449,R,1.0,0.41470355,41.93396226,0,3,3
 170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4
 170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3
-170002,202004,100,62,6745,R,1.231814548,1.0,109.0330189,3,,3
-170003,202001,100,81,1961,R,1.0,0.41470355,41.93396226,,3,3
+170002,202004,100,62,6745,R,1.231814548,1.0,109.0330189,3,0,3
+170003,202001,100,81,1961,R,1.0,0.41470355,41.93396226,0,3,3
 170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4
 170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3
-170003,202004,100,81,9250,R,1.231814548,1.0,109.0330189,3,,3
+170003,202004,100,81,9250,R,1.231814548,1.0,109.0330189,3,0,3
 170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4
 170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index b72a5fe5..01bc94b7 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-180001,202001,100,91,9188,R,1.0,0.743721487,123.4632353,,3,3
+180001,202001,100,91,9188,R,1.0,0.743721487,123.4632353,0,3,3
 180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3
 180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4
-180001,202004,100,91,9291,R,1.709926945,1.0,175.5441176,3,,3
-180002,202001,100,26,3829,R,1.0,0.743721487,123.4632353,,3,3
+180001,202004,100,91,9291,R,1.709926945,1.0,175.5441176,3,0,3
+180002,202001,100,26,3829,R,1.0,0.743721487,123.4632353,0,3,3
 180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3
 180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4
-180002,202004,100,26,8415,R,1.709926945,1.0,175.5441176,3,,3
-180003,202001,100,19,3774,R,1.0,0.743721487,123.4632353,,3,3
+180002,202004,100,26,8415,R,1.709926945,1.0,175.5441176,3,0,3
+180003,202001,100,19,3774,R,1.0,0.743721487,123.4632353,0,3,3
 180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3
 180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4
-180003,202004,100,19,6168,R,1.709926945,1.0,175.5441176,3,,3
+180003,202004,100,19,6168,R,1.709926945,1.0,175.5441176,3,0,3
 180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3
 180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
index cc062246..eea926f1 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-190001,202001,100,95,1.0,0.9214,50.3694,9261,R,,,
-190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,,,
-190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,,,
-190001,202004,100,95,1.113,1.0,110.5473,4350,R,,,
-190002,202001,100,17,1.0,0.9214,50.3694,2433,R,,,
-190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,,,
-190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,,,
-190002,202004,100,17,1.113,1.0,110.5473,700,R,,,
-190003,202001,100,64,1.0,0.9214,50.3694,7888,R,,,
-190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,,,
-190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,,,
-190003,202004,100,64,1.113,1.0,110.5473,4077,R,,,
-190004,202001,100,51,1.0,0.9214,50.3694,2247,R,,,
-190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,,,
-190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,,,
-190004,202004,100,51,1.113,1.0,110.5473,8608,R,,,
-190005,202001,100,34,1.0,0.9214,50.3694,6271.13538,BI,,,
-190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,,,
-190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,,,
-190005,202004,100,34,1.113,1.0,110.5473,5134,R,,,
-190006,202001,100,8,1.0,0.9214,50.3694,402.9552,C,,,
-190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,,,
-190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,,,
-190006,202004,100,8,1.113,1.0,110.5473,370.1196299,FIC,,,
+190001,202001,100,95,1.0,0.9214,50.3694,9261,R,0,0,0
+190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0
+190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0
+190001,202004,100,95,1.113,1.0,110.5473,4350,R,0,0,0
+190002,202001,100,17,1.0,0.9214,50.3694,2433,R,0,0,0
+190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0
+190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0
+190002,202004,100,17,1.113,1.0,110.5473,700,R,0,0,0
+190003,202001,100,64,1.0,0.9214,50.3694,7888,R,0,0,0
+190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0
+190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0
+190003,202004,100,64,1.113,1.0,110.5473,4077,R,0,0,0
+190004,202001,100,51,1.0,0.9214,50.3694,2247,R,0,0,0
+190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0
+190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0
+190004,202004,100,51,1.113,1.0,110.5473,8608,R,0,0,0
+190005,202001,100,34,1.0,0.9214,50.3694,6271.13538,BI,0,0,0
+190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0
+190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0
+190005,202004,100,34,1.113,1.0,110.5473,5134,R,0,0,0
+190006,202001,100,8,1.0,0.9214,50.3694,402.9552,C,0,0,0
+190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0
+190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0
+190006,202004,100,8,1.113,1.0,110.5473,370.1196299,FIC,0,0,0
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index 56259d92..f72be22a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-200001,202001,100,56,7788,R,1.0,0.642092794,71.63436123,,4,4
+200001,202001,100,56,7788,R,1.0,0.642092794,71.63436123,0,4,4
 200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4
 200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4
-200001,202004,100,56,1577,R,0.261802864,1.0,42.68681319,4,,4
-200002,202001,100,75,6533,R,1.0,0.642092794,71.63436123,,4,4
+200001,202004,100,56,1577,R,0.261802864,1.0,42.68681319,4,0,4
+200002,202001,100,75,6533,R,1.0,0.642092794,71.63436123,0,4,4
 200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4
 200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4
-200002,202004,100,75,2575,R,0.261802864,1.0,42.68681319,4,,4
-200003,202001,100,10,56,R,1.0,0.642092794,71.63436123,,4,4
+200002,202004,100,75,2575,R,0.261802864,1.0,42.68681319,4,0,4
+200003,202001,100,10,56,R,1.0,0.642092794,71.63436123,0,4,4
 200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4
 200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4
-200003,202004,100,10,906,R,0.261802864,1.0,42.68681319,4,,4
-200004,202001,100,86,1884,R,1.0,0.642092794,71.63436123,,4,4
+200003,202004,100,10,906,R,0.261802864,1.0,42.68681319,4,0,4
+200004,202001,100,86,1884,R,1.0,0.642092794,71.63436123,0,4,4
 200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4
 200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4
-200004,202004,100,86,1717.936456,FIR,0.261802864,1.0,42.68681319,4,,4
-200005,202001,100,6,429.8061674,C,1.0,0.642092794,71.63436123,,4,4
+200004,202004,100,86,1717.936456,FIR,0.261802864,1.0,42.68681319,4,0,4
+200005,202001,100,6,429.8061674,C,1.0,0.642092794,71.63436123,0,4,4
 200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4
 200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4
-200005,202004,100,6,189.2934824,FIC,0.261802864,1.0,42.68681319,4,,4
-200006,202001,100,41,5279.856813,BI,1.0,0.642092794,71.63436123,,4,4
+200005,202004,100,6,189.2934824,FIC,0.261802864,1.0,42.68681319,4,0,4
+200006,202001,100,41,5279.856813,BI,1.0,0.642092794,71.63436123,0,4,4
 200006,202002,100,41,8222.887510,BI,1.557407294,0.925792334,111.5638767,4,3,4
 200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4
-200006,202004,100,41,2711,R,0.261802864,1.0,42.68681319,4,,4
-200007,202001,200,4,2439,R,1.0,0.741183163,132.3214286,,3,4
+200006,202004,100,41,2711,R,0.261802864,1.0,42.68681319,4,0,4
+200007,202001,200,4,2439,R,1.0,0.741183163,132.3214286,0,3,4
 200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5
 200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4
-200007,202004,200,4,595,R,0.208066683,1.0,99.37735849,3,,3
-200008,202001,200,4,1849,R,1.0,0.741183163,132.3214286,,3,4
+200007,202004,200,4,595,R,0.208066683,1.0,99.37735849,3,0,3
+200008,202001,200,4,1849,R,1.0,0.741183163,132.3214286,0,3,4
 200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5
 200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4
-200008,202004,200,4,2727,R,0.208066683,1.0,99.37735849,3,,3
-200009,202001,200,45,8742,R,1.0,0.741183163,132.3214286,,3,4
+200008,202004,200,4,2727,R,0.208066683,1.0,99.37735849,3,0,3
+200009,202001,200,45,8742,R,1.0,0.741183163,132.3214286,0,3,4
 200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5
 200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4
-200009,202004,200,45,1945,R,0.208066683,1.0,99.37735849,3,,3
-200010,202001,200,85,4809.537543,BI,1.0,0.741183163,132.3214286,,3,4
+200009,202004,200,45,1945,R,0.208066683,1.0,99.37735849,3,0,3
+200010,202001,200,85,4809.537543,BI,1.0,0.741183163,132.3214286,0,3,4
 200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5
 200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4
-200010,202004,200,85,373.6877618,FIR,0.208066683,1.0,99.37735849,3,,3
-200011,202001,200,79,1427.518771,BI,1.0,0.741183163,132.3214286,,3,4
+200010,202004,200,85,373.6877618,FIR,0.208066683,1.0,99.37735849,3,0,3
+200011,202001,200,79,1427.518771,BI,1.0,0.741183163,132.3214286,0,3,4
 200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5
-200011,202004,200,79,7850.811321,C,0.208066683,1.0,99.37735849,3,,3
-200012,202001,200,87,5495,R,1.0,0.741183163,132.3214286,,3,4
+200011,202004,200,79,7850.811321,C,0.208066683,1.0,99.37735849,3,0,3
+200012,202001,200,87,5495,R,1.0,0.741183163,132.3214286,0,3,4
 200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5
 200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4
-200012,202004,200,87,1737.465401,FIR,0.208066683,1.0,99.37735849,3,,3
+200012,202004,200,87,1737.465401,FIR,0.208066683,1.0,99.37735849,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index da6d84f6..bacb33eb 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,1.0,0.992513369,13.17948717,547,R,,2,3
+10001,202001,1,10,1.0,0.992513369,13.17948717,547,R,0,2,3
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,,2
-10002,202001,1,50,1.0,0.992513369,13.17948717,381,R,,2,3
+10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2
+10002,202001,1,50,1.0,0.992513369,13.17948717,381,R,0,2,3
 10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,,2
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,,2,2
+10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2
+10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2
 10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2
-10003,202003,2,12,1.173184358,1.0,50,314,R,2,,2
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,,2,2
+10003,202003,2,12,1.173184358,1.0,50,314,R,2,0,2
+10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2
-10004,202003,2,9,1.173184358,1.0,50,736,R,2,,2
-10005,202001,1,18,1.0,0.992513369,13.17948717,100,R,,2,3
+10004,202003,2,9,1.173184358,1.0,50,736,R,2,0,2
+10005,202001,1,18,1.0,0.992513369,13.17948717,100,R,0,2,3
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2
-10005,202003,2,18,1.173184358,1.0,50,900.0000004,FIC,2,,2
+10005,202003,2,18,1.173184358,1.0,50,900.0000004,FIC,2,0,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index a5e7e90b..f32b743c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,1.0,0.992513369,15.46666667,547,R,,2,2
+10001,202001,1,10,1.0,0.992513369,15.46666667,547,R,0,2,2
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,,2
-10002,202001,1,50,1.0,0.992513369,15.46666667,381,R,,2,2
+10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2
+10002,202001,1,50,1.0,0.992513369,15.46666667,381,R,0,2,2
 10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,,2
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,,2,2
+10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2
+10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2
 10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2
-10003,202003,2,12,1.173184358,1.0,29.48717949,314,R,2,,3
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,,2,2
+10003,202003,2,12,1.173184358,1.0,29.48717949,314,R,2,0,3
+10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2
-10004,202003,2,9,1.173184358,1.0,29.48717949,736,R,2,,3
-10005,202001,1,18,1.0,0.992513369,15.46666667,278.4000001,C,,2,2
+10004,202003,2,9,1.173184358,1.0,29.48717949,736,R,2,0,3
+10005,202001,1,18,1.0,0.992513369,15.46666667,278.4000001,C,0,2,2
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2
-10005,202003,2,18,1.173184358,1.0,29.48717949,100,R,2,,3
+10005,202003,2,18,1.173184358,1.0,29.48717949,100,R,2,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 5518f6a3..d220c7ec 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,1.0,0.992513369,15.46666667,547,R,,2,2
+10001,202001,1,10,1.0,0.992513369,15.46666667,547,R,0,2,2
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,,2
-10002,202001,1,50,1.0,0.992513369,15.46666667,381,R,,2,2
+10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2
+10002,202001,1,50,1.0,0.992513369,15.46666667,381,R,0,2,2
 10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,,2
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,,2,2
+10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2
+10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2
 10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2
-10003,202003,2,12,1.173184358,1.0,50,314,R,2,,2
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,,2,2
+10003,202003,2,12,1.173184358,1.0,50,314,R,2,0,2
+10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2
-10004,202003,2,9,1.173184358,1.0,50,736,R,2,,2
-10005,202001,1,18,1.0,0.992513369,15.46666667,278.4000001,C,,2,2
+10004,202003,2,9,1.173184358,1.0,50,736,R,2,0,2
+10005,202001,1,18,1.0,0.992513369,15.46666667,278.4000001,C,0,2,2
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2
-10005,202003,2,18,1.173184358,1.0,50,900.00000,FIC,2,,2
+10005,202003,2,18,1.173184358,1.0,50,900.00000,FIC,2,0,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 24c1e16f..507ccced 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,1.0,0.992513369,13.17948718,547,R,,2,3
+10001,202001,1,10,1.0,0.992513369,13.17948718,547,R,0,2,3
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,,2
-10002,202001,1,50,1.0,0.992513369,13.17948718,381,R,,2,3
+10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2
+10002,202001,1,50,1.0,0.992513369,13.17948718,381,R,0,2,3
 10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,,2
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,,2,2
+10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2
+10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2
 10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2
-10003,202003,2,12,1.173184358,1.0,30.76923077,314,R,2,,3
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,,2,2
+10003,202003,2,12,1.173184358,1.0,30.76923077,314,R,2,0,3
+10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2
-10004,202003,2,9,1.173184358,1.0,30.76923077,736,R,2,,3
-10005,202001,1,18,1.0,0.992513369,13.17948718,100,R,,2,3
+10004,202003,2,9,1.173184358,1.0,30.76923077,736,R,2,0,3
+10005,202001,1,18,1.0,0.992513369,13.17948718,100,R,0,2,3
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2
-10005,202003,2,18,1.173184358,1.0,30.76923077,150,R,2,,3
+10005,202003,2,18,1.173184358,1.0,30.76923077,150,R,2,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index f858087f..737b9858 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,1.0,0.992513369,13.17948718,547,R,,2,3
+10001,202001,1,10,1.0,0.992513369,13.17948718,547,R,0,2,3
 10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,,2
-10002,202001,1,50,1.0,0.992513369,13.17948718,381,R,,2,3
+10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2
+10002,202001,1,50,1.0,0.992513369,13.17948718,381,R,0,2,3
 10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,,2
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,,2,2
+10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2
+10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2
 10003,202002,2,12,0.590369393,0.9341085271317829,30.8974359,267,R,2,3,3
-10003,202003,2,12,1.070539419,1.0,33.07692308,314,R,3,,3
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,,2,2
+10003,202003,2,12,1.070539419,1.0,33.07692308,314,R,3,0,3
+10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2
 10004,202002,2,9,0.590369393,0.9341085271317829,30.8974359,628,R,2,3,3
-10004,202003,2,9,1.070539419,1.0,33.07692308,736,R,3,,3
-10005,202001,1,18,1.0,0.992513369,13.17948718,100,R,,2,3
+10004,202003,2,9,1.070539419,1.0,33.07692308,736,R,3,0,3
+10005,202001,1,18,1.0,0.992513369,13.17948718,100,R,0,2,3
 10005,202002,2,18,0.590369393,0.9341085271317829,30.8974359,310,R,2,3,3
-10005,202003,2,18,1.070539419,1.0,33.07692308,240,R,3,,3
-10006,202001,1,22,1.0,0.992513369,13.17948718,289.948718,C,,2,3
+10005,202003,2,18,1.070539419,1.0,33.07692308,240,R,3,0,3
+10006,202001,1,22,1.0,0.992513369,13.17948718,289.948718,C,0,2,3
 10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2
-10006,202003,1,22,1.186096257,1.0,18.48333333,346.5012157,FIC,2,,2
-10007,202001,2,52,1.0,1.693854749,72.19047619,3753.904762,C,,2,2
+10006,202003,1,22,1.186096257,1.0,18.48333333,346.5012157,FIC,2,0,2
+10007,202001,2,52,1.0,1.693854749,72.19047619,3753.904762,C,0,2,2
 10007,202002,2,52,0.590369393,0.9341085271317829,30.8974359,2216.190476,FIC,2,3,3
-10007,202003,2,52,1.070539419,1.0,33.07692308,2372.519265,FIC,3,,3
+10007,202003,2,52,1.070539419,1.0,33.07692308,2372.519265,FIC,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 726ac432..4365a1cd 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,,3,3
+140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,0,3,3
 140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3
 140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3
 140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3
 140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3
 140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3
-140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,,4
-140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,,3,3
+140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,0,4
+140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,0,3,3
 140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3
 140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3
 140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3
 140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3
 140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3
-140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,,4
-140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,,3,3
+140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,0,4
+140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,0,3,3
 140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3
 140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3
 140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3
 140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3
 140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3
-140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,,4
-140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,,3,3
+140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,0,4
+140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,0,3,3
 140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3
 140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3
 140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3
 140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3
-140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,,4
-140005,202001,100,85,150000,R,1.0,0.483330757,47.13567839,,3,3
+140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,0,4
+140005,202001,100,85,150000,R,1.0,0.483330757,47.13567839,0,3,3
 140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3
 140005,202003,100,85,120000,R,0.642345545,0.658705416,62.64321608,3,3,3
 140005,202004,100,85,115000,R,1.518129312,1.494511569,95.10050251,3,3,3
 140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3
 140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3
-140005,202007,100,85,160000,R,0.536140767,1.0,91.63876651982379,3,,4
-140006,202001,100,71,3346.6331658291456,C,1.0,0.483330757,47.13567839,,3,3
+140005,202007,100,85,160000,R,0.536140767,1.0,91.63876651982379,3,0,4
+140006,202001,100,71,3346.6331658291456,C,1.0,0.483330757,47.13567839,0,3,3
 140006,202002,100,71,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3
 140006,202003,100,71,4447.668341708542,FIC,0.642345545,0.658705416,62.64321608,3,3,3
 140006,202004,100,71,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3
 140006,202005,100,71,4517.954773869346,FIC,0.669114927,0.500711744,63.63316583,3,3,3
 140006,202006,100,71,9023.065326633165,FIC,1.997157072,1.865181798,127.0854271,3,3,3
-140006,202007,100,71,4837.633165829145,FIC,0.536140767,1.0,91.63876651982379,3,,4
\ No newline at end of file
+140006,202007,100,71,4837.633165829145,FIC,0.536140767,1.0,91.63876651982379,3,0,4
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index 5e961998..a1838515 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-150001,202001,100,15,5891,R,1.0,0.887085601,181.0909091,,3,3
+150001,202001,100,15,5891,R,1.0,0.887085601,181.0909091,0,3,3
 150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3
 150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4
 150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3
 150001,202005,100,15,2727,R,0.935831358,1.71163273,124.851190,3,3,4
 150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3
-150001,202007,100,15,9549,R,1.423548265,1.0,152.5353535,3,,3
-150002,202001,100,5,8611,R,1.0,0.887085601,181.0909091,,3,3
+150001,202007,100,15,9549,R,1.423548265,1.0,152.5353535,3,0,3
+150002,202001,100,5,8611,R,1.0,0.887085601,181.0909091,0,3,3
 150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3
 150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4
 150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3
 150002,202005,100,5,9967,R,0.935831358,1.71163273,124.851190,3,3,4
 150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3
-150002,202007,100,5,2593,R,1.423548265,1.0,152.5353535,3,,3
-150003,202001,100,79,3426,R,1.0,0.887085601,181.0909091,,3,3
+150002,202007,100,5,2593,R,1.423548265,1.0,152.5353535,3,0,3
+150003,202001,100,79,3426,R,1.0,0.887085601,181.0909091,0,3,3
 150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3
 150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4
 150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3
 150003,202005,100,79,5463,R,0.935831358,1.71163273,124.851190,3,3,4
 150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3
-150003,202007,100,79,2959,R,1.423548265,1.0,152.5353535,3,,3
-150004,202001,100,69,5310.130499,BI,1.0,0.887085601,181.0909091,,3,3
+150003,202007,100,79,2959,R,1.423548265,1.0,152.5353535,3,0,3
+150004,202001,100,69,5310.130499,BI,1.0,0.887085601,181.0909091,0,3,3
 150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3
 150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4
 150004,202005,100,69,2818,R,0.935831358,1.71163273,124.851190,3,3,4
 150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3
-150004,202007,100,69,2343.703144,FIR,1.423548265,1.0,152.5353535,3,,3
-150005,202001,100,85,150000,R,1.0,0.887085601,181.0909091,,3,3
+150004,202007,100,69,2343.703144,FIR,1.423548265,1.0,152.5353535,3,0,3
+150005,202001,100,85,150000,R,1.0,0.887085601,181.0909091,0,3,3
 150005,202002,100,85,180000,R,1.127286925,1.422538185,204.1414141,3,3,3
 150005,202003,100,85,120000,R,0.702968827,0.732244099,109.6130952,3,3,4
 150005,202004,100,85,110000,R,1.365664813,1.068568596,195.979798,3,3,3
 150006,202005,100,85,105000,R,0.935831358,1.71163273,124.851190,3,3,4
 150006,202006,100,85,160000,R,0.584237484,0.702470035,107.1515152,3,3,3
-150006,202007,100,85,125000,R,1.423548265,1.0,152.5353535,3,,3
-150007,202001,100,71,12857.454545454546,C,1.0,0.887085601,181.0909091,,3,3
+150006,202007,100,85,125000,R,1.423548265,1.0,152.5353535,3,0,3
+150007,202001,100,71,12857.454545454546,C,1.0,0.887085601,181.0909091,0,3,3
 150007,202002,100,71,14494.040404040406,FIC,1.127286925,1.422538185,204.1414141,3,3,3
 150007,202003,100,71,10188.858585858588,FIC,0.702968827,0.732244099,109.6130952,3,3,4
 150007,202004,100,71,13914.56565656566,FIC,1.365664813,1.068568596,195.979798,3,3,3
 150007,202005,100,71,13021.686868686873,FIC,0.935831358,1.71163273,124.851190,3,3,4
 150007,202006,100,71,7607.757575757578,FIC,0.584237484,0.702470035,107.1515152,3,3,3
-150007,202007,100,71,10830.010101010104,FIC,1.423548265,1.0,152.5353535,3,,3
\ No newline at end of file
+150007,202007,100,71,10830.010101010104,FIC,1.423548265,1.0,152.5353535,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
index 251636a3..55872d08 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-190001,202001,100,95,1.0,0.9214,50.3694,9261,R,,,
-190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,,,
-190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,,,
-190001,202004,100,95,1.113,1.0,110.5473,4350,R,,,
-190002,202001,100,17,1.0,0.9214,50.3694,2433,R,,,
-190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,,,
-190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,,,
-190002,202004,100,17,1.113,1.0,110.5473,700,R,,,
-190003,202001,100,64,1.0,0.9214,50.3694,7888,R,,,
-190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,,,
-190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,,,
-190003,202004,100,64,1.113,1.0,110.5473,4077,R,,,
-190004,202001,100,51,1.0,0.9214,50.3694,2247,R,,,
-190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,,,
-190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,,,
-190004,202004,100,51,1.113,1.0,110.5473,8608,R,,,
-190005,202001,100,34,1.0,0.9214,50.3694,6271.13538,BI,,,
-190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,,,
-190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,,,
-190005,202004,100,34,1.113,1.0,110.5473,5134,R,,,
-190006,202001,100,8,1.0,0.9214,50.3694,402.9552,C,,,
-190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,,,
-190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,,,
-190006,202004,100,8,1.113,1.0,110.5473,370.1196299,FIC,,,
-190007,202001,100,85,1.0,0.9214,50.3694,150000,R,,,
-190007,202002,100,85,0.8521,1.5274,121.4187,120000,R,,,
-190007,202003,100,85,0.9685,1.8795,89.3761,110000,R,,,
-190007,202004,100,85,1.113,1.0,110.5473,180000,R,,,
-190008,202001,100,71,1.0,0.9214,50.3694,3576.2273999999998,C,,,
-190008,202002,100,71,0.8521,1.5274,121.4187,3047.3033675399997,FIC,,,
-190008,202003,100,71,0.9685,1.8795,89.3761,2951.313312,FIC,,,
-190008,202004,100,71,1.113,1.0,110.5473,3284.811715657751,FIC,,,
\ No newline at end of file
+190001,202001,100,95,1.0,0.9214,50.3694,9261,R,0,0,0
+190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0
+190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0
+190001,202004,100,95,1.113,1.0,110.5473,4350,R,0,0,0
+190002,202001,100,17,1.0,0.9214,50.3694,2433,R,0,0,0
+190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0
+190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0
+190002,202004,100,17,1.113,1.0,110.5473,700,R,0,0,0
+190003,202001,100,64,1.0,0.9214,50.3694,7888,R,0,0,0
+190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0
+190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0
+190003,202004,100,64,1.113,1.0,110.5473,4077,R,0,0,0
+190004,202001,100,51,1.0,0.9214,50.3694,2247,R,0,0,0
+190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0
+190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0
+190004,202004,100,51,1.113,1.0,110.5473,8608,R,0,0,0
+190005,202001,100,34,1.0,0.9214,50.3694,6271.13538,BI,0,0,0
+190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0
+190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0
+190005,202004,100,34,1.113,1.0,110.5473,5134,R,0,0,0
+190006,202001,100,8,1.0,0.9214,50.3694,402.9552,C,0,0,0
+190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0
+190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0
+190006,202004,100,8,1.113,1.0,110.5473,370.1196299,FIC,0,0,0
+190007,202001,100,85,1.0,0.9214,50.3694,150000,R,0,0,0
+190007,202002,100,85,0.8521,1.5274,121.4187,120000,R,0,0,0
+190007,202003,100,85,0.9685,1.8795,89.3761,110000,R,0,0,0
+190007,202004,100,85,1.113,1.0,110.5473,180000,R,0,0,0
+190008,202001,100,71,1.0,0.9214,50.3694,3576.2273999999998,C,0,0,0
+190008,202002,100,71,0.8521,1.5274,121.4187,3047.3033675399997,FIC,0,0,0
+190008,202003,100,71,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0
+190008,202004,100,71,1.113,1.0,110.5473,3284.811715657751,FIC,0,0,0
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
index f12b3a4d..c1a358f7 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,64 +1,64 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-200001,202001,100,56,7788,R,1.0,0.642092794,71.63436123,,4,4
+200001,202001,100,56,7788,R,1.0,0.642092794,71.63436123,0,4,4
 200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4
 200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4
-200001,202004,100,56,1577,R,0.261802864,1.0,42.68681319,4,,4
-200002,202001,100,75,6533,R,1.0,0.642092794,71.63436123,,4,4
+200001,202004,100,56,1577,R,0.261802864,1.0,42.68681319,4,0,4
+200002,202001,100,75,6533,R,1.0,0.642092794,71.63436123,0,4,4
 200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4
 200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4
-200002,202004,100,75,2575,R,0.261802864,1.0,42.68681319,4,,4
-200003,202001,100,10,56,R,1.0,0.642092794,71.63436123,,4,4
+200002,202004,100,75,2575,R,0.261802864,1.0,42.68681319,4,0,4
+200003,202001,100,10,56,R,1.0,0.642092794,71.63436123,0,4,4
 200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4
 200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4
-200003,202004,100,10,906,R,0.261802864,1.0,42.68681319,4,,4
-200004,202001,100,86,1884,R,1.0,0.642092794,71.63436123,,4,4
+200003,202004,100,10,906,R,0.261802864,1.0,42.68681319,4,0,4
+200004,202001,100,86,1884,R,1.0,0.642092794,71.63436123,0,4,4
 200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4
 200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4
-200004,202004,100,86,1717.936456,FIR,0.261802864,1.0,42.68681319,4,,4
-200005,202001,100,6,429.8061674,C,1.0,0.642092794,71.63436123,,4,4
+200004,202004,100,86,1717.936456,FIR,0.261802864,1.0,42.68681319,4,0,4
+200005,202001,100,6,429.8061674,C,1.0,0.642092794,71.63436123,0,4,4
 200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4
 200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4
-200005,202004,100,6,189.2934824,FIC,0.261802864,1.0,42.68681319,4,,4
-200006,202001,100,41,5279.856813,BI,1.0,0.642092794,71.63436123,,4,4
+200005,202004,100,6,189.2934824,FIC,0.261802864,1.0,42.68681319,4,0,4
+200006,202001,100,41,5279.856813,BI,1.0,0.642092794,71.63436123,0,4,4
 200006,202002,100,41,8222.887510,BI,1.557407294,0.925792334,111.5638767,4,3,4
 200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4
-200006,202004,100,41,2711,R,0.261802864,1.0,42.68681319,4,,4
-200007,202001,200,4,2439,R,1.0,0.741183163,132.3214286,,3,4
+200006,202004,100,41,2711,R,0.261802864,1.0,42.68681319,4,0,4
+200007,202001,200,4,2439,R,1.0,0.741183163,132.3214286,0,3,4
 200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5
 200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4
-200007,202004,200,4,595,R,0.208066683,1.0,99.37735849,3,,3
-200008,202001,200,4,1849,R,1.0,0.741183163,132.3214286,,3,4
+200007,202004,200,4,595,R,0.208066683,1.0,99.37735849,3,0,3
+200008,202001,200,4,1849,R,1.0,0.741183163,132.3214286,0,3,4
 200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5
 200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4
-200008,202004,200,4,2727,R,0.208066683,1.0,99.37735849,3,,3
-200009,202001,200,45,8742,R,1.0,0.741183163,132.3214286,,3,4
+200008,202004,200,4,2727,R,0.208066683,1.0,99.37735849,3,0,3
+200009,202001,200,45,8742,R,1.0,0.741183163,132.3214286,0,3,4
 200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5
 200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4
-200009,202004,200,45,1945,R,0.208066683,1.0,99.37735849,3,,3
-200010,202001,200,85,4809.537543,BI,1.0,0.741183163,132.3214286,,3,4
+200009,202004,200,45,1945,R,0.208066683,1.0,99.37735849,3,0,3
+200010,202001,200,85,4809.537543,BI,1.0,0.741183163,132.3214286,0,3,4
 200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5
 200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4
-200010,202004,200,85,373.6877618,FIR,0.208066683,1.0,99.37735849,3,,3
-200011,202001,200,79,1427.518771,BI,1.0,0.741183163,132.3214286,,3,4
+200010,202004,200,85,373.6877618,FIR,0.208066683,1.0,99.37735849,3,0,3
+200011,202001,200,79,1427.518771,BI,1.0,0.741183163,132.3214286,0,3,4
 200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5
-200011,202004,200,79,7850.811321,C,0.208066683,1.0,99.37735849,3,,3
-200012,202001,200,87,5495,R,1.0,0.741183163,132.3214286,,3,4
+200011,202004,200,79,7850.811321,C,0.208066683,1.0,99.37735849,3,0,3
+200012,202001,200,87,5495,R,1.0,0.741183163,132.3214286,0,3,4
 200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5
 200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4
-200012,202004,200,87,1737.465401,FIR,0.208066683,1.0,99.37735849,3,,3
-200013,202001,100,85,150000,R,1.0,0.642092794,71.63436123,,4,4
+200012,202004,200,87,1737.465401,FIR,0.208066683,1.0,99.37735849,3,0,3
+200013,202001,100,85,150000,R,1.0,0.642092794,71.63436123,0,4,4
 200013,202002,100,85,180000,R,1.557407294,0.925792334,111.5638767,4,3,4
 200013,202003,100,85,120000,R,1.080155844,3.819667911,163.0494505,3,4,4
-200013,202004,100,85,105000,R,0.261802864,1.0,42.68681319,4,,4
-200014,202001,200,85,150000,R,1.0,0.741183163,132.3214286,,3,4
+200013,202004,100,85,105000,R,0.261802864,1.0,42.68681319,4,0,4
+200014,202001,200,85,150000,R,1.0,0.741183163,132.3214286,0,3,4
 200014,202002,200,85,180000,R,1.349194167,0.88782737,119.7926267,3,4,5
 200014,202003,200,85,120000,R,1.126345091,4.806151509,196.4492754,4,3,4
-200014,202004,200,85,105000,R,0.208066683,1.0,99.37735849,3,,3
-200015,202001,100,71,5086.039647577092,C,1.0,0.642092794,71.63436123,,4,4
+200014,202004,200,85,105000,R,0.208066683,1.0,99.37735849,3,0,3
+200015,202001,100,71,5086.039647577092,C,1.0,0.642092794,71.63436123,0,4,4
 200015,202002,100,71,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4
 200015,202003,100,71,8555.952508724755,FIC,1.080155844,3.819667911,163.0494505,3,4,4
-200015,202004,100,71,2239.9728741460026,FIC,0.261802864,1.0,42.68681319,4,,4
-200016,202001,200,71,9394.82142857143,C,1.0,0.741183163,132.3214286,,3,4
+200015,202004,100,71,2239.9728741460026,FIC,0.261802864,1.0,42.68681319,4,0,4
+200016,202001,200,71,9394.82142857143,C,1.0,0.741183163,132.3214286,0,3,4
 200016,202002,200,71,12675.438275,FIC,1.349194167,0.88782737,119.7926267,3,4,5
 200016,202003,200,71,14276.917680,FIC,1.126345091,4.806151509,196.4492754,4,3,4
-200016,202004,200,71,2970.550898,FIC,0.208066683,1.0,99.37735849,3,,3
\ No newline at end of file
+200016,202004,200,71,2970.550898,FIC,0.208066683,1.0,99.37735849,3,0,3
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 87db6ec2..c000264e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,547,1,0.992513369,15.46666667,R,,2,2
+10001,202001,1,10,547,1,0.992513369,15.46666667,R,0,2,2
 10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,R,2,2,2
-10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,,2
-10002,202001,1,50,381,1,0.992513369,15.46666667,R,,2,2
+10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,0,2
+10002,202001,1,50,381,1,0.992513369,15.46666667,R,0,2,2
 10002,202002,1,50,573,1.007543103,0.843101893,15.58333333,R,2,2,2
-10002,202003,1,50,214,1.186096257,1,18.48333333,R,2,,2
-10003,202001,2,12,961,1,1.693854749,72.19047619,R,,2,2
+10002,202003,1,50,214,1.186096257,1,18.48333333,R,2,0,2
+10003,202001,2,12,961,1,1.693854749,72.19047619,R,0,2,2
 10003,202002,2,12,267,0.590369393,0.852380952,42.61904762,R,2,2,2
-10003,202003,2,12,314,1.173184358,1,50,R,2,,2
-10004,202001,2,9,555,1,1.693854749,72.19047619,R,,2,2
+10003,202003,2,12,314,1.173184358,1,50,R,2,0,2
+10004,202001,2,9,555,1,1.693854749,72.19047619,R,0,2,2
 10004,202002,2,9,628,0.590369393,0.852380952,42.61904762,R,2,2,2
-10004,202003,2,9,736,1.173184358,1,50,R,2,,2
-10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,,2,2
+10004,202003,2,9,736,1.173184358,1,50,R,2,0,2
+10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,0,2,2
 10005,202002,2,18,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2
-10005,202003,2,18,900.000,1.173184358,1,50,FIC,2,,2
-10006,202001,1,85,150000,1,0.992513369,15.46666667,R,,2,2
+10005,202003,2,18,900.000,1.173184358,1,50,FIC,2,0,2
+10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2
 10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2
-10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,,2
-10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,,2,2
+10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2
+10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,0,2,2
 10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2
-10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,,2
-10008,202001,2,85,150000,1,1.693854749,72.19047619,R,,2,2
+10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2
+10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2
 10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2
-10008,202003,2,85,120000,1.173184358,1,50,R,2,,2
-10009,202001,2,71,5125.523810,1,1.693854749,72.19047619,C,,2,2
+10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2
+10009,202001,2,71,5125.523810,1,1.693854749,72.19047619,C,0,2,2
 10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2
-10009,202003,2,71,3550.000000,1.173184358,1,50,FIC,2,,2
+10009,202003,2,71,3550.000000,1.173184358,1,50,FIC,2,0,2

From d9f0d7ec6787eec452b6d762429796eeaed2293e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 15:29:49 +0100
Subject: [PATCH 238/531] Set counts to 0 if links are passed in

---
 statistical_methods_library/imputation/engine.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index cdfcdd06..375347ea 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -241,8 +241,8 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         if "forward" in df.columns:
             df = (
                 df.fillna(1.0, ["forward", "backward"])
-                .withColumn("count_forward", lit(None).cast("long"))
-                .withColumn("count_backward", lit(None).cast("long"))
+                .withColumn("count_forward", lit(0))
+                .withColumn("count_backward", lit(0))
             )
 
         else:
@@ -250,7 +250,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
 
         if "construction" in df.columns:
             df = df.fillna(1.0, ["construction"]).withColumn(
-                "count_construction", lit(None).cast("long")
+                "count_construction", lit(0)
             )
 
         else:

From 0ac32ff589b4810a298a8e58f5356faf98b9cbda Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 2 May 2023 15:42:27 +0100
Subject: [PATCH 239/531] Changed test to cover year span

---
 .../05_R_R_FI_FI_FI_input.csv                 | 40 +++++++--------
 .../05_R_R_FI_FI_FI_output.csv                | 40 +++++++--------
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  6 +--
 .../32_C_FI_FI_no_response_output.csv         |  6 +--
 .../33_partial_link_columns_output.csv        | 48 ++++++++---------
 .../dev_scenarios/cal_year_span_input.csv     | 51 -------------------
 .../dev_scenarios/cal_year_span_output.csv    | 51 -------------------
 .../05_R_R_FI_FI_FI_input.csv                 | 40 +++++++--------
 .../05_R_R_FI_FI_FI_output.csv                | 40 +++++++--------
 9 files changed, 110 insertions(+), 212 deletions(-)
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
index 8220bd06..93f0cfcc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
@@ -1,21 +1,21 @@
 identifier,date,group,question,other
-50001,202001,100,6362,59
-50001,202002,100,8542,59
-50001,202003,100,5623,59
-50001,202004,100,7769,59
-50001,202005,100,4687,59
-50002,202001,100,4851,36
-50002,202002,100,8894,36
-50002,202003,100,3372,36
-50002,202004,100,3522,36
-50002,202005,100,2327,36
-50003,202001,100,2238,76
-50003,202002,100,769,76
-50003,202003,100,7722,76
-50003,202004,100,6445,76
-50003,202005,100,1521,76
-50004,202001,100,688,30
-50004,202002,100,3245,30
-50004,202003,100,,30
-50004,202004,100,,30
-50004,202005,100,,30
+50001,202010,100,6362,59
+50001,202011,100,8542,59
+50001,202012,100,5623,59
+50001,202101,100,7769,59
+50001,202102,100,4687,59
+50002,202010,100,4851,36
+50002,202011,100,8894,36
+50002,202012,100,3372,36
+50002,202101,100,3522,36
+50002,202102,100,2327,36
+50003,202010,100,2238,76
+50003,202011,100,769,76
+50003,202012,100,7722,76
+50003,202101,100,6445,76
+50003,202102,100,1521,76
+50004,202010,100,688,30
+50004,202011,100,3245,30
+50004,202012,100,,30
+50004,202101,100,,30
+50004,202102,100,,30
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
index 77df9932..3d935ec6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-50001,202001,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
-50001,202002,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
-50001,202003,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
-50001,202004,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
-50001,202005,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
-50002,202001,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
-50002,202002,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
-50002,202003,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
-50002,202004,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
-50002,202005,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
-50003,202001,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
-50003,202002,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
-50003,202003,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
-50003,202004,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
-50003,202005,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
-50004,202001,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
-50004,202002,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
-50004,202003,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,,
-50004,202004,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,,
-50004,202005,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,,
+50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
+50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
+50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
+50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
+50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
+50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
+50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
+50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
+50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
+50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
+50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
+50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
+50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
+50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
+50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
+50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
+50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
+50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,,
+50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,,
+50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index 370346db..0a81cfaf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -12,11 +12,11 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
 110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3
 110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1
-110005,202002,200,27,,,1,1,1,9940,BI,,,
+110005,202002,200,27,,,1,1,1,9940,BI,0,0,0
 110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1
 110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1
-110006,202002,200,42,,,1,1,1,5325,FIR,,,
+110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0
 110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1
 110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1
-110007,202002,200,19,,,1,1,1,2408.928571,FIC,,,
+110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0
 110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index 733d8276..1617bb5a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -11,6 +11,6 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4
 110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
 110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3
-110005,202001,200,27,,,1,1,1,27,C,,,
-110005,202002,200,27,,,1,1,1,27,FIC,,,
-110005,202003,200,27,,,1,1,1,27,FIC,,,
+110005,202001,200,27,,,1,1,1,27,C,0,0,0
+110005,202002,200,27,,,1,1,1,27,FIC,0,0,0
+110005,202003,200,27,,,1,1,1,27,FIC,0,0,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index 582736d6..594f30af 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-190001,202001,100,95,,1.853682946,1,0.9214,96.16299559,9261,R,,,4
-190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,,,3
-190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,,,4
-190001,202004,100,95,2.939189189,,1.113,1,87.62068966,4350,R,,,5
-190002,202001,100,17,,0.562673451,1,0.9214,96.16299559,2433,R,,,4
-190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,,,3
-190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,,,4
-190002,202004,100,17,11.26857143,,1.113,1,87.62068966,700,R,,,5
-190003,202001,100,64,,1.870080607,1,0.9214,96.16299559,7888,R,,,4
-190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,,,3
-190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,,,4
-190003,202004,100,64,0.537083388,,1.113,1,87.62068966,4077,R,,,5
-190004,202001,100,51,,,1,0.9214,96.16299559,2247,R,,,4
-190004,202002,100,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,,,3
-190004,202003,100,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,,,4
-190004,202004,100,51,,,1.113,1,87.62068966,8608,R,,,5
-190005,202001,100,34,,,1,0.9214,96.16299559,6271.13538,BI,,,4
-190005,202002,100,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,,,3
-190005,202003,100,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,,,4
-190005,202004,100,34,1.152154399,,1.113,1,87.62068966,5134,R,,,5
-190006,202001,100,8,,,1,0.9214,96.16299559,769.3039647,C,,,4
-190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.523909,FIC,,,3
-190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.874906,FIC,,,4
-190006,202004,100,8,,,1.113,1,87.62068966,706.6157695,FIC,,,5
+190001,202001,100,95,,1.853682946,1,0.9214,96.16299559,9261,R,0,0,4
+190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,0,0,3
+190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,0,0,4
+190001,202004,100,95,2.939189189,,1.113,1,87.62068966,4350,R,0,0,5
+190002,202001,100,17,,0.562673451,1,0.9214,96.16299559,2433,R,0,0,4
+190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,0,0,3
+190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,0,0,4
+190002,202004,100,17,11.26857143,,1.113,1,87.62068966,700,R,0,0,5
+190003,202001,100,64,,1.870080607,1,0.9214,96.16299559,7888,R,0,0,4
+190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,0,0,3
+190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,0,0,4
+190003,202004,100,64,0.537083388,,1.113,1,87.62068966,4077,R,0,0,5
+190004,202001,100,51,,,1,0.9214,96.16299559,2247,R,0,0,4
+190004,202002,100,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,0,0,3
+190004,202003,100,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,0,0,4
+190004,202004,100,51,,,1.113,1,87.62068966,8608,R,0,0,5
+190005,202001,100,34,,,1,0.9214,96.16299559,6271.13538,BI,0,0,4
+190005,202002,100,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,0,0,3
+190005,202003,100,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,0,0,4
+190005,202004,100,34,1.152154399,,1.113,1,87.62068966,5134,R,0,0,5
+190006,202001,100,8,,,1,0.9214,96.16299559,769.3039647,C,0,0,4
+190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.523909,FIC,0,0,3
+190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.874906,FIC,0,0,4
+190006,202004,100,8,,,1.113,1,87.62068966,706.6157695,FIC,0,0,5
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_input.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_input.csv
deleted file mode 100644
index beb6b0f7..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_input.csv
+++ /dev/null
@@ -1,51 +0,0 @@
-identifier,date,group,question,other
-1111,"202104","9000",1464.1,2
-1111,"202103","9000",1331,2
-1111,"202102","9000",,2
-1111,"202101","9000",1100,2
-1111,"202012","9000",1000,2
-2222,"202104","9000",2928.2,2
-2222,"202103","9000",2662,2
-2222,"202102","9000",2420,2
-2222,"202101","9000",2200,2
-2222,"202012","9000",2000,2
-3333,"202104","9000",4392.3,2
-3333,"202103","9000",3993,2
-3333,"202102","9000",3630,2
-3333,"202101","9000",3300,2
-3333,"202012","9000",3000,2
-4444,"202104","9000",,2
-4444,"202103","9000",5324,2
-4444,"202102","9000",4840,2
-4444,"202101","9000",4400,2
-4444,"202012","9000",4000,2
-5555,"202104","9000",,2
-5555,"202103","9000",,2
-5555,"202102","9000",6050,2
-5555,"202101","9000",5500,2
-5555,"202012","9000",5000,2
-1010,"202104","9900",1464.1,2
-1010,"202103","9900",,2
-1010,"202102","9900",,2
-1010,"202101","9900",1100,2
-1010,"202012","9900",1000,2
-2020,"202104","9900",2928.2,2
-2020,"202103","9900",2662,2
-2020,"202102","9900",2420,2
-2020,"202101","9900",2200,2
-2020,"202012","9900",2000,2
-3030,"202104","9900",4392.3,2
-3030,"202103","9900",3993,2
-3030,"202102","9900",3630,2
-3030,"202101","9900",3300,2
-3030,"202012","9900",3000,2
-4040,"202104","9900",5856.4,2
-4040,"202103","9900",5324,2
-4040,"202102","9900",4840,2
-4040,"202101","9900",4400,2
-4040,"202012","9900",,2
-5050,"202104","9900",7320.5,2
-5050,"202103","9900",6655,2
-5050,"202102","9900",6050,2
-5050,"202101","9900",,2
-5050,"202012","9900",,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_output.csv
deleted file mode 100644
index bfc91017..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/cal_year_span_output.csv
+++ /dev/null
@@ -1,51 +0,0 @@
-identifier,date,group,other,output,marker,forward,backward,count_forward,count_backward
-1111,202012,9000,2,1000,R,1,0.909090909090909,0,5
-1111,202101,9000,2,1100,R,1.1,0.909090909090909,5,4
-1111,202102,9000,2,1210,FIR,1.1,0.909090909090909,4,3
-1111,202103,9000,2,1331,R,1.1,0.909090909090909,3,3
-1111,202104,9000,2,1464.1,R,1.1,1,3,0
-2222,202012,9000,2,2000,R,1,0.909090909090909,0,5
-2222,202101,9000,2,2200,R,1.1,0.909090909090909,5,4
-2222,202102,9000,2,2420,R,1.1,0.909090909090909,4,3
-2222,202103,9000,2,2662,R,1.1,0.909090909090909,3,3
-2222,202104,9000,2,2928.2,R,1.1,1,3,0
-3333,202012,9000,2,3000,R,1,0.909090909090909,0,5
-3333,202101,9000,2,3300,R,1.1,0.909090909090909,5,4
-3333,202102,9000,2,3630,R,1.1,0.909090909090909,4,3
-3333,202103,9000,2,3993,R,1.1,0.909090909090909,3,3
-3333,202104,9000,2,4392.3,R,1.1,1,3,0
-4444,202012,9000,2,4000,R,1,0.909090909090909,0,5
-4444,202101,9000,2,4400,R,1.1,0.909090909090909,5,4
-4444,202102,9000,2,4840,R,1.1,0.909090909090909,4,3
-4444,202103,9000,2,5324,R,1.1,0.909090909090909,3,3
-4444,202104,9000,2,5856.4,FIR,1.1,1,3,0
-5555,202012,9000,2,5000,R,1,0.909090909090909,0,5
-5555,202101,9000,2,5500,R,1.1,0.909090909090909,5,4
-5555,202102,9000,2,6050,R,1.1,0.909090909090909,4,3
-5555,202103,9000,2,6655,FIR,1.1,0.909090909090909,3,3
-5555,202104,9000,2,7320.5,FIR,1.1,1,3,0
-1010,202012,9900,2,1000,R,1,0.909090909090909,0,3
-1010,202101,9900,2,1100,R,1.1,0.909090909090909,3,3
-1010,202102,9900,2,1210,FIR,1.1,0.909090909090909,3,4
-1010,202103,9900,2,1331,FIR,1.1,0.909090909090909,4,4
-1010,202104,9900,2,1464.1,R,1.1,1,4,0
-2020,202012,9900,2,2000,R,1,0.909090909090909,0,3
-2020,202101,9900,2,2200,R,1.1,0.909090909090909,3,3
-2020,202102,9900,2,2420,R,1.1,0.909090909090909,3,4
-2020,202103,9900,2,2662,R,1.1,0.909090909090909,4,4
-2020,202104,9900,2,2928.2,R,1.1,1,4,0
-3030,202012,9900,2,3000,R,1,0.909090909090909,0,3
-3030,202101,9900,2,3300,R,1.1,0.909090909090909,3,3
-3030,202102,9900,2,3630,R,1.1,0.909090909090909,3,4
-3030,202103,9900,2,3993,R,1.1,0.909090909090909,4,4
-3030,202104,9900,2,4392.3,R,1.1,1,4,0
-4040,202012,9900,2,4000,BI,1,0.909090909090909,0,3
-4040,202101,9900,2,4400,R,1.1,0.909090909090909,3,3
-4040,202102,9900,2,4840,R,1.1,0.909090909090909,3,4
-4040,202103,9900,2,5324,R,1.1,0.909090909090909,4,4
-4040,202104,9900,2,5856.4,R,1.1,1,4,0
-5050,202012,9900,2,5000,BI,1,0.909090909090909,0,3
-5050,202101,9900,2,5500,BI,1.1,0.909090909090909,3,3
-5050,202102,9900,2,6050,R,1.1,0.909090909090909,3,4
-5050,202103,9900,2,6655,R,1.1,0.909090909090909,4,4
-5050,202104,9900,2,7320.5,R,1.1,1,4,0
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
index 8220bd06..93f0cfcc 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
@@ -1,21 +1,21 @@
 identifier,date,group,question,other
-50001,202001,100,6362,59
-50001,202002,100,8542,59
-50001,202003,100,5623,59
-50001,202004,100,7769,59
-50001,202005,100,4687,59
-50002,202001,100,4851,36
-50002,202002,100,8894,36
-50002,202003,100,3372,36
-50002,202004,100,3522,36
-50002,202005,100,2327,36
-50003,202001,100,2238,76
-50003,202002,100,769,76
-50003,202003,100,7722,76
-50003,202004,100,6445,76
-50003,202005,100,1521,76
-50004,202001,100,688,30
-50004,202002,100,3245,30
-50004,202003,100,,30
-50004,202004,100,,30
-50004,202005,100,,30
+50001,202010,100,6362,59
+50001,202011,100,8542,59
+50001,202012,100,5623,59
+50001,202101,100,7769,59
+50001,202102,100,4687,59
+50002,202010,100,4851,36
+50002,202011,100,8894,36
+50002,202012,100,3372,36
+50002,202101,100,3522,36
+50002,202102,100,2327,36
+50003,202010,100,2238,76
+50003,202011,100,769,76
+50003,202012,100,7722,76
+50003,202101,100,6445,76
+50003,202102,100,1521,76
+50004,202010,100,688,30
+50004,202011,100,3245,30
+50004,202012,100,,30
+50004,202101,100,,30
+50004,202102,100,,30
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
index efcf3da5..34667bbe 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-50001,202001,100,59,6362,R,1.0,0.659160839,70.34328358,0,4,4
-50001,202002,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4
-50001,202003,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3
-50001,202004,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3
-50001,202005,100,59,4687,R,0.481224628,1.0,49.9122807,3,0,3
-50002,202001,100,36,4851,R,1.0,0.659160839,70.34328358,0,4,4
-50002,202002,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4
-50002,202003,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3
-50002,202004,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3
-50002,202005,100,36,2327,R,0.481224628,1.0,49.9122807,3,0,3
-50003,202001,100,76,2238,R,1.0,0.659160839,70.34328358,0,4,4
-50003,202002,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4
-50003,202003,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3
-50003,202004,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3
-50003,202005,100,76,1521,R,0.481224628,1.0,49.9122807,3,0,3
-50004,202001,100,30,688,R,1.0,0.659160839,70.34328358,0,4,4
-50004,202002,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4
-50004,202003,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3
-50004,202004,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3
-50004,202005,100,30,1521.344411,FIR,0.481224628,1.0,49.9122807,3,0,3
+50001,202010,100,59,6362,R,1.0,0.659160839,70.34328358,0,4,4
+50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4
+50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3
+50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3
+50001,202102,100,59,4687,R,0.481224628,1.0,49.9122807,3,0,3
+50002,202010,100,36,4851,R,1.0,0.659160839,70.34328358,0,4,4
+50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4
+50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3
+50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3
+50002,202102,100,36,2327,R,0.481224628,1.0,49.9122807,3,0,3
+50003,202010,100,76,2238,R,1.0,0.659160839,70.34328358,0,4,4
+50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4
+50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3
+50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3
+50003,202102,100,76,1521,R,0.481224628,1.0,49.9122807,3,0,3
+50004,202010,100,30,688,R,1.0,0.659160839,70.34328358,0,4,4
+50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4
+50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3
+50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3
+50004,202102,100,30,1521.344411,FIR,0.481224628,1.0,49.9122807,3,0,3

From c7211dafd680a6c3be83c878940cd9656f0073c0 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 16:05:27 +0100
Subject: [PATCH 240/531] Add default marker columns

---
 .../imputation/engine.py                      | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 375347ea..e5dccc92 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -240,17 +240,26 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         ratio_calculators = []
         if "forward" in df.columns:
             df = (
-                df.fillna(1.0, ["forward", "backward"])
-                .withColumn("count_forward", lit(0))
-                .withColumn("count_backward", lit(0))
+                df.withColumn("default_forward", expr("forward IS NULL"))
+                .withColumn("default_backward", expr("backward IS NULL"))
+                .fillna(1.0, ["forward", "backward"])
+                .withColumn("count_forward", lit(0).cast("long"))
+                .withColumn("count_backward", lit(0).cast("long"))
             )
 
         else:
             ratio_calculators.append(ratio_calculator)
 
         if "construction" in df.columns:
-            df = df.fillna(1.0, ["construction"]).withColumn(
-                "count_construction", lit(0)
+            df = (
+                df.withColumn(
+                    "default_construction",
+                    expr("construction IS NULL")
+                )
+                .fillna(1.0, ["construction"])
+                .withColumn(
+                    "count_construction", lit(0).cast("long")
+                )
             )
 
         else:

From d5894c58cd26b11ef6bcb6bebf66271f0c602076 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 16:36:48 +0100
Subject: [PATCH 241/531] Add default marker columns to the output

---
 statistical_methods_library/imputation/engine.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index e5dccc92..c0a2f068 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -56,6 +56,9 @@ def impute(
     count_construction_col: Optional[str] = "count_construction",
     count_forward_col: Optional[str] = "count_forward",
     count_backward_col: Optional[str] = "count_backward",
+    default_construction_col: Optional[str] = "default_construction",
+    default_forward_col: Optional[str] = "default_forward",
+    default_backward_col: Optional[str] = "default_backward",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
     periodicity: Optional[int] = 1,
@@ -87,6 +90,9 @@ def impute(
         "count_construction": count_construction_col,
         "count_forward": count_forward_col,
         "count_backward": count_backward_col,
+        "default_construction": default_construction_col,
+        "default_forward": default_forward_col,
+        "default_backward": default_backward_col,
     }
 
     if forward_link_col is not None:

From f2c6c1445470aa8b0f26c37faaf35eaf9d6ea7e5 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 2 May 2023 17:05:55 +0100
Subject: [PATCH 242/531] Completely separate input and output column mappings,
 simplify output creation and allow link columns to be specified as output
 column names without requiring them on the input

---
 .../imputation/engine.py                      | 60 +++++--------------
 1 file changed, 16 insertions(+), 44 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index c0a2f068..47c97666 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -66,7 +66,6 @@ def impute(
     weight_periodicity: Optional[int] = None,
     **ratio_calculator_params,
 ) -> DataFrame:
-    additional_outputs = {}
     # --- Validate params ---
     link_cols = [forward_link_col, backward_link_col]
     if any(link_cols) and not all(link_cols):
@@ -84,7 +83,7 @@ def impute(
     }
 
     # Mapping of column aliases to parameters
-    full_col_mapping = {
+    output_col_mapping = {
         "output": output_col,
         "marker": marker_col,
         "count_construction": count_construction_col,
@@ -93,9 +92,16 @@ def impute(
         "default_construction": default_construction_col,
         "default_forward": default_forward_col,
         "default_backward": default_backward_col,
+        "forward": forward_link_col,
+        "backward": backward_link_col,
+        "construction": construction_link_col,
+        "ref": reference_col,
+        "period": period_col,
+        "grouping": grouping_col,
+        "target": target_col,
     }
 
-    if forward_link_col is not None:
+    if forward_link_col in df.columns or backward_link_col in df.columns:
         input_params.update(
             {
                 "forward": forward_link_col,
@@ -103,22 +109,9 @@ def impute(
             }
         )
 
-    if construction_link_col is not None:
+    if construction_link_col in df.columns:
         input_params["construction"] = construction_link_col
 
-    full_col_mapping.update(input_params)
-
-    if forward_link_col is None:
-        full_col_mapping.update(
-            {
-                "forward": "forward",
-                "backward": "backward",
-            }
-        )
-
-    if construction_link_col is None:
-        full_col_mapping["construction"] = "construction"
-
     back_expected_columns = {
         "ref": reference_col,
         "period": period_col,
@@ -258,14 +251,9 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
 
         if "construction" in df.columns:
             df = (
-                df.withColumn(
-                    "default_construction",
-                    expr("construction IS NULL")
-                )
+                df.withColumn("default_construction", expr("construction IS NULL"))
                 .fillna(1.0, ["construction"])
-                .withColumn(
-                    "count_construction", lit(0).cast("long")
-                )
+                .withColumn("count_construction", lit(0).cast("long"))
             )
 
         else:
@@ -344,7 +332,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         ):
             df = df.join(result.data, result.join_columns, "left")
             fill_values.update(result.fill_values)
-            additional_outputs.update(result.additional_outputs)
+            output_col_mapping.update(result.additional_outputs)
 
         for fill_column, fill_value in fill_values.items():
             df = df.fillna(fill_value, fill_column)
@@ -573,26 +561,10 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
 
     # --- Utility functions ---
     def create_output(df: DataFrame) -> DataFrame:
-        del full_col_mapping["aux"]
-        del full_col_mapping["grouping"]
-        full_col_mapping.update(additional_outputs)
-        return select_cols(
-            df.filter(col("period") != lit(prior_period)), reversed=False
-        ).withColumnRenamed("output", output_col)
-
-    def select_cols(
-        df: DataFrame,
-        reversed: bool = True,
-        drop_unmapped: bool = True,
-        mapping: dict = full_col_mapping,
-    ) -> DataFrame:
-        col_mapping = {v: k for k, v in mapping.items()} if reversed else mapping
-        col_set = set(df.columns)
-
-        return df.select(
+        return df.filter(col("period") > lit(prior_period)).select(
             [
-                col(k).alias(col_mapping.get(k, k))
-                for k in ((col_mapping.keys() & col_set) if drop_unmapped else col_set)
+                col(k).alias(output_col_mapping[k])
+                for k in sorted(output_col_mapping.keys() & set(df.columns))
             ]
         )
 

From 8b0aed64f06b8e05e4a48589b1977242ea09fc93 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 2 May 2023 17:14:10 +0100
Subject: [PATCH 243/531] Fill Missing Zeros

---
 .../19_link_columns_output.csv                | 48 +++++++-------
 .../28_link_columns_filtered_output.csv       | 64 +++++++++----------
 2 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index 2d5f0e05..c6b01432 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,,,
-190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,,,
-190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,,,
-190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,,,
-190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,,,
-190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,,,
-190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,,,
-190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,,,
-190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,,,
-190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,,,
-190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,,,
-190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,,,
-190004,202001,100,51,2247,R,,,1,0.9214,50.3694,,,
-190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,,,
-190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,,,
-190004,202004,100,51,8608,R,,,1.113,1,110.5473,,,
-190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,,,
-190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,,,
-190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,,,
-190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,,,
-190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,,,
-190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,,,
-190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,,,
-190006,202004,100,8,370.1196299,FIC,,,1.113,1,110.5473,,,
+190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,0,0,0
+190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,0,0,0
+190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,0,0,0
+190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,0,0,0
+190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,0,0,0
+190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,0,0,0
+190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,0,0,0
+190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,0,0,0
+190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,0,0,0
+190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,0,0,0
+190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,0,0,0
+190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,0,0,0
+190004,202001,100,51,2247,R,,,1,0.9214,50.3694,0,0,0
+190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,0,0,0
+190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,0,0,0
+190004,202004,100,51,8608,R,,,1.113,1,110.5473,0,0,0
+190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,0,0,0
+190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,0,0,0
+190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,0,0,0
+190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,0,0,0
+190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,0,0,0
+190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,0,0,0
+190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,0,0,0
+190006,202004,100,8,370.1196299,FIC,,,1.113,1,110.5473,0,0,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
index 08c0caef..a47b4845 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-190001,202001,100,95,,1.853682946,1,0.9214,50.3694,9261,R,,,,
-190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,,,,
-190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,,,,
-190001,202004,100,95,2.939189189,,1.113,1,110.5473,4350,R,,,,
-190002,202001,100,17,,0.562673451,1,0.9214,50.3694,2433,R,,,,
-190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,,,,
-190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,,,,
-190002,202004,100,17,11.26857143,,1.113,1,110.5473,700,R,,,,
-190003,202001,100,64,,1.870080607,1,0.9214,50.3694,7888,R,,,,
-190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,,,,
-190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,,,,
-190003,202004,100,64,0.537083388,,1.113,1,110.5473,4077,R,,,,
-190004,202001,100,51,,,1,0.9214,50.3694,2247,R,,,,
-190004,202002,100,51,,,0.8521,1.5274,121.4187,1914.6687,FIR,,,,
-190004,202003,100,51,,,0.9685,1.8795,89.3761,1854.356636,FIR,,,,
-190004,202004,100,51,,,1.113,1,110.5473,8608,R,,,,
-190005,202001,100,34,,,1,0.9214,50.3694,6271.13538,BI,,,,
-190005,202002,100,34,,,0.8521,1.5274,121.4187,6806.0944,BI,,,,
-190005,202003,100,34,,0.867939229,0.9685,1.8795,89.3761,4456,R,,,,
-190005,202004,100,34,1.152154399,,1.113,1,110.5473,5134,R,,,,
-190006,202001,100,8,,,1,0.9214,50.3694,402.9552,C,,,,
-190006,202002,100,8,,,0.8521,1.5274,121.4187,343.3581259,FIC,,,,
-190006,202003,100,8,,,0.9685,1.8795,89.3761,332.542345,FIC,,,,
-190006,202004,100,8,,,1.113,1,110.5473,370.1196299,FIC,,,,
-190007,202001,100,85,,,1,0.9214,50.3694,150000,R,,,,TRUE
-190007,202002,100,85,,,0.8521,1.5274,121.4187,120000,R,,,,TRUE
-190007,202003,100,85,,,0.9685,1.8795,89.3761,110000,R,,,,TRUE
-190007,202004,100,85,,,1.113,1,110.5473,180000,R,,,,TRUE
-190008,202001,100,71,,,1,0.9214,50.3694,3576.2274,C,,,,
-190008,202002,100,71,,,0.8521,1.5274,121.4187,3047.303368,FIC,,,,
-190008,202003,100,71,,,0.9685,1.8795,89.3761,2951.313312,FIC,,,,
-190008,202004,100,71,,,1.113,1,110.5473,3284.811716,FIC,,,,
+190001,202001,100,95,,1.853682946,1,0.9214,50.3694,9261,R,0,0,0,
+190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,0,0,0,
+190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,0,0,0,
+190001,202004,100,95,2.939189189,,1.113,1,110.5473,4350,R,0,0,0,
+190002,202001,100,17,,0.562673451,1,0.9214,50.3694,2433,R,0,0,0,
+190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,0,0,0,
+190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,0,0,0,
+190002,202004,100,17,11.26857143,,1.113,1,110.5473,700,R,0,0,0,
+190003,202001,100,64,,1.870080607,1,0.9214,50.3694,7888,R,0,0,0,
+190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,0,0,0,
+190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,0,0,0,
+190003,202004,100,64,0.537083388,,1.113,1,110.5473,4077,R,0,0,0,
+190004,202001,100,51,,,1,0.9214,50.3694,2247,R,0,0,0,
+190004,202002,100,51,,,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,
+190004,202003,100,51,,,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,
+190004,202004,100,51,,,1.113,1,110.5473,8608,R,0,0,0,
+190005,202001,100,34,,,1,0.9214,50.3694,6271.13538,BI,0,0,0,
+190005,202002,100,34,,,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,
+190005,202003,100,34,,0.867939229,0.9685,1.8795,89.3761,4456,R,0,0,0,
+190005,202004,100,34,1.152154399,,1.113,1,110.5473,5134,R,0,0,0,
+190006,202001,100,8,,,1,0.9214,50.3694,402.9552,C,0,0,0,
+190006,202002,100,8,,,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,
+190006,202003,100,8,,,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,
+190006,202004,100,8,,,1.113,1,110.5473,370.1196299,FIC,0,0,0,
+190007,202001,100,85,,,1,0.9214,50.3694,150000,R,0,0,0,TRUE
+190007,202002,100,85,,,0.8521,1.5274,121.4187,120000,R,0,0,0,TRUE
+190007,202003,100,85,,,0.9685,1.8795,89.3761,110000,R,0,0,0,TRUE
+190007,202004,100,85,,,1.113,1,110.5473,180000,R,0,0,0,TRUE
+190008,202001,100,71,,,1,0.9214,50.3694,3576.2274,C,0,0,0,
+190008,202002,100,71,,,0.8521,1.5274,121.4187,3047.303368,FIC,0,0,0,
+190008,202003,100,71,,,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,
+190008,202004,100,71,,,1.113,1,110.5473,3284.811716,FIC,0,0,0,

From 8a505aada280bb61b38546804d82a1bbfb09d9fa Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 3 May 2023 11:04:09 +0100
Subject: [PATCH 244/531] Add filter marker column

---
 statistical_methods_library/imputation/engine.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 47c97666..4959b7c3 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -59,6 +59,7 @@ def impute(
     default_construction_col: Optional[str] = "default_construction",
     default_forward_col: Optional[str] = "default_forward",
     default_backward_col: Optional[str] = "default_backward",
+    filter_marker_col: Optional[str] = "default_backward",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
     periodicity: Optional[int] = 1,
@@ -92,6 +93,7 @@ def impute(
         "default_construction": default_construction_col,
         "default_forward": default_forward_col,
         "default_backward": default_backward_col,
+        "filter_marker": filter_marker_col,
         "forward": forward_link_col,
         "backward": backward_link_col,
         "construction": construction_link_col,
@@ -337,6 +339,11 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         for fill_column, fill_value in fill_values.items():
             df = df.fillna(fill_value, fill_column)
 
+        df = df.join(
+            filtered_df.select("ref", "period", expr("NOT match AS filter_marker")),
+            ["ref", "period"],
+        ).fillna(False, "filter_marker")
+
         if weight is not None:
 
             def calculate_weighted_link(link_name):

From 71b8087a4d801c0caf78dbf22c48237cbb3f4de6 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 3 May 2023 11:38:36 +0100
Subject: [PATCH 245/531] Add marker columns to ratio of means data

---
 .../methodology_scenarios/01_C_output.csv     |  10 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  18 +--
 .../03_R_R_FI_output.csv                      |  26 ++--
 .../04_R_R_FI_FI_output.csv                   |  34 ++---
 .../05_R_R_FI_FI_FI_output.csv                |  42 +++---
 .../06_BI_BI_R_output.csv                     |  26 ++--
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  58 ++++----
 .../methodology_scenarios/08_R_R_R_output.csv |  26 ++--
 .../09_R_NS_C_output.csv                      |  24 ++--
 .../10_C_FI_NS_R_output.csv                   |  32 ++---
 .../11_R_R_FI-BI_R_R_output.csv               |  50 +++----
 .../12_C_FI_FI_FI_FI_output.csv               |  42 +++---
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  56 ++++----
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  56 ++++----
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  56 ++++----
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  56 ++++----
 .../17_NS_R_FI_NS_output.csv                  |  30 ++--
 .../18_NS_BI_R_NS_output.csv                  |  30 ++--
 .../19_link_columns_output.csv                |  50 +++----
 .../20_mixed_data_output.csv                  |  96 ++++++-------
 .../21_class_change_R_C_FI_output.csv         |  32 ++---
 .../22_class_change_C_BI_R_output.csv         |  32 ++---
 .../23_class_change_C_C_FI_output.csv         |  32 ++---
 .../24_class_change_R_BI_R_output.csv         |  32 ++---
 .../25_class_change_C_FI_FI_output.csv        |  44 +++---
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv |  84 ++++++------
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |  84 ++++++------
 .../28_link_columns_filtered_output.csv       |  66 ++++-----
 .../29_mixed_data_filtered_output.csv         | 128 +++++++++---------
 ...30_class_change_C_C_FI_filtered_output.csv |  56 ++++----
 30 files changed, 704 insertions(+), 704 deletions(-)

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index faa3dde8..789a35b3 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-10001,202001,100,1,3892,R,1,1,147.88764,0,0,3
-10002,202001,100,75,3873,R,1,1,147.88764,0,0,3
-10003,202001,100,13,5397,R,1,1,147.88764,0,0,3
-10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,false,false,false,false
+10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,false,false,false,false
+10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,false,false,false,false
+10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index 23517411..697fddf2 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction
-20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3
-20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3
-20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3
-20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3
-20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3
-20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3
-20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3
-20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,filter_marker
+20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,false,false,false,false
+20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,false,false,false
+20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,false,false,false,false
+20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,false,false,false
+20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,false,false,false,false
+20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,false,false,false
+20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,false,false,false,false
+20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index 40074e98..e098b624 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction
-30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4
-30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4
-30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3
-30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4
-30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4
-30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3
-30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4
-30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4
-30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3
-30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4
-30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4
-30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,filter_marker
+30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,false,false,false,false
+30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
+30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,false,false,false
+30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4,false,false,false,false
+30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
+30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3,false,false,false,false
+30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4,false,false,false,false
+30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
+30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,false,false,false
+30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,false,false,false,false
+30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
+30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index f0c45592..4e0583c5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-40001,202001,100,35,9491,R,1.0,1.060305409,128.0208333,0,4,4
-40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4
-40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3
-40001,202004,100,35,4911,R,0.637121844,1.0,73.71052632,3,0,3
-40002,202001,100,63,2095,R,1.0,1.060305409,128.0208333,0,4,4
-40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4
-40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3
-40002,202004,100,63,2115,R,0.637121844,1.0,73.71052632,3,0,3
-40003,202001,100,16,7863,R,1.0,1.060305409,128.0208333,0,4,4
-40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4
-40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3
-40003,202004,100,16,1377,R,0.637121844,1.0,73.71052632,3,0,3
-40004,202001,100,78,5131,R,1.0,1.060305409,128.0208333,0,4,4
-40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4
-40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3
-40004,202004,100,78,6193.009741,FIR,0.637121844,1.0,73.71052632,3,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+40001,202001,100,35,9491,R,1.0,1.060305409,128.0208333,0,4,4,false,false,false,false
+40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
+40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
+40001,202004,100,35,4911,R,0.637121844,1.0,73.71052632,3,0,3,false,false,false,false
+40002,202001,100,63,2095,R,1.0,1.060305409,128.0208333,0,4,4,false,false,false,false
+40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
+40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
+40002,202004,100,63,2115,R,0.637121844,1.0,73.71052632,3,0,3,false,false,false,false
+40003,202001,100,16,7863,R,1.0,1.060305409,128.0208333,0,4,4,false,false,false,false
+40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
+40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
+40003,202004,100,16,1377,R,0.637121844,1.0,73.71052632,3,0,3,false,false,false,false
+40004,202001,100,78,5131,R,1.0,1.060305409,128.0208333,0,4,4,false,false,false,false
+40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
+40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
+40004,202004,100,78,6193.009741,FIR,0.637121844,1.0,73.71052632,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
index 34667bbe..deab3b07 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-50001,202010,100,59,6362,R,1.0,0.659160839,70.34328358,0,4,4
-50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4
-50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3
-50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3
-50001,202102,100,59,4687,R,0.481224628,1.0,49.9122807,3,0,3
-50002,202010,100,36,4851,R,1.0,0.659160839,70.34328358,0,4,4
-50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4
-50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3
-50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3
-50002,202102,100,36,2327,R,0.481224628,1.0,49.9122807,3,0,3
-50003,202010,100,76,2238,R,1.0,0.659160839,70.34328358,0,4,4
-50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4
-50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3
-50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3
-50003,202102,100,76,1521,R,0.481224628,1.0,49.9122807,3,0,3
-50004,202010,100,30,688,R,1.0,0.659160839,70.34328358,0,4,4
-50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4
-50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3
-50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3
-50004,202102,100,30,1521.344411,FIR,0.481224628,1.0,49.9122807,3,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+50001,202010,100,59,6362,R,1.0,0.659160839,70.34328358,0,4,4,false,false,false,false
+50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
+50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
+50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
+50001,202102,100,59,4687,R,0.481224628,1.0,49.9122807,3,0,3,false,false,false,false
+50002,202010,100,36,4851,R,1.0,0.659160839,70.34328358,0,4,4,false,false,false,false
+50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
+50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
+50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
+50002,202102,100,36,2327,R,0.481224628,1.0,49.9122807,3,0,3,false,false,false,false
+50003,202010,100,76,2238,R,1.0,0.659160839,70.34328358,0,4,4,false,false,false,false
+50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
+50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
+50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
+50003,202102,100,76,1521,R,0.481224628,1.0,49.9122807,3,0,3,false,false,false,false
+50004,202010,100,30,688,R,1.0,0.659160839,70.34328358,0,4,4,false,false,false,false
+50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
+50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
+50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
+50004,202102,100,30,1521.344411,FIR,0.481224628,1.0,49.9122807,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index cc6e8b75..71d759ce 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-60001,202001,100,15,5077,R,1.0,1.408039237,117.9107143,0,3,3
-60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3
-60001,202003,100,15,1046,R,1.194583644,1.0,100.913043,3,0,4
-60002,202001,100,71,1588,R,1.0,1.408039237,117.9107143,0,3,3
-60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3
-60002,202003,100,71,3807,R,1.194583644,1.0,100.913043,3,0,4
-60003,202001,100,26,6541,R,1.0,1.408039237,117.9107143,0,3,3
-60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3
-60003,202003,100,26,6351,R,1.194583644,1.0,100.913043,3,0,4
-60004,202001,100,3,472.653159,BI,1.0,1.408039237,117.9107143,0,3,3
-60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3
-60004,202003,100,3,401,R,1.194583644,1.0,100.913043,3,0,4
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+60001,202001,100,15,5077,R,1.0,1.408039237,117.9107143,0,3,3,false,false,false,false
+60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
+60001,202003,100,15,1046,R,1.194583644,1.0,100.913043,3,0,4,false,false,false,false
+60002,202001,100,71,1588,R,1.0,1.408039237,117.9107143,0,3,3,false,false,false,false
+60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
+60002,202003,100,71,3807,R,1.194583644,1.0,100.913043,3,0,4,false,false,false,false
+60003,202001,100,26,6541,R,1.0,1.408039237,117.9107143,0,3,3,false,false,false,false
+60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
+60003,202003,100,26,6351,R,1.194583644,1.0,100.913043,3,0,4,false,false,false,false
+60004,202001,100,3,472.653159,BI,1.0,1.408039237,117.9107143,0,3,3,false,false,false,false
+60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
+60004,202003,100,3,401,R,1.194583644,1.0,100.913043,3,0,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index efa7df25..4bb1d7d7 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-70001,202001,100,39,5951,R,1.0,1.964796824,107.48,0,3,3
-70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3
-70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4
-70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3
-70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3
-70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4
-70001,202007,100,39,49,R,0.913631634,1.0,70.24,3,0,3
-70002,202001,100,94,6705,R,1.0,1.964796824,107.48,0,3,3
-70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3
-70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4
-70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3
-70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3
-70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4
-70002,202007,100,94,3475,R,0.913631634,1.0,70.24,3,0,3
-70003,202001,100,42,6153,R,1.0,1.964796824,107.48,0,3,3
-70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3
-70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4
-70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3
-70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3
-70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4
-70003,202007,100,42,8768,R,0.913631634,1.0,70.24,3,0,3
-70004,202001,100,6,10286.222995,BI,1.0,1.964796824,107.48,0,3,3
-70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3
-70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4
-70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3
-70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3
-70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4
-70004,202007,100,6,5367.585848,FIR,0.913631634,1.0,70.24,3,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+70001,202001,100,39,5951,R,1.0,1.964796824,107.48,0,3,3,false,false,false,false
+70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
+70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
+70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
+70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
+70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
+70001,202007,100,39,49,R,0.913631634,1.0,70.24,3,0,3,false,false,false,false
+70002,202001,100,94,6705,R,1.0,1.964796824,107.48,0,3,3,false,false,false,false
+70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
+70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
+70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
+70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
+70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
+70002,202007,100,94,3475,R,0.913631634,1.0,70.24,3,0,3,false,false,false,false
+70003,202001,100,42,6153,R,1.0,1.964796824,107.48,0,3,3,false,false,false,false
+70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
+70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
+70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
+70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
+70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
+70003,202007,100,42,8768,R,0.913631634,1.0,70.24,3,0,3,false,false,false,false
+70004,202001,100,6,10286.222995,BI,1.0,1.964796824,107.48,0,3,3,false,false,false,false
+70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
+70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
+70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
+70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
+70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
+70004,202007,100,6,5367.585848,FIR,0.913631634,1.0,70.24,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
index 03a59c30..3cc84487 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-80001,202001,100,91,4042,R,1.0,1.646151294,69.14982578,0,4,4
-80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4
-80001,202003,100,91,644,R,1.711844725,1.0,71.90940767,4,0,4
-80002,202001,100,85,7138,R,1.0,1.646151294,69.14982578,0,4,4
-80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4
-80002,202003,100,85,2746,R,1.711844725,1.0,71.90940767,4,0,4
-80003,202001,100,41,2846,R,1.0,1.646151294,69.14982578,0,4,4
-80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4
-80003,202003,100,41,9015,R,1.711844725,1.0,71.90940767,4,0,4
-80004,202001,100,70,5820,R,1.0,1.646151294,69.14982578,0,4,4
-80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4
-80004,202003,100,70,8233,R,1.711844725,1.0,71.90940767,4,0,4
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+80001,202001,100,91,4042,R,1.0,1.646151294,69.14982578,0,4,4,false,false,false,false
+80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
+80001,202003,100,91,644,R,1.711844725,1.0,71.90940767,4,0,4,false,false,false,false
+80002,202001,100,85,7138,R,1.0,1.646151294,69.14982578,0,4,4,false,false,false,false
+80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
+80002,202003,100,85,2746,R,1.711844725,1.0,71.90940767,4,0,4,false,false,false,false
+80003,202001,100,41,2846,R,1.0,1.646151294,69.14982578,0,4,4,false,false,false,false
+80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
+80003,202003,100,41,9015,R,1.711844725,1.0,71.90940767,4,0,4,false,false,false,false
+80004,202001,100,70,5820,R,1.0,1.646151294,69.14982578,0,4,4,false,false,false,false
+80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
+80004,202003,100,70,8233,R,1.711844725,1.0,71.90940767,4,0,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index 95903868..bc9b5520 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-90001,202001,100,66,2417,R,1.0,0.294381131,71.77777778,0,3,4
-90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3
-90001,202003,100,66,7319,R,1.027612406,1.0,169.3831776,3,0,3
-90002,202001,100,27,1706,R,1.0,0.294381131,71.77777778,0,3,4
-90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3
-90002,202003,100,27,8390,R,1.027612406,1.0,169.3831776,3,0,3
-90003,202001,100,14,1069,R,1.0,0.294381131,71.77777778,0,3,4
-90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3
-90003,202003,100,14,2415,R,1.027612406,1.0,169.3831776,3,0,3
-90004,202001,100,73,7728,R,1.0,0.294381131,71.77777778,0,3,4
-90004,202003,100,73,12364.971963,C,1.027612406,1.0,169.3831776,3,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+90001,202001,100,66,2417,R,1.0,0.294381131,71.77777778,0,3,4,false,false,false,false
+90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
+90001,202003,100,66,7319,R,1.027612406,1.0,169.3831776,3,0,3,false,false,false,false
+90002,202001,100,27,1706,R,1.0,0.294381131,71.77777778,0,3,4,false,false,false,false
+90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
+90002,202003,100,27,8390,R,1.027612406,1.0,169.3831776,3,0,3,false,false,false,false
+90003,202001,100,14,1069,R,1.0,0.294381131,71.77777778,0,3,4,false,false,false,false
+90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
+90003,202003,100,14,2415,R,1.027612406,1.0,169.3831776,3,0,3,false,false,false,false
+90004,202001,100,73,7728,R,1.0,0.294381131,71.77777778,0,3,4,false,false,false,false
+90004,202003,100,73,12364.971963,C,1.027612406,1.0,169.3831776,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index 44868d0c..2d8e13e9 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-100001,202001,100,26,3074,R,1.0,1.046156805,179.3296703,0,3,3
-100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3
-100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3
-100001,202004,100,26,3540,R,3.027849407,1.0,119.1751412,3,0,4
-100002,202001,100,19,8084,R,1.0,1.046156805,179.3296703,0,3,3
-100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3
-100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3
-100002,202004,100,19,5608,R,3.027849407,1.0,119.1751412,3,0,4
-100003,202001,100,46,5161,R,1.0,1.046156805,179.3296703,0,3,3
-100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3
-100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3
-100003,202004,100,46,2594,R,3.027849407,1.0,119.1751412,3,0,4
-100004,202001,100,86,15422.351648,C,1.0,1.046156805,179.3296703,0,3,3
-100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3
-100004,202004,100,86,9352,R,3.027849407,1.0,119.1751412,3,0,4
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+100001,202001,100,26,3074,R,1.0,1.046156805,179.3296703,0,3,3,false,false,false,false
+100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
+100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
+100001,202004,100,26,3540,R,3.027849407,1.0,119.1751412,3,0,4,false,false,false,false
+100002,202001,100,19,8084,R,1.0,1.046156805,179.3296703,0,3,3,false,false,false,false
+100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
+100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
+100002,202004,100,19,5608,R,3.027849407,1.0,119.1751412,3,0,4,false,false,false,false
+100003,202001,100,46,5161,R,1.0,1.046156805,179.3296703,0,3,3,false,false,false,false
+100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
+100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
+100003,202004,100,46,2594,R,3.027849407,1.0,119.1751412,3,0,4,false,false,false,false
+100004,202001,100,86,15422.351648,C,1.0,1.046156805,179.3296703,0,3,3,false,false,false,false
+100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
+100004,202004,100,86,9352,R,3.027849407,1.0,119.1751412,3,0,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index d3d3775e..a4934228 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-110001,202001,100,89,9244,R,1.0,1.357646062,101.710317,0,4,4
-110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4
-110001,202003,100,89,6194,R,0.780928323,1.0,70.26136364,3,0,3
-110002,202001,100,83,4826,R,1.0,1.357646062,101.710317,0,4,4
-110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4
-110002,202003,100,83,4743,R,0.780928323,1.0,70.26136364,3,0,3
-110003,202001,100,4,7586,R,1.0,1.357646062,101.710317,0,4,4
-110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4
-110003,202003,100,4,1429,R,0.780928323,1.0,70.26136364,3,0,3
-110004,202001,100,76,3975,R,1.0,1.357646062,101.710317,0,4,4
-110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4
-110004,202003,100,76,2377.145816,FIR,0.780928323,1.0,70.26136364,3,0,3
-110005,202001,200,27,5217,R,1.0,1.016800862,182.25,0,3,3
-110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4
-110005,202003,200,27,9940,R,1.212689221,1.0,182.2366412,4,0,4
-110006,202001,200,42,5325,R,1.0,1.016800862,182.25,0,3,3
-110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4
-110006,202003,200,42,6685,R,1.212689221,1.0,182.2366412,4,0,4
-110007,202001,200,19,5496,R,1.0,1.016800862,182.25,0,3,3
-110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4
-110007,202003,200,19,1235,R,1.212689221,1.0,182.2366412,4,0,4
-110008,202001,200,43,3978.741774,BI,1.0,1.016800862,182.25,0,3,3
-110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4
-110008,202003,200,43,6013,R,1.212689221,1.0,182.2366412,4,0,4
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+110001,202001,100,89,9244,R,1.0,1.357646062,101.710317,0,4,4,false,false,false,false
+110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
+110001,202003,100,89,6194,R,0.780928323,1.0,70.26136364,3,0,3,false,false,false,false
+110002,202001,100,83,4826,R,1.0,1.357646062,101.710317,0,4,4,false,false,false,false
+110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
+110002,202003,100,83,4743,R,0.780928323,1.0,70.26136364,3,0,3,false,false,false,false
+110003,202001,100,4,7586,R,1.0,1.357646062,101.710317,0,4,4,false,false,false,false
+110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
+110003,202003,100,4,1429,R,0.780928323,1.0,70.26136364,3,0,3,false,false,false,false
+110004,202001,100,76,3975,R,1.0,1.357646062,101.710317,0,4,4,false,false,false,false
+110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
+110004,202003,100,76,2377.145816,FIR,0.780928323,1.0,70.26136364,3,0,3,false,false,false,false
+110005,202001,200,27,5217,R,1.0,1.016800862,182.25,0,3,3,false,false,false,false
+110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
+110005,202003,200,27,9940,R,1.212689221,1.0,182.2366412,4,0,4,false,false,false,false
+110006,202001,200,42,5325,R,1.0,1.016800862,182.25,0,3,3,false,false,false,false
+110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
+110006,202003,200,42,6685,R,1.212689221,1.0,182.2366412,4,0,4,false,false,false,false
+110007,202001,200,19,5496,R,1.0,1.016800862,182.25,0,3,3,false,false,false,false
+110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
+110007,202003,200,19,1235,R,1.212689221,1.0,182.2366412,4,0,4,false,false,false,false
+110008,202001,200,43,3978.741774,BI,1.0,1.016800862,182.25,0,3,3,false,false,false,false
+110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
+110008,202003,200,43,6013,R,1.212689221,1.0,182.2366412,4,0,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index e9b89d82..3e7be691 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-120001,202001,100,50,5240,R,1.0,1.268552019,77.38738739,0,3,3
-120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3
-120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3
-120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3
-120001,202005,100,50,1316,R,0.53449544,1.0,32.73423423,3,0,3
-120002,202001,100,78,7410,R,1.0,1.268552019,77.38738739,0,3,3
-120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3
-120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3
-120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3
-120002,202005,100,78,1535,R,0.53449544,1.0,32.73423423,3,0,3
-120003,202001,100,94,4530,R,1.0,1.268552019,77.38738739,0,3,3
-120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3
-120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3
-120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3
-120003,202005,100,94,4416,R,0.53449544,1.0,32.73423423,3,0,3
-120004,202001,100,100,7738.738739,C,1.0,1.268552019,77.38738739,0,3,3
-120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3
-120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3
-120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3
-120004,202005,100,100,3273.423424,FIC,0.53449544,1.0,32.73423423,3,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+120001,202001,100,50,5240,R,1.0,1.268552019,77.38738739,0,3,3,false,false,false,false
+120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
+120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
+120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
+120001,202005,100,50,1316,R,0.53449544,1.0,32.73423423,3,0,3,false,false,false,false
+120002,202001,100,78,7410,R,1.0,1.268552019,77.38738739,0,3,3,false,false,false,false
+120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
+120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
+120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
+120002,202005,100,78,1535,R,0.53449544,1.0,32.73423423,3,0,3,false,false,false,false
+120003,202001,100,94,4530,R,1.0,1.268552019,77.38738739,0,3,3,false,false,false,false
+120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
+120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
+120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
+120003,202005,100,94,4416,R,0.53449544,1.0,32.73423423,3,0,3,false,false,false,false
+120004,202001,100,100,7738.738739,C,1.0,1.268552019,77.38738739,0,3,3,false,false,false,false
+120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
+120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
+120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
+120004,202005,100,100,3273.423424,FIC,0.53449544,1.0,32.73423423,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index fddd0ad6..a27585ab 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-130001,202001,100,20,6583,R,1.0,0.6743401,102.7515152,0,3,4
-130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3
-130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3
-130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3
-130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3
-130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3
-130001,202007,100,20,3282,R,0.798832987,1.0,158.7757576,3,0,4
-130002,202001,100,69,687,R,1.0,0.6743401,102.7515152,0,3,4
-130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3
-130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3
-130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3
-130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3
-130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3
-130002,202007,100,69,9834,R,0.798832987,1.0,158.7757576,3,0,4
-130003,202001,100,39,7113,R,1.0,0.6743401,102.7515152,0,3,4
-130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3
-130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3
-130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3
-130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3
-130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3
-130003,202007,100,39,6461,R,0.798832987,1.0,158.7757576,3,0,4
-130004,202001,100,37,2571,R,1.0,0.6743401,102.7515152,0,3,4
-130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3
-130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3
-130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3
-130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3
-130004,202007,100,37,6621,R,0.798832987,1.0,158.7757576,3,0,4
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+130001,202001,100,20,6583,R,1.0,0.6743401,102.7515152,0,3,4,false,false,false,false
+130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
+130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
+130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,false
+130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
+130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
+130001,202007,100,20,3282,R,0.798832987,1.0,158.7757576,3,0,4,false,false,false,false
+130002,202001,100,69,687,R,1.0,0.6743401,102.7515152,0,3,4,false,false,false,false
+130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
+130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
+130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,false
+130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
+130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
+130002,202007,100,69,9834,R,0.798832987,1.0,158.7757576,3,0,4,false,false,false,false
+130003,202001,100,39,7113,R,1.0,0.6743401,102.7515152,0,3,4,false,false,false,false
+130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
+130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
+130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,false
+130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
+130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
+130003,202007,100,39,6461,R,0.798832987,1.0,158.7757576,3,0,4,false,false,false,false
+130004,202001,100,37,2571,R,1.0,0.6743401,102.7515152,0,3,4,false,false,false,false
+130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
+130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
+130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
+130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
+130004,202007,100,37,6621,R,0.798832987,1.0,158.7757576,3,0,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index bf47961a..26ad73a1 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,0,3,3
-140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3
-140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3
-140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3
-140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3
-140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3
-140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,0,4
-140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,0,3,3
-140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3
-140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3
-140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3
-140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3
-140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3
-140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,0,4
-140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,0,3,3
-140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3
-140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3
-140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3
-140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3
-140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3
-140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,0,4
-140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,0,3,3
-140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3
-140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3
-140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3
-140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3
-140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,0,4
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
+140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
+140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
+140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
+140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
+140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
+140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 384c5134..9c6e76f0 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-150001,202001,100,15,5891,R,1.0,0.887085601,181.0909091,0,3,3
-150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3
-150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4
-150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3
-150001,202005,100,15,2727,R,0.935831358,1.71163273,124.851190,3,3,4
-150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3
-150001,202007,100,15,9549,R,1.423548265,1.0,152.5353535,3,0,3
-150002,202001,100,5,8611,R,1.0,0.887085601,181.0909091,0,3,3
-150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3
-150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4
-150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3
-150002,202005,100,5,9967,R,0.935831358,1.71163273,124.851190,3,3,4
-150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3
-150002,202007,100,5,2593,R,1.423548265,1.0,152.5353535,3,0,3
-150003,202001,100,79,3426,R,1.0,0.887085601,181.0909091,0,3,3
-150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3
-150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4
-150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3
-150003,202005,100,79,5463,R,0.935831358,1.71163273,124.851190,3,3,4
-150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3
-150003,202007,100,79,2959,R,1.423548265,1.0,152.5353535,3,0,3
-150004,202001,100,69,5310.130499,BI,1.0,0.887085601,181.0909091,0,3,3
-150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3
-150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4
-150004,202005,100,69,2818,R,0.935831358,1.71163273,124.851190,3,3,4
-150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3
-150004,202007,100,69,2343.703144,FIR,1.423548265,1.0,152.5353535,3,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+150001,202001,100,15,5891,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150001,202005,100,15,2727,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150001,202007,100,15,9549,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
+150002,202001,100,5,8611,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150002,202005,100,5,9967,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150002,202007,100,5,2593,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
+150003,202001,100,79,3426,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150003,202005,100,79,5463,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150003,202007,100,79,2959,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
+150004,202001,100,69,5310.130499,BI,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150004,202005,100,69,2818,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150004,202007,100,69,2343.703144,FIR,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index f384188c..dbbe814b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-160001,202001,100,76,2086,R,1.0,0.285048351,29.78238342,0,3,3
-160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3
-160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4
-160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3
-160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3
-160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3
-160001,202007,100,76,1666,R,0.819547983,1.0,71.77202073,3,0,3
-160002,202001,100,32,430,R,1.0,0.285048351,29.78238342,0,3,3
-160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3
-160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4
-160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3
-160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3
-160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3
-160002,202007,100,32,2678,R,0.819547983,1.0,71.77202073,3,0,3
-160003,202001,100,85,3232,R,1.0,0.285048351,29.78238342,0,3,3
-160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3
-160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4
-160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3
-160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3
-160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3
-160003,202007,100,85,9508,R,0.819547983,1.0,71.77202073,3,0,3
-160004,202001,100,33,1022.611409,BI,1.0,0.285048351,29.78238342,0,3,3
-160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3
-160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4
-160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3
-160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3
-160004,202007,100,33,2368.476683,FIC,0.819547983,1.0,71.77202073,3,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+160001,202001,100,76,2086,R,1.0,0.285048351,29.78238342,0,3,3,false,false,false,false
+160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
+160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
+160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,false
+160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
+160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
+160001,202007,100,76,1666,R,0.819547983,1.0,71.77202073,3,0,3,false,false,false,false
+160002,202001,100,32,430,R,1.0,0.285048351,29.78238342,0,3,3,false,false,false,false
+160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
+160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
+160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,false
+160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
+160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
+160002,202007,100,32,2678,R,0.819547983,1.0,71.77202073,3,0,3,false,false,false,false
+160003,202001,100,85,3232,R,1.0,0.285048351,29.78238342,0,3,3,false,false,false,false
+160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
+160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
+160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,false
+160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
+160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
+160003,202007,100,85,9508,R,0.819547983,1.0,71.77202073,3,0,3,false,false,false,false
+160004,202001,100,33,1022.611409,BI,1.0,0.285048351,29.78238342,0,3,3,false,false,false,false
+160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
+160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
+160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
+160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
+160004,202007,100,33,2368.476683,FIC,0.819547983,1.0,71.77202073,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index ced03986..5e171507 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-170001,202001,100,69,6480,R,1.0,0.41470355,41.93396226,0,3,3
-170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4
-170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3
-170001,202004,100,69,7120,R,1.231814548,1.0,109.0330189,3,0,3
-170002,202001,100,62,449,R,1.0,0.41470355,41.93396226,0,3,3
-170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4
-170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3
-170002,202004,100,62,6745,R,1.231814548,1.0,109.0330189,3,0,3
-170003,202001,100,81,1961,R,1.0,0.41470355,41.93396226,0,3,3
-170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4
-170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3
-170003,202004,100,81,9250,R,1.231814548,1.0,109.0330189,3,0,3
-170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4
-170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+170001,202001,100,69,6480,R,1.0,0.41470355,41.93396226,0,3,3,false,false,false,false
+170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
+170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
+170001,202004,100,69,7120,R,1.231814548,1.0,109.0330189,3,0,3,false,false,false,false
+170002,202001,100,62,449,R,1.0,0.41470355,41.93396226,0,3,3,false,false,false,false
+170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
+170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
+170002,202004,100,62,6745,R,1.231814548,1.0,109.0330189,3,0,3,false,false,false,false
+170003,202001,100,81,1961,R,1.0,0.41470355,41.93396226,0,3,3,false,false,false,false
+170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
+170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
+170003,202004,100,81,9250,R,1.231814548,1.0,109.0330189,3,0,3,false,false,false,false
+170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
+170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 01bc94b7..72c4d3da 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-180001,202001,100,91,9188,R,1.0,0.743721487,123.4632353,0,3,3
-180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3
-180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4
-180001,202004,100,91,9291,R,1.709926945,1.0,175.5441176,3,0,3
-180002,202001,100,26,3829,R,1.0,0.743721487,123.4632353,0,3,3
-180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3
-180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4
-180002,202004,100,26,8415,R,1.709926945,1.0,175.5441176,3,0,3
-180003,202001,100,19,3774,R,1.0,0.743721487,123.4632353,0,3,3
-180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3
-180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4
-180003,202004,100,19,6168,R,1.709926945,1.0,175.5441176,3,0,3
-180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3
-180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+180001,202001,100,91,9188,R,1.0,0.743721487,123.4632353,0,3,3,false,false,false,false
+180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
+180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
+180001,202004,100,91,9291,R,1.709926945,1.0,175.5441176,3,0,3,false,false,false,false
+180002,202001,100,26,3829,R,1.0,0.743721487,123.4632353,0,3,3,false,false,false,false
+180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
+180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
+180002,202004,100,26,8415,R,1.709926945,1.0,175.5441176,3,0,3,false,false,false,false
+180003,202001,100,19,3774,R,1.0,0.743721487,123.4632353,0,3,3,false,false,false,false
+180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
+180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
+180003,202004,100,19,6168,R,1.709926945,1.0,175.5441176,3,0,3,false,false,false,false
+180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
+180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
index eea926f1..7ee5953f 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-190001,202001,100,95,1.0,0.9214,50.3694,9261,R,0,0,0
-190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0
-190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0
-190001,202004,100,95,1.113,1.0,110.5473,4350,R,0,0,0
-190002,202001,100,17,1.0,0.9214,50.3694,2433,R,0,0,0
-190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0
-190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0
-190002,202004,100,17,1.113,1.0,110.5473,700,R,0,0,0
-190003,202001,100,64,1.0,0.9214,50.3694,7888,R,0,0,0
-190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0
-190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0
-190003,202004,100,64,1.113,1.0,110.5473,4077,R,0,0,0
-190004,202001,100,51,1.0,0.9214,50.3694,2247,R,0,0,0
-190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0
-190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0
-190004,202004,100,51,1.113,1.0,110.5473,8608,R,0,0,0
-190005,202001,100,34,1.0,0.9214,50.3694,6271.13538,BI,0,0,0
-190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0
-190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0
-190005,202004,100,34,1.113,1.0,110.5473,5134,R,0,0,0
-190006,202001,100,8,1.0,0.9214,50.3694,402.9552,C,0,0,0
-190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0
-190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0
-190006,202004,100,8,1.113,1.0,110.5473,370.1196299,FIC,0,0,0
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+190001,202001,100,95,1.0,0.9214,50.3694,9261,R,0,0,0,false,false,false,false
+190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false,false
+190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false,false
+190001,202004,100,95,1.113,1.0,110.5473,4350,R,0,0,0,false,false,false,false
+190002,202001,100,17,1.0,0.9214,50.3694,2433,R,0,0,0,false,false,false,false
+190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false,false
+190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false,false
+190002,202004,100,17,1.113,1.0,110.5473,700,R,0,0,0,false,false,false,false
+190003,202001,100,64,1.0,0.9214,50.3694,7888,R,0,0,0,false,false,false,false
+190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false,false
+190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false,false
+190003,202004,100,64,1.113,1.0,110.5473,4077,R,0,0,0,false,false,false,false
+190004,202001,100,51,1.0,0.9214,50.3694,2247,R,0,0,0,false,false,false,false
+190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false,false
+190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false,false
+190004,202004,100,51,1.113,1.0,110.5473,8608,R,0,0,0,false,false,false,false
+190005,202001,100,34,1.0,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false,false
+190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false,false
+190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false,false
+190005,202004,100,34,1.113,1.0,110.5473,5134,R,0,0,0,false,false,false,false
+190006,202001,100,8,1.0,0.9214,50.3694,402.9552,C,0,0,0,false,false,false,false
+190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false,false
+190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false,false
+190006,202004,100,8,1.113,1.0,110.5473,370.1196299,FIC,0,0,0,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index f72be22a..3aa08e9c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-200001,202001,100,56,7788,R,1.0,0.642092794,71.63436123,0,4,4
-200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4
-200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4
-200001,202004,100,56,1577,R,0.261802864,1.0,42.68681319,4,0,4
-200002,202001,100,75,6533,R,1.0,0.642092794,71.63436123,0,4,4
-200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4
-200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4
-200002,202004,100,75,2575,R,0.261802864,1.0,42.68681319,4,0,4
-200003,202001,100,10,56,R,1.0,0.642092794,71.63436123,0,4,4
-200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4
-200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4
-200003,202004,100,10,906,R,0.261802864,1.0,42.68681319,4,0,4
-200004,202001,100,86,1884,R,1.0,0.642092794,71.63436123,0,4,4
-200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4
-200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4
-200004,202004,100,86,1717.936456,FIR,0.261802864,1.0,42.68681319,4,0,4
-200005,202001,100,6,429.8061674,C,1.0,0.642092794,71.63436123,0,4,4
-200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4
-200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4
-200005,202004,100,6,189.2934824,FIC,0.261802864,1.0,42.68681319,4,0,4
-200006,202001,100,41,5279.856813,BI,1.0,0.642092794,71.63436123,0,4,4
-200006,202002,100,41,8222.887510,BI,1.557407294,0.925792334,111.5638767,4,3,4
-200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4
-200006,202004,100,41,2711,R,0.261802864,1.0,42.68681319,4,0,4
-200007,202001,200,4,2439,R,1.0,0.741183163,132.3214286,0,3,4
-200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5
-200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4
-200007,202004,200,4,595,R,0.208066683,1.0,99.37735849,3,0,3
-200008,202001,200,4,1849,R,1.0,0.741183163,132.3214286,0,3,4
-200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5
-200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4
-200008,202004,200,4,2727,R,0.208066683,1.0,99.37735849,3,0,3
-200009,202001,200,45,8742,R,1.0,0.741183163,132.3214286,0,3,4
-200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5
-200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4
-200009,202004,200,45,1945,R,0.208066683,1.0,99.37735849,3,0,3
-200010,202001,200,85,4809.537543,BI,1.0,0.741183163,132.3214286,0,3,4
-200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5
-200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4
-200010,202004,200,85,373.6877618,FIR,0.208066683,1.0,99.37735849,3,0,3
-200011,202001,200,79,1427.518771,BI,1.0,0.741183163,132.3214286,0,3,4
-200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5
-200011,202004,200,79,7850.811321,C,0.208066683,1.0,99.37735849,3,0,3
-200012,202001,200,87,5495,R,1.0,0.741183163,132.3214286,0,3,4
-200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5
-200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4
-200012,202004,200,87,1737.465401,FIR,0.208066683,1.0,99.37735849,3,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+200001,202001,100,56,7788,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200001,202004,100,56,1577,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200002,202001,100,75,6533,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200002,202004,100,75,2575,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200003,202001,100,10,56,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200003,202004,100,10,906,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200004,202001,100,86,1884,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200004,202004,100,86,1717.936456,FIR,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200005,202001,100,6,429.8061674,C,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200005,202004,100,6,189.2934824,FIC,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200006,202001,100,41,5279.856813,BI,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200006,202002,100,41,8222.887510,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200006,202004,100,41,2711,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200007,202001,200,4,2439,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200007,202004,200,4,595,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200008,202001,200,4,1849,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200008,202004,200,4,2727,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200009,202001,200,45,8742,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200009,202004,200,45,1945,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200010,202001,200,85,4809.537543,BI,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200010,202004,200,85,373.6877618,FIR,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200011,202001,200,79,1427.518771,BI,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200011,202004,200,79,7850.811321,C,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200012,202001,200,87,5495,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200012,202004,200,87,1737.465401,FIR,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index bacb33eb..dc7712d8 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,1.0,0.992513369,13.17948717,547,R,0,2,3
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2
-10002,202001,1,50,1.0,0.992513369,13.17948717,381,R,0,2,3
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2
-10003,202003,2,12,1.173184358,1.0,50,314,R,2,0,2
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2
-10004,202003,2,9,1.173184358,1.0,50,736,R,2,0,2
-10005,202001,1,18,1.0,0.992513369,13.17948717,100,R,0,2,3
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2
-10005,202003,2,18,1.173184358,1.0,50,900.0000004,FIC,2,0,2
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+10001,202001,1,10,1.0,0.992513369,13.17948717,547,R,0,2,3,false,false,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
+10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2,false,false,false,false
+10002,202001,1,50,1.0,0.992513369,13.17948717,381,R,0,2,3,false,false,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
+10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2,false,false,false,false
+10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2,false,false,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
+10003,202003,2,12,1.173184358,1.0,50,314,R,2,0,2,false,false,false,false
+10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2,false,false,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
+10004,202003,2,9,1.173184358,1.0,50,736,R,2,0,2,false,false,false,false
+10005,202001,1,18,1.0,0.992513369,13.17948717,100,R,0,2,3,false,false,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,false
+10005,202003,2,18,1.173184358,1.0,50,900.0000004,FIC,2,0,2,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index f32b743c..0f2d9b12 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,1.0,0.992513369,15.46666667,547,R,0,2,2
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2
-10002,202001,1,50,1.0,0.992513369,15.46666667,381,R,0,2,2
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2
-10003,202003,2,12,1.173184358,1.0,29.48717949,314,R,2,0,3
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2
-10004,202003,2,9,1.173184358,1.0,29.48717949,736,R,2,0,3
-10005,202001,1,18,1.0,0.992513369,15.46666667,278.4000001,C,0,2,2
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2
-10005,202003,2,18,1.173184358,1.0,29.48717949,100,R,2,0,3
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+10001,202001,1,10,1.0,0.992513369,15.46666667,547,R,0,2,2,false,false,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
+10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2,false,false,false,false
+10002,202001,1,50,1.0,0.992513369,15.46666667,381,R,0,2,2,false,false,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
+10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2,false,false,false,false
+10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2,false,false,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
+10003,202003,2,12,1.173184358,1.0,29.48717949,314,R,2,0,3,false,false,false,false
+10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2,false,false,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
+10004,202003,2,9,1.173184358,1.0,29.48717949,736,R,2,0,3,false,false,false,false
+10005,202001,1,18,1.0,0.992513369,15.46666667,278.4000001,C,0,2,2,false,false,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,false
+10005,202003,2,18,1.173184358,1.0,29.48717949,100,R,2,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index d220c7ec..6a8bc7a6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,1.0,0.992513369,15.46666667,547,R,0,2,2
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2
-10002,202001,1,50,1.0,0.992513369,15.46666667,381,R,0,2,2
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2
-10003,202003,2,12,1.173184358,1.0,50,314,R,2,0,2
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2
-10004,202003,2,9,1.173184358,1.0,50,736,R,2,0,2
-10005,202001,1,18,1.0,0.992513369,15.46666667,278.4000001,C,0,2,2
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2
-10005,202003,2,18,1.173184358,1.0,50,900.00000,FIC,2,0,2
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+10001,202001,1,10,1.0,0.992513369,15.46666667,547,R,0,2,2,false,false,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
+10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2,false,false,false,false
+10002,202001,1,50,1.0,0.992513369,15.46666667,381,R,0,2,2,false,false,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
+10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2,false,false,false,false
+10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2,false,false,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
+10003,202003,2,12,1.173184358,1.0,50,314,R,2,0,2,false,false,false,false
+10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2,false,false,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
+10004,202003,2,9,1.173184358,1.0,50,736,R,2,0,2,false,false,false,false
+10005,202001,1,18,1.0,0.992513369,15.46666667,278.4000001,C,0,2,2,false,false,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,false
+10005,202003,2,18,1.173184358,1.0,50,900.00000,FIC,2,0,2,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 507ccced..b6a21f75 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,1.0,0.992513369,13.17948718,547,R,0,2,3
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2
-10002,202001,1,50,1.0,0.992513369,13.17948718,381,R,0,2,3
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2
-10003,202003,2,12,1.173184358,1.0,30.76923077,314,R,2,0,3
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2
-10004,202003,2,9,1.173184358,1.0,30.76923077,736,R,2,0,3
-10005,202001,1,18,1.0,0.992513369,13.17948718,100,R,0,2,3
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2
-10005,202003,2,18,1.173184358,1.0,30.76923077,150,R,2,0,3
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+10001,202001,1,10,1.0,0.992513369,13.17948718,547,R,0,2,3,false,false,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
+10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2,false,false,false,false
+10002,202001,1,50,1.0,0.992513369,13.17948718,381,R,0,2,3,false,false,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
+10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2,false,false,false,false
+10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2,false,false,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
+10003,202003,2,12,1.173184358,1.0,30.76923077,314,R,2,0,3,false,false,false,false
+10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2,false,false,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
+10004,202003,2,9,1.173184358,1.0,30.76923077,736,R,2,0,3,false,false,false,false
+10005,202001,1,18,1.0,0.992513369,13.17948718,100,R,0,2,3,false,false,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false,false
+10005,202003,2,18,1.173184358,1.0,30.76923077,150,R,2,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 737b9858..d2e9b137 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,1.0,0.992513369,13.17948718,547,R,0,2,3
-10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2
-10002,202001,1,50,1.0,0.992513369,13.17948718,381,R,0,2,3
-10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2
-10003,202002,2,12,0.590369393,0.9341085271317829,30.8974359,267,R,2,3,3
-10003,202003,2,12,1.070539419,1.0,33.07692308,314,R,3,0,3
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2
-10004,202002,2,9,0.590369393,0.9341085271317829,30.8974359,628,R,2,3,3
-10004,202003,2,9,1.070539419,1.0,33.07692308,736,R,3,0,3
-10005,202001,1,18,1.0,0.992513369,13.17948718,100,R,0,2,3
-10005,202002,2,18,0.590369393,0.9341085271317829,30.8974359,310,R,2,3,3
-10005,202003,2,18,1.070539419,1.0,33.07692308,240,R,3,0,3
-10006,202001,1,22,1.0,0.992513369,13.17948718,289.948718,C,0,2,3
-10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2
-10006,202003,1,22,1.186096257,1.0,18.48333333,346.5012157,FIC,2,0,2
-10007,202001,2,52,1.0,1.693854749,72.19047619,3753.904762,C,0,2,2
-10007,202002,2,52,0.590369393,0.9341085271317829,30.8974359,2216.190476,FIC,2,3,3
-10007,202003,2,52,1.070539419,1.0,33.07692308,2372.519265,FIC,3,0,3
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+10001,202001,1,10,1.0,0.992513369,13.17948718,547,R,0,2,3,false,false,false,false
+10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false,false
+10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2,false,false,false,false
+10002,202001,1,50,1.0,0.992513369,13.17948718,381,R,0,2,3,false,false,false,false
+10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2,false,false,false,false
+10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2,false,false,false,false
+10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2,false,false,false,false
+10003,202002,2,12,0.590369393,0.9341085271317829,30.8974359,267,R,2,3,3,false,false,false,false
+10003,202003,2,12,1.070539419,1.0,33.07692308,314,R,3,0,3,false,false,false,false
+10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2,false,false,false,false
+10004,202002,2,9,0.590369393,0.9341085271317829,30.8974359,628,R,2,3,3,false,false,false,false
+10004,202003,2,9,1.070539419,1.0,33.07692308,736,R,3,0,3,false,false,false,false
+10005,202001,1,18,1.0,0.992513369,13.17948718,100,R,0,2,3,false,false,false,false
+10005,202002,2,18,0.590369393,0.9341085271317829,30.8974359,310,R,2,3,3,false,false,false,false
+10005,202003,2,18,1.070539419,1.0,33.07692308,240,R,3,0,3,false,false,false,false
+10006,202001,1,22,1.0,0.992513369,13.17948718,289.948718,C,0,2,3,false,false,false,false
+10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false,false
+10006,202003,1,22,1.186096257,1.0,18.48333333,346.5012157,FIC,2,0,2,false,false,false,false
+10007,202001,2,52,1.0,1.693854749,72.19047619,3753.904762,C,0,2,2,false,false,false,false
+10007,202002,2,52,0.590369393,0.9341085271317829,30.8974359,2216.190476,FIC,2,3,3,false,false,false,false
+10007,202003,2,52,1.070539419,1.0,33.07692308,2372.519265,FIC,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 4365a1cd..0178b539 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,0,3,3
-140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3
-140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3
-140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3
-140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3
-140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3
-140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,0,4
-140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,0,3,3
-140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3
-140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3
-140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3
-140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3
-140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3
-140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,0,4
-140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,0,3,3
-140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3
-140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3
-140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3
-140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3
-140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3
-140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,0,4
-140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,0,3,3
-140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3
-140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3
-140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3
-140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3
-140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,0,4
-140005,202001,100,85,150000,R,1.0,0.483330757,47.13567839,0,3,3
-140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3
-140005,202003,100,85,120000,R,0.642345545,0.658705416,62.64321608,3,3,3
-140005,202004,100,85,115000,R,1.518129312,1.494511569,95.10050251,3,3,3
-140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3
-140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3
-140005,202007,100,85,160000,R,0.536140767,1.0,91.63876651982379,3,0,4
-140006,202001,100,71,3346.6331658291456,C,1.0,0.483330757,47.13567839,0,3,3
-140006,202002,100,71,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3
-140006,202003,100,71,4447.668341708542,FIC,0.642345545,0.658705416,62.64321608,3,3,3
-140006,202004,100,71,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3
-140006,202005,100,71,4517.954773869346,FIC,0.669114927,0.500711744,63.63316583,3,3,3
-140006,202006,100,71,9023.065326633165,FIC,1.997157072,1.865181798,127.0854271,3,3,3
-140006,202007,100,71,4837.633165829145,FIC,0.536140767,1.0,91.63876651982379,3,0,4
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
+140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
+140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
+140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
+140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
+140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
+140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
+140005,202001,100,85,150000,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140005,202003,100,85,120000,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140005,202004,100,85,115000,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
+140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140005,202007,100,85,160000,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
+140006,202001,100,71,3346.6331658291456,C,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140006,202002,100,71,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140006,202003,100,71,4447.668341708542,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140006,202004,100,71,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
+140006,202005,100,71,4517.954773869346,FIC,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140006,202006,100,71,9023.065326633165,FIC,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140006,202007,100,71,4837.633165829145,FIC,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index a1838515..4aebd0b9 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-150001,202001,100,15,5891,R,1.0,0.887085601,181.0909091,0,3,3
-150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3
-150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4
-150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3
-150001,202005,100,15,2727,R,0.935831358,1.71163273,124.851190,3,3,4
-150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3
-150001,202007,100,15,9549,R,1.423548265,1.0,152.5353535,3,0,3
-150002,202001,100,5,8611,R,1.0,0.887085601,181.0909091,0,3,3
-150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3
-150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4
-150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3
-150002,202005,100,5,9967,R,0.935831358,1.71163273,124.851190,3,3,4
-150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3
-150002,202007,100,5,2593,R,1.423548265,1.0,152.5353535,3,0,3
-150003,202001,100,79,3426,R,1.0,0.887085601,181.0909091,0,3,3
-150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3
-150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4
-150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3
-150003,202005,100,79,5463,R,0.935831358,1.71163273,124.851190,3,3,4
-150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3
-150003,202007,100,79,2959,R,1.423548265,1.0,152.5353535,3,0,3
-150004,202001,100,69,5310.130499,BI,1.0,0.887085601,181.0909091,0,3,3
-150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3
-150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4
-150004,202005,100,69,2818,R,0.935831358,1.71163273,124.851190,3,3,4
-150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3
-150004,202007,100,69,2343.703144,FIR,1.423548265,1.0,152.5353535,3,0,3
-150005,202001,100,85,150000,R,1.0,0.887085601,181.0909091,0,3,3
-150005,202002,100,85,180000,R,1.127286925,1.422538185,204.1414141,3,3,3
-150005,202003,100,85,120000,R,0.702968827,0.732244099,109.6130952,3,3,4
-150005,202004,100,85,110000,R,1.365664813,1.068568596,195.979798,3,3,3
-150006,202005,100,85,105000,R,0.935831358,1.71163273,124.851190,3,3,4
-150006,202006,100,85,160000,R,0.584237484,0.702470035,107.1515152,3,3,3
-150006,202007,100,85,125000,R,1.423548265,1.0,152.5353535,3,0,3
-150007,202001,100,71,12857.454545454546,C,1.0,0.887085601,181.0909091,0,3,3
-150007,202002,100,71,14494.040404040406,FIC,1.127286925,1.422538185,204.1414141,3,3,3
-150007,202003,100,71,10188.858585858588,FIC,0.702968827,0.732244099,109.6130952,3,3,4
-150007,202004,100,71,13914.56565656566,FIC,1.365664813,1.068568596,195.979798,3,3,3
-150007,202005,100,71,13021.686868686873,FIC,0.935831358,1.71163273,124.851190,3,3,4
-150007,202006,100,71,7607.757575757578,FIC,0.584237484,0.702470035,107.1515152,3,3,3
-150007,202007,100,71,10830.010101010104,FIC,1.423548265,1.0,152.5353535,3,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+150001,202001,100,15,5891,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150001,202005,100,15,2727,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150001,202007,100,15,9549,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
+150002,202001,100,5,8611,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150002,202005,100,5,9967,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150002,202007,100,5,2593,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
+150003,202001,100,79,3426,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150003,202005,100,79,5463,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150003,202007,100,79,2959,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
+150004,202001,100,69,5310.130499,BI,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150004,202005,100,69,2818,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150004,202007,100,69,2343.703144,FIR,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
+150005,202001,100,85,150000,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150005,202002,100,85,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150005,202003,100,85,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150005,202004,100,85,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150006,202005,100,85,105000,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150006,202006,100,85,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150006,202007,100,85,125000,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
+150007,202001,100,71,12857.454545454546,C,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150007,202002,100,71,14494.040404040406,FIC,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150007,202003,100,71,10188.858585858588,FIC,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150007,202004,100,71,13914.56565656566,FIC,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150007,202005,100,71,13021.686868686873,FIC,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150007,202006,100,71,7607.757575757578,FIC,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150007,202007,100,71,10830.010101010104,FIC,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
index 55872d08..b4405a70 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-190001,202001,100,95,1.0,0.9214,50.3694,9261,R,0,0,0
-190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0
-190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0
-190001,202004,100,95,1.113,1.0,110.5473,4350,R,0,0,0
-190002,202001,100,17,1.0,0.9214,50.3694,2433,R,0,0,0
-190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0
-190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0
-190002,202004,100,17,1.113,1.0,110.5473,700,R,0,0,0
-190003,202001,100,64,1.0,0.9214,50.3694,7888,R,0,0,0
-190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0
-190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0
-190003,202004,100,64,1.113,1.0,110.5473,4077,R,0,0,0
-190004,202001,100,51,1.0,0.9214,50.3694,2247,R,0,0,0
-190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0
-190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0
-190004,202004,100,51,1.113,1.0,110.5473,8608,R,0,0,0
-190005,202001,100,34,1.0,0.9214,50.3694,6271.13538,BI,0,0,0
-190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0
-190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0
-190005,202004,100,34,1.113,1.0,110.5473,5134,R,0,0,0
-190006,202001,100,8,1.0,0.9214,50.3694,402.9552,C,0,0,0
-190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0
-190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0
-190006,202004,100,8,1.113,1.0,110.5473,370.1196299,FIC,0,0,0
-190007,202001,100,85,1.0,0.9214,50.3694,150000,R,0,0,0
-190007,202002,100,85,0.8521,1.5274,121.4187,120000,R,0,0,0
-190007,202003,100,85,0.9685,1.8795,89.3761,110000,R,0,0,0
-190007,202004,100,85,1.113,1.0,110.5473,180000,R,0,0,0
-190008,202001,100,71,1.0,0.9214,50.3694,3576.2273999999998,C,0,0,0
-190008,202002,100,71,0.8521,1.5274,121.4187,3047.3033675399997,FIC,0,0,0
-190008,202003,100,71,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0
-190008,202004,100,71,1.113,1.0,110.5473,3284.811715657751,FIC,0,0,0
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+190001,202001,100,95,1.0,0.9214,50.3694,9261,R,0,0,0,false,false,false,false
+190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false,false
+190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false,false
+190001,202004,100,95,1.113,1.0,110.5473,4350,R,0,0,0,false,false,false,false
+190002,202001,100,17,1.0,0.9214,50.3694,2433,R,0,0,0,false,false,false,false
+190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false,false
+190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false,false
+190002,202004,100,17,1.113,1.0,110.5473,700,R,0,0,0,false,false,false,false
+190003,202001,100,64,1.0,0.9214,50.3694,7888,R,0,0,0,false,false,false,false
+190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false,false
+190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false,false
+190003,202004,100,64,1.113,1.0,110.5473,4077,R,0,0,0,false,false,false,false
+190004,202001,100,51,1.0,0.9214,50.3694,2247,R,0,0,0,false,false,false,false
+190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false,false
+190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false,false
+190004,202004,100,51,1.113,1.0,110.5473,8608,R,0,0,0,false,false,false,false
+190005,202001,100,34,1.0,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false,false
+190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false,false
+190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false,false
+190005,202004,100,34,1.113,1.0,110.5473,5134,R,0,0,0,false,false,false,false
+190006,202001,100,8,1.0,0.9214,50.3694,402.9552,C,0,0,0,false,false,false,false
+190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false,false
+190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false,false
+190006,202004,100,8,1.113,1.0,110.5473,370.1196299,FIC,0,0,0,false,false,false,false
+190007,202001,100,85,1.0,0.9214,50.3694,150000,R,0,0,0,false,false,false,false
+190007,202002,100,85,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false,false
+190007,202003,100,85,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false,false
+190007,202004,100,85,1.113,1.0,110.5473,180000,R,0,0,0,false,false,false,false
+190008,202001,100,71,1.0,0.9214,50.3694,3576.2273999999998,C,0,0,0,false,false,false,false
+190008,202002,100,71,0.8521,1.5274,121.4187,3047.3033675399997,FIC,0,0,0,false,false,false,false
+190008,202003,100,71,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false,false
+190008,202004,100,71,1.113,1.0,110.5473,3284.811715657751,FIC,0,0,0,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
index c1a358f7..92de50a0 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-200001,202001,100,56,7788,R,1.0,0.642092794,71.63436123,0,4,4
-200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4
-200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4
-200001,202004,100,56,1577,R,0.261802864,1.0,42.68681319,4,0,4
-200002,202001,100,75,6533,R,1.0,0.642092794,71.63436123,0,4,4
-200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4
-200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4
-200002,202004,100,75,2575,R,0.261802864,1.0,42.68681319,4,0,4
-200003,202001,100,10,56,R,1.0,0.642092794,71.63436123,0,4,4
-200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4
-200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4
-200003,202004,100,10,906,R,0.261802864,1.0,42.68681319,4,0,4
-200004,202001,100,86,1884,R,1.0,0.642092794,71.63436123,0,4,4
-200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4
-200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4
-200004,202004,100,86,1717.936456,FIR,0.261802864,1.0,42.68681319,4,0,4
-200005,202001,100,6,429.8061674,C,1.0,0.642092794,71.63436123,0,4,4
-200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4
-200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4
-200005,202004,100,6,189.2934824,FIC,0.261802864,1.0,42.68681319,4,0,4
-200006,202001,100,41,5279.856813,BI,1.0,0.642092794,71.63436123,0,4,4
-200006,202002,100,41,8222.887510,BI,1.557407294,0.925792334,111.5638767,4,3,4
-200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4
-200006,202004,100,41,2711,R,0.261802864,1.0,42.68681319,4,0,4
-200007,202001,200,4,2439,R,1.0,0.741183163,132.3214286,0,3,4
-200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5
-200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4
-200007,202004,200,4,595,R,0.208066683,1.0,99.37735849,3,0,3
-200008,202001,200,4,1849,R,1.0,0.741183163,132.3214286,0,3,4
-200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5
-200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4
-200008,202004,200,4,2727,R,0.208066683,1.0,99.37735849,3,0,3
-200009,202001,200,45,8742,R,1.0,0.741183163,132.3214286,0,3,4
-200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5
-200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4
-200009,202004,200,45,1945,R,0.208066683,1.0,99.37735849,3,0,3
-200010,202001,200,85,4809.537543,BI,1.0,0.741183163,132.3214286,0,3,4
-200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5
-200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4
-200010,202004,200,85,373.6877618,FIR,0.208066683,1.0,99.37735849,3,0,3
-200011,202001,200,79,1427.518771,BI,1.0,0.741183163,132.3214286,0,3,4
-200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5
-200011,202004,200,79,7850.811321,C,0.208066683,1.0,99.37735849,3,0,3
-200012,202001,200,87,5495,R,1.0,0.741183163,132.3214286,0,3,4
-200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5
-200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4
-200012,202004,200,87,1737.465401,FIR,0.208066683,1.0,99.37735849,3,0,3
-200013,202001,100,85,150000,R,1.0,0.642092794,71.63436123,0,4,4
-200013,202002,100,85,180000,R,1.557407294,0.925792334,111.5638767,4,3,4
-200013,202003,100,85,120000,R,1.080155844,3.819667911,163.0494505,3,4,4
-200013,202004,100,85,105000,R,0.261802864,1.0,42.68681319,4,0,4
-200014,202001,200,85,150000,R,1.0,0.741183163,132.3214286,0,3,4
-200014,202002,200,85,180000,R,1.349194167,0.88782737,119.7926267,3,4,5
-200014,202003,200,85,120000,R,1.126345091,4.806151509,196.4492754,4,3,4
-200014,202004,200,85,105000,R,0.208066683,1.0,99.37735849,3,0,3
-200015,202001,100,71,5086.039647577092,C,1.0,0.642092794,71.63436123,0,4,4
-200015,202002,100,71,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4
-200015,202003,100,71,8555.952508724755,FIC,1.080155844,3.819667911,163.0494505,3,4,4
-200015,202004,100,71,2239.9728741460026,FIC,0.261802864,1.0,42.68681319,4,0,4
-200016,202001,200,71,9394.82142857143,C,1.0,0.741183163,132.3214286,0,3,4
-200016,202002,200,71,12675.438275,FIC,1.349194167,0.88782737,119.7926267,3,4,5
-200016,202003,200,71,14276.917680,FIC,1.126345091,4.806151509,196.4492754,4,3,4
-200016,202004,200,71,2970.550898,FIC,0.208066683,1.0,99.37735849,3,0,3
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+200001,202001,100,56,7788,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200001,202004,100,56,1577,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200002,202001,100,75,6533,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200002,202004,100,75,2575,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200003,202001,100,10,56,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200003,202004,100,10,906,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200004,202001,100,86,1884,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200004,202004,100,86,1717.936456,FIR,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200005,202001,100,6,429.8061674,C,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200005,202004,100,6,189.2934824,FIC,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200006,202001,100,41,5279.856813,BI,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200006,202002,100,41,8222.887510,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200006,202004,100,41,2711,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200007,202001,200,4,2439,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200007,202004,200,4,595,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200008,202001,200,4,1849,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200008,202004,200,4,2727,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200009,202001,200,45,8742,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200009,202004,200,45,1945,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200010,202001,200,85,4809.537543,BI,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200010,202004,200,85,373.6877618,FIR,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200011,202001,200,79,1427.518771,BI,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200011,202004,200,79,7850.811321,C,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200012,202001,200,87,5495,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200012,202004,200,87,1737.465401,FIR,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200013,202001,100,85,150000,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200013,202002,100,85,180000,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200013,202003,100,85,120000,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200013,202004,100,85,105000,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200014,202001,200,85,150000,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200014,202002,200,85,180000,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200014,202003,200,85,120000,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200014,202004,200,85,105000,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200015,202001,100,71,5086.039647577092,C,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200015,202002,100,71,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200015,202003,100,71,8555.952508724755,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200015,202004,100,71,2239.9728741460026,FIC,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
+200016,202001,200,71,9394.82142857143,C,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200016,202002,200,71,12675.438275,FIC,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200016,202003,200,71,14276.917680,FIC,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200016,202004,200,71,2970.550898,FIC,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index c000264e..932ac7fb 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction
-10001,202001,1,10,547,1,0.992513369,15.46666667,R,0,2,2
-10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,R,2,2,2
-10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,0,2
-10002,202001,1,50,381,1,0.992513369,15.46666667,R,0,2,2
-10002,202002,1,50,573,1.007543103,0.843101893,15.58333333,R,2,2,2
-10002,202003,1,50,214,1.186096257,1,18.48333333,R,2,0,2
-10003,202001,2,12,961,1,1.693854749,72.19047619,R,0,2,2
-10003,202002,2,12,267,0.590369393,0.852380952,42.61904762,R,2,2,2
-10003,202003,2,12,314,1.173184358,1,50,R,2,0,2
-10004,202001,2,9,555,1,1.693854749,72.19047619,R,0,2,2
-10004,202002,2,9,628,0.590369393,0.852380952,42.61904762,R,2,2,2
-10004,202003,2,9,736,1.173184358,1,50,R,2,0,2
-10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,0,2,2
-10005,202002,2,18,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2
-10005,202003,2,18,900.000,1.173184358,1,50,FIC,2,0,2
-10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2
-10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2
-10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2
-10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,0,2,2
-10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2
-10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2
-10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2
-10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2
-10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2
-10009,202001,2,71,5125.523810,1,1.693854749,72.19047619,C,0,2,2
-10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2
-10009,202003,2,71,3550.000000,1.173184358,1,50,FIC,2,0,2
+identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+10001,202001,1,10,547,1,0.992513369,15.46666667,R,0,2,2,false,false,false,false
+10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
+10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,0,2,false,false,false,false
+10002,202001,1,50,381,1,0.992513369,15.46666667,R,0,2,2,false,false,false,false
+10002,202002,1,50,573,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
+10002,202003,1,50,214,1.186096257,1,18.48333333,R,2,0,2,false,false,false,false
+10003,202001,2,12,961,1,1.693854749,72.19047619,R,0,2,2,false,false,false,false
+10003,202002,2,12,267,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
+10003,202003,2,12,314,1.173184358,1,50,R,2,0,2,false,false,false,false
+10004,202001,2,9,555,1,1.693854749,72.19047619,R,0,2,2,false,false,false,false
+10004,202002,2,9,628,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
+10004,202003,2,9,736,1.173184358,1,50,R,2,0,2,false,false,false,false
+10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,0,2,2,false,false,false,false
+10005,202002,2,18,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2,false,false,false,false
+10005,202003,2,18,900.000,1.173184358,1,50,FIC,2,0,2,false,false,false,false
+10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2,false,false,false,false
+10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
+10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2,false,false,false,false
+10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,0,2,2,false,false,false,false
+10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2,false,false,false,false
+10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,false,false,false
+10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2,false,false,false,false
+10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
+10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2,false,false,false,false
+10009,202001,2,71,5125.523810,1,1.693854749,72.19047619,C,0,2,2,false,false,false,false
+10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2,false,false,false,false
+10009,202003,2,71,3550.000000,1.173184358,1,50,FIC,2,0,2,false,false,false,false

From 09fa483d1b1f1220e8325a1d88918453a77dc2d7 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 3 May 2023 12:12:00 +0100
Subject: [PATCH 246/531] File renamed to give info on test. Updated test file
 for new columns

---
 ...csv => 05_R_R_FI_FI_FI_year_span_input.csv} |  0
 ...sv => 05_R_R_FI_FI_FI_year_span_output.csv} |  0
 ...csv => 05_R_R_FI_FI_FI_year_span_input.csv} |  0
 ...sv => 05_R_R_FI_FI_FI_year_span_output.csv} |  0
 tests/imputation/test_ratio_of_means.py        | 18 +++++++++++++++++-
 5 files changed, 17 insertions(+), 1 deletion(-)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{05_R_R_FI_FI_FI_input.csv => 05_R_R_FI_FI_FI_year_span_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{05_R_R_FI_FI_FI_output.csv => 05_R_R_FI_FI_FI_year_span_output.csv} (100%)
 rename tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/{05_R_R_FI_FI_FI_input.csv => 05_R_R_FI_FI_FI_year_span_input.csv} (100%)
 rename tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/{05_R_R_FI_FI_FI_output.csv => 05_R_R_FI_FI_FI_year_span_output.csv} (100%)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_input.csv
rename to tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_input.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_output.csv
rename to tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index e5116bda..020f8e3b 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -5,7 +5,7 @@
 import pytest
 from chispa.dataframe_comparer import assert_df_equality
 from pyspark.sql.functions import bround, col
-from pyspark.sql.types import DecimalType, LongType, StringType
+from pyspark.sql.types import BooleanType, DecimalType, LongType, StringType
 
 from statistical_methods_library.imputation import impute, ratio_of_means
 
@@ -23,6 +23,10 @@
 count_backward_col = "count_backward"
 count_construction_col = "count_construction"
 exclude_col = "exclude"
+default_forward_col = "default_forward"
+default_backward_col = "default_backward"
+default_construction_col = "default_construction"
+filter_marker_col = "filter_marker"
 
 decimal_type = DecimalType(15, 6)
 
@@ -40,6 +44,10 @@
 count_backward_type = LongType()
 count_construction_type = LongType()
 exclude_type = StringType()
+default_forward_type = BooleanType()
+default_backward_type = BooleanType()
+default_construction_type = BooleanType()
+filter_marker_type = BooleanType()
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -58,6 +66,10 @@
     count_backward_col,
     count_construction_col,
     exclude_col,
+    default_forward_col,
+    default_backward_col,
+    default_construction_col,
+    filter_marker_col,
 )
 
 dataframe_types = {
@@ -75,6 +87,10 @@
     count_backward_col: count_backward_type,
     count_construction_col: count_construction_type,
     exclude_col: exclude_type,
+    default_forward_col: default_forward_type,
+    default_backward_col: default_backward_type,
+    default_construction_col: default_construction_type,
+    filter_marker_col: filter_marker_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()

From 7a977def276a6f4be068e2ed55fc393741e5b65f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 3 May 2023 12:24:19 +0100
Subject: [PATCH 247/531] Fix check for forward link col to be against input df
 rather than df

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 4959b7c3..408bfccc 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -103,7 +103,7 @@ def impute(
         "target": target_col,
     }
 
-    if forward_link_col in df.columns or backward_link_col in df.columns:
+    if forward_link_col in input_df.columns or backward_link_col in input_df.columns:
         input_params.update(
             {
                 "forward": forward_link_col,

From 6b0f844cc3694748f4e7078637b4e0443ba05350 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 3 May 2023 12:30:14 +0100
Subject: [PATCH 248/531] Correct default for filter marker col

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 408bfccc..bdfc3662 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -59,7 +59,7 @@ def impute(
     default_construction_col: Optional[str] = "default_construction",
     default_forward_col: Optional[str] = "default_forward",
     default_backward_col: Optional[str] = "default_backward",
-    filter_marker_col: Optional[str] = "default_backward",
+    filter_marker_col: Optional[str] = "filter_marker",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
     periodicity: Optional[int] = 1,

From 1820d967a40c7338789d42ec4a5d92963fd2e618 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 3 May 2023 12:34:17 +0100
Subject: [PATCH 249/531] Fix + New test

---
 .../imputation/engine.py                      |  2 +-
 .../31_no_response_input_test.csv             | 31 +++++++++++++++++++
 .../31_no_response_output_test.csv            | 31 +++++++++++++++++++
 3 files changed, 63 insertions(+), 1 deletion(-)
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_input_test.csv
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index bdfc3662..270acc00 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -111,7 +111,7 @@ def impute(
             }
         )
 
-    if construction_link_col in df.columns:
+    if construction_link_col in input_df.columns:
         input_params["construction"] = construction_link_col
 
     back_expected_columns = {
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_input_test.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_input_test.csv
new file mode 100644
index 00000000..635b8e32
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_input_test.csv
@@ -0,0 +1,31 @@
+identifier,date,group,question,other
+50001,202001,100,6362,59
+50001,202002,100,8542,59
+50001,202003,100,,59
+50001,202004,100,7769,59
+50001,202005,100,4687,59
+50002,202001,100,4851,36
+50002,202002,100,8894,36
+50002,202003,100,,36
+50002,202004,100,3522,36
+50002,202005,100,2327,36
+50003,202001,100,2238,76
+50003,202002,100,769,76
+50003,202003,100,,76
+50003,202004,100,6445,76
+50003,202005,100,1521,76
+50004,202001,100,688,30
+50004,202002,100,3245,30
+50004,202003,100,,30
+50004,202004,100,,30
+50004,202005,100,,30
+50005,202001,100,150000,85
+50005,202002,100,130000,85
+50005,202003,100,,85
+50005,202004,100,120000,85
+50005,202005,100,110000,85
+50006,202001,100,,71
+50006,202002,100,,71
+50006,202003,100,,71
+50006,202004,100,,71
+50006,202005,100,,71
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv
new file mode 100644
index 00000000..ddc8a28f
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv
@@ -0,0 +1,31 @@
+identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,false,false,false,false
+50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,false,false,false
+50001,202003,100,59,8542,FIR,1,1,1,0,0,0,false,false,false,false
+50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,false,false,false,false
+50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,false,false,false
+50002,202001,100,36,4851,R,1,1.083783427,573.9125874,,5,5,false,false,false,false
+50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,false,false,false
+50002,202003,100,36,8894,FIR,1,1,1,0,0,0,false,false,false,false
+50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,false,false,false,false
+50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,false,false,false
+50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,false,false,false,false
+50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,false,false,false
+50003,202003,100,76,769,FIR,1,1,1,0,0,0,false,false,false,false
+50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,false,false,false,false
+50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,false,false,false
+50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,false,false,false,false
+50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,false,false,false
+50004,202003,100,30,3245,FIR,1,1,1,0,0,0,false,false,false,false
+50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,false,false,false,false
+50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,false,false,false
+50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,false,false,false,false
+50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,false,false,false
+50005,202003,100,85,130000,FIR,1,1,1,0,0,0,false,false,false,false
+50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,false,false,false,false
+50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,false,false,false
+50006,202001,100,71,40747.79371,C,1,1.083783427,573.9125874,0,5,5,false,false,false,false
+50006,202002,100,71,37597.72727,FIC,0.922693571,1,529.5454545,5,0,5,false,false,false,false
+50006,202003,100,71,37597.72727,FIC,1,1,1,0,0,0,false,false,false,false
+50006,202004,100,71,37597.72727,FIC,1,1.161985911,538.03125,0,4,4,false,false,false,false
+50006,202005,100,71,32356.43987,FIC,0.860595632,1,463.0273438,4,0,4,false,false,false,false

From cc9c40e4dea293ff31f6e007d798025388375486 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 3 May 2023 13:49:28 +0100
Subject: [PATCH 250/531] Fix defaulting of col names to None so that they are
 now defaulted to the actual defaults and stop using collect for the prior
 period

---
 .../imputation/engine.py                      | 41 +++++++++++--------
 1 file changed, 25 insertions(+), 16 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 270acc00..5459927b 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -50,9 +50,9 @@ def impute(
     ratio_calculator: RatioCalculator,
     output_col: Optional[str] = "imputed",
     marker_col: Optional[str] = "imputation_marker",
-    forward_link_col: Optional[str] = None,
-    backward_link_col: Optional[str] = None,
-    construction_link_col: Optional[str] = None,
+    forward_link_col: Optional[str] = "forward",
+    backward_link_col: Optional[str] = "backward",
+    construction_link_col: Optional[str] = "construction",
     count_construction_col: Optional[str] = "count_construction",
     count_forward_col: Optional[str] = "count_forward",
     count_backward_col: Optional[str] = "count_backward",
@@ -163,7 +163,7 @@ def impute(
 
     # Store the value for the period prior to the start of imputation.
     # Stored as a value to avoid a join in output creation.
-    prior_period = None
+    prior_period_df = None
 
     # --- Run ---
     def run() -> DataFrame:
@@ -204,17 +204,20 @@ def prepare_df(df: DataFrame) -> DataFrame:
             .withColumn("next_period", calculate_next_period(col("period")))
         )
 
-        nonlocal prior_period
-        # We know this will be a single value so use collect as then we
-        # can filter directly.
-        prior_period = prepared_df.selectExpr("min(previous_period)").collect()[0][0]
+        nonlocal prior_period_df
+
+        prior_period_df = prepared_df.selectExpr("min(previous_period) AS prior_period")
 
         if prepared_back_data_df:
             prepared_back_data_df = (
-                prepared_back_data_df.filter(
+                prepared_back_data_df.join(
+                    prior_period_df,
+                    [col("period") == col("prior_period")]
+                )
+                .drop("prior_period")
+                .filter(
                     (
-                        (col(period_col) == lit(prior_period))
-                        & (col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))
+                        (col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))
                     )
                 )
                 .withColumn("previous_period", calculate_previous_period(col("period")))
@@ -568,11 +571,17 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
 
     # --- Utility functions ---
     def create_output(df: DataFrame) -> DataFrame:
-        return df.filter(col("period") > lit(prior_period)).select(
-            [
-                col(k).alias(output_col_mapping[k])
-                for k in sorted(output_col_mapping.keys() & set(df.columns))
-            ]
+        return (
+            df.join(
+                prior_period_df,
+                [col("prior_period") < col("period")]
+            )
+            .select(
+                [
+                    col(k).alias(output_col_mapping[k])
+                    for k in sorted(output_col_mapping.keys() & set(df.columns))
+                ]
+            )
         )
 
     def calculate_previous_period(period: Column) -> Column:

From 92199a521cfd37dd62a687f2cc4c5ec9f997cfb7 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 3 May 2023 13:53:22 +0100
Subject: [PATCH 251/531] Always cache prior period df

---
 statistical_methods_library/imputation/engine.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 5459927b..445845fb 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -206,7 +206,10 @@ def prepare_df(df: DataFrame) -> DataFrame:
 
         nonlocal prior_period_df
 
-        prior_period_df = prepared_df.selectExpr("min(previous_period) AS prior_period")
+        prior_period_df = (
+            prepared_df.selectExpr("min(previous_period) AS prior_period")
+            .localCheckpoint(eager=True)
+        )
 
         if prepared_back_data_df:
             prepared_back_data_df = (

From a03ae058073187115609cf2b52f3f045e909c3b0 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 3 May 2023 14:01:21 +0100
Subject: [PATCH 252/531] Use a left join when creating the filter marker
 column

---
 statistical_methods_library/imputation/engine.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 445845fb..e88a9de2 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -348,6 +348,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         df = df.join(
             filtered_df.select("ref", "period", expr("NOT match AS filter_marker")),
             ["ref", "period"],
+            "left"
         ).fillna(False, "filter_marker")
 
         if weight is not None:

From 0f6163c0ab2d51648fffec01c3c17376d9550adb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 3 May 2023 15:25:46 +0100
Subject: [PATCH 253/531] Fix output mapping so filter markers only appear iff
 links are calculated

---
 statistical_methods_library/imputation/engine.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index e88a9de2..9842d452 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -93,7 +93,6 @@ def impute(
         "default_construction": default_construction_col,
         "default_forward": default_forward_col,
         "default_backward": default_backward_col,
-        "filter_marker": filter_marker_col,
         "forward": forward_link_col,
         "backward": backward_link_col,
         "construction": construction_link_col,
@@ -350,7 +349,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             ["ref", "period"],
             "left"
         ).fillna(False, "filter_marker")
-
+        output_col_mapping["filter_marker"] = filter_marker_col
         if weight is not None:
 
             def calculate_weighted_link(link_name):

From f981fa6a244a4575f7d07c8476611a27d4efbb85 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 3 May 2023 15:45:52 +0100
Subject: [PATCH 254/531] Tests Adjusted

---
 .../dev_scenarios/divide_by_zero_output.csv   | 17 ----
 .../single_contributor_input.csv              | 27 -------
 .../single_contributor_output.csv             | 27 -------
 .../methodology_scenarios/01_C_output.csv     |  8 +-
 .../methodology_scenarios/02_C_FI_output.csv  | 16 ++--
 .../03_R_R_FI_output.csv                      | 16 ++--
 .../04_R_R_FI_FI_output.csv                   | 16 ++--
 .../05_R_R_FI_FI_FI_year_span_output.csv      | 16 ++--
 .../06_BI_BI_R_output.csv                     | 16 ++--
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          | 16 ++--
 .../methodology_scenarios/08_R_R_R_output.csv | 16 ++--
 .../09_R_NS_C_output.csv                      | 16 ++--
 .../10_C_FI_NS_R_output.csv                   | 16 ++--
 .../11_R_R_FI-BI_R_R_output.csv               | 32 ++++----
 .../12_C_FI_FI_FI_FI_output.csv               | 16 ++--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          | 16 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          | 16 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          | 24 +++---
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          | 16 ++--
 .../17_NS_R_FI_NS_output.csv                  | 12 +--
 .../18_NS_BI_R_NS_output.csv                  | 12 +--
 .../19_link_columns_output.csv                | 50 ++++++------
 .../20_mixed_data_output.csv                  | 50 ++++++------
 .../21_class_change_R_C_FI_output.csv         | 20 ++---
 .../22_class_change_C_BI_R_output.csv         | 20 ++---
 .../23_class_change_C_C_FI_output.csv         | 20 ++---
 .../24_class_change_R_BI_R_output.csv         | 20 ++---
 .../25_class_change_C_FI_FI_output.csv        | 36 ++++-----
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv | 40 +++++-----
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv | 52 ++++++-------
 .../28_link_columns_filtered_output.csv       | 66 ++++++++--------
 .../29_mixed_data_filtered_output.csv         | 78 +++++++++----------
 ...30_class_change_C_C_FI_filtered_output.csv | 36 ++++-----
 .../31_no_response_output_test.csv            | 62 +++++++--------
 .../32_divide_by_zero_input.csv}              |  0
 .../32_divide_by_zero_output.csv              | 17 ++++
 tests/imputation/ratio_of_means.toml          | 22 ++++++
 tests/imputation/test_engine.py               |  4 -
 tests/imputation/test_mean_of_ratios.py       | 17 ++--
 tests/imputation/test_ratio_of_means.py       | 45 +++--------
 40 files changed, 479 insertions(+), 543 deletions(-)
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/divide_by_zero_output.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_input.csv
 delete mode 100644 tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv
 rename tests/fixture_data/imputation/ratio_of_means/{dev_scenarios/divide_by_zero_input.csv => methodology_scenarios/32_divide_by_zero_input.csv} (100%)
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
 create mode 100644 tests/imputation/ratio_of_means.toml

diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/divide_by_zero_output.csv
deleted file mode 100644
index 1044cc57..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/divide_by_zero_output.csv
+++ /dev/null
@@ -1,17 +0,0 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction
-1,202001,1,1,10,R,1,0.5,10,0,2,4
-1,202002,1,1,20,R,2,1,20,2,1,2
-1,202003,1,1,0,FIR,0,0,10,1,1,2
-1,202004,1,1,0,FIR,1,1,30,1,0,1
-2,202001,1,1,10,R,1,0.5,10,0,2,4
-2,202002,1,1,20,R,2,1,20,2,1,2
-2,202003,1,1,0,R,0,0,10,1,1,2
-2,202004,1,1,30,R,1,1,30,1,0,1
-3,202001,1,1,10,R,1,0.5,10,0,2,4
-3,202002,1,1,20,FIR,2,1,20,2,1,2
-3,202003,1,1,20,R,0,0,10,1,1,2
-3,202004,1,1,20,FIR,1,1,30,1,0,1
-4,202001,1,1,10,R,1,0.5,10,0,2,4
-4,202002,1,1,20,FIR,2,1,20,2,1,2
-4,202003,1,1,0,FIR,0,0,10,1,1,2
-4,202004,1,1,0,FIR,1,1,30,1,0,1
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_input.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_input.csv
deleted file mode 100644
index bc00e7de..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_input.csv
+++ /dev/null
@@ -1,27 +0,0 @@
-identifier,date,group,question,other
-1111,"202105","9000",1464.1,2
-1111,"202104","9000",1331,2
-1111,"202103","9000",,2
-1111,"202102","9000",1100,2
-1111,"202101","9000",1000,2
-2222,"202105","9000",2928.2,2
-2222,"202104","9000",2662,2
-2222,"202103","9000",2420,2
-2222,"202102","9000",2200,2
-2222,"202101","9000",2000,2
-3333,"202105","9000",4392.3,2
-3333,"202104","9000",3993,2
-3333,"202103","9000",3630,2
-3333,"202102","9000",3300,2
-3333,"202101","9000",3000,2
-4444,"202105","9000",,2
-4444,"202104","9000",5324,2
-4444,"202103","9000",4840,2
-4444,"202102","9000",4400,2
-4444,"202101","9000",4000,2
-5555,"202105","9000",,2
-5555,"202104","9000",,2
-5555,"202103","9000",6050,2
-5555,"202102","9000",5500,2
-5555,"202101","9000",5000,2
-1111,"202106","9000",,2
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv b/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv
deleted file mode 100644
index 73124e0c..00000000
--- a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/single_contributor_output.csv
+++ /dev/null
@@ -1,27 +0,0 @@
-identifier,date,group,other,output,marker,forward,backward,count_forward,count_backward
-1111,202101,9000,2,1000,R,1,0.9090909,0,5
-1111,202102,9000,2,1100,R,1.1,0.9090909,5,4
-1111,202103,9000,2,1210,FIR,1.1,0.9090909,4,3
-1111,202104,9000,2,1331,R,1.1,0.9090909,3,3
-1111,202105,9000,2,1464.1,R,1.1,1,3,0
-1111,202106,9000,2,1464.1,FIR,1,1,0,0
-2222,202101,9000,2,2000,R,1,0.9090909,0,5
-2222,202102,9000,2,2200,R,1.1,0.9090909,5,4
-2222,202103,9000,2,2420,R,1.1,0.9090909,4,3
-2222,202104,9000,2,2662,R,1.1,0.9090909,3,3
-2222,202105,9000,2,2928.2,R,1.1,1,3,0
-3333,202101,9000,2,3000,R,1,0.9090909,0,5
-3333,202102,9000,2,3300,R,1.1,0.9090909,5,4
-3333,202103,9000,2,3630,R,1.1,0.9090909,4,3
-3333,202104,9000,2,3993,R,1.1,0.9090909,3,3
-3333,202105,9000,2,4392.3,R,1.1,1,3,0
-4444,202101,9000,2,4000,R,1,0.9090909,0,5
-4444,202102,9000,2,4400,R,1.1,0.9090909,5,4
-4444,202103,9000,2,4840,R,1.1,0.9090909,4,3
-4444,202104,9000,2,5324,R,1.1,0.9090909,3,3
-4444,202105,9000,2,5856.4,FIR,1.1,1,3,0
-5555,202101,9000,2,5000,R,1,0.9090909,0,5
-5555,202102,9000,2,5500,R,1.1,0.9090909,5,4
-5555,202103,9000,2,6050,R,1.1,0.9090909,4,3
-5555,202104,9000,2,6655,FIR,1.1,0.9090909,3,3
-5555,202105,9000,2,7320.5,FIR,1.1,1,3,0
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index 789a35b3..e30687e3 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,false,false,false,false
-10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,false,false,false,false
-10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,false,false,false,false
-10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,false,false,false,false
+10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false,false
+10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false,false
+10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false,false
+10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,true,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index 697fddf2..81f467c2 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,filter_marker
-20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,false,false,false,false
-20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,false,false,false
-20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,false,false,false,false
-20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,false,false,false
-20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,false,false,false,false
-20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,false,false,false
-20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,false,false,false,false
-20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,false,false,false
+20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false,false
+20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false,false
+20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false,false
+20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,true,false,false
+20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,true,false,false,false
+20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,true,false,false
+20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,true,false,false,false
+20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index e098b624..351065ab 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,filter_marker
-30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,false,false,false,false
+30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false,false
 30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
-30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,false,false,false
-30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4,false,false,false,false
+30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false,false
+30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4,true,false,false,false
 30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
-30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3,false,false,false,false
-30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4,false,false,false,false
+30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3,false,true,false,false
+30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4,true,false,false,false
 30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
-30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,false,false,false
-30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,false,false,false,false
+30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,true,false,false
+30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,true,false,false,false
 30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
-30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,false,false,false
+30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index 4e0583c5..4b8846db 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-40001,202001,100,35,9491,R,1.0,1.060305409,128.0208333,0,4,4,false,false,false,false
+40001,202001,100,35,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false,false
 40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
 40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
-40001,202004,100,35,4911,R,0.637121844,1.0,73.71052632,3,0,3,false,false,false,false
-40002,202001,100,63,2095,R,1.0,1.060305409,128.0208333,0,4,4,false,false,false,false
+40001,202004,100,35,4911,R,0.637121844,1,73.71052632,3,0,3,false,true,false,false
+40002,202001,100,63,2095,R,1,1.060305409,128.0208333,0,4,4,true,false,false,false
 40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
 40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
-40002,202004,100,63,2115,R,0.637121844,1.0,73.71052632,3,0,3,false,false,false,false
-40003,202001,100,16,7863,R,1.0,1.060305409,128.0208333,0,4,4,false,false,false,false
+40002,202004,100,63,2115,R,0.637121844,1,73.71052632,3,0,3,false,true,false,false
+40003,202001,100,16,7863,R,1,1.060305409,128.0208333,0,4,4,true,false,false,false
 40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
 40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
-40003,202004,100,16,1377,R,0.637121844,1.0,73.71052632,3,0,3,false,false,false,false
-40004,202001,100,78,5131,R,1.0,1.060305409,128.0208333,0,4,4,false,false,false,false
+40003,202004,100,16,1377,R,0.637121844,1,73.71052632,3,0,3,false,true,false,false
+40004,202001,100,78,5131,R,1,1.060305409,128.0208333,0,4,4,true,false,false,false
 40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
 40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
-40004,202004,100,78,6193.009741,FIR,0.637121844,1.0,73.71052632,3,0,3,false,false,false,false
+40004,202004,100,78,6193.009741,FIR,0.637121844,1,73.71052632,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index deab3b07..14dba724 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-50001,202010,100,59,6362,R,1.0,0.659160839,70.34328358,0,4,4,false,false,false,false
+50001,202010,100,59,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false,false
 50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
 50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
 50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
-50001,202102,100,59,4687,R,0.481224628,1.0,49.9122807,3,0,3,false,false,false,false
-50002,202010,100,36,4851,R,1.0,0.659160839,70.34328358,0,4,4,false,false,false,false
+50001,202102,100,59,4687,R,0.481224628,1,49.9122807,3,0,3,false,true,false,false
+50002,202010,100,36,4851,R,1,0.659160839,70.34328358,0,4,4,true,false,false,false
 50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
 50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
 50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
-50002,202102,100,36,2327,R,0.481224628,1.0,49.9122807,3,0,3,false,false,false,false
-50003,202010,100,76,2238,R,1.0,0.659160839,70.34328358,0,4,4,false,false,false,false
+50002,202102,100,36,2327,R,0.481224628,1,49.9122807,3,0,3,false,true,false,false
+50003,202010,100,76,2238,R,1,0.659160839,70.34328358,0,4,4,true,false,false,false
 50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
 50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
 50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
-50003,202102,100,76,1521,R,0.481224628,1.0,49.9122807,3,0,3,false,false,false,false
-50004,202010,100,30,688,R,1.0,0.659160839,70.34328358,0,4,4,false,false,false,false
+50003,202102,100,76,1521,R,0.481224628,1,49.9122807,3,0,3,false,true,false,false
+50004,202010,100,30,688,R,1,0.659160839,70.34328358,0,4,4,true,false,false,false
 50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
 50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
 50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
-50004,202102,100,30,1521.344411,FIR,0.481224628,1.0,49.9122807,3,0,3,false,false,false,false
+50004,202102,100,30,1521.344411,FIR,0.481224628,1,49.9122807,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index 71d759ce..53ba6211 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-60001,202001,100,15,5077,R,1.0,1.408039237,117.9107143,0,3,3,false,false,false,false
+60001,202001,100,15,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false,false
 60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
-60001,202003,100,15,1046,R,1.194583644,1.0,100.913043,3,0,4,false,false,false,false
-60002,202001,100,71,1588,R,1.0,1.408039237,117.9107143,0,3,3,false,false,false,false
+60001,202003,100,15,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
+60002,202001,100,71,1588,R,1,1.408039237,117.9107143,0,3,3,true,false,false,false
 60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
-60002,202003,100,71,3807,R,1.194583644,1.0,100.913043,3,0,4,false,false,false,false
-60003,202001,100,26,6541,R,1.0,1.408039237,117.9107143,0,3,3,false,false,false,false
+60002,202003,100,71,3807,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
+60003,202001,100,26,6541,R,1,1.408039237,117.9107143,0,3,3,true,false,false,false
 60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
-60003,202003,100,26,6351,R,1.194583644,1.0,100.913043,3,0,4,false,false,false,false
-60004,202001,100,3,472.653159,BI,1.0,1.408039237,117.9107143,0,3,3,false,false,false,false
+60003,202003,100,26,6351,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
+60004,202001,100,3,472.653159,BI,1,1.408039237,117.9107143,0,3,3,true,false,false,false
 60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
-60004,202003,100,3,401,R,1.194583644,1.0,100.913043,3,0,4,false,false,false,false
+60004,202003,100,3,401,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 4bb1d7d7..7a4b6299 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-70001,202001,100,39,5951,R,1.0,1.964796824,107.48,0,3,3,false,false,false,false
+70001,202001,100,39,5951,R,1,1.964796824,107.48,0,3,3,true,false,false,false
 70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
 70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
 70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
 70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
 70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
-70001,202007,100,39,49,R,0.913631634,1.0,70.24,3,0,3,false,false,false,false
-70002,202001,100,94,6705,R,1.0,1.964796824,107.48,0,3,3,false,false,false,false
+70001,202007,100,39,49,R,0.913631634,1,70.24,3,0,3,false,true,false,false
+70002,202001,100,94,6705,R,1,1.964796824,107.48,0,3,3,true,false,false,false
 70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
 70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
 70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
 70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
 70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
-70002,202007,100,94,3475,R,0.913631634,1.0,70.24,3,0,3,false,false,false,false
-70003,202001,100,42,6153,R,1.0,1.964796824,107.48,0,3,3,false,false,false,false
+70002,202007,100,94,3475,R,0.913631634,1,70.24,3,0,3,false,true,false,false
+70003,202001,100,42,6153,R,1,1.964796824,107.48,0,3,3,true,false,false,false
 70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
 70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
 70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
 70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
 70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
-70003,202007,100,42,8768,R,0.913631634,1.0,70.24,3,0,3,false,false,false,false
-70004,202001,100,6,10286.222995,BI,1.0,1.964796824,107.48,0,3,3,false,false,false,false
+70003,202007,100,42,8768,R,0.913631634,1,70.24,3,0,3,false,true,false,false
+70004,202001,100,6,10286.222995,BI,1,1.964796824,107.48,0,3,3,true,false,false,false
 70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
 70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
 70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
 70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
 70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
-70004,202007,100,6,5367.585848,FIR,0.913631634,1.0,70.24,3,0,3,false,false,false,false
+70004,202007,100,6,5367.585848,FIR,0.913631634,1,70.24,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
index 3cc84487..d90f7165 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-80001,202001,100,91,4042,R,1.0,1.646151294,69.14982578,0,4,4,false,false,false,false
+80001,202001,100,91,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false,false
 80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
-80001,202003,100,91,644,R,1.711844725,1.0,71.90940767,4,0,4,false,false,false,false
-80002,202001,100,85,7138,R,1.0,1.646151294,69.14982578,0,4,4,false,false,false,false
+80001,202003,100,91,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false,false
+80002,202001,100,85,7138,R,1,1.646151294,69.14982578,0,4,4,true,false,false,false
 80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
-80002,202003,100,85,2746,R,1.711844725,1.0,71.90940767,4,0,4,false,false,false,false
-80003,202001,100,41,2846,R,1.0,1.646151294,69.14982578,0,4,4,false,false,false,false
+80002,202003,100,85,2746,R,1.711844725,1,71.90940767,4,0,4,false,true,false,false
+80003,202001,100,41,2846,R,1,1.646151294,69.14982578,0,4,4,true,false,false,false
 80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
-80003,202003,100,41,9015,R,1.711844725,1.0,71.90940767,4,0,4,false,false,false,false
-80004,202001,100,70,5820,R,1.0,1.646151294,69.14982578,0,4,4,false,false,false,false
+80003,202003,100,41,9015,R,1.711844725,1,71.90940767,4,0,4,false,true,false,false
+80004,202001,100,70,5820,R,1,1.646151294,69.14982578,0,4,4,true,false,false,false
 80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
-80004,202003,100,70,8233,R,1.711844725,1.0,71.90940767,4,0,4,false,false,false,false
+80004,202003,100,70,8233,R,1.711844725,1,71.90940767,4,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index bc9b5520..950cff9e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-90001,202001,100,66,2417,R,1.0,0.294381131,71.77777778,0,3,4,false,false,false,false
+90001,202001,100,66,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false,false
 90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
-90001,202003,100,66,7319,R,1.027612406,1.0,169.3831776,3,0,3,false,false,false,false
-90002,202001,100,27,1706,R,1.0,0.294381131,71.77777778,0,3,4,false,false,false,false
+90001,202003,100,66,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false,false
+90002,202001,100,27,1706,R,1,0.294381131,71.77777778,0,3,4,true,false,false,false
 90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
-90002,202003,100,27,8390,R,1.027612406,1.0,169.3831776,3,0,3,false,false,false,false
-90003,202001,100,14,1069,R,1.0,0.294381131,71.77777778,0,3,4,false,false,false,false
+90002,202003,100,27,8390,R,1.027612406,1,169.3831776,3,0,3,false,true,false,false
+90003,202001,100,14,1069,R,1,0.294381131,71.77777778,0,3,4,true,false,false,false
 90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
-90003,202003,100,14,2415,R,1.027612406,1.0,169.3831776,3,0,3,false,false,false,false
-90004,202001,100,73,7728,R,1.0,0.294381131,71.77777778,0,3,4,false,false,false,false
-90004,202003,100,73,12364.971963,C,1.027612406,1.0,169.3831776,3,0,3,false,false,false,false
+90003,202003,100,14,2415,R,1.027612406,1,169.3831776,3,0,3,false,true,false,false
+90004,202001,100,73,7728,R,1,0.294381131,71.77777778,0,3,4,true,false,false,false
+90004,202003,100,73,12364.971963,C,1.027612406,1,169.3831776,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index 2d8e13e9..0c79d3d4 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-100001,202001,100,26,3074,R,1.0,1.046156805,179.3296703,0,3,3,false,false,false,false
+100001,202001,100,26,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false,false
 100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
 100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
-100001,202004,100,26,3540,R,3.027849407,1.0,119.1751412,3,0,4,false,false,false,false
-100002,202001,100,19,8084,R,1.0,1.046156805,179.3296703,0,3,3,false,false,false,false
+100001,202004,100,26,3540,R,3.027849407,1,119.1751412,3,0,4,false,true,false,false
+100002,202001,100,19,8084,R,1,1.046156805,179.3296703,0,3,3,true,false,false,false
 100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
 100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
-100002,202004,100,19,5608,R,3.027849407,1.0,119.1751412,3,0,4,false,false,false,false
-100003,202001,100,46,5161,R,1.0,1.046156805,179.3296703,0,3,3,false,false,false,false
+100002,202004,100,19,5608,R,3.027849407,1,119.1751412,3,0,4,false,true,false,false
+100003,202001,100,46,5161,R,1,1.046156805,179.3296703,0,3,3,true,false,false,false
 100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
 100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
-100003,202004,100,46,2594,R,3.027849407,1.0,119.1751412,3,0,4,false,false,false,false
-100004,202001,100,86,15422.351648,C,1.0,1.046156805,179.3296703,0,3,3,false,false,false,false
+100003,202004,100,46,2594,R,3.027849407,1,119.1751412,3,0,4,false,true,false,false
+100004,202001,100,86,15422.351648,C,1,1.046156805,179.3296703,0,3,3,true,false,false,false
 100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
-100004,202004,100,86,9352,R,3.027849407,1.0,119.1751412,3,0,4,false,false,false,false
+100004,202004,100,86,9352,R,3.027849407,1,119.1751412,3,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index a4934228..e5bfc0ca 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-110001,202001,100,89,9244,R,1.0,1.357646062,101.710317,0,4,4,false,false,false,false
+110001,202001,100,89,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false,false
 110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
-110001,202003,100,89,6194,R,0.780928323,1.0,70.26136364,3,0,3,false,false,false,false
-110002,202001,100,83,4826,R,1.0,1.357646062,101.710317,0,4,4,false,false,false,false
+110001,202003,100,89,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false,false
+110002,202001,100,83,4826,R,1,1.357646062,101.710317,0,4,4,true,false,false,false
 110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
-110002,202003,100,83,4743,R,0.780928323,1.0,70.26136364,3,0,3,false,false,false,false
-110003,202001,100,4,7586,R,1.0,1.357646062,101.710317,0,4,4,false,false,false,false
+110002,202003,100,83,4743,R,0.780928323,1,70.26136364,3,0,3,false,true,false,false
+110003,202001,100,4,7586,R,1,1.357646062,101.710317,0,4,4,true,false,false,false
 110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
-110003,202003,100,4,1429,R,0.780928323,1.0,70.26136364,3,0,3,false,false,false,false
-110004,202001,100,76,3975,R,1.0,1.357646062,101.710317,0,4,4,false,false,false,false
+110003,202003,100,4,1429,R,0.780928323,1,70.26136364,3,0,3,false,true,false,false
+110004,202001,100,76,3975,R,1,1.357646062,101.710317,0,4,4,true,false,false,false
 110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
-110004,202003,100,76,2377.145816,FIR,0.780928323,1.0,70.26136364,3,0,3,false,false,false,false
-110005,202001,200,27,5217,R,1.0,1.016800862,182.25,0,3,3,false,false,false,false
+110004,202003,100,76,2377.145816,FIR,0.780928323,1,70.26136364,3,0,3,false,true,false,false
+110005,202001,200,27,5217,R,1,1.016800862,182.25,0,3,3,true,false,false,false
 110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
-110005,202003,200,27,9940,R,1.212689221,1.0,182.2366412,4,0,4,false,false,false,false
-110006,202001,200,42,5325,R,1.0,1.016800862,182.25,0,3,3,false,false,false,false
+110005,202003,200,27,9940,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
+110006,202001,200,42,5325,R,1,1.016800862,182.25,0,3,3,true,false,false,false
 110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
-110006,202003,200,42,6685,R,1.212689221,1.0,182.2366412,4,0,4,false,false,false,false
-110007,202001,200,19,5496,R,1.0,1.016800862,182.25,0,3,3,false,false,false,false
+110006,202003,200,42,6685,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
+110007,202001,200,19,5496,R,1,1.016800862,182.25,0,3,3,true,false,false,false
 110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
-110007,202003,200,19,1235,R,1.212689221,1.0,182.2366412,4,0,4,false,false,false,false
-110008,202001,200,43,3978.741774,BI,1.0,1.016800862,182.25,0,3,3,false,false,false,false
+110007,202003,200,19,1235,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
+110008,202001,200,43,3978.741774,BI,1,1.016800862,182.25,0,3,3,true,false,false,false
 110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
-110008,202003,200,43,6013,R,1.212689221,1.0,182.2366412,4,0,4,false,false,false,false
+110008,202003,200,43,6013,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 3e7be691..1dfb64d4 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-120001,202001,100,50,5240,R,1.0,1.268552019,77.38738739,0,3,3,false,false,false,false
+120001,202001,100,50,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false,false
 120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
 120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
 120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
-120001,202005,100,50,1316,R,0.53449544,1.0,32.73423423,3,0,3,false,false,false,false
-120002,202001,100,78,7410,R,1.0,1.268552019,77.38738739,0,3,3,false,false,false,false
+120001,202005,100,50,1316,R,0.53449544,1,32.73423423,3,0,3,false,true,false,false
+120002,202001,100,78,7410,R,1,1.268552019,77.38738739,0,3,3,true,false,false,false
 120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
 120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
 120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
-120002,202005,100,78,1535,R,0.53449544,1.0,32.73423423,3,0,3,false,false,false,false
-120003,202001,100,94,4530,R,1.0,1.268552019,77.38738739,0,3,3,false,false,false,false
+120002,202005,100,78,1535,R,0.53449544,1,32.73423423,3,0,3,false,true,false,false
+120003,202001,100,94,4530,R,1,1.268552019,77.38738739,0,3,3,true,false,false,false
 120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
 120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
 120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
-120003,202005,100,94,4416,R,0.53449544,1.0,32.73423423,3,0,3,false,false,false,false
-120004,202001,100,100,7738.738739,C,1.0,1.268552019,77.38738739,0,3,3,false,false,false,false
+120003,202005,100,94,4416,R,0.53449544,1,32.73423423,3,0,3,false,true,false,false
+120004,202001,100,100,7738.738739,C,1,1.268552019,77.38738739,0,3,3,true,false,false,false
 120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
 120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
 120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
-120004,202005,100,100,3273.423424,FIC,0.53449544,1.0,32.73423423,3,0,3,false,false,false,false
+120004,202005,100,100,3273.423424,FIC,0.53449544,1,32.73423423,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index a27585ab..de5348e8 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-130001,202001,100,20,6583,R,1.0,0.6743401,102.7515152,0,3,4,false,false,false,false
+130001,202001,100,20,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false,false
 130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
 130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
 130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,false
 130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
 130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
-130001,202007,100,20,3282,R,0.798832987,1.0,158.7757576,3,0,4,false,false,false,false
-130002,202001,100,69,687,R,1.0,0.6743401,102.7515152,0,3,4,false,false,false,false
+130001,202007,100,20,3282,R,0.798832987,1,158.7757576,3,0,4,false,true,false,false
+130002,202001,100,69,687,R,1,0.6743401,102.7515152,0,3,4,true,false,false,false
 130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
 130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
 130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,false
 130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
 130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
-130002,202007,100,69,9834,R,0.798832987,1.0,158.7757576,3,0,4,false,false,false,false
-130003,202001,100,39,7113,R,1.0,0.6743401,102.7515152,0,3,4,false,false,false,false
+130002,202007,100,69,9834,R,0.798832987,1,158.7757576,3,0,4,false,true,false,false
+130003,202001,100,39,7113,R,1,0.6743401,102.7515152,0,3,4,true,false,false,false
 130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
 130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
 130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,false
 130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
 130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
-130003,202007,100,39,6461,R,0.798832987,1.0,158.7757576,3,0,4,false,false,false,false
-130004,202001,100,37,2571,R,1.0,0.6743401,102.7515152,0,3,4,false,false,false,false
+130003,202007,100,39,6461,R,0.798832987,1,158.7757576,3,0,4,false,true,false,false
+130004,202001,100,37,2571,R,1,0.6743401,102.7515152,0,3,4,true,false,false,false
 130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
 130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
 130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
 130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
-130004,202007,100,37,6621,R,0.798832987,1.0,158.7757576,3,0,4,false,false,false,false
+130004,202007,100,37,6621,R,0.798832987,1,158.7757576,3,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 26ad73a1..28297804 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
 140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
 140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
 140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
 140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
-140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
 140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
 140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
 140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
 140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
-140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
 140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
 140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
 140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
 140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
-140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
 140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
 140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
 140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
+140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 9c6e76f0..7c129c9f 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-150001,202001,100,15,5891,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
 150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
 150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
 150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150001,202005,100,15,2727,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
 150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150001,202007,100,15,9549,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
-150002,202001,100,5,8611,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
 150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
 150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
 150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150002,202005,100,5,9967,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
 150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150002,202007,100,5,2593,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
-150003,202001,100,79,3426,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
 150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
 150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
 150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150003,202005,100,79,5463,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
 150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150003,202007,100,79,2959,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
-150004,202001,100,69,5310.130499,BI,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,false
 150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
 150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150004,202005,100,69,2818,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
 150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150004,202007,100,69,2343.703144,FIR,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
+150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index dbbe814b..12667e3c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-160001,202001,100,76,2086,R,1.0,0.285048351,29.78238342,0,3,3,false,false,false,false
+160001,202001,100,76,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false,false
 160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
 160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
 160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,false
 160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
 160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
-160001,202007,100,76,1666,R,0.819547983,1.0,71.77202073,3,0,3,false,false,false,false
-160002,202001,100,32,430,R,1.0,0.285048351,29.78238342,0,3,3,false,false,false,false
+160001,202007,100,76,1666,R,0.819547983,1,71.77202073,3,0,3,false,true,false,false
+160002,202001,100,32,430,R,1,0.285048351,29.78238342,0,3,3,true,false,false,false
 160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
 160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
 160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,false
 160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
 160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
-160002,202007,100,32,2678,R,0.819547983,1.0,71.77202073,3,0,3,false,false,false,false
-160003,202001,100,85,3232,R,1.0,0.285048351,29.78238342,0,3,3,false,false,false,false
+160002,202007,100,32,2678,R,0.819547983,1,71.77202073,3,0,3,false,true,false,false
+160003,202001,100,85,3232,R,1,0.285048351,29.78238342,0,3,3,true,false,false,false
 160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
 160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
 160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,false
 160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
 160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
-160003,202007,100,85,9508,R,0.819547983,1.0,71.77202073,3,0,3,false,false,false,false
-160004,202001,100,33,1022.611409,BI,1.0,0.285048351,29.78238342,0,3,3,false,false,false,false
+160003,202007,100,85,9508,R,0.819547983,1,71.77202073,3,0,3,false,true,false,false
+160004,202001,100,33,1022.611409,BI,1,0.285048351,29.78238342,0,3,3,true,false,false,false
 160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
 160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
 160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
 160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
-160004,202007,100,33,2368.476683,FIC,0.819547983,1.0,71.77202073,3,0,3,false,false,false,false
+160004,202007,100,33,2368.476683,FIC,0.819547983,1,71.77202073,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 5e171507..099f5015 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-170001,202001,100,69,6480,R,1.0,0.41470355,41.93396226,0,3,3,false,false,false,false
+170001,202001,100,69,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false,false
 170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
 170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
-170001,202004,100,69,7120,R,1.231814548,1.0,109.0330189,3,0,3,false,false,false,false
-170002,202001,100,62,449,R,1.0,0.41470355,41.93396226,0,3,3,false,false,false,false
+170001,202004,100,69,7120,R,1.231814548,1,109.0330189,3,0,3,false,true,false,false
+170002,202001,100,62,449,R,1,0.41470355,41.93396226,0,3,3,true,false,false,false
 170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
 170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
-170002,202004,100,62,6745,R,1.231814548,1.0,109.0330189,3,0,3,false,false,false,false
-170003,202001,100,81,1961,R,1.0,0.41470355,41.93396226,0,3,3,false,false,false,false
+170002,202004,100,62,6745,R,1.231814548,1,109.0330189,3,0,3,false,true,false,false
+170003,202001,100,81,1961,R,1,0.41470355,41.93396226,0,3,3,true,false,false,false
 170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
 170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
-170003,202004,100,81,9250,R,1.231814548,1.0,109.0330189,3,0,3,false,false,false,false
+170003,202004,100,81,9250,R,1.231814548,1,109.0330189,3,0,3,false,true,false,false
 170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
 170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 72c4d3da..329c4ae9 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-180001,202001,100,91,9188,R,1.0,0.743721487,123.4632353,0,3,3,false,false,false,false
+180001,202001,100,91,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false,false
 180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
 180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
-180001,202004,100,91,9291,R,1.709926945,1.0,175.5441176,3,0,3,false,false,false,false
-180002,202001,100,26,3829,R,1.0,0.743721487,123.4632353,0,3,3,false,false,false,false
+180001,202004,100,91,9291,R,1.709926945,1,175.5441176,3,0,3,false,true,false,false
+180002,202001,100,26,3829,R,1,0.743721487,123.4632353,0,3,3,true,false,false,false
 180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
 180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
-180002,202004,100,26,8415,R,1.709926945,1.0,175.5441176,3,0,3,false,false,false,false
-180003,202001,100,19,3774,R,1.0,0.743721487,123.4632353,0,3,3,false,false,false,false
+180002,202004,100,26,8415,R,1.709926945,1,175.5441176,3,0,3,false,true,false,false
+180003,202001,100,19,3774,R,1,0.743721487,123.4632353,0,3,3,true,false,false,false
 180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
 180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
-180003,202004,100,19,6168,R,1.709926945,1.0,175.5441176,3,0,3,false,false,false,false
+180003,202004,100,19,6168,R,1.709926945,1,175.5441176,3,0,3,false,true,false,false
 180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
 180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
index 7ee5953f..22bf9d67 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-190001,202001,100,95,1.0,0.9214,50.3694,9261,R,0,0,0,false,false,false,false
-190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false,false
-190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false,false
-190001,202004,100,95,1.113,1.0,110.5473,4350,R,0,0,0,false,false,false,false
-190002,202001,100,17,1.0,0.9214,50.3694,2433,R,0,0,0,false,false,false,false
-190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false,false
-190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false,false
-190002,202004,100,17,1.113,1.0,110.5473,700,R,0,0,0,false,false,false,false
-190003,202001,100,64,1.0,0.9214,50.3694,7888,R,0,0,0,false,false,false,false
-190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false,false
-190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false,false
-190003,202004,100,64,1.113,1.0,110.5473,4077,R,0,0,0,false,false,false,false
-190004,202001,100,51,1.0,0.9214,50.3694,2247,R,0,0,0,false,false,false,false
-190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false,false
-190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false,false
-190004,202004,100,51,1.113,1.0,110.5473,8608,R,0,0,0,false,false,false,false
-190005,202001,100,34,1.0,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false,false
-190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false,false
-190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false,false
-190005,202004,100,34,1.113,1.0,110.5473,5134,R,0,0,0,false,false,false,false
-190006,202001,100,8,1.0,0.9214,50.3694,402.9552,C,0,0,0,false,false,false,false
-190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false,false
-190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false,false
-190006,202004,100,8,1.113,1.0,110.5473,370.1196299,FIC,0,0,0,false,false,false,false
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
+190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
+190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
+190001,202004,100,95,1.113,1,110.5473,4350,R,0,0,0,false,true,false
+190002,202001,100,17,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
+190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
+190002,202004,100,17,1.113,1,110.5473,700,R,0,0,0,false,true,false
+190003,202001,100,64,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
+190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
+190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
+190003,202004,100,64,1.113,1,110.5473,4077,R,0,0,0,false,true,false
+190004,202001,100,51,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
+190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
+190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
+190004,202004,100,51,1.113,1,110.5473,8608,R,0,0,0,false,true,false
+190005,202001,100,34,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
+190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
+190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
+190005,202004,100,34,1.113,1,110.5473,5134,R,0,0,0,false,true,false
+190006,202001,100,8,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
+190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
+190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
+190006,202004,100,8,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index 3aa08e9c..4867a98c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-200001,202001,100,56,7788,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200001,202004,100,56,1577,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200002,202001,100,75,6533,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200002,202004,100,75,2575,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200003,202001,100,10,56,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200003,202004,100,10,906,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200004,202001,100,86,1884,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200004,202004,100,86,1717.936456,FIR,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200005,202001,100,6,429.8061674,C,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200005,202004,100,6,189.2934824,FIC,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200006,202001,100,41,5279.856813,BI,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
-200006,202002,100,41,8222.887510,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,false
+200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200006,202004,100,41,2711,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200007,202001,200,4,2439,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200007,202004,200,4,595,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200008,202001,200,4,1849,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200008,202004,200,4,2727,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200009,202001,200,45,8742,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200009,202004,200,45,1945,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200010,202001,200,85,4809.537543,BI,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200010,202004,200,85,373.6877618,FIR,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200011,202001,200,79,1427.518771,BI,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200011,202004,200,79,7850.811321,C,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200012,202001,200,87,5495,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200012,202004,200,87,1737.465401,FIR,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index dc7712d8..c5705a83 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-10001,202001,1,10,1.0,0.992513369,13.17948717,547,R,0,2,3,false,false,false,false
+10001,202001,1,10,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false,false
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2,false,false,false,false
-10002,202001,1,50,1.0,0.992513369,13.17948717,381,R,0,2,3,false,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
+10002,202001,1,50,1,0.992513369,13.17948717,381,R,0,2,3,true,false,false,false
 10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2,false,false,false,false
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2,false,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,false
 10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
-10003,202003,2,12,1.173184358,1.0,50,314,R,2,0,2,false,false,false,false
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2,false,false,false,false
+10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
-10004,202003,2,9,1.173184358,1.0,50,736,R,2,0,2,false,false,false,false
-10005,202001,1,18,1.0,0.992513369,13.17948717,100,R,0,2,3,false,false,false,false
+10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false,false
+10005,202001,1,18,1,0.992513369,13.17948717,100,R,0,2,3,true,false,false,false
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,false
-10005,202003,2,18,1.173184358,1.0,50,900.0000004,FIC,2,0,2,false,false,false,false
+10005,202003,2,18,1.173184358,1,50,900.0000004,FIC,2,0,2,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 0f2d9b12..09e17cee 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-10001,202001,1,10,1.0,0.992513369,15.46666667,547,R,0,2,2,false,false,false,false
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,false
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2,false,false,false,false
-10002,202001,1,50,1.0,0.992513369,15.46666667,381,R,0,2,2,false,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,false
 10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2,false,false,false,false
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2,false,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,false
 10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
-10003,202003,2,12,1.173184358,1.0,29.48717949,314,R,2,0,3,false,false,false,false
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2,false,false,false,false
+10003,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
-10004,202003,2,9,1.173184358,1.0,29.48717949,736,R,2,0,3,false,false,false,false
-10005,202001,1,18,1.0,0.992513369,15.46666667,278.4000001,C,0,2,2,false,false,false,false
+10004,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false,false
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,false
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,false
-10005,202003,2,18,1.173184358,1.0,29.48717949,100,R,2,0,3,false,false,false,false
+10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 6a8bc7a6..9534ab3a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-10001,202001,1,10,1.0,0.992513369,15.46666667,547,R,0,2,2,false,false,false,false
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,false
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2,false,false,false,false
-10002,202001,1,50,1.0,0.992513369,15.46666667,381,R,0,2,2,false,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,false
 10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2,false,false,false,false
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2,false,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,false
 10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
-10003,202003,2,12,1.173184358,1.0,50,314,R,2,0,2,false,false,false,false
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2,false,false,false,false
+10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
-10004,202003,2,9,1.173184358,1.0,50,736,R,2,0,2,false,false,false,false
-10005,202001,1,18,1.0,0.992513369,15.46666667,278.4000001,C,0,2,2,false,false,false,false
+10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false,false
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,false
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,false
-10005,202003,2,18,1.173184358,1.0,50,900.00000,FIC,2,0,2,false,false,false,false
+10005,202003,2,18,1.173184358,1,50,900,FIC,2,0,2,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index b6a21f75..783addf6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-10001,202001,1,10,1.0,0.992513369,13.17948718,547,R,0,2,3,false,false,false,false
+10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,false
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2,false,false,false,false
-10002,202001,1,50,1.0,0.992513369,13.17948718,381,R,0,2,3,false,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
+10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false,false
 10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2,false,false,false,false
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2,false,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,false
 10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
-10003,202003,2,12,1.173184358,1.0,30.76923077,314,R,2,0,3,false,false,false,false
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2,false,false,false,false
+10003,202003,2,12,1.173184358,1,30.76923077,314,R,2,0,3,false,true,false,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
-10004,202003,2,9,1.173184358,1.0,30.76923077,736,R,2,0,3,false,false,false,false
-10005,202001,1,18,1.0,0.992513369,13.17948718,100,R,0,2,3,false,false,false,false
+10004,202003,2,9,1.173184358,1,30.76923077,736,R,2,0,3,false,true,false,false
+10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false,false
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false,false
-10005,202003,2,18,1.173184358,1.0,30.76923077,150,R,2,0,3,false,false,false,false
+10005,202003,2,18,1.173184358,1,30.76923077,150,R,2,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index d2e9b137..52418e19 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
 identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-10001,202001,1,10,1.0,0.992513369,13.17948718,547,R,0,2,3,false,false,false,false
+10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,false
 10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false,false
-10001,202003,1,10,1.186096257,1.0,18.48333333,895,R,2,0,2,false,false,false,false
-10002,202001,1,50,1.0,0.992513369,13.17948718,381,R,0,2,3,false,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
+10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false,false
 10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2,false,false,false,false
-10002,202003,1,50,1.186096257,1.0,18.48333333,214,R,2,0,2,false,false,false,false
-10003,202001,2,12,1.0,1.693854749,72.19047619,961,R,0,2,2,false,false,false,false
-10003,202002,2,12,0.590369393,0.9341085271317829,30.8974359,267,R,2,3,3,false,false,false,false
-10003,202003,2,12,1.070539419,1.0,33.07692308,314,R,3,0,3,false,false,false,false
-10004,202001,2,9,1.0,1.693854749,72.19047619,555,R,0,2,2,false,false,false,false
-10004,202002,2,9,0.590369393,0.9341085271317829,30.8974359,628,R,2,3,3,false,false,false,false
-10004,202003,2,9,1.070539419,1.0,33.07692308,736,R,3,0,3,false,false,false,false
-10005,202001,1,18,1.0,0.992513369,13.17948718,100,R,0,2,3,false,false,false,false
-10005,202002,2,18,0.590369393,0.9341085271317829,30.8974359,310,R,2,3,3,false,false,false,false
-10005,202003,2,18,1.070539419,1.0,33.07692308,240,R,3,0,3,false,false,false,false
-10006,202001,1,22,1.0,0.992513369,13.17948718,289.948718,C,0,2,3,false,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,false
+10003,202002,2,12,0.590369393,0.934108527131783,30.8974359,267,R,2,3,3,false,false,false,false
+10003,202003,2,12,1.070539419,1,33.07692308,314,R,3,0,3,false,true,false,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
+10004,202002,2,9,0.590369393,0.934108527131783,30.8974359,628,R,2,3,3,false,false,false,false
+10004,202003,2,9,1.070539419,1,33.07692308,736,R,3,0,3,false,true,false,false
+10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false,false
+10005,202002,2,18,0.590369393,0.934108527131783,30.8974359,310,R,2,3,3,false,false,false,false
+10005,202003,2,18,1.070539419,1,33.07692308,240,R,3,0,3,false,true,false,false
+10006,202001,1,22,1,0.992513369,13.17948718,289.948718,C,0,2,3,true,false,false,false
 10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false,false
-10006,202003,1,22,1.186096257,1.0,18.48333333,346.5012157,FIC,2,0,2,false,false,false,false
-10007,202001,2,52,1.0,1.693854749,72.19047619,3753.904762,C,0,2,2,false,false,false,false
-10007,202002,2,52,0.590369393,0.9341085271317829,30.8974359,2216.190476,FIC,2,3,3,false,false,false,false
-10007,202003,2,52,1.070539419,1.0,33.07692308,2372.519265,FIC,3,0,3,false,false,false,false
+10006,202003,1,22,1.186096257,1,18.48333333,346.5012157,FIC,2,0,2,false,true,false,false
+10007,202001,2,52,1,1.693854749,72.19047619,3753.904762,C,0,2,2,true,false,false,false
+10007,202002,2,52,0.590369393,0.934108527131783,30.8974359,2216.190476,FIC,2,3,3,false,false,false,false
+10007,202003,2,52,1.070539419,1,33.07692308,2372.519265,FIC,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 0178b539..ea143239 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-140001,202001,100,27,3582,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
 140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
 140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
 140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
 140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140001,202007,100,27,9979,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
-140002,202001,100,83,5359,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
 140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
 140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
 140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
 140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140002,202007,100,83,1052,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
-140003,202001,100,89,439,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
 140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
 140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
 140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
 140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140003,202007,100,89,2528,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
-140004,202001,100,28,1319.798995,C,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
 140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
 140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
 140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140004,202007,100,28,7243,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
-140005,202001,100,85,150000,R,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
-140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140005,202003,100,85,120000,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140005,202004,100,85,115000,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140005,202007,100,85,160000,R,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
-140006,202001,100,71,3346.6331658291456,C,1.0,0.483330757,47.13567839,0,3,3,false,false,false,false
+140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+140005,202001,100,85,150000,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
+140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
+140005,202003,100,85,120000,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
+140005,202004,100,85,115000,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
+140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
+140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
+140005,202007,100,85,160000,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140006,202001,100,71,3346.63316582915,C,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140006,202002,100,71,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140006,202003,100,71,4447.668341708542,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140006,202003,100,71,4447.66834170854,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
 140006,202004,100,71,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140006,202005,100,71,4517.954773869346,FIC,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140006,202006,100,71,9023.065326633165,FIC,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140006,202007,100,71,4837.633165829145,FIC,0.536140767,1.0,91.63876651982379,3,0,4,false,false,false,false
+140006,202005,100,71,4517.95477386935,FIC,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140006,202006,100,71,9023.06532663316,FIC,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140006,202007,100,71,4837.63316582914,FIC,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index 4aebd0b9..c1fd9eb8 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-150001,202001,100,15,5891,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
 150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
 150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
 150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150001,202005,100,15,2727,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
 150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150001,202007,100,15,9549,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
-150002,202001,100,5,8611,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
 150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
 150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
 150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150002,202005,100,5,9967,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
 150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150002,202007,100,5,2593,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
-150003,202001,100,79,3426,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
 150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
 150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
 150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150003,202005,100,79,5463,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
 150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150003,202007,100,79,2959,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
-150004,202001,100,69,5310.130499,BI,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
+150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,false
 150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
 150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150004,202005,100,69,2818,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
+150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
 150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150004,202007,100,69,2343.703144,FIR,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
-150005,202001,100,85,150000,R,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
-150005,202002,100,85,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150005,202003,100,85,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150005,202004,100,85,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150006,202005,100,85,105000,R,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
-150006,202006,100,85,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150006,202007,100,85,125000,R,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
-150007,202001,100,71,12857.454545454546,C,1.0,0.887085601,181.0909091,0,3,3,false,false,false,false
-150007,202002,100,71,14494.040404040406,FIC,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150007,202003,100,71,10188.858585858588,FIC,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150007,202004,100,71,13914.56565656566,FIC,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150007,202005,100,71,13021.686868686873,FIC,0.935831358,1.71163273,124.851190,3,3,4,false,false,false,false
-150007,202006,100,71,7607.757575757578,FIC,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150007,202007,100,71,10830.010101010104,FIC,1.423548265,1.0,152.5353535,3,0,3,false,false,false,false
+150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150005,202001,100,85,150000,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
+150005,202002,100,85,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
+150005,202003,100,85,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150005,202004,100,85,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
+150006,202005,100,85,105000,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150006,202006,100,85,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
+150006,202007,100,85,125000,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
+150007,202001,100,71,12857.4545454545,C,1,0.887085601,181.0909091,0,3,3,true,false,false,false
+150007,202002,100,71,14494.0404040404,FIC,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150007,202003,100,71,10188.8585858586,FIC,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150007,202004,100,71,13914.5656565657,FIC,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150007,202005,100,71,13021.6868686869,FIC,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
+150007,202006,100,71,7607.75757575758,FIC,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150007,202007,100,71,10830.0101010101,FIC,1.423548265,1,152.5353535,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
index b4405a70..3992370f 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-190001,202001,100,95,1.0,0.9214,50.3694,9261,R,0,0,0,false,false,false,false
-190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false,false
-190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false,false
-190001,202004,100,95,1.113,1.0,110.5473,4350,R,0,0,0,false,false,false,false
-190002,202001,100,17,1.0,0.9214,50.3694,2433,R,0,0,0,false,false,false,false
-190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false,false
-190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false,false
-190002,202004,100,17,1.113,1.0,110.5473,700,R,0,0,0,false,false,false,false
-190003,202001,100,64,1.0,0.9214,50.3694,7888,R,0,0,0,false,false,false,false
-190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false,false
-190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false,false
-190003,202004,100,64,1.113,1.0,110.5473,4077,R,0,0,0,false,false,false,false
-190004,202001,100,51,1.0,0.9214,50.3694,2247,R,0,0,0,false,false,false,false
-190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false,false
-190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false,false
-190004,202004,100,51,1.113,1.0,110.5473,8608,R,0,0,0,false,false,false,false
-190005,202001,100,34,1.0,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false,false
-190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false,false
-190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false,false
-190005,202004,100,34,1.113,1.0,110.5473,5134,R,0,0,0,false,false,false,false
-190006,202001,100,8,1.0,0.9214,50.3694,402.9552,C,0,0,0,false,false,false,false
-190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false,false
-190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false,false
-190006,202004,100,8,1.113,1.0,110.5473,370.1196299,FIC,0,0,0,false,false,false,false
-190007,202001,100,85,1.0,0.9214,50.3694,150000,R,0,0,0,false,false,false,false
-190007,202002,100,85,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false,false
-190007,202003,100,85,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false,false
-190007,202004,100,85,1.113,1.0,110.5473,180000,R,0,0,0,false,false,false,false
-190008,202001,100,71,1.0,0.9214,50.3694,3576.2273999999998,C,0,0,0,false,false,false,false
-190008,202002,100,71,0.8521,1.5274,121.4187,3047.3033675399997,FIC,0,0,0,false,false,false,false
-190008,202003,100,71,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false,false
-190008,202004,100,71,1.113,1.0,110.5473,3284.811715657751,FIC,0,0,0,false,false,false,false
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
+190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
+190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
+190001,202004,100,95,1.113,1,110.5473,4350,R,0,0,0,false,true,false
+190002,202001,100,17,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
+190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
+190002,202004,100,17,1.113,1,110.5473,700,R,0,0,0,false,true,false
+190003,202001,100,64,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
+190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
+190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
+190003,202004,100,64,1.113,1,110.5473,4077,R,0,0,0,false,true,false
+190004,202001,100,51,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
+190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
+190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
+190004,202004,100,51,1.113,1,110.5473,8608,R,0,0,0,false,true,false
+190005,202001,100,34,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
+190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
+190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
+190005,202004,100,34,1.113,1,110.5473,5134,R,0,0,0,false,true,false
+190006,202001,100,8,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
+190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
+190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
+190006,202004,100,8,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
+190007,202001,100,85,1,0.9214,50.3694,150000,R,0,0,0,true,false,false
+190007,202002,100,85,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false
+190007,202003,100,85,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false
+190007,202004,100,85,1.113,1,110.5473,180000,R,0,0,0,false,true,false
+190008,202001,100,71,1,0.9214,50.3694,3576.2274,C,0,0,0,true,false,false
+190008,202002,100,71,0.8521,1.5274,121.4187,3047.30336754,FIC,0,0,0,false,false,false
+190008,202003,100,71,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false
+190008,202004,100,71,1.113,1,110.5473,3284.81171565775,FIC,0,0,0,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
index 92de50a0..8a2520ac 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,64 +1,64 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-200001,202001,100,56,7788,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200001,202004,100,56,1577,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200002,202001,100,75,6533,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200002,202004,100,75,2575,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200003,202001,100,10,56,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200003,202004,100,10,906,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200004,202001,100,86,1884,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200004,202004,100,86,1717.936456,FIR,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200005,202001,100,6,429.8061674,C,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200005,202004,100,6,189.2934824,FIC,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200006,202001,100,41,5279.856813,BI,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
-200006,202002,100,41,8222.887510,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,false
+200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200006,202004,100,41,2711,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200007,202001,200,4,2439,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200007,202004,200,4,595,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200008,202001,200,4,1849,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200008,202004,200,4,2727,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200009,202001,200,45,8742,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200009,202004,200,45,1945,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200010,202001,200,85,4809.537543,BI,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200010,202004,200,85,373.6877618,FIR,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200011,202001,200,79,1427.518771,BI,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200011,202004,200,79,7850.811321,C,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200012,202001,200,87,5495,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200012,202004,200,87,1737.465401,FIR,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200013,202001,100,85,150000,R,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
-200013,202002,100,85,180000,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200013,202003,100,85,120000,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200013,202004,100,85,105000,R,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200014,202001,200,85,150000,R,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
-200014,202002,200,85,180000,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200014,202003,200,85,120000,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200014,202004,200,85,105000,R,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
-200015,202001,100,71,5086.039647577092,C,1.0,0.642092794,71.63436123,0,4,4,false,false,false,false
+200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200013,202001,100,85,150000,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200013,202002,100,85,180000,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200013,202003,100,85,120000,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200013,202004,100,85,105000,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200014,202001,200,85,150000,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200014,202002,200,85,180000,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200014,202003,200,85,120000,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200014,202004,200,85,105000,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
+200015,202001,100,71,5086.03964757709,C,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200015,202002,100,71,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200015,202003,100,71,8555.952508724755,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200015,202004,100,71,2239.9728741460026,FIC,0.261802864,1.0,42.68681319,4,0,4,false,false,false,false
-200016,202001,200,71,9394.82142857143,C,1.0,0.741183163,132.3214286,0,3,4,false,false,false,false
+200015,202003,100,71,8555.95250872475,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200015,202004,100,71,2239.972874146,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200016,202001,200,71,9394.82142857143,C,1,0.741183163,132.3214286,0,3,4,true,false,false,false
 200016,202002,200,71,12675.438275,FIC,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200016,202003,200,71,14276.917680,FIC,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200016,202004,200,71,2970.550898,FIC,0.208066683,1.0,99.37735849,3,0,3,false,false,false,false
+200016,202003,200,71,14276.91768,FIC,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200016,202004,200,71,2970.550898,FIC,0.208066683,1,99.37735849,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 932ac7fb..6d37aaf9 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-10001,202001,1,10,547,1,0.992513369,15.46666667,R,0,2,2,false,false,false,false
+10001,202001,1,10,547,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
 10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
-10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,0,2,false,false,false,false
-10002,202001,1,50,381,1,0.992513369,15.46666667,R,0,2,2,false,false,false,false
+10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
+10002,202001,1,50,381,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
 10002,202002,1,50,573,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
-10002,202003,1,50,214,1.186096257,1,18.48333333,R,2,0,2,false,false,false,false
-10003,202001,2,12,961,1,1.693854749,72.19047619,R,0,2,2,false,false,false,false
+10002,202003,1,50,214,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
+10003,202001,2,12,961,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
 10003,202002,2,12,267,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
-10003,202003,2,12,314,1.173184358,1,50,R,2,0,2,false,false,false,false
-10004,202001,2,9,555,1,1.693854749,72.19047619,R,0,2,2,false,false,false,false
+10003,202003,2,12,314,1.173184358,1,50,R,2,0,2,false,true,false,false
+10004,202001,2,9,555,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
 10004,202002,2,9,628,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
-10004,202003,2,9,736,1.173184358,1,50,R,2,0,2,false,false,false,false
-10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,0,2,2,false,false,false,false
+10004,202003,2,9,736,1.173184358,1,50,R,2,0,2,false,true,false,false
+10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,0,2,2,true,false,false,false
 10005,202002,2,18,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2,false,false,false,false
-10005,202003,2,18,900.000,1.173184358,1,50,FIC,2,0,2,false,false,false,false
-10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2,false,false,false,false
+10005,202003,2,18,900,1.173184358,1,50,FIC,2,0,2,false,true,false,false
+10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
 10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
-10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2,false,false,false,false
-10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,0,2,2,false,false,false,false
+10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
+10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,0,2,2,true,false,false,false
 10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2,false,false,false,false
-10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,false,false,false
-10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2,false,false,false,false
+10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,true,false,false
+10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
 10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
-10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2,false,false,false,false
-10009,202001,2,71,5125.523810,1,1.693854749,72.19047619,C,0,2,2,false,false,false,false
+10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2,false,true,false,false
+10009,202001,2,71,5125.52381,1,1.693854749,72.19047619,C,0,2,2,true,false,false,false
 10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2,false,false,false,false
-10009,202003,2,71,3550.000000,1.173184358,1,50,FIC,2,0,2,false,false,false,false
+10009,202003,2,71,3550,1.173184358,1,50,FIC,2,0,2,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv
index ddc8a28f..3463d6be 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
-50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,false,false,false,false
-50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,false,false,false
-50001,202003,100,59,8542,FIR,1,1,1,0,0,0,false,false,false,false
-50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,false,false,false,false
-50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,false,false,false
-50002,202001,100,36,4851,R,1,1.083783427,573.9125874,,5,5,false,false,false,false
-50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,false,false,false
-50002,202003,100,36,8894,FIR,1,1,1,0,0,0,false,false,false,false
-50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,false,false,false,false
-50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,false,false,false
-50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,false,false,false,false
-50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,false,false,false
-50003,202003,100,76,769,FIR,1,1,1,0,0,0,false,false,false,false
-50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,false,false,false,false
-50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,false,false,false
-50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,false,false,false,false
-50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,false,false,false
-50004,202003,100,30,3245,FIR,1,1,1,0,0,0,false,false,false,false
-50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,false,false,false,false
-50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,false,false,false
-50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,false,false,false,false
-50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,false,false,false
-50005,202003,100,85,130000,FIR,1,1,1,0,0,0,false,false,false,false
-50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,false,false,false,false
-50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,false,false,false
-50006,202001,100,71,40747.79371,C,1,1.083783427,573.9125874,0,5,5,false,false,false,false
-50006,202002,100,71,37597.72727,FIC,0.922693571,1,529.5454545,5,0,5,false,false,false,false
-50006,202003,100,71,37597.72727,FIC,1,1,1,0,0,0,false,false,false,false
-50006,202004,100,71,37597.72727,FIC,1,1.161985911,538.03125,0,4,4,false,false,false,false
-50006,202005,100,71,32356.43987,FIC,0.860595632,1,463.0273438,4,0,4,false,false,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
+50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true,false
+50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
+50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
+50002,202001,100,36,4851,R,1,1.083783427,573.9125874,,5,5,true,false,false,false
+50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+50002,202003,100,36,8894,FIR,1,1,1,0,0,0,true,true,true,false
+50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
+50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
+50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
+50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+50003,202003,100,76,769,FIR,1,1,1,0,0,0,true,true,true,false
+50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
+50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
+50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
+50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+50004,202003,100,30,3245,FIR,1,1,1,0,0,0,true,true,true,false
+50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,true,false,false,false
+50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,true,false,false
+50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
+50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+50005,202003,100,85,130000,FIR,1,1,1,0,0,0,true,true,true,false
+50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
+50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
+50006,202001,100,71,40747.79371,C,1,1.083783427,573.9125874,0,5,5,true,false,false,false
+50006,202002,100,71,37597.72727,FIC,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+50006,202003,100,71,37597.72727,FIC,1,1,1,0,0,0,true,true,true,false
+50006,202004,100,71,37597.72727,FIC,1,1.161985911,538.03125,0,4,4,true,false,false,false
+50006,202005,100,71,32356.43987,FIC,0.860595632,1,463.0273438,4,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/dev_scenarios/divide_by_zero_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/dev_scenarios/divide_by_zero_input.csv
rename to tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_input.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
new file mode 100644
index 00000000..62efc580
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
@@ -0,0 +1,17 @@
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
+1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,false
+1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,false
+1,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false,false
+2,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
+2,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,false
+2,202003,1,1,0,R,0,0,10,1,1,2,false,false,false,false
+2,202004,1,1,30,R,1,1,30,1,0,1,true,true,false,false
+3,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
+3,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false,false
+3,202003,1,1,20,R,0,0,10,1,1,2,false,false,false,false
+3,202004,1,1,20,FIR,1,1,30,1,0,1,true,true,false,false
+4,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
+4,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false,false
+4,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,false
+4,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false,false
diff --git a/tests/imputation/ratio_of_means.toml b/tests/imputation/ratio_of_means.toml
new file mode 100644
index 00000000..79a6b280
--- /dev/null
+++ b/tests/imputation/ratio_of_means.toml
@@ -0,0 +1,22 @@
+[19_link_columns]
+forward_link_col = "forward"
+backward_link_col = "backward"
+construction_link_col = "construction"
+
+[26_C_FI_FI_NS_BI_BI_R_filtered]
+link_filter = "question < 100000"
+
+[27_BI_BI_R_NS_R_FI_FI_filtered]
+link_filter = "question < 100000"
+
+[28_link_columns_filtered]
+link_filter = "question < 100000"
+forward_link_col = "forward"
+backward_link_col = "backward"
+construction_link_col = "construction"
+
+[29_mixed_data_filtered]
+link_filter = "question < 100000"
+
+[30_class_change_C_C_FI_filtered]
+link_filter = "question < 100000"
diff --git a/tests/imputation/test_engine.py b/tests/imputation/test_engine.py
index 24ad396c..d8956d7c 100644
--- a/tests/imputation/test_engine.py
+++ b/tests/imputation/test_engine.py
@@ -18,7 +18,6 @@
 count_forward_col = "count_forward"
 count_backward_col = "count_backward"
 count_construction_col = "count_construction"
-exclude_col = "exclude"
 
 decimal_type = DecimalType(15, 6)
 
@@ -35,7 +34,6 @@
 count_forward_type = LongType()
 count_backward_type = LongType()
 count_construction_type = LongType()
-exclude_type = StringType()
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -53,7 +51,6 @@
     count_forward_col,
     count_backward_col,
     count_construction_col,
-    exclude_col,
 )
 
 dataframe_types = {
@@ -70,7 +67,6 @@
     count_forward_col: count_forward_type,
     count_backward_col: count_backward_type,
     count_construction_col: count_construction_type,
-    exclude_col: exclude_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 36975b1f..76c19e8f 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -23,7 +23,6 @@
 count_forward_col = "count_forward"
 count_backward_col = "count_backward"
 count_construction_col = "count_construction"
-exclude_col = "exclude"
 forward_growth_col = "growth_forward"
 backward_growth_col = "growth_backward"
 filtered_marker_col = "filtered_marker"
@@ -47,7 +46,6 @@
 count_forward_type = LongType()
 count_backward_type = LongType()
 count_construction_type = LongType()
-exclude_type = StringType()
 forward_growth_type = decimal_type
 backward_growth_type = decimal_type
 filtered_marker_type = BooleanType()
@@ -72,7 +70,6 @@
     count_forward_col,
     count_backward_col,
     count_construction_col,
-    exclude_col,
     forward_growth_col,
     backward_growth_col,
     filtered_forward_col,
@@ -95,7 +92,6 @@
     count_forward_col: count_forward_type,
     count_backward_col: count_backward_type,
     count_construction_col: count_construction_type,
-    exclude_col: exclude_type,
     forward_growth_col: forward_growth_type,
     backward_growth_col: backward_growth_type,
     filtered_marker_col: filtered_marker_type,
@@ -207,16 +203,14 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         auxiliary_col,
     )
     scenario_actual_output = impute(input_df=scenario_input, **imputation_kwargs)
+
     scenario_actual_output = scenario_actual_output.withColumn(
         output_col, bround(col(output_col), 6)
-    )
-    scenario_actual_output = scenario_actual_output.withColumn(
+    ).withColumn(
         forward_col, bround(col(forward_col), 6)
-    )
-    scenario_actual_output = scenario_actual_output.withColumn(
+    ).withColumn(
         backward_col, bround(col(backward_col).cast(decimal_type), 6)
-    )
-    scenario_actual_output = scenario_actual_output.withColumn(
+    ).withColumn(
         construction_col, bround(col(construction_col).cast(decimal_type), 6)
     )
 
@@ -228,8 +222,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     else:
         scenario_actual_output = scenario_actual_output.withColumn(
             forward_growth_col, bround(col(forward_growth_col).cast(decimal_type), 6)
-        )
-        scenario_actual_output = scenario_actual_output.withColumn(
+        ).withColumn(
             backward_growth_col, bround(col(backward_growth_col).cast(decimal_type), 6)
         )
 
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 020f8e3b..3e057be8 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -3,6 +3,7 @@
 import pathlib
 
 import pytest
+import toml
 from chispa.dataframe_comparer import assert_df_equality
 from pyspark.sql.functions import bround, col
 from pyspark.sql.types import BooleanType, DecimalType, LongType, StringType
@@ -22,7 +23,6 @@
 count_forward_col = "count_forward"
 count_backward_col = "count_backward"
 count_construction_col = "count_construction"
-exclude_col = "exclude"
 default_forward_col = "default_forward"
 default_backward_col = "default_backward"
 default_construction_col = "default_construction"
@@ -43,7 +43,6 @@
 count_forward_type = LongType()
 count_backward_type = LongType()
 count_construction_type = LongType()
-exclude_type = StringType()
 default_forward_type = BooleanType()
 default_backward_type = BooleanType()
 default_construction_type = BooleanType()
@@ -65,7 +64,6 @@
     count_forward_col,
     count_backward_col,
     count_construction_col,
-    exclude_col,
     default_forward_col,
     default_backward_col,
     default_construction_col,
@@ -86,7 +84,6 @@
     count_forward_col: count_forward_type,
     count_backward_col: count_backward_type,
     count_construction_col: count_construction_type,
-    exclude_col: exclude_type,
     default_forward_col: default_forward_type,
     default_backward_col: default_backward_type,
     default_construction_col: default_construction_type,
@@ -156,22 +153,11 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         f"{scenario}_output",
     )
     imputation_kwargs = params.copy()
-    if forward_col in scenario_input.columns:
-        imputation_kwargs.update(
-            {
-                "forward_link_col": forward_col,
-                "backward_link_col": backward_col,
-                "construction_link_col": construction_col,
-            }
-        )
 
-    if scenario.endswith("filtered"):
-        if "dev" in scenario_type:
-            imputation_kwargs["link_filter"] = "(" + exclude_col + ' == "N")'
-        else:
-            imputation_kwargs["link_filter"] = (
-                "(" + auxiliary_col + " != 71) and (" + target_col + " < 100000)"
-            )
+    with open("tests/imputation/mean_of_ratios.toml", "r") as f:
+        new_toml_string = toml.load(f)
+    if scenario in new_toml_string.keys():
+        imputation_kwargs.update(new_toml_string[scenario])
 
     if scenario_type.startswith("back_data"):
         min_period_df = scenario_expected_output.selectExpr("min(" + period_col + ")")
@@ -180,14 +166,8 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
             min_period_df, [col(period_col) == col("min(" + period_col + ")")]
         )
 
-        if scenario.endswith("filtered"):
-            if "dev" in scenario_type:
-                back_data_df = back_data_df.join(
-                    scenario_input.select(reference_col, period_col, exclude_col),
-                    [reference_col, period_col],
-                )
-            else:
-                back_data_df = back_data_df.withColumn(target_col, col(output_col))
+        if "filtered" in scenario:
+            back_data_df = back_data_df.withColumn(target_col, col(output_col))
 
         imputation_kwargs["back_data_df"] = back_data_df
 
@@ -211,18 +191,17 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         auxiliary_col,
     )
     scenario_actual_output = impute(input_df=scenario_input, **imputation_kwargs)
+
     scenario_actual_output = scenario_actual_output.withColumn(
         output_col, bround(col(output_col), 6)
-    )
-    scenario_actual_output = scenario_actual_output.withColumn(
+    ).withColumn(
         forward_col, bround(col(forward_col), 6)
-    )
-    scenario_actual_output = scenario_actual_output.withColumn(
+    ).withColumn(
         backward_col, bround(col(backward_col).cast(decimal_type), 6)
-    )
-    scenario_actual_output = scenario_actual_output.withColumn(
+    ).withColumn(
         construction_col, bround(col(construction_col).cast(decimal_type), 6)
     )
+
     select_cols = list(set(dataframe_columns) & set(scenario_expected_output.columns))
     assert isinstance(scenario_actual_output, type(scenario_input))
     sort_col_list = [reference_col, period_col]

From d59d47dd4a63bc43f86afc4b37116a89dad5cf99 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 3 May 2023 15:54:14 +0100
Subject: [PATCH 255/531] Correct test suite name for pytest

---
 pyproject.toml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index fafaba98..f636b0c8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "11.0.2"
+version = "12.0.0"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
@@ -19,12 +19,11 @@ pytest-cov = "^4.0.0"
 chispa = "*"
 pytest-dependency = "^0.5.1"
 pytest-tap = "^3.3"
-toml = "^0.10.0"
 [tool.isort]
 profile = "black"
 
 [tool.pytest.ini_options]
-junit_test_suite_name = "statistical_methods_library"
+junit_suite_name = "statistical_methods_library"
 addopts = "--exitfirst --cov=statistical_methods_library --cov-fail-under=95"
 
 [build-system]

From 574950903e44c0dd048da6932118366b2e4d15fa Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 3 May 2023 15:57:22 +0100
Subject: [PATCH 256/531] Update Output

---
 .../30_class_change_C_C_FI_filtered_output.csv       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 6d37aaf9..46591374 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -14,15 +14,15 @@ identifier,date,group,other,output,forward,backward,construction,marker,count_fo
 10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,0,2,2,true,false,false,false
 10005,202002,2,18,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2,false,false,false,false
 10005,202003,2,18,900,1.173184358,1,50,FIC,2,0,2,false,true,false,false
-10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
-10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
-10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
+10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
+10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
+10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
 10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,0,2,2,true,false,false,false
 10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2,false,false,false,false
 10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,true,false,false
-10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
-10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
-10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2,false,true,false,false
+10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
+10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
+10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2,false,true,false,true
 10009,202001,2,71,5125.52381,1,1.693854749,72.19047619,C,0,2,2,true,false,false,false
 10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2,false,false,false,false
 10009,202003,2,71,3550,1.173184358,1,50,FIC,2,0,2,false,true,false,false

From ab7251d15a666ce28ed5f517a03a917b5cbae7d7 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 3 May 2023 16:03:27 +0100
Subject: [PATCH 257/531] Non-responses do not ever have filtering applied so
 stop claiming they do

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 9842d452..08aff507 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -348,7 +348,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             filtered_df.select("ref", "period", expr("NOT match AS filter_marker")),
             ["ref", "period"],
             "left"
-        ).fillna(False, "filter_marker")
+        )
         output_col_mapping["filter_marker"] = filter_marker_col
         if weight is not None:
 

From e26876af1901a677cf147175c1a2e6812bc90477 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 3 May 2023 17:49:37 +0100
Subject: [PATCH 258/531] Tests Updated

---
 .../methodology_scenarios/01_C_output.csv     |  2 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  4 +-
 .../03_R_R_FI_output.csv                      |  2 +-
 .../04_R_R_FI_FI_output.csv                   |  4 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  6 +--
 .../06_BI_BI_R_output.csv                     |  4 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          | 10 ++--
 .../09_R_NS_C_output.csv                      |  2 +-
 .../10_C_FI_NS_R_output.csv                   |  4 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  4 +-
 .../12_C_FI_FI_FI_FI_output.csv               | 10 ++--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  8 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          | 10 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  8 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          | 10 ++--
 .../17_NS_R_FI_NS_output.csv                  |  2 +-
 .../18_NS_BI_R_NS_output.csv                  |  2 +-
 .../20_mixed_data_output.csv                  | 30 ++++++------
 .../21_class_change_R_C_FI_output.csv         |  4 +-
 .../22_class_change_C_BI_R_output.csv         |  4 +-
 .../23_class_change_C_C_FI_output.csv         |  6 +--
 .../24_class_change_R_BI_R_output.csv         |  2 +-
 .../25_class_change_C_FI_FI_output.csv        | 12 ++---
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv | 24 +++++-----
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv | 22 ++++-----
 .../29_mixed_data_filtered_output.csv         | 46 +++++++++----------
 ...30_class_change_C_C_FI_filtered_output.csv | 18 ++++----
 ...nput_test.csv => 31_no_response_input.csv} |  0
 ...put_test.csv => 31_no_response_output.csv} | 26 +++++------
 .../32_divide_by_zero_output.csv              | 14 +++---
 tests/imputation/test_ratio_of_means.py       |  2 +-
 31 files changed, 151 insertions(+), 151 deletions(-)
 rename tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/{31_no_response_input_test.csv => 31_no_response_input.csv} (100%)
 rename tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/{31_no_response_output_test.csv => 31_no_response_output.csv} (67%)

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index e30687e3..24d3c4bc 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -2,4 +2,4 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false,false
 10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false,false
 10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false,false
-10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,true,true,false,false
+10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,true,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index 81f467c2..59d00e3d 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -5,5 +5,5 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_ba
 20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,true,false,false
 20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,true,false,false,false
 20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,true,false,false
-20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,true,false,false,false
-20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,true,false,false
+20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,true,false,false,
+20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index 351065ab..bf728f8a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -10,4 +10,4 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_ba
 30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,true,false,false
 30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,true,false,false,false
 30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
-30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,true,false,false
+30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index 4b8846db..5dcc1fab 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -13,5 +13,5 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 40003,202004,100,16,1377,R,0.637121844,1,73.71052632,3,0,3,false,true,false,false
 40004,202001,100,78,5131,R,1,1.060305409,128.0208333,0,4,4,true,false,false,false
 40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
-40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
-40004,202004,100,78,6193.009741,FIR,0.637121844,1,73.71052632,3,0,3,false,true,false,false
+40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,
+40004,202004,100,78,6193.009741,FIR,0.637121844,1,73.71052632,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 14dba724..1bdc4b41 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -16,6 +16,6 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 50003,202102,100,76,1521,R,0.481224628,1,49.9122807,3,0,3,false,true,false,false
 50004,202010,100,30,688,R,1,0.659160839,70.34328358,0,4,4,true,false,false,false
 50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
-50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
-50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
-50004,202102,100,30,1521.344411,FIR,0.481224628,1,49.9122807,3,0,3,false,true,false,false
+50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,
+50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,
+50004,202102,100,30,1521.344411,FIR,0.481224628,1,49.9122807,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index 53ba6211..a9873887 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -8,6 +8,6 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 60003,202001,100,26,6541,R,1,1.408039237,117.9107143,0,3,3,true,false,false,false
 60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
 60003,202003,100,26,6351,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
-60004,202001,100,3,472.653159,BI,1,1.408039237,117.9107143,0,3,3,true,false,false,false
-60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
+60004,202001,100,3,472.653159,BI,1,1.408039237,117.9107143,0,3,3,true,false,false,
+60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,
 60004,202003,100,3,401,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 7a4b6299..1825745d 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -20,10 +20,10 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
 70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
 70003,202007,100,42,8768,R,0.913631634,1,70.24,3,0,3,false,true,false,false
-70004,202001,100,6,10286.222995,BI,1,1.964796824,107.48,0,3,3,true,false,false,false
-70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
+70004,202001,100,6,10286.222995,BI,1,1.964796824,107.48,0,3,3,true,false,false,
+70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,
 70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
-70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
-70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
+70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,
+70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,
 70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
-70004,202007,100,6,5367.585848,FIR,0.913631634,1,70.24,3,0,3,false,true,false,false
+70004,202007,100,6,5367.585848,FIR,0.913631634,1,70.24,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index 950cff9e..f53734fe 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -9,4 +9,4 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
 90003,202003,100,14,2415,R,1.027612406,1,169.3831776,3,0,3,false,true,false,false
 90004,202001,100,73,7728,R,1,0.294381131,71.77777778,0,3,4,true,false,false,false
-90004,202003,100,73,12364.971963,C,1.027612406,1,169.3831776,3,0,3,false,true,false,false
+90004,202003,100,73,12364.971963,C,1.027612406,1,169.3831776,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index 0c79d3d4..544f3f7d 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -11,6 +11,6 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
 100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
 100003,202004,100,46,2594,R,3.027849407,1,119.1751412,3,0,4,false,true,false,false
-100004,202001,100,86,15422.351648,C,1,1.046156805,179.3296703,0,3,3,true,false,false,false
-100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
+100004,202001,100,86,15422.351648,C,1,1.046156805,179.3296703,0,3,3,true,false,false,
+100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,
 100004,202004,100,86,9352,R,3.027849407,1,119.1751412,3,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index e5bfc0ca..a5fe6b8a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -10,7 +10,7 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 110003,202003,100,4,1429,R,0.780928323,1,70.26136364,3,0,3,false,true,false,false
 110004,202001,100,76,3975,R,1,1.357646062,101.710317,0,4,4,true,false,false,false
 110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
-110004,202003,100,76,2377.145816,FIR,0.780928323,1,70.26136364,3,0,3,false,true,false,false
+110004,202003,100,76,2377.145816,FIR,0.780928323,1,70.26136364,3,0,3,false,true,false,
 110005,202001,200,27,5217,R,1,1.016800862,182.25,0,3,3,true,false,false,false
 110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
 110005,202003,200,27,9940,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
@@ -20,6 +20,6 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 110007,202001,200,19,5496,R,1,1.016800862,182.25,0,3,3,true,false,false,false
 110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
 110007,202003,200,19,1235,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
-110008,202001,200,43,3978.741774,BI,1,1.016800862,182.25,0,3,3,true,false,false,false
+110008,202001,200,43,3978.741774,BI,1,1.016800862,182.25,0,3,3,true,false,false,
 110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
 110008,202003,200,43,6013,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 1dfb64d4..eb1f5d0f 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -14,8 +14,8 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
 120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
 120003,202005,100,94,4416,R,0.53449544,1,32.73423423,3,0,3,false,true,false,false
-120004,202001,100,100,7738.738739,C,1,1.268552019,77.38738739,0,3,3,true,false,false,false
-120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
-120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
-120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
-120004,202005,100,100,3273.423424,FIC,0.53449544,1,32.73423423,3,0,3,false,true,false,false
+120004,202001,100,100,7738.738739,C,1,1.268552019,77.38738739,0,3,3,true,false,false,
+120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,
+120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,
+120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,
+120004,202005,100,100,3273.423424,FIC,0.53449544,1,32.73423423,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index de5348e8..b3210c54 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -21,8 +21,8 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
 130003,202007,100,39,6461,R,0.798832987,1,158.7757576,3,0,4,false,true,false,false
 130004,202001,100,37,2571,R,1,0.6743401,102.7515152,0,3,4,true,false,false,false
-130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
-130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
-130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
-130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
+130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,
+130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,
+130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,
+130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,
 130004,202007,100,37,6621,R,0.798832987,1,158.7757576,3,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 28297804..ea447f65 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -20,9 +20,9 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
 140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
 140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
-140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
+140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
+140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
+140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
+140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
 140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 7c129c9f..231e33d4 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -20,9 +20,9 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
 150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
 150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
-150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,
+150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
 150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
 150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
+150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 12667e3c..9780b161 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -20,9 +20,9 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
 160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
 160003,202007,100,85,9508,R,0.819547983,1,71.77202073,3,0,3,false,true,false,false
-160004,202001,100,33,1022.611409,BI,1,0.285048351,29.78238342,0,3,3,true,false,false,false
-160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
+160004,202001,100,33,1022.611409,BI,1,0.285048351,29.78238342,0,3,3,true,false,false,
+160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,
 160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
-160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
-160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
-160004,202007,100,33,2368.476683,FIC,0.819547983,1,71.77202073,3,0,3,false,true,false,false
+160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,
+160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,
+160004,202007,100,33,2368.476683,FIC,0.819547983,1,71.77202073,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 099f5015..a3fa972a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -12,4 +12,4 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
 170003,202004,100,81,9250,R,1.231814548,1,109.0330189,3,0,3,false,true,false,false
 170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
-170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
+170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 329c4ae9..3ca466c3 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -11,5 +11,5 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
 180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
 180003,202004,100,19,6168,R,1.709926945,1,175.5441176,3,0,3,false,true,false,false
-180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
+180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,
 180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index 4867a98c..3c1c9dec 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -13,14 +13,14 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
 200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
+200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,
+200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
+200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
+200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
+200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
+200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,
+200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
 200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
 200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
 200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
@@ -35,14 +35,14 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
 200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
-200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,false
+200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
 200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,false
-200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,false
+200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
+200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
 200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,
 200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
+200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
+200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index c5705a83..01f853a7 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -12,5 +12,5 @@ identifier,date,group,other,forward,backward,construction,output,marker,count_fo
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
 10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false,false
 10005,202001,1,18,1,0.992513369,13.17948717,100,R,0,2,3,true,false,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,false
-10005,202003,2,18,1.173184358,1,50,900.0000004,FIC,2,0,2,false,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,
+10005,202003,2,18,1.173184358,1,50,900.0000004,FIC,2,0,2,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 09e17cee..a87f1cda 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -11,6 +11,6 @@ identifier,date,group,other,forward,backward,construction,output,marker,count_fo
 10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
 10004,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false,false
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,false
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,
 10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 9534ab3a..494f141b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -11,6 +11,6 @@ identifier,date,group,other,forward,backward,construction,output,marker,count_fo
 10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
 10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false,false
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,false
-10005,202003,2,18,1.173184358,1,50,900,FIC,2,0,2,false,true,false,false
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,
+10005,202003,2,18,1.173184358,1,50,900,FIC,2,0,2,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 783addf6..b08ce936 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -12,5 +12,5 @@ identifier,date,group,other,forward,backward,construction,output,marker,count_fo
 10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
 10004,202003,2,9,1.173184358,1,30.76923077,736,R,2,0,3,false,true,false,false
 10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false,
 10005,202003,2,18,1.173184358,1,30.76923077,150,R,2,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 52418e19..6752df4f 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -14,9 +14,9 @@ identifier,date,group,other,forward,backward,construction,output,marker,count_fo
 10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false,false
 10005,202002,2,18,0.590369393,0.934108527131783,30.8974359,310,R,2,3,3,false,false,false,false
 10005,202003,2,18,1.070539419,1,33.07692308,240,R,3,0,3,false,true,false,false
-10006,202001,1,22,1,0.992513369,13.17948718,289.948718,C,0,2,3,true,false,false,false
-10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false,false
-10006,202003,1,22,1.186096257,1,18.48333333,346.5012157,FIC,2,0,2,false,true,false,false
-10007,202001,2,52,1,1.693854749,72.19047619,3753.904762,C,0,2,2,true,false,false,false
-10007,202002,2,52,0.590369393,0.934108527131783,30.8974359,2216.190476,FIC,2,3,3,false,false,false,false
-10007,202003,2,52,1.070539419,1,33.07692308,2372.519265,FIC,3,0,3,false,true,false,false
+10006,202001,1,22,1,0.992513369,13.17948718,289.948718,C,0,2,3,true,false,false,
+10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false,
+10006,202003,1,22,1.186096257,1,18.48333333,346.5012157,FIC,2,0,2,false,true,false,
+10007,202001,2,52,1,1.693854749,72.19047619,3753.904762,C,0,2,2,true,false,false,
+10007,202002,2,52,0.590369393,0.934108527131783,30.8974359,2216.190476,FIC,2,3,3,false,false,false,
+10007,202003,2,52,1.070539419,1,33.07692308,2372.519265,FIC,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index ea143239..b28894ef 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -20,11 +20,11 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
 140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
 140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
-140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
+140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
+140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
+140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
+140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
 140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
 140005,202001,100,85,150000,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
 140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
@@ -33,10 +33,10 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
 140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
 140005,202007,100,85,160000,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140006,202001,100,71,3346.63316582915,C,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140006,202002,100,71,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140006,202003,100,71,4447.66834170854,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140006,202004,100,71,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140006,202005,100,71,4517.95477386935,FIC,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140006,202006,100,71,9023.06532663316,FIC,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140006,202007,100,71,4837.63316582914,FIC,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+140006,202001,100,71,3346.63316582915,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
+140006,202002,100,71,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
+140006,202003,100,71,4447.66834170854,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
+140006,202004,100,71,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,
+140006,202005,100,71,4517.95477386935,FIC,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
+140006,202006,100,71,9023.06532663316,FIC,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
+140006,202007,100,71,4837.63316582914,FIC,0.536140767,1,91.6387665198238,3,0,4,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index c1fd9eb8..c1c9c8cf 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -20,12 +20,12 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
 150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
 150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
-150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,
+150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
 150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
 150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
+150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,
 150005,202001,100,85,150000,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
 150005,202002,100,85,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
 150005,202003,100,85,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
@@ -33,10 +33,10 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 150006,202005,100,85,105000,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
 150006,202006,100,85,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
 150006,202007,100,85,125000,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
-150007,202001,100,71,12857.4545454545,C,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150007,202002,100,71,14494.0404040404,FIC,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150007,202003,100,71,10188.8585858586,FIC,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150007,202004,100,71,13914.5656565657,FIC,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150007,202005,100,71,13021.6868686869,FIC,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150007,202006,100,71,7607.75757575758,FIC,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150007,202007,100,71,10830.0101010101,FIC,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150007,202001,100,71,12857.4545454545,C,1,0.887085601,181.0909091,0,3,3,true,false,false,
+150007,202002,100,71,14494.0404040404,FIC,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
+150007,202003,100,71,10188.8585858586,FIC,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,
+150007,202004,100,71,13914.5656565657,FIC,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,
+150007,202005,100,71,13021.6868686869,FIC,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,
+150007,202006,100,71,7607.75757575758,FIC,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
+150007,202007,100,71,10830.0101010101,FIC,1.423548265,1,152.5353535,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
index 8a2520ac..2afe2b71 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -13,14 +13,14 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
 200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
+200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,
+200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
+200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
+200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
+200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
+200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,
+200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
 200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
 200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
 200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
@@ -35,17 +35,17 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
 200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
-200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,false
+200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
 200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
 200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,false
-200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,false
+200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
+200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
 200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,
 200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
+200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
+200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
 200013,202001,100,85,150000,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
 200013,202002,100,85,180000,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
 200013,202003,100,85,120000,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
@@ -54,11 +54,11 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 200014,202002,200,85,180000,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
 200014,202003,200,85,120000,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
 200014,202004,200,85,105000,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
-200015,202001,100,71,5086.03964757709,C,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200015,202002,100,71,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200015,202003,100,71,8555.95250872475,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200015,202004,100,71,2239.972874146,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200016,202001,200,71,9394.82142857143,C,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200016,202002,200,71,12675.438275,FIC,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200016,202003,200,71,14276.91768,FIC,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200016,202004,200,71,2970.550898,FIC,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200015,202001,100,71,5086.03964757709,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
+200015,202002,100,71,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
+200015,202003,100,71,8555.95250872475,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
+200015,202004,100,71,2239.972874146,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
+200016,202001,200,71,9394.82142857143,C,1,0.741183163,132.3214286,0,3,4,true,false,false,
+200016,202002,200,71,12675.438275,FIC,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
+200016,202003,200,71,14276.91768,FIC,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
+200016,202004,200,71,2970.550898,FIC,0.208066683,1,99.37735849,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 46591374..64bf414f 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -11,18 +11,18 @@ identifier,date,group,other,output,forward,backward,construction,marker,count_fo
 10004,202001,2,9,555,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
 10004,202002,2,9,628,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
 10004,202003,2,9,736,1.173184358,1,50,R,2,0,2,false,true,false,false
-10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,0,2,2,true,false,false,false
-10005,202002,2,18,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2,false,false,false,false
-10005,202003,2,18,900,1.173184358,1,50,FIC,2,0,2,false,true,false,false
+10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,0,2,2,true,false,false,
+10005,202002,2,18,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2,false,false,false,
+10005,202003,2,18,900,1.173184358,1,50,FIC,2,0,2,false,true,false,
 10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
 10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
 10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
-10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,0,2,2,true,false,false,false
-10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2,false,false,false,false
-10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,true,false,false
+10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,0,2,2,true,false,false,
+10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2,false,false,false,
+10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,true,false,
 10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
 10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
 10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2,false,true,false,true
-10009,202001,2,71,5125.52381,1,1.693854749,72.19047619,C,0,2,2,true,false,false,false
-10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2,false,false,false,false
-10009,202003,2,71,3550,1.173184358,1,50,FIC,2,0,2,false,true,false,false
+10009,202001,2,71,5125.52381,1,1.693854749,72.19047619,C,0,2,2,true,false,false,
+10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2,false,false,false,
+10009,202003,2,71,3550,1.173184358,1,50,FIC,2,0,2,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_input_test.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_input_test.csv
rename to tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_input.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
similarity index 67%
rename from tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv
rename to tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
index 3463d6be..ad7e52c4 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output_test.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
@@ -1,31 +1,31 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
 50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
 50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
-50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true,false
+50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true,
 50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
 50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
-50002,202001,100,36,4851,R,1,1.083783427,573.9125874,,5,5,true,false,false,false
+50002,202001,100,36,4851,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
 50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
-50002,202003,100,36,8894,FIR,1,1,1,0,0,0,true,true,true,false
+50002,202003,100,36,8894,FIR,1,1,1,0,0,0,true,true,true,
 50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
 50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
 50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
 50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
-50003,202003,100,76,769,FIR,1,1,1,0,0,0,true,true,true,false
+50003,202003,100,76,769,FIR,1,1,1,0,0,0,true,true,true,
 50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
 50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
 50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
 50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
-50004,202003,100,30,3245,FIR,1,1,1,0,0,0,true,true,true,false
-50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,true,false,false,false
-50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,true,false,false
+50004,202003,100,30,3245,FIR,1,1,1,0,0,0,true,true,true,
+50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,true,false,false,
+50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,true,false,
 50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
 50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
-50005,202003,100,85,130000,FIR,1,1,1,0,0,0,true,true,true,false
+50005,202003,100,85,130000,FIR,1,1,1,0,0,0,true,true,true,
 50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
 50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
-50006,202001,100,71,40747.79371,C,1,1.083783427,573.9125874,0,5,5,true,false,false,false
-50006,202002,100,71,37597.72727,FIC,0.922693571,1,529.5454545,5,0,5,false,true,false,false
-50006,202003,100,71,37597.72727,FIC,1,1,1,0,0,0,true,true,true,false
-50006,202004,100,71,37597.72727,FIC,1,1.161985911,538.03125,0,4,4,true,false,false,false
-50006,202005,100,71,32356.43987,FIC,0.860595632,1,463.0273438,4,0,4,false,true,false,false
+50006,202001,100,71,40747.793706,C,1,1.083783427,573.9125874,0,5,5,true,false,false,
+50006,202002,100,71,37597.727272,FIC,0.922693571,1,529.5454545,5,0,5,false,true,false,
+50006,202003,100,71,37597.727272,FIC,1,1,1,0,0,0,true,true,true,
+50006,202004,100,71,37597.727272,FIC,1,1.161985911,538.03125,0,4,4,true,false,false,
+50006,202005,100,71,32356.439872,FIC,0.860595632,1,463.0273438,4,0,4,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
index 62efc580..78b743e0 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
@@ -1,17 +1,17 @@
 identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
 1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
 1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,false
-1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,false
-1,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false,false
+1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,
+1,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false,
 2,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
 2,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,false
 2,202003,1,1,0,R,0,0,10,1,1,2,false,false,false,false
 2,202004,1,1,30,R,1,1,30,1,0,1,true,true,false,false
 3,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
-3,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false,false
+3,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false,
 3,202003,1,1,20,R,0,0,10,1,1,2,false,false,false,false
-3,202004,1,1,20,FIR,1,1,30,1,0,1,true,true,false,false
+3,202004,1,1,20,FIR,1,1,30,1,0,1,true,true,false,
 4,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
-4,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false,false
-4,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,false
-4,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false,false
+4,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false,
+4,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,
+4,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false,
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 3e057be8..2cef9114 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -154,7 +154,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     )
     imputation_kwargs = params.copy()
 
-    with open("tests/imputation/mean_of_ratios.toml", "r") as f:
+    with open("tests/imputation/ratio_of_means.toml", "r") as f:
         new_toml_string = toml.load(f)
     if scenario in new_toml_string.keys():
         imputation_kwargs.update(new_toml_string[scenario])

From bea7a6ad87c26e64fba5035486f04d0957382318 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 4 May 2023 11:47:10 +0100
Subject: [PATCH 259/531] Rename Col

---
 statistical_methods_library/imputation/engine.py    |  6 +++---
 .../methodology_scenarios/01_C_output.csv           | 10 +++++-----
 .../methodology_scenarios/01_C_output.csv           |  2 +-
 .../methodology_scenarios/02_C_FI_output.csv        |  2 +-
 .../methodology_scenarios/03_R_R_FI_output.csv      |  2 +-
 .../methodology_scenarios/04_R_R_FI_FI_output.csv   |  2 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv            |  2 +-
 .../methodology_scenarios/06_BI_BI_R_output.csv     |  2 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv                |  2 +-
 .../methodology_scenarios/08_R_R_R_output.csv       |  2 +-
 .../methodology_scenarios/09_R_NS_C_output.csv      |  2 +-
 .../methodology_scenarios/10_C_FI_NS_R_output.csv   |  2 +-
 .../11_R_R_FI-BI_R_R_output.csv                     |  2 +-
 .../12_C_FI_FI_FI_FI_output.csv                     |  2 +-
 .../13_R_FI_FI_NS_BI_BI_R_output.csv                |  2 +-
 .../14_C_FI_FI_NS_BI_BI_R_output.csv                |  2 +-
 .../15_BI_BI_R_NS_R_FI_FI_output.csv                |  2 +-
 .../16_BI_BI_R_NS_C_FI_FI_output.csv                |  2 +-
 .../methodology_scenarios/17_NS_R_FI_NS_output.csv  |  2 +-
 .../methodology_scenarios/18_NS_BI_R_NS_output.csv  |  2 +-
 .../methodology_scenarios/20_mixed_data_output.csv  |  2 +-
 .../21_class_change_R_C_FI_output.csv               |  2 +-
 .../22_class_change_C_BI_R_output.csv               |  2 +-
 .../23_class_change_C_C_FI_output.csv               |  2 +-
 .../24_class_change_R_BI_R_output.csv               |  2 +-
 .../25_class_change_C_FI_FI_output.csv              |  2 +-
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv       |  2 +-
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv       |  2 +-
 .../29_mixed_data_filtered_output.csv               |  2 +-
 .../30_class_change_C_C_FI_filtered_output.csv      |  2 +-
 .../methodology_scenarios/31_no_response_output.csv |  2 +-
 .../32_divide_by_zero_output.csv                    |  2 +-
 tests/imputation/test_mean_of_ratios.py             | 13 +++++++++++++
 tests/imputation/test_ratio_of_means.py             |  8 ++++----
 34 files changed, 55 insertions(+), 42 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 08aff507..1dc348bf 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -59,7 +59,7 @@ def impute(
     default_construction_col: Optional[str] = "default_construction",
     default_forward_col: Optional[str] = "default_forward",
     default_backward_col: Optional[str] = "default_backward",
-    filter_marker_col: Optional[str] = "filter_marker",
+    filtered_marker_col: Optional[str] = "filtered_marker",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
     periodicity: Optional[int] = 1,
@@ -345,11 +345,11 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             df = df.fillna(fill_value, fill_column)
 
         df = df.join(
-            filtered_df.select("ref", "period", expr("NOT match AS filter_marker")),
+            filtered_df.select("ref", "period", expr("NOT match AS filtered_marker")),
             ["ref", "period"],
             "left"
         )
-        output_col_mapping["filter_marker"] = filter_marker_col
+        output_col_mapping["filtered_marker"] = filtered_marker_col
         if weight is not None:
 
             def calculate_weighted_link(link_name):
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index 2757c1ef..52a054ee 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE
-10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE
-10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE
-10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward,default_forward,default_backward,default_construction
+10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE
+10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE
+10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE
+10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,,,,TRUE,TRUE,FALSE
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index 24d3c4bc..e1c39dd5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false,false
 10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false,false
 10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index 59d00e3d..6993d3cc 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false,false
 20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false,false
 20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index bf728f8a..072191f9 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false,false
 30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
 30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index 5dcc1fab..f0c91c6c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 40001,202001,100,35,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false,false
 40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
 40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 1bdc4b41..53277b16 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 50001,202010,100,59,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false,false
 50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
 50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index a9873887..7fd1fada 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 60001,202001,100,15,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false,false
 60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
 60001,202003,100,15,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 1825745d..d855f014 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 70001,202001,100,39,5951,R,1,1.964796824,107.48,0,3,3,true,false,false,false
 70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
 70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
index d90f7165..032b7203 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 80001,202001,100,91,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false,false
 80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
 80001,202003,100,91,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index f53734fe..1b1377eb 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 90001,202001,100,66,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false,false
 90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
 90001,202003,100,66,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index 544f3f7d..5847d1f6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 100001,202001,100,26,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false,false
 100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
 100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index a5fe6b8a..82055363 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 110001,202001,100,89,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false,false
 110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
 110001,202003,100,89,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index eb1f5d0f..5743c652 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 120001,202001,100,50,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false,false
 120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
 120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index b3210c54..5a543295 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 130001,202001,100,20,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false,false
 130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
 130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index ea447f65..86d409ff 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
 140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 231e33d4..676f4c8a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
 150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
 150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 9780b161..6df565fe 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 160001,202001,100,76,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false,false
 160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
 160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index a3fa972a..df9d4c70 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 170001,202001,100,69,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false,false
 170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
 170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 3ca466c3..824f1267 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 180001,202001,100,91,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false,false
 180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
 180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index 3c1c9dec..70db2887 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 01f853a7..e4039d03 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 10001,202001,1,10,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false,false
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
 10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index a87f1cda..cd9817fc 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,false
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
 10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 494f141b..93747fa1 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,false
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
 10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index b08ce936..cae441d9 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,false
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
 10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 6752df4f..a704c157 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,false
 10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false,false
 10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index b28894ef..46126e9e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
 140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
 140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index c1c9c8cf..6db1294e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
 150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
 150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
index 2afe2b71..69c2ee23 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
 200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
 200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 64bf414f..b3c0a750 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 10001,202001,1,10,547,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
 10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
 10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
index ad7e52c4..a65a0766 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
 50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
 50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
index 78b743e0..2710ee94 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filter_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
 1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
 1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,false
 1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 76c19e8f..47d60b87 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -25,6 +25,9 @@
 count_construction_col = "count_construction"
 forward_growth_col = "growth_forward"
 backward_growth_col = "growth_backward"
+default_forward_col = "default_forward"
+default_backward_col = "default_backward"
+default_construction_col = "default_construction"
 filtered_marker_col = "filtered_marker"
 filtered_forward_col = "filtered_forward"
 filtered_backward_col = "filtered_backward"
@@ -48,6 +51,9 @@
 count_construction_type = LongType()
 forward_growth_type = decimal_type
 backward_growth_type = decimal_type
+default_forward_type = BooleanType()
+default_backward_type = BooleanType()
+default_construction_type = BooleanType()
 filtered_marker_type = BooleanType()
 filtered_forward_type = BooleanType()
 filtered_backward_type = BooleanType()
@@ -76,6 +82,10 @@
     filtered_backward_col,
     trimmed_forward_col,
     trimmed_backward_col,
+    default_forward_col,
+    default_backward_col,
+    default_construction_col,
+    filtered_marker_col,
 )
 
 dataframe_types = {
@@ -94,6 +104,9 @@
     count_construction_col: count_construction_type,
     forward_growth_col: forward_growth_type,
     backward_growth_col: backward_growth_type,
+    default_forward_col: default_forward_type,
+    default_backward_col: default_backward_type,
+    default_construction_col: default_construction_type,
     filtered_marker_col: filtered_marker_type,
     filtered_forward_col: filtered_forward_type,
     filtered_backward_col: filtered_backward_type,
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 2cef9114..0ba233ee 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -26,7 +26,7 @@
 default_forward_col = "default_forward"
 default_backward_col = "default_backward"
 default_construction_col = "default_construction"
-filter_marker_col = "filter_marker"
+filtered_marker_col = "filtered_marker"
 
 decimal_type = DecimalType(15, 6)
 
@@ -46,7 +46,7 @@
 default_forward_type = BooleanType()
 default_backward_type = BooleanType()
 default_construction_type = BooleanType()
-filter_marker_type = BooleanType()
+filtered_marker_type = BooleanType()
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -67,7 +67,7 @@
     default_forward_col,
     default_backward_col,
     default_construction_col,
-    filter_marker_col,
+    filtered_marker_col,
 )
 
 dataframe_types = {
@@ -87,7 +87,7 @@
     default_forward_col: default_forward_type,
     default_backward_col: default_backward_type,
     default_construction_col: default_construction_type,
-    filter_marker_col: filter_marker_type,
+    filtered_marker_col: filtered_marker_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()

From 22bd9e8b98fb4511c31a5be6226c2a2706b79a7c Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 4 May 2023 11:53:14 +0100
Subject: [PATCH 260/531] Make filtered marker an inclusion marker to reflect
 what is actually happening with the link filter

---
 statistical_methods_library/imputation/engine.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 1dc348bf..149069a0 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -59,7 +59,7 @@ def impute(
     default_construction_col: Optional[str] = "default_construction",
     default_forward_col: Optional[str] = "default_forward",
     default_backward_col: Optional[str] = "default_backward",
-    filtered_marker_col: Optional[str] = "filtered_marker",
+    link_inclusion_marker_col: Optional[str] = "link_inclusion_marker",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
     periodicity: Optional[int] = 1,
@@ -345,11 +345,11 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             df = df.fillna(fill_value, fill_column)
 
         df = df.join(
-            filtered_df.select("ref", "period", expr("NOT match AS filtered_marker")),
+            filtered_df.select("ref", "period", expr("match AS link_inclusion_marker")),
             ["ref", "period"],
             "left"
         )
-        output_col_mapping["filtered_marker"] = filtered_marker_col
+        output_col_mapping["link_inclusion_marker"] = link_inclusion_marker_col
         if weight is not None:
 
             def calculate_weighted_link(link_name):

From 034e6fe4cde9aef5febedd163df0fbda7ed3b53a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 4 May 2023 12:26:19 +0100
Subject: [PATCH 261/531] Starting to add /correct columns

---
 .../methodology_scenarios/01_C_output.csv     | 10 ++--
 .../methodology_scenarios/02_C_FI_output.csv  | 18 +++---
 .../03_R_R_FI_output.csv                      | 26 ++++-----
 .../04_R_R_FI_FI_output.csv                   | 34 +++++------
 .../05_R_R_FI_FI_FI_year_span_output.csv      | 42 +++++++-------
 .../06_BI_BI_R_output.csv                     | 26 ++++-----
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          | 58 +++++++++----------
 .../methodology_scenarios/08_R_R_R_output.csv | 26 ++++-----
 .../09_R_NS_C_output.csv                      | 24 ++++----
 .../10_C_FI_NS_R_output.csv                   | 32 +++++-----
 .../11_R_R_FI-BI_R_R_output.csv               | 50 ++++++++--------
 .../12_C_FI_FI_FI_FI_output.csv               | 42 +++++++-------
 12 files changed, 194 insertions(+), 194 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index 52a054ee..ee58677d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward,default_forward,default_backward,default_construction
-10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE
-10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE
-10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE
-10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,,,,TRUE,TRUE,FALSE
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,true,true,true,true,false
+10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,true,true,true,true,false
+10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,true,true,true,true,false
+10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 0436a18f..97784ca4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,FALSE,FALSE,FALSE,FALSE
-20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,FALSE,FALSE,FALSE,FALSE
-20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,FALSE,FALSE,FALSE,FALSE
-20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,FALSE,FALSE,FALSE,FALSE
-20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,FALSE,FALSE,FALSE,FALSE
-20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,FALSE,FALSE,FALSE,FALSE
-20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,,,,
-20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,true,true,true,false,false
+20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,true,true,false,true,false
+20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,true,true,true,false,false
+20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,true,true,true,false,true,false
+20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,true,true,true,true,false,false
+20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,true,true,true,false,true,false
+20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,,,,true,false,false
+20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 997ea7d8..37006a08 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,FALSE,FALSE,FALSE,FALSE
-30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,FALSE,FALSE,FALSE,FALSE
-30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,FALSE,FALSE,FALSE,FALSE
-30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,FALSE,FALSE,FALSE,FALSE
-30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,FALSE,FALSE,FALSE,FALSE
-30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,FALSE,FALSE,FALSE,FALSE
-30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,FALSE,FALSE,FALSE,FALSE
-30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,FALSE,FALSE,FALSE,FALSE
-30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,FALSE,FALSE,FALSE,FALSE
-30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,FALSE,FALSE,FALSE,FALSE
-30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,FALSE,FALSE,FALSE,FALSE
-30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,true,true,true,false,false
+30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
+30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,true,true,false,true,false
+30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,true,true,true,true,false,false
+30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
+30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,true,true,true,false,true,false
+30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,true,true,true,true,false,false
+30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
+30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,true,true,true,false,true,false
+30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,true,true,true,true,false,false
+30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
+30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index 0363b75f..d7aa570f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,FALSE,FALSE,FALSE,FALSE
-40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,FALSE,FALSE,FALSE,FALSE
-40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,FALSE,FALSE,FALSE,FALSE
-40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,FALSE,FALSE,FALSE,FALSE
-40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,FALSE,FALSE,FALSE,FALSE
-40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,FALSE,FALSE,FALSE,FALSE
-40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,FALSE,FALSE,FALSE,FALSE
-40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,FALSE,FALSE,FALSE,FALSE
-40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,FALSE,FALSE,FALSE,FALSE
-40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,FALSE,FALSE,FALSE,FALSE
-40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,FALSE,FALSE,FALSE,FALSE
-40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,FALSE,FALSE,FALSE,FALSE
-40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,FALSE,FALSE,FALSE,FALSE
-40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,FALSE,FALSE,FALSE,FALSE
-40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,,,,
-40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,true,true,true,false,false
+40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
+40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
+40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,true,true,true,false,true,false
+40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,true,true,true,true,false,false
+40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
+40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
+40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,true,true,true,false,true,false
+40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,true,true,true,true,false,false
+40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
+40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
+40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,true,true,true,false,true,false
+40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,true,true,true,true,false,false
+40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
+40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,,,,false,false,false
+40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 3d935ec6..217b6649 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
-50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
-50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
-50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
-50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
-50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
-50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
-50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
-50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
-50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
-50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
-50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
-50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,FALSE,FALSE,FALSE,FALSE
-50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,FALSE,FALSE,FALSE,FALSE
-50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,FALSE,FALSE,FALSE,FALSE
-50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,FALSE,FALSE,FALSE,FALSE
-50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,FALSE,FALSE,FALSE,FALSE
-50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,,
-50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,,
-50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,true,true,true,false,false
+50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
+50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
+50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,true,true,true,false,false,false
+50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,true,true,true,false,true,false
+50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,true,true,true,true,false,false
+50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
+50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
+50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,true,true,true,false,false,false
+50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,true,true,true,false,true,false
+50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,true,true,true,true,false,false
+50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
+50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
+50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,true,true,true,false,false,false
+50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,true,true,true,false,true,false
+50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,true,true,true,true,false,false
+50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
+50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,,false,false,false
+50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,,false,false,false
+50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index 83c1c5f5..ba7596a9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,FALSE,FALSE,FALSE,FALSE
-60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,FALSE,FALSE,FALSE,FALSE
-60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,FALSE,FALSE,FALSE,FALSE
-60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,FALSE,FALSE,FALSE,FALSE
-60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,FALSE,FALSE,FALSE,FALSE
-60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,FALSE,FALSE,FALSE,FALSE
-60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,FALSE,FALSE,FALSE,FALSE
-60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,FALSE,FALSE,FALSE,FALSE
-60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,FALSE,FALSE,FALSE,FALSE
-60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,,,,
-60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,,,,
-60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,FALSE,FALSE,FALSE,FALSE
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,true,true,true,false,false
+60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
+60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,true,true,false,true,false
+60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,true,true,true,true,false,false
+60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
+60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,true,true,true,false,true,false
+60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,true,true,true,true,false,false
+60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
+60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,true,true,true,false,true,false
+60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,,,,true,false,false
+60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,,,,false,false,false
+60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 56b6ae62..b87735e0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,FALSE,FALSE,FALSE,FALSE
-70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,FALSE,FALSE,FALSE,FALSE
-70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,FALSE,FALSE,FALSE,FALSE
-70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,FALSE,FALSE,FALSE,FALSE
-70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,FALSE,FALSE,FALSE,FALSE
-70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,FALSE,FALSE,FALSE,FALSE
-70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,FALSE,FALSE,FALSE,FALSE
-70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,FALSE,FALSE,FALSE,FALSE
-70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,FALSE,FALSE,FALSE,FALSE
-70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,FALSE,FALSE,FALSE,FALSE
-70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,FALSE,FALSE,FALSE,FALSE
-70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,FALSE,FALSE,FALSE,FALSE
-70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,FALSE,FALSE,FALSE,FALSE
-70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,FALSE,FALSE,FALSE,FALSE
-70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,FALSE,FALSE,FALSE,FALSE
-70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,FALSE,FALSE,FALSE,FALSE
-70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,FALSE,FALSE,FALSE,FALSE
-70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,FALSE,FALSE,FALSE,FALSE
-70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,FALSE,FALSE,FALSE,FALSE
-70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,FALSE,FALSE,FALSE,FALSE
-70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,FALSE,FALSE,FALSE,FALSE
-70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,,,,
-70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,,,,
-70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,FALSE,FALSE,FALSE,FALSE
-70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,,,,
-70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,,,,
-70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,FALSE,FALSE,FALSE,FALSE
-70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,true,true,true,false,false
+70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
+70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
+70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,true,true,true,false,false,false
+70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,true,true,true,false,false,false
+70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
+70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,true,true,true,false,true,false
+70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,true,true,true,true,false,false
+70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
+70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
+70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,true,true,true,false,false,false
+70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,true,true,true,false,false,false
+70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
+70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,true,true,true,false,true,false
+70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,true,true,true,true,false,false
+70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
+70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
+70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,true,true,true,false,false,false
+70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,true,true,true,false,false,false
+70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
+70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,true,true,true,false,true,false
+70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,,,,true,false,false
+70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,,,,false,false,false
+70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
+70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,,,,false,false,false
+70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,,,,false,false,false
+70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
+70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index 5f7dc1aa..569a025b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,FALSE,FALSE,FALSE,FALSE
-80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,FALSE,FALSE,FALSE,FALSE
-80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,FALSE,FALSE,FALSE,FALSE
-80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,FALSE,FALSE,FALSE,FALSE
-80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,FALSE,FALSE,FALSE,FALSE
-80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,FALSE,FALSE,FALSE,FALSE
-80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,FALSE,FALSE,FALSE,FALSE
-80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,FALSE,FALSE,FALSE,FALSE
-80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,FALSE,FALSE,FALSE,FALSE
-80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,FALSE,FALSE,FALSE,FALSE
-80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,FALSE,FALSE,FALSE,FALSE
-80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,FALSE,FALSE,FALSE,FALSE
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,true,true,true,false,false
+80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
+80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,true,true,false,true,false
+80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,true,true,true,true,false,false
+80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
+80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,true,true,true,false,true,false
+80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,true,true,true,true,false,false
+80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
+80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,true,true,true,false,true,false
+80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,true,true,true,true,false,false
+80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
+80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 374d7124..313c8ac5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,FALSE,FALSE,FALSE,FALSE
-90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,FALSE,FALSE,FALSE,FALSE
-90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,FALSE,FALSE,FALSE,FALSE
-90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,FALSE,FALSE,FALSE,FALSE
-90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,FALSE,FALSE,FALSE,FALSE
-90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,FALSE,FALSE,FALSE,FALSE
-90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,FALSE,FALSE,FALSE,FALSE
-90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,FALSE,FALSE,FALSE,FALSE
-90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,FALSE,FALSE,FALSE,FALSE
-90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,FALSE,FALSE,FALSE,FALSE
-90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,true,true,true,false,false
+90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
+90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,true,true,false,true,false
+90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,true,true,true,true,false,false
+90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
+90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,true,true,true,false,true,false
+90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,true,true,true,true,false,false
+90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
+90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,true,true,true,false,true,false
+90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,true,true,true,true,false,false
+90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index 82ad1fe8..30576d7e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,FALSE,FALSE,FALSE,FALSE
-100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,FALSE,FALSE,FALSE,FALSE
-100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,FALSE,FALSE,FALSE,FALSE
-100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,FALSE,FALSE,FALSE,FALSE
-100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,FALSE,FALSE,FALSE,FALSE
-100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,FALSE,FALSE,FALSE,FALSE
-100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,FALSE,FALSE,FALSE,FALSE
-100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,FALSE,FALSE,FALSE,FALSE
-100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,FALSE,FALSE,FALSE,FALSE
-100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,FALSE,FALSE,FALSE,FALSE
-100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,FALSE,FALSE,FALSE,FALSE
-100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,FALSE,FALSE,FALSE,FALSE
-100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,,,,
-100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,,,,
-100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,FALSE,FALSE,FALSE,FALSE
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,true,true,true,false,false
+100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
+100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
+100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,true,true,true,false,true,false
+100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,true,true,true,true,false,false
+100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
+100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
+100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,true,true,true,false,true,false
+100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,true,true,true,true,false,false
+100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
+100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
+100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,true,true,true,false,true,false
+100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,,,,true,false,false
+100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,,,,false,false,false
+100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index cbf76b30..b353c136 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,FALSE,FALSE,FALSE,FALSE
-110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,FALSE,FALSE,FALSE,FALSE
-110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,FALSE,FALSE,FALSE,FALSE
-110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,FALSE,FALSE,FALSE,FALSE
-110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,FALSE,FALSE,FALSE,FALSE
-110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,FALSE,FALSE,FALSE,FALSE
-110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,FALSE,FALSE,FALSE,FALSE
-110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,FALSE,FALSE,FALSE,FALSE
-110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,FALSE,FALSE,FALSE,FALSE
-110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,FALSE,FALSE,FALSE,FALSE
-110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,FALSE,FALSE,FALSE,FALSE
-110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,,,,
-110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,FALSE,FALSE,FALSE,FALSE
-110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,FALSE,FALSE,FALSE,FALSE
-110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,FALSE,FALSE,FALSE,FALSE
-110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,FALSE,FALSE,FALSE,FALSE
-110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,FALSE,FALSE,FALSE,FALSE
-110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,FALSE,FALSE,FALSE,FALSE
-110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,FALSE,FALSE,FALSE,FALSE
-110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,FALSE,FALSE,FALSE,FALSE
-110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,FALSE,FALSE,FALSE,FALSE
-110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,,,,
-110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,FALSE,FALSE,FALSE,FALSE
-110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,FALSE,FALSE,FALSE,FALSE
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,true,true,true,false,false
+110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
+110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,true,true,false,true,false
+110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,true,true,true,true,false,false
+110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
+110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,true,true,true,false,true,false
+110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,true,true,true,true,false,false
+110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,true,true,true,false,true,false
+110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,true,true,true,true,false,false
+110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
+110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,,,,false,true,false
+110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,true,true,true,true,false,false
+110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
+110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,true,true,true,false,true,false
+110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,true,true,true,true,false,false
+110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
+110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,true,true,true,false,true,false
+110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,true,true,true,true,false,false
+110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
+110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,true,true,true,false,true,false
+110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,,,,true,false,false
+110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
+110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 0720ee74..a97932ff 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,FALSE,FALSE,FALSE,FALSE
-120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,FALSE,FALSE,FALSE,FALSE
-120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,FALSE,FALSE,FALSE,FALSE
-120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,FALSE,FALSE,FALSE,FALSE
-120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,FALSE,FALSE,FALSE,FALSE
-120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,FALSE,FALSE,FALSE,FALSE
-120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,FALSE,FALSE,FALSE,FALSE
-120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,FALSE,FALSE,FALSE,FALSE
-120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,FALSE,FALSE,FALSE,FALSE
-120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,FALSE,FALSE,FALSE,FALSE
-120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,FALSE,FALSE,FALSE,FALSE
-120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,FALSE,FALSE,FALSE,FALSE
-120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,FALSE,FALSE,FALSE,FALSE
-120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,FALSE,FALSE,FALSE,FALSE
-120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,FALSE,FALSE,FALSE,FALSE
-120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,,,,
-120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,,,,
-120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,,,,
-120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,,,,
-120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,true,true,true,false,false
+120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
+120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
+120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,true,true,true,false,false,false
+120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,true,true,true,false,true,false
+120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,true,true,true,true,false,false
+120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
+120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
+120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,true,true,true,false,false,false
+120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,true,true,true,false,true,false
+120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,true,true,true,true,false,false
+120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
+120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
+120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,true,true,true,false,false,false
+120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,true,true,true,false,true,false
+120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,,,,true,false,false
+120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,,,,false,false,false
+120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,,,,false,false,false
+120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,,,,false,false,false
+120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,,,,false,true,false

From e80c986fb933539ad595c7e8219aa70e01df1448 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 4 May 2023 12:27:11 +0100
Subject: [PATCH 262/531] Trim and link markers to inclusion markers and stop
 producing trimming related markers when not trimming

---
 .../imputation/ratio_calculators.py           | 109 ++++++++++--------
 1 file changed, 59 insertions(+), 50 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 29653b20..1d3d5f3e 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -31,10 +31,10 @@ def mean_of_ratios(
     include_zeros: Optional[bool] = False,
     growth_forward_col: Optional[str] = "growth_forward",
     growth_backward_col: Optional[str] = "growth_backward",
-    filtered_forward_col: Optional[str] = "filtered_forward",
-    filtered_backward_col: Optional[str] = "filtered_backward",
-    trimmed_forward_col: Optional[str] = "trimmed_forward",
-    trimmed_backward_col: Optional[str] = "trimmed_backward",
+    link_inclusion_forward_col: Optional[str] = "link_inclusion_forward",
+    link_inclusion_backward_col: Optional[str] = "link_inclusion_backward",
+    trim_inclusion_forward_col: Optional[str] = "trim_inclusion_forward",
+    trim_inclusion_backward_col: Optional[str] = "trim_inclusion_backward",
     **_kwargs,
 ) -> List[RatioCalculationResult]:
     if lower_trim is not None:
@@ -63,12 +63,12 @@ def mean_of_ratios(
         ).alias("next_output"),
         expr(
             """
-            NOT (previous.match AND current.match) AND previous.match IS NOT NULL
-            AS filtered_forward"""
+            previous.match IS NOT NULL AND previous.match AND current.match
+            AS link_inclusion_forward"""
         ),
         expr(
-            """NOT (next.match AND current.match) AND next.match IS NOT NULL
-            AS filtered_backward"""
+            """next.match IS NOT NULL AND next.match AND current.match
+            AS link_inclusion_backward"""
         ),
     ).selectExpr(
         "period",
@@ -76,10 +76,10 @@ def mean_of_ratios(
         "ref",
         "aux",
         "current_output",
-        "filtered_forward",
-        "filtered_backward",
+        "link_inclusion_forward",
+        "link_inclusion_backward",
         """CASE
-                WHEN NOT filtered_forward THEN CASE
+                WHEN link_inclusion_forward THEN CASE
                     WHEN previous_output = 0 OR
                     (current_output = 0 AND previous_output IS NOT NULL)
                     THEN 1
@@ -87,7 +87,7 @@ def mean_of_ratios(
                 END
             END AS growth_forward""",
         """CASE
-                WHEN NOT filtered_backward
+                WHEN link_inclusion_backward
                 THEN CASE
                     WHEN
                         next_output = 0
@@ -116,33 +116,33 @@ def upper_bound(c):
                             sum(
                                 cast(growth_forward IS NOT NULL AS integer)
                             ) AS count_forward
-                        """
+                            """
                         ),
                         expr(
                             """
                             sum(
                                 cast(growth_backward IS NOT NULL AS integer)
                             ) AS count_backward
-                        """
+                            """
                         ),
                         expr(
                             """
-                            sum(cast(filtered_forward AS integer))
-                            AS count_filtered_forward
-                        """
+                            sum(cast(not link_inclusion_forward AS integer))
+                            AS count_exclusion_forward
+                            """
                         ),
                         expr(
                             """
-                            sum(cast(filtered_backward AS integer))
-                            AS count_filtered_backward
-                        """
+                            sum(cast(not link_inclusion_backward AS integer))
+                            AS count_exclusion_backward
+                            """
                         ),
                     )
                     .select(
                         col("period"),
                         col("grouping"),
-                        col("count_filtered_forward"),
-                        col("count_filtered_backward"),
+                        col("count_exclusion_forward"),
+                        col("count_exclusion_backward"),
                         col("count_forward"),
                         col("count_backward"),
                         lower_bound(
@@ -187,34 +187,34 @@ def upper_bound(c):
                 ),
             )
             .withColumn(
-                "trimmed_forward",
-                ~(
+                "trim_inclusion_forward",
+                (
                     col("num_forward").between(
                         col("lower_forward"), col("upper_forward")
                     )
                     | (
-                        (trim_threshold - col("count_filtered_forward"))
-                        >= col("count_forward")
+                        (trim_threshold - col("count_exclusion_forward"))
+                        < col("count_forward")
                     )
                 ),
             )
             .withColumn(
-                "trimmed_backward",
-                ~(
+                "trim_inclusion_backward",
+                (
                     col("num_backward").between(
                         col("lower_backward"), col("upper_backward")
                     )
                     | (
-                        (trim_threshold - col("count_filtered_backward"))
-                        >= col("count_backward")
+                        (trim_threshold - col("count_exclusion_backward"))
+                        < col("count_backward")
                     )
                 ),
             )
         )
 
     else:
-        df = df.withColumn("trimmed_forward", lit(False)).withColumn(
-            "trimmed_backward", lit(False)
+        df = df.withColumn("trim_inclusion_forward", lit(False)).withColumn(
+            "trim_inclusion_backward", lit(False)
         )
 
     ratio_df = (
@@ -222,22 +222,22 @@ def upper_bound(c):
         .agg(
             expr(
                 """mean(
-                CASE WHEN NOT trimmed_forward THEN growth_forward END
+                CASE WHEN trim_inclusion_forward THEN growth_forward END
             ) AS forward"""
             ),
             expr(
                 """mean(
-                CASE WHEN NOT trimmed_backward THEN growth_backward END
+                CASE WHEN trim_inclusion_backward THEN growth_backward END
             ) AS backward"""
             ),
             expr(
                 """sum(cast(
-                NOT trimmed_forward AND growth_forward IS NOT NULL AS integer
+                trim_inclusion_forward AND growth_forward IS NOT NULL AS integer
             )) AS count_forward"""
             ),
             expr(
                 """sum(cast(
-                NOT trimmed_backward AND growth_backward IS NOT NULL AS integer
+                trim_inclusion_backward AND growth_backward IS NOT NULL AS integer
             )) AS count_backward"""
             ),
         )
@@ -245,30 +245,39 @@ def upper_bound(c):
         .withColumn("default_backward", expr("backward IS NOT NULL"))
     )
 
-    growth_df = df.select(
+    growth_select_cols = [
         "ref",
         "period",
         "grouping",
         "growth_forward",
         "growth_backward",
-        "filtered_forward",
-        "filtered_backward",
-        "trimmed_forward",
-        "trimmed_backward",
-    )
+        "link_inclusion_forward",
+        "link_inclusion_backward",
+    ]
+    growth_additional_outputs = {
+        "growth_forward": growth_forward_col,
+        "growth_backward": growth_backward_col,
+        "link_inclusion_forward": link_inclusion_forward_col,
+        "link_inclusion_backward": link_inclusion_backward_col,
+    }
+
+    if lower_trim is not None:
+        growth_additional_outputs.update({
+            "trim_inclusion_forward": trim_inclusion_forward_col,
+            "trim_inclusion_backward": trim_inclusion_backward_col,
+        })
+        growth_select_cols += [
+            "trim_inclusion_forward",
+            "trim_inclusion_backward",
+        ]
+
+    growth_df = df.select(growth_select_cols)
 
     return [
         RatioCalculationResult(
             data=growth_df,
             join_columns=["period", "grouping", "ref"],
-            additional_outputs={
-                "growth_forward": growth_forward_col,
-                "growth_backward": growth_backward_col,
-                "filtered_forward": filtered_forward_col,
-                "filtered_backward": filtered_backward_col,
-                "trimmed_forward": trimmed_forward_col,
-                "trimmed_backward": trimmed_backward_col,
-            },
+            additional_outputs=growth_additional_outputs,
         ),
         RatioCalculationResult(
             data=ratio_df,

From ad9a9e014c8a5f14dcce83f816e667bde3e934da Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 4 May 2023 12:29:28 +0100
Subject: [PATCH 263/531] Reformat via Black

---
 .../imputation/engine.py                      | 34 ++++++-------------
 .../imputation/ratio_calculators.py           | 10 +++---
 2 files changed, 17 insertions(+), 27 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 149069a0..c81f9701 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -205,23 +205,17 @@ def prepare_df(df: DataFrame) -> DataFrame:
 
         nonlocal prior_period_df
 
-        prior_period_df = (
-            prepared_df.selectExpr("min(previous_period) AS prior_period")
-            .localCheckpoint(eager=True)
-        )
+        prior_period_df = prepared_df.selectExpr(
+            "min(previous_period) AS prior_period"
+        ).localCheckpoint(eager=True)
 
         if prepared_back_data_df:
             prepared_back_data_df = (
                 prepared_back_data_df.join(
-                    prior_period_df,
-                    [col("period") == col("prior_period")]
+                    prior_period_df, [col("period") == col("prior_period")]
                 )
                 .drop("prior_period")
-                .filter(
-                    (
-                        (col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))
-                    )
-                )
+                .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
                 .withColumn("previous_period", calculate_previous_period(col("period")))
                 .withColumn("next_period", calculate_next_period(col("period")))
             )
@@ -347,7 +341,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         df = df.join(
             filtered_df.select("ref", "period", expr("match AS link_inclusion_marker")),
             ["ref", "period"],
-            "left"
+            "left",
         )
         output_col_mapping["link_inclusion_marker"] = link_inclusion_marker_col
         if weight is not None:
@@ -574,17 +568,11 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
 
     # --- Utility functions ---
     def create_output(df: DataFrame) -> DataFrame:
-        return (
-            df.join(
-                prior_period_df,
-                [col("prior_period") < col("period")]
-            )
-            .select(
-                [
-                    col(k).alias(output_col_mapping[k])
-                    for k in sorted(output_col_mapping.keys() & set(df.columns))
-                ]
-            )
+        return df.join(prior_period_df, [col("prior_period") < col("period")]).select(
+            [
+                col(k).alias(output_col_mapping[k])
+                for k in sorted(output_col_mapping.keys() & set(df.columns))
+            ]
         )
 
     def calculate_previous_period(period: Column) -> Column:
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 1d3d5f3e..df438712 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -262,10 +262,12 @@ def upper_bound(c):
     }
 
     if lower_trim is not None:
-        growth_additional_outputs.update({
-            "trim_inclusion_forward": trim_inclusion_forward_col,
-            "trim_inclusion_backward": trim_inclusion_backward_col,
-        })
+        growth_additional_outputs.update(
+            {
+                "trim_inclusion_forward": trim_inclusion_forward_col,
+                "trim_inclusion_backward": trim_inclusion_backward_col,
+            }
+        )
         growth_select_cols += [
             "trim_inclusion_forward",
             "trim_inclusion_backward",

From e75c6653a2d0ff0df58fb0d199690cdcd28acae0 Mon Sep 17 00:00:00 2001
From: Dom Ford <dom.ford@ons.gov.uk>
Date: Thu, 4 May 2023 12:55:17 +0100
Subject: [PATCH 264/531] output 13 done for checking.

---
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          | 56 +++++++++----------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index f6890457..962f5bbb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,FALSE,FALSE,FALSE,FALSE
-130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,FALSE,FALSE,FALSE,FALSE
-130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,FALSE,FALSE,FALSE,FALSE
-130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,FALSE,FALSE,FALSE,FALSE
-130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,FALSE,FALSE,FALSE,FALSE
-130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,FALSE,FALSE,FALSE,FALSE
-130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,FALSE,FALSE,FALSE,FALSE
-130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,FALSE,FALSE,FALSE,FALSE
-130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,FALSE,FALSE,FALSE,FALSE
-130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,FALSE,FALSE,FALSE,FALSE
-130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,FALSE,FALSE,FALSE,FALSE
-130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,FALSE,FALSE,FALSE,FALSE
-130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,FALSE,FALSE,FALSE,FALSE
-130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,FALSE,FALSE,FALSE,FALSE
-130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,FALSE,FALSE,FALSE,FALSE
-130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,FALSE,FALSE,FALSE,FALSE
-130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,FALSE,FALSE,FALSE,FALSE
-130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,FALSE,FALSE,FALSE,FALSE
-130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,FALSE,FALSE,FALSE,FALSE
-130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,FALSE,FALSE,FALSE,FALSE
-130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,FALSE,FALSE,FALSE,FALSE
-130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,FALSE,FALSE,FALSE,FALSE
-130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,,,,
-130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,,,,
-130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,,,,
-130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,,,,
-130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,FALSE,FALSE,FALSE,FALSE
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,true,true,true,false,false
+130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
+130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
+130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,true,true,true,false,false,false
+130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,true,true,true,false,false,false
+130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,true,true,true,false,false,false
+130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,true,true,true,false,true,false
+130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,true,true,true,true,false,false
+130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
+130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
+130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,true,true,true,false,false,false
+130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,true,true,true,false,false,false
+130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,true,true,true,false,false,false
+130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,true,true,true,false,true,false
+130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,true,true,true,true,false,false
+130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
+130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
+130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,true,true,true,false,false,false
+130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,true,true,true,false,false,false
+130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,true,true,true,false,false,false
+130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,true,true,true,false,true,false
+130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,true,true,true,true,false,false
+130004,202002,100,37,12734.3292,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,true,,,false,false,false
+130004,202003,100,37,12034.73601,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,true,,,false,false,false
+130004,202005,100,37,10550.61563,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,true,,,false,false,false
+130004,202006,100,37,10954.18884,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,true,,,false,false,false
+130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,true,true,true,false,true,false
\ No newline at end of file

From 550d7771cc4713e8ecd7f0759a3e6931753c49f8 Mon Sep 17 00:00:00 2001
From: Dom Ford <dom.ford@ons.gov.uk>
Date: Thu, 4 May 2023 12:57:44 +0100
Subject: [PATCH 265/531] output 13 done for checking again.

---
 .../13_R_FI_FI_NS_BI_BI_R_output.csv                      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 962f5bbb..e3eb883c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -21,8 +21,8 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,true,true,true,false,false,false
 130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,true,true,true,false,true,false
 130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,true,true,true,true,false,false
-130004,202002,100,37,12734.3292,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,true,,,false,false,false
-130004,202003,100,37,12034.73601,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,true,,,false,false,false
-130004,202005,100,37,10550.61563,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,true,,,false,false,false
-130004,202006,100,37,10954.18884,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,true,,,false,false,false
+130004,202002,100,37,12734.3292,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,,,,false,false,false
+130004,202003,100,37,12034.73601,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,,,,false,false,false
+130004,202005,100,37,10550.61563,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,,,,false,false,false
+130004,202006,100,37,10954.18884,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,,,,false,false,false
 130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,true,true,true,false,true,false
\ No newline at end of file

From 8b8bfdb28673cbf4e306219925b0087e6b8e9677 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 4 May 2023 14:48:26 +0100
Subject: [PATCH 266/531] Mostly Updated Test Data

---
 .../19_link_columns_output.csv                |  50 +++---
 .../28_link_columns_filtered_output.csv       |  66 ++++----
 .../33_partial_link_columns_output.csv        |  50 +++---
 .../35_TB_10_R_R_FI_output.csv                |  74 ++++-----
 .../36_TB_10_BI_BI_R_output.csv               |  74 ++++-----
 .../37_TB_10_C_FI_FI_output.csv               |  74 ++++-----
 .../38_T_10_R_R_FI_output.csv                 |  74 ++++-----
 .../39_B_10_R_R_FI_output.csv                 |  74 ++++-----
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  62 ++++----
 .../41_TB_10_R_R_FI_filtered_output.csv       |  74 ++++-----
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 146 +++++++++---------
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 128 +++++++--------
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 128 +++++++--------
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |  70 ++++-----
 .../46_TB_10_BI_BI_R_filtered_output.csv      | 128 +++++++--------
 .../methodology_scenarios/47_TB_50_output.csv |  74 ++++-----
 ...R_R_FI_filtered_partial_default_output.csv |  44 +++---
 ...9_C_FI_FI_filtered_full_default_output.csv |  44 +++---
 18 files changed, 717 insertions(+), 717 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index c6b01432..10c6bfa2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction
-190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,0,0,0
-190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,0,0,0
-190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,0,0,0
-190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,0,0,0
-190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,0,0,0
-190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,0,0,0
-190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,0,0,0
-190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,0,0,0
-190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,0,0,0
-190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,0,0,0
-190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,0,0,0
-190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,0,0,0
-190004,202001,100,51,2247,R,,,1,0.9214,50.3694,0,0,0
-190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,0,0,0
-190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,0,0,0
-190004,202004,100,51,8608,R,,,1.113,1,110.5473,0,0,0
-190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,0,0,0
-190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,0,0,0
-190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,0,0,0
-190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,0,0,0
-190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,0,0,0
-190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,0,0,0
-190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,0,0,0
-190006,202004,100,8,370.1196299,FIC,,,1.113,1,110.5473,0,0,0
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,0,0,0,true,false,false
+190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,0,0,0,false,true,false
+190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,0,0,0,true,false,false
+190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,0,0,0,false,true,false
+190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,0,0,0,true,false,false
+190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,0,0,0,false,true,false
+190004,202001,100,51,2247,R,,,1,0.9214,50.3694,0,0,0,true,false,false
+190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190004,202004,100,51,8608,R,,,1.113,1,110.5473,0,0,0,false,true,false
+190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,0,0,0,true,false,false
+190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,0,0,0,false,true,false
+190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,0,0,0,true,false,false
+190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190006,202004,100,8,370.1196299,FIC,,,1.113,1,110.5473,0,0,0,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
index a47b4845..6f042ba7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-190001,202001,100,95,,1.853682946,1,0.9214,50.3694,9261,R,0,0,0,
-190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,0,0,0,
-190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,0,0,0,
-190001,202004,100,95,2.939189189,,1.113,1,110.5473,4350,R,0,0,0,
-190002,202001,100,17,,0.562673451,1,0.9214,50.3694,2433,R,0,0,0,
-190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,0,0,0,
-190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,0,0,0,
-190002,202004,100,17,11.26857143,,1.113,1,110.5473,700,R,0,0,0,
-190003,202001,100,64,,1.870080607,1,0.9214,50.3694,7888,R,0,0,0,
-190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,0,0,0,
-190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,0,0,0,
-190003,202004,100,64,0.537083388,,1.113,1,110.5473,4077,R,0,0,0,
-190004,202001,100,51,,,1,0.9214,50.3694,2247,R,0,0,0,
-190004,202002,100,51,,,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,
-190004,202003,100,51,,,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,
-190004,202004,100,51,,,1.113,1,110.5473,8608,R,0,0,0,
-190005,202001,100,34,,,1,0.9214,50.3694,6271.13538,BI,0,0,0,
-190005,202002,100,34,,,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,
-190005,202003,100,34,,0.867939229,0.9685,1.8795,89.3761,4456,R,0,0,0,
-190005,202004,100,34,1.152154399,,1.113,1,110.5473,5134,R,0,0,0,
-190006,202001,100,8,,,1,0.9214,50.3694,402.9552,C,0,0,0,
-190006,202002,100,8,,,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,
-190006,202003,100,8,,,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,
-190006,202004,100,8,,,1.113,1,110.5473,370.1196299,FIC,0,0,0,
-190007,202001,100,85,,,1,0.9214,50.3694,150000,R,0,0,0,TRUE
-190007,202002,100,85,,,0.8521,1.5274,121.4187,120000,R,0,0,0,TRUE
-190007,202003,100,85,,,0.9685,1.8795,89.3761,110000,R,0,0,0,TRUE
-190007,202004,100,85,,,1.113,1,110.5473,180000,R,0,0,0,TRUE
-190008,202001,100,71,,,1,0.9214,50.3694,3576.2274,C,0,0,0,
-190008,202002,100,71,,,0.8521,1.5274,121.4187,3047.303368,FIC,0,0,0,
-190008,202003,100,71,,,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,
-190008,202004,100,71,,,1.113,1,110.5473,3284.811716,FIC,0,0,0,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,,1.853682946,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
+190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
+190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
+190001,202004,100,95,2.939189189,,1.113,1,110.5473,4350,R,0,0,0,false,true,false
+190002,202001,100,17,,0.562673451,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
+190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
+190002,202004,100,17,11.26857143,,1.113,1,110.5473,700,R,0,0,0,false,true,false
+190003,202001,100,64,,1.870080607,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
+190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
+190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
+190003,202004,100,64,0.537083388,,1.113,1,110.5473,4077,R,0,0,0,false,true,false
+190004,202001,100,51,,,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
+190004,202002,100,51,,,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
+190004,202003,100,51,,,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
+190004,202004,100,51,,,1.113,1,110.5473,8608,R,0,0,0,false,true,false
+190005,202001,100,34,,,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
+190005,202002,100,34,,,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
+190005,202003,100,34,,0.867939229,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
+190005,202004,100,34,1.152154399,,1.113,1,110.5473,5134,R,0,0,0,false,true,false
+190006,202001,100,8,,,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
+190006,202002,100,8,,,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
+190006,202003,100,8,,,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
+190006,202004,100,8,,,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
+190007,202001,100,85,,,1,0.9214,50.3694,150000,R,0,0,0,true,false,false
+190007,202002,100,85,,,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false
+190007,202003,100,85,,,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false
+190007,202004,100,85,,,1.113,1,110.5473,180000,R,0,0,0,false,true,false
+190008,202001,100,71,,,1,0.9214,50.3694,3576.2274,C,0,0,0,true,false,false
+190008,202002,100,71,,,0.8521,1.5274,121.4187,3047.303368,FIC,0,0,0,false,false,false
+190008,202003,100,71,,,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false
+190008,202004,100,71,,,1.113,1,110.5473,3284.811716,FIC,0,0,0,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index 594f30af..d5e54b05 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-190001,202001,100,95,,1.853682946,1,0.9214,96.16299559,9261,R,0,0,4
-190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,0,0,3
-190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,0,0,4
-190001,202004,100,95,2.939189189,,1.113,1,87.62068966,4350,R,0,0,5
-190002,202001,100,17,,0.562673451,1,0.9214,96.16299559,2433,R,0,0,4
-190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,0,0,3
-190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,0,0,4
-190002,202004,100,17,11.26857143,,1.113,1,87.62068966,700,R,0,0,5
-190003,202001,100,64,,1.870080607,1,0.9214,96.16299559,7888,R,0,0,4
-190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,0,0,3
-190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,0,0,4
-190003,202004,100,64,0.537083388,,1.113,1,87.62068966,4077,R,0,0,5
-190004,202001,100,51,,,1,0.9214,96.16299559,2247,R,0,0,4
-190004,202002,100,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,0,0,3
-190004,202003,100,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,0,0,4
-190004,202004,100,51,,,1.113,1,87.62068966,8608,R,0,0,5
-190005,202001,100,34,,,1,0.9214,96.16299559,6271.13538,BI,0,0,4
-190005,202002,100,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,0,0,3
-190005,202003,100,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,0,0,4
-190005,202004,100,34,1.152154399,,1.113,1,87.62068966,5134,R,0,0,5
-190006,202001,100,8,,,1,0.9214,96.16299559,769.3039647,C,0,0,4
-190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.523909,FIC,0,0,3
-190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.874906,FIC,0,0,4
-190006,202004,100,8,,,1.113,1,87.62068966,706.6157695,FIC,0,0,5
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,,1.853682946,1,0.9214,96.16299559,9261,R,0,0,4,true,false,false
+190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,0,0,3,false,false,false
+190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,0,0,4,false,false,false
+190001,202004,100,95,2.939189189,,1.113,1,87.62068966,4350,R,0,0,5,false,true,false
+190002,202001,100,17,,0.562673451,1,0.9214,96.16299559,2433,R,0,0,4,true,false,false
+190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,0,0,3,false,false,false
+190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,0,0,4,false,false,false
+190002,202004,100,17,11.26857143,,1.113,1,87.62068966,700,R,0,0,5,false,true,false
+190003,202001,100,64,,1.870080607,1,0.9214,96.16299559,7888,R,0,0,4,true,false,false
+190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,0,0,3,false,false,false
+190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,0,0,4,false,false,false
+190003,202004,100,64,0.537083388,,1.113,1,87.62068966,4077,R,0,0,5,false,true,false
+190004,202001,100,51,,,1,0.9214,96.16299559,2247,R,0,0,4,true,false,false
+190004,202002,100,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,0,0,3,false,false,false
+190004,202003,100,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,0,0,4,false,false,false
+190004,202004,100,51,,,1.113,1,87.62068966,8608,R,0,0,5,false,true,false
+190005,202001,100,34,,,1,0.9214,96.16299559,6271.13538,BI,0,0,4,true,false,false
+190005,202002,100,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,0,0,3,false,false,false
+190005,202003,100,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,0,0,4,false,false,false
+190005,202004,100,34,1.152154399,,1.113,1,87.62068966,5134,R,0,0,5,false,true,false
+190006,202001,100,8,,,1,0.9214,96.16299559,769.3039647,C,0,0,4,true,false,false
+190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.523909,FIC,0,0,3,false,false,false
+190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.874906,FIC,0,0,4,false,false,false
+190006,202004,100,8,,,1.113,1,87.62068966,706.6157695,FIC,0,0,5,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 2d3fadd1..2dda6d56 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,1,1.598904,96.756440,8444,R,0,10,12,,
-30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,,
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,,
-30002,202001,100,72,,1.195062676,1,1.598904,96.756440,9343,R,0,10,12,,
-30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,,
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,,
-30003,202001,100,7,,4.265190233,1,1.598904,96.756440,7511,R,0,10,12,,
-30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,,
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,,
-30004,202001,100,81,,0.030288689,1,1.598904,96.756440,64,R,0,10,12,,
-30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,,
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,,
-30005,202001,100,5,,0.940914,1,1.598904,96.756440,844,R,0,10,12,,
-30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,,
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,,
-30006,202001,100,14,,0.996269,1,1.598904,96.756440,1869,R,0,10,12,,
-30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,,
-30006,202003,100,14,0.730810,,1.172329,1,76.108808,1371,R,9,0,11,,
-30007,202001,100,12,,4.475640,1,1.598904,96.756440,12769,R,0,10,12,,
-30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,,
-30007,202003,100,12,4.027690,,1.172329,1,76.108808,11491,R,9,0,11,,
-30008,202001,100,162,,0.023496,1,1.598904,96.756440,141,R,0,10,12,,TRUE
-30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,TRUE,TRUE
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,TRUE,
-30009,202001,100,26,,1.589547,1,1.598904,96.756440,6417,R,0,10,12,,
-30009,202002,100,26,0.629110,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,,
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,,
-30010,202001,100,144,,1.332612,1,1.598904,96.756440,28963,R,0,10,12,,
-30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,,
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,,
-30011,202001,100,5,,5.248035,1,1.598904,96.756440,6009,R,0,10,12,,TRUE
-30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,TRUE,TRUE
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,TRUE,
-30012,202001,100,275,,0.034034,1,1.598904,96.756440,256,R,0,10,12,,
-30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,,
-30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,true,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,true,false,true,false
+30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,true,true,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,true,true,false,true,false
+30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,true,true,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,true,true,false,true,false
+30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,true,true,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,true,true,false,true,false
+30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,true,true,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,true,true,false,true,false
+30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,true,true,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,true,true,false,true,false
+30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,true,true,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,true,true,false,true,false
+30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,true,true,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,true,true,false,true,false
+30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,true,true,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,true,false,true,false
+30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,true,true,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,true,false,true,false
+30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,true,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,true,true,false,true,false
+30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,true,true,true,false,false
+30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,true,true,true,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index 5ef55af1..767d658e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,,
-30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,,
-30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,,
-30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,,
-30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,,
-30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,,
-30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,,
-30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,,
-30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,,
-30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,,
-30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,,
-30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,,
-30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,,
-30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,,
-30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,TRUE
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,TRUE,
-30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,,
-30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,,
-30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,,
-30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,,
-30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,TRUE
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,TRUE,
-30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,
-30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,
-30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,false,true,true,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,false,false,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,false,,true,true,true,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,false,true,true,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,false,false,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,false,,true,true,true,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,false,true,true,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,false,false,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,false,,true,true,true,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,false,true,true,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,false,false,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,false,,true,true,true,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,false,true,true,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,false,false,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,false,,true,true,true,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,false,true,true,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,false,false,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,false,,true,true,true,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,false,true,true,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,false,false,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,false,,true,true,true,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,true,true,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,true,true,true,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,false,true,true,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,false,false,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,false,,true,true,true,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,false,true,true,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,false,false,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,false,,true,true,true,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,true,true,true,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,true,true,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,true,,true,true,true,false,true,false
+30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,,,,false,false,false
+30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index 97ec11c4..608ee39e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,1,1.772778,142.269430,8444,R,0,9,11,,
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,,
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,,
-30002,202001,100,72,,1.195062676,1,1.772778,142.269430,9343,R,0,9,11,,
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,,
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,,
-30003,202001,100,7,,4.265190233,1,1.772778,142.269430,7511,R,0,9,11,,
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,,
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,,
-30004,202001,100,81,,0.030288689,1,1.772778,142.269430,64,R,0,9,11,,
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,,
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,,
-30005,202001,100,5,,0.940914,1,1.772778,142.269430,844,R,0,9,11,,
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,,
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,,
-30006,202001,100,14,,0.996269,1,1.772778,142.269430,1869,R,0,9,11,,
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,,
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,,
-30007,202001,100,12,,4.47564,1,1.772778,142.269430,12769,R,0,9,11,,
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,,
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,,
-30008,202001,100,162,,0.023496,1,1.772778,142.269430,141,R,0,9,11,,TRUE
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,TRUE,
-30009,202001,100,26,,1.589547,1,1.772778,142.269430,6417,R,0,9,11,,
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,,
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,,
-30010,202001,100,144,,1.332612,1,1.772778,142.269430,28963,R,0,9,11,,
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,,
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,,
-30011,202001,100,5,,5.248035,1,1.772778,142.269430,6009,R,0,9,11,,TRUE
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,TRUE,
-30012,202001,100,275,,,1,1.772778,142.269430,39124.093264,C,0,9,11,,
-30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,
-30012,202003,100,275,,,1.172329,1,76.108808,196928.142170,FIC,9,0,11,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,true,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,true,true,false,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,true,true,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,true,true,true,false,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,true,true,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,true,true,true,false,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,true,true,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,true,true,true,false,false
+30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,true,true,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,true,true,true,false,false
+30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,true,true,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,true,true,true,false,false
+30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,true,true,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,true,true,true,false,false
+30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,true,true,true,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,true,true,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,true,,true,true,true,true,false,false
+30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,true,true,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,true,true,false,false
+30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,true,true,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,true,true,false,false
+30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,true,true,true,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,true,true,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,true,,true,true,true,true,false,false
+30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,,,,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,,,,true,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index 45304732..4b2f71b7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,1,1.455685,96.756440,8444,R,0,11,12,,
-30001,202002,100,51,0.885362387,3.732401398,6.201370,2.718598,76.385246,7476,R,11,10,12,,
-30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,,
-30002,202001,100,72,,1.195062676,1,1.455685,96.756440,9343,R,0,11,12,,
-30002,202002,100,72,0.836776196,1.596487645,6.201370,2.718598,76.385246,7818,R,11,10,12,,
-30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,,
-30003,202001,100,7,,4.265190233,1,1.455685,96.756440,7511,R,0,11,12,,
-30003,202002,100,7,0.234456131,0.271256932,6.201370,2.718598,76.385246,1761,R,11,10,12,,
-30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,,
-30004,202001,100,81,,0.030288689,1,1.455685,96.756440,64,R,0,11,12,,
-30004,202002,100,81,33.015625,11.42162162,6.201370,2.718598,76.385246,2113,R,11,10,12,,
-30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,,
-30005,202001,100,5,,0.940914,1,1.455685,96.756440,844,R,0,11,12,,
-30005,202002,100,5,1.062796,3.203571,6.201370,2.718598,76.385246,897,R,11,10,12,,
-30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,,
-30006,202001,100,14,,0.996269,1,1.455685,96.756440,1869,R,0,11,12,,
-30006,202002,100,14,1.003745,1.368344,6.201370,2.718598,76.385246,1876,R,11,10,12,,
-30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,,
-30007,202001,100,12,,4.47564,1,1.455685,96.756440,12769,R,0,11,12,,
-30007,202002,100,12,0.223432,0.248281,6.201370,2.718598,76.385246,2853,R,11,10,12,,
-30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,,
-30008,202001,100,162,,0.023496,1,1.455685,96.756440,141,R,0,11,12,,
-30008,202002,100,162,42.560284,13.859122,6.201370,2.718598,76.385246,6001,R,11,10,12,TRUE,TRUE
-30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,,
-30009,202001,100,26,,1.589547,1,1.455685,96.756440,6417,R,0,11,12,,
-30009,202002,100,26,0.62911,3.053707,6.201370,2.718598,76.385246,4037,R,11,10,12,,
-30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,,
-30010,202001,100,144,,1.332612,1,1.455685,96.756440,28963,R,0,11,12,,
-30010,202002,100,144,0.750406,2.064204,6.201370,2.718598,76.385246,21734,R,11,10,12,,
-30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,,
-30011,202001,100,5,,5.248035,1,1.455685,96.756440,6009,R,0,11,12,,TRUE
-30011,202002,100,5,0.190548,0.226106,6.201370,2.718598,76.385246,1145,R,11,10,12,,
-30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,TRUE,
-30012,202001,100,275,,0.034034,1,1.455685,96.756440,256,R,0,11,12,,
-30012,202002,100,275,29.382813,,6.201370,2.718598,76.385246,7522,R,11,10,12,,
-30012,202003,100,275,,,1.062312,1,76.108808,7990.710790,FIR,10,0,11,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,true,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,true,true,false,true,false
+30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,true,true,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,true,true,true,false,true,false
+30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,true,true,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,true,true,true,false,true,false
+30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,true,true,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,true,true,true,false,true,false
+30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,true,true,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,true,true,true,false,true,false
+30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,true,true,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,true,true,true,false,true,false
+30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,true,true,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,true,true,true,false,true,false
+30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,true,true,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,true,true,true,false,true,false
+30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,true,true,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,true,true,true,false,true,false
+30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,true,true,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,true,true,true,false,true,false
+30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,true,true,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,true,true,true,false,true,false
+30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,true,true,true,true,false,false
+30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,true,true,true,false,false,false
+30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index 3588910b..fcfe467f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,
-30001,202002,100,51,0.885362387,3.732401398,10.053164,4.081900,76.3852459,7476,R,11,10,12,,
-30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,,
-30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,
-30002,202002,100,72,0.836776196,1.596487645,10.053164,4.081900,76.3852459,7818,R,11,10,12,,
-30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,,
-30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,
-30003,202002,100,7,0.234456131,0.271256932,10.053164,4.081900,76.3852459,1761,R,11,10,12,,
-30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,,
-30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,
-30004,202002,100,81,33.015625,11.42162162,10.053164,4.081900,76.3852459,2113,R,11,10,12,,
-30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,,
-30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,
-30005,202002,100,5,1.062796,3.203571,10.053164,4.081900,76.3852459,897,R,11,10,12,,
-30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,,
-30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,
-30006,202002,100,14,1.003745,1.368344,10.053164,4.081900,76.3852459,1876,R,11,10,12,,
-30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,,
-30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,
-30007,202002,100,12,0.223432,0.248281,10.053164,4.081900,76.3852459,2853,R,11,10,12,,
-30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,,
-30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,TRUE
-30008,202002,100,162,42.560284,13.859122,10.053164,4.081900,76.3852459,6001,R,11,10,12,,
-30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,TRUE,
-30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,
-30009,202002,100,26,0.62911,3.053707,10.053164,4.081900,76.3852459,4037,R,11,10,12,,
-30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,,
-30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,
-30010,202002,100,144,0.750406,2.064204,10.053164,4.081900,76.3852459,21734,R,11,10,12,,
-30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,,
-30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,
-30011,202002,100,5,0.190548,0.226106,10.053164,4.081900,76.3852459,1145,R,11,10,12,TRUE,TRUE
-30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,,
-30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,
-30012,202002,100,275,29.382813,,10.053164,4.081900,76.3852459,7522,R,11,10,12,,
-30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,true,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,true,true,false,true,false
+30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,true,true,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,true,true,true,false,true,false
+30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,true,true,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,true,true,true,false,true,false
+30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,true,true,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,true,true,true,false,true,false
+30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,true,true,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,true,true,true,false,true,false
+30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,true,true,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,true,true,true,false,true,false
+30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,true,true,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,true,true,true,false,true,false
+30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,true,true,true,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,false,false,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,true,,true,true,true,false,true,false
+30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,true,true,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,true,true,true,false,true,false
+30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,true,true,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,true,true,true,false,true,false
+30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,false,true,true,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,true,true,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,false,,true,true,true,false,true,false
+30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,true,true,true,true,false,false
+30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,true,true,true,false,false,false
+30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index 52329c6d..34a1f799 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10
-30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10
-30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9
-30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10
-30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10
-30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9
-30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10
-30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10
-30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9
-30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10
-30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10
-30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9
-30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10
-30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10
-30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9
-30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10
-30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10
-30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9
-30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10
-30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10
-30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9
-30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10
-30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10
-30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9
-30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10
-30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10
-30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9
-30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10
-30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10
-30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,true,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,true,false,true,false
+30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,true,true,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,true,true,false,true,false
+30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,true,true,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,true,true,false,true,false
+30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,true,true,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,true,true,false,true,false
+30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,true,true,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,true,true,false,true,false
+30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,true,true,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,true,true,false,true,false
+30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,true,true,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,true,true,false,true,false
+30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,true,true,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,true,true,false,true,false
+30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,true,true,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,true,true,false,true,false
+30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,true,true,true,true,false,false
+30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,true,true,true,false,false,false
+30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
index 31125d9d..4a6bb0fe 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,forward_filtered,backward_filtered
-30001,202001,100,51,,1.129481006,1,1.773194,96.75644,8444,R,0,9,12,,,,,
-30001,202002,100,51,0.885362387,3.732401398,3.889877,2.962348,81.65588616,7476,R,9,10,11,,,,,
-30001,202003,100,51,0.267924024,,1.495827,1,76.108808,2003,R,10,0,11,,,,,
-30002,202001,100,72,,1.195062676,1,1.773194,96.75644,9343,R,0,9,12,,,,,
-30002,202002,100,72,0.836776196,1.596487645,3.889877,2.962348,81.65588616,7818,R,9,10,11,,,,,
-30002,202003,100,72,0.626375032,,1.495827,1,76.108808,4897,R,10,0,11,,,,,
-30003,202001,100,7,,4.265190233,1,1.773194,96.75644,7511,R,0,9,12,,,,,
-30003,202002,100,7,0.234456131,0.271256932,3.889877,2.962348,81.65588616,1761,R,9,10,11,,,,,
-30003,202003,100,7,3.686541738,,1.495827,1,76.108808,6492,R,10,0,11,,,,,
-30004,202001,100,81,,,1,1.773194,96.75644,64,R,0,9,12,,,,,TRUE
-30004,202002,100,81,,,3.889877,2.962348,81.65588616,2113,R,9,10,11,,,TRUE,,
-30004,202003,100,81,,,1.495827,1,76.108808,185,R,10,0,11,,,,TRUE,
-30005,202001,100,5,,0.940914,1,1.773194,96.75644,844,R,0,9,12,,,,,
-30005,202002,100,5,1.062796,3.203571,3.889877,2.962348,81.65588616,897,R,9,10,11,,,,,
-30005,202003,100,5,0.312152,,1.495827,1,76.108808,280,R,10,0,11,,,,,
-30006,202001,100,14,,0.996269,1,1.773194,96.75644,1869,R,0,9,12,,,,,
-30006,202002,100,14,1.003745,1.368344,3.889877,2.962348,81.65588616,1876,R,9,10,11,,,,,
-30006,202003,100,14,0.73081,,1.495827,1,76.108808,1371,R,10,0,11,,,,,
-30007,202001,100,12,,4.47564,1,1.773194,96.75644,12769,R,0,9,12,,,,,
-30007,202002,100,12,0.223432,0.248281,3.889877,2.962348,81.65588616,2853,R,9,10,11,,,,,
-30007,202003,100,12,4.02769,,1.495827,1,76.108808,11491,R,10,0,11,,,,,
-30008,202001,100,162,,0.023496,1,1.773194,96.75644,141,R,0,9,12,,TRUE,,,
-30008,202002,100,162,42.560284,13.859122,3.889877,2.962348,81.65588616,6001,R,9,10,11,TRUE,,,,
-30008,202003,100,162,0.072155,,1.495827,1,76.108808,433,R,10,0,11,,,,,
-30009,202001,100,26,,1.589547,1,1.773194,96.75644,6417,R,0,9,12,,,,,
-30009,202002,100,26,0.62911,3.053707,3.889877,2.962348,81.65588616,4037,R,9,10,11,,,,,
-30009,202003,100,26,0.327471,,1.495827,1,76.108808,1322,R,10,0,11,,,,,
-30010,202001,100,144,,1.332612,1,1.773194,96.75644,28963,R,0,9,12,,,,,
-30010,202002,100,144,0.750406,2.064204,3.889877,2.962348,81.65588616,21734,R,9,10,11,,,,,
-30010,202003,100,144,0.484448,,1.495827,1,76.108808,10529,R,10,0,11,,,,,
-30011,202001,100,5,,5.248035,1,1.773194,96.75644,6009,R,0,9,12,,TRUE,,,
-30011,202002,100,5,0.190548,0.226106,3.889877,2.962348,81.65588616,1145,R,9,10,11,TRUE,,,,
-30011,202003,100,5,4.422707,,1.495827,1,76.108808,5064,R,10,0,11,,,,,
-30012,202001,100,275,,0.034034,1,1.773194,96.75644,256,R,0,9,12,,,,,
-30012,202002,100,275,29.382813,,3.889877,2.962348,81.65588616,7522,R,9,10,11,,,,,
-30012,202003,100,275,,,1.495827,1,76.108808,11251.613766,FIR,10,0,11,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.773194,96.75644,8444,R,0,9,12,,true,true,true,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,3.889877,2.962348,81.65588616,7476,R,9,10,11,true,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.495827,1,76.108808,2003,R,10,0,11,true,,true,true,true,false,true,false
+30002,202001,100,72,,1.195062676,1,1.773194,96.75644,9343,R,0,9,12,,true,true,true,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,3.889877,2.962348,81.65588616,7818,R,9,10,11,true,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.495827,1,76.108808,4897,R,10,0,11,true,,true,true,true,false,true,false
+30003,202001,100,7,,4.265190233,1,1.773194,96.75644,7511,R,0,9,12,,true,true,true,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,3.889877,2.962348,81.65588616,1761,R,9,10,11,true,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.495827,1,76.108808,6492,R,10,0,11,true,,true,true,true,false,true,false
+30004,202001,100,81,,,1,1.773194,96.75644,64,R,0,9,12,,,true,true,false,true,false,false
+30004,202002,100,81,,,3.889877,2.962348,81.65588616,2113,R,9,10,11,,,false,true,true,false,false,false
+30004,202003,100,81,,,1.495827,1,76.108808,185,R,10,0,11,,,true,false,true,false,true,false
+30005,202001,100,5,,0.940914,1,1.773194,96.75644,844,R,0,9,12,,true,true,true,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,3.889877,2.962348,81.65588616,897,R,9,10,11,true,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.495827,1,76.108808,280,R,10,0,11,true,,true,true,true,false,true,false
+30006,202001,100,14,,0.996269,1,1.773194,96.75644,1869,R,0,9,12,,true,true,true,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,3.889877,2.962348,81.65588616,1876,R,9,10,11,true,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.495827,1,76.108808,1371,R,10,0,11,true,,true,true,true,false,true,false
+30007,202001,100,12,,4.47564,1,1.773194,96.75644,12769,R,0,9,12,,true,true,true,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,3.889877,2.962348,81.65588616,2853,R,9,10,11,true,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.495827,1,76.108808,11491,R,10,0,11,true,,true,true,true,false,true,false
+30008,202001,100,162,,0.023496,1,1.773194,96.75644,141,R,0,9,12,,false,true,true,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,3.889877,2.962348,81.65588616,6001,R,9,10,11,false,true,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.495827,1,76.108808,433,R,10,0,11,true,,true,true,true,false,true,false
+30009,202001,100,26,,1.589547,1,1.773194,96.75644,6417,R,0,9,12,,true,true,true,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,3.889877,2.962348,81.65588616,4037,R,9,10,11,true,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.495827,1,76.108808,1322,R,10,0,11,true,,true,true,true,false,true,false
+30010,202001,100,144,,1.332612,1,1.773194,96.75644,28963,R,0,9,12,,true,true,true,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,3.889877,2.962348,81.65588616,21734,R,9,10,11,true,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.495827,1,76.108808,10529,R,10,0,11,true,,true,true,true,false,true,false
+30011,202001,100,5,,5.248035,1,1.773194,96.75644,6009,R,0,9,12,,false,true,true,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,3.889877,2.962348,81.65588616,1145,R,9,10,11,false,true,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.495827,1,76.108808,5064,R,10,0,11,true,,true,true,true,false,true,false
+30012,202001,100,275,,0.034034,1,1.773194,96.75644,256,R,0,9,12,,true,true,true,true,true,false,false
+30012,202002,100,275,29.382813,,3.889877,2.962348,81.65588616,7522,R,9,10,11,true,,true,true,true,false,false,false
+30012,202003,100,275,,,1.495827,1,76.108808,11251.613766,FIR,10,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 1bbd1a22..73757f4f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,
-80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,,
-80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,,
-80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,
-80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,,
-80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,,
-80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,
-80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,,
-80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,,
-80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,
-80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,,
-80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,,
-80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,TRUE
-80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,TRUE,TRUE
-80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,,
-80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,
-80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,,
-80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,,
-80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,
-80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,,
-80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,,
-80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,
-80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,,
-80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,,
-80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,
-80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,,
-80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,,
-80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,
-80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,,
-80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,TRUE,
-80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,TRUE
-80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,TRUE,TRUE
-80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,TRUE,
-80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,
-80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,,
-80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,
-80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,
-80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,,
-80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,,
-80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,
-80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,,
-80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,,
-80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,TRUE
-80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,TRUE,
-80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,,
-80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,
-80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,,
-80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,,
-80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,
-80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,,
-80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,,
-80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,
-80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,,
-80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,,
-80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,
-80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,,TRUE
-80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,TRUE,
-80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,
-80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,,TRUE
-80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,TRUE,
-80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,
-80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,,
-80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,,
-80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,TRUE
-80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,TRUE,
-80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,,
-80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,
-80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,,
-80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,,
-80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,
-80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,
-80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,true,true,true,false,false
+80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,true,true,true,false,false,false
+80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,true,true,false,true,false
+80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,true,true,true,true,false,false
+80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,true,true,true,false,false,false
+80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,true,true,true,false,true,false
+80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,true,true,true,true,false,false
+80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,true,true,true,false,false,false
+80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,true,true,true,false,true,false
+80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,true,true,true,true,false,false
+80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,true,true,true,false,false,false
+80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,true,true,true,false,true,false
+80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,true,true,true,true,false,false
+80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,true,true,true,false,false,false
+80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,true,,true,true,true,false,true,false
+80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,true,true,true,true,false,false
+80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,true,true,true,false,false,false
+80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,true,true,true,false,true,false
+80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,true,true,true,true,false,false
+80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,true,true,true,false,false,false
+80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,true,true,true,false,true,false
+80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,true,true,true,true,false,false
+80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,true,true,true,false,false,false
+80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,true,true,true,false,true,false
+80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,true,true,true,true,false,false
+80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,true,true,true,false,false,false
+80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,true,true,true,false,true,false
+80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,true,true,true,true,false,false
+80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,true,true,true,false,false,false
+80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,false,,true,true,true,false,true,false
+80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,true,true,true,true,false,false
+80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,true,true,true,false,false,false
+80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,true,true,true,false,true,false
+80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,true,true,true,true,false,false
+80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,true,true,true,false,false,false
+80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,,,,false,true,false
+80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,true,true,true,false,false
+80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,true,true,true,false,false,false
+80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,true,true,true,false,true,false
+80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,true,true,true,false,false
+80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,true,true,true,false,false,false
+80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,true,true,true,false,true,false
+80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,true,true,true,false,false
+80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,true,true,true,false,false,false
+80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,true,true,true,false,true,false
+80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,true,true,true,false,false
+80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,true,true,true,false,false,false
+80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,true,true,true,false,true,false
+80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,true,true,true,false,false
+80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,true,true,true,false,false,false
+80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,true,true,true,false,true,false
+80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,true,true,true,false,false
+80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,true,true,true,false,false,false
+80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,true,true,true,false,true,false
+80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,true,true,true,false,false
+80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,true,true,true,false,false,false
+80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,true,true,true,false,true,false
+80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,true,true,true,false,false
+80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,true,true,true,false,false,false
+80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,true,true,true,false,true,false
+80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,true,true,true,false,false
+80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,true,true,true,false,false,false
+80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,true,true,true,false,true,false
+80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,true,true,true,false,false
+80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,true,true,true,false,false,false
+80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,true,true,true,false,true,false
+80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,true,true,true,false,false
+80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,true,true,true,false,false,false
+80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,true,true,true,false,true,false
+80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,,,,true,false,false
+80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,true,true,true,false,false,false
+80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index a5f0bea3..2b2d3aec 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,
-90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,,
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,,
-90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,
-90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,,
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,,
-90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,
-90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,,
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,,
-90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,
-90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,,
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,,
-90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,
-90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,,
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,,
-90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,
-90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,,
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,,
-90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,
-90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,,
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,,
-90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,
-90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,,
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,,
-90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,
-90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,,
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,,
-90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,
-90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,,
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,,
-90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,TRUE
-90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,TRUE,
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,,
-90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,
-90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,,
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,,
-90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,
-90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,,
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,,
-90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,
-90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,,
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,,
-90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,
-90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,,
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,,
-90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,
-90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,,
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,,
-90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,
-90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,,
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,,
-90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,TRUE
-90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,TRUE,
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,,
-90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,
-90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,,TRUE
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,TRUE,
-90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,
-90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,,TRUE
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,TRUE,
-90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,
-90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,true,true,true,false,false
+90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,true,true,true,false,false,false
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,true,false,true,false
+90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,true,true,true,true,false,false
+90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,true,true,true,false,false,false
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,true,true,false,true,false
+90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,true,true,true,true,false,false
+90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,true,true,true,false,false,false
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,true,true,false,true,false
+90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,true,true,true,true,false,false
+90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,true,true,true,false,false,false
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,true,true,false,true,false
+90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,true,true,true,true,false,false
+90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,true,true,true,false,false,false
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,true,true,false,true,false
+90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,true,true,true,true,false,false
+90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,true,true,true,false,false,false
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,true,true,false,true,false
+90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,true,true,true,true,false,false
+90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,true,true,true,false,false,false
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,true,true,false,true,false
+90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,true,true,true,false,false
+90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,true,true,true,false,false,false
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,true,true,false,true,false
+90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,true,true,true,true,false,false
+90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,true,true,true,false,false,false
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,true,true,false,true,false
+90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,true,true,true,true,false,false
+90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,true,true,true,false,false,false
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,true,true,false,true,false
+90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,true,true,true,true,false,false
+90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,true,true,true,false,false,false
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,true,true,false,true,false
+90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,true,true,true,false,false
+90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,true,true,true,false,false,false
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,true,true,false,true,false
+90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,true,true,true,true,false,false
+90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,true,true,true,false,false,false
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,true,true,false,true,false
+90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,true,true,true,true,false,false
+90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,true,true,true,false,false,false
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,true,true,false,true,false
+90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,true,true,true,true,false,false
+90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,true,true,true,false,false,false
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,true,true,false,true,false
+90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,true,true,true,true,false,false
+90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,true,true,true,false,false,false
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,true,true,false,true,false
+90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,true,true,true,true,false,false
+90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,true,true,true,false,false,false
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,true,true,false,true,false
+90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,true,true,true,true,false,false
+90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,true,true,true,false,false,false
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,true,true,false,true,false
+90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,true,true,true,true,false,false
+90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,true,true,true,false,false,false
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,true,true,false,true,false
+90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,true,true,true,true,false,false
+90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,true,true,true,false,false,false
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,true,true,false,true,false
+90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,,,,true,false,false
+90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,,,,false,false,false
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index 6a190dd4..aa3b6b1e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20
-100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20
-100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21
-100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20
-100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20
-100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21
-100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20
-100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20
-100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21
-100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20
-100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20
-100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21
-100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20
-100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20
-100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21
-100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20
-100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20
-100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21
-100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20
-100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20
-100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21
-100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20
-100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20
-100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21
-100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20
-100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20
-100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21
-100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20
-100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20
-100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21
-100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20
-100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20
-100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21
-100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20
-100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20
-100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21
-100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20
-100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20
-100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21
-100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20
-100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20
-100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21
-100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20
-100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20
-100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21
-100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20
-100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20
-100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21
-100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20
-100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20
-100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21
-100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20
-100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20
-100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21
-100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20
-100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20
-100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21
-100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20
-100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20
-100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21
-100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20
-100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20
-100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,true,true,true,false,false
+100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,true,true,true,false,false,false
+100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,true,true,true,false,true,false
+100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,true,true,true,true,false,false
+100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,true,true,true,false,false,false
+100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,true,true,true,false,true,false
+100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,true,true,true,true,false,false
+100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,true,true,true,false,false,false
+100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,true,true,true,false,true,false
+100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,true,true,true,true,false,false
+100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,true,true,true,false,false,false
+100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,true,true,true,false,true,false
+100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,true,true,true,true,false,false
+100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,true,true,true,false,false,false
+100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,true,true,true,false,true,false
+100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,true,true,true,true,false,false
+100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,true,true,true,false,false,false
+100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,true,true,true,false,true,false
+100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,true,true,true,true,false,false
+100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,true,true,true,false,false,false
+100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,true,true,true,false,true,false
+100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,true,true,true,false,false
+100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,true,true,true,false,false,false
+100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,true,true,true,false,true,false
+100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,true,true,true,true,false,false
+100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,true,true,true,false,false,false
+100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,true,true,true,false,true,false
+100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,true,true,true,true,false,false
+100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,true,true,true,false,false,false
+100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,true,true,true,false,true,false
+100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,true,true,true,true,false,false
+100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,true,true,true,false,false,false
+100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,true,true,true,false,true,false
+100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,true,true,true,false,false
+100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,true,true,true,false,false,false
+100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,true,true,true,false,true,false
+100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,true,true,true,true,false,false
+100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,true,true,true,false,false,false
+100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,true,true,true,false,true,false
+100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,true,true,true,true,false,false
+100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,true,true,true,false,false,false
+100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,true,true,true,false,true,false
+100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,true,true,true,true,false,false
+100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,true,true,true,false,false,false
+100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,true,true,true,false,true,false
+100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,true,true,true,true,false,false
+100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,true,true,true,false,false,false
+100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,true,true,true,false,true,false
+100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,true,true,true,true,false,false
+100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,true,true,true,false,false,false
+100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,true,true,true,false,true,false
+100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,true,true,true,true,false,false
+100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,true,true,true,false,false,false
+100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,true,true,true,false,true,false
+100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,true,true,true,true,false,false
+100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,true,true,true,false,false,false
+100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,true,true,true,false,true,false
+100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,true,true,true,true,false,false
+100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,true,true,true,false,false,false
+100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,true,true,true,false,true,false
+100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,,,,true,false,false
+100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,,,,false,false,false
+100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index 8cac5716..0ec0c26a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,
-30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,,
-30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,,
-30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,
-30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,,
-30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,,
-30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,
-30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,,
-30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,,
-30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,
-30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,,
-30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,,
-30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,
-30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,,
-30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,,
-30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,
-30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,,
-30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,,
-30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,
-30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,,
-30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,,
-30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,TRUE
-30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,TRUE,
-30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,,
-30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,
-30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,,
-30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,,
-30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,
-30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,,
-30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,TRUE
-30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,TRUE,
-30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,
-30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,,
-30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,true,true,true,false,false
+30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,true,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,true,true,true,true,false,false
+30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,true,true,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,true,true,true,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,true,true,true,false,false,false
+30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,true,true,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,true,true,true,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,true,true,true,false,false,false
+30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,true,true,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,true,true,true,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,true,true,true,false,false,false
+30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,true,true,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,true,true,true,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,true,true,true,false,false,false
+30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,true,true,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,true,true,true,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,true,true,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,true,true,true,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,true,true,true,false,false,false
+30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,true,true,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,true,true,true,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,true,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,true,true,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,true,true,true,true,false,false
+30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,true,true,true,false,false,false
+30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,true,true,true,true,false,false
+30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,true,true,true,false,false,false
+30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,true,true,true,true,false,false
+30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,true,true,true,false,false,false
+30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
index 12de5ea1..585ec2e2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,forward_filter,backward_filter
-90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,,,,
-90001,202002,100,89,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,8916,R,17,18,20,,,,,
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,,,,,
-90002,202001,100,83,,0.81755039810266,1,1.504462,128.8429705,4826,R,0,17,19,,,,,
-90002,202002,100,83,1.22316618317447,1.24457094665823,0.95179,1.082843,113.3255814,5903,R,17,18,20,,,,,
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,,,,,
-90003,202001,100,4,,,1,1.504462,128.8429705,7586,R,0,17,19,,,TRUE,,
-90003,202002,100,4,,0.710986703988803,0.95179,1.082843,113.3255814,1016,R,17,18,20,,,,TRUE,
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,,,,,
-90004,202001,100,76,,1.30584756898817,1,1.504462,128.8429705,3975,R,0,17,19,,,,,
-90004,202002,100,76,0.765786163522013,0.828750340321263,0.95179,1.082843,113.3255814,3044,R,17,18,20,,,,,
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,,,,,
-90005,202001,100,18,,0.62191605254726,1,1.504462,128.8429705,1941,R,0,17,19,,,,,
-90005,202002,100,18,1.60793405461103,2.58360927152318,0.95179,1.082843,113.3255814,3121,R,17,18,20,,,,,
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,,,,,
-90006,202001,100,94,,0.762987012987013,1,1.504462,128.8429705,5405,R,0,17,19,,,,,
-90006,202002,100,94,1.31063829787234,1.42248995983936,0.95179,1.082843,113.3255814,7084,R,17,18,20,,,,,
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,,,,,
-90007,202001,100,8,,5.33286467486819,1,1.504462,128.8429705,15172,R,0,17,19,,,,,
-90007,202002,100,8,0.18751647772212,0.812624964295915,0.95179,1.082843,113.3255814,2845,R,17,18,20,,,,,
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,,,,,
-90008,202001,100,304,,1.12953080601566,1,1.504462,128.8429705,16298,R,0,17,19,,,,,
-90008,202002,100,304,0.885323352558596,1.00937390696048,0.95179,1.082843,113.3255814,14429,R,17,18,20,,,,,
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,,,,,
-90009,202001,100,45,,0.740636891648308,1,1.504462,128.8429705,3698,R,0,17,19,,,,,
-90009,202002,100,45,1.35018929150892,1.18542260208927,0.95179,1.082843,113.3255814,4993,R,17,18,20,,,,,
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,,,,,
-90010,202001,100,100,,0.76056338028169,1,1.504462,128.8429705,7722,R,0,17,19,,,,,
-90010,202002,100,100,1.31481481481481,1.55126050420168,0.95179,1.082843,113.3255814,10153,R,17,18,20,,,,,
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,,,,,
-90011,202001,100,19,,8.36614281775572,1,1.504462,128.8429705,30344,R,0,17,19,,TRUE,,,
-90011,202002,100,19,0.119529396256262,0.497667398463227,0.95179,1.082843,113.3255814,3627,R,17,18,20,TRUE,,,,
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,,,,,
-90012,202001,100,304,,1.40900838592548,1,1.504462,128.8429705,16298,R,0,17,19,,,,,
-90012,202002,100,304,0.709718983924408,0.857831504004746,0.95179,1.082843,113.3255814,11567,R,17,18,20,,,,,
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,,,,,
-90013,202001,100,54,,1.10678653656397,1,1.504462,128.8429705,20190,R,0,17,19,,,,,
-90013,202002,100,54,0.903516592372462,0.63283147158815,0.95179,1.082843,113.3255814,18242,R,17,18,20,,,,,
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,,,,,
-90014,202001,100,47,,0.845909451945989,1,1.504462,128.8429705,4260,R,0,17,19,,,,,
-90014,202002,100,42,1.18215962441315,0.776681061073411,0.95179,1.082843,113.3255814,5036,R,17,18,20,,,,,
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,,,,,
-90015,202001,100,57,,3.88684582743989,1,1.504462,128.8429705,19236,R,0,17,19,,,,,
-90015,202002,100,57,0.257278020378457,1.39644469525959,0.95179,1.082843,113.3255814,4949,R,17,18,20,,,,,
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,,,,,
-90016,202001,100,163,,0.906723456038941,1,1.504462,128.8429705,14902,R,0,17,19,,,,,
-90016,202002,100,163,1.10287209770501,0.666653145661786,0.95179,1.082843,113.3255814,16435,R,17,18,20,,,,,
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,,,,,
-90017,202001,100,149,,0.702286449569435,1,1.504462,128.8429705,35476,R,0,17,19,,,,,
-90017,202002,100,149,1.42392039688804,0.944611702227126,0.95179,1.082843,113.3255814,50515,R,17,18,20,,,,,
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,,,,,
-90018,202001,100,126,,0.543196798493409,1,1.504462,128.8429705,13845,R,0,17,19,,TRUE,,,
-90018,202002,100,126,1.8409534127844,0.929913532051516,0.95179,1.082843,113.3255814,25488,R,17,18,20,TRUE,,,,
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,,,,,
-90019,202001,100,6,,2.53225806451613,1,1.504462,128.8429705,1099,R,0,17,19,,,,,
-90019,202002,100,6,0.394904458598726,3.5,0.95179,1.082843,113.3255814,434,R,17,18,20,,TRUE,,,
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,TRUE,,,,
-90020,202001,100,22,,1.67735470941884,1,1.504462,128.8429705,3348,R,0,17,19,,,,,
-90020,202002,100,22,0.596176821983274,0.395169273411206,0.95179,1.082843,113.3255814,1996,R,17,18,20,,TRUE,,,
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,TRUE,,,,
-90021,202001,100,155,,,1,1.504462,128.8429705,34285.974874,BI,0,17,19,,,,,
-90021,202002,100,155,,,0.95179,1.082843,113.3255814,22789.522255,BI,17,18,20,,,,,
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,true,true,true,true,true,false,false
+90001,202002,100,89,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,8916,R,17,18,20,true,true,true,true,true,false,false,false
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,true,false,true,false
+90002,202001,100,83,,0.81755039810266,1,1.504462,128.8429705,4826,R,0,17,19,,true,true,true,true,true,false,false
+90002,202002,100,83,1.22316618317447,1.24457094665823,0.95179,1.082843,113.3255814,5903,R,17,18,20,true,true,true,true,true,false,false,false
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,true,true,false,true,false
+90003,202001,100,4,,,1,1.504462,128.8429705,7586,R,0,17,19,,,false,true,true,true,false,false
+90003,202002,100,4,,0.710986703988803,0.95179,1.082843,113.3255814,1016,R,17,18,20,,true,true,false,true,false,false,false
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,true,true,false,true,false
+90004,202001,100,76,,1.30584756898817,1,1.504462,128.8429705,3975,R,0,17,19,,true,true,true,true,true,false,false
+90004,202002,100,76,0.765786163522013,0.828750340321263,0.95179,1.082843,113.3255814,3044,R,17,18,20,true,true,true,true,true,false,false,false
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,true,true,false,true,false
+90005,202001,100,18,,0.62191605254726,1,1.504462,128.8429705,1941,R,0,17,19,,true,true,true,true,true,false,false
+90005,202002,100,18,1.60793405461103,2.58360927152318,0.95179,1.082843,113.3255814,3121,R,17,18,20,true,true,true,true,true,false,false,false
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,true,true,false,true,false
+90006,202001,100,94,,0.762987012987013,1,1.504462,128.8429705,5405,R,0,17,19,,true,true,true,true,true,false,false
+90006,202002,100,94,1.31063829787234,1.42248995983936,0.95179,1.082843,113.3255814,7084,R,17,18,20,true,true,true,true,true,false,false,false
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,true,true,false,true,false
+90007,202001,100,8,,5.33286467486819,1,1.504462,128.8429705,15172,R,0,17,19,,true,true,true,true,true,false,false
+90007,202002,100,8,0.18751647772212,0.812624964295915,0.95179,1.082843,113.3255814,2845,R,17,18,20,true,true,true,true,true,false,false,false
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,true,true,false,true,false
+90008,202001,100,304,,1.12953080601566,1,1.504462,128.8429705,16298,R,0,17,19,,true,true,true,true,true,false,false
+90008,202002,100,304,0.885323352558596,1.00937390696048,0.95179,1.082843,113.3255814,14429,R,17,18,20,true,true,true,true,true,false,false,false
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,true,true,false,true,false
+90009,202001,100,45,,0.740636891648308,1,1.504462,128.8429705,3698,R,0,17,19,,true,true,true,true,true,false,false
+90009,202002,100,45,1.35018929150892,1.18542260208927,0.95179,1.082843,113.3255814,4993,R,17,18,20,true,true,true,true,true,false,false,false
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,true,true,false,true,false
+90010,202001,100,100,,0.76056338028169,1,1.504462,128.8429705,7722,R,0,17,19,,true,true,true,true,true,false,false
+90010,202002,100,100,1.31481481481481,1.55126050420168,0.95179,1.082843,113.3255814,10153,R,17,18,20,true,true,true,true,true,false,false,false
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,true,true,false,true,false
+90011,202001,100,19,,8.36614281775572,1,1.504462,128.8429705,30344,R,0,17,19,,false,true,true,true,true,false,false
+90011,202002,100,19,0.119529396256262,0.497667398463227,0.95179,1.082843,113.3255814,3627,R,17,18,20,false,true,true,true,true,false,false,false
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,true,true,false,true,false
+90012,202001,100,304,,1.40900838592548,1,1.504462,128.8429705,16298,R,0,17,19,,true,true,true,true,true,false,false
+90012,202002,100,304,0.709718983924408,0.857831504004746,0.95179,1.082843,113.3255814,11567,R,17,18,20,true,true,true,true,true,false,false,false
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,true,true,false,true,false
+90013,202001,100,54,,1.10678653656397,1,1.504462,128.8429705,20190,R,0,17,19,,true,true,true,true,true,false,false
+90013,202002,100,54,0.903516592372462,0.63283147158815,0.95179,1.082843,113.3255814,18242,R,17,18,20,true,true,true,true,true,false,false,false
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,true,true,false,true,false
+90014,202001,100,47,,0.845909451945989,1,1.504462,128.8429705,4260,R,0,17,19,,true,true,true,true,true,false,false
+90014,202002,100,42,1.18215962441315,0.776681061073411,0.95179,1.082843,113.3255814,5036,R,17,18,20,true,true,true,true,true,false,false,false
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,true,true,false,true,false
+90015,202001,100,57,,3.88684582743989,1,1.504462,128.8429705,19236,R,0,17,19,,true,true,true,true,true,false,false
+90015,202002,100,57,0.257278020378457,1.39644469525959,0.95179,1.082843,113.3255814,4949,R,17,18,20,true,true,true,true,true,false,false,false
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,true,true,false,true,false
+90016,202001,100,163,,0.906723456038941,1,1.504462,128.8429705,14902,R,0,17,19,,true,true,true,true,true,false,false
+90016,202002,100,163,1.10287209770501,0.666653145661786,0.95179,1.082843,113.3255814,16435,R,17,18,20,true,true,true,true,true,false,false,false
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,true,true,false,true,false
+90017,202001,100,149,,0.702286449569435,1,1.504462,128.8429705,35476,R,0,17,19,,true,true,true,true,true,false,false
+90017,202002,100,149,1.42392039688804,0.944611702227126,0.95179,1.082843,113.3255814,50515,R,17,18,20,true,true,true,true,true,false,false,false
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,true,true,false,true,false
+90018,202001,100,126,,0.543196798493409,1,1.504462,128.8429705,13845,R,0,17,19,,false,true,true,true,true,false,false
+90018,202002,100,126,1.8409534127844,0.929913532051516,0.95179,1.082843,113.3255814,25488,R,17,18,20,false,true,true,true,true,false,false,false
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,true,true,false,true,false
+90019,202001,100,6,,2.53225806451613,1,1.504462,128.8429705,1099,R,0,17,19,,true,true,true,true,true,false,false
+90019,202002,100,6,0.394904458598726,3.5,0.95179,1.082843,113.3255814,434,R,17,18,20,true,false,true,true,true,false,false,false
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,true,true,false,true,false
+90020,202001,100,22,,1.67735470941884,1,1.504462,128.8429705,3348,R,0,17,19,,true,true,true,true,true,false,false
+90020,202002,100,22,0.596176821983274,0.395169273411206,0.95179,1.082843,113.3255814,1996,R,17,18,20,true,false,true,true,true,false,false,false
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,true,true,false,true,false
+90021,202001,100,155,,,1,1.504462,128.8429705,34285.974874,BI,0,17,19,,,,,,true,false,false
+90021,202002,100,155,,,0.95179,1.082843,113.3255814,22789.522255,BI,17,18,20,,,,,,false,false,false
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index d48b5918..247d96d5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,1.1294810058855,1,1.162271841,96.756440,8444,R,0,2,12,,
-30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,,TRUE
-30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,TRUE,
-30002,202001,100,72,,1.19506267587618,1,1.162271841,96.756440,9343,R,0,2,12,,
-30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,,TRUE
-30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,TRUE,
-30003,202001,100,7,,4.26519023282226,1,1.162271841,96.756440,7511,R,0,2,12,,TRUE
-30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,TRUE,TRUE
-30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,TRUE,
-30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.756440,64,R,0,2,12,,TRUE
-30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,TRUE,TRUE
-30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,TRUE,
-30005,202001,100,5,,0.940914158305463,1,1.162271841,96.756440,844,R,0,2,12,,TRUE
-30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,TRUE,TRUE
-30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,TRUE,
-30006,202001,100,14,,0.996268656716418,1,1.162271841,96.756440,1869,R,0,2,12,,TRUE
-30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,TRUE,TRUE
-30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,TRUE,
-30007,202001,100,12,,4.47563967753242,1,1.162271841,96.756440,12769,R,0,2,12,,TRUE
-30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,TRUE,TRUE
-30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,TRUE,
-30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.756440,141,R,0,2,12,,TRUE
-30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,TRUE,TRUE
-30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,TRUE,
-30009,202001,100,26,,1.58954669308893,1,1.162271841,96.756440,6417,R,0,2,12,,TRUE
-30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,TRUE,TRUE
-30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,TRUE,
-30010,202001,100,144,,1.33261249654919,1,1.162271841,96.756440,28963,R,0,2,12,,TRUE
-30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,TRUE,
-30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,,
-30011,202001,100,5,,5.24803493449782,1,1.162271841,96.756440,6009,R,0,2,12,,TRUE
-30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,TRUE,TRUE
-30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,TRUE,
-30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.756440,256,R,0,2,12,,TRUE
-30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,TRUE,
-30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,true,true,true,false,false
+30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,true,true,true,false,false,false
+30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,true,true,true,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,true,true,true,true,false,false
+30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,true,true,true,false,false,false
+30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,true,true,true,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,true,true,true,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,true,true,true,false,false,false
+30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,true,true,true,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,true,true,true,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,true,true,true,false,false,false
+30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,true,true,true,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,true,true,true,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,true,true,true,false,false,false
+30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,true,true,true,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,true,true,true,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,true,true,true,false,false,false
+30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,true,true,true,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,true,true,true,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,true,true,true,false,false,false
+30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,true,true,true,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,true,true,true,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,true,true,true,false,false,false
+30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,true,true,true,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,true,true,true,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,true,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,true,true,true,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,true,true,true,true,false,false
+30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,true,true,true,false,true,false
+30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,true,true,true,true,false,false
+30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,true,true,true,false,false,false
+30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,true,true,true,false,true,false
+30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,true,true,true,true,false,false
+30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,true,true,true,false,false,false
+30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv
index b3283a97..f7c119af 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,
-110005,202001,200,27,,,1,1,1,280,BI,0,0,0,TRUE
-110005,202002,200,27,,,1,1,1,280,BI,0,0,0,TRUE
-110005,202003,200,27,,,1,1,1,280,R,0,0,0,TRUE
-110006,202001,200,42,,,1,1,1,1869,R,0,0,0,TRUE
-110006,202002,200,42,,,1,1,1,1876,R,0,0,0,TRUE
-110006,202003,200,42,,,1,1,1,1371,R,0,0,0,TRUE
-110007,202001,200,19,,,1,1,1,12769,R,0,0,0,TRUE
-110007,202002,200,19,,,1,1,1,2853,R,0,0,0,TRUE
-110007,202003,200,19,,,1,1,1,2853,FIR,0,0,0,TRUE
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,true,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,true,true,true,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,true,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,true,true,true,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,true,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,true,true,true,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,true,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,true,true,true,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,,,false,true,false
+110005,202001,200,27,,,1,1,1,280,BI,0,0,0,,,,,,true,true,true
+110005,202002,200,27,,,1,1,1,280,BI,0,0,0,,,,,,true,true,true
+110005,202003,200,27,,,1,1,1,280,R,0,0,0,,,false,false,false,true,true,true
+110006,202001,200,42,,,1,1,1,1869,R,0,0,0,,,false,false,false,true,true,true
+110006,202002,200,42,,,1,1,1,1876,R,0,0,0,,,false,false,false,true,true,true
+110006,202003,200,42,,,1,1,1,1371,R,0,0,0,,,false,false,false,true,true,true
+110007,202001,200,19,,,1,1,1,12769,R,0,0,0,,,false,false,false,true,true,true
+110007,202002,200,19,,,1,1,1,2853,R,0,0,0,,,false,false,false,true,true,true
+110007,202003,200,19,,,1,1,1,2853,FIR,0,0,0,,,,,,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv
index 39afdd31..19d64383 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,filtered_marker
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,,
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,,
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,,
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,,
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,,
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,,
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,,
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,
-110005,202001,200,0,,,1,1,1,1074,R,0,0,0,TRUE,TRUE
-110005,202002,200,0,,,1,1,1,648,R,0,0,0,TRUE,TRUE
-110005,202003,200,0,,,1,1,1,280,R,0,0,0,TRUE,TRUE
-110006,202001,200,0,,,1,1,1,1869,R,0,0,0,TRUE,TRUE
-110006,202002,200,0,,,1,1,1,1876,R,0,0,0,TRUE,TRUE
-110006,202003,200,0,,,1,1,1,1371,R,0,0,0,TRUE,TRUE
-110007,202001,200,0,,,1,1,1,0,C,0,0,0,TRUE,
-110007,202002,200,0,,,1,1,1,0,FIC,0,0,0,TRUE,
-110007,202003,200,0,,,1,1,1,0,FIC,0,0,0,TRUE,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,true,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,true,true,true,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,true,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,true,true,true,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,true,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,true,true,true,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,true,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,true,true,true,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,,,false,true,false
+110005,202001,200,0,,,1,1,1,1074,R,0,0,0,,,false,false,false,true,true,true
+110005,202002,200,0,,,1,1,1,648,R,0,0,0,,,false,false,false,true,true,true
+110005,202003,200,0,,,1,1,1,280,R,0,0,0,,,false,false,false,true,true,true
+110006,202001,200,0,,,1,1,1,1869,R,0,0,0,,,false,false,false,true,true,true
+110006,202002,200,0,,,1,1,1,1876,R,0,0,0,,,false,false,false,true,true,true
+110006,202003,200,0,,,1,1,1,1371,R,0,0,0,,,false,false,false,true,true,true
+110007,202001,200,0,,,1,1,1,0,C,0,0,0,,,,,,true,true,true
+110007,202002,200,0,,,1,1,1,0,FIC,0,0,0,,,,,,true,true,true
+110007,202003,200,0,,,1,1,1,0,FIC,0,0,0,,,,,,true,true,true

From bc010a0c7e7bf03cc588ff2e9de5b4e42d474b26 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 4 May 2023 14:53:15 +0100
Subject: [PATCH 267/531] Linting

---
 .../imputation/ratio_calculators.py               |  4 ++--
 tests/imputation/test_engine.py                   |  4 +---
 tests/imputation/test_mean_of_ratios.py           | 15 +++++++--------
 tests/imputation/test_ratio_of_means.py           | 15 +++++++--------
 4 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index df438712..65975f17 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -2,9 +2,9 @@
 from dataclasses import dataclass, field
 from decimal import Decimal
 from numbers import Number
-from typing import Any, Callable, Dict, Iterable, List, Optional, Union
+from typing import Any, Callable, Dict, Iterable, List, Optional
 
-from pyspark.sql import Column, DataFrame
+from pyspark.sql import DataFrame
 from pyspark.sql.functions import ceil as sql_ceil
 from pyspark.sql.functions import col, expr
 from pyspark.sql.functions import floor as sql_floor
diff --git a/tests/imputation/test_engine.py b/tests/imputation/test_engine.py
index d8956d7c..ba640581 100644
--- a/tests/imputation/test_engine.py
+++ b/tests/imputation/test_engine.py
@@ -205,9 +205,7 @@ def test_params_missing_link_column(fxt_load_test_csv):
         "basic_functionality",
     )
     with pytest.raises(TypeError):
-        impute(
-            input_df=test_dataframe, **params, forward_link_col=forward_col
-        )
+        impute(input_df=test_dataframe, **params, forward_link_col=forward_col)
 
 
 def test_params_not_string(fxt_load_test_csv):
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 47d60b87..89024287 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -217,14 +217,13 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     )
     scenario_actual_output = impute(input_df=scenario_input, **imputation_kwargs)
 
-    scenario_actual_output = scenario_actual_output.withColumn(
-        output_col, bround(col(output_col), 6)
-    ).withColumn(
-        forward_col, bround(col(forward_col), 6)
-    ).withColumn(
-        backward_col, bround(col(backward_col).cast(decimal_type), 6)
-    ).withColumn(
-        construction_col, bround(col(construction_col).cast(decimal_type), 6)
+    scenario_actual_output = (
+        scenario_actual_output.withColumn(output_col, bround(col(output_col), 6))
+        .withColumn(forward_col, bround(col(forward_col), 6))
+        .withColumn(backward_col, bround(col(backward_col).cast(decimal_type), 6))
+        .withColumn(
+            construction_col, bround(col(construction_col).cast(decimal_type), 6)
+        )
     )
 
     if "link_columns" in scenario:
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 0ba233ee..0ca3aae6 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -192,14 +192,13 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     )
     scenario_actual_output = impute(input_df=scenario_input, **imputation_kwargs)
 
-    scenario_actual_output = scenario_actual_output.withColumn(
-        output_col, bround(col(output_col), 6)
-    ).withColumn(
-        forward_col, bround(col(forward_col), 6)
-    ).withColumn(
-        backward_col, bround(col(backward_col).cast(decimal_type), 6)
-    ).withColumn(
-        construction_col, bround(col(construction_col).cast(decimal_type), 6)
+    scenario_actual_output = (
+        scenario_actual_output.withColumn(output_col, bround(col(output_col), 6))
+        .withColumn(forward_col, bround(col(forward_col), 6))
+        .withColumn(backward_col, bround(col(backward_col).cast(decimal_type), 6))
+        .withColumn(
+            construction_col, bround(col(construction_col).cast(decimal_type), 6)
+        )
     )
 
     select_cols = list(set(dataframe_columns) & set(scenario_expected_output.columns))

From 6d8ec61d40fcf32ea23b2bf84ed4843d6ccc504a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 4 May 2023 15:12:10 +0100
Subject: [PATCH 268/531] Removed Unneeded Test. Replace With Missing Test.

---
 ...BI_BI_R-R_R_FI_filtered_default_input.csv} |  0
 ...I_BI_R-R_R_FI_filtered_default_output.csv} |  0
 ...49_C_FI_FI_filtered_full_default_input.csv | 22 -------
 ...9_C_FI_FI_filtered_full_default_output.csv | 22 -------
 ...-BI_R_R_50_weight_previous_month_input.csv | 25 ++++++++
 ...BI_R_R_50_weight_previous_month_output.csv | 25 ++++++++
 tests/imputation/mean_of_ratios.toml          | 63 ++++++++++++++++++-
 7 files changed, 111 insertions(+), 46 deletions(-)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{48_BI_BI_R-R_R_FI_filtered_partial_default_input.csv => 48_BI_BI_R-R_R_FI_filtered_default_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv => 48_BI_BI_R-R_R_FI_filtered_default_output.csv} (100%)
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_partial_default_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_input.csv
deleted file mode 100644
index ea279331..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_input.csv
+++ /dev/null
@@ -1,22 +0,0 @@
-identifier,date,group,question,other
-110001,202001,100,9244,89
-110001,202002,100,8916,89
-110001,202003,100,6194,89
-110002,202001,100,4826,83
-110002,202002,100,5903,83
-110002,202003,100,4743,83
-110003,202001,100,7586,4
-110003,202002,100,1016,4
-110003,202003,100,1429,4
-110004,202001,100,3975,76
-110004,202002,100,3044,76
-110004,202003,100,,76
-110005,202001,200,1074,0
-110005,202002,200,648,0
-110005,202003,200,280,0
-110006,202001,200,1869,0
-110006,202002,200,1876,0
-110006,202003,200,1371,0
-110007,202001,200,,0
-110007,202002,200,,0
-110007,202003,200,,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv
deleted file mode 100644
index 19d64383..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_C_FI_FI_filtered_full_default_output.csv
+++ /dev/null
@@ -1,22 +0,0 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,true,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,true,true,true,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,true,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,true,true,true,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,true,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,true,true,true,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,true,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,true,true,true,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,,,false,true,false
-110005,202001,200,0,,,1,1,1,1074,R,0,0,0,,,false,false,false,true,true,true
-110005,202002,200,0,,,1,1,1,648,R,0,0,0,,,false,false,false,true,true,true
-110005,202003,200,0,,,1,1,1,280,R,0,0,0,,,false,false,false,true,true,true
-110006,202001,200,0,,,1,1,1,1869,R,0,0,0,,,false,false,false,true,true,true
-110006,202002,200,0,,,1,1,1,1876,R,0,0,0,,,false,false,false,true,true,true
-110006,202003,200,0,,,1,1,1,1371,R,0,0,0,,,false,false,false,true,true,true
-110007,202001,200,0,,,1,1,1,0,C,0,0,0,,,,,,true,true,true
-110007,202002,200,0,,,1,1,1,0,FIC,0,0,0,,,,,,true,true,true
-110007,202003,200,0,,,1,1,1,0,FIC,0,0,0,,,,,,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_input.csv
new file mode 100644
index 00000000..f27894e5
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_input.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
+110001,202001,100,9244,89,,,0.5,,1.5274,50.3694
+110001,202002,100,8916,89,,,0.5,,2.656680299,101.7103175
+110001,202003,100,6194,89,,,0.5,0.771850199,,74.91666667
+110002,202001,100,4826,83,,,0.5,,1.5274,50.3694
+110002,202002,100,5903,83,,,0.5,,2.656680299,101.7103175
+110002,202003,100,4743,83,,,0.5,0.771850199,,74.91666667
+110003,202001,100,7586,4,,,0.5,,1.5274,50.3694
+110003,202002,100,1016,4,,,0.5,,2.656680299,101.7103175
+110003,202003,100,1429,4,,,0.5,0.771850199,,74.91666667
+110004,202001,100,3975,76,,,0.5,,1.5274,50.3694
+110004,202002,100,3044,76,,,0.5,,2.656680299,101.7103175
+110004,202003,100,,76,,,0.5,0.771850199,,74.91666667
+110005,202001,200,5217,27,,,0.5,,2.994350985,107.48
+110005,202002,200,7016,27,,,0.5,,2.290844366,182.25
+110005,202003,200,9940,27,,,0.5,0.994479964,,150.2748092
+110006,202001,200,5325,42,,,0.5,,2.994350985,107.48
+110006,202002,200,7747,42,,,0.5,,2.290844366,182.25
+110006,202003,200,6685,42,,,0.5,0.994479964,,150.2748092
+110007,202001,200,5496,19,,,0.5,,2.994350985,107.48
+110007,202002,200,1010,19,,,0.5,,2.290844366,182.25
+110007,202003,200,1235,19,,,0.5,0.994479964,,150.2748092
+110008,202001,200,,43,,,0.5,,2.994350985,107.48
+110008,202002,200,3913,43,,,0.5,,2.290844366,182.25
+110008,202003,200,6013,43,,,0.5,0.994479964,,150.2748092
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
new file mode 100644
index 00000000..c59a1c98
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -0,0 +1,25 @@
+reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
+110001,202001,100,9244,89,,,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
+110001,202002,100,8916,89,,,0.5,,2.656680299,101.7103175,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.771850199,1.894176015,88.31349209,8916,R,4,3,4
+110001,202003,100,6194,89,,,0.5,0.771850199,,74.91666667,0.694706146,,0.968230653,,70.26136364,0.870040426,,72.58901516,6194,R,3,,3
+110002,202001,100,4826,83,,,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
+110002,202002,100,5903,83,,,0.5,,2.656680299,101.7103175,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.771850199,1.894176015,88.31349209,5903,R,4,3,4
+110002,202003,100,4743,83,,,0.5,0.771850199,,74.91666667,0.803489751,,0.968230653,,70.26136364,0.870040426,,72.58901516,4743,R,3,,3
+110003,202001,100,7586,4,,,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
+110003,202002,100,1016,4,,,0.5,,2.656680299,101.7103175,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.771850199,1.894176015,88.31349209,1016,R,4,3,4
+110003,202003,100,1429,4,,,0.5,0.771850199,,74.91666667,1.406496063,,0.968230653,,70.26136364,0.870040426,,72.58901516,1429,R,3,,3
+110004,202001,100,3975,76,,,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
+110004,202002,100,3044,76,,,0.5,,2.656680299,101.7103175,0.765786164,,0.771850199,1.13167173,74.91666667,0.771850199,1.894176015,88.31349209,3044,R,4,3,4
+110004,202003,100,,76,,,0.5,0.771850199,,74.91666667,,,0.968230653,,70.26136364,0.870040426,,72.58901516,2648.403057,FIR,3,,3
+110005,202001,200,5217,27,,,0.5,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3
+110005,202002,200,7016,27,,,0.5,,2.290844366,182.25,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,0.994479964,1.562080758,166.2624046,7016,R,3,4,4
+110005,202003,200,9940,27,,,0.5,0.994479964,,150.2748092,1.416761688,,1.259780318,,182.2366412,1.127130141,,166.2557252,9940,R,4,,4
+110006,202001,200,5325,42,,,0.5,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3
+110006,202002,200,7747,42,,,0.5,,2.290844366,182.25,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,0.994479964,1.562080758,166.2624046,7747,R,3,4,4
+110006,202003,200,6685,42,,,0.5,0.994479964,,150.2748092,0.862914677,,1.259780318,,182.2366412,1.127130141,,166.2557252,6685,R,4,,4
+110007,202001,200,5496,19,,,0.5,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3
+110007,202002,200,1010,19,,,0.5,,2.290844366,182.25,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,0.994479964,1.562080758,166.2624046,1010,R,3,4,4
+110007,202003,200,1235,19,,,0.5,0.994479964,,150.2748092,1.222772277,,1.259780318,,182.2366412,1.127130141,,166.2557252,1235,R,4,,4
+110008,202001,200,,43,,,0.5,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,10340.48471,BI,,3,3
+110008,202002,200,3913,43,,,0.5,,2.290844366,182.25,,0.650756694,0.994479964,0.833317149,150.2748092,0.994479964,1.562080758,166.2624046,3913,R,3,4,4
+110008,202003,200,6013,43,,,0.5,0.994479964,,150.2748092,1.53667263,,1.259780318,,182.2366412,1.127130141,,166.2557252,6013,R,4,,4
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 35515557..5e6a3ab5 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -95,31 +95,90 @@ trim_threshold = 10
 [48_BI_BI_R-R_R_FI_filtered_partial_default]
 link_filter = "identifier NOT IN ('110005', '110006', '110007')"
 
-[49_C_FI_FI_filtered_full_default]
-link_filter = "identifier NOT IN ('110005', '110006')"
+[49_R_R_FI-BI_R_R_50_weight_previous_month]
+weight = 0.5
+weight_periodicity = 1
 
 [50_R_R_FI_50_weight]
 weight = 0.5
 weight_periodicity = 12
 
+[51]
+weight = 0.8
+weight_periodicity = 12
+
+[52]
+weight = 0.5
+weight_periodicity = 12
+
+[53]
+weight = 0.5
+weight_periodicity = 12
+
+[54]
+weight = 0.5
+weight_periodicity = 12
+
+[55]
+weight = 0.5
+weight_periodicity = 12
+
+[56]
+weight = 0.5
+weight_periodicity = 12
+
+[57]
+weight = 0.5
+weight_periodicity = 12
+
+[58]
+weight = 0.5
+weight_periodicity = 12
+
+[59]
+weight = 0.5
+weight_periodicity = 12
+
+[60]
+weight = 0.5
+weight_periodicity = 12
+
 [61_R_R_FI-BI_R_R_50_weight_filtered]
+weight = 0.5
+weight_periodicity = 12
 link_filter = "identifier NOT IN ('110009', '110009')"
 
 [62_mixed_data_50_weight]
+weight = 0.5
+weight_periodicity = 12
+
+[63]
+weight = 0.5
+weight_periodicity = 12
+
+[64]
+weight = 0.5
+weight_periodicity = 12
 
 [65_TB_10_BI_BI_R_50_weight_filtered]
+weight = 0.5
+weight_periodicity = 12
 link_filter = "NOT(identifier = '90003' AND date = '202001')"
 lower_trim = 50
 upper_trim = 50
 trim_threshold = 10
 
 [66_TB_50_50_weight_filtered_partial_default]
+weight = 0.5
+weight_periodicity = 12
 link_filter = "identifier NOT IN ('30001', '30002', '30010')"
 lower_trim = 50
 upper_trim = 50
 trim_threshold = 10
 
 [67_TB_50_50_weight_filtered_full_default]
+weight = 0.5
+weight_periodicity = 12
 link_filter = "identifier NOT IN ('30001', '30002', '30010')"
 lower_trim = 50
 upper_trim = 50

From 7c3f9e0d5c9d54747bd18de9e55fdb3d624e6d20 Mon Sep 17 00:00:00 2001
From: Dom Ford <dom.ford@ons.gov.uk>
Date: Thu, 4 May 2023 17:36:58 +0100
Subject: [PATCH 269/531] Updating another batch of test outputs.

---
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          | 56 +++++------
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          | 56 +++++------
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          | 56 +++++------
 .../17_NS_R_FI_NS_output.csv                  | 30 +++---
 .../18_NS_BI_R_NS_output.csv                  | 30 +++---
 .../20_mixed_data_output.csv                  | 96 +++++++++----------
 6 files changed, 162 insertions(+), 162 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 35e907ec..0fe723fd 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,FALSE,FALSE,FALSE,FALSE
-140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,FALSE,FALSE,FALSE,FALSE
-140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,FALSE,FALSE,FALSE,FALSE
-140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,FALSE,FALSE,FALSE,FALSE
-140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,FALSE,FALSE,FALSE,FALSE
-140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,FALSE,FALSE,FALSE,FALSE
-140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,FALSE,FALSE,FALSE,FALSE
-140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,FALSE,FALSE,FALSE,FALSE
-140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,FALSE,FALSE,FALSE,FALSE
-140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,FALSE,FALSE,FALSE,FALSE
-140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,FALSE,FALSE,FALSE,FALSE
-140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,FALSE,FALSE,FALSE,FALSE
-140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,FALSE,FALSE,FALSE,FALSE
-140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,FALSE,FALSE,FALSE,FALSE
-140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,FALSE,FALSE,FALSE,FALSE
-140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,FALSE,FALSE,FALSE,FALSE
-140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,FALSE,FALSE,FALSE,FALSE
-140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,FALSE,FALSE,FALSE,FALSE
-140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,FALSE,FALSE,FALSE,FALSE
-140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,FALSE,FALSE,FALSE,FALSE
-140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,FALSE,FALSE,FALSE,FALSE
-140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,,,,
-140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,,,,
-140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,,,,
-140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,,,,
-140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,,,,
-140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,FALSE,FALSE,FALSE,FALSE
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,true,true,true,false,false
+140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
+140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
+140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,true,true,true,false,false,false
+140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,true,true,true,false,false,false
+140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,true,true,true,false,false,false
+140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,true,true,true,false,true,false
+140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,true,true,true,true,false,false
+140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
+140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
+140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,true,true,true,false,false,false
+140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,true,true,true,false,false,false
+140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,true,true,true,false,false,false
+140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,true,true,true,false,true,false
+140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,true,true,true,true,false,false
+140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
+140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
+140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,true,true,true,false,false,false
+140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,true,true,true,false,false,false
+140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,true,true,true,false,false,false
+140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,true,true,true,false,true,false
+140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,,,,true,false,false
+140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,,,,false,false,false
+140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,,,,false,false,false
+140004,202005,100,28,13403.57248,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,,,,false,false,false
+140004,202006,100,28,26948.53343,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,,,,false,false,false
+140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,true,true,true,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 13301135..f75ef9d4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,FALSE,FALSE,FALSE,FALSE
-150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,FALSE,FALSE,FALSE,FALSE
-150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,FALSE,FALSE,FALSE,FALSE
-150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,FALSE,FALSE,FALSE,FALSE
-150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,FALSE,FALSE,FALSE,FALSE
-150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,FALSE,FALSE,FALSE,FALSE
-150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,FALSE,FALSE,FALSE,FALSE
-150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,FALSE,FALSE,FALSE,FALSE
-150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,FALSE,FALSE,FALSE,FALSE
-150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,FALSE,FALSE,FALSE,FALSE
-150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,FALSE,FALSE,FALSE,FALSE
-150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,FALSE,FALSE,FALSE,FALSE
-150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,FALSE,FALSE,FALSE,FALSE
-150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,FALSE,FALSE,FALSE,FALSE
-150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,FALSE,FALSE,FALSE,FALSE
-150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,FALSE,FALSE,FALSE,FALSE
-150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,FALSE,FALSE,FALSE,FALSE
-150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,FALSE,FALSE,FALSE,FALSE
-150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,FALSE,FALSE,FALSE,FALSE
-150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,FALSE,FALSE,FALSE,FALSE
-150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,FALSE,FALSE,FALSE,FALSE
-150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,,,,
-150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,,
-150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,FALSE,FALSE,FALSE,FALSE
-150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,FALSE,FALSE,FALSE,FALSE
-150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,,,,
-150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,true,true,true,false,false
+150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
+150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
+150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,true,true,true,false,false,false
+150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
+150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,true,true,true,false,false,false
+150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,true,true,true,false,true,false
+150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,true,true,true,true,false,false
+150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
+150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
+150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,true,true,true,false,false,false
+150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
+150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,true,true,true,false,false,false
+150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,true,true,true,false,true,false
+150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,true,true,true,true,false,false
+150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
+150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
+150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,true,true,true,false,false,false
+150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
+150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,true,true,true,false,false,false
+150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,true,true,true,false,true,false
+150004,202001,100,69,13547.81819,BI,,,1,0.917399451,181.0909091,0,3,3,,,,true,false,false
+150004,202002,100,69,14767.63277,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,,false,false,false
+150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
+150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
+150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,,,,false,false,false
+150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,,,,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 5856b971..8d848e5e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,FALSE,FALSE,FALSE,FALSE
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,FALSE,FALSE,FALSE,FALSE
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,FALSE,FALSE,FALSE,FALSE
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,FALSE,FALSE,FALSE,FALSE
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,FALSE,FALSE,FALSE,FALSE
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,FALSE,FALSE,FALSE,FALSE
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,FALSE,FALSE,FALSE,FALSE
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,FALSE,FALSE,FALSE,FALSE
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,FALSE,FALSE,FALSE,FALSE
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,FALSE,FALSE,FALSE,FALSE
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,FALSE,FALSE,FALSE,FALSE
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,FALSE,FALSE,FALSE,FALSE
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,FALSE,FALSE,FALSE,FALSE
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,FALSE,FALSE,FALSE,FALSE
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,FALSE,FALSE,FALSE,FALSE
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,FALSE,FALSE,FALSE,FALSE
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,FALSE,FALSE,FALSE,FALSE
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,FALSE,FALSE,FALSE,FALSE
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,FALSE,FALSE,FALSE,FALSE
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,FALSE,FALSE,FALSE,FALSE
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,FALSE,FALSE,FALSE,FALSE
-160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,,,,
-160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,,,,
-160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,FALSE,FALSE,FALSE,FALSE
-160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,,,,
-160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,,,,
-160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,true,true,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,true,true,true,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,true,true,true,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,true,true,true,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,true,true,true,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,true,true,true,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,true,true,true,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,true,true,true,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,true,true,true,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,true,true,true,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,true,true,true,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,true,true,true,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,true,true,true,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,true,true,true,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,true,true,true,false,true,false
+160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,,,,true,false,false
+160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,,,,false,false,false
+160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
+160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,,,,false,false,false
+160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,,,,false,false,false
+160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,,,,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 29c78ffb..f7028027 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,FALSE,FALSE,FALSE,FALSE
-170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,FALSE,FALSE,FALSE,FALSE
-170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,FALSE,FALSE,FALSE,FALSE
-170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,FALSE,FALSE,FALSE,FALSE
-170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,FALSE,FALSE,FALSE,FALSE
-170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,FALSE,FALSE,FALSE,FALSE
-170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,FALSE,FALSE,FALSE,FALSE
-170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,FALSE,FALSE,FALSE,FALSE
-170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,FALSE,FALSE,FALSE,FALSE
-170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,FALSE,FALSE,FALSE,FALSE
-170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,FALSE,FALSE,FALSE,FALSE
-170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,FALSE,FALSE,FALSE,FALSE
-170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,FALSE,FALSE,FALSE,FALSE
-170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,true,true,true,false,false
+170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
+170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
+170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,true,true,true,false,true,false
+170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,true,true,true,true,false,false
+170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
+170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
+170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,true,true,true,false,true,false
+170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,true,true,true,true,false,false
+170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
+170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
+170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,true,true,true,false,true,false
+170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
+170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,,,,false,false,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index b7e46ba3..5487aebd 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,FALSE,FALSE,FALSE,FALSE
-180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,FALSE,FALSE,FALSE,FALSE
-180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,FALSE,FALSE,FALSE,FALSE
-180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,FALSE,FALSE,FALSE,FALSE
-180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,FALSE,FALSE,FALSE,FALSE
-180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,FALSE,FALSE,FALSE,FALSE
-180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,FALSE,FALSE,FALSE,FALSE
-180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,FALSE,FALSE,FALSE,FALSE
-180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,FALSE,FALSE,FALSE,FALSE
-180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,FALSE,FALSE,FALSE,FALSE
-180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,FALSE,FALSE,FALSE,FALSE
-180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,FALSE,FALSE,FALSE,FALSE
-180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,,,,
-180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,FALSE,FALSE,FALSE,FALSE
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,true,true,true,false,false
+180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
+180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
+180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,true,true,true,false,true,false
+180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,true,true,true,true,false,false
+180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
+180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
+180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,true,true,true,false,true,false
+180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,true,true,true,true,false,false
+180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
+180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
+180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,true,true,true,false,true,false
+180004,202002,100,26,11794.76123,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,,,,false,false,false
+180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index 53bd5d95..f30a0521 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,FALSE,FALSE,FALSE,FALSE
-200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,FALSE,FALSE,FALSE,FALSE
-200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,FALSE,FALSE,FALSE,FALSE
-200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,FALSE,FALSE,FALSE,FALSE
-200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,FALSE,FALSE,FALSE,FALSE
-200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,FALSE,FALSE,FALSE,FALSE
-200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,FALSE,FALSE,FALSE,FALSE
-200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,FALSE,FALSE,FALSE,FALSE
-200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,FALSE,FALSE,FALSE,FALSE
-200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,FALSE,FALSE,FALSE,FALSE
-200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,FALSE,FALSE,FALSE,FALSE
-200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,FALSE,FALSE,FALSE,FALSE
-200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,FALSE,FALSE,FALSE,FALSE
-200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,FALSE,FALSE,FALSE,FALSE
-200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,
-200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,,,,
-200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,,,,
-200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,
-200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,
-200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,,,,
-200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,,,,
-200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,
-200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,FALSE,FALSE,FALSE,FALSE
-200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,FALSE,FALSE,FALSE,FALSE
-200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,FALSE,FALSE,FALSE,FALSE
-200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,FALSE,FALSE,FALSE,FALSE
-200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,FALSE,FALSE,FALSE,FALSE
-200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,FALSE,FALSE,FALSE,FALSE
-200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,FALSE,FALSE,FALSE,FALSE
-200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,FALSE,FALSE,FALSE,FALSE
-200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,FALSE,FALSE,FALSE,FALSE
-200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,FALSE,FALSE,FALSE,FALSE
-200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,FALSE,FALSE,FALSE,FALSE
-200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,FALSE,FALSE,FALSE,FALSE
-200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,FALSE,FALSE,FALSE,FALSE
-200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,FALSE,FALSE,FALSE,FALSE
-200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,,,,
-200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,FALSE,FALSE,FALSE,FALSE
-200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,FALSE,FALSE,FALSE,FALSE
-200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,
-200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,,,,
-200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,FALSE,FALSE,FALSE,FALSE
-200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,,,,
-200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,FALSE,FALSE,FALSE,FALSE
-200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,,,,
-200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,,,,
-200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,true,true,true,false,false
+200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
+200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
+200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,true,true,true,false,true,false
+200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,true,true,true,true,false,false
+200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
+200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
+200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,true,true,true,false,true,false
+200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,true,true,true,true,false,false
+200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
+200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
+200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,true,true,true,false,true,false
+200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,true,true,true,true,false,false
+200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
+200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,false,false,false
+200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,,,,false,true,false
+200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,,,,true,false,false
+200005,202002,100,6,10116.54266,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,false,false,false
+200005,202003,100,6,11749.48593,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,false,false,false
+200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,,,,false,true,false
+200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,,,,true,false,false
+200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,false,false,false
+200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
+200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,true,true,true,false,true,false
+200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,true,true,true,true,false,false
+200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
+200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
+200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,true,true,true,false,true,false
+200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,true,true,true,true,false,false
+200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
+200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
+200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,true,true,true,false,true,false
+200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,true,true,true,true,false,false
+200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
+200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
+200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,true,true,true,false,true,false
+200010,202001,200,85,14038.67103,BI,,,1,2.163456777,132.3214286,0,3,4,,,,true,false,false
+200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
+200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
+200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,false,true,false
+200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,,,,true,false,false
+200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
+200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,,,,false,true,false
+200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,true,true,true,true,false,false
+200012,202002,200,87,13949.29461,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,,,,false,false,false
+200012,202003,200,87,29170.87018,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,,,,false,false,false
+200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,false,true,false
\ No newline at end of file

From a453474f900b5d4a3daaacf06947865ced6dd5b0 Mon Sep 17 00:00:00 2001
From: Dom Ford <dom.ford@ons.gov.uk>
Date: Tue, 9 May 2023 12:06:52 +0100
Subject: [PATCH 270/531] Some more of the same.

---
 .../21_class_change_R_C_FI_output.csv         | 32 +++----
 .../22_class_change_C_BI_R_output.csv         | 32 +++----
 .../23_class_change_C_C_FI_output.csv         | 32 +++----
 .../24_class_change_R_BI_R_output.csv         | 32 +++----
 .../25_class_change_C_FI_FI_output.csv        | 44 +++++-----
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv | 84 +++++++++----------
 6 files changed, 128 insertions(+), 128 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index d0c8fa99..10d4e787 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
-210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
-210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
-210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
-210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
-210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
-210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
-210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
-210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,FALSE,FALSE,FALSE,FALSE
-210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
-210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
-210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,FALSE,FALSE,FALSE,FALSE
-210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
-210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,
-210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
+210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
+210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
+210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
+210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
+210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,true,true,false,true,false
+210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
+210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,true,true,false,true,false
+210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
+210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,,,,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index ab9def81..0e7a4eac 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,FALSE,FALSE,FALSE,FALSE
-220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
-220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
-220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,FALSE,FALSE,FALSE,FALSE
-220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
-220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
-220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
-220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
-220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,FALSE,FALSE,FALSE,FALSE
-220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
-220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
-220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,FALSE,FALSE,FALSE,FALSE
-220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,,
-220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,
-220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,FALSE,FALSE,FALSE,FALSE
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,true,true,true,false,false
+220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
+220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
+220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,true,true,true,false,false
+220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
+220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
+220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
+220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,true,true,true,false,true,false
+220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
+220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,true,true,true,false,true,false
+220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,,true,false,false
+220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
+220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 3edb4230..8c29e270 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,FALSE,FALSE,FALSE,FALSE
-230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
-230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
-230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,FALSE,FALSE,FALSE,FALSE
-230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
-230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
-230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
-230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
-230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,FALSE,FALSE,FALSE,FALSE
-230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
-230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
-230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,FALSE,FALSE,FALSE,FALSE
-230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,,
-230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,
-230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,true,true,true,false,false
+230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
+230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
+230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,true,true,true,false,false
+230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
+230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
+230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
+230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,true,true,false,true,false
+230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
+230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,true,true,false,true,false
+230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,,true,false,false
+230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
+230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,,,,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index d99312d3..52ffd60f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
-240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
-240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
-240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
-240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
-240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
-240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
-240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
-240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,FALSE,FALSE,FALSE,FALSE
-240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
-240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,FALSE,FALSE,FALSE,FALSE
-240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,FALSE,FALSE,FALSE,FALSE
-240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
-240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,
-240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,FALSE,FALSE,FALSE,FALSE
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
+240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
+240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
+240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
+240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
+240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,true,true,true,false,true,false
+240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
+240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,true,true,true,false,true,false
+240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
+240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,true,true,true,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index f0e64fdf..6a113421 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
-250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
-250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
-250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
-250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,FALSE,FALSE,FALSE,FALSE
-250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,FALSE,FALSE,FALSE,FALSE
-250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
-250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,FALSE,FALSE,FALSE,FALSE
-250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,FALSE,FALSE,FALSE,FALSE
-250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,FALSE,FALSE,FALSE,FALSE
-250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,FALSE,FALSE,FALSE,FALSE
-250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,FALSE,FALSE,FALSE,FALSE
-250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,FALSE,FALSE,FALSE,FALSE
-250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,FALSE,FALSE,FALSE,FALSE
-250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,FALSE,FALSE,FALSE,FALSE
-250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,,,,
-250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,,,,
-250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,,,,
-250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,,,,
-250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,,,,
-250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
+250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
+250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
+250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
+250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,true,true,true,false,false,false
+250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,true,true,true,false,true,false
+250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,true,true,true,false,false,false
+250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,true,true,true,false,true,false
+250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,true,true,true,false,false,false
+250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,true,true,true,false,true,false
+250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,,,,true,false,false
+250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,,,,false,false,false
+250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,,,,false,true,false
+250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,,,,true,false,false
+250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,,,,false,false,false
+250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,,,,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 0c191bfa..814aacb7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-140001,202001,100,27,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,
-140001,202002,100,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,
-140001,202003,100,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,
-140001,202004,100,27,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,
-140001,202005,100,27,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,
-140001,202006,100,27,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,
-140001,202007,100,27,1.148331415,,0.520242185,1,91.63876652,9979,R,3,0,4,
-140002,202001,100,83,,0.755746721,1,0.534118956,47.13567839,5359,R,0,3,3,
-140002,202002,100,83,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,
-140002,202003,100,83,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,
-140002,202004,100,83,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,
-140002,202005,100,83,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,
-140002,202006,100,83,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,
-140002,202007,100,83,0.156757562,,0.520242185,1,91.63876652,1052,R,3,0,4,
-140003,202001,100,89,,0.056404985,1,0.534118956,47.13567839,439,R,0,3,3,
-140003,202002,100,89,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,
-140003,202003,100,89,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,
-140003,202004,100,89,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,
-140003,202005,100,89,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,
-140003,202006,100,89,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,
-140003,202007,100,89,0.255637577,,0.520242185,1,91.63876652,2528,R,3,0,4,
-140004,202001,100,28,,,1,0.534118956,47.13567839,1319.798995,C,0,3,3,
-140004,202002,100,28,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,
-140004,202003,100,28,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,
-140004,202005,100,28,,,1.108042751,0.497376695,63.63316583,13403.572478,BI,3,3,3,
-140004,202006,100,28,,,2.988483968,3.720631427,127.0854271,26948.533427,BI,3,3,3,
-140004,202007,100,28,,,0.520242185,1,91.63876652,7243,R,3,0,4,
-140005,202001,100,85,,,1,0.534118956,47.13567839,150000,R,0,3,3,TRUE
-140005,202002,100,85,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,TRUE
-140005,202003,100,85,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,TRUE
-140005,202004,100,85,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,TRUE
-140005,202005,100,85,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,TRUE
-140005,202006,100,85,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,TRUE
-140005,202007,100,85,,,0.520242185,1,91.63876652,160000,R,3,0,4,TRUE
-140006,202001,100,71,,,1,0.534118956,47.13567839,3346.633166,C,0,3,3,
-140006,202002,100,71,,,6.772539383,3.563193687,97.52261307,22665.204916,FIC,3,3,3,
-140006,202003,100,71,,,0.700853626,0.84489759,62.64321608,15884.991057,FIC,3,3,3,
-140006,202004,100,71,,,3.724667279,2.674093602,95.10050251,59166.306423,FIC,3,3,3,
-140006,202005,100,71,,,1.108042751,0.497376695,63.63316583,65558.796938,FIC,3,3,3,
-140006,202006,100,71,,,2.988483968,3.720631427,127.0854271,195921.413606,FIC,3,3,3,
-140006,202007,100,71,,,0.520242185,1,91.63876652,101926.584286,FIC,3,0,4,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+140001,202001,100,27,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,true,true,true,true,false,false
+140001,202002,100,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,true,true,true,false,false,false
+140001,202003,100,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,true,true,true,false,false,false
+140001,202004,100,27,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,true,true,true,false,false,false
+140001,202005,100,27,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,true,true,true,false,false,false
+140001,202006,100,27,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,true,true,true,false,false,false
+140001,202007,100,27,1.148331415,,0.520242185,1,91.63876652,9979,R,3,0,4,true,true,true,false,true,false
+140002,202001,100,83,,0.755746721,1,0.534118956,47.13567839,5359,R,0,3,3,true,true,true,true,false,false
+140002,202002,100,83,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,true,true,true,false,false,false
+140002,202003,100,83,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,true,true,true,false,false,false
+140002,202004,100,83,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,true,true,true,false,false,false
+140002,202005,100,83,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,true,true,true,false,false,false
+140002,202006,100,83,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,true,true,true,false,false,false
+140002,202007,100,83,0.156757562,,0.520242185,1,91.63876652,1052,R,3,0,4,true,true,true,false,true,false
+140003,202001,100,89,,0.056404985,1,0.534118956,47.13567839,439,R,0,3,3,true,true,true,true,false,false
+140003,202002,100,89,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,true,true,true,false,false,false
+140003,202003,100,89,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,true,true,true,false,false,false
+140003,202004,100,89,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,true,true,true,false,false,false
+140003,202005,100,89,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,true,true,true,false,false,false
+140003,202006,100,89,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,true,true,true,false,false,false
+140003,202007,100,89,0.255637577,,0.520242185,1,91.63876652,2528,R,3,0,4,true,true,true,false,true,false
+140004,202001,100,28,,,1,0.534118956,47.13567839,1319.798995,C,0,3,3,,,,true,false,false
+140004,202002,100,28,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,,,,false,false,false
+140004,202003,100,28,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,,,,false,false,false
+140004,202005,100,28,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3,,,,false,false,false
+140004,202006,100,28,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3,,,,false,false,false
+140004,202007,100,28,,,0.520242185,1,91.63876652,7243,R,3,0,4,true,true,true,false,true,false
+140005,202001,100,85,,,1,0.534118956,47.13567839,150000,R,0,3,3,false,true,false,true,false,false
+140005,202002,100,85,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,false,false,false,false,false,false
+140005,202003,100,85,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,false,false,false,false,false,false
+140005,202004,100,85,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,false,false,false,false,false,false
+140005,202005,100,85,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,false,false,false,false,false,false
+140005,202006,100,85,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,false,false,false,false,false,false
+140005,202007,100,85,,,0.520242185,1,91.63876652,160000,R,3,0,4,false,false,true,false,true,false
+140006,202001,100,71,,,1,0.534118956,47.13567839,3346.633166,C,0,3,3,,,,true,false,false
+140006,202002,100,71,,,6.772539383,3.563193687,97.52261307,22665.20492,FIC,3,3,3,,,,false,false,false
+140006,202003,100,71,,,0.700853626,0.84489759,62.64321608,15884.99106,FIC,3,3,3,,,,false,false,false
+140006,202004,100,71,,,3.724667279,2.674093602,95.10050251,59166.30642,FIC,3,3,3,,,,false,false,false
+140006,202005,100,71,,,1.108042751,0.497376695,63.63316583,65558.79694,FIC,3,3,3,,,,false,false,false
+140006,202006,100,71,,,2.988483968,3.720631427,127.0854271,195921.4136,FIC,3,3,3,,,,false,false,false
+140006,202007,100,71,,,0.520242185,1,91.63876652,101926.5843,FIC,3,0,4,,,,false,true,false
\ No newline at end of file

From 0b0fde6958352c11324e37ae9145b861180f077c Mon Sep 17 00:00:00 2001
From: Dom Ford <dom.ford@ons.gov.uk>
Date: Tue, 9 May 2023 12:30:31 +0100
Subject: [PATCH 271/531] Final batch of test data output corrections.

---
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |  84 ++++++------
 .../29_mixed_data_filtered_output.csv         | 128 +++++++++---------
 ...30_class_change_C_C_FI_filtered_output.csv |  56 ++++----
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  44 +++---
 .../32_C_FI_FI_no_response_output.csv         |  32 ++---
 .../34_default_link_output.csv                |  42 +++---
 6 files changed, 193 insertions(+), 193 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index c0c6168d..637f5c26 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-150001,202001,100,15,,1.285963763,1,0.917399451,181.0909091,5891,R,0,3,3,
-150001,202002,100,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,
-150001,202003,100,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,
-150001,202004,100,15,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,
-150001,202005,100,15,0.336999506,1.154041473,1.028150423,3.035462652,124.851190,2727,R,3,3,4,
-150001,202006,100,15,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,
-150001,202007,100,15,4.041049513,,2.111448113,1,152.5353535,9549,R,3,0,3,
-150002,202001,100,5,,0.917723543,1,0.917399451,181.0909091,8611,R,0,3,3,
-150002,202002,100,5,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,
-150002,202003,100,5,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,
-150002,202004,100,5,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,
-150002,202005,100,5,1.343442512,7.155061019,1.028150423,3.035462652,124.851190,9967,R,3,3,4,
-150002,202006,100,5,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,
-150002,202007,100,5,1.861450108,,2.111448113,1,152.5353535,2593,R,3,0,3,
-150003,202001,100,79,,0.548511047,1,0.917399451,181.0909091,3426,R,0,3,3,
-150003,202002,100,79,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,
-150003,202003,100,79,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,
-150003,202004,100,79,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,
-150003,202005,100,79,1.404009252,0.797285464,1.028150423,3.035462652,124.851190,5463,R,3,3,4,
-150003,202006,100,79,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,
-150003,202007,100,79,0.431844717,,2.111448113,1,152.5353535,2959,R,3,0,3,
-150004,202001,100,69,,,1,0.917399451,181.0909091,13547.818191,BI,0,3,3,
-150004,202002,100,69,,,1.230132332,3.509418433,204.1414141,14767.632765,BI,3,3,3,
-150004,202003,100,69,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,
-150004,202005,100,69,,,1.028150423,3.035462652,124.851190,2818,R,3,3,4,
-150004,202006,100,69,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,
-150004,202007,100,69,,,2.111448113,1,152.5353535,4483.444383,FIR,3,0,3,
-150005,202001,100,85,,,1,0.917399451,181.0909091,150000,R,0,3,3,TRUE
-150005,202002,100,85,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,TRUE
-150005,202003,100,85,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,TRUE
-150005,202004,100,85,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,TRUE
-150006,202005,100,85,,,1.028150423,3.035462652,124.851190,105000,R,3,3,4,TRUE
-150006,202006,100,85,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,TRUE
-150006,202007,100,85,,,2.111448113,1,152.5353535,160000,R,3,0,3,TRUE
-150007,202001,100,71,,,1,0.917399451,181.0909091,12857.454545,C,0,3,3,
-150007,202002,100,71,,,1.230132332,3.509418433,204.1414141,15816.370544,FIC,3,3,3,
-150007,202003,100,71,,,0.831168119,0.962881641,109.6130952,13146.062949,FIC,3,3,4,
-150007,202004,100,71,,,3.047553764,1.474655266,195.979798,40063.333624,FIC,3,3,3,
-150007,202005,100,71,,,1.028150423,3.035462652,124.851190,41191.133429,FIC,3,3,4,
-150007,202006,100,71,,,0.753512367,1.033441075,107.1515152,31038.028445,FIC,3,3,3,
-150007,202007,100,71,,,2.111448113,1,152.5353535,65535.186580,FIC,3,0,3,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+150001,202001,100,15,,1.285963763,1,0.917399451,181.0909091,5891,R,0,3,3,true,true,true,true,false,false
+150001,202002,100,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,true,true,true,false,false,false
+150001,202003,100,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,true,true,true,false,false,false
+150001,202004,100,15,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,true,true,true,false,false,false
+150001,202005,100,15,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,2727,R,3,3,4,true,true,true,false,false,false
+150001,202006,100,15,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,true,true,true,false,false,false
+150001,202007,100,15,4.041049513,,2.111448113,1,152.5353535,9549,R,3,0,3,true,true,true,false,true,false
+150002,202001,100,5,,0.917723543,1,0.917399451,181.0909091,8611,R,0,3,3,true,true,true,true,false,false
+150002,202002,100,5,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,true,true,true,false,false,false
+150002,202003,100,5,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,true,true,true,false,false,false
+150002,202004,100,5,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,true,true,true,false,false,false
+150002,202005,100,5,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,9967,R,3,3,4,true,true,true,false,false,false
+150002,202006,100,5,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,true,true,true,false,false,false
+150002,202007,100,5,1.861450108,,2.111448113,1,152.5353535,2593,R,3,0,3,true,true,true,false,true,false
+150003,202001,100,79,,0.548511047,1,0.917399451,181.0909091,3426,R,0,3,3,true,true,true,true,false,false
+150003,202002,100,79,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,true,true,true,false,false,false
+150003,202003,100,79,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,true,true,true,false,false,false
+150003,202004,100,79,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,true,true,true,false,false,false
+150003,202005,100,79,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,5463,R,3,3,4,true,true,true,false,false,false
+150003,202006,100,79,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,true,true,true,false,false,false
+150003,202007,100,79,0.431844717,,2.111448113,1,152.5353535,2959,R,3,0,3,true,true,true,false,true,false
+150004,202001,100,69,,,1,0.917399451,181.0909091,13547.81819,BI,0,3,3,,,,true,false,false
+150004,202002,100,69,,,1.230132332,3.509418433,204.1414141,14767.63277,BI,3,3,3,,,,false,false,false
+150004,202003,100,69,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,true,true,true,false,false,false
+150004,202005,100,69,,,1.028150423,3.035462652,124.85119,2818,R,3,3,4,true,true,true,false,false,false
+150004,202006,100,69,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,,,,false,false,false
+150004,202007,100,69,,,2.111448113,1,152.5353535,4483.444383,FIR,3,0,3,,,,false,true,false
+150005,202001,100,85,,,1,0.917399451,181.0909091,150000,R,0,3,3,false,true,false,true,false,false
+150005,202002,100,85,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,false,false,false,false,false,false
+150005,202003,100,85,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,false,false,false,false,false,false
+150005,202004,100,85,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,false,false,false,false,false,false
+150006,202005,100,85,,,1.028150423,3.035462652,124.85119,105000,R,3,3,4,false,false,false,false,false,false
+150006,202006,100,85,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,false,false,false,false,false,false
+150006,202007,100,85,,,2.111448113,1,152.5353535,160000,R,3,0,3,false,false,true,false,true,false
+150007,202001,100,71,,,1,0.917399451,181.0909091,12857.45455,C,0,3,3,,,,true,false,false
+150007,202002,100,71,,,1.230132332,3.509418433,204.1414141,15816.37054,FIC,3,3,3,,,,false,false,false
+150007,202003,100,71,,,0.831168119,0.962881641,109.6130952,13146.06295,FIC,3,3,4,,,,false,false,false
+150007,202004,100,71,,,3.047553764,1.474655266,195.979798,40063.33362,FIC,3,3,3,,,,false,false,false
+150007,202005,100,71,,,1.028150423,3.035462652,124.85119,41191.13343,FIC,3,3,4,,,,false,false,false
+150007,202006,100,71,,,0.753512367,1.033441075,107.1515152,31038.02845,FIC,3,3,3,,,,false,false,false
+150007,202007,100,71,,,2.111448113,1,152.5353535,65535.18658,FIC,3,0,3,,,,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
index 1bcfbb62..fefa2ec4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,
-200001,202001,100,56,,1.262441238,1,0.597514698,71.63436123,7788,R,0,4,4,
-200001,202002,100,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,
-200001,202003,100,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,
-200001,202004,100,56,0.25617284,,0.276010255,1,42.68681319,1577,R,4,0,4,
-200002,202001,100,75,,0.806244601,1,0.597514698,71.63436123,6533,R,0,4,4,
-200002,202002,100,75,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,
-200002,202003,100,75,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,
-200002,202004,100,75,0.439419795,,0.276010255,1,42.68681319,2575,R,4,0,4,
-200003,202001,100,10,,0.011249498,1,0.597514698,71.63436123,56,R,0,4,4,
-200003,202002,100,10,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,
-200003,202003,100,10,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,
-200003,202004,100,10,0.103224336,,0.276010255,1,42.68681319,906,R,4,0,4,
-200004,202001,100,86,,0.310123457,1,0.597514698,71.63436123,1884,R,0,4,4,
-200004,202002,100,86,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,
-200004,202003,100,86,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,
-200004,202004,100,86,,,0.276010255,1,42.68681319,1947.413826,FIR,4,0,4,
-200005,202001,100,6,,,1,0.597514698,71.63436123,429.8061674,C,0,4,4,
-200005,202002,100,6,,,23.53745347,0.984013482,111.5638767,10116.542659,FIC,4,3,4,
-200005,202003,100,6,,,1.161413175,4.785815599,163.0494505,11749.485934,FIC,3,4,4,
-200005,202004,100,6,,,0.276010255,1,42.68681319,3242.978608,FIC,4,0,4,
-200006,202001,100,41,,,1,0.597514698,71.63436123,5222.283092,BI,0,4,4,
-200006,202002,100,41,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,
-200006,202003,100,41,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,
-200006,202004,100,41,0.305224049,,0.276010255,1,42.68681319,2711,R,4,0,4,
-200007,202001,200,4,,0.252093023,1,2.163456777,132.3214286,2439,R,0,3,4,
-200007,202002,200,4,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,
-200007,202003,200,4,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,
-200007,202004,200,4,0.084963587,,0.197315737,1,99.37735849,595,R,3,0,3,
-200008,202001,200,4,,0.287290242,1,2.163456777,132.3214286,1849,R,0,3,4,
-200008,202002,200,4,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,
-200008,202003,200,4,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,
-200008,202004,200,4,0.280873416,,0.197315737,1,99.37735849,2727,R,3,0,3,
-200009,202001,200,45,,5.950987066,1,2.163456777,132.3214286,8742,R,0,3,4,
-200009,202002,200,45,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,
-200009,202003,200,45,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,
-200009,202004,200,45,0.226110207,,0.197315737,1,99.37735849,1945,R,3,0,3,
-200010,202001,200,85,,,1,2.163456777,132.3214286,14038.671027,BI,0,3,4,
-200010,202002,200,85,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,
-200010,202003,200,85,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,
-200010,202004,200,85,,,0.197315737,1,99.37735849,354.3790633,FIR,3,0,3,
-200011,202001,200,79,,,1,2.163456777,132.3214286,4166.817753,BI,0,3,4,
-200011,202002,200,79,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,
-200011,202004,200,79,,,0.197315737,1,99.37735849,7850.811321,C,3,0,3,
-200012,202001,200,87,,,1,2.163456777,132.3214286,5495,R,0,3,4,
-200012,202002,200,87,,,2.53854315,1.457061014,119.7926267,13949.294611,FIR,3,4,5,
-200012,202003,200,87,,,2.091207548,6.584230902,196.4492754,29170.870177,FIR,4,3,4,
-200012,202004,200,87,,,0.197315737,1,99.37735849,5755.871742,FIR,3,0,3,
-200013,202001,100,85,,,1,0.597514698,71.63436123,150000,R,0,4,4,TRUE
-200013,202002,100,85,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,TRUE
-200013,202003,100,85,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,TRUE
-200013,202004,100,85,,,0.276010255,1,42.68681319,105000,R,4,0,4,TRUE
-200014,202001,200,96,,,1,2.163456777,132.3214286,150000,R,0,3,4,TRUE
-200014,202002,200,96,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,TRUE
-200014,202003,200,96,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,TRUE
-200014,202004,200,96,,,0.197315737,1,99.37735849,105000,R,3,0,3,TRUE
-200015,202001,100,71,,,1,0.597514698,71.63436123,5086.039648,C,0,4,4,
-200015,202002,100,71,,,23.53745347,0.984013482,111.5638767,119712.421581,FIC,4,3,4,
-200015,202003,100,71,,,1.161413175,4.785815599,163.0494505,139035.583689,FIC,3,4,4,
-200015,202004,100,71,,,0.276010255,1,42.68681319,38375.246898,FIC,4,0,4,
-200016,202001,200,48,,,1,2.163456777,132.3214286,6351.428571,C,0,3,4,
-200016,202002,200,48,,,2.53854315,1.457061014,119.7926267,16123.375493,FIC,3,4,5,
-200016,202003,200,48,,,2.091207548,6.584230902,196.4492754,33717.324528,FIC,4,3,4,
-200016,202004,200,48,,,0.197315737,1,99.37735849,6652.958732,FIC,3,0,3,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+200001,202001,100,56,,1.262441238,1,0.597514698,71.63436123,7788,R,0,4,4,true,true,true,true,false,false
+200001,202002,100,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,true,true,true,false,false,false
+200001,202003,100,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,true,true,true,false,false,false
+200001,202004,100,56,0.25617284,,0.276010255,1,42.68681319,1577,R,4,0,4,true,true,true,false,true,false
+200002,202001,100,75,,0.806244601,1,0.597514698,71.63436123,6533,R,0,4,4,true,true,true,true,false,false
+200002,202002,100,75,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,true,true,true,false,false,false
+200002,202003,100,75,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,true,true,true,false,false,false
+200002,202004,100,75,0.439419795,,0.276010255,1,42.68681319,2575,R,4,0,4,true,true,true,false,true,false
+200003,202001,100,10,,0.011249498,1,0.597514698,71.63436123,56,R,0,4,4,true,true,true,true,false,false
+200003,202002,100,10,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,true,true,true,false,false,false
+200003,202003,100,10,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,true,true,true,false,false,false
+200003,202004,100,10,0.103224336,,0.276010255,1,42.68681319,906,R,4,0,4,true,true,true,false,true,false
+200004,202001,100,86,,0.310123457,1,0.597514698,71.63436123,1884,R,0,4,4,true,true,true,true,false,false
+200004,202002,100,86,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,true,true,true,false,false,false
+200004,202003,100,86,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,,,,false,false,false
+200004,202004,100,86,,,0.276010255,1,42.68681319,1947.413826,FIR,4,0,4,,,,false,true,false
+200005,202001,100,6,,,1,0.597514698,71.63436123,429.8061674,C,0,4,4,,,,true,false,false
+200005,202002,100,6,,,23.53745347,0.984013482,111.5638767,10116.54266,FIC,4,3,4,,,,false,false,false
+200005,202003,100,6,,,1.161413175,4.785815599,163.0494505,11749.48593,FIC,3,4,4,,,,false,false,false
+200005,202004,100,6,,,0.276010255,1,42.68681319,3242.978608,FIC,4,0,4,,,,false,true,false
+200006,202001,100,41,,,1,0.597514698,71.63436123,5222.283092,BI,0,4,4,,,,true,false,false
+200006,202002,100,41,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,,,,false,false,false
+200006,202003,100,41,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,true,true,true,false,false,false
+200006,202004,100,41,0.305224049,,0.276010255,1,42.68681319,2711,R,4,0,4,true,true,true,false,true,false
+200007,202001,200,4,,0.252093023,1,2.163456777,132.3214286,2439,R,0,3,4,true,true,true,true,false,false
+200007,202002,200,4,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,true,true,true,false,false,false
+200007,202003,200,4,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,true,true,true,false,false,false
+200007,202004,200,4,0.084963587,,0.197315737,1,99.37735849,595,R,3,0,3,true,true,true,false,true,false
+200008,202001,200,4,,0.287290242,1,2.163456777,132.3214286,1849,R,0,3,4,true,true,true,true,false,false
+200008,202002,200,4,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,true,true,true,false,false,false
+200008,202003,200,4,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,true,true,true,false,false,false
+200008,202004,200,4,0.280873416,,0.197315737,1,99.37735849,2727,R,3,0,3,true,true,true,false,true,false
+200009,202001,200,45,,5.950987066,1,2.163456777,132.3214286,8742,R,0,3,4,true,true,true,true,false,false
+200009,202002,200,45,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,true,true,true,false,false,false
+200009,202003,200,45,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,true,true,true,false,false,false
+200009,202004,200,45,0.226110207,,0.197315737,1,99.37735849,1945,R,3,0,3,true,true,true,false,true,false
+200010,202001,200,85,,,1,2.163456777,132.3214286,14038.67103,BI,0,3,4,,,,true,false,false
+200010,202002,200,85,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,true,true,true,false,false,false
+200010,202003,200,85,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,true,true,true,false,false,false
+200010,202004,200,85,,,0.197315737,1,99.37735849,354.3790633,FIR,3,0,3,,,,false,true,false
+200011,202001,200,79,,,1,2.163456777,132.3214286,4166.817753,BI,0,3,4,,,,true,false,false
+200011,202002,200,79,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,true,true,true,false,false,false
+200011,202004,200,79,,,0.197315737,1,99.37735849,7850.811321,C,3,0,3,,,,false,true,false
+200012,202001,200,87,,,1,2.163456777,132.3214286,5495,R,0,3,4,true,true,true,true,false,false
+200012,202002,200,87,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5,,,,false,false,false
+200012,202003,200,87,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4,,,,false,false,false
+200012,202004,200,87,,,0.197315737,1,99.37735849,5755.871742,FIR,3,0,3,,,,false,true,false
+200013,202001,100,85,,,1,0.597514698,71.63436123,150000,R,0,4,4,false,true,false,true,false,false
+200013,202002,100,85,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,false,false,false,false,false,false
+200013,202003,100,85,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,false,false,false,false,false,false
+200013,202004,100,85,,,0.276010255,1,42.68681319,105000,R,4,0,4,false,false,true,false,true,false
+200014,202001,200,96,,,1,2.163456777,132.3214286,150000,R,0,3,4,false,true,false,true,false,false
+200014,202002,200,96,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,false,false,false,false,false,false
+200014,202003,200,96,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,false,false,false,false,false,false
+200014,202004,200,96,,,0.197315737,1,99.37735849,105000,R,3,0,3,false,false,true,false,true,false
+200015,202001,100,71,,,1,0.597514698,71.63436123,5086.039648,C,0,4,4,,,,true,false,false
+200015,202002,100,71,,,23.53745347,0.984013482,111.5638767,119712.4216,FIC,4,3,4,,,,false,false,false
+200015,202003,100,71,,,1.161413175,4.785815599,163.0494505,139035.5837,FIC,3,4,4,,,,false,false,false
+200015,202004,100,71,,,0.276010255,1,42.68681319,38375.2469,FIC,4,0,4,,,,false,true,false
+200016,202001,200,48,,,1,2.163456777,132.3214286,6351.428571,C,0,3,4,,,,true,false,false
+200016,202002,200,48,,,2.53854315,1.457061014,119.7926267,16123.37549,FIC,3,4,5,,,,false,false,false
+200016,202003,200,48,,,2.091207548,6.584230902,196.4492754,33717.32453,FIC,4,3,4,,,,false,false,false
+200016,202004,200,48,,,0.197315737,1,99.37735849,6652.958732,FIC,3,0,3,,,,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 4fed12c5..5634c891 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker
-230001,202001,1,10,,1.511049724,1,1.087985595,15.46666667,547,R,0,2,2,
-230001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,
-230001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,895,R,2,0,2,
-230002,202001,1,50,,0.664921466,1,1.087985595,15.46666667,381,R,0,2,2,
-230002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,
-230002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,214,R,2,0,2,
-230003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,961,R,0,2,2,
-230003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,
-230003,202003,2,12,1.176029963,,1.174002242,1,50,314,R,2,0,2,
-230004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,555,R,0,2,2,
-230004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,
-230004,202003,2,9,1.171974522,,1.174002242,1,50,736,R,2,0,2,
-230005,202001,1,18,,,1,1.087985595,15.46666667,278.4,C,0,2,2,
-230005,202002,2,18,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,
-230005,202003,2,18,,,1.174002242,1,50,900.627434,FIC,2,0,2,
-230006,202001,1,85,,,1,1.087985595,15.46666667,150000,R,0,2,2,TRUE
-230006,202002,1,85,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,TRUE
-230006,202003,1,85,,,1.42292432,1,18.48333333,120000,R,2,0,2,TRUE
-230007,202001,1,71,,,1,1.087985595,15.46666667,1098.133333,C,0,2,2,
-230007,202002,1,71,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,
-230007,202003,1,71,,,1.42292432,1,18.48333333,1692.041117,FIC,2,0,2,
-230008,202001,2,85,,,1,2.241504449,72.19047619,150000,R,0,2,2,TRUE
-230008,202002,2,85,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,TRUE
-230008,202003,2,85,,,1.174002242,1,50,120000,R,2,0,2,TRUE
-230009,202001,2,71,,,1,2.241504449,72.19047619,5125.523810,C,0,2,2,
-230009,202002,2,71,,,0.70468356,0.85178967,42.61904762,3611.872364,FIC,2,2,2,
-230009,202003,2,71,,,1.174002242,1,50,4240.346255,FIC,2,0,2,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+230001,202001,1,10,,1.511049724,1,1.087985595,15.46666667,547,R,0,2,2,true,true,true,true,false,false
+230001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,true,true,true,false,false,false
+230001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,895,R,2,0,2,true,true,true,false,true,false
+230002,202001,1,50,,0.664921466,1,1.087985595,15.46666667,381,R,0,2,2,true,true,true,true,false,false
+230002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,true,true,true,false,false,false
+230002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,214,R,2,0,2,true,true,true,false,true,false
+230003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,961,R,0,2,2,true,true,true,true,false,false
+230003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,true,true,true,false,false,false
+230003,202003,2,12,1.176029963,,1.174002242,1,50,314,R,2,0,2,true,true,true,false,true,false
+230004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,555,R,0,2,2,true,true,true,true,false,false
+230004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,true,true,true,false,false,false
+230004,202003,2,9,1.171974522,,1.174002242,1,50,736,R,2,0,2,true,true,true,false,true,false
+230005,202001,1,18,,,1,1.087985595,15.46666667,278.4,C,0,2,2,,,,true,false,false
+230005,202002,2,18,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,,,,false,false,false
+230005,202003,2,18,,,1.174002242,1,50,900.627434,FIC,2,0,2,,,,false,true,false
+230006,202001,1,85,,,1,1.087985595,15.46666667,150000,R,0,2,2,false,true,false,true,false,false
+230006,202002,1,85,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,false,false,false,false,false,false
+230006,202003,1,85,,,1.42292432,1,18.48333333,120000,R,2,0,2,false,false,true,false,true,false
+230007,202001,1,71,,,1,1.087985595,15.46666667,1098.133333,C,0,2,2,,,,true,false,false
+230007,202002,1,71,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,,,,false,false,false
+230007,202003,1,71,,,1.42292432,1,18.48333333,1692.041117,FIC,2,0,2,,,,false,true,false
+230008,202001,2,85,,,1,2.241504449,72.19047619,150000,R,0,2,2,false,true,false,true,false,false
+230008,202002,2,85,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,false,false,false,false,false,false
+230008,202003,2,85,,,1.174002242,1,50,120000,R,2,0,2,false,false,true,false,true,false
+230009,202001,2,71,,,1,2.241504449,72.19047619,5125.52381,C,0,2,2,,,,true,false,false
+230009,202002,2,71,,,0.70468356,0.85178967,42.61904762,3611.872364,FIC,2,2,2,,,,false,false,false
+230009,202003,2,71,,,1.174002242,1,50,4240.346255,FIC,2,0,2,,,,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index 0a81cfaf..c4942bbc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3
-110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1
-110005,202002,200,27,,,1,1,1,9940,BI,0,0,0
-110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1
-110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1
-110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0
-110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1
-110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1
-110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0
-110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,true,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,true,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,true,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,true,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,true,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,true,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,true,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,true,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,false,true,false
+110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,,,,true,true,false
+110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,,,,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,true,true,true,true,true,false
+110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,true,true,true,true,true,false
+110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,,,,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,,,,true,true,false
+110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,,,,true,true,false
+110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,,,,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,,,,true,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index 1617bb5a..ca27433b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3
-110005,202001,200,27,,,1,1,1,27,C,0,0,0
-110005,202002,200,27,,,1,1,1,27,FIC,0,0,0
-110005,202003,200,27,,,1,1,1,27,FIC,0,0,0
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,true,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,true,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,true,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,true,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,true,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,true,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,true,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,true,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,false,true,false
+110005,202001,200,27,,,1,1,1,27,C,0,0,0,,,,true,true,true
+110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,,,,true,true,true
+110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,,,,true,true,true
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index ed347092..9684636f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_construction_link
-120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,TRUE
-120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,TRUE
-120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,TRUE
-120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,TRUE
-120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,TRUE
-120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,TRUE
-120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,TRUE
-120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,TRUE
-120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,TRUE
-120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,TRUE
-120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,TRUE
-120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,TRUE
-120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,TRUE
-120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,TRUE
-120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,TRUE
-120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,TRUE
-120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,TRUE
-120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,TRUE
-120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,TRUE
-120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,TRUE
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,true,true,true,false,true
+120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,true,true,true,false,false,true
+120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,true,true,true,false,false,true
+120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,true,true,true,false,false,true
+120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,true,true,true,false,true,true
+120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,true,true,true,true,false,true
+120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,true,true,true,false,false,true
+120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,true,true,true,false,false,true
+120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,true,true,true,false,false,true
+120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,true,true,true,false,true,true
+120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,true,true,true,true,false,true
+120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,true,true,true,false,false,true
+120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,true,true,true,false,false,true
+120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,true,true,true,false,false,true
+120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,true,true,true,false,true,true
+120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,,,,true,false,true
+120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,,,,false,false,true
+120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,,,,false,false,true
+120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,,,,false,false,true
+120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,,,,false,true,true
\ No newline at end of file

From 865c5617e3b61ee0f169a92c60c100a836acd9ec Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 9 May 2023 18:28:08 +0100
Subject: [PATCH 272/531] Test Data Updates. Corrected Bad Validation Tests In
 Engine.

---
 .../imputation/engine.py                      |   3 +
 .../basic_functionality_partial_link_cols.csv |   2 +
 .../methodology_scenarios/01_C_output.csv     |   2 +-
 .../methodology_scenarios/02_C_FI_output.csv  |   2 +-
 .../03_R_R_FI_output.csv                      |   2 +-
 .../04_R_R_FI_FI_output.csv                   |   2 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |   2 +-
 .../06_BI_BI_R_output.csv                     |   2 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |   2 +-
 .../methodology_scenarios/08_R_R_R_output.csv |   2 +-
 .../09_R_NS_C_output.csv                      |   2 +-
 .../10_C_FI_NS_R_output.csv                   |   2 +-
 .../11_R_R_FI-BI_R_R_output.csv               |   2 +-
 .../12_C_FI_FI_FI_FI_output.csv               |   2 +-
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |   2 +-
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |   2 +-
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |   2 +-
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |   2 +-
 .../17_NS_R_FI_NS_output.csv                  |   2 +-
 .../18_NS_BI_R_NS_output.csv                  |   2 +-
 .../20_mixed_data_output.csv                  |   2 +-
 .../21_class_change_R_C_FI_output.csv         |   2 +-
 .../22_class_change_C_BI_R_output.csv         |   2 +-
 .../23_class_change_C_C_FI_output.csv         |   2 +-
 .../24_class_change_R_BI_R_output.csv         |   2 +-
 .../25_class_change_C_FI_FI_output.csv        |   2 +-
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv |   2 +-
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |   2 +-
 .../29_mixed_data_filtered_output.csv         |   2 +-
 ...30_class_change_C_C_FI_filtered_output.csv |   2 +-
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |   2 +-
 .../32_C_FI_FI_no_response_output.csv         |   2 +-
 .../34_default_link_output.csv                |   2 +-
 .../35_TB_10_R_R_FI_output.csv                |   2 +-
 .../36_TB_10_BI_BI_R_output.csv               |   2 +-
 .../37_TB_10_C_FI_FI_output.csv               |   2 +-
 .../38_T_10_R_R_FI_output.csv                 |   2 +-
 .../39_B_10_R_R_FI_output.csv                 |   2 +-
 .../40_TB_10_R_R_FI_no_trim_output.csv        |   2 +-
 .../41_TB_10_R_R_FI_filtered_output.csv       |   2 +-
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         |   2 +-
 .../43_TB_10_BI_BI_R_boundary_output.csv      |   2 +-
 .../44_TB_5_BI_BI_R_boundary_output.csv       |   2 +-
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |   2 +-
 .../46_TB_10_BI_BI_R_filtered_output.csv      |   2 +-
 .../methodology_scenarios/47_TB_50_output.csv |   2 +-
 ...BI_BI_R-R_R_FI_filtered_default_output.csv |   2 +-
 .../50_R_R_FI_50_weight_input.csv             |  26 +--
 .../50_R_R_FI_50_weight_output.csv            |  38 +--
 .../51_R_R_FI_80_weight_input.csv             |  26 +--
 .../51_R_R_FI_80_weight_output.csv            |  38 +--
 .../52_BI_BI_R_50_weight_input.csv            |  26 +--
 .../52_BI_BI_R_50_weight_output.csv           |  38 +--
 .../53_C_FI_FI_50_weight_input.csv            |  26 +--
 .../53_C_FI_FI_50_weight_output.csv           |  38 +--
 .../54_R_R_FI-BI_R_R_50_weight_input.csv      |  50 ++--
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  74 ++++--
 .../55_R_R_FI_50_weight_default_input.csv     |  26 +--
 .../55_R_R_FI_50_weight_default_output.csv    |  38 +--
 .../56_BI_BI_R_50_weight_default_input.csv    |  26 +--
 .../56_BI_BI_R_50_weight_default_output.csv   |  38 +--
 .../57_C_FI_FI_50_weight_default_input.csv    |  26 +--
 .../57_C_FI_FI_50_weight_default_output.csv   |  38 +--
 ...BI_R_R_50_weight_partial_default_input.csv |  50 ++--
 ...I_R_R_50_weight_partial_default_output.csv |  74 ++++--
 .../59_class_change_50_weight_input.csv       |  32 +--
 .../59_class_change_50_weight_output.csv      |  47 ++--
 .../60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv |  58 ++---
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv |  86 ++++---
 ...R_R_FI-BI_R_R_50_weight_filtered_input.csv |  74 +++---
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv | 110 ++++++---
 .../62_mixed_data_50_weight_input.csv         |  44 ++--
 .../62_mixed_data_50_weight_output.csv        |  65 ++++--
 ...63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv | 146 ++++++------
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 218 ++++++++++++------
 .../64_TB_10_C_FI_FI_50_weight_input.csv      |  74 +++---
 .../64_TB_10_C_FI_FI_50_weight_output.csv     | 110 ++++++---
 ...TB_10_BI_BI_R_50_weight_filtered_input.csv | 128 +++++-----
 ...B_10_BI_BI_R_50_weight_filtered_output.csv | 191 ++++++++++-----
 ..._weight_filtered_partial_default_input.csv |  74 +++---
 ...weight_filtered_partial_default_output.csv | 110 ++++++---
 ..._50_weight_filtered_full_default_input.csv |  74 +++---
 ...50_weight_filtered_full_default_output.csv | 110 ++++++---
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv |  70 +++---
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv |  70 +++---
 ...FI_FI_R_FI_alternating_filtered_output.csv |  58 ++---
 .../methodology_scenarios/01_C_output.csv     |   8 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  14 +-
 .../03_R_R_FI_output.csv                      |  24 +-
 .../04_R_R_FI_FI_output.csv                   |  30 +--
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  36 +--
 .../06_BI_BI_R_output.csv                     |  22 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  48 ++--
 .../methodology_scenarios/08_R_R_R_output.csv |  26 +--
 .../09_R_NS_C_output.csv                      |  22 +-
 .../10_C_FI_NS_R_output.csv                   |  28 +--
 .../11_R_R_FI-BI_R_R_output.csv               |  46 ++--
 .../12_C_FI_FI_FI_FI_output.csv               |  32 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  48 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  46 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  48 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  46 ++--
 .../17_NS_R_FI_NS_output.csv                  |  28 +--
 .../18_NS_BI_R_NS_output.csv                  |  28 +--
 .../20_mixed_data_output.csv                  |  66 +++---
 .../21_class_change_R_C_FI_output.csv         |  28 +--
 .../22_class_change_C_BI_R_output.csv         |  28 +--
 .../23_class_change_C_C_FI_output.csv         |  26 +--
 .../24_class_change_R_BI_R_output.csv         |  30 +--
 .../25_class_change_C_FI_FI_output.csv        |  32 +--
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv |  60 ++---
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |  62 ++---
 .../29_mixed_data_filtered_output.csv         |  82 +++----
 ...30_class_change_C_C_FI_filtered_output.csv |  38 +--
 .../31_no_response_output.csv                 |  38 +--
 .../32_divide_by_zero_output.csv              |  20 +-
 tests/imputation/test_engine.py               |   6 +-
 tests/imputation/test_mean_of_ratios.py       |  24 +-
 tests/imputation/test_ratio_of_means.py       |   8 +-
 119 files changed, 2174 insertions(+), 1694 deletions(-)
 create mode 100644 tests/fixture_data/imputation/engine/unit/basic_functionality_partial_link_cols.csv

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index c81f9701..39fd11aa 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -68,6 +68,9 @@ def impute(
     **ratio_calculator_params,
 ) -> DataFrame:
     # --- Validate params ---
+    if not isinstance(input_df, DataFrame):
+        raise TypeError("Input is not a DataFrame")
+
     link_cols = [forward_link_col, backward_link_col]
     if any(link_cols) and not all(link_cols):
         raise TypeError("Either all or no link columns must be specified")
diff --git a/tests/fixture_data/imputation/engine/unit/basic_functionality_partial_link_cols.csv b/tests/fixture_data/imputation/engine/unit/basic_functionality_partial_link_cols.csv
new file mode 100644
index 00000000..d356b847
--- /dev/null
+++ b/tests/fixture_data/imputation/engine/unit/basic_functionality_partial_link_cols.csv
@@ -0,0 +1,2 @@
+identifier,date,group,question,other,forward,construction
+1234,"202105","9000",1,2,1,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index ee58677d..d28742b6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,true,true,true,true,false
 10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,true,true,true,true,false
 10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,true,true,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 97784ca4..7227c9f0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,true,true,true,false,false
 20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,true,true,false,true,false
 20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,true,true,true,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 37006a08..9c33db48 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,true,true,true,false,false
 30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
 30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index d7aa570f..240e6a0b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,true,true,true,false,false
 40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
 40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 217b6649..20eb033b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,true,true,true,false,false
 50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
 50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index ba7596a9..812c4c7e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,true,true,true,false,false
 60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
 60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index b87735e0..f0af25a0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,true,true,true,false,false
 70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
 70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index 569a025b..1e412172 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,true,true,true,false,false
 80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
 80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 313c8ac5..7c4575a9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,true,true,true,false,false
 90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
 90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index 30576d7e..aa37bd5b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,true,true,true,false,false
 100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
 100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index b353c136..fb6fa439 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,true,true,true,false,false
 110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index a97932ff..6c304b50 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,true,true,true,false,false
 120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
 120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index e3eb883c..45a2a5df 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,true,true,true,false,false
 130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
 130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 0fe723fd..1f4648ad 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,true,true,true,false,false
 140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
 140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index f75ef9d4..d8904285 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,true,true,true,false,false
 150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
 150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 8d848e5e..ea977ca0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,true,true,true,false,false
 160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
 160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index f7028027..40b294f8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,true,true,true,false,false
 170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
 170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 5487aebd..4fe6ea9e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,true,true,true,false,false
 180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
 180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index f30a0521..c5d59491 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,true,true,true,false,false
 200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
 200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 10d4e787..e8b275f0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
 210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 0e7a4eac..ef9931d1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,true,true,true,false,false
 220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 8c29e270..c709bb8e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,true,true,true,false,false
 230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 52ffd60f..835c18bf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
 240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 6a113421..72b0be3a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
 250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 814aacb7..33282c54 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 140001,202001,100,27,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,true,true,true,true,false,false
 140001,202002,100,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,true,true,true,false,false,false
 140001,202003,100,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index 637f5c26..f07b0770 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 150001,202001,100,15,,1.285963763,1,0.917399451,181.0909091,5891,R,0,3,3,true,true,true,true,false,false
 150001,202002,100,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,true,true,true,false,false,false
 150001,202003,100,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
index fefa2ec4..eb0e2146 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 200001,202001,100,56,,1.262441238,1,0.597514698,71.63436123,7788,R,0,4,4,true,true,true,true,false,false
 200001,202002,100,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,true,true,true,false,false,false
 200001,202003,100,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 5634c891..a2be0101 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 230001,202001,1,10,,1.511049724,1,1.087985595,15.46666667,547,R,0,2,2,true,true,true,true,false,false
 230001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,true,true,true,false,false,false
 230001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,895,R,2,0,2,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index c4942bbc..a080d061 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,true,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index ca27433b..134730d7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,true,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index 9684636f..274d9979 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,true,true,true,false,true
 120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,true,true,true,false,false,true
 120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,true,true,true,false,false,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 2dda6d56..c2897c65 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index 767d658e..8c983b21 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,false,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,false,false,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,false,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index 608ee39e..5814dd96 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,true,true,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index 4b2f71b7..d9933b05 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index fcfe467f..7d32c3c4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index 34a1f799..f330b8b8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
index 4a6bb0fe..c6926f7b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.773194,96.75644,8444,R,0,9,12,,true,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,3.889877,2.962348,81.65588616,7476,R,9,10,11,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.495827,1,76.108808,2003,R,10,0,11,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 73757f4f..aac76509 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,true,true,true,false,false
 80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,true,true,true,false,false,false
 80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index 2b2d3aec..3f7387e1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,true,true,true,false,false
 90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,true,true,true,false,false,false
 90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index aa3b6b1e..4748e1d2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,true,true,true,false,false
 100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,true,true,true,false,false,false
 100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index 0ec0c26a..35b65061 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,true,true,true,false,false
 30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
index 585ec2e2..a7228a5f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,true,true,true,true,true,false,false
 90001,202002,100,89,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,8916,R,17,18,20,true,true,true,true,true,false,false,false
 90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index 247d96d5..c5c371a1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,true,true,true,false,false
 30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,true,true,true,false,false,false
 30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
index f7c119af..f2a162ff 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker,filtered_forward,filtered_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,true,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,true,true,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
index 615f6163..2fd5ae2a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,,1.5274,50.3694
-30001,202002,100,7476,51,0.9685,1.8795,121.4187
-30001,202003,100,2003,51,1.113,,89.3761
-30002,202001,100,9343,72,,1.5274,50.3694
-30002,202002,100,7818,72,0.9685,1.8795,121.4187
-30002,202003,100,4897,72,1.113,,89.3761
-30003,202001,100,7511,7,,1.5274,50.3694
-30003,202002,100,1761,7,0.9685,1.8795,121.4187
-30003,202003,100,6492,7,1.113,,89.3761
-30004,202001,100,64,81,,1.5274,50.3694
-30004,202002,100,2113,81,0.9685,1.8795,121.4187
-30004,202003,100,,81,1.113,,89.3761
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,,81
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 26bc49fb..54d01d50 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,13 +1,25 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,51,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
-30001,202002,100,51,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7476,R,4,3,4
-30001,202003,100,51,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.3199735,,96.19575,2003,R,3,,3
-30002,202001,100,72,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
-30002,202002,100,72,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,7818,R,4,3,4
-30002,202003,100,72,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.3199735,,96.19575,4897,R,3,,3
-30003,202001,100,7,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
-30003,202002,100,7,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,1761,R,4,3,4
-30003,202003,100,7,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.3199735,,96.19575,6492,R,3,,3
-30004,202001,100,81,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
-30004,202002,100,81,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,4.855777465,1.6435545,106.13115,2113,R,4,3,4
-30004,202003,100,81,1.113,,89.3761,,,1.526947,,103.0154,1.3199735,,96.19575,2789.104006,FIR,3,,3
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,true,true,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,true,true,true,false,true,false
+30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,true,true,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,true,true,true,false,true,false
+30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,true,true,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,true,true,true,false,true,false
+30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,true,true,true,true,false,false
+30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,true,true,false,false,false
+30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,true,true,true,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
index 615f6163..2fd5ae2a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,,1.5274,50.3694
-30001,202002,100,7476,51,0.9685,1.8795,121.4187
-30001,202003,100,2003,51,1.113,,89.3761
-30002,202001,100,9343,72,,1.5274,50.3694
-30002,202002,100,7818,72,0.9685,1.8795,121.4187
-30002,202003,100,4897,72,1.113,,89.3761
-30003,202001,100,7511,7,,1.5274,50.3694
-30003,202002,100,1761,7,0.9685,1.8795,121.4187
-30003,202003,100,6492,7,1.113,,89.3761
-30004,202001,100,64,81,,1.5274,50.3694
-30004,202002,100,2113,81,0.9685,1.8795,121.4187
-30004,202003,100,,81,1.113,,89.3761
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,,81
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index cd4cdca3..64ae6695 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,13 +1,25 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,51,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.6294848,106.2331217,8444,R,,4,4
-30001,202002,100,51,0.9685,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7476,R,4,3,4
-30001,202003,100,51,1.113,,89.3761,0.267924024,,1.526947,,103.0154,1.4441576,,100.28754,2003,R,3,,3
-30002,202001,100,72,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.6294848,106.23316,9343,R,,4,4
-30002,202002,100,72,0.9685,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,7818,R,4,3,4
-30002,202003,100,72,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
-30003,202001,100,7,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.6294848,106.23316,7511,R,,4,4
-30003,202002,100,7,0.9685,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,1761,R,4,3,4
-30003,202003,100,7,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
-30004,202001,100,81,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.6294848,106.23316,64,R,,4,4
-30004,202002,100,81,0.9685,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,7.188143943,1.5019872,96.95862,2113,R,4,3,4
-30004,202003,100,81,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,3051.505009,FIR,3,,3
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,true,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,true,true,true,false,true,false
+30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,true,true,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,true,true,false,true,false
+30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,true,true,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,true,true,false,true,false
+30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,true,true,true,true,false,false
+30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,true,true,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,,,,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
index 1addf119..dd22608a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-60001,202001,100,5077,15,,1.5274,50.3694
-60001,202002,100,7830,15,0.9685,1.8795,121.4187
-60001,202003,100,1046,15,1.113,,89.3761
-60002,202001,100,1588,71,,1.5274,50.3694
-60002,202002,100,1213,71,0.9685,1.8795,121.4187
-60002,202003,100,3807,71,1.113,,89.3761
-60003,202001,100,6541,26,,1.5274,50.3694
-60003,202002,100,336,26,0.9685,1.8795,121.4187
-60003,202003,100,6351,26,1.113,,89.3761
-60004,202001,100,,3,,1.5274,50.3694
-60004,202002,100,,3,0.9685,1.8795,121.4187
-60004,202003,100,401,3,1.113,,89.3761
+identifier,date,group,question,other
+60001,202001,100,5077,15
+60001,202002,100,7830,15
+60001,202003,100,1046,15
+60002,202001,100,1588,71
+60002,202002,100,1213,71
+60002,202003,100,3807,71
+60003,202001,100,6541,26
+60003,202002,100,336,26
+60003,202003,100,6351,26
+60004,202001,100,,3
+60004,202002,100,,3
+60004,202003,100,401,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index a2283da5..07700757 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,13 +1,25 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-60001,202001,100,15,,1.5274,50.3694,,0.648403576,,7.141605449,117.9107143,,4.334502725,84.14005715,5077,R,,3,3
-60001,202002,100,15,0.9685,1.8795,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,7830,R,3,3,3
-60001,202003,100,15,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
-60002,202001,100,71,,1.5274,50.3694,,1.309150866,,7.141605449,117.9107143,,4.334502725,84.14005715,1588,R,,3,3
-60002,202002,100,71,0.9685,1.8795,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,1213,R,3,3,3
-60002,202003,100,71,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
-60003,202001,100,26,,1.5274,50.3694,,19.4672619,,7.141605449,117.9107143,,4.334502725,84.14005715,6541,R,,3,3
-60003,202002,100,26,0.9685,1.8795,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,336,R,3,3,3
-60003,202003,100,26,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
-60004,202001,100,3,,1.5274,50.3694,,,,7.141605449,117.9107143,,4.334502725,84.14005715,3909.556029,BI,,3,3
-60004,202002,100,3,0.9685,1.8795,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.249281383,102.5798857,901.9618346,BI,3,3,3
-60004,202003,100,3,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,true,true,true,false,false
+60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,true,true,true,false,false,false
+60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,true,true,true,false,true,false
+60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,true,true,true,true,false,false
+60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,true,true,true,false,false,false
+60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,true,true,true,false,true,false
+60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,true,true,true,true,false,false
+60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,true,true,true,false,false,false
+60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,true,true,true,false,true,false
+60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,,,,true,false,false
+60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,,,,false,false,false
+60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,true,true,true,false,true,false
+60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,,,,
+60002,201901,100,71,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+60002,201903,100,71,,,,,,1.113,1,89.3761,,,,,,,,,,,
+60003,201901,100,26,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+60003,201903,100,26,,,,,,1.113,1,89.3761,,,,,,,,,,,
+60004,201901,100,3,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+60004,201903,100,3,,,,,,1.113,1,89.3761,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
index 81195c8d..9004a1cc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,,1.5274,50.3694
-30001,202002,100,7476,51,0.9685,1.8795,121.4187
-30001,202003,100,2003,51,1.113,,89.3761
-30002,202001,100,9343,72,,1.5274,50.3694
-30002,202002,100,7818,72,0.9685,1.8795,121.4187
-30002,202003,100,4897,72,1.113,,89.3761
-30003,202001,100,7511,7,,1.5274,50.3694
-30003,202002,100,1761,7,0.9685,1.8795,121.4187
-30003,202003,100,6492,7,1.113,,89.3761
-30004,202001,100,,81,,1.5274,50.3694
-30004,202002,100,,81,0.9685,1.8795,121.4187
-30004,202003,100,,81,1.113,,89.3761
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,,81
+30004,202002,100,,81
+30004,202003,100,,81
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index 69d5c572..2f36ce40 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,13 +1,25 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,51,,1.5274,50.3694,,1.129481006,,2.196577972,194.6,,2.062742377,165.75388,8444,R,,3,3
-30001,202002,100,51,0.9685,1.8795,121.4187,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7476,R,3,3,3
-30001,202003,100,51,1.113,,89.3761,0.267924024,,1.526946931,,103.0154,1.444157545,,100.28754,2003,R,3,,3
-30002,202001,100,72,,1.5274,50.3694,,1.195062676,,2.196577972,194.6,,2.062742377,165.75388,9343,R,,3,3
-30002,202002,100,72,0.9685,1.8795,121.4187,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,7818,R,3,3,3
-30002,202003,100,72,1.113,,89.3761,0.626375032,,1.526947,,103.0154,1.4441576,,100.28754,4897,R,3,,3
-30003,202001,100,7,,1.5274,50.3694,,4.265190233,,2.196577972,194.6,,2.062742377,165.75388,7511,R,,3,3
-30003,202002,100,7,0.9685,1.8795,121.4187,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,1761,R,3,3,3
-30003,202003,100,7,1.113,,89.3761,3.686541738,,1.526947,,103.0154,1.4441576,,100.28754,6492,R,3,,3
-30004,202001,100,81,,1.5274,50.3694,,,,2.196577972,194.6,,2.062742377,165.75388,13426.06428,C,,3,3
-30004,202002,100,81,0.9685,1.8795,121.4187,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,96.95862,9605.793024,FIC,3,3,3
-30004,202003,100,81,1.113,,89.3761,,,1.526947,,103.0154,1.4441576,,100.28754,13872.279,FIC,3,,3
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,true,true,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,true,true,true,false,true,false
+30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,true,true,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,true,true,false,true,false
+30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,true,true,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,true,true,false,true,false
+30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,,,,true,false,false
+30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,,,,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,,,,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
index 762619be..97acb466 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_input.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-110001,202001,100,9244,89,,1.5274,50.3694
-110001,202002,100,8916,89,0.9685,1.8795,121.4187
-110001,202003,100,6194,89,1.113,,89.3761
-110002,202001,100,4826,83,,1.5274,50.3694
-110002,202002,100,5903,83,0.9685,1.8795,121.4187
-110002,202003,100,4743,83,1.113,,89.3761
-110003,202001,100,7586,4,,1.5274,50.3694
-110003,202002,100,1016,4,0.9685,1.8795,121.4187
-110003,202003,100,1429,4,1.113,,89.3761
-110004,202001,100,3975,76,,1.5274,50.3694
-110004,202002,100,3044,76,0.9685,1.8795,121.4187
-110004,202003,100,,76,1.113,,89.3761
-110005,202001,200,5217,27,,2.994350985,107.48
-110005,202002,200,7016,27,1.377938182,0.670608989,54.70285714
-110005,202003,200,9940,27,0.952585628,,98.26519337
-110006,202001,200,5325,42,,2.994350985,107.48
-110006,202002,200,7747,42,1.377938182,0.670608989,54.70285714
-110006,202003,200,6685,42,0.952585628,,98.26519337
-110007,202001,200,5496,19,,2.994350985,107.48
-110007,202002,200,1010,19,1.377938182,0.670608989,54.70285714
-110007,202003,200,1235,19,0.952585628,,98.26519337
-110008,202001,200,,43,,2.994350985,107.48
-110008,202002,200,3913,43,1.377938182,0.670608989,54.70285714
-110008,202003,200,6013,43,0.952585628,,98.26519337
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,,76
+110005,202001,200,5217,27
+110005,202002,200,7016,27
+110005,202003,200,9940,27
+110006,202001,200,5325,42
+110006,202002,200,7747,42
+110006,202003,200,6685,42
+110007,202001,200,5496,19
+110007,202002,200,1010,19
+110007,202003,200,1235,19
+110008,202001,200,,43
+110008,202002,200,3913,43
+110008,202003,200,6013,43
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index f666225d..166d5a67 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,25 +1,49 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,89,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
-110001,202002,100,89,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
-110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
-110002,202001,100,83,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
-110002,202002,100,83,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
-110002,202003,100,83,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
-110003,202001,100,4,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
-110003,202002,100,4,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
-110003,202003,100,4,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
-110004,202001,100,76,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
-110004,202002,100,76,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
-110004,202003,100,76,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
-110005,202001,200,27,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3
-110005,202002,200,27,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4
-110005,202003,200,27,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
-110006,202001,200,42,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3
-110006,202002,200,42,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4
-110006,202003,200,42,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
-110007,202001,200,19,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3
-110007,202002,200,19,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4
-110007,202003,200,19,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
-110008,202001,200,43,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,,3,3
-110008,202002,200,43,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4
-110008,202003,200,43,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,1,1,1,1,0,0
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,1,1,1,0,0,0
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,1,1,1,0,1,0
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,1,1,1,1,0,0
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,1,1,1,0,0,0
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,1,1,1,0,1,0
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,1,1,1,1,0,0
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,1,1,1,0,0,0
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,1,1,1,0,1,0
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,1,1,1,1,0,0
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,1,1,1,0,0,0
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,0,1,0
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,1,1,1,1,0,0
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,1,1,1,0,0,0
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,1,1,1,0,1,0
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,1,1,1,1,0,0
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,1,1,1,0,0,0
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,1,1,1,0,1,0
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,1,1,1,1,0,0
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,1,1,1,0,0,0
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,1,1,1,0,1,0
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,,1,0,0
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,1,1,1,0,0,0
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,1,1,1,0,1,0
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
index 9021d7a0..2fd5ae2a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,,1.5274,50.3694
-30001,202002,100,7476,51,,1.8795,121.4187
-30001,202003,100,2003,51,,,89.3761
-30002,202001,100,9343,72,,1.5274,50.3694
-30002,202002,100,7818,72,,1.8795,121.4187
-30002,202003,100,4897,72,,,89.3761
-30003,202001,100,7511,7,,1.5274,50.3694
-30003,202002,100,1761,7,,1.8795,121.4187
-30003,202003,100,6492,7,,,89.3761
-30004,202001,100,64,81,,1.5274,50.3694
-30004,202002,100,2113,81,,1.8795,121.4187
-30004,202003,100,,81,,,89.3761
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,,81
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 7cc5fea9..68a90fa6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,13 +1,25 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,51,,1.5274,50.3694,,1.129481006,,1.655006,120.1990521,,1.591203,85.28422607,8444,R,,4,4
-30001,202002,100,51,,1.8795,121.4187,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4
-30001,202003,100,51,,,89.3761,0.267924024,,1.526947,,103.0154,1.526947,,96.19575,2003,R,3,,3
-30002,202001,100,72,,1.5274,50.3694,,1.195062676,,1.655006,120.1991,,1.591203,85.28425,9343,R,,4,4
-30002,202002,100,72,,1.8795,121.4187,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4
-30002,202003,100,72,,,89.3761,0.626375032,,1.526947,,103.0154,1.526947,,96.19575,4897,R,3,,3
-30003,202001,100,7,,1.5274,50.3694,,4.265190233,,1.655006,120.1991,,1.591203,85.28425,7511,R,,4,4
-30003,202002,100,7,,1.8795,121.4187,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4
-30003,202003,100,7,,,89.3761,3.686541738,,1.526947,,103.0154,1.526947,,96.19575,6492,R,3,,3
-30004,202001,100,81,,1.5274,50.3694,,0.030288689,,1.655006,120.1991,,1.591203,85.28425,64,R,,4,4
-30004,202002,100,81,,1.8795,121.4187,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4
-30004,202003,100,81,,,89.3761,,,1.526947,,103.0154,1.526947,,96.19575,3226.439011,FIR,3,,3
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,1,1,1,1,0,0
+30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,1,1,1,0,0,0
+30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,1,1,1,0,1,0
+30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,1,1,1,1,0,0
+30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,1,1,1,0,0,0
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,1,1,1,0,1,0
+30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,1,1,1,1,0,0
+30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,1,1,1,0,0,0
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,1,1,1,0,1,0
+30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,1,1,1,1,0,0
+30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,1,1,1,0,0,0
+30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,,,,0,1,0
+30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,,,,
+30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,,,,
+30002,201901,100,72,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+30002,201902,100,72,,,1,1.8795,121.4187,,,,,,,,,,,,,,
+30002,201903,100,72,,,1,1,89.3761,,,,,,,,,,,,,,
+30003,201901,100,7,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+30003,201902,100,7,,,1,1.8795,121.4187,,,,,,,,,,,,,,
+30003,201903,100,7,,,1,1,89.3761,,,,,,,,,,,,,,
+30004,201901,100,81,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+30004,201902,100,81,,,1,1.8795,121.4187,,,,,,,,,,,,,,
+30004,201903,100,81,,,1,1,89.3761,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
index 3b36b613..dd22608a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-60001,202001,100,5077,15,,,50.3694
-60001,202002,100,7830,15,0.9685,,121.4187
-60001,202003,100,1046,15,1.113,,89.3761
-60002,202001,100,1588,71,,,50.3694
-60002,202002,100,1213,71,0.9685,,121.4187
-60002,202003,100,3807,71,1.113,,89.3761
-60003,202001,100,6541,26,,,50.3694
-60003,202002,100,336,26,0.9685,,121.4187
-60003,202003,100,6351,26,1.113,,89.3761
-60004,202001,100,,3,,,50.3694
-60004,202002,100,,3,0.9685,,121.4187
-60004,202003,100,401,3,1.113,,89.3761
+identifier,date,group,question,other
+60001,202001,100,5077,15
+60001,202002,100,7830,15
+60001,202003,100,1046,15
+60002,202001,100,1588,71
+60002,202002,100,1213,71
+60002,202003,100,3807,71
+60003,202001,100,6541,26
+60003,202002,100,336,26
+60003,202003,100,6351,26
+60004,202001,100,,3
+60004,202002,100,,3
+60004,202003,100,401,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index fd6ff68e..8b3e5860 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,13 +1,25 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-60001,202001,100,15,,,50.3694,,0.648403576,,7.141605449,117.9107143,,7.141605449,84.14005715,5077,R,,3,3
-60001,202002,100,15,0.9685,,121.4187,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3
-60001,202003,100,15,1.113,,89.3761,0.133588761,,7.391291354,,100.9130435,4.252145677,,95.14457175,1046,R,3,,4
-60002,202001,100,71,,,50.3694,,1.309150866,,7.141605449,117.9107143,,7.141605449,84.14005715,1588,R,,3,3
-60002,202002,100,71,0.9685,,121.4187,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3
-60002,202003,100,71,1.113,,89.3761,3.138499588,,7.391291354,,100.9130435,4.252145677,,95.14457175,3807,R,3,,4
-60003,202001,100,26,,,50.3694,,19.4672619,,7.141605449,117.9107143,,7.141605449,84.14005715,6541,R,,3,3
-60003,202002,100,26,0.9685,,121.4187,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3
-60003,202003,100,26,1.113,,89.3761,18.90178571,,7.391291354,,100.9130435,4.252145677,,95.14457175,6351,R,3,,4
-60004,202001,100,3,,,50.3694,,,,7.141605449,117.9107143,,7.141605449,84.14005715,7500.429481,BI,,3,3
-60004,202002,100,3,0.9685,,121.4187,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3
-60004,202003,100,3,1.113,,89.3761,,,7.391291354,,100.9130435,4.252145677,,95.14457175,401,R,3,,4
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,1,1,1,1,0,0
+60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,1,1,1,0,0,0
+60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,1,1,1,0,1,0
+60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,1,1,1,1,0,0
+60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,1,1,1,0,0,0
+60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,1,1,1,0,1,0
+60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,1,1,1,1,0,0
+60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,1,1,1,0,0,0
+60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,1,1,1,0,1,0
+60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,,,,1,0,0
+60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,,,,0,0,0
+60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,1,1,1,0,1,0
+60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,,,,
+60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,,,,
+60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,,,,
+60002,201901,100,71,,,1,1,50.3694,,,,,,,,,,,,,,
+60002,201902,100,71,,,0.9685,1,121.4187,,,,,,,,,,,,,,
+60002,201903,100,71,,,1.113,1,89.3761,,,,,,,,,,,,,,
+60003,201901,100,26,,,1,1,50.3694,,,,,,,,,,,,,,
+60003,201902,100,26,,,0.9685,1,121.4187,,,,,,,,,,,,,,
+60003,201903,100,26,,,1.113,1,89.3761,,,,,,,,,,,,,,
+60004,201901,100,3,,,1,1,50.3694,,,,,,,,,,,,,,
+60004,201902,100,3,,,0.9685,1,121.4187,,,,,,,,,,,,,,
+60004,201903,100,3,,,1.113,1,89.3761,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
index 67f11a03..9004a1cc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
@@ -1,13 +1,13 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,,1.5274,
-30001,202002,100,7476,51,0.9685,1.8795,
-30001,202003,100,2003,51,1.113,,
-30002,202001,100,9343,72,,1.5274,
-30002,202002,100,7818,72,0.9685,1.8795,
-30002,202003,100,4897,72,1.113,,
-30003,202001,100,7511,7,,1.5274,
-30003,202002,100,1761,7,0.9685,1.8795,
-30003,202003,100,6492,7,1.113,,
-30004,202001,100,,81,,1.5274,
-30004,202002,100,,81,0.9685,1.8795,
-30004,202003,100,,81,1.113,,
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,,81
+30004,202002,100,,81
+30004,202003,100,,81
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index 647d675a..d6d0cbd4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,13 +1,25 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,51,,1.5274,,,1.129481006,,2.196577972,194.6,,2.062742377,194.6,8444,R,,3,3
-30001,202002,100,51,0.9685,1.8795,,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3
-30001,202003,100,51,1.113,,,0.267924024,,1.526946931,,103.0154,1.444157545,,103.0154,2003,R,3,,3
-30002,202001,100,72,,1.5274,,,1.195062676,,2.196577972,194.6,,2.062742377,194.6,9343,R,,3,3
-30002,202002,100,72,0.9685,1.8795,,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3
-30002,202003,100,72,1.113,,,0.626375032,,1.526947,,103.0154,1.4441576,,103.0154,4897,R,3,,3
-30003,202001,100,7,,1.5274,,,4.265190233,,2.196577972,194.6,,2.062742377,194.6,7511,R,,3,3
-30003,202002,100,7,0.9685,1.8795,,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3
-30003,202003,100,7,1.113,,,3.686541738,,1.526947,,103.0154,1.4441576,,103.0154,6492,R,3,,3
-30004,202001,100,81,,1.5274,,,,,2.196577972,194.6,,2.062742377,194.6,15762.6,C,,3,3
-30004,202002,100,81,0.9685,1.8795,,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3
-30004,202003,100,81,1.113,,,,,1.526947,,103.0154,1.4441576,,103.0154,16286.46938,FIC,3,,3
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,1,1,1,1,0,0
+30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,1,1,1,0,0,0
+30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,1,1,1,0,1,0
+30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,1,1,1,1,0,0
+30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,1,1,1,0,0,0
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,1,1,1,0,1,0
+30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,1,1,1,1,0,0
+30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,1,1,1,0,0,0
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,1,1,1,0,1,0
+30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,,,,1,0,0
+30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,,,,0,0,0
+30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,,,,0,1,0
+30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,,,,
+30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,,,,
+30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,,,,
+30002,201901,100,72,,,1,1.5274,1,,,,,,,,,,,,,,
+30002,201902,100,72,,,0.9685,1.8795,1,,,,,,,,,,,,,,
+30002,201903,100,72,,,1.113,1,1,,,,,,,,,,,,,,
+30003,201901,100,7,,,1,1.5274,1,,,,,,,,,,,,,,
+30003,201902,100,7,,,0.9685,1.8795,1,,,,,,,,,,,,,,
+30003,201903,100,7,,,1.113,1,1,,,,,,,,,,,,,,
+30004,201901,100,81,,,1,1.5274,1,,,,,,,,,,,,,,
+30004,201902,100,81,,,0.9685,1.8795,1,,,,,,,,,,,,,,
+30004,201903,100,81,,,1.113,1,1,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
index 2dc33b50..97acb466 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
@@ -1,25 +1,25 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-110001,202001,100,9244,89,,1.5274,50.3694
-110001,202002,100,8916,89,0.9685,1.8795,121.4187
-110001,202003,100,6194,89,1.113,,89.3761
-110002,202001,100,4826,83,,1.5274,50.3694
-110002,202002,100,5903,83,0.9685,1.8795,121.4187
-110002,202003,100,4743,83,1.113,,89.3761
-110003,202001,100,7586,4,,1.5274,50.3694
-110003,202002,100,1016,4,0.9685,1.8795,121.4187
-110003,202003,100,1429,4,1.113,,89.3761
-110004,202001,100,3975,76,,1.5274,50.3694
-110004,202002,100,3044,76,0.9685,1.8795,121.4187
-110004,202003,100,,76,1.113,,89.3761
-110005,202001,200,5217,27,,,107.48
-110005,202002,200,7016,27,1.377938182,,54.70285714
-110005,202003,200,9940,27,0.952585628,,98.26519337
-110006,202001,200,5325,42,,,107.48
-110006,202002,200,7747,42,1.377938182,,54.70285714
-110006,202003,200,6685,42,0.952585628,,98.26519337
-110007,202001,200,5496,19,,,107.48
-110007,202002,200,1010,19,1.377938182,,54.70285714
-110007,202003,200,1235,19,0.952585628,,98.26519337
-110008,202001,200,,43,,,107.48
-110008,202002,200,3913,43,1.377938182,,54.70285714
-110008,202003,200,6013,43,0.952585628,,98.26519337
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,,76
+110005,202001,200,5217,27
+110005,202002,200,7016,27
+110005,202003,200,9940,27
+110006,202001,200,5325,42
+110006,202002,200,7747,42
+110006,202003,200,6685,42
+110007,202001,200,5496,19
+110007,202002,200,1010,19
+110007,202003,200,1235,19
+110008,202001,200,,43
+110008,202002,200,3913,43
+110008,202003,200,6013,43
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index 8940be65..cfaad115 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,25 +1,49 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,89,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
-110001,202002,100,89,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4
-110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,,70.26136364,1.040615327,,79.81873182,6194,R,3,,3
-110002,202001,100,83,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
-110002,202002,100,83,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4
-110002,202003,100,83,1.113,,89.3761,0.803489751,,0.968230653,,70.26136364,1.040615327,,79.81873182,4743,R,3,,3
-110003,202001,100,4,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
-110003,202002,100,4,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4
-110003,202003,100,4,1.113,,89.3761,1.406496063,,0.968230653,,70.26136364,1.040615327,,79.81873182,1429,R,3,,3
-110004,202001,100,76,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
-110004,202002,100,76,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4
-110004,202003,100,76,1.113,,89.3761,,,0.968230653,,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,,3
-110005,202001,200,27,,,107.48,,0.743586089,,2.290844366,182.25,,2.290844366,144.865,5217,R,,3,3
-110005,202002,200,27,1.377938182,,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4
-110005,202003,200,27,0.952585628,,98.26519337,1.416761688,,1.259780318,,182.2366412,1.106182973,,140.2509173,9940,R,4,,4
-110006,202001,200,42,,,107.48,,0.68736285,,2.290844366,182.25,,2.290844366,144.865,5325,R,,3,3
-110006,202002,200,42,1.377938182,,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4
-110006,202003,200,42,0.952585628,,98.26519337,0.862914677,,1.259780318,,182.2366412,1.106182973,,140.2509173,6685,R,4,,4
-110007,202001,200,19,,,107.48,,5.441584158,,2.290844366,182.25,,2.290844366,144.865,5496,R,,3,3
-110007,202002,200,19,1.377938182,,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4
-110007,202003,200,19,0.952585628,,98.26519337,1.222772277,,1.259780318,,182.2366412,1.106182973,,140.2509173,1235,R,4,,4
-110008,202001,200,43,,,107.48,,,,2.290844366,182.25,,2.290844366,144.865,8964.074004,BI,,3,3
-110008,202002,200,43,1.377938182,,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4
-110008,202003,200,43,0.952585628,,98.26519337,1.53667263,,1.259780318,,182.2366412,1.106182973,,140.2509173,6013,R,4,,4
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_backward,link_inclusion_forward,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,1,1,1,1,0,0
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,1,1,1,0,0,0
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,1,1,1,0,1,0
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,1,1,1,1,0,0
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,1,1,1,0,0,0
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,1,1,1,0,1,0
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,1,1,1,1,0,0
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,1,1,1,0,0,0
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,1,1,1,0,1,0
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,1,1,1,1,0,0
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,1,1,1,0,0,0
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,0,1,0
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,1,1,1,1,0,0
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,1,1,1,0,0,0
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,1,1,1,0,1,0
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,1,1,1,1,0,0
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,1,1,1,0,0,0
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,1,1,1,0,1,0
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,1,1,1,1,0,0
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,1,1,1,0,0,0
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,1,1,1,0,1,0
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,,,,1,0,0
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,1,1,1,0,0,0
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,1,1,1,0,1,0
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110005,201901,200,27,,,1,1,107.48,,,,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,1,54.70285714,,,,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+110006,201901,200,42,,,1,1,107.48,,,,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,1,54.70285714,,,,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+110007,201901,200,19,,,1,1,107.48,,,,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,1,54.70285714,,,,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+110008,201901,200,43,,,1,1,107.48,,,,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,1,54.70285714,,,,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv
index db75d8ec..f8a0a4ad 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_input.csv
@@ -1,16 +1,16 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-210001,202001,1,547,10,,2.656680299,101.7103175
-210001,202002,1,362,10,0.771850199,1.13167173,74.91666667
-210001,202003,1,895,10,0.968230653,,70.26136364
-210002,202001,1,381,50,,2.656680299,101.7103175
-210002,202002,1,573,50,0.771850199,1.13167173,74.91666667
-210002,202003,1,214,50,0.968230653,,70.26136364
-210003,202001,2,961,12,,0.68736285,182.25
-210003,202002,2,267,12,0.994479964,1.158863126,150.2748092
-210003,202003,2,314,12,1.259780318,,182.2366412
-210004,202001,2,555,9,,0.68736285,182.25
-210004,202002,2,628,9,0.994479964,1.158863126,150.2748092
-210004,202003,2,736,9,1.259780318,,182.2366412
-210005,202001,1,100,18,,2.656680299,101.7103175
-210005,202002,2,,18,0.994479964,1.158863126,150.2748092
-210005,202003,2,,18,1.259780318,,182.2366412
+identifier,date,group,question,other
+210001,202001,1,547,10
+210001,202002,1,362,10
+210001,202003,1,895,10
+210002,202001,1,381,50
+210002,202002,1,573,50
+210002,202003,1,214,50
+210003,202001,2,961,12
+210003,202002,2,267,12
+210003,202003,2,314,12
+210004,202001,2,555,9
+210004,202002,2,628,9
+210004,202003,2,736,9
+210005,202001,1,100,18
+210005,202002,2,,18
+210005,202003,2,,18
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index f97fcb80..af801598 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,16 +1,31 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-210001,202001,1,10,,2.656680299,101.7103175,,1.511049724,,1.087985595,13.17948718,,1.872332947,57.44490234,547,R,,2,3
-210001,202002,1,10,0.771850199,1.13167173,74.91666667,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2
-210001,202003,1,10,0.968230653,,70.26136364,2.472375691,,1.42292432,,18.48333333,1.195577487,,44.37234849,895,R,2,,2
-210002,202001,1,50,,2.656680299,101.7103175,,0.664921466,,1.087985595,13.17948718,,1.872332947,57.44490234,381,R,,2,3
-210002,202002,1,50,0.771850199,1.13167173,74.91666667,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2
-210002,202003,1,50,0.968230653,,70.26136364,0.373472949,,1.42292432,,18.48333333,1.195577487,,44.37234849,214,R,2,,2
-210003,202001,2,12,,0.68736285,182.25,,3.599250936,,2.241504449,72.19047619,,1.46443365,127.2202381,961,R,,2,2
-210003,202002,2,12,0.994479964,1.158863126,150.2748092,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2
-210003,202003,2,12,1.259780318,,182.2366412,1.176029963,,1.174002242,,50,1.21689128,,116.1183206,314,R,2,,2
-210004,202001,2,9,,0.68736285,182.25,,0.883757962,,2.241504449,72.19047619,,1.46443365,127.2202381,555,R,,2,2
-210004,202002,2,9,0.994479964,1.158863126,150.2748092,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2
-210004,202003,2,9,1.259780318,,182.2366412,1.171974522,,1.174002242,,50,1.21689128,,116.1183206,736,R,2,,2
-210005,202001,1,18,,2.656680299,101.7103175,,,,1.087985595,13.17948718,,1.872332947,57.44490234,100,R,,2,3
-210005,202002,2,18,0.994479964,1.158863126,150.2748092,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2
-210005,202003,2,18,1.259780318,,182.2366412,,,1.174002242,,50,1.21689128,,116.1183206,2112.577671,FIC,2,,2
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_backward,link_inclusion_forward,default_forward,default_backward,default_construction
+210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,1,1,1,1,0,0
+210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,1,1,1,0,0,0
+210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,1,1,1,0,1,0
+210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,1,1,1,1,0,0
+210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,1,1,1,0,0,0
+210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,1,1,1,0,1,0
+210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,1,1,1,1,0,0
+210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,1,1,1,0,0,0
+210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,1,1,1,0,1,0
+210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,1,1,1,1,0,0
+210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,1,1,1,0,0,0
+210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,1,1,1,0,1,0
+210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,1,1,1,1,0,0
+210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,,,,0,0,0
+210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,,,,0,1,0
+210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+210002,201901,1,50,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+210002,201903,1,50,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+210003,201901,2,12,,,1,0.68736285,182.25,,,,,,,,,,,,,,
+210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,,
+210003,201903,2,12,,,1.259780318,1,182.2366412,,,,,,,,,,,,,,
+210004,201901,2,9,,,1,0.68736285,182.25,,,,,,,,,,,,,,
+210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,,
+210004,201903,2,9,,,1.259780318,1,182.2366412,,,,,,,,,,,,,,
+210005,201901,1,18,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,,
+210005,201903,2,18,,,1.259780318,1,182.2366412,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv
index 4a95e219..04eceefa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv
@@ -1,29 +1,29 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-70001,202001,100,5951,39,,1.511049724,101.7103175
-70001,202002,100,1814,39,,,
-70001,202003,100,734,39,1.082864299,,70.26136364
-70001,202004,100,96,39,1.42292432,0.664921466,101.7103175
-70001,202005,100,9086,39,0.70468356,2.677570093,74.91666667
-70001,202006,100,3949,39,1.174002242,0.404469274,182.2366412
-70001,202007,100,49,39,,,
-70002,202001,100,6705,94,,1.511049724,101.7103175
-70002,202002,100,48,94,,,
-70002,202003,100,5361,94,1.082864299,,70.26136364
-70002,202004,100,8767,94,1.42292432,0.664921466,101.7103175
-70002,202005,100,9214,94,0.70468356,2.677570093,74.91666667
-70002,202006,100,7467,94,1.174002242,0.404469274,182.2366412
-70002,202007,100,3475,94,,,
-70003,202001,100,6153,42,,1.511049724,101.7103175
-70003,202002,100,7711,42,,,
-70003,202003,100,5403,42,1.082864299,,70.26136364
-70003,202004,100,7445,42,1.42292432,0.664921466,101.7103175
-70003,202005,100,7092,42,0.70468356,2.677570093,74.91666667
-70003,202006,100,2038,42,1.174002242,0.404469274,182.2366412
-70003,202007,100,8768,42,,,
-70004,202001,100,,6,,1.511049724,101.7103175
-70004,202002,100,,6,,,
-70004,202003,100,6288,6,1.082864299,,70.26136364
-70004,202004,100,,6,1.42292432,0.664921466,101.7103175
-70004,202005,100,,6,0.70468356,2.677570093,74.91666667
-70004,202006,100,5875,6,1.174002242,0.404469274,182.2366412
-70004,202007,100,,6,,,
+identifier,date,group,question,other
+70001,202001,100,5951,39
+70001,202002,100,1814,39
+70001,202003,100,734,39
+70001,202004,100,96,39
+70001,202005,100,9086,39
+70001,202006,100,3949,39
+70001,202007,100,49,39
+70002,202001,100,6705,94
+70002,202002,100,48,94
+70002,202003,100,5361,94
+70002,202004,100,8767,94
+70002,202005,100,9214,94
+70002,202006,100,7467,94
+70002,202007,100,3475,94
+70003,202001,100,6153,42
+70003,202002,100,7711,42
+70003,202003,100,5403,42
+70003,202004,100,7445,42
+70003,202005,100,7092,42
+70003,202006,100,2038,42
+70003,202007,100,8768,42
+70004,202001,100,,6
+70004,202002,100,,6
+70004,202003,100,6288,6
+70004,202004,100,,6
+70004,202005,100,,6
+70004,202006,100,5875,6
+70004,202007,100,,6
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index 6e1718ee..b5f16a4e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,29 +1,57 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-70001,202001,100,39,,1.511049724,101.7103175,,3.280595369,1,47.92201545,107.48,,24.71653259,104.5951588,5951,R,0,3,3
-70001,202002,100,39,,,,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3
-70001,202003,100,39,1.082864299,,70.26136364,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4
-70001,202004,100,39,1.42292432,0.664921466,101.7103175,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3
-70001,202005,100,39,0.70468356,2.677570093,74.91666667,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3
-70001,202006,100,39,1.174002242,0.404469274,182.2366412,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4
-70001,202007,100,39,,,,0.012408205,,1.593348776,1,70.24,1.593348776,,70.24,49,R,3,0,3
-70002,202001,100,94,,1.511049724,101.7103175,,139.6875,1,47.92201545,107.48,,24.71653259,104.5951588,6705,R,0,3,3
-70002,202002,100,94,,,,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3
-70002,202003,100,94,1.082864299,,70.26136364,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4
-70002,202004,100,94,1.42292432,0.664921466,101.7103175,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3
-70002,202005,100,94,0.70468356,2.677570093,74.91666667,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3
-70002,202006,100,94,1.174002242,0.404469274,182.2366412,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4
-70002,202007,100,94,,,,0.46538101,,1.593348776,1,70.24,1.593348776,,70.24,3475,R,3,0,3
-70003,202001,100,42,,1.511049724,101.7103175,,0.797950979,1,47.92201545,107.48,,24.71653259,104.5951588,6153,R,0,3,3
-70003,202002,100,42,,,,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3
-70003,202003,100,42,1.082864299,,70.26136364,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4
-70003,202004,100,42,1.42292432,0.664921466,101.7103175,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3
-70003,202005,100,42,0.70468356,2.677570093,74.91666667,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3
-70003,202006,100,42,1.174002242,0.404469274,182.2366412,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4
-70003,202007,100,42,,,,4.302257115,,1.593348776,1,70.24,1.593348776,,70.24,8768,R,3,0,3
-70004,202001,100,6,,1.511049724,101.7103175,,,1,47.92201545,107.48,,24.71653259,104.5951588,202432.0564,BI,0,3,3
-70004,202002,100,6,,,,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3
-70004,202003,100,6,1.082864299,,70.26136364,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4
-70004,202004,100,6,1.42292432,0.664921466,101.7103175,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3
-70004,202005,100,6,0.70468356,2.677570093,74.91666667,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3
-70004,202006,100,6,1.174002242,0.404469274,182.2366412,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4
-70004,202007,100,6,,,,,,1.593348776,1,70.24,1.593348776,,70.24,9360.924059,FIR,3,0,3
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_backward,link_inclusion_forward,default_forward,default_backward,default_construction
+70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,1,1,1,1,0,0
+70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,1,1,1,0,0,0
+70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,1,1,1,0,0,0
+70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,1,1,1,0,0,0
+70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,1,1,1,0,0,0
+70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,1,1,1,0,0,0
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,1,1,1,0,1,0
+70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,1,1,1,1,0,0
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,1,1,1,0,0,0
+70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,1,1,1,0,0,0
+70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,1,1,1,0,0,0
+70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,1,1,1,0,0,0
+70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,1,1,1,0,0,0
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,1,1,1,0,1,0
+70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,1,1,1,1,0,0
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,1,1,1,0,0,0
+70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,1,1,1,0,0,0
+70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,1,1,1,0,0,0
+70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,1,1,1,0,0,0
+70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,1,1,1,0,0,0
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,1,1,1,0,1,0
+70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,,,,1,0,0
+70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,,,,0,0,0
+70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,1,1,1,0,0,0
+70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,,,,0,0,0
+70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,,,,0,0,0
+70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,1,1,1,0,0,0
+70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,,,,0,1,0
+70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,,,,
+70001,201902,100,39,,,1,1,1,,,,,,,,,,,,,,
+70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,,,,
+70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,,
+70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,,
+70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,,
+70001,201907,100,39,,,1,1,1,,,,,,,,,,,,,,
+70002,201901,100,94,,,1,1.511049724,101.7103175,,,,,,,,,,,,,,
+70002,201902,100,94,,,1,1,1,,,,,,,,,,,,,,
+70002,201903,100,94,,,1.082864299,1,70.26136364,,,,,,,,,,,,,,
+70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,,
+70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,,
+70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,,
+70002,201907,100,94,,,1,1,1,,,,,,,,,,,,,,
+70003,201901,100,42,,,1,1.511049724,101.7103175,,,,,,,,,,,,,,
+70003,201902,100,42,,,1,1,1,,,,,,,,,,,,,,
+70003,201903,100,42,,,1.082864299,1,70.26136364,,,,,,,,,,,,,,
+70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,,
+70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,,
+70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,,
+70003,201907,100,42,,,1,1,1,,,,,,,,,,,,,,
+70004,201901,100,6,,,1,1.511049724,101.7103175,,,,,,,,,,,,,,
+70004,201902,100,6,,,1,1,1,,,,,,,,,,,,,,
+70004,201903,100,6,,,1.082864299,1,70.26136364,,,,,,,,,,,,,,
+70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,,
+70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,,
+70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,,
+70004,201907,100,6,,,1,1,1,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
index a1a88ba4..5304976b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_input.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-110001,202001,100,9244,89,,,
-110001,202002,100,8916,89,,,
-110001,202003,100,6194,89,,,
-110002,202001,100,4826,83,,,
-110002,202002,100,5903,83,,,
-110002,202003,100,4743,83,,,
-110003,202001,100,7586,4,,,
-110003,202002,100,1016,4,,,
-110003,202003,100,1429,4,,,
-110004,202001,100,3975,76,,,
-110004,202002,100,3044,76,,,
-110004,202003,100,,76,,,
-110005,202001,200,5217,27,,,
-110005,202002,200,7016,27,,,
-110005,202003,200,9940,27,,,
-110006,202001,200,5325,42,,,
-110006,202002,200,7747,42,,,
-110006,202003,200,6685,42,,,
-110007,202001,200,5496,19,,,
-110007,202002,200,1010,19,,,
-110007,202003,200,1235,19,,,
-110008,202001,200,,43,,,
-110008,202002,200,3913,43,,,
-110008,202003,200,6013,43,,,
-110009,202001,100,150000,85,,,
-110009,202002,100,180000,85,,,
-110009,202003,100,120000,85,,,
-110010,202001,100,,71,,,
-110010,202002,100,,71,,,
-110010,202003,100,,71,,,
-110011,202001,200,150000,85,,,
-110011,202002,200,180000,85,,,
-110011,202003,200,120000,85,,,
-110012,202001,200,,71,,,
-110012,202002,200,,71,,,
-110012,202003,200,,71,,,
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,,76
+110005,202001,200,5217,27
+110005,202002,200,7016,27
+110005,202003,200,9940,27
+110006,202001,200,5325,42
+110006,202002,200,7747,42
+110006,202003,200,6685,42
+110007,202001,200,5496,19
+110007,202002,200,1010,19
+110007,202003,200,1235,19
+110008,202001,200,,43
+110008,202002,200,3913,43
+110008,202003,200,6013,43
+110009,202001,100,150000,85
+110009,202002,100,180000,85
+110009,202003,100,120000,85
+110010,202001,100,,71
+110010,202002,100,,71
+110010,202003,100,,71
+110011,202001,200,150000,85
+110011,202002,200,180000,85
+110011,202003,200,120000,85
+110012,202001,200,,71
+110012,202002,200,,71
+110012,202003,200,,71
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index efe407d5..03004236 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -1,37 +1,73 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-110001,202001,100,89,,1.5274,50.3694,,1.036787797,1,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,0,4,4,,,
-110001,202002,100,89,0.9685,1.8795,121.4187,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,,,
-110001,202003,100,89,1.113,,89.3761,0.694706146,,0.968230653,1,70.26136364,1.040615327,,79.81873182,6194,R,3,0,3,,,
-110002,202001,100,83,,1.5274,50.3694,,0.817550398,1,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,0,4,4,,,
-110002,202002,100,83,0.9685,1.8795,121.4187,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,,,
-110002,202003,100,83,1.113,,89.3761,0.803489751,,0.968230653,1,70.26136364,1.040615327,,79.81873182,4743,R,3,0,3,,,
-110003,202001,100,4,,1.5274,50.3694,,7.466535433,1,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,0,4,4,,,
-110003,202002,100,4,0.9685,1.8795,121.4187,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,,,
-110003,202003,100,4,1.113,,89.3761,1.406496063,,0.968230653,1,70.26136364,1.040615327,,79.81873182,1429,R,3,0,3,,,
-110004,202001,100,76,,1.5274,50.3694,,1.305847569,1,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,0,4,4,,,
-110004,202002,100,76,0.9685,1.8795,121.4187,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,,,
-110004,202003,100,76,1.113,,89.3761,,,0.968230653,1,70.26136364,1.040615327,,79.81873182,3167.633054,FIR,3,0,3,,,
-110005,202001,200,27,,2.994350985,107.48,,0.743586089,1,2.290844366,182.25,,2.642597676,144.865,5217,R,0,3,3,,,
-110005,202002,200,27,1.377938182,0.670608989,54.70285714,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,,,
-110005,202003,200,27,0.952585628,,98.26519337,1.416761688,,1.259780318,1,182.2366412,1.106182973,,140.2509173,9940,R,4,0,4,,,
-110006,202001,200,42,,2.994350985,107.48,,0.68736285,1,2.290844366,182.25,,2.642597676,144.865,5325,R,0,3,3,,,
-110006,202002,200,42,1.377938182,0.670608989,54.70285714,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,,,
-110006,202003,200,42,0.952585628,,98.26519337,0.862914677,,1.259780318,1,182.2366412,1.106182973,,140.2509173,6685,R,4,0,4,,,
-110007,202001,200,19,,2.994350985,107.48,,5.441584158,1,2.290844366,182.25,,2.642597676,144.865,5496,R,0,3,3,,,
-110007,202002,200,19,1.377938182,0.670608989,54.70285714,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,,,
-110007,202003,200,19,0.952585628,,98.26519337,1.222772277,,1.259780318,1,182.2366412,1.106182973,,140.2509173,1235,R,4,0,4,,,
-110008,202001,200,43,,2.994350985,107.48,,,1,2.290844366,182.25,,2.642597676,144.865,2942.431489,BI,0,3,3,,,
-110008,202002,200,43,1.377938182,0.670608989,54.70285714,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,,
-110008,202003,200,43,0.952585628,,98.26519337,1.53667263,,1.259780318,1,182.2366412,1.106182973,,140.2509173,6013,R,4,0,4,,,
-110009,202001,100,85,,,,,,1,2.656680299,101.7103175,,2.09204015,76.03985875,150000,R,0,4,4,,,TRUE
-110009,202002,100,85,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,,,TRUE
-110009,202003,100,85,,,,,,0.968230653,1,70.26136364,1.040615327,,79.81873182,120000,R,3,0,3,,,TRUE
-110010,202001,100,71,,,,,,1,2.656680299,101.7103175,,2.09204015,76.03985875,5398.829971,C,0,4,4,,,
-110010,202002,100,71,,,,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,
-110010,202003,100,71,,,,,,0.968230653,1,70.26136364,1.040615327,,79.81873182,4888.735268,FIC,3,0,3,,,
-110011,202001,200,85,,,,,,1,2.290844366,182.25,,2.642597676,144.865,150000,R,0,3,3,,,TRUE
-110011,202002,200,85,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,,,TRUE
-110011,202003,200,85,,,,,,1.259780318,1,182.2366412,1.106182973,,140.2509173,120000,R,4,0,4,,,TRUE
-110012,202001,200,71,,,,,,1,2.290844366,182.25,,2.642597676,144.865,10285.415,C,0,3,3,,,
-110012,202002,200,71,,,,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,
-110012,202003,200,71,,,,,,1.259780318,1,182.2366412,1.106182973,,140.2509173,13496.15416,FIC,4,0,4,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_backward,link_inclusion_forward,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,true,true,1,0,0
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,0,0,0
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,true,0,1,0
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,true,true,1,0,0
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,true,0,0,0
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,true,true,0,1,0
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,true,true,1,0,0
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,true,0,0,0
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,true,true,0,1,0
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,true,true,1,0,0
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,true,true,0,0,0
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,0,1,0
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,true,true,1,0,0
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,true,0,0,0
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,true,true,0,1,0
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,true,true,1,0,0
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,true,0,0,0
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,true,true,0,1,0
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,true,true,1,0,0
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,true,0,0,0
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,true,true,0,1,0
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,,1,0,0
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,true,true,true,0,0,0
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,true,true,0,1,0
+110009,202001,100,85,,,1,2.656680299,101.7103175,1,2.09204015,76.03985875,150000,R,0,4,4,false,true,false,1,0,0
+110009,202002,100,85,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,false,false,false,0,0,0
+110009,202003,100,85,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,120000,R,3,0,3,false,false,true,0,1,0
+110010,202001,100,71,,,1,2.656680299,101.7103175,1,2.09204015,76.03985875,5398.829971,C,0,4,4,,,,1,0,0
+110010,202002,100,71,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,,0,0,0
+110010,202003,100,71,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4888.735268,FIC,3,0,3,,,,0,1,0
+110011,202001,200,85,,,1,2.290844366,182.25,1,2.642597676,144.865,150000,R,0,3,3,false,true,false,1,0,0
+110011,202002,200,85,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,false,false,false,0,0,0
+110011,202003,200,85,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,120000,R,4,0,4,false,false,true,0,1,0
+110012,202001,200,71,,,1,2.290844366,182.25,1,2.642597676,144.865,10285.415,C,0,3,3,,,,1,0,0
+110012,202002,200,71,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,,0,0,0
+110012,202003,200,71,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,13496.15416,FIC,4,0,4,,,,0,1,0
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,,
+110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+110009,201901,100,85,,,1,1,1,,,,,,,,,,,,,,
+110009,201902,100,85,,,1,1,1,,,,,,,,,,,,,,
+110009,201903,100,85,,,1,1,1,,,,,,,,,,,,,,
+110010,201901,100,71,,,1,1,1,,,,,,,,,,,,,,
+110010,201902,100,71,,,1,1,1,,,,,,,,,,,,,,
+110010,201903,100,71,,,1,1,1,,,,,,,,,,,,,,
+110011,201901,200,85,,,1,1,1,,,,,,,,,,,,,,
+110011,201902,200,85,,,1,1,1,,,,,,,,,,,,,,
+110011,201903,200,85,,,1,1,1,,,,,,,,,,,,,,
+110012,201901,200,71,,,1,1,1,,,,,,,,,,,,,,
+110012,201902,200,71,,,1,1,1,,,,,,,,,,,,,,
+110012,201903,200,71,,,1,1,1,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_input.csv
index 130de716..b4bafd4e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_input.csv
@@ -1,22 +1,22 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-110001,202001,100,9244,89,,2.09204015,76.03985875
-110001,202002,100,8916,89,0.8701751,1.505585865,98.16768334
-110001,202003,100,6194,89,1.040615327,,79.81873182
-110002,202001,100,4826,83,,2.09204015,76.03985875
-110002,202002,100,5903,83,0.8701751,1.505585865,98.16768334
-110002,202003,100,4743,83,1.040615327,,79.81873182
-110003,202001,100,7586,4,,2.09204015,76.03985875
-110003,202002,100,1016,4,0.8701751,1.505585865,98.16768334
-110003,202003,100,1429,4,1.040615327,,79.81873182
-110004,202001,100,3975,76,,2.09204015,76.03985875
-110004,202002,100,3044,76,0.8701751,1.505585865,98.16768334
-110004,202003,100,,76,1.040615327,,79.81873182
-110005,202001,200,,27,,2.642597676,144.865
-110005,202002,200,,27,1.186209073,0.751963069,102.4888332
-110005,202003,200,9940,27,1.106182973,,140.2509173
-110006,202001,200,5325,42,,2.642597676,144.865
-110006,202002,200,,42,1.186209073,0.751963069,102.4888332
-110006,202003,200,,42,1.106182973,,140.2509173
-110007,202001,200,,19,,2.642597676,144.865
-110007,202002,200,,19,1.186209073,0.751963069,102.4888332
-110007,202003,200,,19,1.106182973,,140.2509173
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,,76
+110005,202001,200,,27
+110005,202002,200,,27
+110005,202003,200,9940,27
+110006,202001,200,5325,42
+110006,202002,200,,42
+110006,202003,200,,42
+110007,202001,200,,19
+110007,202002,200,,19
+110007,202003,200,,19
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index 01d139cf..6a41f5fb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -1,22 +1,43 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction
-110001,202001,100,89,,2.09204015,76.03985875,,1.036787797,1,2.656680299,101.7103175,,2.374360225,88.87508813,9244,R,0,4,4
-110001,202002,100,89,0.8701751,1.505585865,98.16768334,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4
-110001,202003,100,89,1.040615327,,79.81873182,0.694706146,,0.968230653,1,70.26136364,1.00442299,,75.04004773,6194,R,3,0,3
-110002,202001,100,83,,2.09204015,76.03985875,,0.817550398,1,2.656680299,101.7103175,,2.374360225,88.87508813,4826,R,0,4,4
-110002,202002,100,83,0.8701751,1.505585865,98.16768334,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4
-110002,202003,100,83,1.040615327,,79.81873182,0.803489751,,0.968230653,1,70.26136364,1.00442299,,75.04004773,4743,R,3,0,3
-110003,202001,100,4,,2.09204015,76.03985875,,7.466535433,1,2.656680299,101.7103175,,2.374360225,88.87508813,7586,R,0,4,4
-110003,202002,100,4,0.8701751,1.505585865,98.16768334,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4
-110003,202003,100,4,1.040615327,,79.81873182,1.406496063,,0.968230653,1,70.26136364,1.00442299,,75.04004773,1429,R,3,0,3
-110004,202001,100,76,,2.09204015,76.03985875,,1.305847569,1,2.656680299,101.7103175,,2.374360225,88.87508813,3975,R,0,4,4
-110004,202002,100,76,0.8701751,1.505585865,98.16768334,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4
-110004,202003,100,76,1.040615327,,79.81873182,,,0.968230653,1,70.26136364,1.00442299,,75.04004773,3057.463582,FIR,3,0,3
-110005,202001,200,27,,2.642597676,144.865,,,1,1,1,,1.821298838,72.9325,9940,BI,0,0,0
-110005,202002,200,27,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0
-110005,202003,200,27,1.106182973,,140.2509173,,,1,1,368.1481481,1.053091487,,254.1995327,9940,R,0,0,1
-110006,202001,200,42,,2.642597676,144.865,,,1,1,126.7857143,,1.821298838,135.8253572,5325,R,0,0,1
-110006,202002,200,42,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0
-110006,202003,200,42,1.106182973,,140.2509173,,,1,1,368.1481481,1.053091487,,254.1995327,5325,FIR,0,0,1
-110007,202001,200,19,,2.642597676,144.865,,,1,1,126.7857143,,1.821298838,135.8253572,2580.681786,C,0,0,1
-110007,202002,200,19,1.186209073,0.751963069,102.4888332,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0
-110007,202003,200,19,1.106182973,,140.2509173,,,1,1,368.1481481,1.053091487,,254.1995327,2970.72366,FIC,0,0,1
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_backward,link_inclusion_forward,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,1,1,1,1,0,0
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,1,1,1,0,0,0
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,1,1,1,0,1,0
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,1,1,1,1,0,0
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,1,1,1,0,0,0
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,1,1,1,0,1,0
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,1,1,1,1,0,0
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,1,1,1,0,0,0
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,1,1,1,0,1,0
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,1,1,1,1,0,0
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,1,1,1,0,0,0
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,,,,0,1,0
+110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,,,,1,1,1
+110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,,,,1,1,1
+110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,1,1,1,1,1,1
+110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,1,1,1,1,1,1
+110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,,,,1,1,1
+110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,,,,1,1,1
+110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,,,,1,1,1
+110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,,,,1,1,1
+110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,,,,1,1,1
+110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,
+110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,
+110002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,
+110002,201903,100,83,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,
+110003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,
+110003,201903,100,4,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,
+110004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,
+110004,201903,100,76,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,
+110005,201901,200,27,,,1,2.642597676,144.865,,,,,,,,,,,,,,
+110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,
+110005,201903,200,27,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,
+110006,201901,200,42,,,1,2.642597676,144.865,,,,,,,,,,,,,,
+110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,
+110006,201903,200,42,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,
+110007,201901,200,19,,,1,2.642597676,144.865,,,,,,,,,,,,,,
+110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,
+110007,201903,200,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
index b4c563a0..5ba4f67b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_input.csv
@@ -1,73 +1,73 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-80001,202001,100,9244,89,,2.642597676,144.865
-80001,202002,100,8916,89,1.186209073,0.751963069,102.4888332
-80001,202003,100,6194,89,1.106182973,,140.2509173
-80002,202001,100,4826,83,,2.642597676,144.865
-80002,202002,100,5903,83,1.186209073,0.751963069,102.4888332
-80002,202003,100,4743,83,1.106182973,,140.2509173
-80003,202001,100,7586,4,,2.642597676,144.865
-80003,202002,100,1016,4,1.186209073,0.751963069,102.4888332
-80003,202003,100,1429,4,1.106182973,,140.2509173
-80004,202001,100,3975,76,,2.642597676,144.865
-80004,202002,100,3044,76,1.186209073,0.751963069,102.4888332
-80004,202003,100,3673,76,1.106182973,,140.2509173
-80005,202001,100,1941,18,,2.642597676,144.865
-80005,202002,100,3121,18,1.186209073,0.751963069,102.4888332
-80005,202003,100,1208,18,1.106182973,,140.2509173
-80006,202001,100,5405,94,,2.642597676,144.865
-80006,202002,100,7084,94,1.186209073,0.751963069,102.4888332
-80006,202003,100,4980,94,1.106182973,,140.2509173
-80007,202001,100,15172,8,,2.642597676,144.865
-80007,202002,100,2845,8,1.186209073,0.751963069,102.4888332
-80007,202003,100,3501,8,1.106182973,,140.2509173
-80008,202001,100,16298,304,,2.642597676,144.865
-80008,202002,100,14429,304,1.186209073,0.751963069,102.4888332
-80008,202003,100,14295,304,1.106182973,,140.2509173
-80009,202001,100,3698,45,,2.642597676,144.865
-80009,202002,100,4993,45,1.186209073,0.751963069,102.4888332
-80009,202003,100,4212,45,1.106182973,,140.2509173
-80010,202001,100,7722,100,,2.642597676,144.865
-80010,202002,100,10153,100,1.186209073,0.751963069,102.4888332
-80010,202003,100,6545,100,1.106182973,,140.2509173
-80011,202001,100,30344,19,,2.642597676,144.865
-80011,202002,100,3627,19,1.186209073,0.751963069,102.4888332
-80011,202003,100,7288,19,1.106182973,,140.2509173
-80012,202001,100,16298,304,,2.642597676,144.865
-80012,202002,100,11567,304,1.186209073,0.751963069,102.4888332
-80012,202003,100,,304,1.106182973,,140.2509173
-80013,202001,200,20190,54,,2.09204015,76.03985875
-80013,202002,200,18242,54,0.8701751,1.505585865,98.16768334
-80013,202003,200,28826,54,1.040615327,,79.81873182
-80014,202001,200,4260,47,,2.09204015,76.03985875
-80014,202002,200,5036,42,0.8701751,1.505585865,98.16768334
-80014,202003,200,6484,42,1.040615327,,79.81873182
-80015,202001,200,19236,57,,2.09204015,76.03985875
-80015,202002,200,4949,57,0.8701751,1.505585865,98.16768334
-80015,202003,200,3544,57,1.040615327,,79.81873182
-80016,202001,200,14902,163,,2.09204015,76.03985875
-80016,202002,200,16435,163,0.8701751,1.505585865,98.16768334
-80016,202003,200,24653,163,1.040615327,,79.81873182
-80017,202001,200,35476,149,,2.09204015,76.03985875
-80017,202002,200,50515,149,0.8701751,1.505585865,98.16768334
-80017,202003,200,53477,149,1.040615327,,79.81873182
-80018,202001,200,13845,126,,2.09204015,76.03985875
-80018,202002,200,25488,126,0.8701751,1.505585865,98.16768334
-80018,202003,200,27409,126,1.040615327,,79.81873182
-80019,202001,200,1099,6,,2.09204015,76.03985875
-80019,202002,200,434,6,0.8701751,1.505585865,98.16768334
-80019,202003,200,124,6,1.040615327,,79.81873182
-80020,202001,200,3348,22,,2.09204015,76.03985875
-80020,202002,200,1996,22,0.8701751,1.505585865,98.16768334
-80020,202003,200,5051,22,1.040615327,,79.81873182
-80021,202001,200,29215,108,,2.09204015,76.03985875
-80021,202002,200,34168,108,0.8701751,1.505585865,98.16768334
-80021,202003,200,61628,108,1.040615327,,79.81873182
-80022,202001,200,6390,67,,2.09204015,76.03985875
-80022,202002,200,12705,67,0.8701751,1.505585865,98.16768334
-80022,202003,200,11966,67,1.040615327,,79.81873182
-80023,202001,200,4562,18,,2.09204015,76.03985875
-80023,202002,200,1717,18,0.8701751,1.505585865,98.16768334
-80023,202003,200,2371,18,1.040615327,,79.81873182
-80024,202001,200,,155,,2.09204015,76.03985875
-80024,202002,200,18782,155,0.8701751,1.505585865,98.16768334
-80024,202003,200,21046,155,1.040615327,,79.81873182
+identifier,date,group,question,other
+80001,202001,100,9244,89
+80001,202002,100,8916,89
+80001,202003,100,6194,89
+80002,202001,100,4826,83
+80002,202002,100,5903,83
+80002,202003,100,4743,83
+80003,202001,100,7586,4
+80003,202002,100,1016,4
+80003,202003,100,1429,4
+80004,202001,100,3975,76
+80004,202002,100,3044,76
+80004,202003,100,3673,76
+80005,202001,100,1941,18
+80005,202002,100,3121,18
+80005,202003,100,1208,18
+80006,202001,100,5405,94
+80006,202002,100,7084,94
+80006,202003,100,4980,94
+80007,202001,100,15172,8
+80007,202002,100,2845,8
+80007,202003,100,3501,8
+80008,202001,100,16298,304
+80008,202002,100,14429,304
+80008,202003,100,14295,304
+80009,202001,100,3698,45
+80009,202002,100,4993,45
+80009,202003,100,4212,45
+80010,202001,100,7722,100
+80010,202002,100,10153,100
+80010,202003,100,6545,100
+80011,202001,100,30344,19
+80011,202002,100,3627,19
+80011,202003,100,7288,19
+80012,202001,100,16298,304
+80012,202002,100,11567,304
+80012,202003,100,,304
+80013,202001,200,20190,54
+80013,202002,200,18242,54
+80013,202003,200,28826,54
+80014,202001,200,4260,47
+80014,202002,200,5036,42
+80014,202003,200,6484,42
+80015,202001,200,19236,57
+80015,202002,200,4949,57
+80015,202003,200,3544,57
+80016,202001,200,14902,163
+80016,202002,200,16435,163
+80016,202003,200,24653,163
+80017,202001,200,35476,149
+80017,202002,200,50515,149
+80017,202003,200,53477,149
+80018,202001,200,13845,126
+80018,202002,200,25488,126
+80018,202003,200,27409,126
+80019,202001,200,1099,6
+80019,202002,200,434,6
+80019,202003,200,124,6
+80020,202001,200,3348,22
+80020,202002,200,1996,22
+80020,202003,200,5051,22
+80021,202001,200,29215,108
+80021,202002,200,34168,108
+80021,202003,200,61628,108
+80022,202001,200,6390,67
+80022,202002,200,12705,67
+80022,202003,200,11966,67
+80023,202001,200,4562,18
+80023,202002,200,1717,18
+80023,202003,200,2371,18
+80024,202001,200,,155
+80024,202002,200,18782,155
+80024,202003,200,21046,155
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 026a6f8d..73a7b6a9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,73 +1,145 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-80001,202001,100,89,,2.642597676,144.865,,1.036787797,1,2.076255394,107.1910333,,2.359426535,126.0280167,9244,R,0,10,12,,,
-80001,202002,100,89,1.186209073,0.751963069,102.4888332,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,
-80001,202003,100,89,1.106182973,,140.2509173,0.694706146,,0.918490819,1,69.22002885,1.012336896,,104.7354731,6194,R,9,0,11,,,
-80002,202001,100,83,,2.642597676,144.865,,0.817550398,1,2.076255394,107.1910333,,2.359426535,126.0280167,4826,R,0,10,12,,,
-80002,202002,100,83,1.186209073,0.751963069,102.4888332,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,,,
-80002,202003,100,83,1.106182973,,140.2509173,0.803489751,,0.918490819,1,69.22002885,1.012336896,,104.7354731,4743,R,9,0,11,,,
-80003,202001,100,4,,2.642597676,144.865,,7.466535433,1,2.076255394,107.1910333,,2.359426535,126.0280167,7586,R,0,10,12,,,
-80003,202002,100,4,1.186209073,0.751963069,102.4888332,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,,,
-80003,202003,100,4,1.106182973,,140.2509173,1.406496063,,0.918490819,1,69.22002885,1.012336896,,104.7354731,1429,R,9,0,11,,,
-80004,202001,100,76,,2.642597676,144.865,,1.305847569,1,2.076255394,107.1910333,,2.359426535,126.0280167,3975,R,0,10,12,,,
-80004,202002,100,76,1.186209073,0.751963069,102.4888332,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,,,
-80004,202003,100,76,1.106182973,,140.2509173,1.206636005,,0.918490819,1,69.22002885,1.012336896,,104.7354731,3673,R,9,0,11,,,
-80005,202001,100,18,,2.642597676,144.865,,0.622072678,1,2.076255394,107.1910333,,2.359426535,126.0280167,1941,R,0,10,12,,TRUE,
-80005,202002,100,18,1.186209073,0.751963069,102.4888332,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,TRUE,TRUE,
-80005,202003,100,18,1.106182973,,140.2509173,0.387050567,,0.918490819,1,69.22002885,1.012336896,,104.7354731,1208,R,9,0,11,,,
-80006,202001,100,94,,2.642597676,144.865,,0.763047038,1,2.076255394,107.1910333,,2.359426535,126.0280167,5405,R,0,10,12,,,
-80006,202002,100,94,1.186209073,0.751963069,102.4888332,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,,,
-80006,202003,100,94,1.106182973,,140.2509173,0.703053532,,0.918490819,1,69.22002885,1.012336896,,104.7354731,4980,R,9,0,11,,,
-80007,202001,100,8,,2.642597676,144.865,,5.333239595,1,2.076255394,107.1910333,,2.359426535,126.0280167,15172,R,0,10,12,,,
-80007,202002,100,8,1.186209073,0.751963069,102.4888332,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,,,
-80007,202003,100,8,1.106182973,,140.2509173,1.230684055,,0.918490819,1,69.22002885,1.012336896,,104.7354731,3501,R,9,0,11,,,
-80008,202001,100,304,,2.642597676,144.865,,1.129530598,1,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,0,10,12,,,
-80008,202002,100,304,1.186209073,0.751963069,102.4888332,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,,,
-80008,202003,100,304,1.106182973,,140.2509173,0.990729498,,0.918490819,1,69.22002885,1.012336896,,104.7354731,14295,R,9,0,11,,,
-80009,202001,100,45,,2.642597676,144.865,,0.740562712,1,2.076255394,107.1910333,,2.359426535,126.0280167,3698,R,0,10,12,,,
-80009,202002,100,45,1.186209073,0.751963069,102.4888332,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,,,
-80009,202003,100,45,1.106182973,,140.2509173,0.843571749,,0.918490819,1,69.22002885,1.012336896,,104.7354731,4212,R,9,0,11,,,
-80010,202001,100,100,,2.642597676,144.865,,0.760511998,1,2.076255394,107.1910333,,2.359426535,126.0280167,7722,R,0,10,12,,,
-80010,202002,100,100,1.186209073,0.751963069,102.4888332,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,,,
-80010,202003,100,100,1.106182973,,140.2509173,0.644660382,,0.918490819,1,69.22002885,1.012336896,,104.7354731,6545,R,9,0,11,TRUE,,
-80011,202001,100,19,,2.642597676,144.865,,8.365866031,1,2.076255394,107.1910333,,2.359426535,126.0280167,30344,R,0,10,12,,TRUE,
-80011,202002,100,19,1.186209073,0.751963069,102.4888332,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,TRUE,TRUE,
-80011,202003,100,19,1.106182973,,140.2509173,2.00928009,,0.918490819,1,69.22002885,1.012336896,,104.7354731,7288,R,9,0,11,TRUE,,
-80012,202001,100,304,,2.642597676,144.865,,1.408940798,1,2.076255394,107.1910333,,2.359426535,126.0280167,16298,R,0,10,12,,,
-80012,202002,100,304,1.186209073,0.751963069,102.4888332,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,,,
-80012,202003,100,304,1.106182973,,140.2509173,,,0.918490819,1,69.22002885,1.012336896,,104.7354731,11709.70088,FIR,9,0,11,,,
-80013,202001,200,54,,2.09204015,76.03985875,,1.106799294,1,1.313944665,186.8459267,,1.702992408,131.4428927,20190,R,0,9,11,,,
-80013,202002,200,54,0.8701751,1.505585865,98.16768334,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,,,
-80013,202003,200,54,1.040615327,,79.81873182,1.58023419,,1.246527322,1,255.2315185,1.143571325,,167.5251252,28826,R,10,0,12,,,
-80014,202001,200,47,,2.09204015,76.03985875,,0.845985046,1,1.313944665,186.8459267,,1.702992408,131.4428927,4260,R,0,9,11,,,
-80014,202002,200,42,0.8701751,1.505585865,98.16768334,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,,,
-80014,202003,200,42,1.040615327,,79.81873182,1.28773421,,1.246527322,1,255.2315185,1.143571325,,167.5251252,6484,R,10,0,12,,,
-80015,202001,200,57,,2.09204015,76.03985875,,3.886845827,1,1.313944665,186.8459267,,1.702992408,131.4428927,19236,R,0,9,11,,TRUE,
-80015,202002,200,57,0.8701751,1.505585865,98.16768334,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,TRUE,,
-80015,202003,200,57,1.040615327,,79.81873182,0.716195191,,1.246527322,1,255.2315185,1.143571325,,167.5251252,3544,R,10,0,12,,,
-80016,202001,200,163,,2.09204015,76.03985875,,0.906730921,1,1.313944665,186.8459267,,1.702992408,131.4428927,14902,R,0,9,11,,,
-80016,202002,200,163,0.8701751,1.505585865,98.16768334,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,,,
-80016,202003,200,163,1.040615327,,79.81873182,1.500085186,,1.246527322,1,255.2315185,1.143571325,,167.5251252,24653,R,10,0,12,,,
-80017,202001,200,149,,2.09204015,76.03985875,,0.702275751,1,1.313944665,186.8459267,,1.702992408,131.4428927,35476,R,0,9,11,,,
-80017,202002,200,149,0.8701751,1.505585865,98.16768334,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,,,
-80017,202003,200,149,1.040615327,,79.81873182,1.058635817,,1.246527322,1,255.2315185,1.143571325,,167.5251252,53477,R,10,0,12,,,
-80018,202001,200,126,,2.09204015,76.03985875,,0.543204684,1,1.313944665,186.8459267,,1.702992408,131.4428927,13845,R,0,9,11,,,
-80018,202002,200,126,0.8701751,1.505585865,98.16768334,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,,,
-80018,202003,200,126,1.040615327,,79.81873182,1.075364795,,1.246527322,1,255.2315185,1.143571325,,167.5251252,27409,R,10,0,12,,,
-80019,202001,200,6,,2.09204015,76.03985875,,2.530969376,1,1.313944665,186.8459267,,1.702992408,131.4428927,1099,R,0,9,11,,,
-80019,202002,200,6,0.8701751,1.505585865,98.16768334,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,,TRUE,
-80019,202003,200,6,1.040615327,,79.81873182,0.284365646,,1.246527322,1,255.2315185,1.143571325,,167.5251252,124,R,10,0,12,TRUE,,
-80020,202001,200,22,,2.09204015,76.03985875,,1.677715809,1,1.313944665,186.8459267,,1.702992408,131.4428927,3348,R,0,9,11,,,
-80020,202002,200,22,0.8701751,1.505585865,98.16768334,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,,TRUE,
-80020,202003,200,22,1.040615327,,79.81873182,2.530990214,,1.246527322,1,255.2315185,1.143571325,,167.5251252,5051,R,10,0,12,TRUE,,
-80021,202001,200,108,,2.09204015,76.03985875,,0.855047659,1,1.313944665,186.8459267,,1.702992408,131.4428927,29215,R,0,9,11,,,
-80021,202002,200,108,0.8701751,1.505585865,98.16768334,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,,,
-80021,202003,200,108,1.040615327,,79.81873182,1.803680177,,1.246527322,1,255.2315185,1.143571325,,167.5251252,61628,R,10,0,12,,,
-80022,202001,200,67,,2.09204015,76.03985875,,0.502948427,1,1.313944665,186.8459267,,1.702992408,131.4428927,6390,R,0,9,11,,TRUE,
-80022,202002,200,67,0.8701751,1.505585865,98.16768334,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,,TRUE,
-80022,202003,200,67,1.040615327,,79.81873182,0.9418398,,1.246527322,1,255.2315185,1.143571325,,167.5251252,11966,R,10,0,12,,,
-80023,202001,200,18,,2.09204015,76.03985875,,2.656773442,1,1.313944665,186.8459267,,1.702992408,131.4428927,4562,R,0,9,11,,,
-80023,202002,200,18,0.8701751,1.505585865,98.16768334,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,,,
-80023,202003,200,18,1.040615327,,79.81873182,1.381013395,,1.246527322,1,255.2315185,1.143571325,,167.5251252,2371,R,10,0,12,,,
-80024,202001,200,155,,2.09204015,76.03985875,,,1,1.313944665,186.8459267,,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,
-80024,202002,200,155,0.8701751,1.505585865,98.16768334,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,,
-80024,202003,200,155,1.040615327,,79.81873182,1.120490459,,1.246527322,1,255.2315185,1.143571325,,167.5251252,21046,R,10,0,12,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,,1,1,1,1,0,0
+80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,1,1,1,0,0,0
+80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,,,1,1,1,0,1,0
+80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,,1,1,1,1,0,0
+80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,,,1,1,1,0,0,0
+80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,,,1,1,1,0,1,0
+80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,,1,1,1,1,0,0
+80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,,,1,1,1,0,0,0
+80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,,,1,1,1,0,1,0
+80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,,1,1,1,1,0,0
+80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,,,1,1,1,0,0,0
+80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,,,1,1,1,0,1,0
+80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,TRUE,1,1,1,1,0,0
+80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,TRUE,TRUE,1,1,1,0,0,0
+80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,,,1,1,1,0,1,0
+80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,,1,1,1,1,0,0
+80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,,,1,1,1,0,0,0
+80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,,,1,1,1,0,1,0
+80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,,1,1,1,1,0,0
+80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,,,1,1,1,0,0,0
+80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,,,1,1,1,0,1,0
+80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,,1,1,1,1,0,0
+80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,,,1,1,1,0,0,0
+80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,,,1,1,1,0,1,0
+80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,,1,1,1,1,0,0
+80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,,,1,1,1,0,0,0
+80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,,,1,1,1,0,1,0
+80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,,1,1,1,1,0,0
+80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,,,1,1,1,0,0,0
+80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,TRUE,,1,1,1,0,1,0
+80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,TRUE,1,1,1,1,0,0
+80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,TRUE,TRUE,1,1,1,0,0,0
+80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,TRUE,,1,1,1,0,1,0
+80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,,1,1,1,1,0,0
+80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,,,1,1,1,0,0,0
+80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,,,,0,1,0
+80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,,1,1,1,1,0,0
+80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,,,1,1,1,0,0,0
+80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,,,1,1,1,0,1,0
+80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,,1,1,1,1,0,0
+80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,,,1,1,1,0,0,0
+80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,,,1,1,1,0,1,0
+80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,TRUE,1,1,1,1,0,0
+80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,TRUE,,1,1,1,0,0,0
+80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,,,1,1,1,0,1,0
+80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,,1,1,1,1,0,0
+80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,,,1,1,1,0,0,0
+80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,,,1,1,1,0,1,0
+80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,,1,1,1,1,0,0
+80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,,,1,1,1,0,0,0
+80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,,,1,1,1,0,1,0
+80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,,1,1,1,1,0,0
+80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,,,1,1,1,0,0,0
+80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,,,1,1,1,0,1,0
+80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,,1,1,1,1,0,0
+80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,,TRUE,1,1,1,0,0,0
+80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,TRUE,,1,1,1,0,1,0
+80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,,1,1,1,1,0,0
+80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,,TRUE,1,1,1,0,0,0
+80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,TRUE,,1,1,1,0,1,0
+80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,,1,1,1,1,0,0
+80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,,,1,1,1,0,0,0
+80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,,,1,1,1,0,1,0
+80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,TRUE,1,1,1,1,0,0
+80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,,TRUE,1,1,1,0,0,0
+80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,,,1,1,1,0,1,0
+80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,,1,1,1,1,0,0
+80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,,,1,1,1,0,0,0
+80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,,,1,1,1,0,1,0
+80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,,,,1,0,0
+80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,,1,1,1,0,0,0
+80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,,,1,1,1,0,1,0
+80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80002,201901,100,83,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80002,201903,100,83,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80003,201901,100,4,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80003,201903,100,4,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80004,201901,100,76,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80004,201903,100,76,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80005,201901,100,18,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80005,201903,100,18,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80006,201901,100,94,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80006,201903,100,94,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80007,201901,100,8,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80007,201903,100,8,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80008,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80008,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80009,201901,100,45,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80009,201903,100,45,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80010,201901,100,100,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80010,201903,100,100,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80011,201901,100,19,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80011,201903,100,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80012,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
+80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
+80012,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
+80013,201901,200,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80013,201903,200,54,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80014,201901,200,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80014,201903,200,42,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80015,201901,200,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80015,201903,200,57,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80016,201901,200,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80016,201903,200,163,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80017,201901,200,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80017,201903,200,149,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80018,201901,200,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80018,201903,200,126,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80019,201901,200,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80019,201903,200,6,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80020,201901,200,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80020,201903,200,22,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80021,201901,200,108,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80021,201903,200,108,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80022,201901,200,67,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80022,201903,200,67,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80023,201901,200,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80023,201903,200,18,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+80024,201901,200,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
+80024,201903,200,155,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
index ffd7a9f4..7146dee2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_input.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,,2.09204015,76.03985875
-30001,202002,100,7476,51,0.8701751,1.505585865,123.1676833
-30001,202003,100,2003,51,2.040615327,,84.81873182
-30002,202001,100,9343,72,,2.09204015,76.03985875
-30002,202002,100,7818,72,0.8701751,1.505585865,123.1676833
-30002,202003,100,4897,72,2.040615327,,84.81873182
-30003,202001,100,7511,7,,2.09204015,76.03985875
-30003,202002,100,1761,7,0.8701751,1.505585865,123.1676833
-30003,202003,100,6492,7,2.040615327,,84.81873182
-30004,202001,100,64,81,,2.09204015,76.03985875
-30004,202002,100,2113,81,0.8701751,1.505585865,123.1676833
-30004,202003,100,185,81,2.040615327,,84.81873182
-30005,202001,100,844,5,,2.09204015,76.03985875
-30005,202002,100,897,5,0.8701751,1.505585865,123.1676833
-30005,202003,100,280,5,2.040615327,,84.81873182
-30006,202001,100,1869,14,,2.09204015,76.03985875
-30006,202002,100,1876,14,0.8701751,1.505585865,123.1676833
-30006,202003,100,1371,14,2.040615327,,84.81873182
-30007,202001,100,12769,12,,2.09204015,76.03985875
-30007,202002,100,2853,12,0.8701751,1.505585865,123.1676833
-30007,202003,100,11491,12,2.040615327,,84.81873182
-30008,202001,100,141,162,,2.09204015,76.03985875
-30008,202002,100,6001,162,0.8701751,1.505585865,123.1676833
-30008,202003,100,433,162,2.040615327,,84.81873182
-30009,202001,100,6417,26,,2.09204015,76.03985875
-30009,202002,100,4037,26,0.8701751,1.505585865,123.1676833
-30009,202003,100,1322,26,2.040615327,,84.81873182
-30010,202001,100,28963,144,,2.09204015,76.03985875
-30010,202002,100,21734,144,0.8701751,1.505585865,123.1676833
-30010,202003,100,10529,144,2.040615327,,84.81873182
-30011,202001,100,6009,5,,2.09204015,76.03985875
-30011,202002,100,1145,5,0.8701751,1.505585865,123.1676833
-30011,202003,100,5064,5,2.040615327,,84.81873182
-30012,202001,100,,275,,2.09204015,76.03985875
-30012,202002,100,,275,0.8701751,1.505585865,123.1676833
-30012,202003,100,,275,2.040615327,,84.81873182
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,10529,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30011,202003,100,5064,5
+30012,202001,100,,275
+30012,202002,100,,275
+30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index bb9950dc..c6752b9d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,37 +1,73 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker
-30001,202001,100,51,,2.09204015,76.03985875,,1.129481006,1,1.772802559,142.3186593,,1.932421355,109.179259,8444,R,0,9,11,,
-30001,202002,100,51,0.8701751,1.505585865,123.1676833,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,,
-30001,202003,100,51,2.040615327,,84.81873182,0.267924024,,1.172391173,1,76.13443331,1.60650325,,80.47658257,2003,R,9,0,11,,
-30002,202001,100,72,,2.09204015,76.03985875,,1.195062676,1,1.772802559,142.3186593,,1.932421355,109.179259,9343,R,0,9,11,,
-30002,202002,100,72,0.8701751,1.505585865,123.1676833,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,,
-30002,202003,100,72,2.040615327,,84.81873182,0.626375032,,1.172391173,1,76.13443331,1.60650325,,80.47658257,4897,R,9,0,11,,
-30003,202001,100,7,,2.09204015,76.03985875,,4.265190233,1,1.772802559,142.3186593,,1.932421355,109.179259,7511,R,0,9,11,,
-30003,202002,100,7,0.8701751,1.505585865,123.1676833,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,,
-30003,202003,100,7,2.040615327,,84.81873182,3.686541738,,1.172391173,1,76.13443331,1.60650325,,80.47658257,6492,R,9,0,11,,
-30004,202001,100,81,,2.09204015,76.03985875,,0.030288689,1,1.772802559,142.3186593,,1.932421355,109.179259,64,R,0,9,11,,
-30004,202002,100,81,0.8701751,1.505585865,123.1676833,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,,
-30004,202003,100,81,2.040615327,,84.81873182,0.087553242,,1.172391173,1,76.13443331,1.60650325,,80.47658257,185,R,9,0,11,,
-30005,202001,100,5,,2.09204015,76.03985875,,0.941234172,1,1.772802559,142.3186593,,1.932421355,109.179259,844,R,0,9,11,,
-30005,202002,100,5,0.8701751,1.505585865,123.1676833,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,,
-30005,202003,100,5,2.040615327,,84.81873182,0.312578027,,1.172391173,1,76.13443331,1.60650325,,80.47658257,280,R,9,0,11,,
-30006,202001,100,14,,2.09204015,76.03985875,,0.995885563,1,1.772802559,142.3186593,,1.932421355,109.179259,1869,R,0,9,11,,
-30006,202002,100,14,0.8701751,1.505585865,123.1676833,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,,
-30006,202003,100,14,2.040615327,,84.81873182,0.730770871,,1.172391173,1,76.13443331,1.60650325,,80.47658257,1371,R,9,0,11,,
-30007,202001,100,12,,2.09204015,76.03985875,,4.475816911,1,1.772802559,142.3186593,,1.932421355,109.179259,12769,R,0,9,11,,
-30007,202002,100,12,0.8701751,1.505585865,123.1676833,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,,
-30007,202003,100,12,2.040615327,,84.81873182,4.027888195,,1.172391173,1,76.13443331,1.60650325,,80.47658257,11491,R,9,0,11,,
-30008,202001,100,162,,2.09204015,76.03985875,,0.023463069,1,1.772802559,142.3186593,,1.932421355,109.179259,141,R,0,9,11,,TRUE
-30008,202002,100,162,0.8701751,1.505585865,123.1676833,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,TRUE,TRUE
-30008,202003,100,162,2.040615327,,84.81873182,0.072138939,,1.172391173,1,76.13443331,1.60650325,,80.47658257,433,R,9,0,11,TRUE,
-30009,202001,100,26,,2.09204015,76.03985875,,1.589639934,1,1.772802559,142.3186593,,1.932421355,109.179259,6417,R,0,9,11,,
-30009,202002,100,26,0.8701751,1.505585865,123.1676833,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,,
-30009,202003,100,26,2.040615327,,84.81873182,0.327462695,,1.172391173,1,76.13443331,1.60650325,,80.47658257,1322,R,9,0,11,,
-30010,202001,100,144,,2.09204015,76.03985875,,1.332623847,1,1.772802559,142.3186593,,1.932421355,109.179259,28963,R,0,9,11,,
-30010,202002,100,144,0.8701751,1.505585865,123.1676833,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,,
-30010,202003,100,144,2.040615327,,84.81873182,0.484426733,,1.172391173,1,76.13443331,1.60650325,,80.47658257,10529,R,9,0,11,,
-30011,202001,100,5,,2.09204015,76.03985875,,5.249464902,1,1.772802559,142.3186593,,1.932421355,109.179259,6009,R,0,9,11,,TRUE
-30011,202002,100,5,0.8701751,1.505585865,123.1676833,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,TRUE,TRUE
-30011,202003,100,5,2.040615327,,84.81873182,4.423850085,,1.172391173,1,76.13443331,1.60650325,,80.47658257,5064,R,9,0,11,TRUE,
-30012,202001,100,275,,2.09204015,76.03985875,,,1,1.772802559,142.3186593,,1.932421355,109.179259,30024.29623,C,0,9,11,,
-30012,202002,100,275,0.8701751,1.505585865,123.1676833,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,
-30012,202003,100,275,2.040615327,,84.81873182,,,1.172391173,1,76.13443331,1.60650325,,80.47658257,124533.173,FIC,9,0,11,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,1,1,1,1,0,0
+30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,1,1,1,0,0,0
+30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,1,1,1,0,1,0
+30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,1,1,1,1,0,0
+30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,1,1,1,0,0,0
+30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,1,1,1,0,1,0
+30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,1,1,1,1,0,0
+30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,1,1,1,0,0,0
+30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,1,1,1,0,1,0
+30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,1,1,1,1,0,0
+30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,1,1,1,0,0,0
+30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,1,1,1,0,1,0
+30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,1,1,1,1,0,0
+30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,1,1,1,0,0,0
+30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,1,1,1,0,1,0
+30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,1,1,1,1,0,0
+30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,1,1,1,0,0,0
+30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,1,1,1,0,1,0
+30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,1,1,1,1,0,0
+30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,1,1,1,0,0,0
+30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,1,1,1,0,1,0
+30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,1,1,1,1,0,0
+30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,1,1,1,0,0,0
+30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,1,1,1,0,1,0
+30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,1,1,1,1,0,0
+30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,1,1,1,0,0,0
+30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,1,1,1,0,1,0
+30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,1,1,1,1,0,0
+30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,1,1,1,0,0,0
+30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,1,1,1,0,1,0
+30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,1,1,1,1,0,0
+30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,1,1,1,0,0,0
+30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,1,1,1,0,1,0
+30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,,1,0,0
+30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,,0,0,0
+30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,,0,1,0
+30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
index 49371146..3a255141 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_input.csv
@@ -1,64 +1,64 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-90001,202001,100,9244,89,,2.09204015,76.03985875
-90001,202002,100,8916,89,0.8701751,1.505585865,123.1676833
-90001,202003,100,6194,89,2.040615327,,84.81873182
-90002,202001,100,4826,83,,2.09204015,76.03985875
-90002,202002,100,5903,83,0.8701751,1.505585865,123.1676833
-90002,202003,100,4743,83,2.040615327,,84.81873182
-90003,202001,100,7586,4,,2.09204015,76.03985875
-90003,202002,100,1016,4,0.8701751,1.505585865,123.1676833
-90003,202003,100,1429,4,2.040615327,,84.81873182
-90004,202001,100,3975,76,,2.09204015,76.03985875
-90004,202002,100,3044,76,0.8701751,1.505585865,123.1676833
-90004,202003,100,3673,76,2.040615327,,84.81873182
-90005,202001,100,1941,18,,2.09204015,76.03985875
-90005,202002,100,3121,18,0.8701751,1.505585865,123.1676833
-90005,202003,100,1208,18,2.040615327,,84.81873182
-90006,202001,100,5405,94,,2.09204015,76.03985875
-90006,202002,100,7084,94,0.8701751,1.505585865,123.1676833
-90006,202003,100,4980,94,2.040615327,,84.81873182
-90007,202001,100,15172,8,,2.09204015,76.03985875
-90007,202002,100,2845,8,0.8701751,1.505585865,123.1676833
-90007,202003,100,3501,8,2.040615327,,84.81873182
-90008,202001,100,16298,304,,2.09204015,76.03985875
-90008,202002,100,14429,304,0.8701751,1.505585865,123.1676833
-90008,202003,100,14295,304,2.040615327,,84.81873182
-90009,202001,100,3698,45,,2.09204015,76.03985875
-90009,202002,100,4993,45,0.8701751,1.505585865,123.1676833
-90009,202003,100,4212,45,2.040615327,,84.81873182
-90010,202001,100,7722,100,,2.09204015,76.03985875
-90010,202002,100,10153,100,0.8701751,1.505585865,123.1676833
-90010,202003,100,6545,100,2.040615327,,84.81873182
-90011,202001,100,30344,19,,2.09204015,76.03985875
-90011,202002,100,3627,19,0.8701751,1.505585865,123.1676833
-90011,202003,100,7288,19,2.040615327,,84.81873182
-90012,202001,100,16298,304,,2.09204015,76.03985875
-90012,202002,100,11567,304,0.8701751,1.505585865,123.1676833
-90012,202003,100,13484,304,2.040615327,,84.81873182
-90013,202001,100,20190,54,,2.09204015,76.03985875
-90013,202002,100,18242,54,0.8701751,1.505585865,123.1676833
-90013,202003,100,28826,54,2.040615327,,84.81873182
-90014,202001,100,4260,47,,2.09204015,76.03985875
-90014,202002,100,5036,42,0.8701751,1.505585865,123.1676833
-90014,202003,100,6484,42,2.040615327,,84.81873182
-90015,202001,100,19236,57,,2.09204015,76.03985875
-90015,202002,100,4949,57,0.8701751,1.505585865,123.1676833
-90015,202003,100,3544,57,2.040615327,,84.81873182
-90016,202001,100,14902,163,,2.09204015,76.03985875
-90016,202002,100,16435,163,0.8701751,1.505585865,123.1676833
-90016,202003,100,24653,163,2.040615327,,84.81873182
-90017,202001,100,35476,149,,2.09204015,76.03985875
-90017,202002,100,50515,149,0.8701751,1.505585865,123.1676833
-90017,202003,100,53477,149,2.040615327,,84.81873182
-90018,202001,100,13845,126,,2.09204015,76.03985875
-90018,202002,100,25488,126,0.8701751,1.505585865,123.1676833
-90018,202003,100,27409,126,2.040615327,,84.81873182
-90019,202001,100,1099,6,,2.09204015,76.03985875
-90019,202002,100,434,6,0.8701751,1.505585865,123.1676833
-90019,202003,100,124,6,2.040615327,,84.81873182
-90020,202001,100,3348,22,,2.09204015,76.03985875
-90020,202002,100,1996,22,0.8701751,1.505585865,123.1676833
-90020,202003,100,5051,22,2.040615327,,84.81873182
-90021,202001,100,,155,,2.09204015,76.03985875
-90021,202002,100,,155,0.8701751,1.505585865,123.1676833
-90021,202003,100,21046,155,2.040615327,,84.81873182
+identifier,date,group,question,other
+90001,202001,100,9244,89
+90001,202002,100,8916,89
+90001,202003,100,6194,89
+90002,202001,100,4826,83
+90002,202002,100,5903,83
+90002,202003,100,4743,83
+90003,202001,100,7586,4
+90003,202002,100,1016,4
+90003,202003,100,1429,4
+90004,202001,100,3975,76
+90004,202002,100,3044,76
+90004,202003,100,3673,76
+90005,202001,100,1941,18
+90005,202002,100,3121,18
+90005,202003,100,1208,18
+90006,202001,100,5405,94
+90006,202002,100,7084,94
+90006,202003,100,4980,94
+90007,202001,100,15172,8
+90007,202002,100,2845,8
+90007,202003,100,3501,8
+90008,202001,100,16298,304
+90008,202002,100,14429,304
+90008,202003,100,14295,304
+90009,202001,100,3698,45
+90009,202002,100,4993,45
+90009,202003,100,4212,45
+90010,202001,100,7722,100
+90010,202002,100,10153,100
+90010,202003,100,6545,100
+90011,202001,100,30344,19
+90011,202002,100,3627,19
+90011,202003,100,7288,19
+90012,202001,100,16298,304
+90012,202002,100,11567,304
+90012,202003,100,13484,304
+90013,202001,100,20190,54
+90013,202002,100,18242,54
+90013,202003,100,28826,54
+90014,202001,100,4260,47
+90014,202002,100,5036,42
+90014,202003,100,6484,42
+90015,202001,100,19236,57
+90015,202002,100,4949,57
+90015,202003,100,3544,57
+90016,202001,100,14902,163
+90016,202002,100,16435,163
+90016,202003,100,24653,163
+90017,202001,100,35476,149
+90017,202002,100,50515,149
+90017,202003,100,53477,149
+90018,202001,100,13845,126
+90018,202002,100,25488,126
+90018,202003,100,27409,126
+90019,202001,100,1099,6
+90019,202002,100,434,6
+90019,202003,100,124,6
+90020,202001,100,3348,22
+90020,202002,100,1996,22
+90020,202003,100,5051,22
+90021,202001,100,,155
+90021,202002,100,,155
+90021,202003,100,21046,155
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index 3c241bf3..bcf39710 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -1,64 +1,127 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-90001,202001,100,89,,2.09204015,76.03985875,,1.036787797,1,1.504436071,128.8429705,,1.798238111,102.4414146,9244,R,0,17,19,,,
-90001,202002,100,89,0.8701751,1.505585865,123.1676833,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,,,
-90001,202003,100,89,2.040615327,,84.81873182,0.694706146,,1.072463185,1,126.2596455,1.556539256,,105.5391887,6194,R,18,0,21,,,
-90002,202001,100,83,,2.09204015,76.03985875,,0.817550398,1,1.504436071,128.8429705,,1.798238111,102.4414146,4826,R,0,17,19,,,
-90002,202002,100,83,0.8701751,1.505585865,123.1676833,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,,,
-90002,202003,100,83,2.040615327,,84.81873182,0.803489751,,1.072463185,1,126.2596455,1.556539256,,105.5391887,4743,R,18,0,21,,,
-90003,202001,100,4,,2.09204015,76.03985875,,,1,1.504436071,128.8429705,,1.798238111,102.4414146,7586,R,0,17,19,,,TRUE
-90003,202002,100,4,0.8701751,1.505585865,123.1676833,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,,,
-90003,202003,100,4,2.040615327,,84.81873182,1.406496063,,1.072463185,1,126.2596455,1.556539256,,105.5391887,1429,R,18,0,21,,,
-90004,202001,100,76,,2.09204015,76.03985875,,1.305847569,1,1.504436071,128.8429705,,1.798238111,102.4414146,3975,R,0,17,19,,,
-90004,202002,100,76,0.8701751,1.505585865,123.1676833,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,,,
-90004,202003,100,76,2.040615327,,84.81873182,1.206636005,,1.072463185,1,126.2596455,1.556539256,,105.5391887,3673,R,18,0,21,,,
-90005,202001,100,18,,2.09204015,76.03985875,,0.622072678,1,1.504436071,128.8429705,,1.798238111,102.4414146,1941,R,0,17,19,,,
-90005,202002,100,18,0.8701751,1.505585865,123.1676833,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,,,
-90005,202003,100,18,2.040615327,,84.81873182,0.387050567,,1.072463185,1,126.2596455,1.556539256,,105.5391887,1208,R,18,0,21,,,
-90006,202001,100,94,,2.09204015,76.03985875,,0.763047038,1,1.504436071,128.8429705,,1.798238111,102.4414146,5405,R,0,17,19,,,
-90006,202002,100,94,0.8701751,1.505585865,123.1676833,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,,,
-90006,202003,100,94,2.040615327,,84.81873182,0.703053532,,1.072463185,1,126.2596455,1.556539256,,105.5391887,4980,R,18,0,21,,,
-90007,202001,100,8,,2.09204015,76.03985875,,5.333239595,1,1.504436071,128.8429705,,1.798238111,102.4414146,15172,R,0,17,19,,,
-90007,202002,100,8,0.8701751,1.505585865,123.1676833,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,,,
-90007,202003,100,8,2.040615327,,84.81873182,1.230684055,,1.072463185,1,126.2596455,1.556539256,,105.5391887,3501,R,18,0,21,,,
-90008,202001,100,304,,2.09204015,76.03985875,,1.129530598,1,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,0,17,19,,,
-90008,202002,100,304,0.8701751,1.505585865,123.1676833,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,,,
-90008,202003,100,304,2.040615327,,84.81873182,0.990729498,,1.072463185,1,126.2596455,1.556539256,,105.5391887,14295,R,18,0,21,,,
-90009,202001,100,45,,2.09204015,76.03985875,,0.740562712,1,1.504436071,128.8429705,,1.798238111,102.4414146,3698,R,0,17,19,,,
-90009,202002,100,45,0.8701751,1.505585865,123.1676833,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,,,
-90009,202003,100,45,2.040615327,,84.81873182,0.843571749,,1.072463185,1,126.2596455,1.556539256,,105.5391887,4212,R,18,0,21,,,
-90010,202001,100,100,,2.09204015,76.03985875,,0.760511998,1,1.504436071,128.8429705,,1.798238111,102.4414146,7722,R,0,17,19,,,
-90010,202002,100,100,0.8701751,1.505585865,123.1676833,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,,,
-90010,202003,100,100,2.040615327,,84.81873182,0.644660382,,1.072463185,1,126.2596455,1.556539256,,105.5391887,6545,R,18,0,21,,,
-90011,202001,100,19,,2.09204015,76.03985875,,8.365866031,1,1.504436071,128.8429705,,1.798238111,102.4414146,30344,R,0,17,19,,TRUE,
-90011,202002,100,19,0.8701751,1.505585865,123.1676833,0.119533351,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,TRUE,,
-90011,202003,100,19,2.040615327,,84.81873182,2.00928009,,1.072463185,1,126.2596455,1.556539256,,105.5391887,7288,R,18,0,21,,,
-90012,202001,100,304,,2.09204015,76.03985875,,1.408940798,1,1.504436071,128.8429705,,1.798238111,102.4414146,16298,R,0,17,19,,,
-90012,202002,100,304,0.8701751,1.505585865,123.1676833,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,,,
-90012,202003,100,304,2.040615327,,84.81873182,1.165730094,,1.072463185,1,126.2596455,1.556539256,,105.5391887,13484,R,18,0,21,,,
-90013,202001,100,54,,2.09204015,76.03985875,,1.106799294,1,1.504436071,128.8429705,,1.798238111,102.4414146,20190,R,0,17,19,,,
-90013,202002,100,54,0.8701751,1.505585865,123.1676833,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,,,
-90013,202003,100,54,2.040615327,,84.81873182,1.58023419,,1.072463185,1,126.2596455,1.556539256,,105.5391887,28826,R,18,0,21,,,
-90014,202001,100,47,,2.09204015,76.03985875,,0.845985046,1,1.504436071,128.8429705,,1.798238111,102.4414146,4260,R,0,17,19,,,
-90014,202002,100,42,0.8701751,1.505585865,123.1676833,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,,,
-90014,202003,100,42,2.040615327,,84.81873182,1.28773421,,1.072463185,1,126.2596455,1.556539256,,105.5391887,6484,R,18,0,21,,,
-90015,202001,100,57,,2.09204015,76.03985875,,3.886845827,1,1.504436071,128.8429705,,1.798238111,102.4414146,19236,R,0,17,19,,,
-90015,202002,100,57,0.8701751,1.505585865,123.1676833,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,,,
-90015,202003,100,57,2.040615327,,84.81873182,0.716195191,,1.072463185,1,126.2596455,1.556539256,,105.5391887,3544,R,18,0,21,,,
-90016,202001,100,163,,2.09204015,76.03985875,,0.906730921,1,1.504436071,128.8429705,,1.798238111,102.4414146,14902,R,0,17,19,,,
-90016,202002,100,163,0.8701751,1.505585865,123.1676833,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,,,
-90016,202003,100,163,2.040615327,,84.81873182,1.500085186,,1.072463185,1,126.2596455,1.556539256,,105.5391887,24653,R,18,0,21,,,
-90017,202001,100,149,,2.09204015,76.03985875,,0.702275751,1,1.504436071,128.8429705,,1.798238111,102.4414146,35476,R,0,17,19,,,
-90017,202002,100,149,0.8701751,1.505585865,123.1676833,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,,,
-90017,202003,100,149,2.040615327,,84.81873182,1.058635817,,1.072463185,1,126.2596455,1.556539256,,105.5391887,53477,R,18,0,21,,,
-90018,202001,100,126,,2.09204015,76.03985875,,0.543204684,1,1.504436071,128.8429705,,1.798238111,102.4414146,13845,R,0,17,19,,TRUE,
-90018,202002,100,126,0.8701751,1.505585865,123.1676833,1.840926688,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,TRUE,,
-90018,202003,100,126,2.040615327,,84.81873182,1.075364795,,1.072463185,1,126.2596455,1.556539256,,105.5391887,27409,R,18,0,21,,,
-90019,202001,100,6,,2.09204015,76.03985875,,2.530969376,1,1.504436071,128.8429705,,1.798238111,102.4414146,1099,R,0,17,19,,,
-90019,202002,100,6,0.8701751,1.505585865,123.1676833,0.395105531,3.51659919,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,,TRUE,
-90019,202003,100,6,2.040615327,,84.81873182,0.284365646,,1.072463185,1,126.2596455,1.556539256,,105.5391887,124,R,18,0,21,TRUE,,
-90020,202001,100,22,,2.09204015,76.03985875,,1.677715809,1,1.504436071,128.8429705,,1.798238111,102.4414146,3348,R,0,17,19,,,
-90020,202002,100,22,0.8701751,1.505585865,123.1676833,0.596048505,0.395102278,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,,TRUE,
-90020,202003,100,22,2.040615327,,84.81873182,2.530990214,,1.072463185,1,126.2596455,1.556539256,,105.5391887,5051,R,18,0,21,TRUE,,
-90021,202001,100,155,,2.09204015,76.03985875,,,1,1.504436071,128.8429705,,1.798238111,102.4414146,48979.92546,BI,0,17,19,,,
-90021,202002,100,155,0.8701751,1.505585865,123.1676833,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,,,
-90021,202003,100,155,2.040615327,,84.81873182,,,1.072463185,1,126.2596455,1.556539256,,105.5391887,21046,R,18,0,21,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+90001,202001,100,89,,1.036787797,1,1.504436071,128.8429705,1,1.798238111,102.4414146,9244,R,0,17,19,true,true,true,1,0,0
+90001,202002,100,89,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,true,true,true,0,0,0
+90001,202003,100,89,0.694706146,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6194,R,18,0,21,true,true,true,0,1,0
+90002,202001,100,83,,0.817550398,1,1.504436071,128.8429705,1,1.798238111,102.4414146,4826,R,0,17,19,true,true,true,1,0,0
+90002,202002,100,83,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,true,true,true,0,0,0
+90002,202003,100,83,0.803489751,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4743,R,18,0,21,true,true,true,0,1,0
+90003,202001,100,4,,,1,1.504436071,128.8429705,1,1.798238111,102.4414146,7586,R,0,17,19,false,true,true,1,0,0
+90003,202002,100,4,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,true,false,true,0,0,0
+90003,202003,100,4,1.406496063,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,1429,R,18,0,21,true,true,true,0,1,0
+90004,202001,100,76,,1.305847569,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3975,R,0,17,19,true,true,true,1,0,0
+90004,202002,100,76,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,true,true,true,0,0,0
+90004,202003,100,76,1.206636005,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3673,R,18,0,21,true,true,true,0,1,0
+90005,202001,100,18,,0.622072678,1,1.504436071,128.8429705,1,1.798238111,102.4414146,1941,R,0,17,19,true,true,true,1,0,0
+90005,202002,100,18,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,true,true,true,0,0,0
+90005,202003,100,18,0.387050567,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,1208,R,18,0,21,true,true,true,0,1,0
+90006,202001,100,94,,0.763047038,1,1.504436071,128.8429705,1,1.798238111,102.4414146,5405,R,0,17,19,true,true,true,1,0,0
+90006,202002,100,94,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,true,true,true,0,0,0
+90006,202003,100,94,0.703053532,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4980,R,18,0,21,true,true,true,0,1,0
+90007,202001,100,8,,5.333239595,1,1.504436071,128.8429705,1,1.798238111,102.4414146,15172,R,0,17,19,true,true,true,1,0,0
+90007,202002,100,8,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,true,true,true,0,0,0
+90007,202003,100,8,1.230684055,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3501,R,18,0,21,true,true,true,0,1,0
+90008,202001,100,304,,1.129530598,1,1.504436071,128.8429705,1,1.798238111,102.4414146,16298,R,0,17,19,true,true,true,1,0,0
+90008,202002,100,304,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,true,true,true,0,0,0
+90008,202003,100,304,0.990729498,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,14295,R,18,0,21,true,true,true,0,1,0
+90009,202001,100,45,,0.740562712,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3698,R,0,17,19,true,true,true,1,0,0
+90009,202002,100,45,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,true,true,true,0,0,0
+90009,202003,100,45,0.843571749,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4212,R,18,0,21,true,true,true,0,1,0
+90010,202001,100,100,,0.760511998,1,1.504436071,128.8429705,1,1.798238111,102.4414146,7722,R,0,17,19,true,true,true,1,0,0
+90010,202002,100,100,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,true,true,true,0,0,0
+90010,202003,100,100,0.644660382,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6545,R,18,0,21,true,true,true,0,1,0
+90011,202001,100,19,,8.365866031,1,1.504436071,128.8429705,1,1.798238111,102.4414146,30344,R,0,17,19,true,true,true,1,0,0
+90011,202002,100,19,0.119533351,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,true,true,true,0,0,0
+90011,202003,100,19,2.00928009,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,7288,R,18,0,21,true,true,true,0,1,0
+90012,202001,100,304,,1.408940798,1,1.504436071,128.8429705,1,1.798238111,102.4414146,16298,R,0,17,19,true,true,true,1,0,0
+90012,202002,100,304,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,true,true,true,0,0,0
+90012,202003,100,304,1.165730094,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,13484,R,18,0,21,true,true,true,0,1,0
+90013,202001,100,54,,1.106799294,1,1.504436071,128.8429705,1,1.798238111,102.4414146,20190,R,0,17,19,true,true,true,1,0,0
+90013,202002,100,54,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,true,true,true,0,0,0
+90013,202003,100,54,1.58023419,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,28826,R,18,0,21,true,true,true,0,1,0
+90014,202001,100,47,,0.845985046,1,1.504436071,128.8429705,1,1.798238111,102.4414146,4260,R,0,17,19,true,true,true,1,0,0
+90014,202002,100,42,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,true,true,true,0,0,0
+90014,202003,100,42,1.28773421,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6484,R,18,0,21,true,true,true,0,1,0
+90015,202001,100,57,,3.886845827,1,1.504436071,128.8429705,1,1.798238111,102.4414146,19236,R,0,17,19,true,true,true,1,0,0
+90015,202002,100,57,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,true,true,true,0,0,0
+90015,202003,100,57,0.716195191,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3544,R,18,0,21,true,true,true,0,1,0
+90016,202001,100,163,,0.906730921,1,1.504436071,128.8429705,1,1.798238111,102.4414146,14902,R,0,17,19,true,true,true,1,0,0
+90016,202002,100,163,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,true,true,true,0,0,0
+90016,202003,100,163,1.500085186,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,24653,R,18,0,21,true,true,true,0,1,0
+90017,202001,100,149,,0.702275751,1,1.504436071,128.8429705,1,1.798238111,102.4414146,35476,R,0,17,19,true,true,true,1,0,0
+90017,202002,100,149,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,true,true,true,0,0,0
+90017,202003,100,149,1.058635817,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,53477,R,18,0,21,true,true,true,0,1,0
+90018,202001,100,126,,0.543204684,1,1.504436071,128.8429705,1,1.798238111,102.4414146,13845,R,0,17,19,true,true,true,1,0,0
+90018,202002,100,126,1.840926688,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,true,true,true,0,0,0
+90018,202003,100,126,1.075364795,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,27409,R,18,0,21,true,true,true,0,1,0
+90019,202001,100,6,,2.530969376,1,1.504436071,128.8429705,1,1.798238111,102.4414146,1099,R,0,17,19,true,true,true,1,0,0
+90019,202002,100,6,0.395105531,3.51659919,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,true,true,true,0,0,0
+90019,202003,100,6,0.284365646,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,124,R,18,0,21,true,true,true,0,1,0
+90020,202001,100,22,,1.677715809,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3348,R,0,17,19,true,true,true,1,0,0
+90020,202002,100,22,0.596048505,0.395102278,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,true,true,true,0,0,0
+90020,202003,100,22,2.530990214,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,5051,R,18,0,21,true,true,true,0,1,0
+90021,202001,100,155,,,1,1.504436071,128.8429705,1,1.798238111,102.4414146,48979.92546,BI,0,17,19,,,,1,0,0
+90021,202002,100,155,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,,,,0,0,0
+90021,202003,100,155,,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,21046,R,18,0,21,true,true,true,0,1,0
+90001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90001,201902,100,89,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90001,201903,100,89,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90002,201902,100,83,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90002,201903,100,83,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90003,201902,100,4,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90003,201903,100,4,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90004,201902,100,76,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90004,201903,100,76,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90005,201901,100,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90005,201902,100,18,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90005,201903,100,18,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90006,201901,100,94,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90006,201902,100,94,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90006,201903,100,94,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90007,201901,100,8,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90007,201902,100,8,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90007,201903,100,8,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90008,201901,100,304,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90008,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90008,201903,100,304,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90009,201901,100,45,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90009,201902,100,45,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90009,201903,100,45,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90010,201901,100,100,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90010,201902,100,100,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90010,201903,100,100,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90011,201901,100,19,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90011,201902,100,19,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90011,201903,100,19,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90012,201901,100,304,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90012,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90012,201903,100,304,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90013,201901,100,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90013,201902,100,54,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90013,201903,100,54,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90014,201901,100,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90014,201902,100,42,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90014,201903,100,42,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90015,201901,100,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90015,201902,100,57,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90015,201903,100,57,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90016,201901,100,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90016,201902,100,163,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90016,201903,100,163,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90017,201901,100,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90017,201902,100,149,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90017,201903,100,149,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90018,201901,100,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90018,201902,100,126,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90018,201903,100,126,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90019,201901,100,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90019,201902,100,6,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90019,201903,100,6,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90020,201901,100,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90020,201902,100,22,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90020,201903,100,22,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+90021,201901,100,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
+90021,201902,100,155,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
+90021,201903,100,155,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
index 7c87b6dc..5d0a69d4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,51,,2.656680299,101.7103175
-30001,202002,100,7476,51,0.771850199,1.13167173,74.91666667
-30001,202003,100,2003,51,0.968230653,,70.26136364
-30002,202001,100,9343,72,,2.656680299,101.7103175
-30002,202002,100,7818,72,0.771850199,1.13167173,74.91666667
-30002,202003,100,4897,72,0.968230653,,70.26136364
-30003,202001,100,7511,7,,2.656680299,101.7103175
-30003,202002,100,1761,7,0.771850199,1.13167173,74.91666667
-30003,202003,100,6492,7,0.968230653,,70.26136364
-30004,202001,100,64,81,,2.656680299,101.7103175
-30004,202002,100,2113,81,0.771850199,1.13167173,74.91666667
-30004,202003,100,185,81,0.968230653,,70.26136364
-30005,202001,100,844,5,,2.656680299,101.7103175
-30005,202002,100,897,5,0.771850199,1.13167173,74.91666667
-30005,202003,100,280,5,0.968230653,,70.26136364
-30006,202001,100,1869,14,,2.656680299,101.7103175
-30006,202002,100,1876,14,0.771850199,1.13167173,74.91666667
-30006,202003,100,1371,14,0.968230653,,70.26136364
-30007,202001,100,12769,12,,2.656680299,101.7103175
-30007,202002,100,2853,12,0.771850199,1.13167173,74.91666667
-30007,202003,100,11491,12,0.968230653,,70.26136364
-30008,202001,100,141,162,,2.656680299,101.7103175
-30008,202002,100,6001,162,0.771850199,1.13167173,74.91666667
-30008,202003,100,433,162,0.968230653,,70.26136364
-30009,202001,100,6417,26,,2.656680299,101.7103175
-30009,202002,100,4037,26,0.771850199,1.13167173,74.91666667
-30009,202003,100,1322,26,0.968230653,,70.26136364
-30010,202001,100,28963,144,,2.656680299,101.7103175
-30010,202002,100,21734,144,0.771850199,1.13167173,74.91666667
-30010,202003,100,10529,144,0.968230653,,70.26136364
-30011,202001,100,6009,5,,2.656680299,101.7103175
-30011,202002,100,1145,5,0.771850199,1.13167173,74.91666667
-30011,202003,100,5064,5,0.968230653,,70.26136364
-30012,202001,100,256,275,,2.656680299,101.7103175
-30012,202002,100,7522,275,0.771850199,1.13167173,74.91666667
-30012,202003,100,,275,0.968230653,,70.26136364
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,64,81
+30004,202002,100,2113,81
+30004,202003,100,185,81
+30005,202001,100,844,5
+30005,202002,100,897,5
+30005,202003,100,280,5
+30006,202001,100,1869,14
+30006,202002,100,1876,14
+30006,202003,100,1371,14
+30007,202001,100,12769,12
+30007,202002,100,2853,12
+30007,202003,100,11491,12
+30008,202001,100,141,162
+30008,202002,100,6001,162
+30008,202003,100,433,162
+30009,202001,100,6417,26
+30009,202002,100,4037,26
+30009,202003,100,1322,26
+30010,202001,100,28963,144
+30010,202002,100,21734,144
+30010,202003,100,10529,144
+30011,202001,100,6009,5
+30011,202002,100,1145,5
+30011,202003,100,5064,5
+30012,202001,100,256,275
+30012,202002,100,7522,275
+30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index de39d342..8f29c329 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -1,37 +1,73 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-30001,202001,100,51,,2.656680299,101.7103175,,,1,1,61.12436116,,1.82834015,81.41733933,8444,R,0,0,9,,,TRUE,
-30001,202002,100,51,0.771850199,1.13167173,74.91666667,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,,,TRUE,
-30001,202003,100,51,0.968230653,,70.26136364,,,1,1,85.37820513,0.984115327,,77.81978439,2003,R,0,0,10,,,TRUE,
-30002,202001,100,72,,2.656680299,101.7103175,,,1,1,61.12436116,,1.82834015,81.41733933,9343,R,0,0,9,,,TRUE,
-30002,202002,100,72,0.771850199,1.13167173,74.91666667,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,,,TRUE,
-30002,202003,100,72,0.968230653,,70.26136364,,,1,1,85.37820513,0.984115327,,77.81978439,4897,R,0,0,10,,,TRUE,
-30003,202001,100,7,,2.656680299,101.7103175,,4.265190233,1,1,61.12436116,,1.82834015,81.41733933,7511,R,0,0,9,,TRUE,,
-30003,202002,100,7,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,TRUE,TRUE,,
-30003,202003,100,7,0.968230653,,70.26136364,3.686541738,,1,1,85.37820513,0.984115327,,77.81978439,6492,R,0,0,10,TRUE,,,
-30004,202001,100,81,,2.656680299,101.7103175,,0.030288689,1,1,61.12436116,,1.82834015,81.41733933,64,R,0,0,9,,TRUE,,
-30004,202002,100,81,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,TRUE,TRUE,,
-30004,202003,100,81,0.968230653,,70.26136364,0.087553242,,1,1,85.37820513,0.984115327,,77.81978439,185,R,0,0,10,TRUE,,,
-30005,202001,100,5,,2.656680299,101.7103175,,0.941234172,1,1,61.12436116,,1.82834015,81.41733933,844,R,0,0,9,,TRUE,,
-30005,202002,100,5,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,TRUE,TRUE,,
-30005,202003,100,5,0.968230653,,70.26136364,0.312578027,,1,1,85.37820513,0.984115327,,77.81978439,280,R,0,0,10,TRUE,,,
-30006,202001,100,14,,2.656680299,101.7103175,,0.995885563,1,1,61.12436116,,1.82834015,81.41733933,1869,R,0,0,9,,TRUE,,
-30006,202002,100,14,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,TRUE,TRUE,,
-30006,202003,100,14,0.968230653,,70.26136364,0.730770871,,1,1,85.37820513,0.984115327,,77.81978439,1371,R,0,0,10,TRUE,,,
-30007,202001,100,12,,2.656680299,101.7103175,,4.475816911,1,1,61.12436116,,1.82834015,81.41733933,12769,R,0,0,9,,TRUE,,
-30007,202002,100,12,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,TRUE,TRUE,,
-30007,202003,100,12,0.968230653,,70.26136364,4.027888195,,1,1,85.37820513,0.984115327,,77.81978439,11491,R,0,0,10,TRUE,,,
-30008,202001,100,162,,2.656680299,101.7103175,,0.023463069,1,1,61.12436116,,1.82834015,81.41733933,141,R,0,0,9,,TRUE,,
-30008,202002,100,162,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,TRUE,TRUE,,
-30008,202003,100,162,0.968230653,,70.26136364,0.072138939,,1,1,85.37820513,0.984115327,,77.81978439,433,R,0,0,10,TRUE,,,
-30009,202001,100,26,,2.656680299,101.7103175,,1.589639934,1,1,61.12436116,,1.82834015,81.41733933,6417,R,0,0,9,,TRUE,,
-30009,202002,100,26,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,TRUE,TRUE,,
-30009,202003,100,26,0.968230653,,70.26136364,0.327462695,,1,1,85.37820513,0.984115327,,77.81978439,1322,R,0,0,10,TRUE,,,
-30010,202001,100,144,,2.656680299,101.7103175,,,1,1,61.12436116,,1.82834015,81.41733933,28963,R,0,0,9,,,TRUE,
-30010,202002,100,144,0.771850199,1.13167173,74.91666667,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,,,TRUE,
-30010,202003,100,144,0.968230653,,70.26136364,,,1,1,85.37820513,0.984115327,,77.81978439,10529,R,0,0,10,,,TRUE,
-30011,202001,100,5,,2.656680299,101.7103175,,5.249464902,1,1,61.12436116,,1.82834015,81.41733933,6009,R,0,0,9,,TRUE,,
-30011,202002,100,5,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,TRUE,TRUE,,
-30011,202003,100,5,0.968230653,,70.26136364,4.423850085,,1,1,85.37820513,0.984115327,,77.81978439,5064,R,0,0,10,TRUE,,,
-30012,202001,100,275,,2.656680299,101.7103175,,0.034032235,1,1,61.12436116,,1.82834015,81.41733933,256,R,0,0,9,,TRUE,,
-30012,202002,100,275,0.771850199,1.13167173,74.91666667,29.38390625,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,TRUE,,,
-30012,202003,100,275,0.968230653,,70.26136364,,,1,1,85.37820513,0.984115327,,77.81978439,7402.515486,FIR,0,0,10,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,,1,1,61.12436116,1,1.82834015,81.41733933,8444,R,0,0,9,true,true,true,1,1,0
+30001,202002,100,51,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,true,true,true,1,1,0
+30001,202003,100,51,,,1,1,85.37820513,0.984115327,1,77.81978439,2003,R,0,0,10,true,true,true,1,1,0
+30002,202001,100,72,,,1,1,61.12436116,1,1.82834015,81.41733933,9343,R,0,0,9,true,true,true,1,1,0
+30002,202002,100,72,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,true,true,true,1,1,0
+30002,202003,100,72,,,1,1,85.37820513,0.984115327,1,77.81978439,4897,R,0,0,10,true,true,true,1,1,0
+30003,202001,100,7,,4.265190233,1,1,61.12436116,1,1.82834015,81.41733933,7511,R,0,0,9,true,true,true,1,1,0
+30003,202002,100,7,0.234456131,0.271256932,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,true,true,true,1,1,0
+30003,202003,100,7,3.686541738,,1,1,85.37820513,0.984115327,1,77.81978439,6492,R,0,0,10,true,true,true,1,1,0
+30004,202001,100,81,,0.030288689,1,1,61.12436116,1,1.82834015,81.41733933,64,R,0,0,9,true,true,true,1,1,0
+30004,202002,100,81,33.015625,11.42162162,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,true,true,true,1,1,0
+30004,202003,100,81,0.087553242,,1,1,85.37820513,0.984115327,1,77.81978439,185,R,0,0,10,true,true,true,1,1,0
+30005,202001,100,5,,0.941234172,1,1,61.12436116,1,1.82834015,81.41733933,844,R,0,0,9,true,true,true,1,1,0
+30005,202002,100,5,1.062434865,3.199201198,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,true,true,true,1,1,0
+30005,202003,100,5,0.312578027,,1,1,85.37820513,0.984115327,1,77.81978439,280,R,0,0,10,true,true,true,1,1,0
+30006,202001,100,14,,0.995885563,1,1,61.12436116,1,1.82834015,81.41733933,1869,R,0,0,9,true,true,true,1,1,0
+30006,202002,100,14,1.004131435,1.368417982,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,true,true,true,1,1,0
+30006,202003,100,14,0.730770871,,1,1,85.37820513,0.984115327,1,77.81978439,1371,R,0,0,10,true,true,true,1,1,0
+30007,202001,100,12,,4.475816911,1,1,61.12436116,1,1.82834015,81.41733933,12769,R,0,0,9,true,true,true,1,1,0
+30007,202002,100,12,0.223422901,0.248269056,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,true,true,true,1,1,0
+30007,202003,100,12,4.027888195,,1,1,85.37820513,0.984115327,1,77.81978439,11491,R,0,0,10,true,true,true,1,1,0
+30008,202001,100,162,,0.023463069,1,1,61.12436116,1,1.82834015,81.41733933,141,R,0,0,9,true,true,true,1,1,0
+30008,202002,100,162,42.62017045,13.86213906,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,true,true,true,1,1,0
+30008,202003,100,162,0.072138939,,1,1,85.37820513,0.984115327,1,77.81978439,433,R,0,0,10,true,true,true,1,1,0
+30009,202001,100,26,,1.589639934,1,1,61.12436116,1,1.82834015,81.41733933,6417,R,0,0,9,true,true,true,1,1,0
+30009,202002,100,26,0.629073275,3.053782962,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,true,true,true,1,1,0
+30009,202003,100,26,0.327462695,,1,1,85.37820513,0.984115327,1,77.81978439,1322,R,0,0,10,true,true,true,1,1,0
+30010,202001,100,144,,,1,1,61.12436116,1,1.82834015,81.41733933,28963,R,0,0,9,true,true,true,1,1,0
+30010,202002,100,144,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,true,true,true,1,1,0
+30010,202003,100,144,,,1,1,85.37820513,0.984115327,1,77.81978439,10529,R,0,0,10,true,true,true,1,1,0
+30011,202001,100,5,,5.249464902,1,1,61.12436116,1,1.82834015,81.41733933,6009,R,0,0,9,true,true,true,1,1,0
+30011,202002,100,5,0.190495606,0.226047443,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,true,true,true,1,1,0
+30011,202003,100,5,4.423850085,,1,1,85.37820513,0.984115327,1,77.81978439,5064,R,0,0,10,true,true,true,1,1,0
+30012,202001,100,275,,0.034032235,1,1,61.12436116,1,1.82834015,81.41733933,256,R,0,0,9,true,true,true,1,1,0
+30012,202002,100,275,29.38390625,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,true,true,true,1,1,0
+30012,202003,100,275,,,1,1,85.37820513,0.984115327,1,77.81978439,7402.515486,FIR,0,0,10,,,,1,1,0
+30001,201901,100,51,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30001,201902,100,51,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30001,201903,100,51,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30002,201901,100,72,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30002,201902,100,72,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30002,201903,100,72,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30003,201901,100,7,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30003,201902,100,7,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30003,201903,100,7,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30004,201901,100,81,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30004,201902,100,81,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30004,201903,100,81,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30005,201901,100,5,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30005,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30005,201903,100,5,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30006,201901,100,14,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30006,201902,100,14,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30006,201903,100,14,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30007,201901,100,12,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30007,201902,100,12,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30007,201903,100,12,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30008,201901,100,162,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30008,201902,100,162,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30008,201903,100,162,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30009,201901,100,26,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30009,201902,100,26,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30009,201903,100,26,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30010,201901,100,144,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30010,201902,100,144,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30010,201903,100,144,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30011,201901,100,5,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30011,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30011,201903,100,5,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30012,201901,100,275,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30012,201902,100,275,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30012,201903,100,275,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
index 430292b1..f4a7b4aa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
@@ -1,37 +1,37 @@
-identifier,date,group,question,other,previous_forward,previous_backward,previous_construction
-30001,202001,100,8444,0,,2.656680299,101.7103175
-30001,202002,100,7476,0,0.771850199,1.13167173,74.91666667
-30001,202003,100,2003,0,0.968230653,,70.26136364
-30002,202001,100,9343,0,,2.656680299,101.7103175
-30002,202002,100,7818,0,0.771850199,1.13167173,74.91666667
-30002,202003,100,4897,0,0.968230653,,70.26136364
-30003,202001,100,7511,0,,2.656680299,101.7103175
-30003,202002,100,1761,0,0.771850199,1.13167173,74.91666667
-30003,202003,100,6492,0,0.968230653,,70.26136364
-30004,202001,100,64,0,,2.656680299,101.7103175
-30004,202002,100,2113,0,0.771850199,1.13167173,74.91666667
-30004,202003,100,185,0,0.968230653,,70.26136364
-30005,202001,100,844,0,,2.656680299,101.7103175
-30005,202002,100,897,0,0.771850199,1.13167173,74.91666667
-30005,202003,100,280,0,0.968230653,,70.26136364
-30006,202001,100,1869,0,,2.656680299,101.7103175
-30006,202002,100,1876,0,0.771850199,1.13167173,74.91666667
-30006,202003,100,1371,0,0.968230653,,70.26136364
-30007,202001,100,12769,0,,2.656680299,101.7103175
-30007,202002,100,2853,0,0.771850199,1.13167173,74.91666667
-30007,202003,100,11491,0,0.968230653,,70.26136364
-30008,202001,100,141,0,,2.656680299,101.7103175
-30008,202002,100,6001,0,0.771850199,1.13167173,74.91666667
-30008,202003,100,433,0,0.968230653,,70.26136364
-30009,202001,100,6417,0,,2.656680299,101.7103175
-30009,202002,100,4037,0,0.771850199,1.13167173,74.91666667
-30009,202003,100,1322,0,0.968230653,,70.26136364
-30010,202001,100,28963,0,,2.656680299,101.7103175
-30010,202002,100,21734,0,0.771850199,1.13167173,74.91666667
-30010,202003,100,10529,0,0.968230653,,70.26136364
-30011,202001,100,6009,0,,2.656680299,101.7103175
-30011,202002,100,1145,0,0.771850199,1.13167173,74.91666667
-30011,202003,100,5064,0,0.968230653,,70.26136364
-30012,202001,100,256,0,,2.656680299,101.7103175
-30012,202002,100,7522,0,0.771850199,1.13167173,74.91666667
-30012,202003,100,,0,0.968230653,,70.26136364
+identifier,date,group,question,other
+30001,202001,100,8444,0
+30001,202002,100,7476,0
+30001,202003,100,2003,0
+30002,202001,100,9343,0
+30002,202002,100,7818,0
+30002,202003,100,4897,0
+30003,202001,100,7511,0
+30003,202002,100,1761,0
+30003,202003,100,6492,0
+30004,202001,100,64,0
+30004,202002,100,2113,0
+30004,202003,100,185,0
+30005,202001,100,844,0
+30005,202002,100,897,0
+30005,202003,100,280,0
+30006,202001,100,1869,0
+30006,202002,100,1876,0
+30006,202003,100,1371,0
+30007,202001,100,12769,0
+30007,202002,100,2853,0
+30007,202003,100,11491,0
+30008,202001,100,141,0
+30008,202002,100,6001,0
+30008,202003,100,433,0
+30009,202001,100,6417,0
+30009,202002,100,4037,0
+30009,202003,100,1322,0
+30010,202001,100,28963,0
+30010,202002,100,21734,0
+30010,202003,100,10529,0
+30011,202001,100,6009,0
+30011,202002,100,1145,0
+30011,202003,100,5064,0
+30012,202001,100,256,0
+30012,202002,100,7522,0
+30012,202003,100,,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index dbff450e..c1eb28fc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -1,37 +1,73 @@
-identifier,date,group,other,previous_forward,previous_backward,previous_construction,growth_forward,growth_backward,forward,backward,construction,weighted_forward,weighted_backward,weighted_construction,output,marker,count_forward,count_backward,count_construction,default_construction_link,growth_forward_trimmed_marker,growth_backward_trimmed_marker,filtered_marker
-30001,202001,100,0,,2.656680299,101.7103175,,,1,1,1,,1.82834015,51.35515875,8444,R,0,0,9,TRUE,,,TRUE
-30001,202002,100,0,0.771850199,1.13167173,74.91666667,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,TRUE,,,TRUE
-30001,202003,100,0,0.968230653,,70.26136364,,,1,1,1,0.984115327,,35.63068182,2003,R,0,0,10,TRUE,,,TRUE
-30002,202001,100,0,,2.656680299,101.7103175,,,1,1,1,,1.82834015,51.35515875,9343,R,0,0,9,TRUE,,,TRUE
-30002,202002,100,0,0.771850199,1.13167173,74.91666667,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,TRUE,,,TRUE
-30002,202003,100,0,0.968230653,,70.26136364,,,1,1,1,0.984115327,,35.63068182,4897,R,0,0,10,TRUE,,,TRUE
-30003,202001,100,0,,2.656680299,101.7103175,,4.265190233,1,1,1,,1.82834015,51.35515875,7511,R,0,0,9,TRUE,,TRUE,
-30003,202002,100,0,0.771850199,1.13167173,74.91666667,0.234456131,0.271256932,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,TRUE,TRUE,TRUE,
-30003,202003,100,0,0.968230653,,70.26136364,3.686541738,,1,1,1,0.984115327,,35.63068182,6492,R,0,0,10,TRUE,TRUE,,
-30004,202001,100,0,,2.656680299,101.7103175,,0.030288689,1,1,1,,1.82834015,51.35515875,64,R,0,0,9,TRUE,,TRUE,
-30004,202002,100,0,0.771850199,1.13167173,74.91666667,33.015625,11.42162162,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,TRUE,TRUE,TRUE,
-30004,202003,100,0,0.968230653,,70.26136364,0.087553242,,1,1,1,0.984115327,,35.63068182,185,R,0,0,10,TRUE,TRUE,,
-30005,202001,100,0,,2.656680299,101.7103175,,0.941234172,1,1,1,,1.82834015,51.35515875,844,R,0,0,9,TRUE,,TRUE,
-30005,202002,100,0,0.771850199,1.13167173,74.91666667,1.062434865,3.199201198,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,TRUE,TRUE,TRUE,
-30005,202003,100,0,0.968230653,,70.26136364,0.312578027,,1,1,1,0.984115327,,35.63068182,280,R,0,0,10,TRUE,TRUE,,
-30006,202001,100,0,,2.656680299,101.7103175,,0.995885563,1,1,1,,1.82834015,51.35515875,1869,R,0,0,9,TRUE,,TRUE,
-30006,202002,100,0,0.771850199,1.13167173,74.91666667,1.004131435,1.368417982,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,TRUE,TRUE,TRUE,
-30006,202003,100,0,0.968230653,,70.26136364,0.730770871,,1,1,1,0.984115327,,35.63068182,1371,R,0,0,10,TRUE,TRUE,,
-30007,202001,100,0,,2.656680299,101.7103175,,4.475816911,1,1,1,,1.82834015,51.35515875,12769,R,0,0,9,TRUE,,TRUE,
-30007,202002,100,0,0.771850199,1.13167173,74.91666667,0.223422901,0.248269056,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,TRUE,TRUE,TRUE,
-30007,202003,100,0,0.968230653,,70.26136364,4.027888195,,1,1,1,0.984115327,,35.63068182,11491,R,0,0,10,TRUE,TRUE,,
-30008,202001,100,0,,2.656680299,101.7103175,,0.023463069,1,1,1,,1.82834015,51.35515875,141,R,0,0,9,TRUE,,TRUE,
-30008,202002,100,0,0.771850199,1.13167173,74.91666667,42.62017045,13.86213906,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,TRUE,TRUE,TRUE,
-30008,202003,100,0,0.968230653,,70.26136364,0.072138939,,1,1,1,0.984115327,,35.63068182,433,R,0,0,10,TRUE,TRUE,,
-30009,202001,100,0,,2.656680299,101.7103175,,1.589639934,1,1,1,,1.82834015,51.35515875,6417,R,0,0,9,TRUE,,TRUE,
-30009,202002,100,0,0.771850199,1.13167173,74.91666667,0.629073275,3.053782962,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,TRUE,TRUE,TRUE,
-30009,202003,100,0,0.968230653,,70.26136364,0.327462695,,1,1,1,0.984115327,,35.63068182,1322,R,0,0,10,TRUE,TRUE,,
-30010,202001,100,0,,2.656680299,101.7103175,,,1,1,1,,1.82834015,51.35515875,28963,R,0,0,9,TRUE,,,TRUE
-30010,202002,100,0,0.771850199,1.13167173,74.91666667,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,TRUE,,,TRUE
-30010,202003,100,0,0.968230653,,70.26136364,,,1,1,1,0.984115327,,35.63068182,10529,R,0,0,10,TRUE,,,TRUE
-30011,202001,100,0,,2.656680299,101.7103175,,5.249464902,1,1,1,,1.82834015,51.35515875,6009,R,0,0,9,TRUE,,TRUE,
-30011,202002,100,0,0.771850199,1.13167173,74.91666667,0.190495606,0.226047443,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,TRUE,TRUE,TRUE,
-30011,202003,100,0,0.968230653,,70.26136364,4.423850085,,1,1,1,0.984115327,,35.63068182,5064,R,0,0,10,TRUE,TRUE,,
-30012,202001,100,0,,2.656680299,101.7103175,,0.034032235,1,1,1,,1.82834015,51.35515875,256,R,0,0,9,TRUE,,TRUE,
-30012,202002,100,0,0.771850199,1.13167173,74.91666667,29.38390625,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,TRUE,TRUE,,
-30012,202003,100,0,0.968230653,,70.26136364,,,1,1,1,0.984115327,,35.63068182,7402.515486,FIR,0,0,10,TRUE,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,8444,R,0,0,9,false,true,false,1,1,1
+30001,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,false,false,false,1,1,1
+30001,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,2003,R,0,0,10,false,false,true,1,1,1
+30002,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,9343,R,0,0,9,false,true,false,1,1,1
+30002,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,false,false,false,1,1,1
+30002,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,4897,R,0,0,10,false,false,true,1,1,1
+30003,202001,100,0,,4.265190233,1,1,1,1,1.82834015,51.35515875,7511,R,0,0,9,true,true,true,1,1,1
+30003,202002,100,0,0.234456131,0.271256932,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,true,true,true,1,1,1
+30003,202003,100,0,3.686541738,,1,1,1,0.984115327,1,35.63068182,6492,R,0,0,10,true,true,true,1,1,1
+30004,202001,100,0,,0.030288689,1,1,1,1,1.82834015,51.35515875,64,R,0,0,9,true,true,true,1,1,1
+30004,202002,100,0,33.015625,11.42162162,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,true,true,true,1,1,1
+30004,202003,100,0,0.087553242,,1,1,1,0.984115327,1,35.63068182,185,R,0,0,10,true,true,true,1,1,1
+30005,202001,100,0,,0.941234172,1,1,1,1,1.82834015,51.35515875,844,R,0,0,9,true,true,true,1,1,1
+30005,202002,100,0,1.062434865,3.199201198,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,true,true,true,1,1,1
+30005,202003,100,0,0.312578027,,1,1,1,0.984115327,1,35.63068182,280,R,0,0,10,true,true,true,1,1,1
+30006,202001,100,0,,0.995885563,1,1,1,1,1.82834015,51.35515875,1869,R,0,0,9,true,true,true,1,1,1
+30006,202002,100,0,1.004131435,1.368417982,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,true,true,true,1,1,1
+30006,202003,100,0,0.730770871,,1,1,1,0.984115327,1,35.63068182,1371,R,0,0,10,true,true,true,1,1,1
+30007,202001,100,0,,4.475816911,1,1,1,1,1.82834015,51.35515875,12769,R,0,0,9,true,true,true,1,1,1
+30007,202002,100,0,0.223422901,0.248269056,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,true,true,true,1,1,1
+30007,202003,100,0,4.027888195,,1,1,1,0.984115327,1,35.63068182,11491,R,0,0,10,true,true,true,1,1,1
+30008,202001,100,0,,0.023463069,1,1,1,1,1.82834015,51.35515875,141,R,0,0,9,true,true,true,1,1,1
+30008,202002,100,0,42.62017045,13.86213906,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,true,true,true,1,1,1
+30008,202003,100,0,0.072138939,,1,1,1,0.984115327,1,35.63068182,433,R,0,0,10,true,true,true,1,1,1
+30009,202001,100,0,,1.589639934,1,1,1,1,1.82834015,51.35515875,6417,R,0,0,9,true,true,true,1,1,1
+30009,202002,100,0,0.629073275,3.053782962,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,true,true,true,1,1,1
+30009,202003,100,0,0.327462695,,1,1,1,0.984115327,1,35.63068182,1322,R,0,0,10,true,true,true,1,1,1
+30010,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,28963,R,0,0,9,false,true,false,1,1,1
+30010,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,false,false,false,1,1,1
+30010,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,10529,R,0,0,10,false,false,true,1,1,1
+30011,202001,100,0,,5.249464902,1,1,1,1,1.82834015,51.35515875,6009,R,0,0,9,true,true,true,1,1,1
+30011,202002,100,0,0.190495606,0.226047443,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,true,true,true,1,1,1
+30011,202003,100,0,4.423850085,,1,1,1,0.984115327,1,35.63068182,5064,R,0,0,10,true,true,true,1,1,1
+30012,202001,100,0,,0.034032235,1,1,1,1,1.82834015,51.35515875,256,R,0,0,9,true,true,true,1,1,1
+30012,202002,100,0,29.38390625,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,true,true,true,1,1,1
+30012,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,7402.515486,FIR,0,0,10,,,,1,1,1
+30001,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30001,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30001,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30002,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30002,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30002,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30003,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30003,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30003,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30004,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30004,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30004,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30005,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30005,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30005,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30006,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30006,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30006,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30007,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30007,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30007,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30008,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30008,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30008,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30009,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30009,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30009,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30010,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30010,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30010,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30011,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30011,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30011,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+30012,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
+30012,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
+30012,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index 598f959e..bf85295f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,FALSE,FALSE,FALSE,FALSE
-160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,FALSE,FALSE,FALSE,FALSE
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,FALSE,FALSE,FALSE,FALSE
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,FALSE,FALSE,FALSE,FALSE
-160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,FALSE,FALSE,FALSE,FALSE
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,FALSE,FALSE,FALSE,FALSE
-160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,FALSE,FALSE,FALSE,FALSE
-160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,FALSE,FALSE,FALSE,FALSE
-160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,FALSE,FALSE,FALSE,FALSE
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,FALSE,FALSE,FALSE,FALSE
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,FALSE,FALSE,FALSE,FALSE
-160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,FALSE,FALSE,FALSE,FALSE
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,FALSE,FALSE,FALSE,FALSE
-160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,FALSE,FALSE,FALSE,FALSE
-160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,FALSE,FALSE,FALSE,FALSE
-160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,FALSE,FALSE,FALSE,FALSE
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,FALSE,FALSE,FALSE,FALSE
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,FALSE,FALSE,FALSE,FALSE
-160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,FALSE,FALSE,FALSE,FALSE
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,FALSE,FALSE,FALSE,FALSE
-160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,FALSE,FALSE,FALSE,FALSE
-160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,FALSE,FALSE,FALSE,FALSE
-160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,FALSE,FALSE,FALSE,FALSE
-160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,FALSE,FALSE,FALSE,FALSE
-160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,FALSE,FALSE,FALSE,FALSE
-160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,FALSE,FALSE,FALSE,FALSE
-160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,FALSE,FALSE,FALSE,FALSE
-160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,FALSE,FALSE,FALSE,FALSE
-160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,,,,
-160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,,,,
-160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,FALSE,FALSE,FALSE,FALSE
-160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,,,,
-160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,,,,
-160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,false,false,true,true,true,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,false,false,true,true,true,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,false,false,true,true,true,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,false,false,true,true,true,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,false,false,true,true,true,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,false,false,true,true,true,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,false,false,true,true,true,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,false,false,true,true,true,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,false,false,true,true,true,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,false,false,true,true,true,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,false,false,true,true,true,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,false,false,true,true,true,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,false,false,true,true,true,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,false,false,true,true,true,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,false,false,true,true,true,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,false,false,true,true,true,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,false,false,true,true,true,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,false,false,true,true,true,false,true,false
+160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,false,false,true,true,true,true,false,false
+160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,false,false,true,true,true,false,false,false
+160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
+160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,false,false,true,true,true,false,false,false
+160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,false,false,true,true,true,false,false,false
+160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,false,false,true,true,true,false,false,false
+160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,false,false,true,true,true,false,true,false
+160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,,,,,,true,false,false
+160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,,,,,,false,false,false
+160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
+160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,,,,,,false,false,false
+160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,,,,,,false,false,false
+160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index 562f0edf..1a2a5640 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,filtered_forward,filtered_backward,trimmed_forward,trimmed_backward
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,FALSE,FALSE,FALSE,FALSE
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,FALSE,FALSE,FALSE,FALSE
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,FALSE,FALSE,FALSE,FALSE
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,FALSE,FALSE,FALSE,FALSE
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,FALSE,FALSE,FALSE,FALSE
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,FALSE,FALSE,FALSE,FALSE
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,FALSE,FALSE,FALSE,FALSE
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,FALSE,FALSE,FALSE,FALSE
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,FALSE,FALSE,FALSE,FALSE
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,FALSE,FALSE,FALSE,FALSE
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,FALSE,FALSE,FALSE,FALSE
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,FALSE,FALSE,FALSE,FALSE
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,FALSE,FALSE,FALSE,FALSE
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,FALSE,FALSE,FALSE,FALSE
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,FALSE,FALSE,FALSE,FALSE
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,FALSE,FALSE,FALSE,FALSE
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,FALSE,FALSE,FALSE,FALSE
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,FALSE,FALSE,FALSE,FALSE
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,FALSE,FALSE,FALSE,FALSE
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,FALSE,FALSE,FALSE,FALSE
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,FALSE,FALSE,FALSE,FALSE
-160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,FALSE,FALSE,FALSE,FALSE
-160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,FALSE,FALSE,FALSE,FALSE
-160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,FALSE,FALSE,FALSE,FALSE
-160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,FALSE,FALSE,FALSE,FALSE
-160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,FALSE,FALSE,FALSE,FALSE
-160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,FALSE,FALSE,FALSE,FALSE
-160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,FALSE,FALSE,FALSE,FALSE
-160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,,,,
-160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,,,,
-160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,FALSE,FALSE,FALSE,FALSE
-160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,,,,
-160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,,,,
-160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,false,false,true,true,true
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,false,false,true,true,true
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,false,false,true,true,true
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,false,false,true,true,true
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,false,false,true,true,true
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,false,false,true,true,true
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,false,false,true,true,true
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,false,false,true,true,true
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,false,false,true,true,true
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,false,false,true,true,true
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,false,false,true,true,true
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,false,false,true,true,true
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,false,false,true,true,true
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,false,false,true,true,true
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,false,false,true,true,true
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,false,false,true,true,true
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,false,false,true,true,true
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,false,false,true,true,true
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,false,false,true,true,true
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,false,false,true,true,true
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,false,false,true,true,true
+160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,false,false,true,true,true
+160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,true,true,true
+160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,true,true,true
+160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,false,false,true,true,true
+160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,true,true,true
+160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,true,true,true
+160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,false,false,true,true,true
+160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,,,,,
+160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,,,,,
+160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,,,true,true,true
+160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,,,,,
+160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,,,,,
+160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
index f01e987b..a6a10d8f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,filtered_marker,forward_filter,backward_filter
-70001,202001,100,39,,3.280595369,1,47.92201545,107.48,5951,R,0,3,3,,,
-70001,202002,100,39,0.304822719,,0.521730457,0.718061822,54.70285714,1814,R,3,2,3,,,TRUE
-70001,202003,100,39,,,56.19409367,0.668609812,120.084507,734,R,2,2,3,TRUE,,
-70001,202004,100,39,,,1.506633706,1.000630631,93.18857143,96,R,2,2,3,,TRUE,TRUE
-70001,202005,100,39,,,1.001786141,2.356922504,119.8970588,9086,R,2,2,2,TRUE,,
-70001,202006,100,39,,80.59183673,0.548881634,27.65768328,106.7900552,3949,R,2,3,4,,TRUE,
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,49,R,3,0,3,,,
-70002,202001,100,94,,139.6875,1,47.92201545,107.48,6705,R,0,3,3,,,
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,0.718061822,54.70285714,48,R,3,2,3,,,
-70002,202003,100,94,111.6875,0.611497662,56.19409367,0.668609812,120.084507,5361,R,2,2,3,,,
-70002,202004,100,94,1.63532923,0.951486868,1.506633706,1.000630631,93.18857143,8767,R,2,2,3,,,
-70002,202005,100,94,1.050986654,1.23396277,1.001786141,2.356922504,119.8970588,9214,R,2,2,2,,,
-70002,202006,100,94,0.810397222,2.148776978,0.548881634,27.65768328,106.7900552,7467,R,2,3,4,,,
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,3475,R,3,0,3,,,
-70003,202001,100,42,,0.797950979,1,47.92201545,107.48,6153,R,0,3,3,,,
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,0.718061822,54.70285714,7711,R,3,2,3,,,
-70003,202003,100,42,0.70068733,0.725721961,56.19409367,0.668609812,120.084507,5403,R,2,2,3,,,
-70003,202004,100,42,1.377938182,1.049774394,1.506633706,1.000630631,93.18857143,7445,R,2,2,3,,,
-70003,202005,100,42,0.952585628,3.479882237,1.001786141,2.356922504,119.8970588,7092,R,2,2,2,,,
-70003,202006,100,42,0.287366046,0.232436131,0.548881634,27.65768328,106.7900552,2038,R,2,3,4,,,
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,8768,R,3,0,3,,,
-70004,202001,100,6,,,1,47.92201545,107.48,216376.177660,BI,0,3,3,,,
-70004,202002,100,6,,,0.521730457,0.718061822,54.70285714,4515.172737,BI,3,2,3,,,
-70004,202003,100,6,,,56.19409367,0.668609812,120.084507,6288,R,2,2,3,,,
-70004,202004,100,6,,,1.506633706,1.000630631,93.18857143,9473.712744,FIR,2,2,3,,,
-70004,202005,100,6,,,1.001786141,2.356922504,119.8970588,9490.634133,FIR,2,2,2,,,
-70004,202006,100,6,,,0.548881634,27.65768328,106.7900552,5875,R,2,3,4,,,
-70004,202007,100,6,,,1.593348776,1,70.24,9360.924061,FIR,3,0,3,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+70001,202001,100,39,,3.280595369,1,47.92201545,107.48,5951,R,0,3,3,false,false,true,true,true,true,false,false
+70001,202002,100,39,0.304822719,,0.521730457,0.718061822,54.70285714,1814,R,3,2,3,false,false,true,true,false,false,false,false
+70001,202003,100,39,,,56.19409367,0.668609812,120.084507,734,R,2,2,3,false,false,false,true,true,false,false,false
+70001,202004,100,39,,,1.506633706,1.000630631,93.18857143,96,R,2,2,3,false,false,true,false,false,false,false,false
+70001,202005,100,39,,,1.001786141,2.356922504,119.8970588,9086,R,2,2,2,false,false,false,true,true,false,false,false
+70001,202006,100,39,,80.59183673,0.548881634,27.65768328,106.7900552,3949,R,2,3,4,false,false,true,false,true,false,false,false
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,49,R,3,0,3,false,false,true,true,true,false,true,false
+70002,202001,100,94,,139.6875,1,47.92201545,107.48,6705,R,0,3,3,false,false,true,true,true,true,false,false
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,0.718061822,54.70285714,48,R,3,2,3,false,false,true,true,true,false,false,false
+70002,202003,100,94,111.6875,0.611497662,56.19409367,0.668609812,120.084507,5361,R,2,2,3,false,false,true,true,true,false,false,false
+70002,202004,100,94,1.63532923,0.951486868,1.506633706,1.000630631,93.18857143,8767,R,2,2,3,false,false,true,true,true,false,false,false
+70002,202005,100,94,1.050986654,1.23396277,1.001786141,2.356922504,119.8970588,9214,R,2,2,2,false,false,true,true,true,false,false,false
+70002,202006,100,94,0.810397222,2.148776978,0.548881634,27.65768328,106.7900552,7467,R,2,3,4,false,false,true,true,true,false,false,false
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,3475,R,3,0,3,false,false,true,true,true,false,true,false
+70003,202001,100,42,,0.797950979,1,47.92201545,107.48,6153,R,0,3,3,false,false,true,true,true,true,false,false
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,0.718061822,54.70285714,7711,R,3,2,3,false,false,true,true,true,false,false,false
+70003,202003,100,42,0.70068733,0.725721961,56.19409367,0.668609812,120.084507,5403,R,2,2,3,false,false,true,true,true,false,false,false
+70003,202004,100,42,1.377938182,1.049774394,1.506633706,1.000630631,93.18857143,7445,R,2,2,3,false,false,true,true,true,false,false,false
+70003,202005,100,42,0.952585628,3.479882237,1.001786141,2.356922504,119.8970588,7092,R,2,2,2,false,false,true,true,true,false,false,false
+70003,202006,100,42,0.287366046,0.232436131,0.548881634,27.65768328,106.7900552,2038,R,2,3,4,false,false,true,true,true,false,false,false
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,8768,R,3,0,3,false,false,true,true,true,false,true,false
+70004,202001,100,6,,,1,47.92201545,107.48,216376.17766,BI,0,3,3,,,,,,true,false,false
+70004,202002,100,6,,,0.521730457,0.718061822,54.70285714,4515.172737,BI,3,2,3,,,,,,false,false,false
+70004,202003,100,6,,,56.19409367,0.668609812,120.084507,6288,R,2,2,3,false,false,true,true,true,false,false,false
+70004,202004,100,6,,,1.506633706,1.000630631,93.18857143,9473.712744,FIR,2,2,3,,,,,,false,false,false
+70004,202005,100,6,,,1.001786141,2.356922504,119.8970588,9490.634133,FIR,2,2,2,,,,,,false,false,false
+70004,202006,100,6,,,0.548881634,27.65768328,106.7900552,5875,R,2,3,4,false,false,true,true,true,false,false,false
+70004,202007,100,6,,,1.593348776,1,70.24,9360.924061,FIR,3,0,3,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index e1c39dd5..42bc7a73 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false,false
-10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false,false
-10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false,true
+10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false,true
+10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false,true
 10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,true,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index 6993d3cc..24f2c6e3 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false,false
-20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false,false
-20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false,false
-20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,true,false,false
-20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,true,false,false,false
-20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false,true
+20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false,true
+20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false,true
+20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,true,false,true
+20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,true,false,false,true
+20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,true,false,true
 20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,true,false,false,
 20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index 072191f9..bc13ef47 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false,false
-30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
-30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false,false
-30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4,true,false,false,false
-30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
-30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3,false,true,false,false
-30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4,true,false,false,false
-30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
-30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,true,false,false
-30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,true,false,false,false
-30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false,true
+30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,true
+30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false,true
+30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4,true,false,false,true
+30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,true
+30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3,false,true,false,true
+30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4,true,false,false,true
+30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,true
+30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,true,false,true
+30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,true,false,false,true
+30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,true
 30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index f0c91c6c..f6de48e5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-40001,202001,100,35,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false,false
-40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
-40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
-40001,202004,100,35,4911,R,0.637121844,1,73.71052632,3,0,3,false,true,false,false
-40002,202001,100,63,2095,R,1,1.060305409,128.0208333,0,4,4,true,false,false,false
-40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
-40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
-40002,202004,100,63,2115,R,0.637121844,1,73.71052632,3,0,3,false,true,false,false
-40003,202001,100,16,7863,R,1,1.060305409,128.0208333,0,4,4,true,false,false,false
-40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
-40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,false
-40003,202004,100,16,1377,R,0.637121844,1,73.71052632,3,0,3,false,true,false,false
-40004,202001,100,78,5131,R,1,1.060305409,128.0208333,0,4,4,true,false,false,false
-40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+40001,202001,100,35,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false,true
+40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,true
+40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,true
+40001,202004,100,35,4911,R,0.637121844,1,73.71052632,3,0,3,false,true,false,true
+40002,202001,100,63,2095,R,1,1.060305409,128.0208333,0,4,4,true,false,false,true
+40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,true
+40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,true
+40002,202004,100,63,2115,R,0.637121844,1,73.71052632,3,0,3,false,true,false,true
+40003,202001,100,16,7863,R,1,1.060305409,128.0208333,0,4,4,true,false,false,true
+40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,true
+40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,true
+40003,202004,100,16,1377,R,0.637121844,1,73.71052632,3,0,3,false,true,false,true
+40004,202001,100,78,5131,R,1,1.060305409,128.0208333,0,4,4,true,false,false,true
+40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,true
 40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,
 40004,202004,100,78,6193.009741,FIR,0.637121844,1,73.71052632,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 53277b16..9b2812e2 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-50001,202010,100,59,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false,false
-50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
-50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
-50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
-50001,202102,100,59,4687,R,0.481224628,1,49.9122807,3,0,3,false,true,false,false
-50002,202010,100,36,4851,R,1,0.659160839,70.34328358,0,4,4,true,false,false,false
-50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
-50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
-50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
-50002,202102,100,36,2327,R,0.481224628,1,49.9122807,3,0,3,false,true,false,false
-50003,202010,100,76,2238,R,1,0.659160839,70.34328358,0,4,4,true,false,false,false
-50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
-50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,false
-50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,false
-50003,202102,100,76,1521,R,0.481224628,1,49.9122807,3,0,3,false,true,false,false
-50004,202010,100,30,688,R,1,0.659160839,70.34328358,0,4,4,true,false,false,false
-50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+50001,202010,100,59,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false,true
+50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,true
+50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,true
+50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,true
+50001,202102,100,59,4687,R,0.481224628,1,49.9122807,3,0,3,false,true,false,true
+50002,202010,100,36,4851,R,1,0.659160839,70.34328358,0,4,4,true,false,false,true
+50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,true
+50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,true
+50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,true
+50002,202102,100,36,2327,R,0.481224628,1,49.9122807,3,0,3,false,true,false,true
+50003,202010,100,76,2238,R,1,0.659160839,70.34328358,0,4,4,true,false,false,true
+50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,true
+50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,true
+50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,true
+50003,202102,100,76,1521,R,0.481224628,1,49.9122807,3,0,3,false,true,false,true
+50004,202010,100,30,688,R,1,0.659160839,70.34328358,0,4,4,true,false,false,true
+50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,true
 50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,
 50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,
 50004,202102,100,30,1521.344411,FIR,0.481224628,1,49.9122807,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index 7fd1fada..b80ed2d7 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-60001,202001,100,15,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false,false
-60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
-60001,202003,100,15,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
-60002,202001,100,71,1588,R,1,1.408039237,117.9107143,0,3,3,true,false,false,false
-60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
-60002,202003,100,71,3807,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
-60003,202001,100,26,6541,R,1,1.408039237,117.9107143,0,3,3,true,false,false,false
-60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,false
-60003,202003,100,26,6351,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+60001,202001,100,15,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false,true
+60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,true
+60001,202003,100,15,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false,true
+60002,202001,100,71,1588,R,1,1.408039237,117.9107143,0,3,3,true,false,false,true
+60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,true
+60002,202003,100,71,3807,R,1.194583644,1,100.913043,3,0,4,false,true,false,true
+60003,202001,100,26,6541,R,1,1.408039237,117.9107143,0,3,3,true,false,false,true
+60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,true
+60003,202003,100,26,6351,R,1.194583644,1,100.913043,3,0,4,false,true,false,true
 60004,202001,100,3,472.653159,BI,1,1.408039237,117.9107143,0,3,3,true,false,false,
 60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,
-60004,202003,100,3,401,R,1.194583644,1,100.913043,3,0,4,false,true,false,false
+60004,202003,100,3,401,R,1.194583644,1,100.913043,3,0,4,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index d855f014..46c14ad3 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-70001,202001,100,39,5951,R,1,1.964796824,107.48,0,3,3,true,false,false,false
-70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
-70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
-70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
-70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
-70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
-70001,202007,100,39,49,R,0.913631634,1,70.24,3,0,3,false,true,false,false
-70002,202001,100,94,6705,R,1,1.964796824,107.48,0,3,3,true,false,false,false
-70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
-70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
-70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
-70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
-70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
-70002,202007,100,94,3475,R,0.913631634,1,70.24,3,0,3,false,true,false,false
-70003,202001,100,42,6153,R,1,1.964796824,107.48,0,3,3,true,false,false,false
-70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,false
-70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
-70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,false
-70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,false
-70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
-70003,202007,100,42,8768,R,0.913631634,1,70.24,3,0,3,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+70001,202001,100,39,5951,R,1,1.964796824,107.48,0,3,3,true,false,false,true
+70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,true
+70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,true
+70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,true
+70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,true
+70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,true
+70001,202007,100,39,49,R,0.913631634,1,70.24,3,0,3,false,true,false,true
+70002,202001,100,94,6705,R,1,1.964796824,107.48,0,3,3,true,false,false,true
+70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,true
+70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,true
+70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,true
+70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,true
+70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,true
+70002,202007,100,94,3475,R,0.913631634,1,70.24,3,0,3,false,true,false,true
+70003,202001,100,42,6153,R,1,1.964796824,107.48,0,3,3,true,false,false,true
+70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,true
+70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,true
+70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,true
+70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,true
+70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,true
+70003,202007,100,42,8768,R,0.913631634,1,70.24,3,0,3,false,true,false,true
 70004,202001,100,6,10286.222995,BI,1,1.964796824,107.48,0,3,3,true,false,false,
 70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,
-70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,false
+70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,true
 70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,
 70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,
-70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,false
+70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,true
 70004,202007,100,6,5367.585848,FIR,0.913631634,1,70.24,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
index 032b7203..945a24bf 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-80001,202001,100,91,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false,false
-80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
-80001,202003,100,91,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false,false
-80002,202001,100,85,7138,R,1,1.646151294,69.14982578,0,4,4,true,false,false,false
-80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
-80002,202003,100,85,2746,R,1.711844725,1,71.90940767,4,0,4,false,true,false,false
-80003,202001,100,41,2846,R,1,1.646151294,69.14982578,0,4,4,true,false,false,false
-80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
-80003,202003,100,41,9015,R,1.711844725,1,71.90940767,4,0,4,false,true,false,false
-80004,202001,100,70,5820,R,1,1.646151294,69.14982578,0,4,4,true,false,false,false
-80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,false
-80004,202003,100,70,8233,R,1.711844725,1,71.90940767,4,0,4,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+80001,202001,100,91,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false,true
+80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,true
+80001,202003,100,91,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false,true
+80002,202001,100,85,7138,R,1,1.646151294,69.14982578,0,4,4,true,false,false,true
+80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,true
+80002,202003,100,85,2746,R,1.711844725,1,71.90940767,4,0,4,false,true,false,true
+80003,202001,100,41,2846,R,1,1.646151294,69.14982578,0,4,4,true,false,false,true
+80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,true
+80003,202003,100,41,9015,R,1.711844725,1,71.90940767,4,0,4,false,true,false,true
+80004,202001,100,70,5820,R,1,1.646151294,69.14982578,0,4,4,true,false,false,true
+80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,true
+80004,202003,100,70,8233,R,1.711844725,1,71.90940767,4,0,4,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index 1b1377eb..bb13ba12 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-90001,202001,100,66,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false,false
-90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
-90001,202003,100,66,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false,false
-90002,202001,100,27,1706,R,1,0.294381131,71.77777778,0,3,4,true,false,false,false
-90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
-90002,202003,100,27,8390,R,1.027612406,1,169.3831776,3,0,3,false,true,false,false
-90003,202001,100,14,1069,R,1,0.294381131,71.77777778,0,3,4,true,false,false,false
-90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,false
-90003,202003,100,14,2415,R,1.027612406,1,169.3831776,3,0,3,false,true,false,false
-90004,202001,100,73,7728,R,1,0.294381131,71.77777778,0,3,4,true,false,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+90001,202001,100,66,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false,true
+90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,true
+90001,202003,100,66,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false,true
+90002,202001,100,27,1706,R,1,0.294381131,71.77777778,0,3,4,true,false,false,true
+90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,true
+90002,202003,100,27,8390,R,1.027612406,1,169.3831776,3,0,3,false,true,false,true
+90003,202001,100,14,1069,R,1,0.294381131,71.77777778,0,3,4,true,false,false,true
+90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,true
+90003,202003,100,14,2415,R,1.027612406,1,169.3831776,3,0,3,false,true,false,true
+90004,202001,100,73,7728,R,1,0.294381131,71.77777778,0,3,4,true,false,false,true
 90004,202003,100,73,12364.971963,C,1.027612406,1,169.3831776,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index 5847d1f6..4a3d7b94 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-100001,202001,100,26,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false,false
-100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
-100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
-100001,202004,100,26,3540,R,3.027849407,1,119.1751412,3,0,4,false,true,false,false
-100002,202001,100,19,8084,R,1,1.046156805,179.3296703,0,3,3,true,false,false,false
-100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
-100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
-100002,202004,100,19,5608,R,3.027849407,1,119.1751412,3,0,4,false,true,false,false
-100003,202001,100,46,5161,R,1,1.046156805,179.3296703,0,3,3,true,false,false,false
-100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,false
-100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,false
-100003,202004,100,46,2594,R,3.027849407,1,119.1751412,3,0,4,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+100001,202001,100,26,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false,true
+100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,true
+100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,true
+100001,202004,100,26,3540,R,3.027849407,1,119.1751412,3,0,4,false,true,false,true
+100002,202001,100,19,8084,R,1,1.046156805,179.3296703,0,3,3,true,false,false,true
+100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,true
+100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,true
+100002,202004,100,19,5608,R,3.027849407,1,119.1751412,3,0,4,false,true,false,true
+100003,202001,100,46,5161,R,1,1.046156805,179.3296703,0,3,3,true,false,false,true
+100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,true
+100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,true
+100003,202004,100,46,2594,R,3.027849407,1,119.1751412,3,0,4,false,true,false,true
 100004,202001,100,86,15422.351648,C,1,1.046156805,179.3296703,0,3,3,true,false,false,
 100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,
-100004,202004,100,86,9352,R,3.027849407,1,119.1751412,3,0,4,false,true,false,false
+100004,202004,100,86,9352,R,3.027849407,1,119.1751412,3,0,4,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 82055363..5306afc0 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-110001,202001,100,89,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false,false
-110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
-110001,202003,100,89,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false,false
-110002,202001,100,83,4826,R,1,1.357646062,101.710317,0,4,4,true,false,false,false
-110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
-110002,202003,100,83,4743,R,0.780928323,1,70.26136364,3,0,3,false,true,false,false
-110003,202001,100,4,7586,R,1,1.357646062,101.710317,0,4,4,true,false,false,false
-110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
-110003,202003,100,4,1429,R,0.780928323,1,70.26136364,3,0,3,false,true,false,false
-110004,202001,100,76,3975,R,1,1.357646062,101.710317,0,4,4,true,false,false,false
-110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+110001,202001,100,89,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false,true
+110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,true
+110001,202003,100,89,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false,true
+110002,202001,100,83,4826,R,1,1.357646062,101.710317,0,4,4,true,false,false,true
+110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,true
+110002,202003,100,83,4743,R,0.780928323,1,70.26136364,3,0,3,false,true,false,true
+110003,202001,100,4,7586,R,1,1.357646062,101.710317,0,4,4,true,false,false,true
+110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,true
+110003,202003,100,4,1429,R,0.780928323,1,70.26136364,3,0,3,false,true,false,true
+110004,202001,100,76,3975,R,1,1.357646062,101.710317,0,4,4,true,false,false,true
+110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,true
 110004,202003,100,76,2377.145816,FIR,0.780928323,1,70.26136364,3,0,3,false,true,false,
-110005,202001,200,27,5217,R,1,1.016800862,182.25,0,3,3,true,false,false,false
-110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
-110005,202003,200,27,9940,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
-110006,202001,200,42,5325,R,1,1.016800862,182.25,0,3,3,true,false,false,false
-110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
-110006,202003,200,42,6685,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
-110007,202001,200,19,5496,R,1,1.016800862,182.25,0,3,3,true,false,false,false
-110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
-110007,202003,200,19,1235,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
+110005,202001,200,27,5217,R,1,1.016800862,182.25,0,3,3,true,false,false,true
+110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,true
+110005,202003,200,27,9940,R,1.212689221,1,182.2366412,4,0,4,false,true,false,true
+110006,202001,200,42,5325,R,1,1.016800862,182.25,0,3,3,true,false,false,true
+110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,true
+110006,202003,200,42,6685,R,1.212689221,1,182.2366412,4,0,4,false,true,false,true
+110007,202001,200,19,5496,R,1,1.016800862,182.25,0,3,3,true,false,false,true
+110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,true
+110007,202003,200,19,1235,R,1.212689221,1,182.2366412,4,0,4,false,true,false,true
 110008,202001,200,43,3978.741774,BI,1,1.016800862,182.25,0,3,3,true,false,false,
-110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,false
-110008,202003,200,43,6013,R,1.212689221,1,182.2366412,4,0,4,false,true,false,false
+110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,true
+110008,202003,200,43,6013,R,1.212689221,1,182.2366412,4,0,4,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 5743c652..3c5aeea6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,19 +1,19 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-120001,202001,100,50,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false,false
-120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
-120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
-120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
-120001,202005,100,50,1316,R,0.53449544,1,32.73423423,3,0,3,false,true,false,false
-120002,202001,100,78,7410,R,1,1.268552019,77.38738739,0,3,3,true,false,false,false
-120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
-120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
-120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
-120002,202005,100,78,1535,R,0.53449544,1,32.73423423,3,0,3,false,true,false,false
-120003,202001,100,94,4530,R,1,1.268552019,77.38738739,0,3,3,true,false,false,false
-120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,false
-120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,false
-120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,false
-120003,202005,100,94,4416,R,0.53449544,1,32.73423423,3,0,3,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+120001,202001,100,50,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false,true
+120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,true
+120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,true
+120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,true
+120001,202005,100,50,1316,R,0.53449544,1,32.73423423,3,0,3,false,true,false,true
+120002,202001,100,78,7410,R,1,1.268552019,77.38738739,0,3,3,true,false,false,true
+120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,true
+120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,true
+120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,true
+120002,202005,100,78,1535,R,0.53449544,1,32.73423423,3,0,3,false,true,false,true
+120003,202001,100,94,4530,R,1,1.268552019,77.38738739,0,3,3,true,false,false,true
+120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,true
+120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,true
+120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,true
+120003,202005,100,94,4416,R,0.53449544,1,32.73423423,3,0,3,false,true,false,true
 120004,202001,100,100,7738.738739,C,1,1.268552019,77.38738739,0,3,3,true,false,false,
 120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,
 120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 5a543295..f7dac5be 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-130001,202001,100,20,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false,false
-130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
-130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
-130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,false
-130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
-130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
-130001,202007,100,20,3282,R,0.798832987,1,158.7757576,3,0,4,false,true,false,false
-130002,202001,100,69,687,R,1,0.6743401,102.7515152,0,3,4,true,false,false,false
-130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
-130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
-130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,false
-130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
-130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
-130002,202007,100,69,9834,R,0.798832987,1,158.7757576,3,0,4,false,true,false,false
-130003,202001,100,39,7113,R,1,0.6743401,102.7515152,0,3,4,true,false,false,false
-130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,false
-130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,false
-130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,false
-130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,false
-130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,false
-130003,202007,100,39,6461,R,0.798832987,1,158.7757576,3,0,4,false,true,false,false
-130004,202001,100,37,2571,R,1,0.6743401,102.7515152,0,3,4,true,false,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+130001,202001,100,20,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false,true
+130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,true
+130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,true
+130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,true
+130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,true
+130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,true
+130001,202007,100,20,3282,R,0.798832987,1,158.7757576,3,0,4,false,true,false,true
+130002,202001,100,69,687,R,1,0.6743401,102.7515152,0,3,4,true,false,false,true
+130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,true
+130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,true
+130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,true
+130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,true
+130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,true
+130002,202007,100,69,9834,R,0.798832987,1,158.7757576,3,0,4,false,true,false,true
+130003,202001,100,39,7113,R,1,0.6743401,102.7515152,0,3,4,true,false,false,true
+130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,true
+130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,true
+130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,true
+130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,true
+130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,true
+130003,202007,100,39,6461,R,0.798832987,1,158.7757576,3,0,4,false,true,false,true
+130004,202001,100,37,2571,R,1,0.6743401,102.7515152,0,3,4,true,false,false,true
 130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,
 130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,
 130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,
 130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,
-130004,202007,100,37,6621,R,0.798832987,1,158.7757576,3,0,4,false,true,false,false
+130004,202007,100,37,6621,R,0.798832987,1,158.7757576,3,0,4,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 86d409ff..b06b6661 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
-140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
-140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
+140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
+140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
+140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
+140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
+140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
+140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
+140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
+140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
+140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
+140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
+140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
+140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
+140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
+140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
+140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
+140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
+140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
+140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
 140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
 140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
 140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
 140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
 140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
-140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 676f4c8a..717d15c4 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
-150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
-150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
+150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
+150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
+150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
+150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
+150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
+150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
+150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
+150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
+150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
+150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
+150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
+150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
+150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
+150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
 150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,
 150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
-150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
+150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
 150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
 150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 6df565fe..be3bfb37 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-160001,202001,100,76,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false,false
-160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
-160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
-160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,false
-160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
-160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
-160001,202007,100,76,1666,R,0.819547983,1,71.77202073,3,0,3,false,true,false,false
-160002,202001,100,32,430,R,1,0.285048351,29.78238342,0,3,3,true,false,false,false
-160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
-160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
-160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,false
-160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
-160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
-160002,202007,100,32,2678,R,0.819547983,1,71.77202073,3,0,3,false,true,false,false
-160003,202001,100,85,3232,R,1,0.285048351,29.78238342,0,3,3,true,false,false,false
-160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,false
-160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
-160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,false
-160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,false
-160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,false
-160003,202007,100,85,9508,R,0.819547983,1,71.77202073,3,0,3,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+160001,202001,100,76,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false,true
+160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,true
+160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,true
+160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,true
+160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,true
+160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,true
+160001,202007,100,76,1666,R,0.819547983,1,71.77202073,3,0,3,false,true,false,true
+160002,202001,100,32,430,R,1,0.285048351,29.78238342,0,3,3,true,false,false,true
+160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,true
+160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,true
+160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,true
+160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,true
+160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,true
+160002,202007,100,32,2678,R,0.819547983,1,71.77202073,3,0,3,false,true,false,true
+160003,202001,100,85,3232,R,1,0.285048351,29.78238342,0,3,3,true,false,false,true
+160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,true
+160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,true
+160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,true
+160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,true
+160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,true
+160003,202007,100,85,9508,R,0.819547983,1,71.77202073,3,0,3,false,true,false,true
 160004,202001,100,33,1022.611409,BI,1,0.285048351,29.78238342,0,3,3,true,false,false,
 160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,
-160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,false
+160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,true
 160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,
 160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,
 160004,202007,100,33,2368.476683,FIC,0.819547983,1,71.77202073,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index df9d4c70..fb9f54f1 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-170001,202001,100,69,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false,false
-170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
-170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
-170001,202004,100,69,7120,R,1.231814548,1,109.0330189,3,0,3,false,true,false,false
-170002,202001,100,62,449,R,1,0.41470355,41.93396226,0,3,3,true,false,false,false
-170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
-170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
-170002,202004,100,62,6745,R,1.231814548,1,109.0330189,3,0,3,false,true,false,false
-170003,202001,100,81,1961,R,1,0.41470355,41.93396226,0,3,3,true,false,false,false
-170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
-170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,false
-170003,202004,100,81,9250,R,1.231814548,1,109.0330189,3,0,3,false,true,false,false
-170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+170001,202001,100,69,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false,true
+170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,true
+170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,true
+170001,202004,100,69,7120,R,1.231814548,1,109.0330189,3,0,3,false,true,false,true
+170002,202001,100,62,449,R,1,0.41470355,41.93396226,0,3,3,true,false,false,true
+170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,true
+170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,true
+170002,202004,100,62,6745,R,1.231814548,1,109.0330189,3,0,3,false,true,false,true
+170003,202001,100,81,1961,R,1,0.41470355,41.93396226,0,3,3,true,false,false,true
+170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,true
+170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,true
+170003,202004,100,81,9250,R,1.231814548,1,109.0330189,3,0,3,false,true,false,true
+170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,true
 170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 824f1267..fadeb9e5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-180001,202001,100,91,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false,false
-180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
-180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
-180001,202004,100,91,9291,R,1.709926945,1,175.5441176,3,0,3,false,true,false,false
-180002,202001,100,26,3829,R,1,0.743721487,123.4632353,0,3,3,true,false,false,false
-180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
-180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
-180002,202004,100,26,8415,R,1.709926945,1,175.5441176,3,0,3,false,true,false,false
-180003,202001,100,19,3774,R,1,0.743721487,123.4632353,0,3,3,true,false,false,false
-180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,false
-180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
-180003,202004,100,19,6168,R,1.709926945,1,175.5441176,3,0,3,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+180001,202001,100,91,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false,true
+180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,true
+180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,true
+180001,202004,100,91,9291,R,1.709926945,1,175.5441176,3,0,3,false,true,false,true
+180002,202001,100,26,3829,R,1,0.743721487,123.4632353,0,3,3,true,false,false,true
+180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,true
+180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,true
+180002,202004,100,26,8415,R,1.709926945,1,175.5441176,3,0,3,false,true,false,true
+180003,202001,100,19,3774,R,1,0.743721487,123.4632353,0,3,3,true,false,false,true
+180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,true
+180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,true
+180003,202004,100,19,6168,R,1.709926945,1,175.5441176,3,0,3,false,true,false,true
 180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,
-180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,false
+180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index 70db2887..173a7b80 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -1,18 +1,18 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
 200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
 200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,
 200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
@@ -21,28 +21,28 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
 200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,
 200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
-200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
-200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
-200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
+200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
+200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
 200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
 200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
 200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
 200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
+200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
 200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
 200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
 200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index e4039d03..d7581820 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-10001,202001,1,10,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
-10002,202001,1,50,1,0.992513369,13.17948717,381,R,0,2,3,true,false,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
-10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
-10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false,false
-10005,202001,1,18,1,0.992513369,13.17948717,100,R,0,2,3,true,false,false,false
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+10001,202001,1,10,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false,true
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
+10002,202001,1,50,1,0.992513369,13.17948717,381,R,0,2,3,true,false,false,true
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true
+10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false,true
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true
+10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false,true
+10005,202001,1,18,1,0.992513369,13.17948717,100,R,0,2,3,true,false,false,true
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,
 10005,202003,2,18,1.173184358,1,50,900.0000004,FIC,2,0,2,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index cd9817fc..9bbefdd7 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
-10003,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
-10004,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false,false
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,true
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true
+10003,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false,true
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true
+10004,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false,true
 10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,
-10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false,false
+10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 93747fa1..d6b0c5ec 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
-10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
-10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false,false
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,true
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true
+10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false,true
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true
+10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false,true
 10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,
 10005,202003,2,18,1.173184358,1,50,900,FIC,2,0,2,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index cae441d9..ab316d20 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
-10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,false
-10003,202003,2,12,1.173184358,1,30.76923077,314,R,2,0,3,false,true,false,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,false
-10004,202003,2,9,1.173184358,1,30.76923077,736,R,2,0,3,false,true,false,false
-10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false,false
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,true
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
+10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false,true
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true
+10003,202003,2,12,1.173184358,1,30.76923077,314,R,2,0,3,false,true,false,true
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true
+10004,202003,2,9,1.173184358,1,30.76923077,736,R,2,0,3,false,true,false,true
+10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false,true
 10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false,
-10005,202003,2,18,1.173184358,1,30.76923077,150,R,2,0,3,false,true,false,false
+10005,202003,2,18,1.173184358,1,30.76923077,150,R,2,0,3,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index a704c157..1c51ef53 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,19 +1,19 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,false
-10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,false
-10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false,false
-10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2,false,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,false
-10003,202002,2,12,0.590369393,0.934108527131783,30.8974359,267,R,2,3,3,false,false,false,false
-10003,202003,2,12,1.070539419,1,33.07692308,314,R,3,0,3,false,true,false,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,false
-10004,202002,2,9,0.590369393,0.934108527131783,30.8974359,628,R,2,3,3,false,false,false,false
-10004,202003,2,9,1.070539419,1,33.07692308,736,R,3,0,3,false,true,false,false
-10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false,false
-10005,202002,2,18,0.590369393,0.934108527131783,30.8974359,310,R,2,3,3,false,false,false,false
-10005,202003,2,18,1.070539419,1,33.07692308,240,R,3,0,3,false,true,false,false
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,true
+10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false,true
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
+10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false,true
+10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2,false,false,false,true
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
+10003,202002,2,12,0.590369393,0.934108527131783,30.8974359,267,R,2,3,3,false,false,false,true
+10003,202003,2,12,1.070539419,1,33.07692308,314,R,3,0,3,false,true,false,true
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
+10004,202002,2,9,0.590369393,0.934108527131783,30.8974359,628,R,2,3,3,false,false,false,true
+10004,202003,2,9,1.070539419,1,33.07692308,736,R,3,0,3,false,true,false,true
+10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false,true
+10005,202002,2,18,0.590369393,0.934108527131783,30.8974359,310,R,2,3,3,false,false,false,true
+10005,202003,2,18,1.070539419,1,33.07692308,240,R,3,0,3,false,true,false,true
 10006,202001,1,22,1,0.992513369,13.17948718,289.948718,C,0,2,3,true,false,false,
 10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false,
 10006,202003,1,22,1.186096257,1,18.48333333,346.5012157,FIC,2,0,2,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 46126e9e..f398685b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,38 +1,38 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
-140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
-140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
+140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
+140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
+140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
+140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
+140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
+140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
+140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
+140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
+140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
+140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
+140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
+140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
+140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
+140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
+140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
+140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
+140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
+140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
 140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
 140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
 140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
 140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
 140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
-140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
-140005,202001,100,85,150000,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
-140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
-140005,202003,100,85,120000,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
-140005,202004,100,85,115000,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
-140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
-140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
-140005,202007,100,85,160000,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140005,202001,100,85,150000,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
+140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140005,202003,100,85,120000,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140005,202004,100,85,115000,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
+140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140005,202007,100,85,160000,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
 140006,202001,100,71,3346.63316582915,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
 140006,202002,100,71,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
 140006,202003,100,71,4447.66834170854,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index 6db1294e..b67c4cbb 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,38 +1,38 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
-150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
-150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
+150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
+150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
+150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
+150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
+150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
+150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
+150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
+150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
+150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
+150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
+150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
+150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
+150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
+150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
 150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,
 150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
-150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
+150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
 150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
 150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,
-150005,202001,100,85,150000,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
-150005,202002,100,85,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
-150005,202003,100,85,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150005,202004,100,85,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
-150006,202005,100,85,105000,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150006,202006,100,85,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
-150006,202007,100,85,125000,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
+150005,202001,100,85,150000,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
+150005,202002,100,85,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150005,202003,100,85,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150005,202004,100,85,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150006,202005,100,85,105000,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
+150006,202006,100,85,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150006,202007,100,85,125000,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
 150007,202001,100,71,12857.4545454545,C,1,0.887085601,181.0909091,0,3,3,true,false,false,
 150007,202002,100,71,14494.0404040404,FIC,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
 150007,202003,100,71,10188.8585858586,FIC,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
index 69c2ee23..70cb304a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,18 +1,18 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
 200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
 200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,
 200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
@@ -21,39 +21,39 @@ identifier,date,group,other,output,marker,forward,backward,construction,count_fo
 200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
 200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,
 200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
-200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
-200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
-200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
+200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
+200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
 200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
 200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
 200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
 200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
+200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
 200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
 200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
 200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200013,202001,100,85,150000,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200013,202002,100,85,180000,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200013,202003,100,85,120000,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200013,202004,100,85,105000,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200014,202001,200,85,150000,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200014,202002,200,85,180000,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200014,202003,200,85,120000,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200014,202004,200,85,105000,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
+200013,202001,100,85,150000,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
+200013,202002,100,85,180000,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200013,202003,100,85,120000,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200013,202004,100,85,105000,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200014,202001,200,85,150000,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
+200014,202002,200,85,180000,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200014,202003,200,85,120000,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200014,202004,200,85,105000,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
 200015,202001,100,71,5086.03964757709,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
 200015,202002,100,71,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
 200015,202003,100,71,8555.95250872475,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index b3c0a750..d38bbf46 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-10001,202001,1,10,547,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
-10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
-10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
-10002,202001,1,50,381,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
-10002,202002,1,50,573,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
-10002,202003,1,50,214,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
-10003,202001,2,12,961,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
-10003,202002,2,12,267,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
-10003,202003,2,12,314,1.173184358,1,50,R,2,0,2,false,true,false,false
-10004,202001,2,9,555,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
-10004,202002,2,9,628,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
-10004,202003,2,9,736,1.173184358,1,50,R,2,0,2,false,true,false,false
+identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+10001,202001,1,10,547,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
+10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
+10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
+10002,202001,1,50,381,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
+10002,202002,1,50,573,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
+10002,202003,1,50,214,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
+10003,202001,2,12,961,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
+10003,202002,2,12,267,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
+10003,202003,2,12,314,1.173184358,1,50,R,2,0,2,false,true,false,true
+10004,202001,2,9,555,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
+10004,202002,2,9,628,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
+10004,202003,2,9,736,1.173184358,1,50,R,2,0,2,false,true,false,true
 10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,0,2,2,true,false,false,
 10005,202002,2,18,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2,false,false,false,
 10005,202003,2,18,900,1.173184358,1,50,FIC,2,0,2,false,true,false,
-10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
-10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
-10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
+10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
+10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
+10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
 10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,0,2,2,true,false,false,
 10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2,false,false,false,
 10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,true,false,
-10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
-10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
-10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2,false,true,false,true
+10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
+10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
+10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2,false,true,false,false
 10009,202001,2,71,5125.52381,1,1.693854749,72.19047619,C,0,2,2,true,false,false,
 10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2,false,false,false,
 10009,202003,2,71,3550,1.173184358,1,50,FIC,2,0,2,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
index a65a0766..89443df6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
-50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
+50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
 50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true,
-50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
-50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
-50002,202001,100,36,4851,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
-50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,true,false,false,true
+50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,true,false,true
+50002,202001,100,36,4851,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
+50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
 50002,202003,100,36,8894,FIR,1,1,1,0,0,0,true,true,true,
-50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
-50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
-50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
-50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,true,false,false,true
+50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,true,false,true
+50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
+50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
 50003,202003,100,76,769,FIR,1,1,1,0,0,0,true,true,true,
-50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
-50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
-50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
-50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,true,false,false,true
+50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,true,false,true
+50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
+50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
 50004,202003,100,30,3245,FIR,1,1,1,0,0,0,true,true,true,
 50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,true,false,false,
 50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,true,false,
-50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,true,false,false,false
-50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,true,false,false
+50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
+50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
 50005,202003,100,85,130000,FIR,1,1,1,0,0,0,true,true,true,
-50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,true,false,false,false
-50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,true,false,false
+50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,true,false,false,true
+50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,true,false,true
 50006,202001,100,71,40747.793706,C,1,1.083783427,573.9125874,0,5,5,true,false,false,
 50006,202002,100,71,37597.727272,FIC,0.922693571,1,529.5454545,5,0,5,false,true,false,
 50006,202003,100,71,37597.727272,FIC,1,1,1,0,0,0,true,true,true,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
index 2710ee94..360b1250 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,filtered_marker
-1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
-1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,false
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,true
+1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,true
 1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,
 1,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false,
-2,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
-2,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,false
-2,202003,1,1,0,R,0,0,10,1,1,2,false,false,false,false
-2,202004,1,1,30,R,1,1,30,1,0,1,true,true,false,false
-3,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
+2,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,true
+2,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,true
+2,202003,1,1,0,R,0,0,10,1,1,2,false,false,false,true
+2,202004,1,1,30,R,1,1,30,1,0,1,true,true,false,true
+3,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,true
 3,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false,
-3,202003,1,1,20,R,0,0,10,1,1,2,false,false,false,false
+3,202003,1,1,20,R,0,0,10,1,1,2,false,false,false,true
 3,202004,1,1,20,FIR,1,1,30,1,0,1,true,true,false,
-4,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,false
+4,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,true
 4,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false,
 4,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,
 4,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false,
diff --git a/tests/imputation/test_engine.py b/tests/imputation/test_engine.py
index ba640581..77a4881c 100644
--- a/tests/imputation/test_engine.py
+++ b/tests/imputation/test_engine.py
@@ -202,10 +202,10 @@ def test_params_missing_link_column(fxt_load_test_csv):
         "imputation",
         "engine",
         "unit",
-        "basic_functionality",
+        "basic_functionality_partial_link_cols",
     )
-    with pytest.raises(TypeError):
-        impute(input_df=test_dataframe, **params, forward_link_col=forward_col)
+    with pytest.raises(ValidationError):
+        impute(input_df=test_dataframe, **params)
 
 
 def test_params_not_string(fxt_load_test_csv):
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 89024287..a24bf99c 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -28,9 +28,9 @@
 default_forward_col = "default_forward"
 default_backward_col = "default_backward"
 default_construction_col = "default_construction"
-filtered_marker_col = "filtered_marker"
-filtered_forward_col = "filtered_forward"
-filtered_backward_col = "filtered_backward"
+link_inclusion_marker_col = "link_inclusion_marker"
+link_inclusion_forward_col = "link_inclusion_forward"
+link_inclusion_backward_col = "link_inclusion_backward"
 trimmed_forward_col = "trimmed_forward"
 trimmed_backward_col = "trimmed_backward"
 
@@ -54,9 +54,9 @@
 default_forward_type = BooleanType()
 default_backward_type = BooleanType()
 default_construction_type = BooleanType()
-filtered_marker_type = BooleanType()
-filtered_forward_type = BooleanType()
-filtered_backward_type = BooleanType()
+link_inclusion_marker_type = BooleanType()
+link_inclusion_forward_type = BooleanType()
+link_inclusion_backward_type = BooleanType()
 trimmed_forward_type = BooleanType()
 trimmed_backward_type = BooleanType()
 
@@ -78,14 +78,14 @@
     count_construction_col,
     forward_growth_col,
     backward_growth_col,
-    filtered_forward_col,
-    filtered_backward_col,
+    link_inclusion_forward_col,
+    link_inclusion_backward_col,
     trimmed_forward_col,
     trimmed_backward_col,
     default_forward_col,
     default_backward_col,
     default_construction_col,
-    filtered_marker_col,
+    link_inclusion_marker_col,
 )
 
 dataframe_types = {
@@ -107,9 +107,9 @@
     default_forward_col: default_forward_type,
     default_backward_col: default_backward_type,
     default_construction_col: default_construction_type,
-    filtered_marker_col: filtered_marker_type,
-    filtered_forward_col: filtered_forward_type,
-    filtered_backward_col: filtered_backward_type,
+    link_inclusion_marker_col: link_inclusion_marker_type,
+    link_inclusion_forward_col: link_inclusion_forward_type,
+    link_inclusion_backward_col: link_inclusion_backward_type,
     trimmed_forward_col: trimmed_forward_type,
     trimmed_backward_col: trimmed_backward_type,
 }
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 0ca3aae6..3f848fe0 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -26,7 +26,7 @@
 default_forward_col = "default_forward"
 default_backward_col = "default_backward"
 default_construction_col = "default_construction"
-filtered_marker_col = "filtered_marker"
+link_inclusion_marker_col = "link_inclusion_marker"
 
 decimal_type = DecimalType(15, 6)
 
@@ -46,7 +46,7 @@
 default_forward_type = BooleanType()
 default_backward_type = BooleanType()
 default_construction_type = BooleanType()
-filtered_marker_type = BooleanType()
+link_inclusion_marker_type = BooleanType()
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -67,7 +67,7 @@
     default_forward_col,
     default_backward_col,
     default_construction_col,
-    filtered_marker_col,
+    link_inclusion_marker_col,
 )
 
 dataframe_types = {
@@ -87,7 +87,7 @@
     default_forward_col: default_forward_type,
     default_backward_col: default_backward_type,
     default_construction_col: default_construction_type,
-    filtered_marker_col: filtered_marker_type,
+    link_inclusion_marker_col: link_inclusion_marker_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()

From 49ceeb68b90a4a4b0a28ce716fba4de21d0b512a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 10 May 2023 16:03:06 +0100
Subject: [PATCH 273/531] Test Updates

---
 .../imputation/ratio_calculators.py           | 19 ++--
 .../methodology_scenarios/01_C_output.csv     |  6 +-
 .../methodology_scenarios/02_C_FI_output.csv  | 12 +--
 .../03_R_R_FI_output.csv                      | 16 ++--
 .../04_R_R_FI_FI_output.csv                   | 16 ++--
 .../05_R_R_FI_FI_FI_year_span_output.csv      | 16 ++--
 .../06_BI_BI_R_output.csv                     | 14 +--
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          | 16 ++--
 .../methodology_scenarios/08_R_R_R_output.csv | 16 ++--
 .../09_R_NS_C_output.csv                      | 14 +--
 .../10_C_FI_NS_R_output.csv                   | 14 +--
 .../11_R_R_FI-BI_R_R_output.csv               | 32 +++----
 .../12_C_FI_FI_FI_FI_output.csv               | 12 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          | 24 ++---
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          | 18 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          | 22 ++---
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          | 16 ++--
 .../17_NS_R_FI_NS_output.csv                  | 16 ++--
 .../18_NS_BI_R_NS_output.csv                  | 16 ++--
 .../19_link_columns_input.csv                 |  4 +-
 .../19_link_columns_output.csv                | 20 ++--
 .../20_mixed_data_output.csv                  | 52 +++++-----
 .../21_class_change_R_C_FI_output.csv         | 20 ++--
 .../22_class_change_C_BI_R_output.csv         | 18 ++--
 .../23_class_change_C_C_FI_output.csv         | 18 ++--
 .../24_class_change_R_BI_R_output.csv         | 20 ++--
 .../25_class_change_C_FI_FI_output.csv        | 24 ++---
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv | 20 ++--
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv | 22 ++---
 .../29_mixed_data_filtered_output.csv         | 50 +++++-----
 ...30_class_change_C_C_FI_filtered_output.csv | 26 ++---
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv | 22 ++---
 .../32_C_FI_FI_no_response_output.csv         | 18 ++--
 .../34_default_link_output.csv                | 14 +--
 .../35_TB_10_R_R_FI_output.csv                | 46 ++++-----
 .../36_TB_10_BI_BI_R_output.csv               | 46 ++++-----
 .../37_TB_10_C_FI_FI_output.csv               | 44 ++++-----
 .../38_T_10_R_R_FI_output.csv                 | 48 +++++-----
 .../39_B_10_R_R_FI_output.csv                 | 48 +++++-----
 .../40_TB_10_R_R_FI_no_trim_output.csv        | 40 ++++----
 .../41_TB_10_R_R_FI_filtered_output.csv       | 48 +++++-----
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 96 +++++++++----------
 42 files changed, 542 insertions(+), 537 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 65975f17..aa43f670 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -62,12 +62,17 @@ def mean_of_ratios(
             col("next.output"),
         ).alias("next_output"),
         expr(
-            """
-            previous.match IS NOT NULL AND previous.match AND current.match
+            """CASE
+                   WHEN previous.match IS NULL THEN NULL
+                   ELSE previous.match
+                END
             AS link_inclusion_forward"""
         ),
         expr(
-            """next.match IS NOT NULL AND next.match AND current.match
+            """CASE
+                   WHEN next.match IS NULL THEN NULL
+                   ELSE next.match
+                END
             AS link_inclusion_backward"""
         ),
     ).selectExpr(
@@ -213,8 +218,8 @@ def upper_bound(c):
         )
 
     else:
-        df = df.withColumn("trim_inclusion_forward", lit(False)).withColumn(
-            "trim_inclusion_backward", lit(False)
+        df = df.withColumn("trim_inclusion_forward", lit(True)).withColumn(
+            "trim_inclusion_backward", lit(True)
         )
 
     ratio_df = (
@@ -241,8 +246,8 @@ def upper_bound(c):
             )) AS count_backward"""
             ),
         )
-        .withColumn("default_forward", expr("forward IS NOT NULL"))
-        .withColumn("default_backward", expr("backward IS NOT NULL"))
+        .withColumn("default_forward", expr("forward IS NULL"))
+        .withColumn("default_backward", expr("backward IS NULL"))
     )
 
     growth_select_cols = [
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index d28742b6..a96594e1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,true,true,true,true,false
-10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,true,true,true,true,false
-10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,true,true,true,true,false
+10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
+10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
+10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
 10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 7227c9f0..90cc3a17 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,true,true,true,false,false
-20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,true,true,false,true,false
-20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,true,true,true,false,false
-20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,true,true,true,false,true,false
-20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,true,true,true,true,false,false
-20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,true,true,true,false,true,false
+20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,,true,true,false,false
+20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,true,,false,true,false
+20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,,true,true,false,false
+20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,true,true,,false,true,false
+20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,true,,true,true,false,false
+20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,true,true,,false,true,false
 20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,,,,true,false,false
 20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 9c33db48..13991ffc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,true,true,true,false,false
+30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,,true,true,false,false
 30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
-30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,true,true,false,true,false
-30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,true,true,true,true,false,false
+30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,true,,false,true,false
+30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,true,,true,true,false,false
 30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
-30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,true,true,true,false,true,false
-30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,true,true,true,true,false,false
+30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,true,true,,false,true,false
+30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,true,,true,true,false,false
 30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
-30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,true,true,true,false,true,false
-30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,true,true,true,true,false,false
-30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
+30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,true,true,,false,true,false
+30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,true,,true,true,false,false
+30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,true,true,,false,false,false
 30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index 240e6a0b..380c314c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,true,true,true,false,false
+40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,,true,true,false,false
 40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
 40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
-40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,true,true,true,false,true,false
-40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,true,true,true,true,false,false
+40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,true,true,,false,true,false
+40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,true,,true,true,false,false
 40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
 40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
-40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,true,true,true,false,true,false
-40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,true,true,true,true,false,false
+40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,true,true,,false,true,false
+40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,true,,true,true,false,false
 40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
 40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
-40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,true,true,true,false,true,false
-40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,true,true,true,true,false,false
-40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
+40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,true,true,,false,true,false
+40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,true,,true,true,false,false
+40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,true,true,,false,false,false
 40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,,,,false,false,false
 40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 20eb033b..9cae2220 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,true,true,true,false,false
+50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,,true,true,false,false
 50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
 50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
 50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,true,true,true,false,false,false
-50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,true,true,true,false,true,false
-50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,true,true,true,true,false,false
+50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,true,true,,false,true,false
+50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,true,,true,true,false,false
 50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
 50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
 50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,true,true,true,false,false,false
-50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,true,true,true,false,true,false
-50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,true,true,true,true,false,false
+50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,true,true,,false,true,false
+50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,true,,true,true,false,false
 50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
 50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
 50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,true,true,true,false,false,false
-50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,true,true,true,false,true,false
-50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,true,true,true,true,false,false
-50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
+50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,true,true,,false,true,false
+50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,true,,true,true,false,false
+50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,true,true,,false,false,false
 50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,,false,false,false
 50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,,false,false,false
 50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index 812c4c7e..c830cea3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,true,true,true,false,false
+60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,,true,true,false,false
 60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
-60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,true,true,false,true,false
-60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,true,true,true,true,false,false
+60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,true,,false,true,false
+60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,true,,true,true,false,false
 60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
-60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,true,true,true,false,true,false
-60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,true,true,true,true,false,false
+60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,true,true,,false,true,false
+60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,true,,true,true,false,false
 60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
-60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,true,true,true,false,true,false
+60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,true,true,,false,true,false
 60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,,,,true,false,false
 60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,,,,false,false,false
-60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,true,true,true,false,true,false
+60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index f0af25a0..bc379870 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,true,true,true,false,false
+70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,,true,true,false,false
 70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
 70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
 70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,true,true,true,false,false,false
 70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,true,true,true,false,false,false
 70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
-70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,true,true,true,false,true,false
-70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,true,true,true,true,false,false
+70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,true,true,,false,true,false
+70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,true,,true,true,false,false
 70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
 70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
 70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,true,true,true,false,false,false
 70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,true,true,true,false,false,false
 70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
-70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,true,true,true,false,true,false
-70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,true,true,true,true,false,false
+70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,true,true,,false,true,false
+70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,true,,true,true,false,false
 70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
 70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
 70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,true,true,true,false,false,false
 70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,true,true,true,false,false,false
 70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
-70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,true,true,true,false,true,false
+70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,true,true,,false,true,false
 70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,,,,true,false,false
 70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,,,,false,false,false
-70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
+70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,true,,,false,false,false
 70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,,,,false,false,false
 70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,,,,false,false,false
-70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
+70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,true,,,false,false,false
 70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index 1e412172..4eb80d70 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,true,true,true,false,false
+80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,,true,true,false,false
 80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
-80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,true,true,false,true,false
-80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,true,true,true,true,false,false
+80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,true,,false,true,false
+80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,true,,true,true,false,false
 80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
-80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,true,true,true,false,true,false
-80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,true,true,true,true,false,false
+80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,true,true,,false,true,false
+80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,true,,true,true,false,false
 80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
-80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,true,true,true,false,true,false
-80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,true,true,true,true,false,false
+80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,true,true,,false,true,false
+80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,true,,true,true,false,false
 80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
-80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,true,true,true,false,true,false
+80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 7c4575a9..424ea7de 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,true,true,true,false,false
+90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,,true,true,false,false
 90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
-90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,true,true,false,true,false
-90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,true,true,true,true,false,false
+90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,true,,false,true,false
+90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,true,,true,true,false,false
 90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
-90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,true,true,true,false,true,false
-90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,true,true,true,true,false,false
+90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,true,true,,false,true,false
+90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,true,,true,true,false,false
 90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
-90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,true,true,true,false,true,false
-90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,true,true,true,true,false,false
+90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,true,true,,false,true,false
+90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,true,,,true,false,false
 90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index aa37bd5b..28d5e0de 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,true,true,true,false,false
+100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,,true,true,false,false
 100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
 100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
-100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,true,true,true,false,true,false
-100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,true,true,true,true,false,false
+100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,true,true,,false,true,false
+100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,true,,true,true,false,false
 100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
 100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
-100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,true,true,true,false,true,false
-100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,true,true,true,true,false,false
+100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,true,true,,false,true,false
+100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,true,,true,true,false,false
 100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
 100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
-100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,true,true,true,false,true,false
+100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,true,true,,false,true,false
 100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,,,,true,false,false
 100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,,,,false,false,false
-100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,true,true,true,false,true,false
+100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index fb6fa439..f927300e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,true,true,true,false,false
+110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,,true,true,false,false
 110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,true,true,false,true,false
-110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,true,true,true,true,false,false
+110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,true,,false,true,false
+110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,true,,true,true,false,false
 110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,true,true,true,false,true,false
-110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,true,true,true,true,false,false
+110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,true,true,,false,true,false
+110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,true,,true,true,false,false
 110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,true,true,true,false,true,false
-110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,true,true,true,true,false,false
-110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,true,true,,false,true,false
+110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,true,,true,true,false,false
+110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,true,true,,false,false,false
 110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,,,,false,true,false
-110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,true,true,true,true,false,false
+110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,true,,true,true,false,false
 110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
-110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,true,true,true,false,true,false
-110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,true,true,true,true,false,false
+110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,true,true,,false,true,false
+110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,true,,true,true,false,false
 110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
-110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,true,true,true,false,true,false
-110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,true,true,true,true,false,false
+110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,true,true,,false,true,false
+110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,true,,true,true,false,false
 110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
-110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,true,true,true,false,true,false
+110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,true,true,,false,true,false
 110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,,,,true,false,false
-110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
-110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,true,true,true,false,true,false
+110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,true,,true,false,false,false
+110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 6c304b50..77b58dbc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,19 +1,19 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,true,true,true,false,false
+120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,,true,true,false,false
 120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
 120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
 120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,true,true,true,false,false,false
-120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,true,true,true,false,true,false
-120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,true,true,true,true,false,false
+120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,true,true,,false,true,false
+120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,true,,true,true,false,false
 120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
 120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
 120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,true,true,true,false,false,false
-120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,true,true,true,false,true,false
-120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,true,true,true,true,false,false
+120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,true,true,,false,true,false
+120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,true,,true,true,false,false
 120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
 120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
 120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,true,true,true,false,false,false
-120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,true,true,true,false,true,false
+120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,true,true,,false,true,false
 120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,,,,true,false,false
 120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,,,,false,false,false
 120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,,,,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 45a2a5df..48ef0b7c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,true,true,true,false,false
+130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,,true,true,false,false
 130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
 130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
 130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,true,true,true,false,false,false
 130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,true,true,true,false,false,false
 130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,true,true,true,false,false,false
-130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,true,true,true,false,true,false
-130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,true,true,true,true,false,false
+130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,true,true,,false,true,false
+130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,true,,true,true,false,false
 130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
 130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
 130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,true,true,true,false,false,false
 130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,true,true,true,false,false,false
 130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,true,true,true,false,false,false
-130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,true,true,true,false,true,false
-130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,true,true,true,true,false,false
+130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,true,true,,false,true,false
+130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,true,,true,true,false,false
 130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
 130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
 130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,true,true,true,false,false,false
 130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,true,true,true,false,false,false
 130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,true,true,true,false,false,false
-130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,true,true,true,false,true,false
-130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,true,true,true,true,false,false
-130004,202002,100,37,12734.3292,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,,,,false,false,false
-130004,202003,100,37,12034.73601,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,,,,false,false,false
-130004,202005,100,37,10550.61563,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,,,,false,false,false
-130004,202006,100,37,10954.18884,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,,,,false,false,false
-130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,true,true,true,false,true,false
\ No newline at end of file
+130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,true,true,,false,true,false
+130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,true,,,true,false,false
+130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,,,,false,false,false
+130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,,,,false,false,false
+130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,,,,false,false,false
+130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,,,,false,false,false
+130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 1f4648ad..55b24189 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,true,true,true,false,false
+140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,,true,true,false,false
 140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
 140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
 140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,true,true,true,false,false,false
 140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,true,true,true,false,false,false
 140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,true,true,true,false,false,false
-140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,true,true,true,false,true,false
-140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,true,true,true,true,false,false
+140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,true,true,,false,true,false
+140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,true,,true,true,false,false
 140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
 140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
 140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,true,true,true,false,false,false
 140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,true,true,true,false,false,false
 140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,true,true,true,false,false,false
-140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,true,true,true,false,true,false
-140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,true,true,true,true,false,false
+140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,true,true,,false,true,false
+140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,true,,true,true,false,false
 140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
 140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
 140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,true,true,true,false,false,false
 140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,true,true,true,false,false,false
 140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,true,true,true,false,false,false
-140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,true,true,true,false,true,false
+140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,true,true,,false,true,false
 140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,,,,true,false,false
 140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,,,,false,false,false
 140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,,,,false,false,false
-140004,202005,100,28,13403.57248,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,,,,false,false,false
-140004,202006,100,28,26948.53343,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,,,,false,false,false
-140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,true,true,true,false,true,false
\ No newline at end of file
+140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,,,,false,false,false
+140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,,,,false,false,false
+140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index d8904285..3fc665fd 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,true,true,true,false,false
+150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,,true,true,false,false
 150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
 150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
 150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,true,true,true,false,false,false
 150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
 150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,true,true,true,false,false,false
-150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,true,true,true,false,true,false
-150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,true,true,true,true,false,false
+150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,true,true,,false,true,false
+150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,true,,true,true,false,false
 150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
 150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
 150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,true,true,true,false,false,false
 150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
 150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,true,true,true,false,false,false
-150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,true,true,true,false,true,false
-150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,true,true,true,true,false,false
+150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,true,true,,false,true,false
+150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,true,,true,true,false,false
 150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
 150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
 150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,true,true,true,false,false,false
 150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
 150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,true,true,true,false,false,false
-150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,true,true,true,false,true,false
-150004,202001,100,69,13547.81819,BI,,,1,0.917399451,181.0909091,0,3,3,,,,true,false,false
-150004,202002,100,69,14767.63277,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,,false,false,false
-150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
-150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
+150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,true,true,,false,true,false
+150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,,,,true,false,false
+150004,202002,100,69,14767.632767,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,,false,false,false
+150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,true,,,false,false,false
+150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,true,,,false,false,false
 150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,,,,false,false,false
-150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,,,,false,true,false
\ No newline at end of file
+150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index ea977ca0..9143b537 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,true,true,true,false,false
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,,true,true,false,false
 160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
 160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
 160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,true,true,true,false,false,false
 160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,true,true,true,false,false,false
 160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,true,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,true,true,true,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,true,true,true,true,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,true,true,,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,true,,true,true,false,false
 160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
 160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
 160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,true,true,true,false,false,false
 160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,true,true,true,false,false,false
 160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,true,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,true,true,true,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,true,true,true,true,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,true,true,,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,true,,true,true,false,false
 160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
 160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
 160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,true,true,true,false,false,false
 160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,true,true,true,false,false,false
 160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,true,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,true,true,true,false,true,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,true,true,,false,true,false
 160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,,,,true,false,false
 160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,,,,false,false,false
-160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
+160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,true,,,false,false,false
 160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,,,,false,false,false
 160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,,,,false,false,false
-160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,,,,false,true,false
\ No newline at end of file
+160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 40b294f8..363b3bde 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,true,true,true,false,false
+170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,,true,true,false,false
 170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
 170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
-170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,true,true,true,false,true,false
-170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,true,true,true,true,false,false
+170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,true,true,,false,true,false
+170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,true,,true,true,false,false
 170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
 170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
-170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,true,true,true,false,true,false
-170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,true,true,true,true,false,false
+170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,true,true,,false,true,false
+170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,true,,true,true,false,false
 170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
 170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
-170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,true,true,true,false,true,false
-170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
-170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,,,,false,false,false
\ No newline at end of file
+170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,true,true,,false,true,false
+170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,true,,,false,false,false
+170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,,,,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 4fe6ea9e..e7bcdfa4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,true,true,true,false,false
+180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,,true,true,false,false
 180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
 180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
-180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,true,true,true,false,true,false
-180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,true,true,true,true,false,false
+180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,true,true,,false,true,false
+180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,true,,true,true,false,false
 180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
 180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
-180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,true,true,true,false,true,false
-180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,true,true,true,true,false,false
+180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,true,true,,false,true,false
+180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,true,,true,true,false,false
 180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
 180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
-180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,true,true,true,false,true,false
-180004,202002,100,26,11794.76123,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,,,,false,false,false
-180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
\ No newline at end of file
+180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,true,true,,false,true,false
+180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,,,,false,false,false
+180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,true,,,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
index 669b20b6..5c607b5f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
@@ -19,7 +19,7 @@ identifier,date,group,question,other,forward,backward,construction
 190005,202002,100,,34,0.8521,1.5274,121.4187
 190005,202003,100,4456,34,0.9685,1.8795,89.3761
 190005,202004,100,5134,34,1.113,1,110.5473
-190006,202001,100,,8,1,0.9214,50.3694
+190006,202001,100,,8,,0.9214,50.3694
 190006,202002,100,,8,0.8521,1.5274,121.4187
 190006,202003,100,,8,0.9685,1.8795,89.3761
-190006,202004,100,,8,1.113,1,110.5473
+190006,202004,100,,8,1.113,,110.5473
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index 10c6bfa2..6346f2b0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,24 +1,24 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,0,0,0,true,false,false
+190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,0,0,0,false,false,false
 190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,0,0,0,false,false,false
 190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,0,0,0,false,true,false
-190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,0,0,0,true,false,false
+190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,0,0,0,false,false,false
+190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,0,0,0,false,false,false
 190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,0,0,0,false,false,false
 190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,0,0,0,false,true,false
-190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,0,0,0,true,false,false
+190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,0,0,0,false,false,false
+190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,0,0,0,false,false,false
 190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,0,0,0,false,false,false
 190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,0,0,0,false,true,false
-190004,202001,100,51,2247,R,,,1,0.9214,50.3694,0,0,0,true,false,false
+190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,0,0,0,false,false,false
+190004,202001,100,51,2247,R,,,1,0.9214,50.3694,0,0,0,false,false,false
 190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
 190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190004,202004,100,51,8608,R,,,1.113,1,110.5473,0,0,0,false,true,false
-190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,0,0,0,true,false,false
+190004,202004,100,51,8608,R,,,1.113,1,110.5473,0,0,0,false,false,false
+190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,0,0,0,false,false,false
 190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
 190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,0,0,0,false,true,false
+190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,0,0,0,false,false,false
 190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,0,0,0,true,false,false
 190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
 190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,0,0,0,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index c5d59491..26859047 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,true,true,true,false,false
+200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,,true,true,false,false
 200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
 200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
-200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,true,true,true,false,true,false
-200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,true,true,true,true,false,false
+200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,true,true,,false,true,false
+200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,true,,true,true,false,false
 200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
 200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
-200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,true,true,true,false,true,false
-200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,true,true,true,true,false,false
+200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,true,true,,false,true,false
+200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,true,,true,true,false,false
 200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
 200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
-200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,true,true,true,false,true,false
-200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,true,true,true,true,false,false
-200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
+200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,true,true,,false,true,false
+200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,true,,true,true,false,false
+200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,true,true,,false,false,false
 200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,false,false,false
 200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,,,,false,true,false
 200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,,,,true,false,false
-200005,202002,100,6,10116.54266,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,false,false,false
-200005,202003,100,6,11749.48593,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,false,false,false
+200005,202002,100,6,10116.542669,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,false,false,false
+200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,false,false,false
 200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,,,,false,true,false
 200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,,,,true,false,false
 200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,false,false,false
-200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
-200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,true,true,true,false,true,false
-200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,true,true,true,true,false,false
+200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,true,,true,false,false,false
+200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,true,true,,false,true,false
+200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,true,,true,true,false,false
 200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
 200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
-200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,true,true,true,false,true,false
-200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,true,true,true,true,false,false
+200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,true,true,,false,true,false
+200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,true,,true,true,false,false
 200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
 200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
-200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,true,true,true,false,true,false
-200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,true,true,true,true,false,false
+200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,true,true,,false,true,false
+200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,true,,true,true,false,false
 200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
 200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
-200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,true,true,true,false,true,false
-200010,202001,200,85,14038.67103,BI,,,1,2.163456777,132.3214286,0,3,4,,,,true,false,false
-200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
-200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
+200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,true,true,,false,true,false
+200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,,,,true,false,false
+200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,true,,true,false,false,false
+200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,true,true,,false,false,false
 200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,false,true,false
 200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,,,,true,false,false
-200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
+200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,true,,,false,false,false
 200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,,,,false,true,false
-200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,true,true,true,true,false,false
-200012,202002,200,87,13949.29461,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,,,,false,false,false
-200012,202003,200,87,29170.87018,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,,,,false,false,false
-200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,false,true,false
\ No newline at end of file
+200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,true,,,true,false,false
+200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,,,,false,false,false
+200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,,,,false,false,false
+200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index e8b275f0..6477b8c7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
-210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
+210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
-210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
+210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
 210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,true,true,false,true,false
-210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,true,,false,true,false
+210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
 210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,true,true,false,true,false
-210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,true,,false,true,false
+210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,,,true,false,false
 210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
-210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,,,,false,true,false
\ No newline at end of file
+210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index ef9931d1..1e5d46f7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,true,true,true,false,false
+220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
 220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
-220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,true,true,true,false,false
+220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
+220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
 220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
-220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
+220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
 220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,true,true,true,false,true,false
-220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,true,true,,false,true,false
+220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
 220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,true,true,true,false,true,false
+220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,true,true,,false,true,false
 220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,,true,false,false
 220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
-220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,true,true,true,false,true,false
+220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index c709bb8e..5f1b78dc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,true,true,true,false,false
+230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
 230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
-230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,true,true,true,false,false
+230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
+230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
 230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
-230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
+230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
 230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,true,true,false,true,false
-230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,true,,false,true,false
+230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
 230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,true,true,false,true,false
+230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,true,,false,true,false
 230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,,true,false,false
 230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
-230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,,,,false,true,false
\ No newline at end of file
+230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 835c18bf..f3f8133a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
-240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
+240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
-240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
+240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
 240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,true,true,true,false,true,false
-240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,true,true,,false,true,false
+240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
 240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,true,true,true,false,true,false
-240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,true,true,,false,true,false
+240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,,,true,false,false
 240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
-240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,true,true,true,false,true,false
\ No newline at end of file
+240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 72b0be3a..46d449ff 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
 identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
-250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
+250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
+250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,true,false,true,false
-250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
+250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
 250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,true,true,true,false,false,false
-250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,true,true,true,false,true,false
-250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,true,true,true,false,false
+250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,true,true,,false,true,false
+250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
 250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,true,true,true,false,false,false
-250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,true,true,true,false,true,false
-250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,true,true,true,false,false
-250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,true,true,true,false,false,false
-250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,true,true,true,false,true,false
+250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,true,true,,false,true,false
+250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,,,true,false,false
+250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,true,,true,false,false,false
+250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,true,true,,false,true,false
 250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,,,,true,false,false
 250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,,,,false,false,false
 250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,,,,false,true,false
 250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,,,,true,false,false
 250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,,,,false,false,false
-250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,,,,false,true,false
\ No newline at end of file
+250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 33282c54..fef23ada 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-140001,202001,100,27,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,true,true,true,true,false,false
+140001,202001,100,27,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,true,,true,true,false,false
 140001,202002,100,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,true,true,true,false,false,false
 140001,202003,100,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,true,true,true,false,false,false
 140001,202004,100,27,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,true,true,true,false,false,false
 140001,202005,100,27,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,true,true,true,false,false,false
 140001,202006,100,27,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,true,true,true,false,false,false
-140001,202007,100,27,1.148331415,,0.520242185,1,91.63876652,9979,R,3,0,4,true,true,true,false,true,false
-140002,202001,100,83,,0.755746721,1,0.534118956,47.13567839,5359,R,0,3,3,true,true,true,true,false,false
+140001,202007,100,27,1.148331415,,0.520242185,1,91.63876652,9979,R,3,0,4,true,true,,false,true,false
+140002,202001,100,83,,0.755746721,1,0.534118956,47.13567839,5359,R,0,3,3,true,,true,true,false,false
 140002,202002,100,83,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,true,true,true,false,false,false
 140002,202003,100,83,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,true,true,true,false,false,false
 140002,202004,100,83,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,true,true,true,false,false,false
 140002,202005,100,83,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,true,true,true,false,false,false
 140002,202006,100,83,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,true,true,true,false,false,false
-140002,202007,100,83,0.156757562,,0.520242185,1,91.63876652,1052,R,3,0,4,true,true,true,false,true,false
-140003,202001,100,89,,0.056404985,1,0.534118956,47.13567839,439,R,0,3,3,true,true,true,true,false,false
+140002,202007,100,83,0.156757562,,0.520242185,1,91.63876652,1052,R,3,0,4,true,true,,false,true,false
+140003,202001,100,89,,0.056404985,1,0.534118956,47.13567839,439,R,0,3,3,true,,true,true,false,false
 140003,202002,100,89,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,true,true,true,false,false,false
 140003,202003,100,89,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,true,true,true,false,false,false
 140003,202004,100,89,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,true,true,true,false,false,false
 140003,202005,100,89,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,true,true,true,false,false,false
 140003,202006,100,89,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,true,true,true,false,false,false
-140003,202007,100,89,0.255637577,,0.520242185,1,91.63876652,2528,R,3,0,4,true,true,true,false,true,false
+140003,202007,100,89,0.255637577,,0.520242185,1,91.63876652,2528,R,3,0,4,true,true,,false,true,false
 140004,202001,100,28,,,1,0.534118956,47.13567839,1319.798995,C,0,3,3,,,,true,false,false
 140004,202002,100,28,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,,,,false,false,false
 140004,202003,100,28,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,,,,false,false,false
 140004,202005,100,28,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3,,,,false,false,false
 140004,202006,100,28,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3,,,,false,false,false
-140004,202007,100,28,,,0.520242185,1,91.63876652,7243,R,3,0,4,true,true,true,false,true,false
-140005,202001,100,85,,,1,0.534118956,47.13567839,150000,R,0,3,3,false,true,false,true,false,false
+140004,202007,100,28,,,0.520242185,1,91.63876652,7243,R,3,0,4,true,,,false,true,false
+140005,202001,100,85,,,1,0.534118956,47.13567839,150000,R,0,3,3,false,,false,true,false,false
 140005,202002,100,85,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,false,false,false,false,false,false
 140005,202003,100,85,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,false,false,false,false,false,false
 140005,202004,100,85,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,false,false,false,false,false,false
 140005,202005,100,85,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,false,false,false,false,false,false
 140005,202006,100,85,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,false,false,false,false,false,false
-140005,202007,100,85,,,0.520242185,1,91.63876652,160000,R,3,0,4,false,false,true,false,true,false
+140005,202007,100,85,,,0.520242185,1,91.63876652,160000,R,3,0,4,false,false,,false,true,false
 140006,202001,100,71,,,1,0.534118956,47.13567839,3346.633166,C,0,3,3,,,,true,false,false
 140006,202002,100,71,,,6.772539383,3.563193687,97.52261307,22665.20492,FIC,3,3,3,,,,false,false,false
 140006,202003,100,71,,,0.700853626,0.84489759,62.64321608,15884.99106,FIC,3,3,3,,,,false,false,false
 140006,202004,100,71,,,3.724667279,2.674093602,95.10050251,59166.30642,FIC,3,3,3,,,,false,false,false
 140006,202005,100,71,,,1.108042751,0.497376695,63.63316583,65558.79694,FIC,3,3,3,,,,false,false,false
 140006,202006,100,71,,,2.988483968,3.720631427,127.0854271,195921.4136,FIC,3,3,3,,,,false,false,false
-140006,202007,100,71,,,0.520242185,1,91.63876652,101926.5843,FIC,3,0,4,,,,false,true,false
\ No newline at end of file
+140006,202007,100,71,,,0.520242185,1,91.63876652,101926.5843,FIC,3,0,4,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index f07b0770..2f49f86b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-150001,202001,100,15,,1.285963763,1,0.917399451,181.0909091,5891,R,0,3,3,true,true,true,true,false,false
+150001,202001,100,15,,1.285963763,1,0.917399451,181.0909091,5891,R,0,3,3,true,,true,true,false,false
 150001,202002,100,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,true,true,true,false,false,false
 150001,202003,100,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,true,true,true,false,false,false
 150001,202004,100,15,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,true,true,true,false,false,false
 150001,202005,100,15,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,2727,R,3,3,4,true,true,true,false,false,false
 150001,202006,100,15,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,true,true,true,false,false,false
-150001,202007,100,15,4.041049513,,2.111448113,1,152.5353535,9549,R,3,0,3,true,true,true,false,true,false
-150002,202001,100,5,,0.917723543,1,0.917399451,181.0909091,8611,R,0,3,3,true,true,true,true,false,false
+150001,202007,100,15,4.041049513,,2.111448113,1,152.5353535,9549,R,3,0,3,true,true,,false,true,false
+150002,202001,100,5,,0.917723543,1,0.917399451,181.0909091,8611,R,0,3,3,true,,true,true,false,false
 150002,202002,100,5,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,true,true,true,false,false,false
 150002,202003,100,5,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,true,true,true,false,false,false
 150002,202004,100,5,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,true,true,true,false,false,false
 150002,202005,100,5,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,9967,R,3,3,4,true,true,true,false,false,false
 150002,202006,100,5,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,true,true,true,false,false,false
-150002,202007,100,5,1.861450108,,2.111448113,1,152.5353535,2593,R,3,0,3,true,true,true,false,true,false
-150003,202001,100,79,,0.548511047,1,0.917399451,181.0909091,3426,R,0,3,3,true,true,true,true,false,false
+150002,202007,100,5,1.861450108,,2.111448113,1,152.5353535,2593,R,3,0,3,true,true,,false,true,false
+150003,202001,100,79,,0.548511047,1,0.917399451,181.0909091,3426,R,0,3,3,true,,true,true,false,false
 150003,202002,100,79,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,true,true,true,false,false,false
 150003,202003,100,79,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,true,true,true,false,false,false
 150003,202004,100,79,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,true,true,true,false,false,false
 150003,202005,100,79,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,5463,R,3,3,4,true,true,true,false,false,false
 150003,202006,100,79,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,true,true,true,false,false,false
-150003,202007,100,79,0.431844717,,2.111448113,1,152.5353535,2959,R,3,0,3,true,true,true,false,true,false
+150003,202007,100,79,0.431844717,,2.111448113,1,152.5353535,2959,R,3,0,3,true,true,,false,true,false
 150004,202001,100,69,,,1,0.917399451,181.0909091,13547.81819,BI,0,3,3,,,,true,false,false
 150004,202002,100,69,,,1.230132332,3.509418433,204.1414141,14767.63277,BI,3,3,3,,,,false,false,false
-150004,202003,100,69,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,true,true,true,false,false,false
-150004,202005,100,69,,,1.028150423,3.035462652,124.85119,2818,R,3,3,4,true,true,true,false,false,false
+150004,202003,100,69,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,true,,,false,false,false
+150004,202005,100,69,,,1.028150423,3.035462652,124.85119,2818,R,3,3,4,true,,,false,false,false
 150004,202006,100,69,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,,,,false,false,false
 150004,202007,100,69,,,2.111448113,1,152.5353535,4483.444383,FIR,3,0,3,,,,false,true,false
-150005,202001,100,85,,,1,0.917399451,181.0909091,150000,R,0,3,3,false,true,false,true,false,false
+150005,202001,100,85,,,1,0.917399451,181.0909091,150000,R,0,3,3,false,,false,true,false,false
 150005,202002,100,85,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,false,false,false,false,false,false
 150005,202003,100,85,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,false,false,false,false,false,false
 150005,202004,100,85,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,false,false,false,false,false,false
 150006,202005,100,85,,,1.028150423,3.035462652,124.85119,105000,R,3,3,4,false,false,false,false,false,false
 150006,202006,100,85,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,false,false,false,false,false,false
-150006,202007,100,85,,,2.111448113,1,152.5353535,160000,R,3,0,3,false,false,true,false,true,false
+150006,202007,100,85,,,2.111448113,1,152.5353535,160000,R,3,0,3,false,false,,false,true,false
 150007,202001,100,71,,,1,0.917399451,181.0909091,12857.45455,C,0,3,3,,,,true,false,false
 150007,202002,100,71,,,1.230132332,3.509418433,204.1414141,15816.37054,FIC,3,3,3,,,,false,false,false
 150007,202003,100,71,,,0.831168119,0.962881641,109.6130952,13146.06295,FIC,3,3,4,,,,false,false,false
 150007,202004,100,71,,,3.047553764,1.474655266,195.979798,40063.33362,FIC,3,3,3,,,,false,false,false
 150007,202005,100,71,,,1.028150423,3.035462652,124.85119,41191.13343,FIC,3,3,4,,,,false,false,false
 150007,202006,100,71,,,0.753512367,1.033441075,107.1515152,31038.02845,FIC,3,3,3,,,,false,false,false
-150007,202007,100,71,,,2.111448113,1,152.5353535,65535.18658,FIC,3,0,3,,,,false,true,false
\ No newline at end of file
+150007,202007,100,71,,,2.111448113,1,152.5353535,65535.18658,FIC,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
index eb0e2146..bcf946a6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,18 +1,18 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-200001,202001,100,56,,1.262441238,1,0.597514698,71.63436123,7788,R,0,4,4,true,true,true,true,false,false
+200001,202001,100,56,,1.262441238,1,0.597514698,71.63436123,7788,R,0,4,4,true,,true,true,false,false
 200001,202002,100,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,true,true,true,false,false,false
 200001,202003,100,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,true,true,true,false,false,false
-200001,202004,100,56,0.25617284,,0.276010255,1,42.68681319,1577,R,4,0,4,true,true,true,false,true,false
-200002,202001,100,75,,0.806244601,1,0.597514698,71.63436123,6533,R,0,4,4,true,true,true,true,false,false
+200001,202004,100,56,0.25617284,,0.276010255,1,42.68681319,1577,R,4,0,4,true,true,,false,true,false
+200002,202001,100,75,,0.806244601,1,0.597514698,71.63436123,6533,R,0,4,4,true,,true,true,false,false
 200002,202002,100,75,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,true,true,true,false,false,false
 200002,202003,100,75,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,true,true,true,false,false,false
-200002,202004,100,75,0.439419795,,0.276010255,1,42.68681319,2575,R,4,0,4,true,true,true,false,true,false
-200003,202001,100,10,,0.011249498,1,0.597514698,71.63436123,56,R,0,4,4,true,true,true,true,false,false
+200002,202004,100,75,0.439419795,,0.276010255,1,42.68681319,2575,R,4,0,4,true,true,,false,true,false
+200003,202001,100,10,,0.011249498,1,0.597514698,71.63436123,56,R,0,4,4,true,,true,true,false,false
 200003,202002,100,10,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,true,true,true,false,false,false
 200003,202003,100,10,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,true,true,true,false,false,false
-200003,202004,100,10,0.103224336,,0.276010255,1,42.68681319,906,R,4,0,4,true,true,true,false,true,false
-200004,202001,100,86,,0.310123457,1,0.597514698,71.63436123,1884,R,0,4,4,true,true,true,true,false,false
-200004,202002,100,86,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,true,true,true,false,false,false
+200003,202004,100,10,0.103224336,,0.276010255,1,42.68681319,906,R,4,0,4,true,true,,false,true,false
+200004,202001,100,86,,0.310123457,1,0.597514698,71.63436123,1884,R,0,4,4,true,,true,true,false,false
+200004,202002,100,86,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,true,true,,false,false,false
 200004,202003,100,86,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,,,,false,false,false
 200004,202004,100,86,,,0.276010255,1,42.68681319,1947.413826,FIR,4,0,4,,,,false,true,false
 200005,202001,100,6,,,1,0.597514698,71.63436123,429.8061674,C,0,4,4,,,,true,false,false
@@ -21,39 +21,39 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 200005,202004,100,6,,,0.276010255,1,42.68681319,3242.978608,FIC,4,0,4,,,,false,true,false
 200006,202001,100,41,,,1,0.597514698,71.63436123,5222.283092,BI,0,4,4,,,,true,false,false
 200006,202002,100,41,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,,,,false,false,false
-200006,202003,100,41,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,true,true,true,false,false,false
-200006,202004,100,41,0.305224049,,0.276010255,1,42.68681319,2711,R,4,0,4,true,true,true,false,true,false
-200007,202001,200,4,,0.252093023,1,2.163456777,132.3214286,2439,R,0,3,4,true,true,true,true,false,false
+200006,202003,100,41,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,true,,true,false,false,false
+200006,202004,100,41,0.305224049,,0.276010255,1,42.68681319,2711,R,4,0,4,true,true,,false,true,false
+200007,202001,200,4,,0.252093023,1,2.163456777,132.3214286,2439,R,0,3,4,true,,true,true,false,false
 200007,202002,200,4,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,true,true,true,false,false,false
 200007,202003,200,4,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,true,true,true,false,false,false
-200007,202004,200,4,0.084963587,,0.197315737,1,99.37735849,595,R,3,0,3,true,true,true,false,true,false
-200008,202001,200,4,,0.287290242,1,2.163456777,132.3214286,1849,R,0,3,4,true,true,true,true,false,false
+200007,202004,200,4,0.084963587,,0.197315737,1,99.37735849,595,R,3,0,3,true,true,,false,true,false
+200008,202001,200,4,,0.287290242,1,2.163456777,132.3214286,1849,R,0,3,4,true,,true,true,false,false
 200008,202002,200,4,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,true,true,true,false,false,false
 200008,202003,200,4,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,true,true,true,false,false,false
-200008,202004,200,4,0.280873416,,0.197315737,1,99.37735849,2727,R,3,0,3,true,true,true,false,true,false
-200009,202001,200,45,,5.950987066,1,2.163456777,132.3214286,8742,R,0,3,4,true,true,true,true,false,false
+200008,202004,200,4,0.280873416,,0.197315737,1,99.37735849,2727,R,3,0,3,true,true,,false,true,false
+200009,202001,200,45,,5.950987066,1,2.163456777,132.3214286,8742,R,0,3,4,true,,true,true,false,false
 200009,202002,200,45,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,true,true,true,false,false,false
 200009,202003,200,45,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,true,true,true,false,false,false
-200009,202004,200,45,0.226110207,,0.197315737,1,99.37735849,1945,R,3,0,3,true,true,true,false,true,false
+200009,202004,200,45,0.226110207,,0.197315737,1,99.37735849,1945,R,3,0,3,true,true,,false,true,false
 200010,202001,200,85,,,1,2.163456777,132.3214286,14038.67103,BI,0,3,4,,,,true,false,false
-200010,202002,200,85,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,true,true,true,false,false,false
-200010,202003,200,85,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,true,true,true,false,false,false
+200010,202002,200,85,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,true,,true,false,false,false
+200010,202003,200,85,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,true,true,,false,false,false
 200010,202004,200,85,,,0.197315737,1,99.37735849,354.3790633,FIR,3,0,3,,,,false,true,false
 200011,202001,200,79,,,1,2.163456777,132.3214286,4166.817753,BI,0,3,4,,,,true,false,false
-200011,202002,200,79,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,true,true,true,false,false,false
+200011,202002,200,79,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,true,,,false,false,false
 200011,202004,200,79,,,0.197315737,1,99.37735849,7850.811321,C,3,0,3,,,,false,true,false
-200012,202001,200,87,,,1,2.163456777,132.3214286,5495,R,0,3,4,true,true,true,true,false,false
+200012,202001,200,87,,,1,2.163456777,132.3214286,5495,R,0,3,4,true,,,true,false,false
 200012,202002,200,87,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5,,,,false,false,false
 200012,202003,200,87,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4,,,,false,false,false
 200012,202004,200,87,,,0.197315737,1,99.37735849,5755.871742,FIR,3,0,3,,,,false,true,false
-200013,202001,100,85,,,1,0.597514698,71.63436123,150000,R,0,4,4,false,true,false,true,false,false
+200013,202001,100,85,,,1,0.597514698,71.63436123,150000,R,0,4,4,false,,false,true,false,false
 200013,202002,100,85,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,false,false,false,false,false,false
 200013,202003,100,85,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,false,false,false,false,false,false
-200013,202004,100,85,,,0.276010255,1,42.68681319,105000,R,4,0,4,false,false,true,false,true,false
-200014,202001,200,96,,,1,2.163456777,132.3214286,150000,R,0,3,4,false,true,false,true,false,false
+200013,202004,100,85,,,0.276010255,1,42.68681319,105000,R,4,0,4,false,false,,false,true,false
+200014,202001,200,96,,,1,2.163456777,132.3214286,150000,R,0,3,4,false,,false,true,false,false
 200014,202002,200,96,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,false,false,false,false,false,false
 200014,202003,200,96,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,false,false,false,false,false,false
-200014,202004,200,96,,,0.197315737,1,99.37735849,105000,R,3,0,3,false,false,true,false,true,false
+200014,202004,200,96,,,0.197315737,1,99.37735849,105000,R,3,0,3,false,false,,false,true,false
 200015,202001,100,71,,,1,0.597514698,71.63436123,5086.039648,C,0,4,4,,,,true,false,false
 200015,202002,100,71,,,23.53745347,0.984013482,111.5638767,119712.4216,FIC,4,3,4,,,,false,false,false
 200015,202003,100,71,,,1.161413175,4.785815599,163.0494505,139035.5837,FIC,3,4,4,,,,false,false,false
@@ -61,4 +61,4 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 200016,202001,200,48,,,1,2.163456777,132.3214286,6351.428571,C,0,3,4,,,,true,false,false
 200016,202002,200,48,,,2.53854315,1.457061014,119.7926267,16123.37549,FIC,3,4,5,,,,false,false,false
 200016,202003,200,48,,,2.091207548,6.584230902,196.4492754,33717.32453,FIC,4,3,4,,,,false,false,false
-200016,202004,200,48,,,0.197315737,1,99.37735849,6652.958732,FIC,3,0,3,,,,false,true,false
\ No newline at end of file
+200016,202004,200,48,,,0.197315737,1,99.37735849,6652.958732,FIC,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index a2be0101..43718e8f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-230001,202001,1,10,,1.511049724,1,1.087985595,15.46666667,547,R,0,2,2,true,true,true,true,false,false
+230001,202001,1,10,,1.511049724,1,1.087985595,15.46666667,547,R,0,2,2,true,,true,true,false,false
 230001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,true,true,true,false,false,false
-230001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,895,R,2,0,2,true,true,true,false,true,false
-230002,202001,1,50,,0.664921466,1,1.087985595,15.46666667,381,R,0,2,2,true,true,true,true,false,false
+230001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,895,R,2,0,2,true,true,,false,true,false
+230002,202001,1,50,,0.664921466,1,1.087985595,15.46666667,381,R,0,2,2,true,,true,true,false,false
 230002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,true,true,true,false,false,false
-230002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,214,R,2,0,2,true,true,true,false,true,false
-230003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,961,R,0,2,2,true,true,true,true,false,false
+230002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,214,R,2,0,2,true,true,,false,true,false
+230003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,961,R,0,2,2,true,,true,true,false,false
 230003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,true,true,true,false,false,false
-230003,202003,2,12,1.176029963,,1.174002242,1,50,314,R,2,0,2,true,true,true,false,true,false
-230004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,555,R,0,2,2,true,true,true,true,false,false
+230003,202003,2,12,1.176029963,,1.174002242,1,50,314,R,2,0,2,true,true,,false,true,false
+230004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,555,R,0,2,2,true,,true,true,false,false
 230004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,true,true,true,false,false,false
-230004,202003,2,9,1.171974522,,1.174002242,1,50,736,R,2,0,2,true,true,true,false,true,false
+230004,202003,2,9,1.171974522,,1.174002242,1,50,736,R,2,0,2,true,true,,false,true,false
 230005,202001,1,18,,,1,1.087985595,15.46666667,278.4,C,0,2,2,,,,true,false,false
 230005,202002,2,18,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,,,,false,false,false
 230005,202003,2,18,,,1.174002242,1,50,900.627434,FIC,2,0,2,,,,false,true,false
-230006,202001,1,85,,,1,1.087985595,15.46666667,150000,R,0,2,2,false,true,false,true,false,false
+230006,202001,1,85,,,1,1.087985595,15.46666667,150000,R,0,2,2,false,,false,true,false,false
 230006,202002,1,85,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,false,false,false,false,false,false
-230006,202003,1,85,,,1.42292432,1,18.48333333,120000,R,2,0,2,false,false,true,false,true,false
+230006,202003,1,85,,,1.42292432,1,18.48333333,120000,R,2,0,2,false,false,,false,true,false
 230007,202001,1,71,,,1,1.087985595,15.46666667,1098.133333,C,0,2,2,,,,true,false,false
 230007,202002,1,71,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,,,,false,false,false
 230007,202003,1,71,,,1.42292432,1,18.48333333,1692.041117,FIC,2,0,2,,,,false,true,false
-230008,202001,2,85,,,1,2.241504449,72.19047619,150000,R,0,2,2,false,true,false,true,false,false
+230008,202001,2,85,,,1,2.241504449,72.19047619,150000,R,0,2,2,false,,false,true,false,false
 230008,202002,2,85,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,false,false,false,false,false,false
-230008,202003,2,85,,,1.174002242,1,50,120000,R,2,0,2,false,false,true,false,true,false
+230008,202003,2,85,,,1.174002242,1,50,120000,R,2,0,2,false,false,,false,true,false
 230009,202001,2,71,,,1,2.241504449,72.19047619,5125.52381,C,0,2,2,,,,true,false,false
 230009,202002,2,71,,,0.70468356,0.85178967,42.61904762,3611.872364,FIC,2,2,2,,,,false,false,false
-230009,202003,2,71,,,1.174002242,1,50,4240.346255,FIC,2,0,2,,,,false,true,false
\ No newline at end of file
+230009,202003,2,71,,,1.174002242,1,50,4240.346255,FIC,2,0,2,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index a080d061..64efa25d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,22 +1,22 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,true,true,true,false,false
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,true,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,true,true,true,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,,true,true,false,false
 110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,true,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,true,true,true,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,,true,true,false,false
 110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,true,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,true,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,,false,false,false
 110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,false,true,false
 110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,,,,true,true,false
 110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,,,,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,true,true,true,true,true,false
-110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,true,true,true,true,true,false
+110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,true,,,true,true,false
+110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,true,,,true,true,false
 110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,,,,true,true,true
 110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,,,,true,true,false
 110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,,,,true,true,false
 110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,,,,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,,,,true,true,false
\ No newline at end of file
+110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,,,,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index 134730d7..ccf61734 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,true,true,true,false,false
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,true,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,true,true,true,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,,true,true,false,false
 110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,true,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,true,true,true,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,,true,true,false,false
 110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,true,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,true,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,,false,false,false
 110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,false,true,false
 110005,202001,200,27,,,1,1,1,27,C,0,0,0,,,,true,true,true
 110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,,,,true,true,true
-110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,,,,true,true,true
\ No newline at end of file
+110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,,,,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index 274d9979..6ba38c84 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,21 +1,21 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,true,true,true,false,true
+120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,,true,true,false,true
 120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,true,true,true,false,false,true
 120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,true,true,true,false,false,true
 120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,true,true,true,false,false,true
-120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,true,true,true,false,true,true
-120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,true,true,true,true,false,true
+120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,true,true,,false,true,true
+120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,true,,true,true,false,true
 120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,true,true,true,false,false,true
 120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,true,true,true,false,false,true
 120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,true,true,true,false,false,true
-120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,true,true,true,false,true,true
-120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,true,true,true,true,false,true
+120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,true,true,,false,true,true
+120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,true,,true,true,false,true
 120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,true,true,true,false,false,true
 120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,true,true,true,false,false,true
 120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,true,true,true,false,false,true
-120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,true,true,true,false,true,true
+120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,true,true,,false,true,true
 120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,,,,true,false,true
 120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,,,,false,false,true
 120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,,,,false,false,true
 120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,,,,false,false,true
-120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,,,,false,true,true
\ No newline at end of file
+120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,,,,false,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index c2897c65..566fa334 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,true,true,true,false,false
+30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,true,false,true,false
-30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,true,true,true,true,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,true,true,false,true,false
-30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,true,true,true,true,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,true,true,false,true,false
-30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,true,true,true,true,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,true,,true,true,false,false
 30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,true,true,false,true,false
-30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,true,true,true,true,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,true,,true,true,false,false
 30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,true,true,false,true,false
-30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,true,true,true,true,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,true,,true,true,false,false
 30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,true,true,false,true,false
-30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,true,true,true,true,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,true,,true,true,false,false
 30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,true,true,false,true,false
-30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,true,true,true,true,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,true,,true,true,false,false
 30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,true,true,false,true,false
-30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,true,true,true,true,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,true,,true,true,false,false
 30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,true,false,true,false
-30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,true,true,true,true,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,true,,true,true,false,false
 30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,true,true,true,false,false,false
 30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,true,false,true,false
-30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,true,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,true,true,true,false,false,false
+30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,true,,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,true,,true,false,false,false
 30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,true,true,false,true,false
-30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,true,true,true,false,false
-30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,true,true,true,false,false,false
+30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,true,,true,false,false
+30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,true,,,false,false,false
 30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index 8c983b21..7135b049 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,false,true,true,true,true,false,false
+30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,false,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,false,false,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,false,,true,true,true,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,false,true,true,true,true,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,false,,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,false,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,false,false,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,false,,true,true,true,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,false,true,true,true,true,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,false,,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,false,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,false,false,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,false,,true,true,true,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,false,true,true,true,true,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,false,,true,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,false,true,,true,true,false,false
 30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,false,false,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,false,,true,true,true,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,false,true,true,true,true,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,false,,true,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,false,true,,true,true,false,false
 30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,false,false,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,false,,true,true,true,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,false,true,true,true,true,false,false
+30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,false,,true,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,false,true,,true,true,false,false
 30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,false,false,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,false,,true,true,true,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,false,true,true,true,true,false,false
+30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,false,,true,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,false,true,,true,true,false,false
 30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,false,false,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,false,,true,true,true,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,true,true,true,true,false,false
+30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,false,,true,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,true,,true,true,false,false
 30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,true,true,true,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,false,true,true,true,true,false,false
+30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,true,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,false,true,,true,true,false,false
 30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,false,false,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,false,,true,true,true,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,false,true,true,true,true,false,false
+30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,false,,true,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,false,true,,true,true,false,false
 30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,false,false,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,false,,true,true,true,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,true,true,true,true,true,false,false
+30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,false,,true,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,true,true,,true,true,false,false
 30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,true,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,true,,true,true,true,false,true,false
+30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,true,,true,true,,false,true,false
 30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,,,,true,false,false
 30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,,,,false,false,false
-30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,true,true,true,false,true,false
+30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index 5814dd96..d6c57b38 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,true,true,true,false,false
+30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,true,true,false,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,true,true,true,true,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,,true,false,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,true,true,true,false,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,true,true,true,true,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,true,,true,false,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,true,true,true,false,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,true,true,true,true,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,true,,true,false,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,true,,true,true,false,false
 30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,true,true,true,false,false
-30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,true,true,true,true,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,true,,true,false,false
+30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,true,,true,true,false,false
 30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,true,true,true,false,false
-30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,true,true,true,true,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,true,,true,false,false
+30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,true,,true,true,false,false
 30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,true,true,true,false,false
-30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,true,true,true,true,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,true,,true,false,false
+30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,true,,true,true,false,false
 30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,true,true,true,false,false
-30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,true,true,true,true,true,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,true,,true,false,false
+30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,true,true,,true,true,false,false
 30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,true,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,true,,true,true,true,true,false,false
-30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,true,true,true,true,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,true,,true,true,,true,false,false
+30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,true,,true,true,false,false
 30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,true,true,false,false
-30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,true,true,true,true,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,,true,false,false
+30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,true,,true,true,false,false
 30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,true,true,false,false
-30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,true,true,true,true,true,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,,true,false,false
+30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,true,true,,true,true,false,false
 30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,true,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,true,,true,true,true,true,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,true,,true,true,,true,false,false
 30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,,,,true,false,false
 30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,,,,false,false,false
 30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,,,,true,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index d9933b05..67427472 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,true,true,true,false,false
+30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,true,true,false,true,false
-30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,true,true,true,true,false,false
+30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,true,true,true,false,true,false
-30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,true,true,true,true,false,false
+30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,true,true,true,false,true,false
-30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,true,true,true,true,false,false
+30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,true,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,true,,true,true,false,false
 30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,true,true,true,false,true,false
-30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,true,true,true,true,false,false
+30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,true,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,true,,true,true,false,false
 30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,true,true,true,false,true,false
-30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,true,true,true,true,false,false
+30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,true,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,true,,true,true,false,false
 30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,true,true,true,false,true,false
-30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,true,true,true,true,false,false
+30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,true,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,true,,true,true,false,false
 30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,true,true,true,false,true,false
-30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,true,true,true,true,false,false
+30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,true,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,true,,true,true,false,false
 30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,true,true,true,false,true,false
-30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,true,true,true,true,false,false
+30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,true,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,true,,true,true,false,false
 30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,true,true,true,false,true,false
-30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,true,true,true,true,false,false
+30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,true,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,true,,true,true,false,false
 30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,true,true,true,false,true,false
-30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,true,true,true,true,false,false
+30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,true,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,true,,true,true,false,false
 30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,true,true,true,false,true,false
-30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,true,true,true,true,false,false
-30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,true,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,true,,true,true,false,false
+30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,true,true,,false,false,false
 30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index 7d32c3c4..d93d0ed9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,true,true,true,false,false
+30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,true,true,false,true,false
-30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,true,true,true,true,false,false
+30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,true,true,true,false,true,false
-30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,true,true,true,true,false,false
+30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,true,true,true,false,true,false
-30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,true,true,true,true,false,false
+30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,true,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,true,,true,true,false,false
 30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,true,true,true,false,true,false
-30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,true,true,true,true,false,false
+30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,true,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,true,,true,true,false,false
 30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,true,true,true,false,true,false
-30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,true,true,true,true,false,false
+30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,true,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,true,,true,true,false,false
 30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,true,true,true,false,true,false
-30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,true,true,true,true,false,false
+30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,true,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,true,,true,true,false,false
 30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,true,true,true,false,true,false
-30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,true,true,true,true,true,false,false
+30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,true,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,true,true,,true,true,false,false
 30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,true,,true,true,true,false,true,false
-30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,true,true,true,true,false,false
+30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,true,,true,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,true,,true,true,false,false
 30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,true,true,true,false,true,false
-30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,true,true,true,true,false,false
+30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,true,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,true,,true,true,false,false
 30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,true,true,true,false,true,false
-30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,false,true,true,true,true,false,false
+30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,true,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,false,true,,true,true,false,false
 30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,true,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,false,,true,true,true,false,true,false
-30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,true,true,true,true,false,false
-30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,false,,true,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,true,,true,true,false,false
+30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,true,true,,false,false,false
 30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index f330b8b8..e462cada 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,true,true,true,false,false
+30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,true,false,true,false
-30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,true,true,true,true,false,false
+30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,true,true,false,true,false
-30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,true,true,true,true,false,false
+30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,true,true,false,true,false
-30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,true,true,true,true,false,false
+30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,true,,true,true,false,false
 30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,true,true,false,true,false
-30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,true,true,true,true,false,false
+30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,true,,true,true,false,false
 30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,true,true,false,true,false
-30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,true,true,true,true,false,false
+30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,true,,true,true,false,false
 30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,true,true,false,true,false
-30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,true,true,true,true,false,false
+30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,true,,true,true,false,false
 30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,true,true,false,true,false
-30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,true,true,true,true,false,false
+30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,true,,true,true,false,false
 30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,true,true,false,true,false
-30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,true,true,true,true,false,false
+30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,true,,true,true,false,false
 30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,true,true,false,true,false
-30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,true,true,true,true,false,false
-30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,true,,true,true,false,false
+30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,true,true,,false,false,false
 30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
index c6926f7b..c6f8004c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.773194,96.75644,8444,R,0,9,12,,true,true,true,true,true,false,false
+30001,202001,100,51,,1.129481006,1,1.773194,96.75644,8444,R,0,9,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,3.889877,2.962348,81.65588616,7476,R,9,10,11,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.495827,1,76.108808,2003,R,10,0,11,true,,true,true,true,false,true,false
-30002,202001,100,72,,1.195062676,1,1.773194,96.75644,9343,R,0,9,12,,true,true,true,true,true,false,false
+30001,202003,100,51,0.267924024,,1.495827,1,76.108808,2003,R,10,0,11,true,,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.773194,96.75644,9343,R,0,9,12,,true,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,3.889877,2.962348,81.65588616,7818,R,9,10,11,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.495827,1,76.108808,4897,R,10,0,11,true,,true,true,true,false,true,false
-30003,202001,100,7,,4.265190233,1,1.773194,96.75644,7511,R,0,9,12,,true,true,true,true,true,false,false
+30002,202003,100,72,0.626375032,,1.495827,1,76.108808,4897,R,10,0,11,true,,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.773194,96.75644,7511,R,0,9,12,,true,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,3.889877,2.962348,81.65588616,1761,R,9,10,11,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.495827,1,76.108808,6492,R,10,0,11,true,,true,true,true,false,true,false
-30004,202001,100,81,,,1,1.773194,96.75644,64,R,0,9,12,,,true,true,false,true,false,false
+30003,202003,100,7,3.686541738,,1.495827,1,76.108808,6492,R,10,0,11,true,,true,true,,false,true,false
+30004,202001,100,81,,,1,1.773194,96.75644,64,R,0,9,12,,,true,,false,true,false,false
 30004,202002,100,81,,,3.889877,2.962348,81.65588616,2113,R,9,10,11,,,false,true,true,false,false,false
-30004,202003,100,81,,,1.495827,1,76.108808,185,R,10,0,11,,,true,false,true,false,true,false
-30005,202001,100,5,,0.940914,1,1.773194,96.75644,844,R,0,9,12,,true,true,true,true,true,false,false
+30004,202003,100,81,,,1.495827,1,76.108808,185,R,10,0,11,,,true,false,,false,true,false
+30005,202001,100,5,,0.940914,1,1.773194,96.75644,844,R,0,9,12,,true,true,,true,true,false,false
 30005,202002,100,5,1.062796,3.203571,3.889877,2.962348,81.65588616,897,R,9,10,11,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.495827,1,76.108808,280,R,10,0,11,true,,true,true,true,false,true,false
-30006,202001,100,14,,0.996269,1,1.773194,96.75644,1869,R,0,9,12,,true,true,true,true,true,false,false
+30005,202003,100,5,0.312152,,1.495827,1,76.108808,280,R,10,0,11,true,,true,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.773194,96.75644,1869,R,0,9,12,,true,true,,true,true,false,false
 30006,202002,100,14,1.003745,1.368344,3.889877,2.962348,81.65588616,1876,R,9,10,11,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.495827,1,76.108808,1371,R,10,0,11,true,,true,true,true,false,true,false
-30007,202001,100,12,,4.47564,1,1.773194,96.75644,12769,R,0,9,12,,true,true,true,true,true,false,false
+30006,202003,100,14,0.73081,,1.495827,1,76.108808,1371,R,10,0,11,true,,true,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.773194,96.75644,12769,R,0,9,12,,true,true,,true,true,false,false
 30007,202002,100,12,0.223432,0.248281,3.889877,2.962348,81.65588616,2853,R,9,10,11,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.495827,1,76.108808,11491,R,10,0,11,true,,true,true,true,false,true,false
-30008,202001,100,162,,0.023496,1,1.773194,96.75644,141,R,0,9,12,,false,true,true,true,true,false,false
+30007,202003,100,12,4.02769,,1.495827,1,76.108808,11491,R,10,0,11,true,,true,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.773194,96.75644,141,R,0,9,12,,false,true,,true,true,false,false
 30008,202002,100,162,42.560284,13.859122,3.889877,2.962348,81.65588616,6001,R,9,10,11,false,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.495827,1,76.108808,433,R,10,0,11,true,,true,true,true,false,true,false
-30009,202001,100,26,,1.589547,1,1.773194,96.75644,6417,R,0,9,12,,true,true,true,true,true,false,false
+30008,202003,100,162,0.072155,,1.495827,1,76.108808,433,R,10,0,11,true,,true,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.773194,96.75644,6417,R,0,9,12,,true,true,,true,true,false,false
 30009,202002,100,26,0.62911,3.053707,3.889877,2.962348,81.65588616,4037,R,9,10,11,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.495827,1,76.108808,1322,R,10,0,11,true,,true,true,true,false,true,false
-30010,202001,100,144,,1.332612,1,1.773194,96.75644,28963,R,0,9,12,,true,true,true,true,true,false,false
+30009,202003,100,26,0.327471,,1.495827,1,76.108808,1322,R,10,0,11,true,,true,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.773194,96.75644,28963,R,0,9,12,,true,true,,true,true,false,false
 30010,202002,100,144,0.750406,2.064204,3.889877,2.962348,81.65588616,21734,R,9,10,11,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.495827,1,76.108808,10529,R,10,0,11,true,,true,true,true,false,true,false
-30011,202001,100,5,,5.248035,1,1.773194,96.75644,6009,R,0,9,12,,false,true,true,true,true,false,false
+30010,202003,100,144,0.484448,,1.495827,1,76.108808,10529,R,10,0,11,true,,true,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.773194,96.75644,6009,R,0,9,12,,false,true,,true,true,false,false
 30011,202002,100,5,0.190548,0.226106,3.889877,2.962348,81.65588616,1145,R,9,10,11,false,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.495827,1,76.108808,5064,R,10,0,11,true,,true,true,true,false,true,false
-30012,202001,100,275,,0.034034,1,1.773194,96.75644,256,R,0,9,12,,true,true,true,true,true,false,false
-30012,202002,100,275,29.382813,,3.889877,2.962348,81.65588616,7522,R,9,10,11,true,,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.495827,1,76.108808,5064,R,10,0,11,true,,true,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.773194,96.75644,256,R,0,9,12,,true,true,,true,true,false,false
+30012,202002,100,275,29.382813,,3.889877,2.962348,81.65588616,7522,R,9,10,11,true,,true,true,,false,false,false
 30012,202003,100,275,,,1.495827,1,76.108808,11251.613766,FIR,10,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index aac76509..72917b0e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,73 +1,73 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,true,true,true,false,false
+80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,,true,true,false,false
 80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,true,true,true,false,false,false
-80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,true,true,false,true,false
-80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,true,true,true,true,false,false
+80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,true,,false,true,false
+80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,true,,true,true,false,false
 80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,true,true,true,false,false,false
-80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,true,true,true,false,true,false
-80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,true,true,true,true,false,false
+80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,true,true,,false,true,false
+80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,true,,true,true,false,false
 80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,true,true,true,false,false,false
-80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,true,true,true,false,true,false
-80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,true,true,true,true,false,false
+80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,true,true,,false,true,false
+80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,true,,true,true,false,false
 80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,true,true,true,false,false,false
-80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,true,true,true,false,true,false
-80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,true,true,true,true,false,false
+80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,true,true,,false,true,false
+80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,true,,true,true,false,false
 80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,true,true,true,false,false,false
-80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,true,,true,true,true,false,true,false
-80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,true,true,true,true,false,false
+80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,true,,true,true,,false,true,false
+80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,true,,true,true,false,false
 80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,true,true,true,false,false,false
-80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,true,true,true,false,true,false
-80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,true,true,true,true,false,false
+80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,true,true,,false,true,false
+80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,true,,true,true,false,false
 80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,true,true,true,false,false,false
-80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,true,true,true,false,true,false
-80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,true,true,true,true,false,false
+80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,true,true,,false,true,false
+80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,true,,true,true,false,false
 80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,true,true,true,false,false,false
-80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,true,true,true,false,true,false
-80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,true,true,true,true,false,false
+80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,true,true,,false,true,false
+80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,true,,true,true,false,false
 80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,true,true,true,false,false,false
-80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,true,true,true,false,true,false
-80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,true,true,true,true,false,false
+80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,true,true,,false,true,false
+80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,true,,true,true,false,false
 80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,true,true,true,false,false,false
-80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,false,,true,true,true,false,true,false
-80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,true,true,true,true,false,false
+80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,false,,true,true,,false,true,false
+80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,true,,true,true,false,false
 80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,true,true,true,false,false,false
-80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,true,true,true,false,true,false
-80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,true,true,true,true,false,false
-80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,true,true,true,false,false,false
+80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,true,true,,false,true,false
+80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,true,,true,true,false,false
+80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,true,true,,false,false,false
 80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,,,,false,true,false
-80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,true,true,true,false,false
+80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,,true,true,false,false
 80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,true,true,true,false,false,false
-80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,true,true,true,false,true,false
-80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,true,true,true,false,false
+80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,true,true,,false,true,false
+80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,,true,true,false,false
 80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,true,true,true,false,false,false
-80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,true,true,true,false,true,false
-80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,true,true,true,false,false
+80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,true,true,,false,true,false
+80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,,true,true,false,false
 80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,true,true,true,false,false,false
-80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,true,true,true,false,true,false
-80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,true,true,true,false,false
+80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,true,true,,false,true,false
+80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,,true,true,false,false
 80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,true,true,true,false,false,false
-80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,true,true,true,false,true,false
-80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,true,true,true,false,false
+80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,true,true,,false,true,false
+80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,,true,true,false,false
 80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,true,true,true,false,false,false
-80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,true,true,true,false,true,false
-80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,true,true,true,false,false
+80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,true,true,,false,true,false
+80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,,true,true,false,false
 80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,true,true,true,false,false,false
-80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,true,true,true,false,true,false
-80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,true,true,true,false,false
+80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,true,true,,false,true,false
+80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,,true,true,false,false
 80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,true,true,true,false,false,false
-80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,true,true,true,false,true,false
-80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,true,true,true,false,false
+80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,true,true,,false,true,false
+80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,,true,true,false,false
 80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,true,true,true,false,false,false
-80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,true,true,true,false,true,false
-80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,true,true,true,false,false
+80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,true,true,,false,true,false
+80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,,true,true,false,false
 80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,true,true,true,false,false,false
-80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,true,true,true,false,true,false
-80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,true,true,true,false,false
+80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,true,true,,false,true,false
+80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,,true,true,false,false
 80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,true,true,true,false,false,false
-80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,true,true,true,false,true,false
-80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,true,true,true,false,false
+80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,true,true,,false,true,false
+80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,,true,true,false,false
 80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,true,true,true,false,false,false
-80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,true,true,true,false,true,false
+80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,true,true,,false,true,false
 80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,,,,true,false,false
-80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,true,true,true,false,false,false
-80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,true,true,true,false,true,false
+80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,true,,true,false,false,false
+80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,true,true,,false,true,false

From 52a008c5126d1ae27a14a44d918d6e83fe66c254 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 10 May 2023 16:11:10 +0100
Subject: [PATCH 274/531] References must be unique within a period and
 grouping

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 39fd11aa..2aafe17e 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -140,7 +140,7 @@ def impute(
         input_df,
         input_params,
         type_mapping,
-        ["ref", "period"],
+        ["ref", "period", "grouping"],
         ["target", "forward", "backward", "construction"],
     )
 

From 5e085344d5af3b2a412ab1a0ee60de42c0c7bd34 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 10 May 2023 18:13:34 +0100
Subject: [PATCH 275/531] Test Updates

---
 .../imputation/ratio_calculators.py           | 28 +++----
 .../methodology_scenarios/01_C_output.csv     |  2 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  2 +-
 .../03_R_R_FI_output.csv                      |  2 +-
 .../04_R_R_FI_FI_output.csv                   |  2 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  2 +-
 .../06_BI_BI_R_output.csv                     |  2 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  2 +-
 .../methodology_scenarios/08_R_R_R_output.csv |  2 +-
 .../09_R_NS_C_output.csv                      |  2 +-
 .../10_C_FI_NS_R_output.csv                   |  2 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  2 +-
 .../12_C_FI_FI_FI_FI_output.csv               |  2 +-
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  2 +-
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  2 +-
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  2 +-
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  2 +-
 .../17_NS_R_FI_NS_output.csv                  |  2 +-
 .../18_NS_BI_R_NS_output.csv                  |  2 +-
 .../20_mixed_data_output.csv                  |  4 +-
 .../21_class_change_R_C_FI_output.csv         |  2 +-
 .../22_class_change_C_BI_R_output.csv         |  2 +-
 .../23_class_change_C_C_FI_output.csv         |  2 +-
 .../24_class_change_R_BI_R_output.csv         |  2 +-
 .../25_class_change_C_FI_FI_output.csv        |  2 +-
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv | 18 ++--
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv | 22 ++---
 .../28_link_columns_filtered_output.csv       | 30 +++----
 .../29_mixed_data_filtered_output.csv         | 22 ++---
 ...30_class_change_C_C_FI_filtered_output.csv |  2 +-
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  2 +-
 .../32_C_FI_FI_no_response_output.csv         |  2 +-
 .../34_default_link_output.csv                |  2 +-
 .../35_TB_10_R_R_FI_output.csv                |  2 +-
 .../36_TB_10_BI_BI_R_output.csv               |  2 +-
 .../37_TB_10_C_FI_FI_output.csv               |  2 +-
 .../38_T_10_R_R_FI_output.csv                 |  2 +-
 .../39_B_10_R_R_FI_output.csv                 |  2 +-
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  2 +-
 .../41_TB_10_R_R_FI_filtered_output.csv       |  2 +-
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         |  2 +-
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 84 +++++++++----------
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 84 +++++++++----------
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv | 50 +++++------
 .../46_TB_10_BI_BI_R_filtered_output.csv      | 84 +++++++++----------
 .../methodology_scenarios/47_TB_50_output.csv | 50 +++++------
 ...BI_BI_R-R_R_FI_filtered_default_output.csv | 28 +++----
 ...-BI_R_R_50_weight_previous_month_input.csv | 50 +++++------
 ...BI_R_R_50_weight_previous_month_output.csv | 50 +++++------
 .../50_R_R_FI_50_weight_output.csv            | 20 ++---
 .../51_R_R_FI_80_weight_output.csv            |  2 +-
 .../52_BI_BI_R_50_weight_output.csv           |  2 +-
 .../53_C_FI_FI_50_weight_output.csv           |  2 +-
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  2 +-
 .../55_R_R_FI_50_weight_default_output.csv    |  2 +-
 .../56_BI_BI_R_50_weight_default_output.csv   |  2 +-
 .../57_C_FI_FI_50_weight_default_output.csv   |  2 +-
 ...I_R_R_50_weight_partial_default_output.csv |  2 +-
 .../59_class_change_50_weight_output.csv      |  2 +-
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv |  2 +-
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv |  2 +-
 .../62_mixed_data_50_weight_output.csv        |  2 +-
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv |  2 +-
 .../64_TB_10_C_FI_FI_50_weight_output.csv     |  2 +-
 ...B_10_BI_BI_R_50_weight_filtered_output.csv |  2 +-
 ...weight_filtered_partial_default_output.csv |  2 +-
 ...50_weight_filtered_full_default_output.csv |  2 +-
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv |  2 +-
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv |  2 +-
 ...FI_FI_R_FI_alternating_filtered_output.csv |  2 +-
 tests/imputation/mean_of_ratios.toml          |  2 +-
 tests/imputation/test_mean_of_ratios.py       | 20 ++---
 72 files changed, 378 insertions(+), 378 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index aa43f670..c5c7269c 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -31,8 +31,8 @@ def mean_of_ratios(
     include_zeros: Optional[bool] = False,
     growth_forward_col: Optional[str] = "growth_forward",
     growth_backward_col: Optional[str] = "growth_backward",
-    link_inclusion_forward_col: Optional[str] = "link_inclusion_forward",
-    link_inclusion_backward_col: Optional[str] = "link_inclusion_backward",
+    link_inclusion_previous_col: Optional[str] = "link_inclusion_previous",
+    link_inclusion_next_col: Optional[str] = "link_inclusion_next",
     trim_inclusion_forward_col: Optional[str] = "trim_inclusion_forward",
     trim_inclusion_backward_col: Optional[str] = "trim_inclusion_backward",
     **_kwargs,
@@ -66,14 +66,14 @@ def mean_of_ratios(
                    WHEN previous.match IS NULL THEN NULL
                    ELSE previous.match
                 END
-            AS link_inclusion_forward"""
+            AS link_inclusion_previous"""
         ),
         expr(
             """CASE
                    WHEN next.match IS NULL THEN NULL
                    ELSE next.match
                 END
-            AS link_inclusion_backward"""
+            AS link_inclusion_next"""
         ),
     ).selectExpr(
         "period",
@@ -81,10 +81,10 @@ def mean_of_ratios(
         "ref",
         "aux",
         "current_output",
-        "link_inclusion_forward",
-        "link_inclusion_backward",
+        "link_inclusion_previous",
+        "link_inclusion_next",
         """CASE
-                WHEN link_inclusion_forward THEN CASE
+                WHEN link_inclusion_previous THEN CASE
                     WHEN previous_output = 0 OR
                     (current_output = 0 AND previous_output IS NOT NULL)
                     THEN 1
@@ -92,7 +92,7 @@ def mean_of_ratios(
                 END
             END AS growth_forward""",
         """CASE
-                WHEN link_inclusion_backward
+                WHEN link_inclusion_next
                 THEN CASE
                     WHEN
                         next_output = 0
@@ -132,13 +132,13 @@ def upper_bound(c):
                         ),
                         expr(
                             """
-                            sum(cast(not link_inclusion_forward AS integer))
+                            sum(cast(not link_inclusion_previous AS integer))
                             AS count_exclusion_forward
                             """
                         ),
                         expr(
                             """
-                            sum(cast(not link_inclusion_backward AS integer))
+                            sum(cast(not link_inclusion_next AS integer))
                             AS count_exclusion_backward
                             """
                         ),
@@ -256,14 +256,14 @@ def upper_bound(c):
         "grouping",
         "growth_forward",
         "growth_backward",
-        "link_inclusion_forward",
-        "link_inclusion_backward",
+        "link_inclusion_previous",
+        "link_inclusion_next",
     ]
     growth_additional_outputs = {
         "growth_forward": growth_forward_col,
         "growth_backward": growth_backward_col,
-        "link_inclusion_forward": link_inclusion_forward_col,
-        "link_inclusion_backward": link_inclusion_backward_col,
+        "link_inclusion_previous": link_inclusion_previous_col,
+        "link_inclusion_next": link_inclusion_next_col,
     }
 
     if lower_trim is not None:
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index a96594e1..158cec5b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
 10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
 10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 90cc3a17..ec9f2ae5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,,true,true,false,false
 20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,true,,false,true,false
 20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,,true,true,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 13991ffc..396436ed 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,,true,true,false,false
 30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
 30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index 380c314c..393efa03 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,,true,true,false,false
 40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
 40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 9cae2220..d183f1d5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,,true,true,false,false
 50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
 50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index c830cea3..806b6070 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,,true,true,false,false
 60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
 60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index bc379870..92af90fb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,,true,true,false,false
 70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
 70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index 4eb80d70..ab83a9cf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,,true,true,false,false
 80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
 80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 424ea7de..139b9220 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,,true,true,false,false
 90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
 90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index 28d5e0de..6de8b836 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,,true,true,false,false
 100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
 100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index f927300e..f88a9252 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,,true,true,false,false
 110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 77b58dbc..f887b49d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,,true,true,false,false
 120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
 120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 48ef0b7c..e467d695 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,,true,true,false,false
 130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
 130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 55b24189..3ec40b3a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,,true,true,false,false
 140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
 140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 3fc665fd..906062b6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,,true,true,false,false
 150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
 150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 9143b537..74701d14 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,,true,true,false,false
 160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
 160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 363b3bde..ec4d3ab4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,,true,true,false,false
 170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
 170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index e7bcdfa4..fba55448 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,,true,true,false,false
 180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
 180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index 26859047..bf545501 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,,true,true,false,false
 200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
 200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
@@ -16,7 +16,7 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,false,false,false
 200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,,,,false,true,false
 200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,,,,true,false,false
-200005,202002,100,6,10116.542669,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,false,false,false
+200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,false,false,false
 200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,false,false,false
 200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,,,,false,true,false
 200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,,,,true,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 6477b8c7..aad1aed0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 1e5d46f7..402cea36 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
 220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 5f1b78dc..2aaf95d9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
 230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index f3f8133a..b744c090 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 46d449ff..215db47e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index fef23ada..de6b44e9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 140001,202001,100,27,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,true,,true,true,false,false
 140001,202002,100,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,true,true,true,false,false,false
 140001,202003,100,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,true,true,true,false,false,false
@@ -23,8 +23,8 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 140004,202001,100,28,,,1,0.534118956,47.13567839,1319.798995,C,0,3,3,,,,true,false,false
 140004,202002,100,28,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,,,,false,false,false
 140004,202003,100,28,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,,,,false,false,false
-140004,202005,100,28,,,1.108042751,0.497376695,63.63316583,13403.57248,BI,3,3,3,,,,false,false,false
-140004,202006,100,28,,,2.988483968,3.720631427,127.0854271,26948.53343,BI,3,3,3,,,,false,false,false
+140004,202005,100,28,,,1.108042751,0.497376695,63.63316583,13403.572478,BI,3,3,3,,,,false,false,false
+140004,202006,100,28,,,2.988483968,3.720631427,127.0854271,26948.533427,BI,3,3,3,,,,false,false,false
 140004,202007,100,28,,,0.520242185,1,91.63876652,7243,R,3,0,4,true,,,false,true,false
 140005,202001,100,85,,,1,0.534118956,47.13567839,150000,R,0,3,3,false,,false,true,false,false
 140005,202002,100,85,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,false,false,false,false,false,false
@@ -34,9 +34,9 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 140005,202006,100,85,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,false,false,false,false,false,false
 140005,202007,100,85,,,0.520242185,1,91.63876652,160000,R,3,0,4,false,false,,false,true,false
 140006,202001,100,71,,,1,0.534118956,47.13567839,3346.633166,C,0,3,3,,,,true,false,false
-140006,202002,100,71,,,6.772539383,3.563193687,97.52261307,22665.20492,FIC,3,3,3,,,,false,false,false
-140006,202003,100,71,,,0.700853626,0.84489759,62.64321608,15884.99106,FIC,3,3,3,,,,false,false,false
-140006,202004,100,71,,,3.724667279,2.674093602,95.10050251,59166.30642,FIC,3,3,3,,,,false,false,false
-140006,202005,100,71,,,1.108042751,0.497376695,63.63316583,65558.79694,FIC,3,3,3,,,,false,false,false
-140006,202006,100,71,,,2.988483968,3.720631427,127.0854271,195921.4136,FIC,3,3,3,,,,false,false,false
-140006,202007,100,71,,,0.520242185,1,91.63876652,101926.5843,FIC,3,0,4,,,,false,true,false
+140006,202002,100,71,,,6.772539383,3.563193687,97.52261307,22665.204916,FIC,3,3,3,,,,false,false,false
+140006,202003,100,71,,,0.700853626,0.84489759,62.64321608,15884.991057,FIC,3,3,3,,,,false,false,false
+140006,202004,100,71,,,3.724667279,2.674093602,95.10050251,59166.306423,FIC,3,3,3,,,,false,false,false
+140006,202005,100,71,,,1.108042751,0.497376695,63.63316583,65558.796938,FIC,3,3,3,,,,false,false,false
+140006,202006,100,71,,,2.988483968,3.720631427,127.0854271,195921.413606,FIC,3,3,3,,,,false,false,false
+140006,202007,100,71,,,0.520242185,1,91.63876652,101926.584286,FIC,3,0,4,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index 2f49f86b..7e3d28fa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 150001,202001,100,15,,1.285963763,1,0.917399451,181.0909091,5891,R,0,3,3,true,,true,true,false,false
 150001,202002,100,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,true,true,true,false,false,false
 150001,202003,100,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,true,true,true,false,false,false
@@ -20,8 +20,8 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 150003,202005,100,79,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,5463,R,3,3,4,true,true,true,false,false,false
 150003,202006,100,79,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,true,true,true,false,false,false
 150003,202007,100,79,0.431844717,,2.111448113,1,152.5353535,2959,R,3,0,3,true,true,,false,true,false
-150004,202001,100,69,,,1,0.917399451,181.0909091,13547.81819,BI,0,3,3,,,,true,false,false
-150004,202002,100,69,,,1.230132332,3.509418433,204.1414141,14767.63277,BI,3,3,3,,,,false,false,false
+150004,202001,100,69,,,1,0.917399451,181.0909091,13547.818191,BI,0,3,3,,,,true,false,false
+150004,202002,100,69,,,1.230132332,3.509418433,204.1414141,14767.632765,BI,3,3,3,,,,false,false,false
 150004,202003,100,69,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,true,,,false,false,false
 150004,202005,100,69,,,1.028150423,3.035462652,124.85119,2818,R,3,3,4,true,,,false,false,false
 150004,202006,100,69,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,,,,false,false,false
@@ -29,14 +29,14 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 150005,202001,100,85,,,1,0.917399451,181.0909091,150000,R,0,3,3,false,,false,true,false,false
 150005,202002,100,85,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,false,false,false,false,false,false
 150005,202003,100,85,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,false,false,false,false,false,false
-150005,202004,100,85,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,false,false,false,false,false,false
-150006,202005,100,85,,,1.028150423,3.035462652,124.85119,105000,R,3,3,4,false,false,false,false,false,false
+150005,202004,100,85,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,false,false,,false,false,false
+150006,202005,100,85,,,1.028150423,3.035462652,124.85119,105000,R,3,3,4,false,,false,false,false,false
 150006,202006,100,85,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,false,false,false,false,false,false
 150006,202007,100,85,,,2.111448113,1,152.5353535,160000,R,3,0,3,false,false,,false,true,false
-150007,202001,100,71,,,1,0.917399451,181.0909091,12857.45455,C,0,3,3,,,,true,false,false
-150007,202002,100,71,,,1.230132332,3.509418433,204.1414141,15816.37054,FIC,3,3,3,,,,false,false,false
-150007,202003,100,71,,,0.831168119,0.962881641,109.6130952,13146.06295,FIC,3,3,4,,,,false,false,false
-150007,202004,100,71,,,3.047553764,1.474655266,195.979798,40063.33362,FIC,3,3,3,,,,false,false,false
-150007,202005,100,71,,,1.028150423,3.035462652,124.85119,41191.13343,FIC,3,3,4,,,,false,false,false
-150007,202006,100,71,,,0.753512367,1.033441075,107.1515152,31038.02845,FIC,3,3,3,,,,false,false,false
+150007,202001,100,71,,,1,0.917399451,181.0909091,12857.454545,C,0,3,3,,,,true,false,false
+150007,202002,100,71,,,1.230132332,3.509418433,204.1414141,15816.370544,FIC,3,3,3,,,,false,false,false
+150007,202003,100,71,,,0.831168119,0.962881641,109.6130952,13146.062949,FIC,3,3,4,,,,false,false,false
+150007,202004,100,71,,,3.047553764,1.474655266,195.979798,40063.333624,FIC,3,3,3,,,,false,false,false
+150007,202005,100,71,,,1.028150423,3.035462652,124.85119,41191.133429,FIC,3,3,4,,,,false,false,false
+150007,202006,100,71,,,0.753512367,1.033441075,107.1515152,31038.028445,FIC,3,3,3,,,,false,false,false
 150007,202007,100,71,,,2.111448113,1,152.5353535,65535.18658,FIC,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
index 6f042ba7..a324f3d5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,,1.853682946,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
+190001,202001,100,95,,1.853682946,1,0.9214,50.3694,9261,R,0,0,0,false,false,false
 190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
 190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
-190001,202004,100,95,2.939189189,,1.113,1,110.5473,4350,R,0,0,0,false,true,false
+190001,202004,100,95,2.939189189,,1.113,1,110.5473,4350,R,0,0,0,false,false,false
 190002,202001,100,17,,0.562673451,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
 190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
 190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
-190002,202004,100,17,11.26857143,,1.113,1,110.5473,700,R,0,0,0,false,true,false
-190003,202001,100,64,,1.870080607,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
+190002,202004,100,17,11.26857143,,1.113,1,110.5473,700,R,0,0,0,false,false,false
+190003,202001,100,64,,1.870080607,1,0.9214,50.3694,7888,R,0,0,0,false,false,false
 190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
 190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
-190003,202004,100,64,0.537083388,,1.113,1,110.5473,4077,R,0,0,0,false,true,false
-190004,202001,100,51,,,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
+190003,202004,100,64,0.537083388,,1.113,1,110.5473,4077,R,0,0,0,false,false,false
+190004,202001,100,51,,,1,0.9214,50.3694,2247,R,0,0,0,false,false,false
 190004,202002,100,51,,,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
 190004,202003,100,51,,,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
-190004,202004,100,51,,,1.113,1,110.5473,8608,R,0,0,0,false,true,false
-190005,202001,100,34,,,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
+190004,202004,100,51,,,1.113,1,110.5473,8608,R,0,0,0,false,false,false
+190005,202001,100,34,,,1,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false
 190005,202002,100,34,,,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
 190005,202003,100,34,,0.867939229,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
-190005,202004,100,34,1.152154399,,1.113,1,110.5473,5134,R,0,0,0,false,true,false
-190006,202001,100,8,,,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
+190005,202004,100,34,1.152154399,,1.113,1,110.5473,5134,R,0,0,0,false,false,false
+190006,202001,100,8,,,1,0.9214,50.3694,402.9552,C,0,0,0,false,false,false
 190006,202002,100,8,,,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
 190006,202003,100,8,,,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
-190006,202004,100,8,,,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
-190007,202001,100,85,,,1,0.9214,50.3694,150000,R,0,0,0,true,false,false
+190006,202004,100,8,,,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,false,false
+190007,202001,100,85,,,1,0.9214,50.3694,150000,R,0,0,0,false,false,false
 190007,202002,100,85,,,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false
 190007,202003,100,85,,,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false
-190007,202004,100,85,,,1.113,1,110.5473,180000,R,0,0,0,false,true,false
-190008,202001,100,71,,,1,0.9214,50.3694,3576.2274,C,0,0,0,true,false,false
+190007,202004,100,85,,,1.113,1,110.5473,180000,R,0,0,0,false,false,false
+190008,202001,100,71,,,1,0.9214,50.3694,3576.2274,C,0,0,0,false,false,false
 190008,202002,100,71,,,0.8521,1.5274,121.4187,3047.303368,FIC,0,0,0,false,false,false
 190008,202003,100,71,,,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false
-190008,202004,100,71,,,1.113,1,110.5473,3284.811716,FIC,0,0,0,false,true,false
+190008,202004,100,71,,,1.113,1,110.5473,3284.811716,FIC,0,0,0,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
index bcf946a6..093c7898 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 200001,202001,100,56,,1.262441238,1,0.597514698,71.63436123,7788,R,0,4,4,true,,true,true,false,false
 200001,202002,100,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,true,true,true,false,false,false
 200001,202003,100,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,true,true,true,false,false,false
@@ -16,8 +16,8 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 200004,202003,100,86,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,,,,false,false,false
 200004,202004,100,86,,,0.276010255,1,42.68681319,1947.413826,FIR,4,0,4,,,,false,true,false
 200005,202001,100,6,,,1,0.597514698,71.63436123,429.8061674,C,0,4,4,,,,true,false,false
-200005,202002,100,6,,,23.53745347,0.984013482,111.5638767,10116.54266,FIC,4,3,4,,,,false,false,false
-200005,202003,100,6,,,1.161413175,4.785815599,163.0494505,11749.48593,FIC,3,4,4,,,,false,false,false
+200005,202002,100,6,,,23.53745347,0.984013482,111.5638767,10116.542659,FIC,4,3,4,,,,false,false,false
+200005,202003,100,6,,,1.161413175,4.785815599,163.0494505,11749.485934,FIC,3,4,4,,,,false,false,false
 200005,202004,100,6,,,0.276010255,1,42.68681319,3242.978608,FIC,4,0,4,,,,false,true,false
 200006,202001,100,41,,,1,0.597514698,71.63436123,5222.283092,BI,0,4,4,,,,true,false,false
 200006,202002,100,41,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,,,,false,false,false
@@ -35,7 +35,7 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 200009,202002,200,45,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,true,true,true,false,false,false
 200009,202003,200,45,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,true,true,true,false,false,false
 200009,202004,200,45,0.226110207,,0.197315737,1,99.37735849,1945,R,3,0,3,true,true,,false,true,false
-200010,202001,200,85,,,1,2.163456777,132.3214286,14038.67103,BI,0,3,4,,,,true,false,false
+200010,202001,200,85,,,1,2.163456777,132.3214286,14038.671027,BI,0,3,4,,,,true,false,false
 200010,202002,200,85,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,true,,true,false,false,false
 200010,202003,200,85,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,true,true,,false,false,false
 200010,202004,200,85,,,0.197315737,1,99.37735849,354.3790633,FIR,3,0,3,,,,false,true,false
@@ -43,8 +43,8 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 200011,202002,200,79,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,true,,,false,false,false
 200011,202004,200,79,,,0.197315737,1,99.37735849,7850.811321,C,3,0,3,,,,false,true,false
 200012,202001,200,87,,,1,2.163456777,132.3214286,5495,R,0,3,4,true,,,true,false,false
-200012,202002,200,87,,,2.53854315,1.457061014,119.7926267,13949.29461,FIR,3,4,5,,,,false,false,false
-200012,202003,200,87,,,2.091207548,6.584230902,196.4492754,29170.87018,FIR,4,3,4,,,,false,false,false
+200012,202002,200,87,,,2.53854315,1.457061014,119.7926267,13949.294611,FIR,3,4,5,,,,false,false,false
+200012,202003,200,87,,,2.091207548,6.584230902,196.4492754,29170.870177,FIR,4,3,4,,,,false,false,false
 200012,202004,200,87,,,0.197315737,1,99.37735849,5755.871742,FIR,3,0,3,,,,false,true,false
 200013,202001,100,85,,,1,0.597514698,71.63436123,150000,R,0,4,4,false,,false,true,false,false
 200013,202002,100,85,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,false,false,false,false,false,false
@@ -55,10 +55,10 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 200014,202003,200,96,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,false,false,false,false,false,false
 200014,202004,200,96,,,0.197315737,1,99.37735849,105000,R,3,0,3,false,false,,false,true,false
 200015,202001,100,71,,,1,0.597514698,71.63436123,5086.039648,C,0,4,4,,,,true,false,false
-200015,202002,100,71,,,23.53745347,0.984013482,111.5638767,119712.4216,FIC,4,3,4,,,,false,false,false
-200015,202003,100,71,,,1.161413175,4.785815599,163.0494505,139035.5837,FIC,3,4,4,,,,false,false,false
-200015,202004,100,71,,,0.276010255,1,42.68681319,38375.2469,FIC,4,0,4,,,,false,true,false
+200015,202002,100,71,,,23.53745347,0.984013482,111.5638767,119712.421581,FIC,4,3,4,,,,false,false,false
+200015,202003,100,71,,,1.161413175,4.785815599,163.0494505,139035.583689,FIC,3,4,4,,,,false,false,false
+200015,202004,100,71,,,0.276010255,1,42.68681319,38375.246898,FIC,4,0,4,,,,false,true,false
 200016,202001,200,48,,,1,2.163456777,132.3214286,6351.428571,C,0,3,4,,,,true,false,false
-200016,202002,200,48,,,2.53854315,1.457061014,119.7926267,16123.37549,FIC,3,4,5,,,,false,false,false
-200016,202003,200,48,,,2.091207548,6.584230902,196.4492754,33717.32453,FIC,4,3,4,,,,false,false,false
+200016,202002,200,48,,,2.53854315,1.457061014,119.7926267,16123.375493,FIC,3,4,5,,,,false,false,false
+200016,202003,200,48,,,2.091207548,6.584230902,196.4492754,33717.324528,FIC,4,3,4,,,,false,false,false
 200016,202004,200,48,,,0.197315737,1,99.37735849,6652.958732,FIC,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 43718e8f..05d0a423 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 230001,202001,1,10,,1.511049724,1,1.087985595,15.46666667,547,R,0,2,2,true,,true,true,false,false
 230001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,true,true,true,false,false,false
 230001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,895,R,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index 64efa25d..43f1d685 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index ccf61734..d6e6ef98 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index 6ba38c84..e8840621 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,,true,true,false,true
 120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,true,true,true,false,false,true
 120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,true,true,true,false,false,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 566fa334..6dbd0d24 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index 7135b049..7a9c2ec4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,false,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,false,false,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,false,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index d6c57b38..c71b547e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,,true,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index 67427472..b789e926 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index d93d0ed9..27be4307 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index e462cada..3563dee2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
index c6f8004c..9de72851 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.773194,96.75644,8444,R,0,9,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,3.889877,2.962348,81.65588616,7476,R,9,10,11,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.495827,1,76.108808,2003,R,10,0,11,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 72917b0e..26c6133c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,,true,true,false,false
 80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,true,true,true,false,false,false
 80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index 3f7387e1..216d31a9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,true,true,true,false,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,,true,true,false,false
 90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,true,true,true,false,false,false
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,true,false,true,false
-90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,true,true,true,true,false,false
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,,false,true,false
+90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,true,,true,true,false,false
 90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,true,true,true,false,false,false
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,true,true,false,true,false
-90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,true,true,true,true,false,false
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,true,,false,true,false
+90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,true,,true,true,false,false
 90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,true,true,true,false,false,false
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,true,true,false,true,false
-90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,true,true,true,true,false,false
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,true,,false,true,false
+90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,true,,true,true,false,false
 90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,true,true,true,false,false,false
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,true,true,false,true,false
-90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,true,true,true,true,false,false
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,true,,false,true,false
+90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,true,,true,true,false,false
 90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,true,true,true,false,false,false
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,true,true,false,true,false
-90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,true,true,true,true,false,false
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,true,,false,true,false
+90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,true,,true,true,false,false
 90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,true,true,true,false,false,false
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,true,true,false,true,false
-90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,true,true,true,true,false,false
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,true,,false,true,false
+90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,true,,true,true,false,false
 90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,true,true,true,false,false,false
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,true,true,false,true,false
-90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,true,true,true,false,false
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,true,,false,true,false
+90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,,true,true,false,false
 90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,true,true,true,false,false,false
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,true,true,false,true,false
-90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,true,true,true,true,false,false
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,true,,false,true,false
+90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,true,,true,true,false,false
 90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,true,true,true,false,false,false
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,true,true,false,true,false
-90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,true,true,true,true,false,false
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,true,,false,true,false
+90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,true,,true,true,false,false
 90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,true,true,true,false,false,false
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,true,true,false,true,false
-90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,true,true,true,true,false,false
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,true,,false,true,false
+90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,true,,true,true,false,false
 90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,true,true,true,false,false,false
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,true,true,false,true,false
-90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,true,true,true,false,false
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,true,,false,true,false
+90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,,true,true,false,false
 90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,true,true,true,false,false,false
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,true,true,false,true,false
-90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,true,true,true,true,false,false
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,true,,false,true,false
+90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,true,,true,true,false,false
 90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,true,true,true,false,false,false
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,true,true,false,true,false
-90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,true,true,true,true,false,false
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,true,,false,true,false
+90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,true,,true,true,false,false
 90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,true,true,true,false,false,false
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,true,true,false,true,false
-90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,true,true,true,true,false,false
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,true,,false,true,false
+90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,true,,true,true,false,false
 90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,true,true,true,false,false,false
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,true,true,false,true,false
-90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,true,true,true,true,false,false
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,true,,false,true,false
+90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,true,,true,true,false,false
 90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,true,true,true,false,false,false
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,true,true,false,true,false
-90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,true,true,true,true,false,false
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,true,,false,true,false
+90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,true,,true,true,false,false
 90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,true,true,true,false,false,false
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,true,true,false,true,false
-90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,true,true,true,true,false,false
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,true,,false,true,false
+90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,true,,true,true,false,false
 90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,true,true,true,false,false,false
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,true,true,false,true,false
-90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,true,true,true,true,false,false
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,true,,false,true,false
+90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,true,,true,true,false,false
 90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,true,true,true,false,false,false
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,true,true,false,true,false
-90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,true,true,true,true,false,false
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,true,,false,true,false
+90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,true,,true,true,false,false
 90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,true,true,true,false,false,false
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,true,true,false,true,false
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,true,,false,true,false
 90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,,,,true,false,false
 90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,,,,false,false,false
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,true,true,true,false,true,false
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index 4748e1d2..d47219e9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,true,true,true,false,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,,true,true,false,false
 100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,true,true,true,false,false,false
-100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,true,true,true,false,true,false
-100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,true,true,true,true,false,false
+100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,true,true,,false,true,false
+100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,true,,true,true,false,false
 100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,true,true,true,false,false,false
-100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,true,true,true,false,true,false
-100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,true,true,true,true,false,false
+100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,true,true,,false,true,false
+100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,true,,true,true,false,false
 100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,true,true,true,false,false,false
-100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,true,true,true,false,true,false
-100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,true,true,true,true,false,false
+100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,true,true,,false,true,false
+100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,true,,true,true,false,false
 100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,true,true,true,false,false,false
-100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,true,true,true,false,true,false
-100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,true,true,true,true,false,false
+100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,true,true,,false,true,false
+100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,true,,true,true,false,false
 100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,true,true,true,false,false,false
-100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,true,true,true,false,true,false
-100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,true,true,true,true,false,false
+100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,true,true,,false,true,false
+100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,true,,true,true,false,false
 100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,true,true,true,false,false,false
-100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,true,true,true,false,true,false
-100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,true,true,true,true,false,false
+100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,true,true,,false,true,false
+100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,true,,true,true,false,false
 100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,true,true,true,false,false,false
-100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,true,true,true,false,true,false
-100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,true,true,true,false,false
+100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,true,true,,false,true,false
+100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,,true,true,false,false
 100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,true,true,true,false,false,false
-100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,true,true,true,false,true,false
-100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,true,true,true,true,false,false
+100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,true,true,,false,true,false
+100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,true,,true,true,false,false
 100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,true,true,true,false,false,false
-100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,true,true,true,false,true,false
-100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,true,true,true,true,false,false
+100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,true,true,,false,true,false
+100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,true,,true,true,false,false
 100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,true,true,true,false,false,false
-100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,true,true,true,false,true,false
-100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,true,true,true,true,false,false
+100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,true,true,,false,true,false
+100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,true,,true,true,false,false
 100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,true,true,true,false,false,false
-100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,true,true,true,false,true,false
-100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,true,true,true,false,false
+100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,true,true,,false,true,false
+100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,,true,true,false,false
 100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,true,true,true,false,false,false
-100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,true,true,true,false,true,false
-100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,true,true,true,true,false,false
+100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,true,true,,false,true,false
+100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,true,,true,true,false,false
 100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,true,true,true,false,false,false
-100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,true,true,true,false,true,false
-100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,true,true,true,true,false,false
+100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,true,true,,false,true,false
+100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,true,,true,true,false,false
 100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,true,true,true,false,false,false
-100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,true,true,true,false,true,false
-100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,true,true,true,true,false,false
+100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,true,true,,false,true,false
+100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,true,,true,true,false,false
 100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,true,true,true,false,false,false
-100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,true,true,true,false,true,false
-100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,true,true,true,true,false,false
+100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,true,true,,false,true,false
+100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,true,,true,true,false,false
 100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,true,true,true,false,false,false
-100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,true,true,true,false,true,false
-100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,true,true,true,true,false,false
+100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,true,true,,false,true,false
+100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,true,,true,true,false,false
 100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,true,true,true,false,false,false
-100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,true,true,true,false,true,false
-100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,true,true,true,true,false,false
+100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,true,true,,false,true,false
+100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,true,,true,true,false,false
 100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,true,true,true,false,false,false
-100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,true,true,true,false,true,false
-100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,true,true,true,true,false,false
+100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,true,true,,false,true,false
+100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,true,,true,true,false,false
 100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,true,true,true,false,false,false
-100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,true,true,true,false,true,false
-100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,true,true,true,true,false,false
+100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,true,true,,false,true,false
+100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,true,,true,true,false,false
 100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,true,true,true,false,false,false
-100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,true,true,true,false,true,false
+100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,true,true,,false,true,false
 100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,,,,true,false,false
 100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,,,,false,false,false
-100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,true,true,true,false,true,false
+100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index 35b65061..a1d17ccf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,true,true,true,false,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,true,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,true,true,true,true,false,false
+30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,true,,true,true,false,false
 30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,true,true,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,true,true,true,true,false,false
+30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,true,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,true,,true,true,false,false
 30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,true,true,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,true,true,true,true,false,false
+30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,true,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,true,,true,true,false,false
 30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,true,true,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,true,true,true,true,false,false
+30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,true,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,true,,true,true,false,false
 30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,true,true,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,true,true,true,true,false,false
+30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,true,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,true,,true,true,false,false
 30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,true,true,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,true,true,true,true,false,false
+30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,true,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,true,,true,true,false,false
 30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,true,true,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,true,true,true,true,false,false
+30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,true,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,true,,true,true,false,false
 30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,true,true,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,true,true,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,true,true,true,true,false,false
+30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,true,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,true,,true,true,false,false
 30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,true,true,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,true,true,true,true,false,false
-30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,true,true,true,false,false,false
-30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,true,true,true,true,false,false
-30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,true,true,true,false,false,false
-30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,true,true,true,true,false,false
-30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,true,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,true,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,true,,true,true,false,false
+30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,true,true,,false,false,false
+30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,true,,true,true,false,false
+30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,true,true,,false,false,false
+30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,true,,true,true,false,false
+30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,true,true,,false,false,false
 30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
index a7228a5f..8f027955 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,true,true,true,true,true,false,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,true,true,,true,true,false,false
 90001,202002,100,89,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,8916,R,17,18,20,true,true,true,true,true,false,false,false
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,true,false,true,false
-90002,202001,100,83,,0.81755039810266,1,1.504462,128.8429705,4826,R,0,17,19,,true,true,true,true,true,false,false
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,,false,true,false
+90002,202001,100,83,,0.81755039810266,1,1.504462,128.8429705,4826,R,0,17,19,,true,true,,true,true,false,false
 90002,202002,100,83,1.22316618317447,1.24457094665823,0.95179,1.082843,113.3255814,5903,R,17,18,20,true,true,true,true,true,false,false,false
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,true,true,false,true,false
-90003,202001,100,4,,,1,1.504462,128.8429705,7586,R,0,17,19,,,false,true,true,true,false,false
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,true,,false,true,false
+90003,202001,100,4,,,1,1.504462,128.8429705,7586,R,0,17,19,,,false,,true,true,false,false
 90003,202002,100,4,,0.710986703988803,0.95179,1.082843,113.3255814,1016,R,17,18,20,,true,true,false,true,false,false,false
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,true,true,false,true,false
-90004,202001,100,76,,1.30584756898817,1,1.504462,128.8429705,3975,R,0,17,19,,true,true,true,true,true,false,false
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,true,,false,true,false
+90004,202001,100,76,,1.30584756898817,1,1.504462,128.8429705,3975,R,0,17,19,,true,true,,true,true,false,false
 90004,202002,100,76,0.765786163522013,0.828750340321263,0.95179,1.082843,113.3255814,3044,R,17,18,20,true,true,true,true,true,false,false,false
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,true,true,false,true,false
-90005,202001,100,18,,0.62191605254726,1,1.504462,128.8429705,1941,R,0,17,19,,true,true,true,true,true,false,false
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,true,,false,true,false
+90005,202001,100,18,,0.62191605254726,1,1.504462,128.8429705,1941,R,0,17,19,,true,true,,true,true,false,false
 90005,202002,100,18,1.60793405461103,2.58360927152318,0.95179,1.082843,113.3255814,3121,R,17,18,20,true,true,true,true,true,false,false,false
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,true,true,false,true,false
-90006,202001,100,94,,0.762987012987013,1,1.504462,128.8429705,5405,R,0,17,19,,true,true,true,true,true,false,false
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,true,,false,true,false
+90006,202001,100,94,,0.762987012987013,1,1.504462,128.8429705,5405,R,0,17,19,,true,true,,true,true,false,false
 90006,202002,100,94,1.31063829787234,1.42248995983936,0.95179,1.082843,113.3255814,7084,R,17,18,20,true,true,true,true,true,false,false,false
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,true,true,false,true,false
-90007,202001,100,8,,5.33286467486819,1,1.504462,128.8429705,15172,R,0,17,19,,true,true,true,true,true,false,false
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,true,,false,true,false
+90007,202001,100,8,,5.33286467486819,1,1.504462,128.8429705,15172,R,0,17,19,,true,true,,true,true,false,false
 90007,202002,100,8,0.18751647772212,0.812624964295915,0.95179,1.082843,113.3255814,2845,R,17,18,20,true,true,true,true,true,false,false,false
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,true,true,false,true,false
-90008,202001,100,304,,1.12953080601566,1,1.504462,128.8429705,16298,R,0,17,19,,true,true,true,true,true,false,false
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,true,,false,true,false
+90008,202001,100,304,,1.12953080601566,1,1.504462,128.8429705,16298,R,0,17,19,,true,true,,true,true,false,false
 90008,202002,100,304,0.885323352558596,1.00937390696048,0.95179,1.082843,113.3255814,14429,R,17,18,20,true,true,true,true,true,false,false,false
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,true,true,false,true,false
-90009,202001,100,45,,0.740636891648308,1,1.504462,128.8429705,3698,R,0,17,19,,true,true,true,true,true,false,false
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,true,,false,true,false
+90009,202001,100,45,,0.740636891648308,1,1.504462,128.8429705,3698,R,0,17,19,,true,true,,true,true,false,false
 90009,202002,100,45,1.35018929150892,1.18542260208927,0.95179,1.082843,113.3255814,4993,R,17,18,20,true,true,true,true,true,false,false,false
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,true,true,false,true,false
-90010,202001,100,100,,0.76056338028169,1,1.504462,128.8429705,7722,R,0,17,19,,true,true,true,true,true,false,false
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,true,,false,true,false
+90010,202001,100,100,,0.76056338028169,1,1.504462,128.8429705,7722,R,0,17,19,,true,true,,true,true,false,false
 90010,202002,100,100,1.31481481481481,1.55126050420168,0.95179,1.082843,113.3255814,10153,R,17,18,20,true,true,true,true,true,false,false,false
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,true,true,false,true,false
-90011,202001,100,19,,8.36614281775572,1,1.504462,128.8429705,30344,R,0,17,19,,false,true,true,true,true,false,false
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,true,,false,true,false
+90011,202001,100,19,,8.36614281775572,1,1.504462,128.8429705,30344,R,0,17,19,,false,true,,true,true,false,false
 90011,202002,100,19,0.119529396256262,0.497667398463227,0.95179,1.082843,113.3255814,3627,R,17,18,20,false,true,true,true,true,false,false,false
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,true,true,false,true,false
-90012,202001,100,304,,1.40900838592548,1,1.504462,128.8429705,16298,R,0,17,19,,true,true,true,true,true,false,false
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,true,,false,true,false
+90012,202001,100,304,,1.40900838592548,1,1.504462,128.8429705,16298,R,0,17,19,,true,true,,true,true,false,false
 90012,202002,100,304,0.709718983924408,0.857831504004746,0.95179,1.082843,113.3255814,11567,R,17,18,20,true,true,true,true,true,false,false,false
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,true,true,false,true,false
-90013,202001,100,54,,1.10678653656397,1,1.504462,128.8429705,20190,R,0,17,19,,true,true,true,true,true,false,false
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,true,,false,true,false
+90013,202001,100,54,,1.10678653656397,1,1.504462,128.8429705,20190,R,0,17,19,,true,true,,true,true,false,false
 90013,202002,100,54,0.903516592372462,0.63283147158815,0.95179,1.082843,113.3255814,18242,R,17,18,20,true,true,true,true,true,false,false,false
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,true,true,false,true,false
-90014,202001,100,47,,0.845909451945989,1,1.504462,128.8429705,4260,R,0,17,19,,true,true,true,true,true,false,false
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,true,,false,true,false
+90014,202001,100,47,,0.845909451945989,1,1.504462,128.8429705,4260,R,0,17,19,,true,true,,true,true,false,false
 90014,202002,100,42,1.18215962441315,0.776681061073411,0.95179,1.082843,113.3255814,5036,R,17,18,20,true,true,true,true,true,false,false,false
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,true,true,false,true,false
-90015,202001,100,57,,3.88684582743989,1,1.504462,128.8429705,19236,R,0,17,19,,true,true,true,true,true,false,false
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,true,,false,true,false
+90015,202001,100,57,,3.88684582743989,1,1.504462,128.8429705,19236,R,0,17,19,,true,true,,true,true,false,false
 90015,202002,100,57,0.257278020378457,1.39644469525959,0.95179,1.082843,113.3255814,4949,R,17,18,20,true,true,true,true,true,false,false,false
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,true,true,false,true,false
-90016,202001,100,163,,0.906723456038941,1,1.504462,128.8429705,14902,R,0,17,19,,true,true,true,true,true,false,false
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,true,,false,true,false
+90016,202001,100,163,,0.906723456038941,1,1.504462,128.8429705,14902,R,0,17,19,,true,true,,true,true,false,false
 90016,202002,100,163,1.10287209770501,0.666653145661786,0.95179,1.082843,113.3255814,16435,R,17,18,20,true,true,true,true,true,false,false,false
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,true,true,false,true,false
-90017,202001,100,149,,0.702286449569435,1,1.504462,128.8429705,35476,R,0,17,19,,true,true,true,true,true,false,false
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,true,,false,true,false
+90017,202001,100,149,,0.702286449569435,1,1.504462,128.8429705,35476,R,0,17,19,,true,true,,true,true,false,false
 90017,202002,100,149,1.42392039688804,0.944611702227126,0.95179,1.082843,113.3255814,50515,R,17,18,20,true,true,true,true,true,false,false,false
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,true,true,false,true,false
-90018,202001,100,126,,0.543196798493409,1,1.504462,128.8429705,13845,R,0,17,19,,false,true,true,true,true,false,false
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,true,,false,true,false
+90018,202001,100,126,,0.543196798493409,1,1.504462,128.8429705,13845,R,0,17,19,,false,true,,true,true,false,false
 90018,202002,100,126,1.8409534127844,0.929913532051516,0.95179,1.082843,113.3255814,25488,R,17,18,20,false,true,true,true,true,false,false,false
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,true,true,false,true,false
-90019,202001,100,6,,2.53225806451613,1,1.504462,128.8429705,1099,R,0,17,19,,true,true,true,true,true,false,false
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,true,,false,true,false
+90019,202001,100,6,,2.53225806451613,1,1.504462,128.8429705,1099,R,0,17,19,,true,true,,true,true,false,false
 90019,202002,100,6,0.394904458598726,3.5,0.95179,1.082843,113.3255814,434,R,17,18,20,true,false,true,true,true,false,false,false
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,true,true,false,true,false
-90020,202001,100,22,,1.67735470941884,1,1.504462,128.8429705,3348,R,0,17,19,,true,true,true,true,true,false,false
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,true,,false,true,false
+90020,202001,100,22,,1.67735470941884,1,1.504462,128.8429705,3348,R,0,17,19,,true,true,,true,true,false,false
 90020,202002,100,22,0.596176821983274,0.395169273411206,0.95179,1.082843,113.3255814,1996,R,17,18,20,true,false,true,true,true,false,false,false
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,true,true,false,true,false
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,true,,false,true,false
 90021,202001,100,155,,,1,1.504462,128.8429705,34285.974874,BI,0,17,19,,,,,,true,false,false
 90021,202002,100,155,,,0.95179,1.082843,113.3255814,22789.522255,BI,17,18,20,,,,,,false,false,false
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,true,true,true,false,true,false
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index c5c371a1..4f352f63 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,true,true,true,false,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,true,true,true,false,false,false
-30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,true,true,true,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,true,true,true,true,false,false
+30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,true,true,,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,true,,true,true,false,false
 30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,true,true,true,false,false,false
-30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,true,true,true,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,true,true,true,true,false,false
+30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,true,true,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,true,,true,true,false,false
 30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,true,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,true,true,true,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,true,true,true,true,false,false
+30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,true,true,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,true,,true,true,false,false
 30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,true,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,true,true,true,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,true,true,true,true,false,false
+30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,true,true,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,true,,true,true,false,false
 30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,true,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,true,true,true,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,true,true,true,true,false,false
+30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,true,true,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,true,,true,true,false,false
 30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,true,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,true,true,true,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,true,true,true,true,false,false
+30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,true,true,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,true,,true,true,false,false
 30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,true,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,true,true,true,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,true,true,true,true,false,false
+30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,true,true,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,true,,true,true,false,false
 30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,true,true,true,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,true,true,true,true,false,false
+30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,true,true,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,true,,true,true,false,false
 30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,true,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,true,true,true,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,true,true,true,true,false,false
+30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,true,true,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,true,,true,true,false,false
 30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,true,true,true,false,true,false
-30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,true,true,true,true,false,false
+30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,true,true,,false,true,false
+30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,true,,true,true,false,false
 30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,true,true,true,false,false,false
-30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,true,true,true,false,true,false
-30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,true,true,true,true,false,false
-30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,true,true,true,false,false,false
+30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,true,true,,false,true,false
+30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,true,,true,true,false,false
+30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,true,true,,false,false,false
 30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
index f2a162ff..8410fdca 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,true,true,true,false,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,true,true,true,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,true,true,true,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,true,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,,true,true,false,false
 110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,true,true,true,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,true,true,true,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,true,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,,true,true,false,false
 110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,true,true,true,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,true,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,true,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,true,true,,false,false,false
 110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,,,false,true,false
 110005,202001,200,27,,,1,1,1,280,BI,0,0,0,,,,,,true,true,true
 110005,202002,200,27,,,1,1,1,280,BI,0,0,0,,,,,,true,true,true
-110005,202003,200,27,,,1,1,1,280,R,0,0,0,,,false,false,false,true,true,true
-110006,202001,200,42,,,1,1,1,1869,R,0,0,0,,,false,false,false,true,true,true
+110005,202003,200,27,,,1,1,1,280,R,0,0,0,,,false,,,true,true,true
+110006,202001,200,42,,,1,1,1,1869,R,0,0,0,,,false,,false,true,true,true
 110006,202002,200,42,,,1,1,1,1876,R,0,0,0,,,false,false,false,true,true,true
-110006,202003,200,42,,,1,1,1,1371,R,0,0,0,,,false,false,false,true,true,true
-110007,202001,200,19,,,1,1,1,12769,R,0,0,0,,,false,false,false,true,true,true
-110007,202002,200,19,,,1,1,1,2853,R,0,0,0,,,false,false,false,true,true,true
+110006,202003,200,42,,,1,1,1,1371,R,0,0,0,,,false,false,,true,true,true
+110007,202001,200,19,,,1,1,1,12769,R,0,0,0,,,false,,false,true,true,true
+110007,202002,200,19,,,1,1,1,2853,R,0,0,0,,,false,false,,true,true,true
 110007,202003,200,19,,,1,1,1,2853,FIR,0,0,0,,,,,,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_input.csv
index f27894e5..97acb466 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_input.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link
-110001,202001,100,9244,89,,,0.5,,1.5274,50.3694
-110001,202002,100,8916,89,,,0.5,,2.656680299,101.7103175
-110001,202003,100,6194,89,,,0.5,0.771850199,,74.91666667
-110002,202001,100,4826,83,,,0.5,,1.5274,50.3694
-110002,202002,100,5903,83,,,0.5,,2.656680299,101.7103175
-110002,202003,100,4743,83,,,0.5,0.771850199,,74.91666667
-110003,202001,100,7586,4,,,0.5,,1.5274,50.3694
-110003,202002,100,1016,4,,,0.5,,2.656680299,101.7103175
-110003,202003,100,1429,4,,,0.5,0.771850199,,74.91666667
-110004,202001,100,3975,76,,,0.5,,1.5274,50.3694
-110004,202002,100,3044,76,,,0.5,,2.656680299,101.7103175
-110004,202003,100,,76,,,0.5,0.771850199,,74.91666667
-110005,202001,200,5217,27,,,0.5,,2.994350985,107.48
-110005,202002,200,7016,27,,,0.5,,2.290844366,182.25
-110005,202003,200,9940,27,,,0.5,0.994479964,,150.2748092
-110006,202001,200,5325,42,,,0.5,,2.994350985,107.48
-110006,202002,200,7747,42,,,0.5,,2.290844366,182.25
-110006,202003,200,6685,42,,,0.5,0.994479964,,150.2748092
-110007,202001,200,5496,19,,,0.5,,2.994350985,107.48
-110007,202002,200,1010,19,,,0.5,,2.290844366,182.25
-110007,202003,200,1235,19,,,0.5,0.994479964,,150.2748092
-110008,202001,200,,43,,,0.5,,2.994350985,107.48
-110008,202002,200,3913,43,,,0.5,,2.290844366,182.25
-110008,202003,200,6013,43,,,0.5,0.994479964,,150.2748092
+identifier,date,group,question,other
+110001,202001,100,9244,89
+110001,202002,100,8916,89
+110001,202003,100,6194,89
+110002,202001,100,4826,83
+110002,202002,100,5903,83
+110002,202003,100,4743,83
+110003,202001,100,7586,4
+110003,202002,100,1016,4
+110003,202003,100,1429,4
+110004,202001,100,3975,76
+110004,202002,100,3044,76
+110004,202003,100,,76
+110005,202001,200,5217,27
+110005,202002,200,7016,27
+110005,202003,200,9940,27
+110006,202001,200,5325,42
+110006,202002,200,7747,42
+110006,202003,200,6685,42
+110007,202001,200,5496,19
+110007,202002,200,1010,19
+110007,202003,200,1235,19
+110008,202001,200,,43
+110008,202002,200,3913,43
+110008,202003,200,6013,43
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
index c59a1c98..b663f8fb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -1,25 +1,25 @@
-reference,period,imputationClass,targetColumn,auxiliaryColumn,lower_trim,upper_trim,target_l_w,prev_fi_link,prev_bi_link,prev_c_link,fi_gr,bi_gr,fi_link,bi_link,c_link,w_fi_link,w_bi_link,w_c_link,final_target_03,imp_mkr,count_fi,count_bi,count_c
-110001,202001,100,9244,89,,,0.5,,1.5274,50.3694,,1.036787797,,2.656680299,101.7103175,,2.09204015,76.03985875,9244,R,,4,4
-110001,202002,100,8916,89,,,0.5,,2.656680299,101.7103175,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.771850199,1.894176015,88.31349209,8916,R,4,3,4
-110001,202003,100,6194,89,,,0.5,0.771850199,,74.91666667,0.694706146,,0.968230653,,70.26136364,0.870040426,,72.58901516,6194,R,3,,3
-110002,202001,100,4826,83,,,0.5,,1.5274,50.3694,,0.817550398,,2.656680299,101.7103175,,2.09204015,76.03985875,4826,R,,4,4
-110002,202002,100,5903,83,,,0.5,,2.656680299,101.7103175,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.771850199,1.894176015,88.31349209,5903,R,4,3,4
-110002,202003,100,4743,83,,,0.5,0.771850199,,74.91666667,0.803489751,,0.968230653,,70.26136364,0.870040426,,72.58901516,4743,R,3,,3
-110003,202001,100,7586,4,,,0.5,,1.5274,50.3694,,7.466535433,,2.656680299,101.7103175,,2.09204015,76.03985875,7586,R,,4,4
-110003,202002,100,1016,4,,,0.5,,2.656680299,101.7103175,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.771850199,1.894176015,88.31349209,1016,R,4,3,4
-110003,202003,100,1429,4,,,0.5,0.771850199,,74.91666667,1.406496063,,0.968230653,,70.26136364,0.870040426,,72.58901516,1429,R,3,,3
-110004,202001,100,3975,76,,,0.5,,1.5274,50.3694,,1.305847569,,2.656680299,101.7103175,,2.09204015,76.03985875,3975,R,,4,4
-110004,202002,100,3044,76,,,0.5,,2.656680299,101.7103175,0.765786164,,0.771850199,1.13167173,74.91666667,0.771850199,1.894176015,88.31349209,3044,R,4,3,4
-110004,202003,100,,76,,,0.5,0.771850199,,74.91666667,,,0.968230653,,70.26136364,0.870040426,,72.58901516,2648.403057,FIR,3,,3
-110005,202001,200,5217,27,,,0.5,,2.994350985,107.48,,0.743586089,,2.290844366,182.25,,2.642597676,144.865,5217,R,,3,3
-110005,202002,200,7016,27,,,0.5,,2.290844366,182.25,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,0.994479964,1.562080758,166.2624046,7016,R,3,4,4
-110005,202003,200,9940,27,,,0.5,0.994479964,,150.2748092,1.416761688,,1.259780318,,182.2366412,1.127130141,,166.2557252,9940,R,4,,4
-110006,202001,200,5325,42,,,0.5,,2.994350985,107.48,,0.68736285,,2.290844366,182.25,,2.642597676,144.865,5325,R,,3,3
-110006,202002,200,7747,42,,,0.5,,2.290844366,182.25,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,0.994479964,1.562080758,166.2624046,7747,R,3,4,4
-110006,202003,200,6685,42,,,0.5,0.994479964,,150.2748092,0.862914677,,1.259780318,,182.2366412,1.127130141,,166.2557252,6685,R,4,,4
-110007,202001,200,5496,19,,,0.5,,2.994350985,107.48,,5.441584158,,2.290844366,182.25,,2.642597676,144.865,5496,R,,3,3
-110007,202002,200,1010,19,,,0.5,,2.290844366,182.25,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,0.994479964,1.562080758,166.2624046,1010,R,3,4,4
-110007,202003,200,1235,19,,,0.5,0.994479964,,150.2748092,1.222772277,,1.259780318,,182.2366412,1.127130141,,166.2557252,1235,R,4,,4
-110008,202001,200,,43,,,0.5,,2.994350985,107.48,,,,2.290844366,182.25,,2.642597676,144.865,10340.48471,BI,,3,3
-110008,202002,200,3913,43,,,0.5,,2.290844366,182.25,,0.650756694,0.994479964,0.833317149,150.2748092,0.994479964,1.562080758,166.2624046,3913,R,3,4,4
-110008,202003,200,6013,43,,,0.5,0.994479964,,150.2748092,1.53667263,,1.259780318,,182.2366412,1.127130141,,166.2557252,6013,R,4,,4
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,true,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.7103175,4826,R,0,4,4,true,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.7103175,7586,R,0,4,4,true,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.7103175,3975,R,0,4,4,true,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,,false,false,false
+110004,202003,100,76,,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,,,,false,true,false
+110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,true,,true,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,true,true,true,false,false,false
+110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,true,true,,false,true,false
+110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,true,,true,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,true,true,true,false,false,false
+110006,202003,200,42,0.862914677,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,true,true,,false,true,false
+110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,true,,true,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,true,true,true,false,false,false
+110007,202003,200,19,1.222772277,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,true,true,,false,true,false
+110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.48471,BI,0,3,3,,,,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,true,,true,false,false,false
+110008,202003,200,43,1.53667263,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 54d01d50..1669e6be 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,true,true,true,true,false,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,true,true,true,false,true,false
-30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,true,true,true,true,false,false
+30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,true,true,true,false,true,false
-30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,true,true,true,true,false,false
+30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,true,true,true,false,true,false
-30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,true,true,true,true,false,false
-30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,true,true,false,false,false
-30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,true,true,true,false,true,false
+30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,true,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,true,,true,true,false,false
+30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,true,,false,false,false
+30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,,,,false,true,false
 30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,,
 30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
 30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index 64ae6695..a83d3ee9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index 07700757..ffe02394 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,true,true,true,false,false
 60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,true,true,true,false,false,false
 60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index 2f36ce40..a5d13cfd 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index 166d5a67..f644bc46 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,1,1,1,1,0,0
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,1,1,1,0,0,0
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 68a90fa6..186579b3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,1,1,1,1,0,0
 30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,1,1,1,0,0,0
 30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index 8b3e5860..5c208b60 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,1,1,1,1,0,0
 60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,1,1,1,0,0,0
 60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index d6d0cbd4..404cb0c3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,1,1,1,1,0,0
 30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,1,1,1,0,0,0
 30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index cfaad115..525a355f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_backward,link_inclusion_forward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,1,1,1,1,0,0
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,1,1,1,0,0,0
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index af801598..e284e51b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_backward,link_inclusion_forward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
 210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,1,1,1,1,0,0
 210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,1,1,1,0,0,0
 210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index b5f16a4e..65ee4252 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_backward,link_inclusion_forward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
 70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,1,1,1,1,0,0
 70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,1,1,1,0,0,0
 70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,1,1,1,0,0,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index 03004236..02adbda2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_backward,link_inclusion_forward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,true,true,1,0,0
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,0,0,0
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,true,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index 6a41f5fb..50af596a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_backward,link_inclusion_forward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,1,1,1,1,0,0
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,1,1,1,0,0,0
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 73a7b6a9..7caf9751 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,,1,1,1,1,0,0
 80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,1,1,1,0,0,0
 80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,,,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index c6752b9d..a751bf3d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,1,1,1,1,0,0
 30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,1,1,1,0,0,0
 30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index bcf39710..dd2ba5f9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 90001,202001,100,89,,1.036787797,1,1.504436071,128.8429705,1,1.798238111,102.4414146,9244,R,0,17,19,true,true,true,1,0,0
 90001,202002,100,89,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,true,true,true,0,0,0
 90001,202003,100,89,0.694706146,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6194,R,18,0,21,true,true,true,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index 8f29c329..9e136b06 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,,1,1,61.12436116,1,1.82834015,81.41733933,8444,R,0,0,9,true,true,true,1,1,0
 30001,202002,100,51,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,true,true,true,1,1,0
 30001,202003,100,51,,,1,1,85.37820513,0.984115327,1,77.81978439,2003,R,0,0,10,true,true,true,1,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index c1eb28fc..800d51ff 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,8444,R,0,0,9,false,true,false,1,1,1
 30001,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,false,false,false,1,1,1
 30001,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,2003,R,0,0,10,false,false,true,1,1,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index bf85295f..c3bbf0bb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,false,false,true,true,true,true,false,false
 160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,false,false,true,true,true,false,false,false
 160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index 1a2a5640..2277817c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next
 160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,false,false,true,true,true
 160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,false,false,true,true,true
 160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,false,false,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
index a6a10d8f..8529cdbb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,growth_forward_trimmed_marker,growth_backward_trimmed_marker,link_inclusion_marker,link_inclusion_forward,link_inclusion_backward,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 70001,202001,100,39,,3.280595369,1,47.92201545,107.48,5951,R,0,3,3,false,false,true,true,true,true,false,false
 70001,202002,100,39,0.304822719,,0.521730457,0.718061822,54.70285714,1814,R,3,2,3,false,false,true,true,false,false,false,false
 70001,202003,100,39,,,56.19409367,0.668609812,120.084507,734,R,2,2,3,false,false,false,true,true,false,false,false
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 5e6a3ab5..2b76397b 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -92,7 +92,7 @@ lower_trim = 50
 upper_trim = 50
 trim_threshold = 10
 
-[48_BI_BI_R-R_R_FI_filtered_partial_default]
+[48_BI_BI_R-R_R_FI_filtered_default]
 link_filter = "identifier NOT IN ('110005', '110006', '110007')"
 
 [49_R_R_FI-BI_R_R_50_weight_previous_month]
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index a24bf99c..9a5919bf 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -29,10 +29,10 @@
 default_backward_col = "default_backward"
 default_construction_col = "default_construction"
 link_inclusion_marker_col = "link_inclusion_marker"
-link_inclusion_forward_col = "link_inclusion_forward"
-link_inclusion_backward_col = "link_inclusion_backward"
-trimmed_forward_col = "trimmed_forward"
-trimmed_backward_col = "trimmed_backward"
+link_inclusion_previous_col = "link_inclusion_previous"
+link_inclusion_next_col = "link_inclusion_next"
+trimmed_forward_col = "trim_inclusion_forward"
+trimmed_backward_col = "trim_inclusion_backward"
 
 decimal_type = DecimalType(15, 6)
 
@@ -55,8 +55,8 @@
 default_backward_type = BooleanType()
 default_construction_type = BooleanType()
 link_inclusion_marker_type = BooleanType()
-link_inclusion_forward_type = BooleanType()
-link_inclusion_backward_type = BooleanType()
+link_inclusion_previous_type = BooleanType()
+link_inclusion_next_type = BooleanType()
 trimmed_forward_type = BooleanType()
 trimmed_backward_type = BooleanType()
 
@@ -78,8 +78,8 @@
     count_construction_col,
     forward_growth_col,
     backward_growth_col,
-    link_inclusion_forward_col,
-    link_inclusion_backward_col,
+    link_inclusion_previous_col,
+    link_inclusion_next_col,
     trimmed_forward_col,
     trimmed_backward_col,
     default_forward_col,
@@ -108,8 +108,8 @@
     default_backward_col: default_backward_type,
     default_construction_col: default_construction_type,
     link_inclusion_marker_col: link_inclusion_marker_type,
-    link_inclusion_forward_col: link_inclusion_forward_type,
-    link_inclusion_backward_col: link_inclusion_backward_type,
+    link_inclusion_previous_col: link_inclusion_previous_type,
+    link_inclusion_next_col: link_inclusion_next_type,
     trimmed_forward_col: trimmed_forward_type,
     trimmed_backward_col: trimmed_backward_type,
 }

From c29f0f93f48108482d02c253f65a154bc1f76ee9 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 10 May 2023 18:16:11 +0100
Subject: [PATCH 276/531] Column Rename

---
 statistical_methods_library/imputation/engine.py          | 6 +++---
 .../mean_of_ratios/methodology_scenarios/01_C_output.csv  | 2 +-
 .../methodology_scenarios/02_C_FI_output.csv              | 2 +-
 .../methodology_scenarios/03_R_R_FI_output.csv            | 2 +-
 .../methodology_scenarios/04_R_R_FI_FI_output.csv         | 2 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv                  | 2 +-
 .../methodology_scenarios/06_BI_BI_R_output.csv           | 2 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv                      | 2 +-
 .../methodology_scenarios/08_R_R_R_output.csv             | 2 +-
 .../methodology_scenarios/09_R_NS_C_output.csv            | 2 +-
 .../methodology_scenarios/10_C_FI_NS_R_output.csv         | 2 +-
 .../methodology_scenarios/11_R_R_FI-BI_R_R_output.csv     | 2 +-
 .../methodology_scenarios/12_C_FI_FI_FI_FI_output.csv     | 2 +-
 .../13_R_FI_FI_NS_BI_BI_R_output.csv                      | 2 +-
 .../14_C_FI_FI_NS_BI_BI_R_output.csv                      | 2 +-
 .../15_BI_BI_R_NS_R_FI_FI_output.csv                      | 2 +-
 .../16_BI_BI_R_NS_C_FI_FI_output.csv                      | 2 +-
 .../methodology_scenarios/17_NS_R_FI_NS_output.csv        | 2 +-
 .../methodology_scenarios/18_NS_BI_R_NS_output.csv        | 2 +-
 .../methodology_scenarios/20_mixed_data_output.csv        | 2 +-
 .../21_class_change_R_C_FI_output.csv                     | 2 +-
 .../22_class_change_C_BI_R_output.csv                     | 2 +-
 .../23_class_change_C_C_FI_output.csv                     | 2 +-
 .../24_class_change_R_BI_R_output.csv                     | 2 +-
 .../25_class_change_C_FI_FI_output.csv                    | 2 +-
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv             | 2 +-
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv             | 2 +-
 .../29_mixed_data_filtered_output.csv                     | 2 +-
 .../30_class_change_C_C_FI_filtered_output.csv            | 2 +-
 .../31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv     | 2 +-
 .../32_C_FI_FI_no_response_output.csv                     | 2 +-
 .../methodology_scenarios/34_default_link_output.csv      | 2 +-
 .../methodology_scenarios/35_TB_10_R_R_FI_output.csv      | 2 +-
 .../methodology_scenarios/36_TB_10_BI_BI_R_output.csv     | 2 +-
 .../methodology_scenarios/37_TB_10_C_FI_FI_output.csv     | 2 +-
 .../methodology_scenarios/38_T_10_R_R_FI_output.csv       | 2 +-
 .../methodology_scenarios/39_B_10_R_R_FI_output.csv       | 2 +-
 .../40_TB_10_R_R_FI_no_trim_output.csv                    | 2 +-
 .../41_TB_10_R_R_FI_filtered_output.csv                   | 2 +-
 .../42_TB_10_R_R_FI-BI_R_R_output.csv                     | 2 +-
 .../43_TB_10_BI_BI_R_boundary_output.csv                  | 2 +-
 .../44_TB_5_BI_BI_R_boundary_output.csv                   | 2 +-
 .../45_TB_10_R_R_FI_partial_no_trim_output.csv            | 2 +-
 .../46_TB_10_BI_BI_R_filtered_output.csv                  | 2 +-
 .../methodology_scenarios/47_TB_50_output.csv             | 2 +-
 .../48_BI_BI_R-R_R_FI_filtered_default_output.csv         | 2 +-
 .../49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv  | 2 +-
 .../methodology_scenarios/50_R_R_FI_50_weight_output.csv  | 2 +-
 .../methodology_scenarios/51_R_R_FI_80_weight_output.csv  | 2 +-
 .../methodology_scenarios/52_BI_BI_R_50_weight_output.csv | 2 +-
 .../methodology_scenarios/53_C_FI_FI_50_weight_output.csv | 2 +-
 .../54_R_R_FI-BI_R_R_50_weight_output.csv                 | 2 +-
 .../55_R_R_FI_50_weight_default_output.csv                | 2 +-
 .../56_BI_BI_R_50_weight_default_output.csv               | 2 +-
 .../57_C_FI_FI_50_weight_default_output.csv               | 2 +-
 .../58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv | 2 +-
 .../59_class_change_50_weight_output.csv                  | 2 +-
 .../60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv            | 2 +-
 .../61_R_R_FI-BI_R_R_50_weight_filtered_output.csv        | 2 +-
 .../62_mixed_data_50_weight_output.csv                    | 2 +-
 .../63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv           | 2 +-
 .../64_TB_10_C_FI_FI_50_weight_output.csv                 | 2 +-
 .../65_TB_10_BI_BI_R_50_weight_filtered_output.csv        | 2 +-
 ...66_TB_50_50_weight_filtered_partial_default_output.csv | 2 +-
 .../67_TB_50_50_weight_filtered_full_default_output.csv   | 2 +-
 .../68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv       | 2 +-
 .../69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv       | 2 +-
 .../70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv | 2 +-
 .../ratio_of_means/methodology_scenarios/01_C_output.csv  | 2 +-
 .../methodology_scenarios/02_C_FI_output.csv              | 2 +-
 .../methodology_scenarios/03_R_R_FI_output.csv            | 2 +-
 .../methodology_scenarios/04_R_R_FI_FI_output.csv         | 2 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv                  | 2 +-
 .../methodology_scenarios/06_BI_BI_R_output.csv           | 2 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv                      | 2 +-
 .../methodology_scenarios/08_R_R_R_output.csv             | 2 +-
 .../methodology_scenarios/09_R_NS_C_output.csv            | 2 +-
 .../methodology_scenarios/10_C_FI_NS_R_output.csv         | 2 +-
 .../methodology_scenarios/11_R_R_FI-BI_R_R_output.csv     | 2 +-
 .../methodology_scenarios/12_C_FI_FI_FI_FI_output.csv     | 2 +-
 .../13_R_FI_FI_NS_BI_BI_R_output.csv                      | 2 +-
 .../14_C_FI_FI_NS_BI_BI_R_output.csv                      | 2 +-
 .../15_BI_BI_R_NS_R_FI_FI_output.csv                      | 2 +-
 .../16_BI_BI_R_NS_C_FI_FI_output.csv                      | 2 +-
 .../methodology_scenarios/17_NS_R_FI_NS_output.csv        | 2 +-
 .../methodology_scenarios/18_NS_BI_R_NS_output.csv        | 2 +-
 .../methodology_scenarios/20_mixed_data_output.csv        | 2 +-
 .../21_class_change_R_C_FI_output.csv                     | 2 +-
 .../22_class_change_C_BI_R_output.csv                     | 2 +-
 .../23_class_change_C_C_FI_output.csv                     | 2 +-
 .../24_class_change_R_BI_R_output.csv                     | 2 +-
 .../25_class_change_C_FI_FI_output.csv                    | 2 +-
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv             | 2 +-
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv             | 2 +-
 .../29_mixed_data_filtered_output.csv                     | 2 +-
 .../30_class_change_C_C_FI_filtered_output.csv            | 2 +-
 .../methodology_scenarios/31_no_response_output.csv       | 2 +-
 .../methodology_scenarios/32_divide_by_zero_output.csv    | 2 +-
 tests/imputation/test_mean_of_ratios.py                   | 8 ++++----
 tests/imputation/test_ratio_of_means.py                   | 8 ++++----
 100 files changed, 108 insertions(+), 108 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 2aafe17e..2754f786 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -59,7 +59,7 @@ def impute(
     default_construction_col: Optional[str] = "default_construction",
     default_forward_col: Optional[str] = "default_forward",
     default_backward_col: Optional[str] = "default_backward",
-    link_inclusion_marker_col: Optional[str] = "link_inclusion_marker",
+    link_inclusion_current_col: Optional[str] = "link_inclusion_current",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
     periodicity: Optional[int] = 1,
@@ -342,11 +342,11 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             df = df.fillna(fill_value, fill_column)
 
         df = df.join(
-            filtered_df.select("ref", "period", expr("match AS link_inclusion_marker")),
+            filtered_df.select("ref", "period", expr("match AS link_inclusion_current")),
             ["ref", "period"],
             "left",
         )
-        output_col_mapping["link_inclusion_marker"] = link_inclusion_marker_col
+        output_col_mapping["link_inclusion_current"] = link_inclusion_current_col
         if weight is not None:
 
             def calculate_weighted_link(link_name):
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index 158cec5b..25cd21d1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
 10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
 10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index ec9f2ae5..79ad86c1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,,true,true,false,false
 20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,true,,false,true,false
 20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,,true,true,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 396436ed..3c4e53fc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,,true,true,false,false
 30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
 30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index 393efa03..f9aac92f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,,true,true,false,false
 40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
 40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index d183f1d5..88754591 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,,true,true,false,false
 50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
 50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index 806b6070..e8b09c62 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,,true,true,false,false
 60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
 60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 92af90fb..9120347e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,,true,true,false,false
 70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
 70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index ab83a9cf..ca41e760 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,,true,true,false,false
 80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
 80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 139b9220..70bf4808 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,,true,true,false,false
 90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
 90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index 6de8b836..e5ce4f03 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,,true,true,false,false
 100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
 100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index f88a9252..86d61b73 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,,true,true,false,false
 110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index f887b49d..e0c1547b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,,true,true,false,false
 120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
 120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index e467d695..6c7f0542 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,,true,true,false,false
 130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
 130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 3ec40b3a..ff9f514d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,,true,true,false,false
 140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
 140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 906062b6..69f06ec2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,,true,true,false,false
 150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
 150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 74701d14..a3c1e9d4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,,true,true,false,false
 160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
 160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index ec4d3ab4..d97d8db6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,,true,true,false,false
 170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
 170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index fba55448..354dc07e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,,true,true,false,false
 180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
 180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index bf545501..9e9ae559 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,,true,true,false,false
 200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
 200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index aad1aed0..3637a969 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 402cea36..fd432a4e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
 220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 2aaf95d9..c9506630 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
 230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index b744c090..a30c494b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 215db47e..b820ed8a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
 250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
 250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index de6b44e9..9bc654b3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 140001,202001,100,27,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,true,,true,true,false,false
 140001,202002,100,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,true,true,true,false,false,false
 140001,202003,100,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index 7e3d28fa..e0dbfc45 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 150001,202001,100,15,,1.285963763,1,0.917399451,181.0909091,5891,R,0,3,3,true,,true,true,false,false
 150001,202002,100,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,true,true,true,false,false,false
 150001,202003,100,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
index 093c7898..1497f7cb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 200001,202001,100,56,,1.262441238,1,0.597514698,71.63436123,7788,R,0,4,4,true,,true,true,false,false
 200001,202002,100,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,true,true,true,false,false,false
 200001,202003,100,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 05d0a423..ca5e822c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 230001,202001,1,10,,1.511049724,1,1.087985595,15.46666667,547,R,0,2,2,true,,true,true,false,false
 230001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,true,true,true,false,false,false
 230001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,895,R,2,0,2,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index 43f1d685..4a98bb5b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index d6e6ef98..65f39ef8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index e8840621..bec5893f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,,true,true,false,true
 120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,true,true,true,false,false,true
 120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,true,true,true,false,false,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 6dbd0d24..c0c7498a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index 7a9c2ec4..7de9fd2c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,false,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,false,false,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,false,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index c71b547e..8eae24aa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,,true,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index b789e926..737414ea 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index 27be4307..fcf4c9d4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index 3563dee2..6b0f047e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
index 9de72851..6622a6e0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.773194,96.75644,8444,R,0,9,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,3.889877,2.962348,81.65588616,7476,R,9,10,11,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.495827,1,76.108808,2003,R,10,0,11,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 26c6133c..de41a59b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,,true,true,false,false
 80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,true,true,true,false,false,false
 80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index 216d31a9..3f1d4b1c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,,true,true,false,false
 90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,true,true,true,false,false,false
 90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index d47219e9..cdb280ee 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,,true,true,false,false
 100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,true,true,true,false,false,false
 100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index a1d17ccf..c7e2bf99 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,true,true,true,false,false,false
 30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
index 8f027955..ed5c1c1a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,true,true,,true,true,false,false
 90001,202002,100,89,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,8916,R,17,18,20,true,true,true,true,true,false,false,false
 90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index 4f352f63..d679cc4c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,true,true,true,false,false,false
 30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
index 8410fdca..9f781045 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,true,true,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
index b663f8fb..a05e3a38 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,true,,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 1669e6be..6341dbcf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index a83d3ee9..c1f3b658 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index ffe02394..07ab9c42 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,true,true,true,false,false
 60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,true,true,true,false,false,false
 60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index a5d13cfd..7256f4f6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,true,true,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,true,true,true,false,false,false
 30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,true,true,true,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index f644bc46..f3139f6f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,1,1,1,1,0,0
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,1,1,1,0,0,0
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 186579b3..3c79951c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,1,1,1,1,0,0
 30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,1,1,1,0,0,0
 30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index 5c208b60..4ab03b87 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,1,1,1,1,0,0
 60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,1,1,1,0,0,0
 60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index 404cb0c3..63e1f7c2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,1,1,1,1,0,0
 30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,1,1,1,0,0,0
 30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index 525a355f..ecf63204 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,1,1,1,1,0,0
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,1,1,1,0,0,0
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index e284e51b..decf4cec 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
 210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,1,1,1,1,0,0
 210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,1,1,1,0,0,0
 210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index 65ee4252..d885b099 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
 70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,1,1,1,1,0,0
 70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,1,1,1,0,0,0
 70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,1,1,1,0,0,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index 02adbda2..250aeeb0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,true,true,1,0,0
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,0,0,0
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,true,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index 50af596a..48b11758 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
 110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,1,1,1,1,0,0
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,1,1,1,0,0,0
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 7caf9751..c5e6530c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,,1,1,1,1,0,0
 80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,1,1,1,0,0,0
 80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,,,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index a751bf3d..79d25eeb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,1,1,1,1,0,0
 30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,1,1,1,0,0,0
 30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,1,1,1,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index dd2ba5f9..0187335e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 90001,202001,100,89,,1.036787797,1,1.504436071,128.8429705,1,1.798238111,102.4414146,9244,R,0,17,19,true,true,true,1,0,0
 90001,202002,100,89,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,true,true,true,0,0,0
 90001,202003,100,89,0.694706146,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6194,R,18,0,21,true,true,true,0,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index 9e136b06..a89107a2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,,1,1,61.12436116,1,1.82834015,81.41733933,8444,R,0,0,9,true,true,true,1,1,0
 30001,202002,100,51,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,true,true,true,1,1,0
 30001,202003,100,51,,,1,1,85.37820513,0.984115327,1,77.81978439,2003,R,0,0,10,true,true,true,1,1,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index 800d51ff..3ea08dd2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,8444,R,0,0,9,false,true,false,1,1,1
 30001,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,false,false,false,1,1,1
 30001,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,2003,R,0,0,10,false,false,true,1,1,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index c3bbf0bb..9dedc106 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,false,false,true,true,true,true,false,false
 160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,false,false,true,true,true,false,false,false
 160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index 2277817c..b05c42ab 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next
 160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,false,false,true,true,true
 160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,false,false,true,true,true
 160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,false,false,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
index 8529cdbb..ccbd79a8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_marker,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 70001,202001,100,39,,3.280595369,1,47.92201545,107.48,5951,R,0,3,3,false,false,true,true,true,true,false,false
 70001,202002,100,39,0.304822719,,0.521730457,0.718061822,54.70285714,1814,R,3,2,3,false,false,true,true,false,false,false,false
 70001,202003,100,39,,,56.19409367,0.668609812,120.084507,734,R,2,2,3,false,false,false,true,true,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index 42bc7a73..a51ffa2b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false,true
 10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false,true
 10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index 24f2c6e3..eafa97ff 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false,true
 20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false,true
 20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index bc13ef47..27d173b5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false,true
 30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,true
 30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index f6de48e5..c178d756 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 40001,202001,100,35,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false,true
 40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,true
 40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 9b2812e2..eb813c14 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 50001,202010,100,59,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false,true
 50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,true
 50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index b80ed2d7..ef97459b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 60001,202001,100,15,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false,true
 60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,true
 60001,202003,100,15,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 46c14ad3..e29d7584 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 70001,202001,100,39,5951,R,1,1.964796824,107.48,0,3,3,true,false,false,true
 70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,true
 70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
index 945a24bf..18e7d494 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 80001,202001,100,91,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false,true
 80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,true
 80001,202003,100,91,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index bb13ba12..d9cab5c9 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 90001,202001,100,66,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false,true
 90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,true
 90001,202003,100,66,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index 4a3d7b94..ef34e66a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 100001,202001,100,26,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false,true
 100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,true
 100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 5306afc0..15d8803a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 110001,202001,100,89,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false,true
 110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,true
 110001,202003,100,89,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 3c5aeea6..1b4c90ce 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 120001,202001,100,50,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false,true
 120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,true
 120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index f7dac5be..aed6a1d0 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 130001,202001,100,20,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false,true
 130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,true
 130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index b06b6661..ed6e69a3 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
 140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
 140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 717d15c4..b22597ca 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
 150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
 150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index be3bfb37..66b55da6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 160001,202001,100,76,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false,true
 160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,true
 160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index fb9f54f1..a23ce5a3 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 170001,202001,100,69,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false,true
 170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,true
 170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index fadeb9e5..27252732 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 180001,202001,100,91,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false,true
 180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,true
 180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index 173a7b80..68759eec 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
 200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
 200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index d7581820..173b3432 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 10001,202001,1,10,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false,true
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
 10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 9bbefdd7..6e60af62 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
 10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index d6b0c5ec..3ef2c046 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
 10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index ab316d20..9e8bfa9b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,true
 10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
 10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 1c51ef53..08fc1f43 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,true
 10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false,true
 10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index f398685b..0ce8d727 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
 140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
 140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index b67c4cbb..cc8ca7bd 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
 150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
 150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
index 70cb304a..49bf3b36 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
 200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
 200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index d38bbf46..98532b7b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 10001,202001,1,10,547,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
 10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
 10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
index 89443df6..814d0330 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
 50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
 50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
index 360b1250..71b6c7e6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
@@ -1,4 +1,4 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_marker
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
 1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,true
 1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,true
 1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 9a5919bf..6fa64ed3 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -28,7 +28,7 @@
 default_forward_col = "default_forward"
 default_backward_col = "default_backward"
 default_construction_col = "default_construction"
-link_inclusion_marker_col = "link_inclusion_marker"
+link_inclusion_current_col = "link_inclusion_current"
 link_inclusion_previous_col = "link_inclusion_previous"
 link_inclusion_next_col = "link_inclusion_next"
 trimmed_forward_col = "trim_inclusion_forward"
@@ -54,7 +54,7 @@
 default_forward_type = BooleanType()
 default_backward_type = BooleanType()
 default_construction_type = BooleanType()
-link_inclusion_marker_type = BooleanType()
+link_inclusion_current_type = BooleanType()
 link_inclusion_previous_type = BooleanType()
 link_inclusion_next_type = BooleanType()
 trimmed_forward_type = BooleanType()
@@ -85,7 +85,7 @@
     default_forward_col,
     default_backward_col,
     default_construction_col,
-    link_inclusion_marker_col,
+    link_inclusion_current_col,
 )
 
 dataframe_types = {
@@ -107,7 +107,7 @@
     default_forward_col: default_forward_type,
     default_backward_col: default_backward_type,
     default_construction_col: default_construction_type,
-    link_inclusion_marker_col: link_inclusion_marker_type,
+    link_inclusion_current_col: link_inclusion_current_type,
     link_inclusion_previous_col: link_inclusion_previous_type,
     link_inclusion_next_col: link_inclusion_next_type,
     trimmed_forward_col: trimmed_forward_type,
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 3f848fe0..dabd7bff 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -26,7 +26,7 @@
 default_forward_col = "default_forward"
 default_backward_col = "default_backward"
 default_construction_col = "default_construction"
-link_inclusion_marker_col = "link_inclusion_marker"
+link_inclusion_current_col = "link_inclusion_current"
 
 decimal_type = DecimalType(15, 6)
 
@@ -46,7 +46,7 @@
 default_forward_type = BooleanType()
 default_backward_type = BooleanType()
 default_construction_type = BooleanType()
-link_inclusion_marker_type = BooleanType()
+link_inclusion_current_type = BooleanType()
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -67,7 +67,7 @@
     default_forward_col,
     default_backward_col,
     default_construction_col,
-    link_inclusion_marker_col,
+    link_inclusion_current_col,
 )
 
 dataframe_types = {
@@ -87,7 +87,7 @@
     default_forward_col: default_forward_type,
     default_backward_col: default_backward_type,
     default_construction_col: default_construction_type,
-    link_inclusion_marker_col: link_inclusion_marker_type,
+    link_inclusion_current_col: link_inclusion_current_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()

From 771506c0f368797356b96a27cf9e3ec7d8645790 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 10 May 2023 18:15:01 +0100
Subject: [PATCH 277/531] Make pyproject version an rc

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index f636b0c8..d62ce39c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0"
+version = "12.0.0-rc1"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From beb5f3ede053246cd82dac35aadf99a4df50227f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 10 May 2023 18:16:48 +0100
Subject: [PATCH 278/531] Bump rc version in pyproject

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index d62ce39c..16086d5b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc1"
+version = "12.0.0-rc2"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 27f99d4bc30f23fd2e4de5e2cbbda5c05a469578 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 10 May 2023 18:17:48 +0100
Subject: [PATCH 279/531] bump dependencies

---
 poetry.lock | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 0d77fea9..9c46e237 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -470,18 +470,6 @@ files = [
 [package.extras]
 yaml = ["PyYAML (>=5.1)", "more-itertools"]
 
-[[package]]
-name = "toml"
-version = "0.10.2"
-description = "Python Library for Tom's Obvious, Minimal Language"
-category = "dev"
-optional = false
-python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
-files = [
-    {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"},
-    {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"},
-]
-
 [[package]]
 name = "tomli"
 version = "2.0.1"
@@ -559,4 +547,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.7"
-content-hash = "73f6897180fd909cf89761915dc4c38f0cad5a444696dc463dda7a400c8fbb23"
+content-hash = "030886887dc78ab5e32a2e6181cb497f6655eb7a1e73a0285c47905680ea15b9"

From 9bf4e2dc8357be8fc6ca5d28e8f19884a1336bcb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 10 May 2023 18:33:40 +0100
Subject: [PATCH 280/531] Update pyproject.toml

---
 poetry.lock    | 14 +++++++++++++-
 pyproject.toml |  6 ++++--
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 9c46e237..6151dcc6 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -470,6 +470,18 @@ files = [
 [package.extras]
 yaml = ["PyYAML (>=5.1)", "more-itertools"]
 
+[[package]]
+name = "toml"
+version = "0.10.2"
+description = "Python Library for Tom's Obvious, Minimal Language"
+category = "dev"
+optional = false
+python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
+files = [
+    {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"},
+    {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"},
+]
+
 [[package]]
 name = "tomli"
 version = "2.0.1"
@@ -547,4 +559,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.7"
-content-hash = "030886887dc78ab5e32a2e6181cb497f6655eb7a1e73a0285c47905680ea15b9"
+content-hash = "5c7609c0dfcd0bdbde607960c17975d889343d3b36a0e1057999b3d6c1c63129"
diff --git a/pyproject.toml b/pyproject.toml
index 16086d5b..774f8946 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc2"
+version = "12.0.0-rc3"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
@@ -9,7 +9,8 @@ license = "MIT"
 python = "^3.7"
 pyspark = "3.1.1"
 
-[tool.poetry.dev-dependencies]
+[tool.poetry.group.dev.dependencies]
+toml = "^0.10.2"
 pytest = "^7.2.1"
 black = "^23.1"
 isort = "^5.11.4"
@@ -19,6 +20,7 @@ pytest-cov = "^4.0.0"
 chispa = "*"
 pytest-dependency = "^0.5.1"
 pytest-tap = "^3.3"
+
 [tool.isort]
 profile = "black"
 

From 2d229473c040d6c7cf8c6d1500041f173c0c5ec5 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 10 May 2023 18:37:02 +0100
Subject: [PATCH 281/531] Attempt to fix trimming

---
 .../imputation/ratio_calculators.py           | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index c5c7269c..02e30715 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -132,13 +132,28 @@ def upper_bound(c):
                         ),
                         expr(
                             """
-                            sum(cast(not link_inclusion_previous AS integer))
+                            sum(
+                                cast(
+                                    not (
+                                        link_inclusion_previous
+                                        AND link_inclusion_current
+                                    )
+                                AS integer)
+                            )
                             AS count_exclusion_forward
                             """
                         ),
                         expr(
                             """
-                            sum(cast(not link_inclusion_next AS integer))
+                            sum(
+                                cast(
+                                    not (
+                                        link_inclusion_next
+                                        AND link_exclusion_current
+                                    )
+                                    AS integer
+                                )
+                            )
                             AS count_exclusion_backward
                             """
                         ),

From eaa4bb5ab47d7de2ea2647365c7dcb29539ac94d Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 10 May 2023 18:45:29 +0100
Subject: [PATCH 282/531] Correction

---
 .../methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 69f06ec2..9186d99c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -21,7 +21,7 @@ identifier,date,group,other,output,marker,growth_forward,growth_backward,forward
 150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,true,true,true,false,false,false
 150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,true,true,,false,true,false
 150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,,,,true,false,false
-150004,202002,100,69,14767.632767,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,,false,false,false
+150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,,false,false,false
 150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,true,,,false,false,false
 150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,true,,,false,false,false
 150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,,,,false,false,false

From 8f16d42e41279bf7a167c02b9955d2bcb5b79d89 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 10 May 2023 18:56:46 +0100
Subject: [PATCH 283/531] Pass through current link inclusion column

---
 .../imputation/ratio_calculators.py            | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 02e30715..27103a34 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -61,20 +61,9 @@ def mean_of_ratios(
             col("next.match") & (lit(include_zeros) | (col("next.output") != lit(0))),
             col("next.output"),
         ).alias("next_output"),
-        expr(
-            """CASE
-                   WHEN previous.match IS NULL THEN NULL
-                   ELSE previous.match
-                END
-            AS link_inclusion_previous"""
-        ),
-        expr(
-            """CASE
-                   WHEN next.match IS NULL THEN NULL
-                   ELSE next.match
-                END
-            AS link_inclusion_next"""
-        ),
+        expr("previous.match AS link_inclusion_previous"),
+        expr("current.match AS link_inclusion_current"),
+        expr("next.match AS link_inclusion_next"),
     ).selectExpr(
         "period",
         "grouping",
@@ -83,6 +72,7 @@ def mean_of_ratios(
         "current_output",
         "link_inclusion_previous",
         "link_inclusion_next",
+        "link_inclusion_current",
         """CASE
                 WHEN link_inclusion_previous THEN CASE
                     WHEN previous_output = 0 OR

From 2ede3dcee4b4c37221b08099c16b6f486c3d42c9 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 10 May 2023 18:57:21 +0100
Subject: [PATCH 284/531] New rc

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 774f8946..5252913c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc3"
+version = "12.0.0-rc4"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From e3cbea546247e0ec7fdce5ceb2e74e3369279a9f Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 10 May 2023 19:41:27 +0100
Subject: [PATCH 285/531] Attempted Fixes

---
 .../imputation/ratio_calculators.py           | 32 ++++++++++---------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 27103a34..6b7b2a5d 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -74,21 +74,23 @@ def mean_of_ratios(
         "link_inclusion_next",
         "link_inclusion_current",
         """CASE
-                WHEN link_inclusion_previous THEN CASE
-                    WHEN previous_output = 0 OR
-                    (current_output = 0 AND previous_output IS NOT NULL)
-                    THEN 1
-                    ELSE current_output/previous_output
+                WHEN link_inclusion_current THEN CASE
+                    WHEN link_inclusion_previous AND link_inclusion_previous IS NOT NULL
+                    THEN CASE
+                        WHEN previous_output = 0 OR current_output = 0
+                        THEN 1
+                        ELSE current_output/previous_output
+                    END
                 END
             END AS growth_forward""",
         """CASE
-                WHEN link_inclusion_next
-                THEN CASE
-                    WHEN
-                        next_output = 0
-                        OR (current_output = 0 AND next_output IS NOT NULL)
-                    THEN 1
-                    ELSE current_output/next_output
+                WHEN link_inclusion_current THEN CASE
+                    WHEN link_inclusion_next AND link_inclusion_next IS NOT NULL
+                    THEN CASE
+                        WHEN next_output = 0 OR current_output = 0
+                        THEN 1
+                        ELSE current_output/next_output
+                    END
                 END
             END AS growth_backward""",
     )
@@ -125,7 +127,7 @@ def upper_bound(c):
                             sum(
                                 cast(
                                     not (
-                                        link_inclusion_previous
+                                        (link_inclusion_previous OR link_inclusion_previous IS NULL)
                                         AND link_inclusion_current
                                     )
                                 AS integer)
@@ -138,8 +140,8 @@ def upper_bound(c):
                             sum(
                                 cast(
                                     not (
-                                        link_inclusion_next
-                                        AND link_exclusion_current
+                                        (link_inclusion_next OR link_inclusion_next IS NULL)
+                                        AND link_inclusion_current
                                     )
                                     AS integer
                                 )

From debb1a707b867d3fafec3c308b45d2f2727c31b6 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 11 May 2023 12:06:18 +0100
Subject: [PATCH 286/531] Reformat with Black

---
 statistical_methods_library/imputation/engine.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 2754f786..595bc96a 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -150,7 +150,10 @@ def impute(
 
     if back_data_df:
         prepared_back_data_df = validation.validate_dataframe(
-            back_data_df, back_expected_columns, type_mapping, ["ref", "period"]
+            back_data_df,
+            back_expected_columns,
+            type_mapping,
+            ["ref", "period", "grouping"],
         )
         input_df = input_df.unionByName(back_data_df, allowMissingColumns=True)
 
@@ -342,7 +345,9 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             df = df.fillna(fill_value, fill_column)
 
         df = df.join(
-            filtered_df.select("ref", "period", expr("match AS link_inclusion_current")),
+            filtered_df.select(
+                "ref", "period", expr("match AS link_inclusion_current")
+            ),
             ["ref", "period"],
             "left",
         )

From d7dae63c9eeb8ed00d7ba07efd46b16eed4dac0b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 11 May 2023 12:07:17 +0100
Subject: [PATCH 287/531] Actually bump rc version

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 5252913c..304b9908 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc4"
+version = "12.0.0-rc6"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 048025343a03076fa84d3314a7a19e3f28914ff4 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 11 May 2023 13:34:06 +0100
Subject: [PATCH 288/531] Fixed Trimming. Adjusted Tests where data incorrect.

---
 .../imputation/ratio_calculators.py           | 12 ++--
 .../35_TB_10_R_R_FI_output.csv                | 12 ++--
 .../36_TB_10_BI_BI_R_output.csv               | 62 +++++++++----------
 .../37_TB_10_C_FI_FI_output.csv               | 32 +++++-----
 .../39_B_10_R_R_FI_output.csv                 | 12 ++--
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         |  4 +-
 ...BI_BI_R-R_R_FI_filtered_default_output.csv | 44 ++++++-------
 7 files changed, 89 insertions(+), 89 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 6b7b2a5d..37977987 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -200,26 +200,26 @@ def upper_bound(c):
             )
             .withColumn(
                 "trim_inclusion_forward",
-                (
+                (when(col("growth_forward").isNull(), None).otherwise(
                     col("num_forward").between(
                         col("lower_forward"), col("upper_forward")
                     )
                     | (
                         (trim_threshold - col("count_exclusion_forward"))
-                        < col("count_forward")
-                    )
+                        >= col("count_forward")
+                    ))
                 ),
             )
             .withColumn(
                 "trim_inclusion_backward",
-                (
+                (when(col("growth_backward").isNull(), None).otherwise(
                     col("num_backward").between(
                         col("lower_backward"), col("upper_backward")
                     )
                     | (
                         (trim_threshold - col("count_exclusion_backward"))
-                        < col("count_backward")
-                    )
+                        >= col("count_backward")
+                    ))
                 ),
             )
         )
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index c0c7498a..e35d547c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -28,10 +28,10 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,,false,true,false
 30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,true,,true,true,false,false
 30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,true,false,true,false
-30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,true,,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,true,,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,true,true,false,true,false
-30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,true,,true,false,false
-30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,true,,,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,,true,true,false,false
+30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,true,true,,false,false,false
 30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index 7de9fd2c..9632fb25 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,false,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,false,false,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,false,,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,false,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,false,false,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,false,,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,false,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,false,false,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,false,,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,false,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,false,false,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,false,,true,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,false,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,false,false,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,false,,true,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,false,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,false,false,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,false,,true,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,false,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,false,false,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,false,,true,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,true,,true,true,false,false
+30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,true,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,true,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,true,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,true,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,true,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11, ,false,true,,true,true,false,false
 30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,true,true,true,false,false,false
 30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,true,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,false,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,false,false,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,false,,true,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,false,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,false,false,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,false,,true,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,true,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,true,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,true,,true,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,true,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,true,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,true,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,true,true,,false,true,false
 30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,,,,true,false,false
 30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,,,,false,false,false
 30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index 8eae24aa..c187250f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,,true,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,,false,true,false
 30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,true,,true,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,true,,false,true,false
 30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,true,,true,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,true,,false,true,false
 30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,true,,true,true,false,false
 30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,true,,true,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,true,,false,true,false
 30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,true,,true,true,false,false
 30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,true,,true,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,true,,false,true,false
 30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,true,,true,true,false,false
 30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,true,,true,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,true,,false,true,false
 30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,true,,true,true,false,false
 30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,true,,true,false,false
-30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,true,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,true,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,true,,true,true,,true,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,true,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,true,,false,true,false
 30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,true,,true,true,false,false
 30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,,true,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,,false,true,false
 30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,true,,true,true,false,false
 30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,,true,false,false
-30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,true,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,true,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,true,,true,true,,true,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,true,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,true,,false,true,false
 30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,,,,true,false,false
 30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,,,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,,,,true,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index fcf4c9d4..4b614fad 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -20,18 +20,18 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,true,,true,true,false,false
 30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,true,true,true,false,false,false
 30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,true,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,true,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,true,,true,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,true,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,true,true,,false,true,false
 30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,true,,true,true,false,false
 30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,true,true,true,false,false,false
 30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,true,true,,false,true,false
 30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,true,,true,true,false,false
 30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,true,true,true,false,false,false
 30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,true,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,false,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,true,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,false,,true,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,true,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,true,true,,false,true,false
 30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,true,,true,true,false,false
 30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,true,true,,false,false,false
 30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index de41a59b..25fd647e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -13,7 +13,7 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,true,true,,false,true,false
 80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,true,,true,true,false,false
 80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,true,true,true,false,false,false
-80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,true,,true,true,,false,true,false
+80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,true,true,,false,true,false
 80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,true,,true,true,false,false
 80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,true,true,true,false,false,false
 80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,true,true,,false,true,false
@@ -28,7 +28,7 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,true,true,,false,true,false
 80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,true,,true,true,false,false
 80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,true,true,true,false,false,false
-80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,false,,true,true,,false,true,false
+80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,true,true,,false,true,false
 80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,true,,true,true,false,false
 80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,true,true,true,false,false,false
 80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,true,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
index 9f781045..d8341802 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,true,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,true,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,true,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,true,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,,,false,true,false
-110005,202001,200,27,,,1,1,1,280,BI,0,0,0,,,,,,true,true,true
-110005,202002,200,27,,,1,1,1,280,BI,0,0,0,,,,,,true,true,true
-110005,202003,200,27,,,1,1,1,280,R,0,0,0,,,false,,,true,true,true
-110006,202001,200,42,,,1,1,1,1869,R,0,0,0,,,false,,false,true,true,true
-110006,202002,200,42,,,1,1,1,1876,R,0,0,0,,,false,false,false,true,true,true
-110006,202003,200,42,,,1,1,1,1371,R,0,0,0,,,false,false,,true,true,true
-110007,202001,200,19,,,1,1,1,12769,R,0,0,0,,,false,,false,true,true,true
-110007,202002,200,19,,,1,1,1,2853,R,0,0,0,,,false,false,,true,true,true
-110007,202003,200,19,,,1,1,1,2853,FIR,0,0,0,,,,,,true,true,true
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,false,true,false
+110005,202001,200,27,,,1,1,1,280,BI,0,0,0,,,,true,true,true
+110005,202002,200,27,,,1,1,1,280,BI,0,0,0,,,,true,true,true
+110005,202003,200,27,,,1,1,1,280,R,0,0,0,false,,,true,true,true
+110006,202001,200,42,,,1,1,1,1869,R,0,0,0,false,,false,true,true,true
+110006,202002,200,42,,,1,1,1,1876,R,0,0,0,false,false,false,true,true,true
+110006,202003,200,42,,,1,1,1,1371,R,0,0,0,false,false,,true,true,true
+110007,202001,200,19,,,1,1,1,12769,R,0,0,0,false,,false,true,true,true
+110007,202002,200,19,,,1,1,1,2853,R,0,0,0,false,false,,true,true,true
+110007,202003,200,19,,,1,1,1,2853,FIR,0,0,0,,,,true,true,true

From 1615557fd28df68bdc4950514c5832b57a1717a1 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 11 May 2023 13:44:43 +0100
Subject: [PATCH 289/531] Correction

---
 statistical_methods_library/imputation/engine.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 595bc96a..cd051f98 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -375,11 +375,11 @@ def calculate_weighted_link(link_name):
                 curr_df.join(
                     prev_df,
                     (
-                        col("curr.ref")
-                        == col("prev.ref") & col("prev.period")
+                        (col("curr.ref")
+                        == col("prev.ref")) & (col("prev.period")
                         == calculate_previous_period(
                             col("curr.period"), weight_periodicity
-                        )
+                        ))
                     ),
                 )
                 .select(

From 9de8f1181982af6e81daa0cb8057a5d06f09ab38 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 11 May 2023 14:41:10 +0100
Subject: [PATCH 290/531] All Non Weight Tests Should Now Pass. Updated Weight
 Tests TO Contain True/False and now 1/0

---
 .../imputation/engine.py                      |  12 +-
 .../imputation/ratio_calculators.py           |  38 +--
 .../51_R_R_FI_80_weight_output.csv            |  16 +-
 .../52_BI_BI_R_50_weight_output.csv           |  14 +-
 .../53_C_FI_FI_50_weight_output.csv           |  12 +-
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  48 ++--
 .../55_R_R_FI_50_weight_default_output.csv    |  24 +-
 .../56_BI_BI_R_50_weight_default_output.csv   |  24 +-
 .../57_C_FI_FI_50_weight_default_output.csv   |  24 +-
 ...I_R_R_50_weight_partial_default_output.csv |  48 ++--
 .../59_class_change_50_weight_output.csv      |  30 +--
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv |  56 ++--
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv |  72 ++---
 .../62_mixed_data_50_weight_output.csv        |  42 +--
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 144 +++++-----
 .../64_TB_10_C_FI_FI_50_weight_output.csv     | 146 +++++-----
 ...B_10_BI_BI_R_50_weight_filtered_output.csv | 254 +++++++++---------
 ...weight_filtered_partial_default_output.csv | 146 +++++-----
 ...50_weight_filtered_full_default_output.csv | 146 +++++-----
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv |  70 ++---
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv |  70 ++---
 ...FI_FI_R_FI_alternating_filtered_output.csv |  58 ++--
 22 files changed, 751 insertions(+), 743 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index cd051f98..c0376d7d 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -375,11 +375,13 @@ def calculate_weighted_link(link_name):
                 curr_df.join(
                     prev_df,
                     (
-                        (col("curr.ref")
-                        == col("prev.ref")) & (col("prev.period")
-                        == calculate_previous_period(
-                            col("curr.period"), weight_periodicity
-                        ))
+                        (col("curr.ref") == col("prev.ref"))
+                        & (
+                            col("prev.period")
+                            == calculate_previous_period(
+                                col("curr.period"), weight_periodicity
+                            )
+                        )
                     ),
                 )
                 .select(
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 37977987..8ae59b89 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -127,7 +127,8 @@ def upper_bound(c):
                             sum(
                                 cast(
                                     not (
-                                        (link_inclusion_previous OR link_inclusion_previous IS NULL)
+                                        (link_inclusion_previous OR
+                                        link_inclusion_previous IS NULL)
                                         AND link_inclusion_current
                                     )
                                 AS integer)
@@ -140,7 +141,8 @@ def upper_bound(c):
                             sum(
                                 cast(
                                     not (
-                                        (link_inclusion_next OR link_inclusion_next IS NULL)
+                                        (link_inclusion_next OR
+                                        link_inclusion_next IS NULL)
                                         AND link_inclusion_current
                                     )
                                     AS integer
@@ -200,26 +202,30 @@ def upper_bound(c):
             )
             .withColumn(
                 "trim_inclusion_forward",
-                (when(col("growth_forward").isNull(), None).otherwise(
-                    col("num_forward").between(
-                        col("lower_forward"), col("upper_forward")
+                (
+                    when(col("growth_forward").isNull(), None).otherwise(
+                        col("num_forward").between(
+                            col("lower_forward"), col("upper_forward")
+                        )
+                        | (
+                            (trim_threshold - col("count_exclusion_forward"))
+                            >= col("count_forward")
+                        )
                     )
-                    | (
-                        (trim_threshold - col("count_exclusion_forward"))
-                        >= col("count_forward")
-                    ))
                 ),
             )
             .withColumn(
                 "trim_inclusion_backward",
-                (when(col("growth_backward").isNull(), None).otherwise(
-                    col("num_backward").between(
-                        col("lower_backward"), col("upper_backward")
+                (
+                    when(col("growth_backward").isNull(), None).otherwise(
+                        col("num_backward").between(
+                            col("lower_backward"), col("upper_backward")
+                        )
+                        | (
+                            (trim_threshold - col("count_exclusion_backward"))
+                            >= col("count_backward")
+                        )
                     )
-                    | (
-                        (trim_threshold - col("count_exclusion_backward"))
-                        >= col("count_backward")
-                    ))
                 ),
             )
         )
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index c1f3b658..fba87c37 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,15 +1,15 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,true,true,true,false,false
+30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,true,true,true,false,true,false
-30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,true,true,true,true,false,false
+30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,true,true,false,true,false
-30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,true,true,true,true,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,true,true,false,true,false
-30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,true,true,true,true,false,false
-30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,true,,true,true,false,false
+30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,true,,false,false,false
 30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,,,,false,true,false
 30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,,
 30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index 07ab9c42..e873654d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,true,true,true,false,false
+60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,,true,true,false,false
 60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,true,true,true,false,false,false
-60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,true,true,true,false,true,false
-60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,true,true,true,true,false,false
+60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,true,true,,false,true,false
+60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,true,,true,true,false,false
 60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,true,true,true,false,false,false
-60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,true,true,true,false,true,false
-60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,true,true,true,true,false,false
+60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,true,true,,false,true,false
+60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,true,,true,true,false,false
 60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,true,true,true,false,false,false
-60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,true,true,true,false,true,false
+60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,true,true,,false,true,false
 60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,,,,true,false,false
 60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,,,,false,false,false
-60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,true,true,true,false,true,false
+60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,true,,,false,true,false
 60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,,,,
 60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
 60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index 7256f4f6..35b0454c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,true,true,true,true,false,false
+30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,true,,true,true,false,false
 30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,true,true,true,false,true,false
-30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,true,true,true,true,false,false
+30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,true,,true,true,false,false
 30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,true,true,false,true,false
-30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,true,true,true,true,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,true,,true,true,false,false
 30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,true,true,false,true,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,true,,false,true,false
 30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,,,,true,false,false
 30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,,,,false,false,false
 30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index f3139f6f..954d0283 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,1,1,1,1,0,0
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,1,1,1,0,0,0
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,1,1,1,0,1,0
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,1,1,1,1,0,0
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,1,1,1,0,0,0
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,1,1,1,0,1,0
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,1,1,1,1,0,0
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,1,1,1,0,0,0
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,1,1,1,0,1,0
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,1,1,1,1,0,0
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,1,1,1,0,0,0
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,0,1,0
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,1,1,1,1,0,0
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,1,1,1,0,0,0
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,1,1,1,0,1,0
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,1,1,1,1,0,0
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,1,1,1,0,0,0
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,1,1,1,0,1,0
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,1,1,1,1,0,0
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,1,1,1,0,0,0
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,1,1,1,0,1,0
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,,1,0,0
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,1,1,1,0,0,0
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,1,1,1,0,1,0
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,,true,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,true,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,true,,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,,true,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,true,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,true,,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,,true,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,true,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,true,,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,true,,true,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,true,,false,true,false
 110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,,
 110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
 110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 3c79951c..93cb5606 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,1,1,1,1,0,0
-30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,1,1,1,0,0,0
-30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,1,1,1,0,1,0
-30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,1,1,1,1,0,0
-30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,1,1,1,0,0,0
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,1,1,1,0,1,0
-30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,1,1,1,1,0,0
-30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,1,1,1,0,0,0
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,1,1,1,0,1,0
-30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,1,1,1,1,0,0
-30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,1,1,1,0,0,0
-30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,,,,0,1,0
+30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,true,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,true,,true,true,false,false
+30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,true,true,,false,false,false
+30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,,,,false,true,false
 30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,,,,
 30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,,,,
 30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index 4ab03b87..4c446d7f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,1,1,1,1,0,0
-60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,1,1,1,0,0,0
-60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,1,1,1,0,1,0
-60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,1,1,1,1,0,0
-60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,1,1,1,0,0,0
-60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,1,1,1,0,1,0
-60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,1,1,1,1,0,0
-60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,1,1,1,0,0,0
-60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,1,1,1,0,1,0
-60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,,,,1,0,0
-60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,,,,0,0,0
-60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,1,1,1,0,1,0
+60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,true,,true,true,false,false
+60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,true,true,true,false,false,false
+60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,true,true,,false,true,false
+60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,true,,true,true,false,false
+60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,true,true,true,false,false,false
+60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,true,true,,false,true,false
+60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,true,,true,true,false,false
+60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,true,true,true,false,false,false
+60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,true,true,,false,true,false
+60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,,,,true,false,false
+60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,,,,false,false,false
+60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,true,,,false,true,false
 60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,,,,
 60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,,,,
 60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index 63e1f7c2..4ebae8b4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,1,1,1,1,0,0
-30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,1,1,1,0,0,0
-30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,1,1,1,0,1,0
-30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,1,1,1,1,0,0
-30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,1,1,1,0,0,0
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,1,1,1,0,1,0
-30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,1,1,1,1,0,0
-30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,1,1,1,0,0,0
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,1,1,1,0,1,0
-30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,,,,1,0,0
-30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,,,,0,0,0
-30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,,,,0,1,0
+30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,true,true,,false,true,false
+30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,,,,true,false,false
+30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,,,,false,false,false
+30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,,,,false,true,false
 30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,,,,
 30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,,,,
 30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index ecf63204..8b8b5374 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,1,1,1,1,0,0
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,1,1,1,0,0,0
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,1,1,1,0,1,0
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,1,1,1,1,0,0
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,1,1,1,0,0,0
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,1,1,1,0,1,0
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,1,1,1,1,0,0
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,1,1,1,0,0,0
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,1,1,1,0,1,0
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,1,1,1,1,0,0
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,1,1,1,0,0,0
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,0,1,0
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,1,1,1,1,0,0
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,1,1,1,0,0,0
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,1,1,1,0,1,0
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,1,1,1,1,0,0
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,1,1,1,0,0,0
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,1,1,1,0,1,0
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,1,1,1,1,0,0
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,1,1,1,0,0,0
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,1,1,1,0,1,0
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,,,,1,0,0
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,1,1,1,0,0,0
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,1,1,1,0,1,0
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,true,,true,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,true,true,true,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,true,,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,true,,true,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,true,true,true,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,true,,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,true,,true,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,true,true,true,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,true,,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,,,,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,true,,true,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,true,,false,true,false
 110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,,
 110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
 110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index decf4cec..7a1a6276 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,19 +1,19 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,1,1,1,1,0,0
-210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,1,1,1,0,0,0
-210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,1,1,1,0,1,0
-210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,1,1,1,1,0,0
-210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,1,1,1,0,0,0
-210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,1,1,1,0,1,0
-210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,1,1,1,1,0,0
-210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,1,1,1,0,0,0
-210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,1,1,1,0,1,0
-210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,1,1,1,1,0,0
-210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,1,1,1,0,0,0
-210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,1,1,1,0,1,0
-210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,1,1,1,1,0,0
-210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,,,,0,0,0
-210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,,,,0,1,0
+210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,true,,true,true,false,false
+210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,true,true,true,false,false,false
+210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,true,true,,false,true,false
+210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,true,,true,true,false,false
+210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,true,true,true,false,false,false
+210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,true,true,,false,true,false
+210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,true,,true,true,false,false
+210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,true,true,true,false,false,false
+210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,true,true,,false,true,false
+210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,true,,true,true,false,false
+210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,true,true,true,false,false,false
+210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,true,true,,false,true,false
+210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,true,,,true,false,false
+210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,,,,false,false,false
+210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,,,,false,true,false
 210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
 210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
 210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index d885b099..d1369e20 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,32 +1,32 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,1,1,1,1,0,0
-70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,1,1,1,0,0,0
-70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,1,1,1,0,0,0
-70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,1,1,1,0,0,0
-70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,1,1,1,0,0,0
-70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,1,1,1,0,0,0
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,1,1,1,0,1,0
-70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,1,1,1,1,0,0
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,1,1,1,0,0,0
-70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,1,1,1,0,0,0
-70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,1,1,1,0,0,0
-70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,1,1,1,0,0,0
-70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,1,1,1,0,0,0
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,1,1,1,0,1,0
-70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,1,1,1,1,0,0
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,1,1,1,0,0,0
-70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,1,1,1,0,0,0
-70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,1,1,1,0,0,0
-70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,1,1,1,0,0,0
-70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,1,1,1,0,0,0
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,1,1,1,0,1,0
-70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,,,,1,0,0
-70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,,,,0,0,0
-70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,1,1,1,0,0,0
-70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,,,,0,0,0
-70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,,,,0,0,0
-70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,1,1,1,0,0,0
-70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,,,,0,1,0
+70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,true,,true,true,false,false
+70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,true,true,true,false,false,false
+70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,true,true,true,false,false,false
+70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,true,true,true,false,false,false
+70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,true,true,true,false,false,false
+70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,true,true,true,false,false,false
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,true,true,,false,true,false
+70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,true,,true,true,false,false
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,true,true,true,false,false,false
+70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,true,true,true,false,false,false
+70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,true,true,true,false,false,false
+70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,true,true,true,false,false,false
+70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,true,true,true,false,false,false
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,true,true,,false,true,false
+70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,true,,true,true,false,false
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,true,true,true,false,false,false
+70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,true,true,true,false,false,false
+70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,true,true,true,false,false,false
+70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,true,true,true,false,false,false
+70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,true,true,true,false,false,false
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,true,true,,false,true,false
+70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,,,,true,false,false
+70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,,,,false,false,false
+70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,true,,,false,false,false
+70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,,,,false,false,false
+70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,,,,false,false,false
+70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,true,,,false,false,false
+70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,,,,false,true,false
 70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,,,,
 70001,201902,100,39,,,1,1,1,,,,,,,,,,,,,,
 70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index 250aeeb0..9823dcbd 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -1,40 +1,40 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,true,true,1,0,0
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,0,0,0
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,true,0,1,0
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,true,true,1,0,0
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,true,0,0,0
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,true,true,0,1,0
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,true,true,1,0,0
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,true,0,0,0
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,true,true,0,1,0
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,true,true,1,0,0
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,true,true,0,0,0
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,0,1,0
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,true,true,1,0,0
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,true,0,0,0
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,true,true,0,1,0
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,true,true,1,0,0
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,true,0,0,0
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,true,true,0,1,0
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,true,true,1,0,0
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,true,0,0,0
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,true,true,0,1,0
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,,1,0,0
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,true,true,true,0,0,0
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,true,true,0,1,0
-110009,202001,100,85,,,1,2.656680299,101.7103175,1,2.09204015,76.03985875,150000,R,0,4,4,false,true,false,1,0,0
-110009,202002,100,85,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,false,false,false,0,0,0
-110009,202003,100,85,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,120000,R,3,0,3,false,false,true,0,1,0
-110010,202001,100,71,,,1,2.656680299,101.7103175,1,2.09204015,76.03985875,5398.829971,C,0,4,4,,,,1,0,0
-110010,202002,100,71,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,,0,0,0
-110010,202003,100,71,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4888.735268,FIC,3,0,3,,,,0,1,0
-110011,202001,200,85,,,1,2.290844366,182.25,1,2.642597676,144.865,150000,R,0,3,3,false,true,false,1,0,0
-110011,202002,200,85,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,false,false,false,0,0,0
-110011,202003,200,85,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,120000,R,4,0,4,false,false,true,0,1,0
-110012,202001,200,71,,,1,2.290844366,182.25,1,2.642597676,144.865,10285.415,C,0,3,3,,,,1,0,0
-110012,202002,200,71,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,,0,0,0
-110012,202003,200,71,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,13496.15416,FIC,4,0,4,,,,0,1,0
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,,true,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,true,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,true,,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,,true,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,true,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,true,,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,,true,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,true,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,true,,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,true,,true,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,true,,false,true,false
+110009,202001,100,85,,,1,2.656680299,101.7103175,1,2.09204015,76.03985875,150000,R,0,4,4,false,,false,true,false,false
+110009,202002,100,85,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,false,false,false,false,false,false
+110009,202003,100,85,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,120000,R,3,0,3,false,false,,false,true,false
+110010,202001,100,71,,,1,2.656680299,101.7103175,1,2.09204015,76.03985875,5398.829971,C,0,4,4,,,,true,false,false
+110010,202002,100,71,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,,false,false,false
+110010,202003,100,71,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4888.735268,FIC,3,0,3,,,,false,true,false
+110011,202001,200,85,,,1,2.290844366,182.25,1,2.642597676,144.865,150000,R,0,3,3,false,,false,true,false,false
+110011,202002,200,85,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,false,false,false,false,false,false
+110011,202003,200,85,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,120000,R,4,0,4,false,false,,false,true,false
+110012,202001,200,71,,,1,2.290844366,182.25,1,2.642597676,144.865,10285.415,C,0,3,3,,,,true,false,false
+110012,202002,200,71,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,,false,false,false
+110012,202003,200,71,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,13496.15416,FIC,4,0,4,,,,false,true,false
 110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,,
 110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
 110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index 48b11758..e14b550b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,1,1,1,1,0,0
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,1,1,1,0,0,0
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,1,1,1,0,1,0
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,1,1,1,1,0,0
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,1,1,1,0,0,0
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,1,1,1,0,1,0
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,1,1,1,1,0,0
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,1,1,1,0,0,0
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,1,1,1,0,1,0
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,1,1,1,1,0,0
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,1,1,1,0,0,0
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,,,,0,1,0
-110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,,,,1,1,1
-110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,,,,1,1,1
-110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,1,1,1,1,1,1
-110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,1,1,1,1,1,1
-110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,,,,1,1,1
-110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,,,,1,1,1
-110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,,,,1,1,1
-110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,,,,1,1,1
-110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,,,,1,1,1
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,true,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,true,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,true,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,true,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,true,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,true,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,true,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,true,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,true,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,true,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,,,,false,true,false
+110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,,,,true,true,true
+110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,,,,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,true,,true,true,true,true
+110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,true,,true,true,true
+110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,,,,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,,,,true,true,true
+110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,,,,true,true,true
+110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,,,,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,,,,true,true,true
 110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
 110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,
 110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index c5e6530c..1409b30a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,76 +1,76 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,,1,1,1,1,0,0
-80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,,,1,1,1,0,0,0
-80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,,,1,1,1,0,1,0
-80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,,1,1,1,1,0,0
-80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,,,1,1,1,0,0,0
-80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,,,1,1,1,0,1,0
-80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,,1,1,1,1,0,0
-80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,,,1,1,1,0,0,0
-80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,,,1,1,1,0,1,0
-80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,,1,1,1,1,0,0
-80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,,,1,1,1,0,0,0
-80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,,,1,1,1,0,1,0
-80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,TRUE,1,1,1,1,0,0
-80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,TRUE,TRUE,1,1,1,0,0,0
-80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,,,1,1,1,0,1,0
-80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,,1,1,1,1,0,0
-80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,,,1,1,1,0,0,0
-80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,,,1,1,1,0,1,0
-80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,,1,1,1,1,0,0
-80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,,,1,1,1,0,0,0
-80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,,,1,1,1,0,1,0
-80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,,1,1,1,1,0,0
-80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,,,1,1,1,0,0,0
-80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,,,1,1,1,0,1,0
-80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,,1,1,1,1,0,0
-80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,,,1,1,1,0,0,0
-80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,,,1,1,1,0,1,0
-80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,,1,1,1,1,0,0
-80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,,,1,1,1,0,0,0
-80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,TRUE,,1,1,1,0,1,0
-80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,TRUE,1,1,1,1,0,0
-80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,TRUE,TRUE,1,1,1,0,0,0
-80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,TRUE,,1,1,1,0,1,0
-80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,,1,1,1,1,0,0
-80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,,,1,1,1,0,0,0
-80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,,,,0,1,0
-80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,,1,1,1,1,0,0
-80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,,,1,1,1,0,0,0
-80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,,,1,1,1,0,1,0
-80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,,1,1,1,1,0,0
-80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,,,1,1,1,0,0,0
-80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,,,1,1,1,0,1,0
-80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,TRUE,1,1,1,1,0,0
-80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,TRUE,,1,1,1,0,0,0
-80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,,,1,1,1,0,1,0
-80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,,1,1,1,1,0,0
-80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,,,1,1,1,0,0,0
-80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,,,1,1,1,0,1,0
-80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,,1,1,1,1,0,0
-80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,,,1,1,1,0,0,0
-80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,,,1,1,1,0,1,0
-80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,,1,1,1,1,0,0
-80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,,,1,1,1,0,0,0
-80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,,,1,1,1,0,1,0
-80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,,1,1,1,1,0,0
-80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,,TRUE,1,1,1,0,0,0
-80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,TRUE,,1,1,1,0,1,0
-80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,,1,1,1,1,0,0
-80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,,TRUE,1,1,1,0,0,0
-80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,TRUE,,1,1,1,0,1,0
-80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,,1,1,1,1,0,0
-80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,,,1,1,1,0,0,0
-80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,,,1,1,1,0,1,0
-80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,TRUE,1,1,1,1,0,0
-80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,,TRUE,1,1,1,0,0,0
-80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,,,1,1,1,0,1,0
-80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,,1,1,1,1,0,0
-80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,,,1,1,1,0,0,0
-80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,,,1,1,1,0,1,0
-80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,,,,1,0,0
-80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,,1,1,1,0,0,0
-80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,,,1,1,1,0,1,0
+80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,true,true,,true,true,false,false
+80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,true,true,true,true,true,false,false,false
+80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,true,,true,true,,false,true,false
+80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,true,true,,true,true,false,false
+80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,true,true,true,true,true,false,false,false
+80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,true,,true,true,,false,true,false
+80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,true,true,,true,true,false,false
+80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,true,true,true,true,true,false,false,false
+80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,true,,true,true,,false,true,false
+80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,true,true,,true,true,false,false
+80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,true,true,true,true,true,false,false,false
+80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,true,,true,true,,false,true,false
+80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,false,true,,true,true,false,false
+80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,false,false,true,true,true,false,false,false
+80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,true,,true,true,,false,true,false
+80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,true,true,,true,true,false,false
+80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,true,true,true,true,true,false,false,false
+80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,true,,true,true,,false,true,false
+80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,true,true,,true,true,false,false
+80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,true,true,true,true,true,false,false,false
+80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,true,,true,true,,false,true,false
+80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,,true,true,false,false
+80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,true,true,true,true,true,false,false,false
+80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,true,,true,true,,false,true,false
+80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,true,true,,true,true,false,false
+80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,true,true,true,true,true,false,false,false
+80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,true,,true,true,,false,true,false
+80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,true,true,,true,true,false,false
+80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,true,true,true,true,true,false,false,false
+80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,false,,true,true,,false,true,false
+80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,false,true,,true,true,false,false
+80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,false,false,true,true,true,false,false,false
+80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,false,,true,true,,false,true,false
+80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,,true,true,false,false
+80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,true,,true,true,,false,false,false
+80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,,,,false,true,false
+80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,true,true,,true,true,false,false
+80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,true,true,true,true,true,false,false,false
+80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,true,,true,true,,false,true,false
+80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,true,true,,true,true,false,false
+80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,true,true,true,true,true,false,false,false
+80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,true,,true,true,,false,true,false
+80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,false,true,,true,true,false,false
+80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,false,true,true,true,true,false,false,false
+80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,true,,true,true,,false,true,false
+80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,true,true,,true,true,false,false
+80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,true,true,true,true,true,false,false,false
+80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,true,,true,true,,false,true,false
+80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,true,true,,true,true,false,false
+80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,true,true,true,true,true,false,false,false
+80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,true,,true,true,,false,true,false
+80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,true,true,,true,true,false,false
+80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,true,true,true,true,true,false,false,false
+80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,true,,true,true,,false,true,false
+80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,true,true,,true,true,false,false
+80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,true,false,true,true,true,false,false,false
+80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,false,,true,true,,false,true,false
+80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,true,true,,true,true,false,false
+80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,true,false,true,true,true,false,false,false
+80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,false,,true,true,,false,true,false
+80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,true,true,,true,true,false,false
+80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,true,true,true,true,true,false,false,false
+80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,true,,true,true,,false,true,false
+80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,false,true,,true,true,false,false
+80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,true,false,true,true,true,false,false,false
+80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,true,,true,true,,false,true,false
+80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,true,true,,true,true,false,false
+80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,true,true,true,true,true,false,false,false
+80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,true,,true,true,,false,true,false
+80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,,,,true,false,false
+80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,true,,true,false,false,false
+80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,true,true,,false,true,false
 80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
 80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
 80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index 79d25eeb..549cff40 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,1,1,1,1,0,0
-30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,1,1,1,0,0,0
-30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,1,1,1,0,1,0
-30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,1,1,1,1,0,0
-30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,1,1,1,0,0,0
-30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,1,1,1,0,1,0
-30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,1,1,1,1,0,0
-30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,1,1,1,0,0,0
-30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,1,1,1,0,1,0
-30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,1,1,1,1,0,0
-30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,1,1,1,0,0,0
-30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,1,1,1,0,1,0
-30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,1,1,1,1,0,0
-30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,1,1,1,0,0,0
-30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,1,1,1,0,1,0
-30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,1,1,1,1,0,0
-30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,1,1,1,0,0,0
-30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,1,1,1,0,1,0
-30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,1,1,1,1,0,0
-30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,1,1,1,0,0,0
-30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,1,1,1,0,1,0
-30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,1,1,1,1,0,0
-30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,1,1,1,0,0,0
-30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,1,1,1,0,1,0
-30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,1,1,1,1,0,0
-30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,1,1,1,0,0,0
-30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,1,1,1,0,1,0
-30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,1,1,1,1,0,0
-30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,1,1,1,0,0,0
-30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,1,1,1,0,1,0
-30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,1,1,1,1,0,0
-30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,1,1,1,0,0,0
-30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,1,1,1,0,1,0
-30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,,1,0,0
-30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,,0,0,0
-30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,,0,1,0
-30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,,true,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,true,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,true,,true,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,,true,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,true,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,true,,true,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,,true,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,true,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,true,,true,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,,true,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,true,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,true,,true,true,,false,true,false
+30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,,true,true,,true,true,false,false
+30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,true,true,true,true,true,false,false,false
+30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,true,,true,true,,false,true,false
+30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,,true,true,,true,true,false,false
+30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,true,true,true,true,true,false,false,false
+30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,true,,true,true,,false,true,false
+30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,,true,true,,true,true,false,false
+30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,true,true,true,true,true,false,false,false
+30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,true,,true,true,,false,true,false
+30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,,true,true,,true,true,false,false
+30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,true,true,true,true,true,false,false,false
+30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,true,,true,true,,false,true,false
+30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,,true,true,,true,true,false,false
+30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,true,true,true,true,true,false,false,false
+30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,true,,true,true,,false,true,false
+30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,,true,true,,true,true,false,false
+30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,true,true,true,true,true,false,false,false
+30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,true,,true,true,,false,true,false
+30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,,true,true,,true,true,false,false
+30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,true,true,true,true,true,false,false,false
+30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,true,,true,true,,false,true,false
+30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,,,,true,false,false
+30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,,,,false,false,false
+30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,,,,false,true,false
+30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index 0187335e..d06e392c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -1,127 +1,127 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.036787797,1,1.504436071,128.8429705,1,1.798238111,102.4414146,9244,R,0,17,19,true,true,true,1,0,0
-90001,202002,100,89,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,true,true,true,0,0,0
-90001,202003,100,89,0.694706146,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6194,R,18,0,21,true,true,true,0,1,0
-90002,202001,100,83,,0.817550398,1,1.504436071,128.8429705,1,1.798238111,102.4414146,4826,R,0,17,19,true,true,true,1,0,0
-90002,202002,100,83,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,true,true,true,0,0,0
-90002,202003,100,83,0.803489751,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4743,R,18,0,21,true,true,true,0,1,0
-90003,202001,100,4,,,1,1.504436071,128.8429705,1,1.798238111,102.4414146,7586,R,0,17,19,false,true,true,1,0,0
-90003,202002,100,4,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,true,false,true,0,0,0
-90003,202003,100,4,1.406496063,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,1429,R,18,0,21,true,true,true,0,1,0
-90004,202001,100,76,,1.305847569,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3975,R,0,17,19,true,true,true,1,0,0
-90004,202002,100,76,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,true,true,true,0,0,0
-90004,202003,100,76,1.206636005,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3673,R,18,0,21,true,true,true,0,1,0
-90005,202001,100,18,,0.622072678,1,1.504436071,128.8429705,1,1.798238111,102.4414146,1941,R,0,17,19,true,true,true,1,0,0
-90005,202002,100,18,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,true,true,true,0,0,0
-90005,202003,100,18,0.387050567,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,1208,R,18,0,21,true,true,true,0,1,0
-90006,202001,100,94,,0.763047038,1,1.504436071,128.8429705,1,1.798238111,102.4414146,5405,R,0,17,19,true,true,true,1,0,0
-90006,202002,100,94,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,true,true,true,0,0,0
-90006,202003,100,94,0.703053532,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4980,R,18,0,21,true,true,true,0,1,0
-90007,202001,100,8,,5.333239595,1,1.504436071,128.8429705,1,1.798238111,102.4414146,15172,R,0,17,19,true,true,true,1,0,0
-90007,202002,100,8,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,true,true,true,0,0,0
-90007,202003,100,8,1.230684055,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3501,R,18,0,21,true,true,true,0,1,0
-90008,202001,100,304,,1.129530598,1,1.504436071,128.8429705,1,1.798238111,102.4414146,16298,R,0,17,19,true,true,true,1,0,0
-90008,202002,100,304,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,true,true,true,0,0,0
-90008,202003,100,304,0.990729498,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,14295,R,18,0,21,true,true,true,0,1,0
-90009,202001,100,45,,0.740562712,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3698,R,0,17,19,true,true,true,1,0,0
-90009,202002,100,45,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,true,true,true,0,0,0
-90009,202003,100,45,0.843571749,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4212,R,18,0,21,true,true,true,0,1,0
-90010,202001,100,100,,0.760511998,1,1.504436071,128.8429705,1,1.798238111,102.4414146,7722,R,0,17,19,true,true,true,1,0,0
-90010,202002,100,100,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,true,true,true,0,0,0
-90010,202003,100,100,0.644660382,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6545,R,18,0,21,true,true,true,0,1,0
-90011,202001,100,19,,8.365866031,1,1.504436071,128.8429705,1,1.798238111,102.4414146,30344,R,0,17,19,true,true,true,1,0,0
-90011,202002,100,19,0.119533351,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,true,true,true,0,0,0
-90011,202003,100,19,2.00928009,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,7288,R,18,0,21,true,true,true,0,1,0
-90012,202001,100,304,,1.408940798,1,1.504436071,128.8429705,1,1.798238111,102.4414146,16298,R,0,17,19,true,true,true,1,0,0
-90012,202002,100,304,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,true,true,true,0,0,0
-90012,202003,100,304,1.165730094,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,13484,R,18,0,21,true,true,true,0,1,0
-90013,202001,100,54,,1.106799294,1,1.504436071,128.8429705,1,1.798238111,102.4414146,20190,R,0,17,19,true,true,true,1,0,0
-90013,202002,100,54,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,true,true,true,0,0,0
-90013,202003,100,54,1.58023419,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,28826,R,18,0,21,true,true,true,0,1,0
-90014,202001,100,47,,0.845985046,1,1.504436071,128.8429705,1,1.798238111,102.4414146,4260,R,0,17,19,true,true,true,1,0,0
-90014,202002,100,42,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,true,true,true,0,0,0
-90014,202003,100,42,1.28773421,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6484,R,18,0,21,true,true,true,0,1,0
-90015,202001,100,57,,3.886845827,1,1.504436071,128.8429705,1,1.798238111,102.4414146,19236,R,0,17,19,true,true,true,1,0,0
-90015,202002,100,57,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,true,true,true,0,0,0
-90015,202003,100,57,0.716195191,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3544,R,18,0,21,true,true,true,0,1,0
-90016,202001,100,163,,0.906730921,1,1.504436071,128.8429705,1,1.798238111,102.4414146,14902,R,0,17,19,true,true,true,1,0,0
-90016,202002,100,163,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,true,true,true,0,0,0
-90016,202003,100,163,1.500085186,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,24653,R,18,0,21,true,true,true,0,1,0
-90017,202001,100,149,,0.702275751,1,1.504436071,128.8429705,1,1.798238111,102.4414146,35476,R,0,17,19,true,true,true,1,0,0
-90017,202002,100,149,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,true,true,true,0,0,0
-90017,202003,100,149,1.058635817,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,53477,R,18,0,21,true,true,true,0,1,0
-90018,202001,100,126,,0.543204684,1,1.504436071,128.8429705,1,1.798238111,102.4414146,13845,R,0,17,19,true,true,true,1,0,0
-90018,202002,100,126,1.840926688,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,true,true,true,0,0,0
-90018,202003,100,126,1.075364795,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,27409,R,18,0,21,true,true,true,0,1,0
-90019,202001,100,6,,2.530969376,1,1.504436071,128.8429705,1,1.798238111,102.4414146,1099,R,0,17,19,true,true,true,1,0,0
-90019,202002,100,6,0.395105531,3.51659919,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,true,true,true,0,0,0
-90019,202003,100,6,0.284365646,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,124,R,18,0,21,true,true,true,0,1,0
-90020,202001,100,22,,1.677715809,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3348,R,0,17,19,true,true,true,1,0,0
-90020,202002,100,22,0.596048505,0.395102278,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,true,true,true,0,0,0
-90020,202003,100,22,2.530990214,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,5051,R,18,0,21,true,true,true,0,1,0
-90021,202001,100,155,,,1,1.504436071,128.8429705,1,1.798238111,102.4414146,48979.92546,BI,0,17,19,,,,1,0,0
-90021,202002,100,155,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,,,,0,0,0
-90021,202003,100,155,,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,21046,R,18,0,21,true,true,true,0,1,0
-90001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90001,201902,100,89,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90001,201903,100,89,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90002,201902,100,83,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90002,201903,100,83,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90003,201902,100,4,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90003,201903,100,4,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90004,201902,100,76,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90004,201903,100,76,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90005,201901,100,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90005,201902,100,18,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90005,201903,100,18,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90006,201901,100,94,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90006,201902,100,94,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90006,201903,100,94,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90007,201901,100,8,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90007,201902,100,8,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90007,201903,100,8,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90008,201901,100,304,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90008,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90008,201903,100,304,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90009,201901,100,45,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90009,201902,100,45,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90009,201903,100,45,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90010,201901,100,100,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90010,201902,100,100,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90010,201903,100,100,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90011,201901,100,19,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90011,201902,100,19,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90011,201903,100,19,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90012,201901,100,304,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90012,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90012,201903,100,304,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90013,201901,100,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90013,201902,100,54,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90013,201903,100,54,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90014,201901,100,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90014,201902,100,42,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90014,201903,100,42,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90015,201901,100,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90015,201902,100,57,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90015,201903,100,57,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90016,201901,100,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90016,201902,100,163,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90016,201903,100,163,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90017,201901,100,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90017,201902,100,149,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90017,201903,100,149,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90018,201901,100,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90018,201902,100,126,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90018,201903,100,126,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90019,201901,100,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90019,201902,100,6,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90019,201903,100,6,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90020,201901,100,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90020,201902,100,22,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90020,201903,100,22,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
-90021,201901,100,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-90021,201902,100,155,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,
-90021,201903,100,155,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+90001,202001,100,89,,1.036787797,1,1.504436071,128.8429705,1,1.798238111,102.4414146,9244,R,0,17,19,,true,true,,true,true,false,false
+90001,202002,100,89,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,true,true,true,true,true,false,false,false
+90001,202003,100,89,0.694706146,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6194,R,18,0,21,true,,true,true,,false,true,false
+90002,202001,100,83,,0.817550398,1,1.504436071,128.8429705,1,1.798238111,102.4414146,4826,R,0,17,19,,true,true,,true,true,false,false
+90002,202002,100,83,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,true,true,true,true,true,false,false,false
+90002,202003,100,83,0.803489751,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4743,R,18,0,21,true,,true,true,,false,true,false
+90003,202001,100,4,,,1,1.504436071,128.8429705,1,1.798238111,102.4414146,7586,R,0,17,19,,true,false,,true,true,false,false
+90003,202002,100,4,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,true,true,true,false,true,false,false,false
+90003,202003,100,4,1.406496063,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,1429,R,18,0,21,true,,true,true,,false,true,false
+90004,202001,100,76,,1.305847569,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3975,R,0,17,19,,true,true,,true,true,false,false
+90004,202002,100,76,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,true,true,true,true,true,false,false,false
+90004,202003,100,76,1.206636005,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3673,R,18,0,21,true,,true,true,,false,true,false
+90005,202001,100,18,,0.622072678,1,1.504436071,128.8429705,1,1.798238111,102.4414146,1941,R,0,17,19,,true,true,,true,true,false,false
+90005,202002,100,18,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,true,true,true,true,true,false,false,false
+90005,202003,100,18,0.387050567,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,1208,R,18,0,21,true,,true,true,,false,true,false
+90006,202001,100,94,,0.763047038,1,1.504436071,128.8429705,1,1.798238111,102.4414146,5405,R,0,17,19,,true,true,,true,true,false,false
+90006,202002,100,94,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,true,true,true,true,true,false,false,false
+90006,202003,100,94,0.703053532,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4980,R,18,0,21,true,,true,true,,false,true,false
+90007,202001,100,8,,5.333239595,1,1.504436071,128.8429705,1,1.798238111,102.4414146,15172,R,0,17,19,,true,true,,true,true,false,false
+90007,202002,100,8,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,true,true,true,true,true,false,false,false
+90007,202003,100,8,1.230684055,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3501,R,18,0,21,true,,true,true,,false,true,false
+90008,202001,100,304,,1.129530598,1,1.504436071,128.8429705,1,1.798238111,102.4414146,16298,R,0,17,19,,true,true,,true,true,false,false
+90008,202002,100,304,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,true,true,true,true,true,false,false,false
+90008,202003,100,304,0.990729498,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,14295,R,18,0,21,true,,true,true,,false,true,false
+90009,202001,100,45,,0.740562712,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3698,R,0,17,19,,true,true,,true,true,false,false
+90009,202002,100,45,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,true,true,true,true,true,false,false,false
+90009,202003,100,45,0.843571749,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4212,R,18,0,21,true,,true,true,,false,true,false
+90010,202001,100,100,,0.760511998,1,1.504436071,128.8429705,1,1.798238111,102.4414146,7722,R,0,17,19,,true,true,,true,true,false,false
+90010,202002,100,100,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,true,true,true,true,true,false,false,false
+90010,202003,100,100,0.644660382,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6545,R,18,0,21,true,,true,true,,false,true,false
+90011,202001,100,19,,8.365866031,1,1.504436071,128.8429705,1,1.798238111,102.4414146,30344,R,0,17,19,,true,true,,true,true,false,false
+90011,202002,100,19,0.119533351,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,true,true,true,true,true,false,false,false
+90011,202003,100,19,2.00928009,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,7288,R,18,0,21,true,,true,true,,false,true,false
+90012,202001,100,304,,1.408940798,1,1.504436071,128.8429705,1,1.798238111,102.4414146,16298,R,0,17,19,,true,true,,true,true,false,false
+90012,202002,100,304,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,true,true,true,true,true,false,false,false
+90012,202003,100,304,1.165730094,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,13484,R,18,0,21,true,,true,true,,false,true,false
+90013,202001,100,54,,1.106799294,1,1.504436071,128.8429705,1,1.798238111,102.4414146,20190,R,0,17,19,,true,true,,true,true,false,false
+90013,202002,100,54,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,true,true,true,true,true,false,false,false
+90013,202003,100,54,1.58023419,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,28826,R,18,0,21,true,,true,true,,false,true,false
+90014,202001,100,47,,0.845985046,1,1.504436071,128.8429705,1,1.798238111,102.4414146,4260,R,0,17,19,,true,true,,true,true,false,false
+90014,202002,100,42,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,true,true,true,true,true,false,false,false
+90014,202003,100,42,1.28773421,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6484,R,18,0,21,true,,true,true,,false,true,false
+90015,202001,100,57,,3.886845827,1,1.504436071,128.8429705,1,1.798238111,102.4414146,19236,R,0,17,19,,true,true,,true,true,false,false
+90015,202002,100,57,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,true,true,true,true,true,false,false,false
+90015,202003,100,57,0.716195191,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3544,R,18,0,21,true,,true,true,,false,true,false
+90016,202001,100,163,,0.906730921,1,1.504436071,128.8429705,1,1.798238111,102.4414146,14902,R,0,17,19,,true,true,,true,true,false,false
+90016,202002,100,163,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,true,true,true,true,true,false,false,false
+90016,202003,100,163,1.500085186,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,24653,R,18,0,21,true,,true,true,,false,true,false
+90017,202001,100,149,,0.702275751,1,1.504436071,128.8429705,1,1.798238111,102.4414146,35476,R,0,17,19,,true,true,,true,true,false,false
+90017,202002,100,149,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,true,true,true,true,true,false,false,false
+90017,202003,100,149,1.058635817,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,53477,R,18,0,21,true,,true,true,,false,true,false
+90018,202001,100,126,,0.543204684,1,1.504436071,128.8429705,1,1.798238111,102.4414146,13845,R,0,17,19,,true,true,,true,true,false,false
+90018,202002,100,126,1.840926688,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,true,true,true,true,true,false,false,false
+90018,202003,100,126,1.075364795,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,27409,R,18,0,21,true,,true,true,,false,true,false
+90019,202001,100,6,,2.530969376,1,1.504436071,128.8429705,1,1.798238111,102.4414146,1099,R,0,17,19,,true,true,,true,true,false,false
+90019,202002,100,6,0.395105531,3.51659919,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,true,true,true,true,true,false,false,false
+90019,202003,100,6,0.284365646,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,124,R,18,0,21,true,,true,true,,false,true,false
+90020,202001,100,22,,1.677715809,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3348,R,0,17,19,,true,true,,true,true,false,false
+90020,202002,100,22,0.596048505,0.395102278,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,true,true,true,true,true,false,false,false
+90020,202003,100,22,2.530990214,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,5051,R,18,0,21,true,,true,true,,false,true,false
+90021,202001,100,155,,,1,1.504436071,128.8429705,1,1.798238111,102.4414146,48979.92546,BI,0,17,19,,,,,,true,false,false
+90021,202002,100,155,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,,,,,,false,false,false
+90021,202003,100,155,,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,21046,R,18,0,21,,,true,,,false,true,false
+90001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90001,201902,100,89,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90001,201903,100,89,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90002,201902,100,83,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90002,201903,100,83,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90003,201902,100,4,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90003,201903,100,4,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90004,201902,100,76,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90004,201903,100,76,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90005,201901,100,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90005,201902,100,18,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90005,201903,100,18,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90006,201901,100,94,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90006,201902,100,94,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90006,201903,100,94,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90007,201901,100,8,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90007,201902,100,8,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90007,201903,100,8,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90008,201901,100,304,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90008,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90008,201903,100,304,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90009,201901,100,45,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90009,201902,100,45,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90009,201903,100,45,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90010,201901,100,100,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90010,201902,100,100,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90010,201903,100,100,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90011,201901,100,19,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90011,201902,100,19,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90011,201903,100,19,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90012,201901,100,304,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90012,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90012,201903,100,304,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90013,201901,100,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90013,201902,100,54,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90013,201903,100,54,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90014,201901,100,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90014,201902,100,42,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90014,201903,100,42,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90015,201901,100,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90015,201902,100,57,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90015,201903,100,57,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90016,201901,100,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90016,201902,100,163,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90016,201903,100,163,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90017,201901,100,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90017,201902,100,149,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90017,201903,100,149,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90018,201901,100,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90018,201902,100,126,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90018,201903,100,126,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90019,201901,100,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90019,201902,100,6,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90019,201903,100,6,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90020,201901,100,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90020,201902,100,22,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90020,201903,100,22,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90021,201901,100,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
+90021,201902,100,155,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
+90021,201903,100,155,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index a89107a2..b0cdace5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,,1,1,61.12436116,1,1.82834015,81.41733933,8444,R,0,0,9,true,true,true,1,1,0
-30001,202002,100,51,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,true,true,true,1,1,0
-30001,202003,100,51,,,1,1,85.37820513,0.984115327,1,77.81978439,2003,R,0,0,10,true,true,true,1,1,0
-30002,202001,100,72,,,1,1,61.12436116,1,1.82834015,81.41733933,9343,R,0,0,9,true,true,true,1,1,0
-30002,202002,100,72,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,true,true,true,1,1,0
-30002,202003,100,72,,,1,1,85.37820513,0.984115327,1,77.81978439,4897,R,0,0,10,true,true,true,1,1,0
-30003,202001,100,7,,4.265190233,1,1,61.12436116,1,1.82834015,81.41733933,7511,R,0,0,9,true,true,true,1,1,0
-30003,202002,100,7,0.234456131,0.271256932,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,true,true,true,1,1,0
-30003,202003,100,7,3.686541738,,1,1,85.37820513,0.984115327,1,77.81978439,6492,R,0,0,10,true,true,true,1,1,0
-30004,202001,100,81,,0.030288689,1,1,61.12436116,1,1.82834015,81.41733933,64,R,0,0,9,true,true,true,1,1,0
-30004,202002,100,81,33.015625,11.42162162,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,true,true,true,1,1,0
-30004,202003,100,81,0.087553242,,1,1,85.37820513,0.984115327,1,77.81978439,185,R,0,0,10,true,true,true,1,1,0
-30005,202001,100,5,,0.941234172,1,1,61.12436116,1,1.82834015,81.41733933,844,R,0,0,9,true,true,true,1,1,0
-30005,202002,100,5,1.062434865,3.199201198,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,true,true,true,1,1,0
-30005,202003,100,5,0.312578027,,1,1,85.37820513,0.984115327,1,77.81978439,280,R,0,0,10,true,true,true,1,1,0
-30006,202001,100,14,,0.995885563,1,1,61.12436116,1,1.82834015,81.41733933,1869,R,0,0,9,true,true,true,1,1,0
-30006,202002,100,14,1.004131435,1.368417982,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,true,true,true,1,1,0
-30006,202003,100,14,0.730770871,,1,1,85.37820513,0.984115327,1,77.81978439,1371,R,0,0,10,true,true,true,1,1,0
-30007,202001,100,12,,4.475816911,1,1,61.12436116,1,1.82834015,81.41733933,12769,R,0,0,9,true,true,true,1,1,0
-30007,202002,100,12,0.223422901,0.248269056,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,true,true,true,1,1,0
-30007,202003,100,12,4.027888195,,1,1,85.37820513,0.984115327,1,77.81978439,11491,R,0,0,10,true,true,true,1,1,0
-30008,202001,100,162,,0.023463069,1,1,61.12436116,1,1.82834015,81.41733933,141,R,0,0,9,true,true,true,1,1,0
-30008,202002,100,162,42.62017045,13.86213906,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,true,true,true,1,1,0
-30008,202003,100,162,0.072138939,,1,1,85.37820513,0.984115327,1,77.81978439,433,R,0,0,10,true,true,true,1,1,0
-30009,202001,100,26,,1.589639934,1,1,61.12436116,1,1.82834015,81.41733933,6417,R,0,0,9,true,true,true,1,1,0
-30009,202002,100,26,0.629073275,3.053782962,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,true,true,true,1,1,0
-30009,202003,100,26,0.327462695,,1,1,85.37820513,0.984115327,1,77.81978439,1322,R,0,0,10,true,true,true,1,1,0
-30010,202001,100,144,,,1,1,61.12436116,1,1.82834015,81.41733933,28963,R,0,0,9,true,true,true,1,1,0
-30010,202002,100,144,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,true,true,true,1,1,0
-30010,202003,100,144,,,1,1,85.37820513,0.984115327,1,77.81978439,10529,R,0,0,10,true,true,true,1,1,0
-30011,202001,100,5,,5.249464902,1,1,61.12436116,1,1.82834015,81.41733933,6009,R,0,0,9,true,true,true,1,1,0
-30011,202002,100,5,0.190495606,0.226047443,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,true,true,true,1,1,0
-30011,202003,100,5,4.423850085,,1,1,85.37820513,0.984115327,1,77.81978439,5064,R,0,0,10,true,true,true,1,1,0
-30012,202001,100,275,,0.034032235,1,1,61.12436116,1,1.82834015,81.41733933,256,R,0,0,9,true,true,true,1,1,0
-30012,202002,100,275,29.38390625,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,true,true,true,1,1,0
-30012,202003,100,275,,,1,1,85.37820513,0.984115327,1,77.81978439,7402.515486,FIR,0,0,10,,,,1,1,0
-30001,201901,100,51,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30001,201902,100,51,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30001,201903,100,51,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30002,201901,100,72,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30002,201902,100,72,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30002,201903,100,72,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30003,201901,100,7,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30003,201902,100,7,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30003,201903,100,7,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30004,201901,100,81,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30004,201902,100,81,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30004,201903,100,81,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30005,201901,100,5,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30005,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30005,201903,100,5,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30006,201901,100,14,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30006,201902,100,14,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30006,201903,100,14,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30007,201901,100,12,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30007,201902,100,12,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30007,201903,100,12,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30008,201901,100,162,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30008,201902,100,162,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30008,201903,100,162,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30009,201901,100,26,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30009,201902,100,26,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30009,201903,100,26,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30010,201901,100,144,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30010,201902,100,144,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30010,201903,100,144,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30011,201901,100,5,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30011,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30011,201903,100,5,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30012,201901,100,275,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30012,201902,100,275,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30012,201903,100,275,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,,1,1,61.12436116,1,1.82834015,81.41733933,8444,R,0,0,9,,false,true,,true,true,true,false
+30001,202002,100,51,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,false,false,true,true,true,true,true,false
+30001,202003,100,51,,,1,1,85.37820513,0.984115327,1,77.81978439,2003,R,0,0,10,false,,true,true,,true,true,false
+30002,202001,100,72,,,1,1,61.12436116,1,1.82834015,81.41733933,9343,R,0,0,9,,false,true,,true,true,true,false
+30002,202002,100,72,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,false,false,true,true,true,true,true,false
+30002,202003,100,72,,,1,1,85.37820513,0.984115327,1,77.81978439,4897,R,0,0,10,false,,true,true,,true,true,false
+30003,202001,100,7,,4.265190233,1,1,61.12436116,1,1.82834015,81.41733933,7511,R,0,0,9,,false,true,,true,true,true,false
+30003,202002,100,7,0.234456131,0.271256932,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,false,false,true,true,true,true,true,false
+30003,202003,100,7,3.686541738,,1,1,85.37820513,0.984115327,1,77.81978439,6492,R,0,0,10,false,,true,true,,true,true,false
+30004,202001,100,81,,0.030288689,1,1,61.12436116,1,1.82834015,81.41733933,64,R,0,0,9,,false,true,,true,true,true,false
+30004,202002,100,81,33.015625,11.42162162,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,false,false,true,true,true,true,true,false
+30004,202003,100,81,0.087553242,,1,1,85.37820513,0.984115327,1,77.81978439,185,R,0,0,10,false,,true,true,,true,true,false
+30005,202001,100,5,,0.941234172,1,1,61.12436116,1,1.82834015,81.41733933,844,R,0,0,9,,false,true,,true,true,true,false
+30005,202002,100,5,1.062434865,3.199201198,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,false,false,true,true,true,true,true,false
+30005,202003,100,5,0.312578027,,1,1,85.37820513,0.984115327,1,77.81978439,280,R,0,0,10,false,,true,true,,true,true,false
+30006,202001,100,14,,0.995885563,1,1,61.12436116,1,1.82834015,81.41733933,1869,R,0,0,9,,false,true,,true,true,true,false
+30006,202002,100,14,1.004131435,1.368417982,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,false,false,true,true,true,true,true,false
+30006,202003,100,14,0.730770871,,1,1,85.37820513,0.984115327,1,77.81978439,1371,R,0,0,10,false,,true,true,,true,true,false
+30007,202001,100,12,,4.475816911,1,1,61.12436116,1,1.82834015,81.41733933,12769,R,0,0,9,,false,true,,true,true,true,false
+30007,202002,100,12,0.223422901,0.248269056,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,false,false,true,true,true,true,true,false
+30007,202003,100,12,4.027888195,,1,1,85.37820513,0.984115327,1,77.81978439,11491,R,0,0,10,false,,true,true,,true,true,false
+30008,202001,100,162,,0.023463069,1,1,61.12436116,1,1.82834015,81.41733933,141,R,0,0,9,,false,true,,true,true,true,false
+30008,202002,100,162,42.62017045,13.86213906,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,false,false,true,true,true,true,true,false
+30008,202003,100,162,0.072138939,,1,1,85.37820513,0.984115327,1,77.81978439,433,R,0,0,10,false,,true,true,,true,true,false
+30009,202001,100,26,,1.589639934,1,1,61.12436116,1,1.82834015,81.41733933,6417,R,0,0,9,,false,true,,true,true,true,false
+30009,202002,100,26,0.629073275,3.053782962,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,false,false,true,true,true,true,true,false
+30009,202003,100,26,0.327462695,,1,1,85.37820513,0.984115327,1,77.81978439,1322,R,0,0,10,false,,true,true,,true,true,false
+30010,202001,100,144,,,1,1,61.12436116,1,1.82834015,81.41733933,28963,R,0,0,9,,false,true,,true,true,true,false
+30010,202002,100,144,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,false,false,true,true,true,true,true,false
+30010,202003,100,144,,,1,1,85.37820513,0.984115327,1,77.81978439,10529,R,0,0,10,false,,true,true,,true,true,false
+30011,202001,100,5,,5.249464902,1,1,61.12436116,1,1.82834015,81.41733933,6009,R,0,0,9,,false,true,,true,true,true,false
+30011,202002,100,5,0.190495606,0.226047443,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,false,false,true,true,true,true,true,false
+30011,202003,100,5,4.423850085,,1,1,85.37820513,0.984115327,1,77.81978439,5064,R,0,0,10,false,,true,true,,true,true,false
+30012,202001,100,275,,0.034032235,1,1,61.12436116,1,1.82834015,81.41733933,256,R,0,0,9,,false,true,,true,true,true,false
+30012,202002,100,275,29.38390625,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,false,,true,true,,true,true,false
+30012,202003,100,275,,,1,1,85.37820513,0.984115327,1,77.81978439,7402.515486,FIR,0,0,10,,,,,,true,true,false
+30001,201901,100,51,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30001,201902,100,51,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30001,201903,100,51,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30002,201901,100,72,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30002,201902,100,72,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30002,201903,100,72,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30003,201901,100,7,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30003,201902,100,7,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30003,201903,100,7,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30004,201901,100,81,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30004,201902,100,81,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30004,201903,100,81,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30005,201901,100,5,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30005,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30005,201903,100,5,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30006,201901,100,14,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30006,201902,100,14,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30006,201903,100,14,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30007,201901,100,12,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30007,201902,100,12,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30007,201903,100,12,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30008,201901,100,162,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30008,201902,100,162,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30008,201903,100,162,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30009,201901,100,26,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30009,201902,100,26,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30009,201903,100,26,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30010,201901,100,144,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30010,201902,100,144,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30010,201903,100,144,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30011,201901,100,5,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30011,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30011,201903,100,5,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30012,201901,100,275,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30012,201902,100,275,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30012,201903,100,275,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index 3ea08dd2..e40b6e5b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,8444,R,0,0,9,false,true,false,1,1,1
-30001,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,false,false,false,1,1,1
-30001,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,2003,R,0,0,10,false,false,true,1,1,1
-30002,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,9343,R,0,0,9,false,true,false,1,1,1
-30002,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,false,false,false,1,1,1
-30002,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,4897,R,0,0,10,false,false,true,1,1,1
-30003,202001,100,0,,4.265190233,1,1,1,1,1.82834015,51.35515875,7511,R,0,0,9,true,true,true,1,1,1
-30003,202002,100,0,0.234456131,0.271256932,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,true,true,true,1,1,1
-30003,202003,100,0,3.686541738,,1,1,1,0.984115327,1,35.63068182,6492,R,0,0,10,true,true,true,1,1,1
-30004,202001,100,0,,0.030288689,1,1,1,1,1.82834015,51.35515875,64,R,0,0,9,true,true,true,1,1,1
-30004,202002,100,0,33.015625,11.42162162,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,true,true,true,1,1,1
-30004,202003,100,0,0.087553242,,1,1,1,0.984115327,1,35.63068182,185,R,0,0,10,true,true,true,1,1,1
-30005,202001,100,0,,0.941234172,1,1,1,1,1.82834015,51.35515875,844,R,0,0,9,true,true,true,1,1,1
-30005,202002,100,0,1.062434865,3.199201198,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,true,true,true,1,1,1
-30005,202003,100,0,0.312578027,,1,1,1,0.984115327,1,35.63068182,280,R,0,0,10,true,true,true,1,1,1
-30006,202001,100,0,,0.995885563,1,1,1,1,1.82834015,51.35515875,1869,R,0,0,9,true,true,true,1,1,1
-30006,202002,100,0,1.004131435,1.368417982,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,true,true,true,1,1,1
-30006,202003,100,0,0.730770871,,1,1,1,0.984115327,1,35.63068182,1371,R,0,0,10,true,true,true,1,1,1
-30007,202001,100,0,,4.475816911,1,1,1,1,1.82834015,51.35515875,12769,R,0,0,9,true,true,true,1,1,1
-30007,202002,100,0,0.223422901,0.248269056,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,true,true,true,1,1,1
-30007,202003,100,0,4.027888195,,1,1,1,0.984115327,1,35.63068182,11491,R,0,0,10,true,true,true,1,1,1
-30008,202001,100,0,,0.023463069,1,1,1,1,1.82834015,51.35515875,141,R,0,0,9,true,true,true,1,1,1
-30008,202002,100,0,42.62017045,13.86213906,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,true,true,true,1,1,1
-30008,202003,100,0,0.072138939,,1,1,1,0.984115327,1,35.63068182,433,R,0,0,10,true,true,true,1,1,1
-30009,202001,100,0,,1.589639934,1,1,1,1,1.82834015,51.35515875,6417,R,0,0,9,true,true,true,1,1,1
-30009,202002,100,0,0.629073275,3.053782962,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,true,true,true,1,1,1
-30009,202003,100,0,0.327462695,,1,1,1,0.984115327,1,35.63068182,1322,R,0,0,10,true,true,true,1,1,1
-30010,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,28963,R,0,0,9,false,true,false,1,1,1
-30010,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,false,false,false,1,1,1
-30010,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,10529,R,0,0,10,false,false,true,1,1,1
-30011,202001,100,0,,5.249464902,1,1,1,1,1.82834015,51.35515875,6009,R,0,0,9,true,true,true,1,1,1
-30011,202002,100,0,0.190495606,0.226047443,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,true,true,true,1,1,1
-30011,202003,100,0,4.423850085,,1,1,1,0.984115327,1,35.63068182,5064,R,0,0,10,true,true,true,1,1,1
-30012,202001,100,0,,0.034032235,1,1,1,1,1.82834015,51.35515875,256,R,0,0,9,true,true,true,1,1,1
-30012,202002,100,0,29.38390625,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,true,true,true,1,1,1
-30012,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,7402.515486,FIR,0,0,10,,,,1,1,1
-30001,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30001,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30001,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30002,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30002,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30002,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30003,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30003,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30003,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30004,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30004,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30004,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30005,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30005,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30005,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30006,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30006,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30006,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30007,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30007,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30007,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30008,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30008,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30008,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30009,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30009,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30009,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30010,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30010,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30010,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30011,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30011,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30011,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-30012,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-30012,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-30012,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,8444,R,0,0,9,,false,false,,false,true,true,true
+30001,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,false,false,false,false,false,true,true,true
+30001,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,2003,R,0,0,10,false,,false,false,,true,true,true
+30002,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,9343,R,0,0,9,,false,false,,false,true,true,true
+30002,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,false,false,false,false,false,true,true,true
+30002,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,4897,R,0,0,10,false,,false,false,,true,true,true
+30003,202001,100,0,,4.265190233,1,1,1,1,1.82834015,51.35515875,7511,R,0,0,9,,false,true,,true,true,true,true
+30003,202002,100,0,0.234456131,0.271256932,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,false,false,true,true,true,true,true,true
+30003,202003,100,0,3.686541738,,1,1,1,0.984115327,1,35.63068182,6492,R,0,0,10,false,,true,true,,true,true,true
+30004,202001,100,0,,0.030288689,1,1,1,1,1.82834015,51.35515875,64,R,0,0,9,,false,true,,true,true,true,true
+30004,202002,100,0,33.015625,11.42162162,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,false,false,true,true,true,true,true,true
+30004,202003,100,0,0.087553242,,1,1,1,0.984115327,1,35.63068182,185,R,0,0,10,false,,true,true,,true,true,true
+30005,202001,100,0,,0.941234172,1,1,1,1,1.82834015,51.35515875,844,R,0,0,9,,false,true,,true,true,true,true
+30005,202002,100,0,1.062434865,3.199201198,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,false,false,true,true,true,true,true,true
+30005,202003,100,0,0.312578027,,1,1,1,0.984115327,1,35.63068182,280,R,0,0,10,false,,true,true,,true,true,true
+30006,202001,100,0,,0.995885563,1,1,1,1,1.82834015,51.35515875,1869,R,0,0,9,,false,true,,true,true,true,true
+30006,202002,100,0,1.004131435,1.368417982,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,false,false,true,true,true,true,true,true
+30006,202003,100,0,0.730770871,,1,1,1,0.984115327,1,35.63068182,1371,R,0,0,10,false,,true,true,,true,true,true
+30007,202001,100,0,,4.475816911,1,1,1,1,1.82834015,51.35515875,12769,R,0,0,9,,false,true,,true,true,true,true
+30007,202002,100,0,0.223422901,0.248269056,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,false,false,true,true,true,true,true,true
+30007,202003,100,0,4.027888195,,1,1,1,0.984115327,1,35.63068182,11491,R,0,0,10,false,,true,true,,true,true,true
+30008,202001,100,0,,0.023463069,1,1,1,1,1.82834015,51.35515875,141,R,0,0,9,,false,true,,true,true,true,true
+30008,202002,100,0,42.62017045,13.86213906,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,false,false,true,true,true,true,true,true
+30008,202003,100,0,0.072138939,,1,1,1,0.984115327,1,35.63068182,433,R,0,0,10,false,,true,true,,true,true,true
+30009,202001,100,0,,1.589639934,1,1,1,1,1.82834015,51.35515875,6417,R,0,0,9,,false,true,,true,true,true,true
+30009,202002,100,0,0.629073275,3.053782962,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,false,false,true,true,true,true,true,true
+30009,202003,100,0,0.327462695,,1,1,1,0.984115327,1,35.63068182,1322,R,0,0,10,false,,true,true,,true,true,true
+30010,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,28963,R,0,0,9,,false,false,,false,true,true,true
+30010,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,false,false,false,false,false,true,true,true
+30010,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,10529,R,0,0,10,false,,false,false,,true,true,true
+30011,202001,100,0,,5.249464902,1,1,1,1,1.82834015,51.35515875,6009,R,0,0,9,,false,true,,true,true,true,true
+30011,202002,100,0,0.190495606,0.226047443,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,false,false,true,true,true,true,true,true
+30011,202003,100,0,4.423850085,,1,1,1,0.984115327,1,35.63068182,5064,R,0,0,10,false,,true,true,,true,true,true
+30012,202001,100,0,,0.034032235,1,1,1,1,1.82834015,51.35515875,256,R,0,0,9,,false,true,,true,true,true,true
+30012,202002,100,0,29.38390625,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,false,,true,true,,true,true,true
+30012,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,7402.515486,FIR,0,0,10,,,,,,true,true,true
+30001,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30001,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30001,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30002,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30002,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30002,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30003,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30003,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30003,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30004,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30004,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30004,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30005,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30005,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30005,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30006,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30006,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30006,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30007,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30007,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30007,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30008,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30008,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30008,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30009,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30009,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30009,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30010,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30010,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30010,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30011,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30011,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30011,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30012,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
+30012,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
+30012,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index 9dedc106..09db1f90 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,false,false,true,true,true,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,false,false,true,true,true,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,false,false,true,true,true,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,false,false,true,true,true,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,false,false,true,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,false,false,true,true,true,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,false,false,true,true,true,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,false,false,true,true,true,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,false,false,true,true,true,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,false,false,true,true,true,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,false,false,true,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,false,false,true,true,true,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,false,false,true,true,true,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,false,false,true,true,true,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,false,false,true,true,true,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,false,false,true,true,true,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,false,false,true,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,false,false,true,true,true,false,true,false
-160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,false,false,true,true,true,true,false,false
-160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,false,false,true,true,true,false,false,false
-160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
-160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,false,false,true,true,true,false,false,false
-160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,false,false,true,true,true,false,false,false
-160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,false,false,true,true,true,false,false,false
-160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,false,false,true,true,true,false,true,false
-160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,,,,,,true,false,false
-160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,,,,,,false,false,false
-160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,false,false,true,true,true,false,false,false
-160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,,,,,,false,false,false
-160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,,,,,,false,false,false
-160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,,,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,true,,true,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,true,true,true,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,true,true,true,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,true,true,true,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,true,true,true,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,true,true,true,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,true,true,,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,true,,true,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,true,true,true,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,true,true,true,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,true,true,true,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,true,true,true,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,true,true,true,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,true,true,,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,true,,true,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,true,true,true,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,true,true,true,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,true,true,true,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,true,true,true,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,true,true,true,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,true,true,,false,true,false
+160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,true,,true,true,false,false
+160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,true,true,true,false,false,false
+160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,true,true,true,false,false,false
+160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,true,true,true,false,false,false
+160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,true,true,true,false,false,false
+160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,true,true,true,false,false,false
+160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,true,true,,false,true,false
+160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,,,,true,false,false
+160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,,,,false,false,false
+160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,true,,,false,false,false
+160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,,,,false,false,false
+160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,,,,false,false,false
+160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index b05c42ab..e3aa3367 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,false,false,true,true,true
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,false,false,true,true,true
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,false,false,true,true,true
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,false,false,true,true,true
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,false,false,true,true,true
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,false,false,true,true,true
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,false,false,true,true,true
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,false,false,true,true,true
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,false,false,true,true,true
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,false,false,true,true,true
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,false,false,true,true,true
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,false,false,true,true,true
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,false,false,true,true,true
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,false,false,true,true,true
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,false,false,true,true,true
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,false,false,true,true,true
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,false,false,true,true,true
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,false,false,true,true,true
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,false,false,true,true,true
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,false,false,true,true,true
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,false,false,true,true,true
-160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,false,false,true,true,true
-160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,true,true,true
-160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,true,true,true
-160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,false,false,true,true,true
-160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,true,true,true
-160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,true,true,true
-160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,false,false,true,true,true
-160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,,,,,
-160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,,,,,
-160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,,,true,true,true
-160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,,,,,
-160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,,,,,
-160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,,,,,
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,true,,true,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,true,true,true,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,true,true,true,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,true,true,true,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,true,true,true,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,true,true,true,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,true,true,,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,true,,true,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,true,true,true,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,true,true,true,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,true,true,true,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,true,true,true,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,true,true,true,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,true,true,,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,true,,true,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,true,true,true,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,true,true,true,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,true,true,true,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,true,true,true,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,true,true,true,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,true,true,,false,true,false
+160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,true,,true,true,false,false
+160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,true,true,true,false,false,false
+160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,true,true,true,false,false,false
+160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,true,true,true,false,false,false
+160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,true,true,true,false,false,false
+160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,true,true,true,false,false,false
+160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,true,true,,false,true,false
+160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,,,,true,false,false
+160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,,,,false,false,false
+160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,true,,,false,false,false
+160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,,,,false,false,false
+160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,,,,false,false,false
+160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
index ccbd79a8..496473ac 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-70001,202001,100,39,,3.280595369,1,47.92201545,107.48,5951,R,0,3,3,false,false,true,true,true,true,false,false
-70001,202002,100,39,0.304822719,,0.521730457,0.718061822,54.70285714,1814,R,3,2,3,false,false,true,true,false,false,false,false
-70001,202003,100,39,,,56.19409367,0.668609812,120.084507,734,R,2,2,3,false,false,false,true,true,false,false,false
-70001,202004,100,39,,,1.506633706,1.000630631,93.18857143,96,R,2,2,3,false,false,true,false,false,false,false,false
-70001,202005,100,39,,,1.001786141,2.356922504,119.8970588,9086,R,2,2,2,false,false,false,true,true,false,false,false
-70001,202006,100,39,,80.59183673,0.548881634,27.65768328,106.7900552,3949,R,2,3,4,false,false,true,false,true,false,false,false
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,49,R,3,0,3,false,false,true,true,true,false,true,false
-70002,202001,100,94,,139.6875,1,47.92201545,107.48,6705,R,0,3,3,false,false,true,true,true,true,false,false
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,0.718061822,54.70285714,48,R,3,2,3,false,false,true,true,true,false,false,false
-70002,202003,100,94,111.6875,0.611497662,56.19409367,0.668609812,120.084507,5361,R,2,2,3,false,false,true,true,true,false,false,false
-70002,202004,100,94,1.63532923,0.951486868,1.506633706,1.000630631,93.18857143,8767,R,2,2,3,false,false,true,true,true,false,false,false
-70002,202005,100,94,1.050986654,1.23396277,1.001786141,2.356922504,119.8970588,9214,R,2,2,2,false,false,true,true,true,false,false,false
-70002,202006,100,94,0.810397222,2.148776978,0.548881634,27.65768328,106.7900552,7467,R,2,3,4,false,false,true,true,true,false,false,false
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,3475,R,3,0,3,false,false,true,true,true,false,true,false
-70003,202001,100,42,,0.797950979,1,47.92201545,107.48,6153,R,0,3,3,false,false,true,true,true,true,false,false
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,0.718061822,54.70285714,7711,R,3,2,3,false,false,true,true,true,false,false,false
-70003,202003,100,42,0.70068733,0.725721961,56.19409367,0.668609812,120.084507,5403,R,2,2,3,false,false,true,true,true,false,false,false
-70003,202004,100,42,1.377938182,1.049774394,1.506633706,1.000630631,93.18857143,7445,R,2,2,3,false,false,true,true,true,false,false,false
-70003,202005,100,42,0.952585628,3.479882237,1.001786141,2.356922504,119.8970588,7092,R,2,2,2,false,false,true,true,true,false,false,false
-70003,202006,100,42,0.287366046,0.232436131,0.548881634,27.65768328,106.7900552,2038,R,2,3,4,false,false,true,true,true,false,false,false
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,8768,R,3,0,3,false,false,true,true,true,false,true,false
-70004,202001,100,6,,,1,47.92201545,107.48,216376.17766,BI,0,3,3,,,,,,true,false,false
-70004,202002,100,6,,,0.521730457,0.718061822,54.70285714,4515.172737,BI,3,2,3,,,,,,false,false,false
-70004,202003,100,6,,,56.19409367,0.668609812,120.084507,6288,R,2,2,3,false,false,true,true,true,false,false,false
-70004,202004,100,6,,,1.506633706,1.000630631,93.18857143,9473.712744,FIR,2,2,3,,,,,,false,false,false
-70004,202005,100,6,,,1.001786141,2.356922504,119.8970588,9490.634133,FIR,2,2,2,,,,,,false,false,false
-70004,202006,100,6,,,0.548881634,27.65768328,106.7900552,5875,R,2,3,4,false,false,true,true,true,false,false,false
-70004,202007,100,6,,,1.593348776,1,70.24,9360.924061,FIR,3,0,3,,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+70001,202001,100,39,,3.280595369,1,47.92201545,107.48,5951,R,0,3,3,true,,true,true,false,false
+70001,202002,100,39,0.304822719,,0.521730457,0.718061822,54.70285714,1814,R,3,2,3,true,true,false,false,false,false
+70001,202003,100,39,,,56.19409367,0.668609812,120.084507,734,R,2,2,3,false,true,true,false,false,false
+70001,202004,100,39,,,1.506633706,1.000630631,93.18857143,96,R,2,2,3,true,false,false,false,false,false
+70001,202005,100,39,,,1.001786141,2.356922504,119.8970588,9086,R,2,2,2,false,true,true,false,false,false
+70001,202006,100,39,,80.59183673,0.548881634,27.65768328,106.7900552,3949,R,2,3,4,true,false,true,false,false,false
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,49,R,3,0,3,true,true,,false,true,false
+70002,202001,100,94,,139.6875,1,47.92201545,107.48,6705,R,0,3,3,true,,true,true,false,false
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,0.718061822,54.70285714,48,R,3,2,3,true,true,true,false,false,false
+70002,202003,100,94,111.6875,0.611497662,56.19409367,0.668609812,120.084507,5361,R,2,2,3,true,true,true,false,false,false
+70002,202004,100,94,1.63532923,0.951486868,1.506633706,1.000630631,93.18857143,8767,R,2,2,3,true,true,true,false,false,false
+70002,202005,100,94,1.050986654,1.23396277,1.001786141,2.356922504,119.8970588,9214,R,2,2,2,true,true,true,false,false,false
+70002,202006,100,94,0.810397222,2.148776978,0.548881634,27.65768328,106.7900552,7467,R,2,3,4,true,true,true,false,false,false
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,3475,R,3,0,3,true,true,,false,true,false
+70003,202001,100,42,,0.797950979,1,47.92201545,107.48,6153,R,0,3,3,true,,true,true,false,false
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,0.718061822,54.70285714,7711,R,3,2,3,true,true,true,false,false,false
+70003,202003,100,42,0.70068733,0.725721961,56.19409367,0.668609812,120.084507,5403,R,2,2,3,true,true,true,false,false,false
+70003,202004,100,42,1.377938182,1.049774394,1.506633706,1.000630631,93.18857143,7445,R,2,2,3,true,true,true,false,false,false
+70003,202005,100,42,0.952585628,3.479882237,1.001786141,2.356922504,119.8970588,7092,R,2,2,2,true,true,true,false,false,false
+70003,202006,100,42,0.287366046,0.232436131,0.548881634,27.65768328,106.7900552,2038,R,2,3,4,true,true,true,false,false,false
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,8768,R,3,0,3,true,true,,false,true,false
+70004,202001,100,6,,,1,47.92201545,107.48,216376.17766,BI,0,3,3,,,,true,false,false
+70004,202002,100,6,,,0.521730457,0.718061822,54.70285714,4515.172737,BI,3,2,3,,,,false,false,false
+70004,202003,100,6,,,56.19409367,0.668609812,120.084507,6288,R,2,2,3,true,,,false,false,false
+70004,202004,100,6,,,1.506633706,1.000630631,93.18857143,9473.712744,FIR,2,2,3,,,,false,false,false
+70004,202005,100,6,,,1.001786141,2.356922504,119.8970588,9490.634133,FIR,2,2,2,,,,false,false,false
+70004,202006,100,6,,,0.548881634,27.65768328,106.7900552,5875,R,2,3,4,true,,,false,false,false
+70004,202007,100,6,,,1.593348776,1,70.24,9360.924061,FIR,3,0,3,,,,false,true,false

From e22a120729a8c343fbf1f0f5c9b39240f8fbb251 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 15 May 2023 13:49:36 +0100
Subject: [PATCH 291/531] Initial Weight Fixes

---
 .../imputation/engine.py                      | 24 +++++++++++++------
 .../222_class_change_C_BI_R_input.csv         | 16 +++++++++++++
 .../222_class_change_C_BI_R_output.csv        | 16 +++++++++++++
 tests/imputation/test_mean_of_ratios.py       | 12 ++++++++++
 4 files changed, 61 insertions(+), 7 deletions(-)
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_input.csv
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_output.csv

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index c0376d7d..d717e8a4 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -103,6 +103,9 @@ def impute(
         "period": period_col,
         "grouping": grouping_col,
         "target": target_col,
+        "unweighted_forward": "unweighted_forward",
+        "unweighted_backward": "unweighted_backward",
+        "unweighted_construction": "unweighted_construction",
     }
 
     if forward_link_col in input_df.columns or backward_link_col in input_df.columns:
@@ -362,7 +365,7 @@ def calculate_weighted_link(link_name):
                         prev_link.isNotNull(),
                         weight * curr_link + (lit(Decimal(1)) - weight) * prev_link,
                     )
-                    .otherwise(prev_link)
+                    .otherwise(curr_link)
                     .alias(link_name)
                 )
 
@@ -379,10 +382,10 @@ def calculate_weighted_link(link_name):
                         & (
                             col("prev.period")
                             == calculate_previous_period(
-                                col("curr.period"), weight_periodicity
+                                col("curr.period"), True
                             )
                         )
-                    ),
+                    ), "left"
                 )
                 .select(
                     expr("curr.period AS period"),
@@ -391,7 +394,10 @@ def calculate_weighted_link(link_name):
                     calculate_weighted_link("backward"),
                     calculate_weighted_link("construction"),
                 )
-                .join(df.drop("forward", "backward", "construction"), ["period", "ref"])
+                .join(
+                df.withColumnRenamed("forward", "unweighted_forward")
+                .withColumnRenamed("backward", "unweighted_backward")
+                .withColumnRenamed("construction", "unweighted_construction"), ["period", "ref"])
             )
 
         return df
@@ -585,13 +591,17 @@ def create_output(df: DataFrame) -> DataFrame:
             ]
         )
 
-    def calculate_previous_period(period: Column) -> Column:
+    def calculate_previous_period(period: Column, weighted: Optional[bool] = False) -> Column:
         period = period.cast("integer")
+        if weighted:
+            total_periodicity = periodicity * weight_periodicity
+        else:
+            total_periodicity = periodicity
         return (
             period
-            - periodicity
+            - total_periodicity
             - 88
-            * (periodicity // 12 + (period % 100 <= periodicity % 12).cast("integer"))
+            * (total_periodicity // 12 + (period % 100 <= total_periodicity % 12).cast("integer"))
         ).cast("string")
 
     def calculate_next_period(period: Column) -> Column:
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_input.csv
new file mode 100644
index 00000000..51fb73d9
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_input.csv
@@ -0,0 +1,16 @@
+identifier,date,group,question,other
+10001,202001,1,547,10
+10001,202002,1,362,10
+10001,202003,1,895,10
+10002,202001,1,381,50
+10002,202002,1,573,50
+10002,202003,1,214,50
+10001,202001,2,961,12
+10001,202002,2,267,12
+10001,202003,2,314,12
+10002,202001,2,555,9
+10002,202002,2,628,9
+10002,202003,2,736,9
+10005,202001,1,,18
+10005,202002,2,,18
+10005,202003,2,100,18
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_output.csv
new file mode 100644
index 00000000..261ec7a3
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_output.csv
@@ -0,0 +1,16 @@
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,true
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
+10001,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
+10001,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true
+10001,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false,true
+10002,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
+10002,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true
+10002,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false,true
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,
+10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false,true
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 6fa64ed3..73413593 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -33,6 +33,9 @@
 link_inclusion_next_col = "link_inclusion_next"
 trimmed_forward_col = "trim_inclusion_forward"
 trimmed_backward_col = "trim_inclusion_backward"
+un_construction_col = "unweighted_construction"
+un_backward_col = "unweighted_backward"
+un_forward_col = "unweighted_forward"
 
 decimal_type = DecimalType(15, 6)
 
@@ -59,6 +62,9 @@
 link_inclusion_next_type = BooleanType()
 trimmed_forward_type = BooleanType()
 trimmed_backward_type = BooleanType()
+un_construction_type = decimal_type
+un_backward_type = decimal_type
+un_forward_type = decimal_type
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -86,6 +92,9 @@
     default_backward_col,
     default_construction_col,
     link_inclusion_current_col,
+    un_construction_col,
+    un_backward_col,
+    un_forward_col,
 )
 
 dataframe_types = {
@@ -112,6 +121,9 @@
     link_inclusion_next_col: link_inclusion_next_type,
     trimmed_forward_col: trimmed_forward_type,
     trimmed_backward_col: trimmed_backward_type,
+    un_construction_col: un_construction_type,
+    un_backward_col: un_backward_type,
+    un_forward_col: un_forward_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()

From b63cd894158da7af0dec7e5b9928e5bfb4424e33 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 14:09:26 +0100
Subject: [PATCH 292/531] Alter weighting in imputation method

---
 .../imputation/engine.py                      | 40 +++++++++----------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index d717e8a4..4e5c74c5 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -64,7 +64,7 @@ def impute(
     link_filter: Optional[Union[str, Column]] = None,
     periodicity: Optional[int] = 1,
     weight: Optional[Number] = None,
-    weight_periodicity: Optional[int] = None,
+    weight_periodicity_multiplier: Optional[int] = None,
     **ratio_calculator_params,
 ) -> DataFrame:
     # --- Validate params ---
@@ -77,6 +77,7 @@ def impute(
 
     if weight is not None:
         weight = lit(Decimal(weight))
+        weight_periodicity = weight_periodicity_multiplier * periodicity
 
     input_params = {
         "ref": reference_col,
@@ -103,9 +104,6 @@ def impute(
         "period": period_col,
         "grouping": grouping_col,
         "target": target_col,
-        "unweighted_forward": "unweighted_forward",
-        "unweighted_backward": "unweighted_backward",
-        "unweighted_construction": "unweighted_construction",
     }
 
     if forward_link_col in input_df.columns or backward_link_col in input_df.columns:
@@ -208,8 +206,8 @@ def prepare_df(df: DataFrame) -> DataFrame:
             df.withColumn("output", col("target"))
             .drop("target")
             .withColumn("marker", when(~col("output").isNull(), Marker.RESPONSE.value))
-            .withColumn("previous_period", calculate_previous_period(col("period")))
-            .withColumn("next_period", calculate_next_period(col("period")))
+            .withColumn("previous_period", calculate_previous_period(col("period"), periodicity))
+            .withColumn("next_period", calculate_next_period(col("period"), periodicity))
         )
 
         nonlocal prior_period_df
@@ -225,8 +223,8 @@ def prepare_df(df: DataFrame) -> DataFrame:
                 )
                 .drop("prior_period")
                 .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
-                .withColumn("previous_period", calculate_previous_period(col("period")))
-                .withColumn("next_period", calculate_next_period(col("period")))
+                .withColumn("previous_period", calculate_previous_period(col("period"), periodicity))
+                .withColumn("next_period", calculate_next_period(col("period"), periodicity))
             )
 
         else:
@@ -356,6 +354,11 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         )
         output_col_mapping["link_inclusion_current"] = link_inclusion_current_col
         if weight is not None:
+            output_col_mapping.update({
+                "unweighted_forward": "unweighted_forward",
+                "unweighted_backward": "unweighted_backward",
+                "unweighted_construction": "unweighted_construction",
+            })
 
             def calculate_weighted_link(link_name):
                 prev_link = col(f"prev.{link_name}")
@@ -382,7 +385,8 @@ def calculate_weighted_link(link_name):
                         & (
                             col("prev.period")
                             == calculate_previous_period(
-                                col("curr.period"), True
+                                col("curr.period"),
+                                weight_periodicity
                             )
                         )
                     ), "left"
@@ -591,28 +595,24 @@ def create_output(df: DataFrame) -> DataFrame:
             ]
         )
 
-    def calculate_previous_period(period: Column, weighted: Optional[bool] = False) -> Column:
+    def calculate_previous_period(period: Column, relative: int):
         period = period.cast("integer")
-        if weighted:
-            total_periodicity = periodicity * weight_periodicity
-        else:
-            total_periodicity = periodicity
         return (
             period
-            - total_periodicity
+            - relative
             - 88
-            * (total_periodicity // 12 + (period % 100 <= total_periodicity % 12).cast("integer"))
+            * (relative // 12 + (period % 100 <= relative % 12).cast("integer"))
         ).cast("string")
 
-    def calculate_next_period(period: Column) -> Column:
+    def calculate_next_period(period: Column, relative: int) -> Column:
         period = period.cast("integer")
         return (
             period
-            + periodicity
+            + relative
             + 88
             * (
-                periodicity // 12
-                + ((period % 100) + (periodicity % 12) > 12).cast("integer")
+                relative // 12
+                + ((period % 100) + (relative % 12) > 12).cast("integer")
             )
         ).cast("string")
 

From 43e06b3cf28efd408fff0c2000390516eccf6141 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 14:30:02 +0100
Subject: [PATCH 293/531] Add grouping to joins to facilitate newly clarified
 imputation grouping behaviour

---
 .../imputation/engine.py                      | 79 +++++++++++--------
 1 file changed, 46 insertions(+), 33 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 4e5c74c5..eae8f136 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -206,8 +206,12 @@ def prepare_df(df: DataFrame) -> DataFrame:
             df.withColumn("output", col("target"))
             .drop("target")
             .withColumn("marker", when(~col("output").isNull(), Marker.RESPONSE.value))
-            .withColumn("previous_period", calculate_previous_period(col("period"), periodicity))
-            .withColumn("next_period", calculate_next_period(col("period"), periodicity))
+            .withColumn(
+                "previous_period", calculate_previous_period(col("period"), periodicity)
+            )
+            .withColumn(
+                "next_period", calculate_next_period(col("period"), periodicity)
+            )
         )
 
         nonlocal prior_period_df
@@ -223,8 +227,13 @@ def prepare_df(df: DataFrame) -> DataFrame:
                 )
                 .drop("prior_period")
                 .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
-                .withColumn("previous_period", calculate_previous_period(col("period"), periodicity))
-                .withColumn("next_period", calculate_next_period(col("period"), periodicity))
+                .withColumn(
+                    "previous_period",
+                    calculate_previous_period(col("period"), periodicity),
+                )
+                .withColumn(
+                    "next_period", calculate_next_period(col("period"), periodicity)
+                )
             )
 
         else:
@@ -274,7 +283,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         # won't cause us to lose grouping as they'll just be filled with
         # default ratios.
         if link_filter:
-            filtered_df = df.join(filtered_refs, ["ref", "period"])
+            filtered_df = df.join(filtered_refs, ["ref", "period", "grouping"])
         else:
             filtered_df = df.withColumn("match", lit(True))
         filtered_df = filtered_df.filter(~filtered_df.output.isNull()).select(
@@ -347,18 +356,20 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
 
         df = df.join(
             filtered_df.select(
-                "ref", "period", expr("match AS link_inclusion_current")
+                "ref", "period", "grouping", expr("match AS link_inclusion_current")
             ),
-            ["ref", "period"],
+            ["ref", "period", "grouping"],
             "left",
         )
         output_col_mapping["link_inclusion_current"] = link_inclusion_current_col
         if weight is not None:
-            output_col_mapping.update({
-                "unweighted_forward": "unweighted_forward",
-                "unweighted_backward": "unweighted_backward",
-                "unweighted_construction": "unweighted_construction",
-            })
+            output_col_mapping.update(
+                {
+                    "unweighted_forward": "unweighted_forward",
+                    "unweighted_backward": "unweighted_backward",
+                    "unweighted_construction": "unweighted_construction",
+                }
+            )
 
             def calculate_weighted_link(link_name):
                 prev_link = col(f"prev.{link_name}")
@@ -373,7 +384,7 @@ def calculate_weighted_link(link_name):
                 )
 
             weighting_df = df.select(
-                "period", "ref", "forward", "backward", "construction"
+                "period", "ref", "grouping", "forward", "backward", "construction"
             )
             curr_df = weighting_df.alias("curr")
             prev_df = weighting_df.alias("prev")
@@ -385,11 +396,12 @@ def calculate_weighted_link(link_name):
                         & (
                             col("prev.period")
                             == calculate_previous_period(
-                                col("curr.period"),
-                                weight_periodicity
+                                col("curr.period"), weight_periodicity
                             )
                         )
-                    ), "left"
+                        & (col("curr.grouping") == col("prev.grouping"))
+                    ),
+                    "left",
                 )
                 .select(
                     expr("curr.period AS period"),
@@ -399,9 +411,11 @@ def calculate_weighted_link(link_name):
                     calculate_weighted_link("construction"),
                 )
                 .join(
-                df.withColumnRenamed("forward", "unweighted_forward")
-                .withColumnRenamed("backward", "unweighted_backward")
-                .withColumnRenamed("construction", "unweighted_construction"), ["period", "ref"])
+                    df.withColumnRenamed("forward", "unweighted_forward")
+                    .withColumnRenamed("backward", "unweighted_backward")
+                    .withColumnRenamed("construction", "unweighted_construction"),
+                    ["period", "ref"],
+                )
             )
 
         return df
@@ -445,13 +459,13 @@ def impute_helper(
             imputed_df = working_df.filter(~col("output").isNull()).localCheckpoint(
                 eager=True
             )
-            # Any refs which have no values at all can't be imputed from so we
-            # don't care about them here.
-            ref_df = imputed_df.select("ref").distinct()
+            # Any ref and grouping combos which have no values at all can't be
+            # imputed from so we don't care about them here.
+            ref_df = imputed_df.select("ref", "grouping").distinct()
             null_response_df = (
                 working_df.filter(col("output").isNull())
                 .drop("output", "marker")
-                .join(ref_df, "ref")
+                .join(ref_df, ("ref", "grouping"))
                 .localCheckpoint(eager=True)
             )
 
@@ -494,15 +508,17 @@ def impute_helper(
             imputed_df = imputed_df.union(calculation_df).localCheckpoint(eager=True)
             # Remove the newly imputed rows from our filtered set.
             null_response_df = null_response_df.join(
-                calculation_df.select("ref", "period"), ["ref", "period"], "leftanti"
+                calculation_df.select("ref", "period", "grouping"),
+                ["ref", "period", "grouping"],
+                "leftanti",
             ).localCheckpoint(eager=True)
 
         # We should now have an output column which is as fully populated as
         # this phase of imputation can manage. As such replace the existing
         # output column with our one. Same goes for the marker column.
         return df.drop("output", "marker").join(
-            imputed_df.select("ref", "period", "output", "marker"),
-            ["ref", "period"],
+            imputed_df.select("ref", "period", "grouping", "output", "marker"),
+            ["ref", "period", "grouping"],
             "leftouter",
         )
 
@@ -551,6 +567,7 @@ def construct_values(df: DataFrame) -> DataFrame:
         ).select(
             col("construction.ref").alias("ref"),
             col("construction.period").alias("period"),
+            col("construction.grouping").alias("grouping"),
             (col("aux") * col("construction")).alias("constructed_output"),
             lit(Marker.CONSTRUCTED.value).alias("constructed_marker"),
         )
@@ -560,7 +577,7 @@ def construct_values(df: DataFrame) -> DataFrame:
             .withColumnRenamed("marker", "existing_marker")
             .join(
                 construction_df,
-                ["ref", "period"],
+                ["ref", "period", "grouping"],
                 "leftouter",
             )
             .select(
@@ -600,8 +617,7 @@ def calculate_previous_period(period: Column, relative: int):
         return (
             period
             - relative
-            - 88
-            * (relative // 12 + (period % 100 <= relative % 12).cast("integer"))
+            - 88 * (relative // 12 + (period % 100 <= relative % 12).cast("integer"))
         ).cast("string")
 
     def calculate_next_period(period: Column, relative: int) -> Column:
@@ -610,10 +626,7 @@ def calculate_next_period(period: Column, relative: int) -> Column:
             period
             + relative
             + 88
-            * (
-                relative // 12
-                + ((period % 100) + (relative % 12) > 12).cast("integer")
-            )
+            * (relative // 12 + ((period % 100) + (relative % 12) > 12).cast("integer"))
         ).cast("string")
 
     def filter_back_data(filter_col: Column) -> DataFrame:

From ece6bde9fccfb980b775e503d639db015a9809c3 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 14:30:38 +0100
Subject: [PATCH 294/531] Dependency bump

---
 poetry.lock | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 6151dcc6..1ffe36ff 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -291,21 +291,21 @@ files = [
 
 [[package]]
 name = "platformdirs"
-version = "3.5.0"
+version = "3.5.1"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-3.5.0-py3-none-any.whl", hash = "sha256:47692bc24c1958e8b0f13dd727307cff1db103fca36399f457da8e05f222fdc4"},
-    {file = "platformdirs-3.5.0.tar.gz", hash = "sha256:7954a68d0ba23558d753f73437c55f89027cf8f5108c19844d4b82e5af396335"},
+    {file = "platformdirs-3.5.1-py3-none-any.whl", hash = "sha256:e2378146f1964972c03c085bb5662ae80b2b8c06226c54b2ff4aa9483e8a13a5"},
+    {file = "platformdirs-3.5.1.tar.gz", hash = "sha256:412dae91f52a6f84830f39a8078cecd0e866cb72294a5c66808e74d5e88d251f"},
 ]
 
 [package.dependencies]
 typing-extensions = {version = ">=4.5", markers = "python_version < \"3.8\""}
 
 [package.extras]
-docs = ["furo (>=2023.3.27)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"]
+docs = ["furo (>=2023.3.27)", "proselint (>=0.13)", "sphinx (>=6.2.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"]
 test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"]
 
 [[package]]

From 959ae0f613ab6e7511ab525f2b808ee91f87208c Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 15 May 2023 14:07:46 +0100
Subject: [PATCH 295/531] Name Change

---
 ...s_change_C_BI_R_input.csv => 33_class_change_C_BI_R_input.csv} | 0
 ...change_C_BI_R_output.csv => 33_class_change_C_BI_R_output.csv} | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/{222_class_change_C_BI_R_input.csv => 33_class_change_C_BI_R_input.csv} (100%)
 rename tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/{222_class_change_C_BI_R_output.csv => 33_class_change_C_BI_R_output.csv} (100%)

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_class_change_C_BI_R_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_input.csv
rename to tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_class_change_C_BI_R_input.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_class_change_C_BI_R_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/222_class_change_C_BI_R_output.csv
rename to tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_class_change_C_BI_R_output.csv

From bb142e384a504502ee33f85bf74900c297d1deba Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 15 May 2023 14:31:04 +0100
Subject: [PATCH 296/531] Rename

---
 ...change_C_BI_R_input.csv => 33_multi_variable_C_BI_R_input.csv} | 0
 ...ange_C_BI_R_output.csv => 33_multi_variable_C_BI_R_output.csv} | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/{33_class_change_C_BI_R_input.csv => 33_multi_variable_C_BI_R_input.csv} (100%)
 rename tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/{33_class_change_C_BI_R_output.csv => 33_multi_variable_C_BI_R_output.csv} (100%)

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_class_change_C_BI_R_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_class_change_C_BI_R_input.csv
rename to tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_input.csv
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_class_change_C_BI_R_output.csv
rename to tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv

From 59b123996745597d80a23c509cac01b5ee6933ee Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 14:32:46 +0100
Subject: [PATCH 297/531] Correct type of join param

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index eae8f136..570529df 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -465,7 +465,7 @@ def impute_helper(
             null_response_df = (
                 working_df.filter(col("output").isNull())
                 .drop("output", "marker")
-                .join(ref_df, ("ref", "grouping"))
+                .join(ref_df, ["ref", "grouping"])
                 .localCheckpoint(eager=True)
             )
 

From 80390879b355edffbc9e52f9b79a333e435802dc Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 14:41:42 +0100
Subject: [PATCH 298/531] Make tests sort by grouping as well as ref and period

---
 tests/imputation/test_ratio_of_means.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index dabd7bff..93fa6233 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -203,7 +203,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
 
     select_cols = list(set(dataframe_columns) & set(scenario_expected_output.columns))
     assert isinstance(scenario_actual_output, type(scenario_input))
-    sort_col_list = [reference_col, period_col]
+    sort_col_list = [reference_col, period_col, grouping_col]
     assert_df_equality(
         scenario_actual_output.sort(sort_col_list).select(select_cols),
         scenario_expected_output.sort(sort_col_list).select(select_cols),

From 05f03c89a785af49902475cf44cd33475152cd22 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 14:43:23 +0100
Subject: [PATCH 299/531] Bump rc version

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 304b9908..268eb750 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc6"
+version = "12.0.0-rc7"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 0cdc4489a8c0ccd4882de6437e7f6a2a101503ba Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 15:36:50 +0100
Subject: [PATCH 300/531] Fix missing grouping column in filtered ref df

---
 statistical_methods_library/imputation/engine.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 570529df..320e32de 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -162,6 +162,7 @@ def impute(
         filtered_refs = input_df.select(
             col(reference_col).alias("ref"),
             col(period_col).alias("period"),
+            col("grouping_col").alias("grouping"),
             (expr(link_filter) if isinstance(link_filter, str) else link_filter).alias(
                 "match"
             ),

From 94fe4e44e4065920834d964b03e21197f2b4c10b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 15:37:17 +0100
Subject: [PATCH 301/531] New rc for filtering bug

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 268eb750..4fc5fc70 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc7"
+version = "12.0.0-rc8"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 51b6489360fdb2777535b1a26d5a7293fc6049ba Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 15 May 2023 15:56:36 +0100
Subject: [PATCH 302/531] New Test

---
 .../imputation/engine.py                      |  2 +-
 ...4_multi_variable_C_BI_R_filtered_input.csv | 18 +++++++++
 ..._multi_variable_C_BI_R_filtered_output.csv | 18 +++++++++
 tests/imputation/mean_of_ratios.toml          | 38 +++++++++----------
 tests/imputation/ratio_of_means.toml          |  3 ++
 5 files changed, 59 insertions(+), 20 deletions(-)
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_output.csv

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 320e32de..54f0b1e9 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -162,7 +162,7 @@ def impute(
         filtered_refs = input_df.select(
             col(reference_col).alias("ref"),
             col(period_col).alias("period"),
-            col("grouping_col").alias("grouping"),
+            col(grouping_col).alias("grouping"),
             (expr(link_filter) if isinstance(link_filter, str) else link_filter).alias(
                 "match"
             ),
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_input.csv
new file mode 100644
index 00000000..f625ef61
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_input.csv
@@ -0,0 +1,18 @@
+identifier,date,group,question,other
+10001,202001,1,547,10
+10001,202002,1,362,10
+10001,202003,1,895,10
+10002,202001,1,381,50
+10002,202002,1,573,50
+10002,202003,1,214,50
+10001,202001,2,961,12
+10001,202002,2,267,12
+10001,202003,2,314,12
+10002,202001,2,555,9
+10002,202002,2,628,9
+10002,202003,2,736,9
+10005,202001,1,,18
+10005,202002,2,,18
+10005,202003,2,100,18
+10003,202001,1,0,16
+10003,202002,1,0,16
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_output.csv
new file mode 100644
index 00000000..7bc72170
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_output.csv
@@ -0,0 +1,18 @@
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true,,true
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true,true,true
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true,true,
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,true,,true
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true,true,true
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true,true,
+10001,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true,,true
+10001,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true,true,true
+10001,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false,true,true,
+10002,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true,,true
+10002,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true,true,true
+10002,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false,true,true,
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,,,
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,,,
+10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false,true,,
+10003,202001,1,16,1,0.992513369,15.46666667,0,R,0,2,2,true,false,false,false,,false
+10003,202002,1,16,1.007543103,0.843101893,15.58333333,0,R,2,2,2,false,false,false,false,false,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 2b76397b..acb0c88f 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -97,72 +97,72 @@ link_filter = "identifier NOT IN ('110005', '110006', '110007')"
 
 [49_R_R_FI-BI_R_R_50_weight_previous_month]
 weight = 0.5
-weight_periodicity = 1
+weight_periodicity_multiplier = 1
 
 [50_R_R_FI_50_weight]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [51]
 weight = 0.8
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [52]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [53]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [54]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [55]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [56]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [57]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [58]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [59]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [60]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [61_R_R_FI-BI_R_R_50_weight_filtered]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 link_filter = "identifier NOT IN ('110009', '110009')"
 
 [62_mixed_data_50_weight]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [63]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [64]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 
 [65_TB_10_BI_BI_R_50_weight_filtered]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 link_filter = "NOT(identifier = '90003' AND date = '202001')"
 lower_trim = 50
 upper_trim = 50
@@ -170,7 +170,7 @@ trim_threshold = 10
 
 [66_TB_50_50_weight_filtered_partial_default]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 link_filter = "identifier NOT IN ('30001', '30002', '30010')"
 lower_trim = 50
 upper_trim = 50
@@ -178,7 +178,7 @@ trim_threshold = 10
 
 [67_TB_50_50_weight_filtered_full_default]
 weight = 0.5
-weight_periodicity = 12
+weight_periodicity_multiplier = 12
 link_filter = "identifier NOT IN ('30001', '30002', '30010')"
 lower_trim = 50
 upper_trim = 50
diff --git a/tests/imputation/ratio_of_means.toml b/tests/imputation/ratio_of_means.toml
index 79a6b280..393183c8 100644
--- a/tests/imputation/ratio_of_means.toml
+++ b/tests/imputation/ratio_of_means.toml
@@ -20,3 +20,6 @@ link_filter = "question < 100000"
 
 [30_class_change_C_C_FI_filtered]
 link_filter = "question < 100000"
+
+[34_multi_variable_C_BI_R_filtered]
+link_filter = "identifier != '10003'"

From 69a507131867aa811c595de3e4ba7dab1481a5a0 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 15 May 2023 17:00:05 +0100
Subject: [PATCH 303/531] Interim Push

---
 .../50_R_R_FI_50_weight_output.csv            | 24 ++++++------
 tests/imputation/mean_of_ratios.toml          |  3 ++
 tests/imputation/ratio_of_means.toml          |  3 ++
 tests/imputation/test_mean_of_ratios.py       | 38 +++++++++----------
 tests/imputation/test_ratio_of_means.py       | 38 +++++++++----------
 5 files changed, 54 insertions(+), 52 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 6341dbcf..19a43fbc 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -11,15 +11,15 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,true,,true,true,false,false
 30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,true,,false,false,false
 30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,,,,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,,
+30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,,,,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index acb0c88f..794076fd 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -1,3 +1,6 @@
+[05_R_R_FI_FI_FI_year_span]
+starting_period = "202010"
+
 [19_link_columns]
 forward_link_col = "forward"
 backward_link_col = "backward"
diff --git a/tests/imputation/ratio_of_means.toml b/tests/imputation/ratio_of_means.toml
index 393183c8..99806a1c 100644
--- a/tests/imputation/ratio_of_means.toml
+++ b/tests/imputation/ratio_of_means.toml
@@ -1,3 +1,6 @@
+[05_R_R_FI_FI_FI_year_span]
+starting_period = "202010"
+
 [19_link_columns]
 forward_link_col = "forward"
 backward_link_col = "backward"
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 73413593..8e8e94a2 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -139,6 +139,7 @@
     "output_col": output_col,
     "marker_col": marker_col,
     "ratio_calculator": mean_of_ratios,
+    "starting_period": "202001",
 }
 
 test_scenarios = []
@@ -172,6 +173,11 @@
     test_scenarios,
 )
 def test_calculations(fxt_load_test_csv, scenario_type, scenario):
+    imputation_kwargs = params.copy()
+
+    if "back_data_" in scenario_type:
+        imputation_kwargs["starting_period"] = "202002"
+
     scenario_file_type = scenario_type.replace("back_data_", "")
     scenario_input = fxt_load_test_csv(
         dataframe_columns,
@@ -189,36 +195,28 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         scenario_file_type,
         f"{scenario}_output",
     )
-    imputation_kwargs = params.copy()
 
     with open("tests/imputation/mean_of_ratios.toml", "r") as f:
         new_toml_string = toml.load(f)
     if scenario in new_toml_string.keys():
         imputation_kwargs.update(new_toml_string[scenario])
 
-    if scenario_type.startswith("back_data"):
-        min_period_df = scenario_expected_output.selectExpr("min(" + period_col + ")")
-
-        back_data_df = scenario_expected_output.join(
-            min_period_df, [col(period_col) == col("min(" + period_col + ")")]
-        )
+    back_data_df = scenario_expected_output.filter(
+        col(period_col) < imputation_kwargs["starting_period"]
+    )
 
-        if "filtered" in scenario:
-            back_data_df = back_data_df.withColumn(target_col, col(output_col))
+    if "filtered" in scenario:
+        back_data_df = back_data_df.withColumn(target_col, col(output_col))
 
-        imputation_kwargs["back_data_df"] = back_data_df
+    imputation_kwargs["back_data_df"] = back_data_df
 
-        scenario_input = scenario_input.join(
-            min_period_df,
-            [col(period_col) == col("min(" + period_col + ")")],
-            "leftanti",
-        ).drop("min(" + period_col + ")")
+    scenario_input = scenario_input.filter(
+        col(period_col) >= imputation_kwargs["starting_period"]
+    )
 
-        scenario_expected_output = scenario_expected_output.join(
-            min_period_df,
-            [col(period_col) == col("min(" + period_col + ")")],
-            "leftanti",
-        ).drop("min(" + period_col + ")")
+    scenario_expected_output = scenario_expected_output.filter(
+        col(period_col) >= imputation_kwargs["starting_period"]
+    )
 
     # We need to drop our grouping and auxiliary columns from our output now
     # we've potentially set up our back data as these must not come out of
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
index 93fa6233..0ad130fe 100644
--- a/tests/imputation/test_ratio_of_means.py
+++ b/tests/imputation/test_ratio_of_means.py
@@ -103,6 +103,7 @@
     "output_col": output_col,
     "marker_col": marker_col,
     "ratio_calculator": ratio_of_means,
+    "starting_period": "202001",
 }
 
 test_scenarios = []
@@ -135,6 +136,11 @@
     test_scenarios,
 )
 def test_calculations(fxt_load_test_csv, scenario_type, scenario):
+    imputation_kwargs = params.copy()
+
+    if "back_data_" in scenario_type:
+        imputation_kwargs["starting_period"] = "202002"
+
     scenario_file_type = scenario_type.replace("back_data_", "")
     scenario_input = fxt_load_test_csv(
         dataframe_columns,
@@ -152,36 +158,28 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         scenario_file_type,
         f"{scenario}_output",
     )
-    imputation_kwargs = params.copy()
 
     with open("tests/imputation/ratio_of_means.toml", "r") as f:
         new_toml_string = toml.load(f)
     if scenario in new_toml_string.keys():
         imputation_kwargs.update(new_toml_string[scenario])
 
-    if scenario_type.startswith("back_data"):
-        min_period_df = scenario_expected_output.selectExpr("min(" + period_col + ")")
-
-        back_data_df = scenario_expected_output.join(
-            min_period_df, [col(period_col) == col("min(" + period_col + ")")]
-        )
+    back_data_df = scenario_expected_output.filter(
+        col(period_col) < imputation_kwargs["starting_period"]
+    )
 
-        if "filtered" in scenario:
-            back_data_df = back_data_df.withColumn(target_col, col(output_col))
+    if "filtered" in scenario:
+        back_data_df = back_data_df.withColumn(target_col, col(output_col))
 
-        imputation_kwargs["back_data_df"] = back_data_df
+    imputation_kwargs["back_data_df"] = back_data_df
 
-        scenario_input = scenario_input.join(
-            min_period_df,
-            [col(period_col) == col("min(" + period_col + ")")],
-            "leftanti",
-        ).drop("min(" + period_col + ")")
+    scenario_input = scenario_input.filter(
+        col(period_col) >= imputation_kwargs["starting_period"]
+    )
 
-        scenario_expected_output = scenario_expected_output.join(
-            min_period_df,
-            [col(period_col) == col("min(" + period_col + ")")],
-            "leftanti",
-        ).drop("min(" + period_col + ")")
+    scenario_expected_output = scenario_expected_output.filter(
+        col(period_col) >= imputation_kwargs["starting_period"]
+    )
 
     # We need to drop our grouping and auxiliary columns from our output now
     # we've potentially set up our back data as these must not come out of

From 4097c70f67b191dcee906d2b54e226a05e4abcb6 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 16:26:34 +0100
Subject: [PATCH 304/531] Make filter columns conditional on filtering

---
 .../imputation/engine.py                      | 27 +++++++++++--------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 54f0b1e9..f89286c4 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -330,11 +330,11 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
                 col("current.period").alias("period"),
                 col("current.aux").alias("aux"),
                 col("current.output"),
-                col("current.match"),
+                col("current.match").alias("link_inclusion_current"),
                 col("next.output"),
-                col("next.match"),
+                col("next.match").alias("link_inclusion_next"),
                 col("previous.output"),
-                col("previous.match"),
+                col("previous.match").alias("link_inclusion_previous"),
             )
         )
 
@@ -354,15 +354,20 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
 
         for fill_column, fill_value in fill_values.items():
             df = df.fillna(fill_value, fill_column)
+        if link_filter:
+            df = df.join(
+                filtered_df.select(
+                    "ref", "period", "grouping", "link_inclusion_previous", "link_inclusion_current", "link_inclusion_next"
+                ),
+                ["ref", "period", "grouping"],
+                "left",
+            )
+            output_col_mapping.update({
+                "link_inclusion_current": link_inclusion_current_col,
+                "link_inclusion_previous": link_inclusion_previous_col,
+                "link_inclusion_next": link_inclusion_next_col,
+            })
 
-        df = df.join(
-            filtered_df.select(
-                "ref", "period", "grouping", expr("match AS link_inclusion_current")
-            ),
-            ["ref", "period", "grouping"],
-            "left",
-        )
-        output_col_mapping["link_inclusion_current"] = link_inclusion_current_col
         if weight is not None:
             output_col_mapping.update(
                 {

From caf674ecb32123ab34dc8c89f049c052178ba930 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 17:06:26 +0100
Subject: [PATCH 305/531] Drop link inclusion current where not required

---
 tests/fixture_data/imputation/[]              |   1 +
 .../engine/unit/back_data_no_output.csv       |  10 +-
 .../methodology_scenarios/01_C_output.csv     |  10 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  18 +-
 .../03_R_R_FI_output.csv                      |  26 +-
 .../04_R_R_FI_FI_output.csv                   |  34 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  42 +--
 .../06_BI_BI_R_output.csv                     |  26 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  58 ++--
 .../methodology_scenarios/08_R_R_R_output.csv |  26 +-
 .../09_R_NS_C_output.csv                      |  24 +-
 .../10_C_FI_NS_R_output.csv                   |  32 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  50 +--
 .../12_C_FI_FI_FI_FI_output.csv               |  42 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  56 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  56 ++--
 .../17_NS_R_FI_NS_output.csv                  |  30 +-
 .../18_NS_BI_R_NS_output.csv                  |  30 +-
 .../19_link_columns_output.csv                |  50 +--
 .../20_mixed_data_output.csv                  |  96 +++---
 .../21_class_change_R_C_FI_output.csv         |  32 +-
 .../22_class_change_C_BI_R_output.csv         |  32 +-
 .../23_class_change_C_C_FI_output.csv         |  32 +-
 .../24_class_change_R_BI_R_output.csv         |  32 +-
 .../25_class_change_C_FI_FI_output.csv        |  44 +--
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  44 +--
 .../32_C_FI_FI_no_response_output.csv         |  32 +-
 .../33_partial_link_columns_output.csv        |  50 +--
 .../34_default_link_output.csv                |  42 +--
 .../35_TB_10_R_R_FI_output.csv                |  74 ++---
 .../36_TB_10_BI_BI_R_output.csv               |  74 ++---
 .../37_TB_10_C_FI_FI_output.csv               |  74 ++---
 .../38_T_10_R_R_FI_output.csv                 |  74 ++---
 .../39_B_10_R_R_FI_output.csv                 |  74 ++---
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  62 ++--
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 146 ++++-----
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 128 ++++----
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 128 ++++----
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |  70 ++---
 .../methodology_scenarios/47_TB_50_output.csv |  74 ++---
 ...BI_R_R_50_weight_previous_month_output.csv |  50 +--
 .../50_R_R_FI_50_weight_output.csv            |  50 +--
 .../51_R_R_FI_80_weight_output.csv            |  50 +--
 .../52_BI_BI_R_50_weight_output.csv           |  50 +--
 .../53_C_FI_FI_50_weight_output.csv           |  50 +--
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  98 +++---
 .../55_R_R_FI_50_weight_default_output.csv    |  50 +--
 .../56_BI_BI_R_50_weight_default_output.csv   |  50 +--
 .../57_C_FI_FI_50_weight_default_output.csv   |  50 +--
 ...I_R_R_50_weight_partial_default_output.csv |  98 +++---
 .../59_class_change_50_weight_output.csv      |  62 ++--
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv | 114 +++----
 .../62_mixed_data_50_weight_output.csv        |  86 +++---
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 290 +++++++++---------
 .../64_TB_10_C_FI_FI_50_weight_output.csv     | 146 ++++-----
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv |  70 ++---
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv |  70 ++---
 .../methodology_scenarios/01_C_output.csv     |  10 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  18 +-
 .../03_R_R_FI_output.csv                      |  26 +-
 .../04_R_R_FI_FI_output.csv                   |  34 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  42 +--
 .../06_BI_BI_R_output.csv                     |  26 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  58 ++--
 .../methodology_scenarios/08_R_R_R_output.csv |  26 +-
 .../09_R_NS_C_output.csv                      |  24 +-
 .../10_C_FI_NS_R_output.csv                   |  32 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  50 +--
 .../12_C_FI_FI_FI_FI_output.csv               |  42 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  56 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  56 ++--
 .../17_NS_R_FI_NS_output.csv                  |  30 +-
 .../18_NS_BI_R_NS_output.csv                  |  30 +-
 .../19_link_columns_output.csv                |  50 +--
 .../20_mixed_data_output.csv                  |  96 +++---
 .../21_class_change_R_C_FI_output.csv         |  32 +-
 .../22_class_change_C_BI_R_output.csv         |  32 +-
 .../23_class_change_C_C_FI_output.csv         |  32 +-
 .../24_class_change_R_BI_R_output.csv         |  32 +-
 .../25_class_change_C_FI_FI_output.csv        |  44 +--
 .../31_no_response_output.csv                 |  62 ++--
 .../32_divide_by_zero_output.csv              |  34 +-
 .../33_multi_variable_C_BI_R_output.csv       |  32 +-
 87 files changed, 2350 insertions(+), 2349 deletions(-)
 create mode 100644 tests/fixture_data/imputation/[]

diff --git a/tests/fixture_data/imputation/[] b/tests/fixture_data/imputation/[]
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/tests/fixture_data/imputation/[]
@@ -0,0 +1 @@
+
diff --git a/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv b/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
index cddde6c2..3f2ff2d6 100644
--- a/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
+++ b/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,marker
-111,202901,1,1,R
-111,202902,1,1,R
-111,202903,1,1,R
-111,202904,1,1,R
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index 25cd21d1..16b5f0b8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
-10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
-10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,,,true,true,false
-10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,,true,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,,,true,true,false
+10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,,,true,true,false
+10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,,,true,true,false
+10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 79ad86c1..52e4bc0f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,,true,true,false,false
-20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,true,,false,true,false
-20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,,true,true,false,false
-20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,true,true,,false,true,false
-20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,true,,true,true,false,false
-20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,true,true,,false,true,false
-20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,,,,true,false,false
-20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
+20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
+20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
+20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
+20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
+20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
+20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,,,true,false,false
+20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 3c4e53fc..2c459ebb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,,true,true,false,false
-30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
-30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,true,,false,true,false
-30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,true,,true,true,false,false
-30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
-30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,true,true,,false,true,false
-30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,true,,true,true,false,false
-30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,true,true,true,false,false,false
-30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,true,true,,false,true,false
-30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,true,,true,true,false,false
-30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,true,true,,false,false,false
-30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,,true,true,false,false
+30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
+30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,,false,true,false
+30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,,true,true,false,false
+30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
+30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,true,,false,true,false
+30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,,true,true,false,false
+30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
+30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,true,,false,true,false
+30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,,true,true,false,false
+30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,true,,false,false,false
+30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index f9aac92f..88b0824d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,,true,true,false,false
-40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
-40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
-40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,true,true,,false,true,false
-40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,true,,true,true,false,false
-40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
-40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
-40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,true,true,,false,true,false
-40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,true,,true,true,false,false
-40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,true,true,true,false,false,false
-40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,true,true,true,false,false,false
-40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,true,true,,false,true,false
-40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,true,,true,true,false,false
-40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,true,true,,false,false,false
-40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,,,,false,false,false
-40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
+40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
+40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
+40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
+40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
+40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
+40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
+40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
+40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
+40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
+40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
+40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
+40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
+40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,true,,false,false,false
+40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,,,false,false,false
+40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 88754591..579ce8a1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,,true,true,false,false
-50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
-50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
-50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,true,true,true,false,false,false
-50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,true,true,,false,true,false
-50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,true,,true,true,false,false
-50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
-50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
-50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,true,true,true,false,false,false
-50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,true,true,,false,true,false
-50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,true,,true,true,false,false
-50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,true,true,true,false,false,false
-50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,true,true,true,false,false,false
-50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,true,true,true,false,false,false
-50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,true,true,,false,true,false
-50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,true,,true,true,false,false
-50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,true,true,,false,false,false
-50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,,false,false,false
-50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,,false,false,false
-50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
+50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
+50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
+50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
+50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
+50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
+50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
+50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
+50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
+50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
+50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
+50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
+50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
+50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
+50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
+50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
+50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,true,,false,false,false
+50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,false,false,false
+50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,false,false,false
+50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index e8b09c62..39c94b90 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,,true,true,false,false
-60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
-60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,true,,false,true,false
-60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,true,,true,true,false,false
-60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
-60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,true,true,,false,true,false
-60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,true,,true,true,false,false
-60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,true,true,true,false,false,false
-60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,true,true,,false,true,false
-60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,,,,true,false,false
-60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,,,,false,false,false
-60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,true,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
+60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
+60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
+60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
+60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
+60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
+60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
+60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
+60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
+60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,,,true,false,false
+60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,,,false,false,false
+60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 9120347e..7516338f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,,true,true,false,false
-70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
-70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
-70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,true,true,true,false,false,false
-70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,true,true,true,false,false,false
-70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
-70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,true,true,,false,true,false
-70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,true,,true,true,false,false
-70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
-70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
-70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,true,true,true,false,false,false
-70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,true,true,true,false,false,false
-70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
-70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,true,true,,false,true,false
-70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,true,,true,true,false,false
-70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,true,true,true,false,false,false
-70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,true,true,true,false,false,false
-70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,true,true,true,false,false,false
-70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,true,true,true,false,false,false
-70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,true,true,true,false,false,false
-70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,true,true,,false,true,false
-70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,,,,true,false,false
-70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,,,,false,false,false
-70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,true,,,false,false,false
-70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,,,,false,false,false
-70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,,,,false,false,false
-70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,true,,,false,false,false
-70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,,true,true,false,false
+70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
+70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
+70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
+70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
+70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
+70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,true,,false,true,false
+70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,,true,true,false,false
+70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
+70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
+70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
+70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
+70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
+70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,true,,false,true,false
+70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,,true,true,false,false
+70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
+70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
+70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
+70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
+70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
+70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,true,,false,true,false
+70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,,,true,false,false
+70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,,,false,false,false
+70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,,,false,false,false
+70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,,,false,false,false
+70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,,,false,false,false
+70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,,,false,false,false
+70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index ca41e760..09ac6c6d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,,true,true,false,false
-80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
-80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,true,,false,true,false
-80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,true,,true,true,false,false
-80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
-80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,true,true,,false,true,false
-80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,true,,true,true,false,false
-80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
-80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,true,true,,false,true,false
-80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,true,,true,true,false,false
-80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,true,true,true,false,false,false
-80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,true,true,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
+80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
+80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
+80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
+80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
+80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
+80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
+80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
+80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
+80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
+80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
+80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 70bf4808..94269506 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,,true,true,false,false
-90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
-90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,true,,false,true,false
-90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,true,,true,true,false,false
-90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
-90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,true,true,,false,true,false
-90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,true,,true,true,false,false
-90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,true,true,true,false,false,false
-90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,true,true,,false,true,false
-90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,true,,,true,false,false
-90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
+90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
+90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
+90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
+90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
+90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
+90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
+90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
+90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
+90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,,,true,false,false
+90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index e5ce4f03..d09c24c0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,,true,true,false,false
-100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
-100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
-100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,true,true,,false,true,false
-100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,true,,true,true,false,false
-100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
-100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
-100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,true,true,,false,true,false
-100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,true,,true,true,false,false
-100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,true,true,true,false,false,false
-100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,true,true,true,false,false,false
-100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,true,true,,false,true,false
-100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,,,,true,false,false
-100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,,,,false,false,false
-100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,true,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
+100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
+100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
+100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
+100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
+100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
+100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
+100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
+100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
+100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
+100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
+100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
+100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,,,true,false,false
+100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,,,false,false,false
+100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 86d61b73..fbfe7ef1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,,true,true,false,false
-110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,true,,false,true,false
-110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,true,,true,true,false,false
-110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,true,true,,false,true,false
-110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,true,,true,true,false,false
-110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,true,true,,false,true,false
-110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,true,,true,true,false,false
-110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,true,true,,false,false,false
-110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,,,,false,true,false
-110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,true,,true,true,false,false
-110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
-110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,true,true,,false,true,false
-110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,true,,true,true,false,false
-110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
-110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,true,true,,false,true,false
-110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,true,,true,true,false,false
-110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,true,true,true,false,false,false
-110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,true,true,,false,true,false
-110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,,,,true,false,false
-110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,true,,true,false,false,false
-110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,true,true,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,,true,true,false,false
+110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
+110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
+110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,,true,true,false,false
+110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
+110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
+110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,,true,true,false,false
+110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
+110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
+110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,,true,true,false,false
+110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,true,,false,false,false
+110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,,,false,true,false
+110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,,true,true,false,false
+110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
+110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
+110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,,true,true,false,false
+110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
+110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
+110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,,true,true,false,false
+110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
+110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
+110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,,,true,false,false
+110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,,true,false,false,false
+110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index e0c1547b..ca898661 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,,true,true,false,false
-120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
-120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
-120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,true,true,true,false,false,false
-120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,true,true,,false,true,false
-120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,true,,true,true,false,false
-120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
-120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
-120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,true,true,true,false,false,false
-120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,true,true,,false,true,false
-120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,true,,true,true,false,false
-120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,true,true,true,false,false,false
-120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,true,true,true,false,false,false
-120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,true,true,true,false,false,false
-120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,true,true,,false,true,false
-120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,,,,true,false,false
-120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,,,,false,false,false
-120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,,,,false,false,false
-120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,,,,false,false,false
-120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
+120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
+120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
+120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
+120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
+120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
+120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
+120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
+120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
+120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
+120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
+120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
+120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
+120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
+120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
+120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,,,true,false,false
+120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,,,false,false,false
+120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,,,false,false,false
+120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,,,false,false,false
+120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 6c7f0542..c4c95a60 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,,true,true,false,false
-130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
-130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
-130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,true,true,true,false,false,false
-130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,true,true,true,false,false,false
-130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,true,true,true,false,false,false
-130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,true,true,,false,true,false
-130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,true,,true,true,false,false
-130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
-130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
-130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,true,true,true,false,false,false
-130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,true,true,true,false,false,false
-130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,true,true,true,false,false,false
-130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,true,true,,false,true,false
-130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,true,,true,true,false,false
-130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,true,true,true,false,false,false
-130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,true,true,true,false,false,false
-130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,true,true,true,false,false,false
-130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,true,true,true,false,false,false
-130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,true,true,true,false,false,false
-130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,true,true,,false,true,false
-130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,true,,,true,false,false
-130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,,,,false,false,false
-130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,,,,false,false,false
-130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,,,,false,false,false
-130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,,,,false,false,false
-130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,true,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
+130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
+130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
+130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
+130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
+130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
+130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
+130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
+130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
+130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
+130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
+130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
+130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
+130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
+130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
+130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
+130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
+130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
+130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
+130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
+130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
+130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,,,true,false,false
+130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,,,false,false,false
+130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,,,false,false,false
+130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,,,false,false,false
+130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,,,false,false,false
+130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index ff9f514d..0de8c87f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,,true,true,false,false
-140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
-140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
-140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,true,true,true,false,false,false
-140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,true,true,true,false,false,false
-140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,true,true,true,false,false,false
-140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,true,true,,false,true,false
-140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,true,,true,true,false,false
-140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
-140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
-140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,true,true,true,false,false,false
-140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,true,true,true,false,false,false
-140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,true,true,true,false,false,false
-140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,true,true,,false,true,false
-140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,true,,true,true,false,false
-140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,true,true,true,false,false,false
-140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,true,true,true,false,false,false
-140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,true,true,true,false,false,false
-140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,true,true,true,false,false,false
-140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,true,true,true,false,false,false
-140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,true,true,,false,true,false
-140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,,,,true,false,false
-140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,,,,false,false,false
-140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,,,,false,false,false
-140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,,,,false,false,false
-140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,,,,false,false,false
-140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,true,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
+140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
+140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
+140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
+140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
+140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
+140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
+140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
+140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
+140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
+140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
+140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
+140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
+140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
+140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
+140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
+140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
+140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
+140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
+140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
+140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
+140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,,,true,false,false
+140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,,,false,false,false
+140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,,,false,false,false
+140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,,,false,false,false
+140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,,,false,false,false
+140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 9186d99c..f6ec0754 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,,true,true,false,false
-150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
-150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
-150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,true,true,true,false,false,false
-150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
-150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,true,true,true,false,false,false
-150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,true,true,,false,true,false
-150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,true,,true,true,false,false
-150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
-150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
-150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,true,true,true,false,false,false
-150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
-150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,true,true,true,false,false,false
-150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,true,true,,false,true,false
-150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,true,,true,true,false,false
-150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,true,true,true,false,false,false
-150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,true,true,true,false,false,false
-150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,true,true,true,false,false,false
-150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,true,true,true,false,false,false
-150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,true,true,true,false,false,false
-150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,true,true,,false,true,false
-150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,,,,true,false,false
-150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,,false,false,false
-150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,true,,,false,false,false
-150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,true,,,false,false,false
-150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,,,,false,false,false
-150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
+150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
+150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
+150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
+150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
+150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
+150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
+150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
+150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
+150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
+150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
+150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
+150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
+150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
+150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
+150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
+150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
+150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
+150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
+150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
+150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
+150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,,,true,false,false
+150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,false,false,false
+150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,,,false,false,false
+150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,,,false,false,false
+150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,,,false,false,false
+150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index a3c1e9d4..40eefc8a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,,true,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,true,true,true,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,true,true,true,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,true,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,true,true,,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,true,,true,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,true,true,true,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,true,true,true,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,true,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,true,true,,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,true,,true,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,true,true,true,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,true,true,true,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,true,true,true,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,true,true,true,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,true,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,true,true,,false,true,false
-160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,,,,true,false,false
-160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,,,,false,false,false
-160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,true,,,false,false,false
-160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,,,,false,false,false
-160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,,,,false,false,false
-160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
+160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,,,true,false,false
+160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,,,false,false,false
+160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,,,false,false,false
+160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,,,false,false,false
+160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,,,false,false,false
+160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index d97d8db6..7963caa2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,,true,true,false,false
-170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
-170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
-170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,true,true,,false,true,false
-170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,true,,true,true,false,false
-170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
-170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
-170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,true,true,,false,true,false
-170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,true,,true,true,false,false
-170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,true,true,true,false,false,false
-170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,true,true,true,false,false,false
-170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,true,true,,false,true,false
-170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,true,,,false,false,false
-170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,,,,false,false,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
+170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
+170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
+170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
+170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
+170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
+170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
+170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
+170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
+170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
+170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
+170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
+170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,,,false,false,false
+170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,,,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 354dc07e..889cc8bf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,,true,true,false,false
-180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
-180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
-180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,true,true,,false,true,false
-180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,true,,true,true,false,false
-180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
-180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
-180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,true,true,,false,true,false
-180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,true,,true,true,false,false
-180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,true,true,true,false,false,false
-180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,true,true,true,false,false,false
-180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,true,true,,false,true,false
-180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,,,,false,false,false
-180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,true,,,false,false,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
+180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
+180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
+180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
+180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
+180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
+180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
+180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
+180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
+180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
+180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
+180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
+180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,,,false,false,false
+180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,,,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index 6346f2b0..69a45692 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,0,0,0,false,false,false
-190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,0,0,0,false,false,false
-190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,0,0,0,false,false,false
-190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,0,0,0,false,false,false
-190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,0,0,0,false,false,false
-190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,0,0,0,false,false,false
-190004,202001,100,51,2247,R,,,1,0.9214,50.3694,0,0,0,false,false,false
-190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190004,202004,100,51,8608,R,,,1.113,1,110.5473,0,0,0,false,false,false
-190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,0,0,0,false,false,false
-190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,0,0,0,false,false,false
-190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,0,0,0,true,false,false
-190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190006,202004,100,8,370.1196299,FIC,,,1.113,1,110.5473,0,0,0,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index 9e9ae559..08be556c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,,true,true,false,false
-200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
-200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
-200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,true,true,,false,true,false
-200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,true,,true,true,false,false
-200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
-200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
-200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,true,true,,false,true,false
-200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,true,,true,true,false,false
-200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,true,true,true,false,false,false
-200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,true,true,true,false,false,false
-200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,true,true,,false,true,false
-200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,true,,true,true,false,false
-200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,true,true,,false,false,false
-200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,false,false,false
-200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,,,,false,true,false
-200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,,,,true,false,false
-200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,false,false,false
-200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,,false,false,false
-200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,,,,false,true,false
-200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,,,,true,false,false
-200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,,,,false,false,false
-200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,true,,true,false,false,false
-200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,true,true,,false,true,false
-200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,true,,true,true,false,false
-200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
-200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
-200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,true,true,,false,true,false
-200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,true,,true,true,false,false
-200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
-200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
-200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,true,true,,false,true,false
-200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,true,,true,true,false,false
-200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,true,true,true,false,false,false
-200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,true,true,true,false,false,false
-200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,true,true,,false,true,false
-200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,,,,true,false,false
-200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,true,,true,false,false,false
-200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,true,true,,false,false,false
-200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,false,true,false
-200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,,,,true,false,false
-200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,true,,,false,false,false
-200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,,,,false,true,false
-200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,true,,,true,false,false
-200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,,,,false,false,false
-200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,,,,false,false,false
-200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
+200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
+200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
+200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
+200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
+200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
+200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
+200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
+200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
+200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
+200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
+200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
+200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
+200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,true,,false,false,false
+200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,,,false,false,false
+200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,,,false,true,false
+200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,,,true,false,false
+200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,false,false,false
+200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,false,false,false
+200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,,,false,true,false
+200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,,,true,false,false
+200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,,,false,false,false
+200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,,true,false,false,false
+200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
+200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
+200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
+200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
+200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
+200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
+200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
+200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
+200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
+200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
+200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
+200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
+200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
+200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
+200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,,true,false,false,false
+200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,true,,false,false,false
+200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
+200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
+200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,,,false,false,false
+200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
+200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
+200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,,,false,false,false
+200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,,,false,false,false
+200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 3637a969..67b8c9eb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
-210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
-210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
-210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
-210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
-210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,true,,false,true,false
-210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
-210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,true,,false,true,false
-210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,,,true,false,false
-210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
-210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,,false,true,false
+210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,,false,true,false
+210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
+210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
+210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index fd432a4e..9c116a23 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
-220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
-220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
-220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
-220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
-220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,true,true,,false,true,false
-220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
-220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,true,true,,false,true,false
-220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,,true,false,false
-220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
-220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,true,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
+220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
+220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,true,,false,true,false
+220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,true,,false,true,false
+220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,true,false,false
+220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
+220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index c9506630..5e3b325a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
-230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
-230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,,true,true,false,false
-230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
-230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
-230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,true,,false,true,false
-230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
-230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,true,,false,true,false
-230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,,true,false,false
-230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
-230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
+230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
+230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,,false,true,false
+230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,,false,true,false
+230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,true,false,false
+230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
+230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index a30c494b..a5242247 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
-240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
-240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
-240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
-240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
-240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,true,true,,false,true,false
-240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
-240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,true,false,false,false
-240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,true,true,,false,true,false
-240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,,,true,false,false
-240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,,false,false,false
-240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,true,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,true,,false,true,false
+240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,true,,false,true,false
+240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
+240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
+240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index b820ed8a..fe7ea411 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
-250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
-250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,,true,true,false,false
-250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,true,false,false,false
-250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,true,,false,true,false
-250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
-250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,true,true,true,false,false,false
-250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,true,true,,false,true,false
-250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,,true,true,false,false
-250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,true,true,true,false,false,false
-250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,true,true,,false,true,false
-250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,,,true,false,false
-250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,true,,true,false,false,false
-250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,true,true,,false,true,false
-250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,,,,true,false,false
-250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,,,,false,false,false
-250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,,,,false,true,false
-250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,,,,true,false,false
-250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,,,,false,false,false
-250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,true,true,false,false,false
+250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
+250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,true,true,false,false,false
+250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
+250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
+250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,,true,false,false,false
+250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
+250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
+250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,,,false,false,false
+250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,,,false,true,false
+250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,,,true,false,false
+250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,,,false,false,false
+250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index 4a98bb5b..1e6cbe1c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,false,true,false
-110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,,,,true,true,false
-110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,,,,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,true,,,true,true,false
-110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,true,,,true,true,false
-110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,,,,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,,,,true,true,false
-110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,,,,true,true,false
-110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,,,,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,,,,true,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,,,true,true,false
+110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,,,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,,,true,true,false
+110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,,,true,true,false
+110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,,,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,,,true,true,false
+110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,,,true,true,false
+110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,,,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,,,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index 65f39ef8..4845af83 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,false,true,false
-110005,202001,200,27,,,1,1,1,27,C,0,0,0,,,,true,true,true
-110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,,,,true,true,true
-110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,,,,true,true,true
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,,1,1,1,27,C,0,0,0,,,true,true,true
+110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,,,true,true,true
+110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,,,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index d5e54b05..69a45692 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,,1.853682946,1,0.9214,96.16299559,9261,R,0,0,4,true,false,false
-190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,0,0,3,false,false,false
-190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,0,0,4,false,false,false
-190001,202004,100,95,2.939189189,,1.113,1,87.62068966,4350,R,0,0,5,false,true,false
-190002,202001,100,17,,0.562673451,1,0.9214,96.16299559,2433,R,0,0,4,true,false,false
-190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,0,0,3,false,false,false
-190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,0,0,4,false,false,false
-190002,202004,100,17,11.26857143,,1.113,1,87.62068966,700,R,0,0,5,false,true,false
-190003,202001,100,64,,1.870080607,1,0.9214,96.16299559,7888,R,0,0,4,true,false,false
-190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,0,0,3,false,false,false
-190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,0,0,4,false,false,false
-190003,202004,100,64,0.537083388,,1.113,1,87.62068966,4077,R,0,0,5,false,true,false
-190004,202001,100,51,,,1,0.9214,96.16299559,2247,R,0,0,4,true,false,false
-190004,202002,100,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,0,0,3,false,false,false
-190004,202003,100,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,0,0,4,false,false,false
-190004,202004,100,51,,,1.113,1,87.62068966,8608,R,0,0,5,false,true,false
-190005,202001,100,34,,,1,0.9214,96.16299559,6271.13538,BI,0,0,4,true,false,false
-190005,202002,100,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,0,0,3,false,false,false
-190005,202003,100,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,0,0,4,false,false,false
-190005,202004,100,34,1.152154399,,1.113,1,87.62068966,5134,R,0,0,5,false,true,false
-190006,202001,100,8,,,1,0.9214,96.16299559,769.3039647,C,0,0,4,true,false,false
-190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.523909,FIC,0,0,3,false,false,false
-190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.874906,FIC,0,0,4,false,false,false
-190006,202004,100,8,,,1.113,1,87.62068966,706.6157695,FIC,0,0,5,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index bec5893f..6e1dc4ca 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,,true,true,false,true
-120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,true,true,true,false,false,true
-120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,true,true,true,false,false,true
-120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,true,true,true,false,false,true
-120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,true,true,,false,true,true
-120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,true,,true,true,false,true
-120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,true,true,true,false,false,true
-120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,true,true,true,false,false,true
-120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,true,true,true,false,false,true
-120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,true,true,,false,true,true
-120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,true,,true,true,false,true
-120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,true,true,true,false,false,true
-120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,true,true,true,false,false,true
-120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,true,true,true,false,false,true
-120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,true,true,,false,true,true
-120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,,,,true,false,true
-120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,,,,false,false,true
-120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,,,,false,false,true
-120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,,,,false,false,true
-120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,,,,false,true,true
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,,true,true,false,true
+120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,true,true,false,false,true
+120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,true,true,false,false,true
+120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,true,true,false,false,true
+120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,true,,false,true,true
+120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,,true,true,false,true
+120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,true,true,false,false,true
+120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,true,true,false,false,true
+120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,true,true,false,false,true
+120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,true,,false,true,true
+120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,,true,true,false,true
+120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,true,true,false,false,true
+120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,true,true,false,false,true
+120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,true,true,false,false,true
+120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,true,,false,true,true
+120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,,,true,false,true
+120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,,,false,false,true
+120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,,,false,false,true
+120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,,,false,false,true
+120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,,,false,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index e35d547c..423122d9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,,true,true,false,false
-30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,true,true,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,,true,true,false,false
+30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,true,,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index 9632fb25..ec344277 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,true,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,true,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,true,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,true,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11, ,false,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,true,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,true,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,true,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,true,true,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,,,,false,false,false
-30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,true,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,true,,false,true,false
+30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,,,false,false,false
+30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index c187250f..476af72c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,true,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,,,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,,false,true,false
+30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,,,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index 737414ea..b9fc2b54 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,true,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,true,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,true,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,true,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,true,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,true,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,true,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,true,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,true,,true,true,false,false
-30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,true,true,,false,false,false
-30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,,true,true,false,false
+30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,true,,false,false,false
+30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index 4b614fad..7fcd436a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,true,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,true,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,true,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,true,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,true,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,true,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,true,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,true,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,true,,true,true,false,false
-30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,true,true,,false,false,false
-30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,,true,true,false,false
+30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,true,,false,false,false
+30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index 6b0f047e..767cbfb8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,true,,true,true,false,false
-30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,true,true,,false,false,false
-30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,,true,true,false,false
+30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,true,,false,false,false
+30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 25fd647e..7abdc719 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,,true,true,false,false
-80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,true,true,true,false,false,false
-80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,true,,false,true,false
-80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,true,,true,true,false,false
-80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,true,true,true,false,false,false
-80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,true,true,,false,true,false
-80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,true,,true,true,false,false
-80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,true,true,true,false,false,false
-80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,true,true,,false,true,false
-80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,true,,true,true,false,false
-80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,true,true,true,false,false,false
-80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,true,true,,false,true,false
-80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,true,,true,true,false,false
-80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,true,true,true,false,false,false
-80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,true,true,,false,true,false
-80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,true,,true,true,false,false
-80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,true,true,true,false,false,false
-80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,true,true,,false,true,false
-80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,true,,true,true,false,false
-80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,true,true,true,false,false,false
-80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,true,true,,false,true,false
-80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,true,,true,true,false,false
-80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,true,true,true,false,false,false
-80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,true,true,,false,true,false
-80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,true,,true,true,false,false
-80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,true,true,true,false,false,false
-80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,true,true,,false,true,false
-80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,true,,true,true,false,false
-80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,true,true,true,false,false,false
-80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,true,true,,false,true,false
-80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,true,,true,true,false,false
-80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,true,true,true,false,false,false
-80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,true,true,,false,true,false
-80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,true,,true,true,false,false
-80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,true,true,,false,false,false
-80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,,,,false,true,false
-80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,,true,true,false,false
-80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,true,true,true,false,false,false
-80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,true,true,,false,true,false
-80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,,true,true,false,false
-80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,true,true,true,false,false,false
-80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,true,true,,false,true,false
-80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,,true,true,false,false
-80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,true,true,true,false,false,false
-80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,true,true,,false,true,false
-80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,,true,true,false,false
-80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,true,true,true,false,false,false
-80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,true,true,,false,true,false
-80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,,true,true,false,false
-80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,true,true,true,false,false,false
-80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,true,true,,false,true,false
-80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,,true,true,false,false
-80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,true,true,true,false,false,false
-80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,true,true,,false,true,false
-80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,,true,true,false,false
-80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,true,true,true,false,false,false
-80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,true,true,,false,true,false
-80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,,true,true,false,false
-80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,true,true,true,false,false,false
-80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,true,true,,false,true,false
-80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,,true,true,false,false
-80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,true,true,true,false,false,false
-80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,true,true,,false,true,false
-80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,,true,true,false,false
-80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,true,true,true,false,false,false
-80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,true,true,,false,true,false
-80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,,true,true,false,false
-80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,true,true,true,false,false,false
-80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,true,true,,false,true,false
-80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,,,,true,false,false
-80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,true,,true,false,false,false
-80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,true,true,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,,true,true,false,false
+80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,true,true,false,false,false
+80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,,false,true,false
+80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,,true,true,false,false
+80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,true,true,false,false,false
+80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,true,,false,true,false
+80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,,true,true,false,false
+80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,true,true,false,false,false
+80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,true,,false,true,false
+80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,,true,true,false,false
+80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,true,true,false,false,false
+80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,true,,false,true,false
+80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,,true,true,false,false
+80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,true,true,false,false,false
+80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,true,,false,true,false
+80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,,true,true,false,false
+80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,true,true,false,false,false
+80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,true,,false,true,false
+80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,,true,true,false,false
+80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,true,true,false,false,false
+80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,true,,false,true,false
+80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,,true,true,false,false
+80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,true,true,false,false,false
+80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,true,,false,true,false
+80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,,true,true,false,false
+80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,true,true,false,false,false
+80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,true,,false,true,false
+80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,,true,true,false,false
+80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,true,true,false,false,false
+80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,true,,false,true,false
+80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,,true,true,false,false
+80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,true,true,false,false,false
+80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,true,,false,true,false
+80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,,true,true,false,false
+80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,true,,false,false,false
+80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,,,false,true,false
+80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,,true,true,false,false
+80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,true,true,false,false,false
+80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,true,,false,true,false
+80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,,true,true,false,false
+80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,true,true,false,false,false
+80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,true,,false,true,false
+80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,,true,true,false,false
+80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,true,true,false,false,false
+80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,true,,false,true,false
+80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,,true,true,false,false
+80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,true,true,false,false,false
+80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,true,,false,true,false
+80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,,true,true,false,false
+80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,true,true,false,false,false
+80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,true,,false,true,false
+80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,,true,true,false,false
+80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,true,true,false,false,false
+80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,true,,false,true,false
+80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,,true,true,false,false
+80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,true,true,false,false,false
+80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,true,,false,true,false
+80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,,true,true,false,false
+80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,true,true,false,false,false
+80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,true,,false,true,false
+80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,,true,true,false,false
+80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,true,true,false,false,false
+80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,true,,false,true,false
+80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,,true,true,false,false
+80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,true,true,false,false,false
+80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,true,,false,true,false
+80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,,true,true,false,false
+80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,true,true,false,false,false
+80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,true,,false,true,false
+80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,,,true,false,false
+80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,,true,false,false,false
+80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index 3f1d4b1c..d7ea5894 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,,true,true,false,false
-90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,true,true,true,false,false,false
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,,false,true,false
-90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,true,,true,true,false,false
-90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,true,true,true,false,false,false
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,true,,false,true,false
-90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,true,,true,true,false,false
-90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,true,true,true,false,false,false
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,true,,false,true,false
-90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,true,,true,true,false,false
-90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,true,true,true,false,false,false
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,true,,false,true,false
-90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,true,,true,true,false,false
-90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,true,true,true,false,false,false
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,true,,false,true,false
-90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,true,,true,true,false,false
-90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,true,true,true,false,false,false
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,true,,false,true,false
-90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,true,,true,true,false,false
-90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,true,true,true,false,false,false
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,true,,false,true,false
-90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,,true,true,false,false
-90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,true,true,true,false,false,false
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,true,,false,true,false
-90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,true,,true,true,false,false
-90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,true,true,true,false,false,false
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,true,,false,true,false
-90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,true,,true,true,false,false
-90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,true,true,true,false,false,false
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,true,,false,true,false
-90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,true,,true,true,false,false
-90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,true,true,true,false,false,false
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,true,,false,true,false
-90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,,true,true,false,false
-90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,true,true,true,false,false,false
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,true,,false,true,false
-90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,true,,true,true,false,false
-90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,true,true,true,false,false,false
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,true,,false,true,false
-90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,true,,true,true,false,false
-90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,true,true,true,false,false,false
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,true,,false,true,false
-90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,true,,true,true,false,false
-90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,true,true,true,false,false,false
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,true,,false,true,false
-90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,true,,true,true,false,false
-90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,true,true,true,false,false,false
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,true,,false,true,false
-90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,true,,true,true,false,false
-90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,true,true,true,false,false,false
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,true,,false,true,false
-90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,true,,true,true,false,false
-90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,true,true,true,false,false,false
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,true,,false,true,false
-90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,true,,true,true,false,false
-90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,true,true,true,false,false,false
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,true,,false,true,false
-90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,true,,true,true,false,false
-90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,true,true,true,false,false,false
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,true,,false,true,false
-90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,,,,true,false,false
-90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,,,,false,false,false
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,true,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,,true,true,false,false
+90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,true,true,false,false,false
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,,false,true,false
+90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,,true,true,false,false
+90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,true,true,false,false,false
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,,false,true,false
+90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,,true,true,false,false
+90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,true,true,false,false,false
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,,false,true,false
+90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,,true,true,false,false
+90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,true,true,false,false,false
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,,false,true,false
+90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,,true,true,false,false
+90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,true,true,false,false,false
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,,false,true,false
+90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,,true,true,false,false
+90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,true,true,false,false,false
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,,false,true,false
+90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,,true,true,false,false
+90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,true,true,false,false,false
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,,false,true,false
+90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,,true,true,false,false
+90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,true,true,false,false,false
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,,false,true,false
+90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,,true,true,false,false
+90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,true,true,false,false,false
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,,false,true,false
+90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,,true,true,false,false
+90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,true,true,false,false,false
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,,false,true,false
+90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,,true,true,false,false
+90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,true,true,false,false,false
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,,false,true,false
+90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,,true,true,false,false
+90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,true,true,false,false,false
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,,false,true,false
+90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,,true,true,false,false
+90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,true,true,false,false,false
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,,false,true,false
+90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,,true,true,false,false
+90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,true,true,false,false,false
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,,false,true,false
+90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,,true,true,false,false
+90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,true,true,false,false,false
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,,false,true,false
+90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,,true,true,false,false
+90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,true,true,false,false,false
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,,false,true,false
+90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,,true,true,false,false
+90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,true,true,false,false,false
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,,false,true,false
+90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,,true,true,false,false
+90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,true,true,false,false,false
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,,false,true,false
+90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,,true,true,false,false
+90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,true,true,false,false,false
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,,false,true,false
+90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,,true,true,false,false
+90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,true,true,false,false,false
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,,false,true,false
+90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,,,true,false,false
+90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,,,false,false,false
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index cdb280ee..d4277f90 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,,true,true,false,false
-100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,true,true,true,false,false,false
-100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,true,true,,false,true,false
-100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,true,,true,true,false,false
-100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,true,true,true,false,false,false
-100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,true,true,,false,true,false
-100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,true,,true,true,false,false
-100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,true,true,true,false,false,false
-100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,true,true,,false,true,false
-100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,true,,true,true,false,false
-100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,true,true,true,false,false,false
-100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,true,true,,false,true,false
-100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,true,,true,true,false,false
-100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,true,true,true,false,false,false
-100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,true,true,,false,true,false
-100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,true,,true,true,false,false
-100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,true,true,true,false,false,false
-100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,true,true,,false,true,false
-100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,true,,true,true,false,false
-100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,true,true,true,false,false,false
-100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,true,true,,false,true,false
-100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,,true,true,false,false
-100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,true,true,true,false,false,false
-100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,true,true,,false,true,false
-100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,true,,true,true,false,false
-100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,true,true,true,false,false,false
-100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,true,true,,false,true,false
-100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,true,,true,true,false,false
-100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,true,true,true,false,false,false
-100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,true,true,,false,true,false
-100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,true,,true,true,false,false
-100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,true,true,true,false,false,false
-100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,true,true,,false,true,false
-100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,,true,true,false,false
-100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,true,true,true,false,false,false
-100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,true,true,,false,true,false
-100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,true,,true,true,false,false
-100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,true,true,true,false,false,false
-100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,true,true,,false,true,false
-100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,true,,true,true,false,false
-100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,true,true,true,false,false,false
-100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,true,true,,false,true,false
-100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,true,,true,true,false,false
-100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,true,true,true,false,false,false
-100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,true,true,,false,true,false
-100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,true,,true,true,false,false
-100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,true,true,true,false,false,false
-100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,true,true,,false,true,false
-100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,true,,true,true,false,false
-100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,true,true,true,false,false,false
-100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,true,true,,false,true,false
-100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,true,,true,true,false,false
-100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,true,true,true,false,false,false
-100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,true,true,,false,true,false
-100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,true,,true,true,false,false
-100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,true,true,true,false,false,false
-100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,true,true,,false,true,false
-100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,true,,true,true,false,false
-100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,true,true,true,false,false,false
-100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,true,true,,false,true,false
-100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,,,,true,false,false
-100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,,,,false,false,false
-100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,true,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,,true,true,false,false
+100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,true,true,false,false,false
+100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,true,,false,true,false
+100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,,true,true,false,false
+100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,true,true,false,false,false
+100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,true,,false,true,false
+100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,,true,true,false,false
+100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,true,true,false,false,false
+100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,true,,false,true,false
+100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,,true,true,false,false
+100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,true,true,false,false,false
+100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,true,,false,true,false
+100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,,true,true,false,false
+100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,true,true,false,false,false
+100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,true,,false,true,false
+100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,,true,true,false,false
+100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,true,true,false,false,false
+100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,true,,false,true,false
+100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,,true,true,false,false
+100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,true,true,false,false,false
+100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,true,,false,true,false
+100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,,true,true,false,false
+100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,true,true,false,false,false
+100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,true,,false,true,false
+100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,,true,true,false,false
+100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,true,true,false,false,false
+100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,true,,false,true,false
+100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,,true,true,false,false
+100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,true,true,false,false,false
+100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,true,,false,true,false
+100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,,true,true,false,false
+100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,true,true,false,false,false
+100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,true,,false,true,false
+100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,,true,true,false,false
+100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,true,true,false,false,false
+100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,true,,false,true,false
+100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,,true,true,false,false
+100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,true,true,false,false,false
+100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,true,,false,true,false
+100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,,true,true,false,false
+100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,true,true,false,false,false
+100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,true,,false,true,false
+100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,,true,true,false,false
+100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,true,true,false,false,false
+100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,true,,false,true,false
+100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,,true,true,false,false
+100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,true,true,false,false,false
+100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,true,,false,true,false
+100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,,true,true,false,false
+100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,true,true,false,false,false
+100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,true,,false,true,false
+100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,,true,true,false,false
+100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,true,true,false,false,false
+100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,true,,false,true,false
+100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,,true,true,false,false
+100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,true,true,false,false,false
+100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,true,,false,true,false
+100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,,true,true,false,false
+100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,true,true,false,false,false
+100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,true,,false,true,false
+100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,,,true,false,false
+100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,,,false,false,false
+100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index c7e2bf99..efee5fad 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,,true,true,false,false
-30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,true,,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,true,,true,true,false,false
-30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,true,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,true,,true,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,true,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,true,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,true,,true,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,true,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,true,,true,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,true,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,true,,true,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,true,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,true,,true,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,true,true,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,true,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,true,,true,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,true,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,true,,true,true,false,false
-30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,true,true,,false,false,false
-30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,true,,true,true,false,false
-30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,true,true,,false,false,false
-30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,true,,true,true,false,false
-30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,true,true,,false,false,false
-30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,,true,true,false,false
+30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,,true,true,false,false
+30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,,true,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,true,true,false,false,false
+30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,true,true,false,false,false
+30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,,true,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,true,true,false,false,false
+30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,,true,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,true,true,false,false,false
+30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,,true,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,,true,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,true,true,false,false,false
+30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,,true,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,,true,true,false,false
+30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,true,,false,false,false
+30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,,true,true,false,false
+30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,true,,false,false,false
+30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,,true,true,false,false
+30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,true,,false,false,false
+30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index d679cc4c..56e5d8df 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,,true,true,false,false
-30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,true,true,true,false,false,false
-30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,true,true,,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,true,,true,true,false,false
-30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,true,true,true,false,false,false
-30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,true,true,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,true,,true,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,true,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,true,true,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,true,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,true,true,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,true,,true,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,true,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,true,true,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,true,,true,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,true,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,true,true,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,true,,true,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,true,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,true,true,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,true,,true,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,true,true,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,true,,true,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,true,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,true,true,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,true,,true,true,false,false
-30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,true,true,,false,true,false
-30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,true,,true,true,false,false
-30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,true,true,true,false,false,false
-30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,true,true,,false,true,false
-30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,true,,true,true,false,false
-30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,true,true,,false,false,false
-30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,,true,true,false,false
+30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,true,true,false,false,false
+30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,true,,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,,true,true,false,false
+30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,true,true,false,false,false
+30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,true,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,,true,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,true,true,false,false,false
+30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,true,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,,true,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,true,true,false,false,false
+30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,true,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,,true,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,true,true,false,false,false
+30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,true,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,,true,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,true,true,false,false,false
+30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,true,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,,true,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,true,true,false,false,false
+30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,true,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,,true,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,true,true,false,false,false
+30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,true,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,,true,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,true,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,,true,true,false,false
+30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,true,true,false,false,false
+30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,,true,true,false,false
+30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,true,true,false,false,false
+30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,true,,false,true,false
+30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,,true,true,false,false
+30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,true,,false,false,false
+30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
index a05e3a38..b0f6908a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,true,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.7103175,4826,R,0,4,4,true,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.7103175,7586,R,0,4,4,true,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.7103175,3975,R,0,4,4,true,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,,false,false,false
-110004,202003,100,76,,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,,,,false,true,false
-110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,true,,true,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,true,true,true,false,false,false
-110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,true,true,,false,true,false
-110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,true,,true,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,true,true,true,false,false,false
-110006,202003,200,42,0.862914677,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,true,true,,false,true,false
-110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,true,,true,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,true,true,true,false,false,false
-110007,202003,200,19,1.222772277,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,true,true,,false,true,false
-110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.48471,BI,0,3,3,,,,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,true,,true,false,false,false
-110008,202003,200,43,1.53667263,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,true,true,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.7103175,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.7103175,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.7103175,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,,true,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,true,true,false,false,false
+110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,true,,false,true,false
+110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,,true,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,true,true,false,false,false
+110006,202003,200,42,0.862914677,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,true,,false,true,false
+110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,,true,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,true,true,false,false,false
+110007,202003,200,19,1.222772277,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,true,,false,true,false
+110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.48471,BI,0,3,3,,,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,,true,false,false,false
+110008,202003,200,43,1.53667263,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 19a43fbc..0d399687 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,true,,true,true,false,false
-30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,true,,false,false,false
-30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,,,,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,,true,true,false,false
+30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,,false,false,false
+30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,,,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index fba87c37..6273276e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,true,,true,true,false,false
-30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,true,,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,,,,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,,true,true,false,false
+30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,,,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index e873654d..fe23ecca 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,,true,true,false,false
-60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,true,true,true,false,false,false
-60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,true,true,,false,true,false
-60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,true,,true,true,false,false
-60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,true,true,true,false,false,false
-60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,true,true,,false,true,false
-60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,true,,true,true,false,false
-60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,true,true,true,false,false,false
-60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,true,true,,false,true,false
-60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,,,,true,false,false
-60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,,,,false,false,false
-60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,true,,,false,true,false
-60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,,,,
-60002,201901,100,71,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-60002,201903,100,71,,,,,,1.113,1,89.3761,,,,,,,,,,,
-60003,201901,100,26,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-60003,201903,100,26,,,,,,1.113,1,89.3761,,,,,,,,,,,
-60004,201901,100,3,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-60004,201903,100,3,,,,,,1.113,1,89.3761,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,,true,true,false,false
+60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,true,true,false,false,false
+60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,true,,false,true,false
+60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,,true,true,false,false
+60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,true,true,false,false,false
+60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,true,,false,true,false
+60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,,true,true,false,false
+60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,true,true,false,false,false
+60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,true,,false,true,false
+60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,,,true,false,false
+60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,,,false,false,false
+60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,,,false,true,false
+60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,,,
+60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,,,
+60002,201901,100,71,,,,,,1,1.5274,50.3694,,,,,,,,,,
+60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+60002,201903,100,71,,,,,,1.113,1,89.3761,,,,,,,,,,
+60003,201901,100,26,,,,,,1,1.5274,50.3694,,,,,,,,,,
+60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+60003,201903,100,26,,,,,,1.113,1,89.3761,,,,,,,,,,
+60004,201901,100,3,,,,,,1,1.5274,50.3694,,,,,,,,,,
+60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+60004,201903,100,3,,,,,,1.113,1,89.3761,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index 35b0454c..6ee1ca3f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,true,,false,true,false
-30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,,,,true,false,false
-30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,,,,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,,,,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
+30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,,,true,false,false
+30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,,,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,,,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index 954d0283..f222bebe 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,,true,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,true,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,true,,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,,true,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,true,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,true,,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,,true,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,true,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,true,,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,true,,true,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,true,,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
-110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
-110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
-110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,,true,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,,true,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,,true,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,true,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,,false,true,false
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,
+110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 93cb5606..78f446c1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,true,,true,true,false,false
-30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,true,true,,false,false,false
-30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,,,,false,true,false
-30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,,,,
-30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,,,,
-30002,201901,100,72,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-30002,201902,100,72,,,1,1.8795,121.4187,,,,,,,,,,,,,,
-30002,201903,100,72,,,1,1,89.3761,,,,,,,,,,,,,,
-30003,201901,100,7,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-30003,201902,100,7,,,1,1.8795,121.4187,,,,,,,,,,,,,,
-30003,201903,100,7,,,1,1,89.3761,,,,,,,,,,,,,,
-30004,201901,100,81,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-30004,201902,100,81,,,1,1.8795,121.4187,,,,,,,,,,,,,,
-30004,201903,100,81,,,1,1,89.3761,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,,true,true,false,false
+30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,true,,false,false,false
+30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,,,false,true,false
+30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,,,
+30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,,,
+30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,,,
+30002,201901,100,72,,,1,1.5274,50.3694,,,,,,,,,,,,,
+30002,201902,100,72,,,1,1.8795,121.4187,,,,,,,,,,,,,
+30002,201903,100,72,,,1,1,89.3761,,,,,,,,,,,,,
+30003,201901,100,7,,,1,1.5274,50.3694,,,,,,,,,,,,,
+30003,201902,100,7,,,1,1.8795,121.4187,,,,,,,,,,,,,
+30003,201903,100,7,,,1,1,89.3761,,,,,,,,,,,,,
+30004,201901,100,81,,,1,1.5274,50.3694,,,,,,,,,,,,,
+30004,201902,100,81,,,1,1.8795,121.4187,,,,,,,,,,,,,
+30004,201903,100,81,,,1,1,89.3761,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index 4c446d7f..5974c5b5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,true,,true,true,false,false
-60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,true,true,true,false,false,false
-60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,true,true,,false,true,false
-60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,true,,true,true,false,false
-60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,true,true,true,false,false,false
-60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,true,true,,false,true,false
-60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,true,,true,true,false,false
-60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,true,true,true,false,false,false
-60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,true,true,,false,true,false
-60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,,,,true,false,false
-60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,,,,false,false,false
-60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,true,,,false,true,false
-60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,,,,
-60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,,,,
-60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,,,,
-60002,201901,100,71,,,1,1,50.3694,,,,,,,,,,,,,,
-60002,201902,100,71,,,0.9685,1,121.4187,,,,,,,,,,,,,,
-60002,201903,100,71,,,1.113,1,89.3761,,,,,,,,,,,,,,
-60003,201901,100,26,,,1,1,50.3694,,,,,,,,,,,,,,
-60003,201902,100,26,,,0.9685,1,121.4187,,,,,,,,,,,,,,
-60003,201903,100,26,,,1.113,1,89.3761,,,,,,,,,,,,,,
-60004,201901,100,3,,,1,1,50.3694,,,,,,,,,,,,,,
-60004,201902,100,3,,,0.9685,1,121.4187,,,,,,,,,,,,,,
-60004,201903,100,3,,,1.113,1,89.3761,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,,true,true,false,false
+60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,true,true,false,false,false
+60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,true,,false,true,false
+60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,,true,true,false,false
+60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,true,true,false,false,false
+60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,true,,false,true,false
+60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,,true,true,false,false
+60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,true,true,false,false,false
+60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,true,,false,true,false
+60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,,,true,false,false
+60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,,,false,false,false
+60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,,,false,true,false
+60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,,,
+60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,,,
+60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,,,
+60002,201901,100,71,,,1,1,50.3694,,,,,,,,,,,,,
+60002,201902,100,71,,,0.9685,1,121.4187,,,,,,,,,,,,,
+60002,201903,100,71,,,1.113,1,89.3761,,,,,,,,,,,,,
+60003,201901,100,26,,,1,1,50.3694,,,,,,,,,,,,,
+60003,201902,100,26,,,0.9685,1,121.4187,,,,,,,,,,,,,
+60003,201903,100,26,,,1.113,1,89.3761,,,,,,,,,,,,,
+60004,201901,100,3,,,1,1,50.3694,,,,,,,,,,,,,
+60004,201902,100,3,,,0.9685,1,121.4187,,,,,,,,,,,,,
+60004,201903,100,3,,,1.113,1,89.3761,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index 4ebae8b4..56069578 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,true,true,,false,true,false
-30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,,,,true,false,false
-30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,,,,false,false,false
-30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,,,,false,true,false
-30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,,,,
-30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,,,,
-30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,,,,
-30002,201901,100,72,,,1,1.5274,1,,,,,,,,,,,,,,
-30002,201902,100,72,,,0.9685,1.8795,1,,,,,,,,,,,,,,
-30002,201903,100,72,,,1.113,1,1,,,,,,,,,,,,,,
-30003,201901,100,7,,,1,1.5274,1,,,,,,,,,,,,,,
-30003,201902,100,7,,,0.9685,1.8795,1,,,,,,,,,,,,,,
-30003,201903,100,7,,,1.113,1,1,,,,,,,,,,,,,,
-30004,201901,100,81,,,1,1.5274,1,,,,,,,,,,,,,,
-30004,201902,100,81,,,0.9685,1.8795,1,,,,,,,,,,,,,,
-30004,201903,100,81,,,1.113,1,1,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,true,,false,true,false
+30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,,,true,false,false
+30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,,,false,false,false
+30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,,,false,true,false
+30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,,,
+30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,,,
+30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,,,
+30002,201901,100,72,,,1,1.5274,1,,,,,,,,,,,,,
+30002,201902,100,72,,,0.9685,1.8795,1,,,,,,,,,,,,,
+30002,201903,100,72,,,1.113,1,1,,,,,,,,,,,,,
+30003,201901,100,7,,,1,1.5274,1,,,,,,,,,,,,,
+30003,201902,100,7,,,0.9685,1.8795,1,,,,,,,,,,,,,
+30003,201903,100,7,,,1.113,1,1,,,,,,,,,,,,,
+30004,201901,100,81,,,1,1.5274,1,,,,,,,,,,,,,
+30004,201902,100,81,,,0.9685,1.8795,1,,,,,,,,,,,,,
+30004,201903,100,81,,,1.113,1,1,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index 8b8b5374..e9bccde0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,true,,true,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,true,true,true,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,true,,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,true,,true,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,true,true,true,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,true,,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,true,,true,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,true,true,true,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,true,,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,,,,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,true,,true,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,true,,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110005,201901,200,27,,,1,1,107.48,,,,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,1,54.70285714,,,,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
-110006,201901,200,42,,,1,1,107.48,,,,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,1,54.70285714,,,,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
-110007,201901,200,19,,,1,1,107.48,,,,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,1,54.70285714,,,,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
-110008,201901,200,43,,,1,1,107.48,,,,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,1,54.70285714,,,,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,,true,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,true,true,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,,true,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,true,true,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,,true,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,true,true,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,,,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,,true,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,,false,true,false
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,
+110005,201901,200,27,,,1,1,107.48,,,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110006,201901,200,42,,,1,1,107.48,,,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110007,201901,200,19,,,1,1,107.48,,,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110008,201901,200,43,,,1,1,107.48,,,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index 7a1a6276..11061d21 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,true,,true,true,false,false
-210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,true,true,true,false,false,false
-210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,true,true,,false,true,false
-210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,true,,true,true,false,false
-210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,true,true,true,false,false,false
-210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,true,true,,false,true,false
-210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,true,,true,true,false,false
-210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,true,true,true,false,false,false
-210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,true,true,,false,true,false
-210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,true,,true,true,false,false
-210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,true,true,true,false,false,false
-210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,true,true,,false,true,false
-210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,true,,,true,false,false
-210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,,,,false,false,false
-210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,,,,false,true,false
-210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-210002,201901,1,50,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,
-210002,201903,1,50,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,
-210003,201901,2,12,,,1,0.68736285,182.25,,,,,,,,,,,,,,
-210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,,
-210003,201903,2,12,,,1.259780318,1,182.2366412,,,,,,,,,,,,,,
-210004,201901,2,9,,,1,0.68736285,182.25,,,,,,,,,,,,,,
-210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,,
-210004,201903,2,9,,,1.259780318,1,182.2366412,,,,,,,,,,,,,,
-210005,201901,1,18,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,
-210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,,
-210005,201903,2,18,,,1.259780318,1,182.2366412,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,,true,true,false,false
+210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,true,true,false,false,false
+210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,true,,false,true,false
+210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,,true,true,false,false
+210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,true,true,false,false,false
+210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,true,,false,true,false
+210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,,true,true,false,false
+210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,true,true,false,false,false
+210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,true,,false,true,false
+210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,,true,true,false,false
+210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,true,true,false,false,false
+210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,true,,false,true,false
+210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,,,true,false,false
+210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,,,false,false,false
+210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,,,false,true,false
+210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
+210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,
+210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,,,
+210002,201901,1,50,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
+210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,
+210002,201903,1,50,,,0.968230653,1,70.26136364,,,,,,,,,,,,,
+210003,201901,2,12,,,1,0.68736285,182.25,,,,,,,,,,,,,
+210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
+210003,201903,2,12,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
+210004,201901,2,9,,,1,0.68736285,182.25,,,,,,,,,,,,,
+210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
+210004,201903,2,9,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
+210005,201901,1,18,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
+210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
+210005,201903,2,18,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index d1369e20..072aed01 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,57 +1,57 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,true,,true,true,false,false
-70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,true,true,true,false,false,false
-70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,true,true,true,false,false,false
-70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,true,true,true,false,false,false
-70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,true,true,true,false,false,false
-70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,true,true,true,false,false,false
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,true,true,,false,true,false
-70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,true,,true,true,false,false
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,true,true,true,false,false,false
-70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,true,true,true,false,false,false
-70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,true,true,true,false,false,false
-70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,true,true,true,false,false,false
-70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,true,true,true,false,false,false
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,true,true,,false,true,false
-70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,true,,true,true,false,false
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,true,true,true,false,false,false
-70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,true,true,true,false,false,false
-70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,true,true,true,false,false,false
-70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,true,true,true,false,false,false
-70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,true,true,true,false,false,false
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,true,true,,false,true,false
-70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,,,,true,false,false
-70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,,,,false,false,false
-70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,true,,,false,false,false
-70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,,,,false,false,false
-70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,,,,false,false,false
-70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,true,,,false,false,false
-70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,,,,false,true,false
-70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,,,,
-70001,201902,100,39,,,1,1,1,,,,,,,,,,,,,,
-70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,,,,
-70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,,
-70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,,
-70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,,
-70001,201907,100,39,,,1,1,1,,,,,,,,,,,,,,
-70002,201901,100,94,,,1,1.511049724,101.7103175,,,,,,,,,,,,,,
-70002,201902,100,94,,,1,1,1,,,,,,,,,,,,,,
-70002,201903,100,94,,,1.082864299,1,70.26136364,,,,,,,,,,,,,,
-70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,,
-70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,,
-70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,,
-70002,201907,100,94,,,1,1,1,,,,,,,,,,,,,,
-70003,201901,100,42,,,1,1.511049724,101.7103175,,,,,,,,,,,,,,
-70003,201902,100,42,,,1,1,1,,,,,,,,,,,,,,
-70003,201903,100,42,,,1.082864299,1,70.26136364,,,,,,,,,,,,,,
-70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,,
-70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,,
-70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,,
-70003,201907,100,42,,,1,1,1,,,,,,,,,,,,,,
-70004,201901,100,6,,,1,1.511049724,101.7103175,,,,,,,,,,,,,,
-70004,201902,100,6,,,1,1,1,,,,,,,,,,,,,,
-70004,201903,100,6,,,1.082864299,1,70.26136364,,,,,,,,,,,,,,
-70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,,
-70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,,
-70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,,
-70004,201907,100,6,,,1,1,1,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,,true,true,false,false
+70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,true,true,false,false,false
+70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,true,true,false,false,false
+70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,true,true,false,false,false
+70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,true,true,false,false,false
+70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,true,true,false,false,false
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,true,,false,true,false
+70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,,true,true,false,false
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,true,true,false,false,false
+70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,true,true,false,false,false
+70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,true,true,false,false,false
+70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,true,true,false,false,false
+70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,true,true,false,false,false
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,true,,false,true,false
+70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,,true,true,false,false
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,true,true,false,false,false
+70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,true,true,false,false,false
+70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,true,true,false,false,false
+70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,true,true,false,false,false
+70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,true,true,false,false,false
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,true,,false,true,false
+70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,,,true,false,false
+70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,,,false,false,false
+70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,,,false,false,false
+70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,,,false,false,false
+70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,,,false,false,false
+70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,,,false,false,false
+70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,,,false,true,false
+70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
+70001,201902,100,39,,,1,1,1,,,,,,,,,,,,,
+70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
+70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
+70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
+70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
+70001,201907,100,39,,,1,1,1,,,,,,,,,,,,,
+70002,201901,100,94,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
+70002,201902,100,94,,,1,1,1,,,,,,,,,,,,,
+70002,201903,100,94,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
+70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
+70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
+70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
+70002,201907,100,94,,,1,1,1,,,,,,,,,,,,,
+70003,201901,100,42,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
+70003,201902,100,42,,,1,1,1,,,,,,,,,,,,,
+70003,201903,100,42,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
+70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
+70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
+70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
+70003,201907,100,42,,,1,1,1,,,,,,,,,,,,,
+70004,201901,100,6,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
+70004,201902,100,6,,,1,1,1,,,,,,,,,,,,,
+70004,201903,100,6,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
+70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
+70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
+70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
+70004,201907,100,6,,,1,1,1,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index e14b550b..813ace8f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -1,43 +1,43 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,true,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,true,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,true,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,true,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,true,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,true,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,true,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,true,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,,,,false,true,false
-110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,,,,true,true,true
-110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,,,,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,true,,true,true,true,true
-110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,true,,true,true,true
-110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,,,,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,,,,true,true,true
-110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,,,,true,true,true
-110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,,,,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,,,,true,true,true
-110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,
-110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,
-110002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,
-110002,201903,100,83,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,
-110003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,
-110003,201903,100,4,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,
-110004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,
-110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,
-110004,201903,100,76,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,
-110005,201901,200,27,,,1,2.642597676,144.865,,,,,,,,,,,,,,
-110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,
-110005,201903,200,27,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,
-110006,201901,200,42,,,1,2.642597676,144.865,,,,,,,,,,,,,,
-110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,
-110006,201903,200,42,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,
-110007,201901,200,19,,,1,2.642597676,144.865,,,,,,,,,,,,,,
-110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,
-110007,201903,200,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,,,true,true,true
+110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,,,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,,true,true,true,true
+110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,,true,true,true
+110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,,,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,,,true,true,true
+110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,,,true,true,true
+110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,,,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,,,true,true,true
+110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+110002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+110002,201903,100,83,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+110003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+110003,201903,100,4,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+110004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+110004,201903,100,76,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+110005,201901,200,27,,,1,2.642597676,144.865,,,,,,,,,,,,,
+110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+110005,201903,200,27,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+110006,201901,200,42,,,1,2.642597676,144.865,,,,,,,,,,,,,
+110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+110006,201903,200,42,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+110007,201901,200,19,,,1,2.642597676,144.865,,,,,,,,,,,,,
+110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+110007,201903,200,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 1409b30a..564a421f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,145 +1,145 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,true,true,,true,true,false,false
-80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,true,true,true,true,true,false,false,false
-80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,true,,true,true,,false,true,false
-80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,true,true,,true,true,false,false
-80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,true,true,true,true,true,false,false,false
-80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,true,,true,true,,false,true,false
-80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,true,true,,true,true,false,false
-80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,true,true,true,true,true,false,false,false
-80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,true,,true,true,,false,true,false
-80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,true,true,,true,true,false,false
-80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,true,true,true,true,true,false,false,false
-80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,true,,true,true,,false,true,false
-80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,false,true,,true,true,false,false
-80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,false,false,true,true,true,false,false,false
-80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,true,,true,true,,false,true,false
-80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,true,true,,true,true,false,false
-80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,true,true,true,true,true,false,false,false
-80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,true,,true,true,,false,true,false
-80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,true,true,,true,true,false,false
-80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,true,true,true,true,true,false,false,false
-80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,true,,true,true,,false,true,false
-80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,,true,true,false,false
-80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,true,true,true,true,true,false,false,false
-80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,true,,true,true,,false,true,false
-80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,true,true,,true,true,false,false
-80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,true,true,true,true,true,false,false,false
-80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,true,,true,true,,false,true,false
-80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,true,true,,true,true,false,false
-80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,true,true,true,true,true,false,false,false
-80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,false,,true,true,,false,true,false
-80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,false,true,,true,true,false,false
-80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,false,false,true,true,true,false,false,false
-80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,false,,true,true,,false,true,false
-80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,,true,true,false,false
-80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,true,,true,true,,false,false,false
-80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,,,,false,true,false
-80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,true,true,,true,true,false,false
-80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,true,true,true,true,true,false,false,false
-80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,true,,true,true,,false,true,false
-80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,true,true,,true,true,false,false
-80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,true,true,true,true,true,false,false,false
-80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,true,,true,true,,false,true,false
-80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,false,true,,true,true,false,false
-80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,false,true,true,true,true,false,false,false
-80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,true,,true,true,,false,true,false
-80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,true,true,,true,true,false,false
-80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,true,true,true,true,true,false,false,false
-80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,true,,true,true,,false,true,false
-80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,true,true,,true,true,false,false
-80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,true,true,true,true,true,false,false,false
-80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,true,,true,true,,false,true,false
-80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,true,true,,true,true,false,false
-80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,true,true,true,true,true,false,false,false
-80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,true,,true,true,,false,true,false
-80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,true,true,,true,true,false,false
-80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,true,false,true,true,true,false,false,false
-80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,false,,true,true,,false,true,false
-80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,true,true,,true,true,false,false
-80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,true,false,true,true,true,false,false,false
-80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,false,,true,true,,false,true,false
-80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,true,true,,true,true,false,false
-80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,true,true,true,true,true,false,false,false
-80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,true,,true,true,,false,true,false
-80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,false,true,,true,true,false,false
-80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,true,false,true,true,true,false,false,false
-80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,true,,true,true,,false,true,false
-80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,true,true,,true,true,false,false
-80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,true,true,true,true,true,false,false,false
-80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,true,,true,true,,false,true,false
-80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,,,,true,false,false
-80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,true,,true,false,false,false
-80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,true,true,,false,true,false
-80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80002,201901,100,83,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80002,201903,100,83,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80003,201901,100,4,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80003,201903,100,4,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80004,201901,100,76,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80004,201903,100,76,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80005,201901,100,18,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80005,201903,100,18,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80006,201901,100,94,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80006,201903,100,94,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80007,201901,100,8,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80007,201903,100,8,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80008,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80008,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80009,201901,100,45,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80009,201903,100,45,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80010,201901,100,100,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80010,201903,100,100,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80011,201901,100,19,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80011,201903,100,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80012,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,,
-80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,,
-80012,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,,
-80013,201901,200,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80013,201903,200,54,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80014,201901,200,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80014,201903,200,42,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80015,201901,200,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80015,201903,200,57,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80016,201901,200,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80016,201903,200,163,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80017,201901,200,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80017,201903,200,149,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80018,201901,200,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80018,201903,200,126,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80019,201901,200,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80019,201903,200,6,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80020,201901,200,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80020,201903,200,22,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80021,201901,200,108,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80021,201903,200,108,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80022,201901,200,67,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80022,201903,200,67,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80023,201901,200,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80023,201903,200,18,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
-80024,201901,200,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,,
-80024,201903,200,155,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,true,,true,true,false,false
+80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,true,true,true,true,false,false,false
+80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,true,,true,,false,true,false
+80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,true,,true,true,false,false
+80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,true,true,true,true,false,false,false
+80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,true,,true,,false,true,false
+80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,true,,true,true,false,false
+80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,true,true,true,true,false,false,false
+80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,true,,true,,false,true,false
+80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,true,,true,true,false,false
+80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,true,true,true,true,false,false,false
+80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,true,,true,,false,true,false
+80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,false,,true,true,false,false
+80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,false,false,true,true,false,false,false
+80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,true,,true,,false,true,false
+80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,true,,true,true,false,false
+80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,true,true,true,true,false,false,false
+80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,true,,true,,false,true,false
+80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,true,,true,true,false,false
+80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,true,true,true,true,false,false,false
+80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,true,,true,,false,true,false
+80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,,true,true,false,false
+80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,true,true,true,true,false,false,false
+80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,true,,true,,false,true,false
+80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,true,,true,true,false,false
+80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,true,true,true,true,false,false,false
+80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,true,,true,,false,true,false
+80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,true,,true,true,false,false
+80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,true,true,true,true,false,false,false
+80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,false,,true,,false,true,false
+80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,false,,true,true,false,false
+80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,false,false,true,true,false,false,false
+80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,false,,true,,false,true,false
+80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,,true,true,false,false
+80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,true,,true,,false,false,false
+80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,,,false,true,false
+80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,true,,true,true,false,false
+80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,true,true,true,true,false,false,false
+80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,true,,true,,false,true,false
+80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,true,,true,true,false,false
+80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,true,true,true,true,false,false,false
+80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,true,,true,,false,true,false
+80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,false,,true,true,false,false
+80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,false,true,true,true,false,false,false
+80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,true,,true,,false,true,false
+80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,true,,true,true,false,false
+80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,true,true,true,true,false,false,false
+80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,true,,true,,false,true,false
+80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,true,,true,true,false,false
+80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,true,true,true,true,false,false,false
+80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,true,,true,,false,true,false
+80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,true,,true,true,false,false
+80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,true,true,true,true,false,false,false
+80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,true,,true,,false,true,false
+80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,true,,true,true,false,false
+80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,true,false,true,true,false,false,false
+80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,false,,true,,false,true,false
+80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,true,,true,true,false,false
+80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,true,false,true,true,false,false,false
+80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,false,,true,,false,true,false
+80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,true,,true,true,false,false
+80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,true,true,true,true,false,false,false
+80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,true,,true,,false,true,false
+80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,false,,true,true,false,false
+80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,true,false,true,true,false,false,false
+80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,true,,true,,false,true,false
+80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,true,,true,true,false,false
+80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,true,true,true,true,false,false,false
+80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,true,,true,,false,true,false
+80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,,,true,false,false
+80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,,true,false,false,false
+80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,true,,false,true,false
+80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80002,201901,100,83,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80002,201903,100,83,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80003,201901,100,4,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80003,201903,100,4,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80004,201901,100,76,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80004,201903,100,76,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80005,201901,100,18,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80005,201903,100,18,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80006,201901,100,94,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80006,201903,100,94,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80007,201901,100,8,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80007,201903,100,8,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80008,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80008,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80009,201901,100,45,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80009,201903,100,45,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80010,201901,100,100,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80010,201903,100,100,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80011,201901,100,19,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80011,201903,100,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80012,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80012,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80013,201901,200,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80013,201903,200,54,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80014,201901,200,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80014,201903,200,42,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80015,201901,200,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80015,201903,200,57,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80016,201901,200,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80016,201903,200,163,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80017,201901,200,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80017,201903,200,149,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80018,201901,200,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80018,201903,200,126,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80019,201901,200,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80019,201903,200,6,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80020,201901,200,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80020,201903,200,22,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80021,201901,200,108,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80021,201903,200,108,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80022,201901,200,67,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80022,201903,200,67,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80023,201901,200,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80023,201903,200,18,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80024,201901,200,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80024,201903,200,155,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index 549cff40..c030a07b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,,true,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,true,,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,,true,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,true,,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,,true,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,true,,true,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,,true,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,true,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,true,,true,true,,false,true,false
-30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,,true,true,,true,true,false,false
-30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,true,,true,true,,false,true,false
-30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,,true,true,,true,true,false,false
-30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,true,,true,true,,false,true,false
-30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,,true,true,,true,true,false,false
-30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,true,,true,true,,false,true,false
-30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,,true,true,,true,true,false,false
-30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,true,true,true,true,true,false,false,false
-30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,true,,true,true,,false,true,false
-30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,,true,true,,true,true,false,false
-30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,true,,true,true,,false,true,false
-30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,,true,true,,true,true,false,false
-30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,true,,true,true,,false,true,false
-30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,,true,true,,true,true,false,false
-30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,true,true,true,true,true,false,false,false
-30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,true,,true,true,,false,true,false
-30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,,,,true,false,false
-30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,,,,false,false,false
-30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,,,,false,true,false
-30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,true,,true,,false,true,false
+30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,,true,,true,true,false,false
+30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,true,true,true,true,false,false,false
+30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,true,,true,,false,true,false
+30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,,true,,true,true,false,false
+30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,true,true,true,true,false,false,false
+30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,true,,true,,false,true,false
+30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,,true,,true,true,false,false
+30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,true,true,true,true,false,false,false
+30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,true,,true,,false,true,false
+30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,,true,,true,true,false,false
+30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,true,true,true,true,false,false,false
+30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,true,,true,,false,true,false
+30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,,true,,true,true,false,false
+30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,true,true,true,true,false,false,false
+30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,true,,true,,false,true,false
+30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,,true,,true,true,false,false
+30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,true,true,true,true,false,false,false
+30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,,true,,true,true,false,false
+30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,true,true,true,true,false,false,false
+30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,true,,true,,false,true,false
+30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,,,true,false,false
+30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,,,false,false,false
+30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,,,false,true,false
+30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index 09db1f90..65f6451c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,true,,true,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,true,true,true,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,true,true,true,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,true,true,true,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,true,true,true,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,true,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,true,true,,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,true,,true,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,true,true,true,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,true,true,true,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,true,true,true,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,true,true,true,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,true,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,true,true,,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,true,,true,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,true,true,true,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,true,true,true,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,true,true,true,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,true,true,true,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,true,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,true,true,,false,true,false
-160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,true,,true,true,false,false
-160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,true,true,true,false,false,false
-160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,true,true,true,false,false,false
-160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,true,true,true,false,false,false
-160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,true,true,true,false,false,false
-160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,true,true,true,false,false,false
-160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,true,true,,false,true,false
-160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,,,,true,false,false
-160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,,,,false,false,false
-160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,true,,,false,false,false
-160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,,,,false,false,false
-160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,,,,false,false,false
-160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
+160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
+160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
+160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
+160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
+160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
+160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
+160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
+160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,,,true,false,false
+160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,,,false,false,false
+160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,,,false,false,false
+160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,,,false,false,false
+160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,,,false,false,false
+160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index e3aa3367..525f0f04 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,true,,true,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,true,true,true,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,true,true,true,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,true,true,true,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,true,true,true,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,true,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,true,true,,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,true,,true,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,true,true,true,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,true,true,true,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,true,true,true,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,true,true,true,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,true,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,true,true,,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,true,,true,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,true,true,true,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,true,true,true,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,true,true,true,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,true,true,true,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,true,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,true,true,,false,true,false
-160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,true,,true,true,false,false
-160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,true,true,true,false,false,false
-160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,true,true,true,false,false,false
-160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,true,true,true,false,false,false
-160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,true,true,true,false,false,false
-160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,true,true,true,false,false,false
-160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,true,true,,false,true,false
-160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,,,,true,false,false
-160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,,,,false,false,false
-160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,true,,,false,false,false
-160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,,,,false,false,false
-160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,,,,false,false,false
-160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
+160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
+160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
+160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
+160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
+160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
+160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
+160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
+160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,,,true,false,false
+160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,,,false,false,false
+160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,,,false,false,false
+160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,,,false,false,false
+160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,,,false,false,false
+160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index a51ffa2b..37c2647e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false,true
-10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false,true
-10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false,true
-10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,true,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false
+10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false
+10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false
+10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,true,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index eafa97ff..49fe2104 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false,true
-20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false,true
-20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false,true
-20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,true,false,true
-20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,true,false,false,true
-20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,true,false,true
-20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,true,false,false,
-20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction
+20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false
+20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false
+20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false
+20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,true,false
+20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,true,false,false
+20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,true,false
+20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,true,false,false
+20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index 27d173b5..e7524725 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false,true
-30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,true
-30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false,true
-30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4,true,false,false,true
-30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,true
-30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3,false,true,false,true
-30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4,true,false,false,true
-30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,true
-30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,true,false,true
-30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,true,false,false,true
-30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false,true
-30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false
+30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3,false,true,false
+30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,true,false
+30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index c178d756..b60954ab 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-40001,202001,100,35,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false,true
-40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,true
-40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,true
-40001,202004,100,35,4911,R,0.637121844,1,73.71052632,3,0,3,false,true,false,true
-40002,202001,100,63,2095,R,1,1.060305409,128.0208333,0,4,4,true,false,false,true
-40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,true
-40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,true
-40002,202004,100,63,2115,R,0.637121844,1,73.71052632,3,0,3,false,true,false,true
-40003,202001,100,16,7863,R,1,1.060305409,128.0208333,0,4,4,true,false,false,true
-40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,true
-40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,true
-40003,202004,100,16,1377,R,0.637121844,1,73.71052632,3,0,3,false,true,false,true
-40004,202001,100,78,5131,R,1,1.060305409,128.0208333,0,4,4,true,false,false,true
-40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false,true
-40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false,
-40004,202004,100,78,6193.009741,FIR,0.637121844,1,73.71052632,3,0,3,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+40001,202001,100,35,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40001,202004,100,35,4911,R,0.637121844,1,73.71052632,3,0,3,false,true,false
+40002,202001,100,63,2095,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40002,202004,100,63,2115,R,0.637121844,1,73.71052632,3,0,3,false,true,false
+40003,202001,100,16,7863,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40003,202004,100,16,1377,R,0.637121844,1,73.71052632,3,0,3,false,true,false
+40004,202001,100,78,5131,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40004,202004,100,78,6193.009741,FIR,0.637121844,1,73.71052632,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index eb813c14..71fc0e73 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-50001,202010,100,59,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false,true
-50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,true
-50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,true
-50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,true
-50001,202102,100,59,4687,R,0.481224628,1,49.9122807,3,0,3,false,true,false,true
-50002,202010,100,36,4851,R,1,0.659160839,70.34328358,0,4,4,true,false,false,true
-50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,true
-50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,true
-50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,true
-50002,202102,100,36,2327,R,0.481224628,1,49.9122807,3,0,3,false,true,false,true
-50003,202010,100,76,2238,R,1,0.659160839,70.34328358,0,4,4,true,false,false,true
-50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,true
-50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,true
-50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,true
-50003,202102,100,76,1521,R,0.481224628,1,49.9122807,3,0,3,false,true,false,true
-50004,202010,100,30,688,R,1,0.659160839,70.34328358,0,4,4,true,false,false,true
-50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false,true
-50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false,
-50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false,
-50004,202102,100,30,1521.344411,FIR,0.481224628,1,49.9122807,3,0,3,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+50001,202010,100,59,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50001,202102,100,59,4687,R,0.481224628,1,49.9122807,3,0,3,false,true,false
+50002,202010,100,36,4851,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50002,202102,100,36,2327,R,0.481224628,1,49.9122807,3,0,3,false,true,false
+50003,202010,100,76,2238,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50003,202102,100,76,1521,R,0.481224628,1,49.9122807,3,0,3,false,true,false
+50004,202010,100,30,688,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50004,202102,100,30,1521.344411,FIR,0.481224628,1,49.9122807,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index ef97459b..d47bfb64 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-60001,202001,100,15,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false,true
-60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,true
-60001,202003,100,15,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false,true
-60002,202001,100,71,1588,R,1,1.408039237,117.9107143,0,3,3,true,false,false,true
-60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,true
-60002,202003,100,71,3807,R,1.194583644,1,100.913043,3,0,4,false,true,false,true
-60003,202001,100,26,6541,R,1,1.408039237,117.9107143,0,3,3,true,false,false,true
-60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,true
-60003,202003,100,26,6351,R,1.194583644,1,100.913043,3,0,4,false,true,false,true
-60004,202001,100,3,472.653159,BI,1,1.408039237,117.9107143,0,3,3,true,false,false,
-60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false,
-60004,202003,100,3,401,R,1.194583644,1,100.913043,3,0,4,false,true,false,true
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,15,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false
+60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60001,202003,100,15,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false
+60002,202001,100,71,1588,R,1,1.408039237,117.9107143,0,3,3,true,false,false
+60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60002,202003,100,71,3807,R,1.194583644,1,100.913043,3,0,4,false,true,false
+60003,202001,100,26,6541,R,1,1.408039237,117.9107143,0,3,3,true,false,false
+60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60003,202003,100,26,6351,R,1.194583644,1,100.913043,3,0,4,false,true,false
+60004,202001,100,3,472.653159,BI,1,1.408039237,117.9107143,0,3,3,true,false,false
+60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60004,202003,100,3,401,R,1.194583644,1,100.913043,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index e29d7584..8c3a3aab 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-70001,202001,100,39,5951,R,1,1.964796824,107.48,0,3,3,true,false,false,true
-70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,true
-70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,true
-70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,true
-70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,true
-70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,true
-70001,202007,100,39,49,R,0.913631634,1,70.24,3,0,3,false,true,false,true
-70002,202001,100,94,6705,R,1,1.964796824,107.48,0,3,3,true,false,false,true
-70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,true
-70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,true
-70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,true
-70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,true
-70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,true
-70002,202007,100,94,3475,R,0.913631634,1,70.24,3,0,3,false,true,false,true
-70003,202001,100,42,6153,R,1,1.964796824,107.48,0,3,3,true,false,false,true
-70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,true
-70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,true
-70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,true
-70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,true
-70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,true
-70003,202007,100,42,8768,R,0.913631634,1,70.24,3,0,3,false,true,false,true
-70004,202001,100,6,10286.222995,BI,1,1.964796824,107.48,0,3,3,true,false,false,
-70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false,
-70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false,true
-70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false,
-70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false,
-70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false,true
-70004,202007,100,6,5367.585848,FIR,0.913631634,1,70.24,3,0,3,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+70001,202001,100,39,5951,R,1,1.964796824,107.48,0,3,3,true,false,false
+70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70001,202007,100,39,49,R,0.913631634,1,70.24,3,0,3,false,true,false
+70002,202001,100,94,6705,R,1,1.964796824,107.48,0,3,3,true,false,false
+70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70002,202007,100,94,3475,R,0.913631634,1,70.24,3,0,3,false,true,false
+70003,202001,100,42,6153,R,1,1.964796824,107.48,0,3,3,true,false,false
+70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70003,202007,100,42,8768,R,0.913631634,1,70.24,3,0,3,false,true,false
+70004,202001,100,6,10286.222995,BI,1,1.964796824,107.48,0,3,3,true,false,false
+70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70004,202007,100,6,5367.585848,FIR,0.913631634,1,70.24,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
index 18e7d494..39912e13 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-80001,202001,100,91,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false,true
-80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,true
-80001,202003,100,91,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false,true
-80002,202001,100,85,7138,R,1,1.646151294,69.14982578,0,4,4,true,false,false,true
-80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,true
-80002,202003,100,85,2746,R,1.711844725,1,71.90940767,4,0,4,false,true,false,true
-80003,202001,100,41,2846,R,1,1.646151294,69.14982578,0,4,4,true,false,false,true
-80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,true
-80003,202003,100,41,9015,R,1.711844725,1,71.90940767,4,0,4,false,true,false,true
-80004,202001,100,70,5820,R,1,1.646151294,69.14982578,0,4,4,true,false,false,true
-80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false,true
-80004,202003,100,70,8233,R,1.711844725,1,71.90940767,4,0,4,false,true,false,true
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+80001,202001,100,91,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80001,202003,100,91,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+80002,202001,100,85,7138,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80002,202003,100,85,2746,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+80003,202001,100,41,2846,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80003,202003,100,41,9015,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+80004,202001,100,70,5820,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80004,202003,100,70,8233,R,1.711844725,1,71.90940767,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index d9cab5c9..1f6b4f10 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-90001,202001,100,66,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false,true
-90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,true
-90001,202003,100,66,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false,true
-90002,202001,100,27,1706,R,1,0.294381131,71.77777778,0,3,4,true,false,false,true
-90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,true
-90002,202003,100,27,8390,R,1.027612406,1,169.3831776,3,0,3,false,true,false,true
-90003,202001,100,14,1069,R,1,0.294381131,71.77777778,0,3,4,true,false,false,true
-90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false,true
-90003,202003,100,14,2415,R,1.027612406,1,169.3831776,3,0,3,false,true,false,true
-90004,202001,100,73,7728,R,1,0.294381131,71.77777778,0,3,4,true,false,false,true
-90004,202003,100,73,12364.971963,C,1.027612406,1,169.3831776,3,0,3,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+90001,202001,100,66,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
+90001,202003,100,66,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false
+90002,202001,100,27,1706,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
+90002,202003,100,27,8390,R,1.027612406,1,169.3831776,3,0,3,false,true,false
+90003,202001,100,14,1069,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
+90003,202003,100,14,2415,R,1.027612406,1,169.3831776,3,0,3,false,true,false
+90004,202001,100,73,7728,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90004,202003,100,73,12364.971963,C,1.027612406,1,169.3831776,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index ef34e66a..2a308b81 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-100001,202001,100,26,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false,true
-100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,true
-100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,true
-100001,202004,100,26,3540,R,3.027849407,1,119.1751412,3,0,4,false,true,false,true
-100002,202001,100,19,8084,R,1,1.046156805,179.3296703,0,3,3,true,false,false,true
-100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,true
-100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,true
-100002,202004,100,19,5608,R,3.027849407,1,119.1751412,3,0,4,false,true,false,true
-100003,202001,100,46,5161,R,1,1.046156805,179.3296703,0,3,3,true,false,false,true
-100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,true
-100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false,true
-100003,202004,100,46,2594,R,3.027849407,1,119.1751412,3,0,4,false,true,false,true
-100004,202001,100,86,15422.351648,C,1,1.046156805,179.3296703,0,3,3,true,false,false,
-100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false,
-100004,202004,100,86,9352,R,3.027849407,1,119.1751412,3,0,4,false,true,false,true
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+100001,202001,100,26,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false
+100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
+100001,202004,100,26,3540,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+100002,202001,100,19,8084,R,1,1.046156805,179.3296703,0,3,3,true,false,false
+100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
+100002,202004,100,19,5608,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+100003,202001,100,46,5161,R,1,1.046156805,179.3296703,0,3,3,true,false,false
+100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
+100003,202004,100,46,2594,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+100004,202001,100,86,15422.351648,C,1,1.046156805,179.3296703,0,3,3,true,false,false
+100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100004,202004,100,86,9352,R,3.027849407,1,119.1751412,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 15d8803a..7229f4fa 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-110001,202001,100,89,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false,true
-110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,true
-110001,202003,100,89,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false,true
-110002,202001,100,83,4826,R,1,1.357646062,101.710317,0,4,4,true,false,false,true
-110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,true
-110002,202003,100,83,4743,R,0.780928323,1,70.26136364,3,0,3,false,true,false,true
-110003,202001,100,4,7586,R,1,1.357646062,101.710317,0,4,4,true,false,false,true
-110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,true
-110003,202003,100,4,1429,R,0.780928323,1,70.26136364,3,0,3,false,true,false,true
-110004,202001,100,76,3975,R,1,1.357646062,101.710317,0,4,4,true,false,false,true
-110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false,true
-110004,202003,100,76,2377.145816,FIR,0.780928323,1,70.26136364,3,0,3,false,true,false,
-110005,202001,200,27,5217,R,1,1.016800862,182.25,0,3,3,true,false,false,true
-110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,true
-110005,202003,200,27,9940,R,1.212689221,1,182.2366412,4,0,4,false,true,false,true
-110006,202001,200,42,5325,R,1,1.016800862,182.25,0,3,3,true,false,false,true
-110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,true
-110006,202003,200,42,6685,R,1.212689221,1,182.2366412,4,0,4,false,true,false,true
-110007,202001,200,19,5496,R,1,1.016800862,182.25,0,3,3,true,false,false,true
-110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,true
-110007,202003,200,19,1235,R,1.212689221,1,182.2366412,4,0,4,false,true,false,true
-110008,202001,200,43,3978.741774,BI,1,1.016800862,182.25,0,3,3,true,false,false,
-110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false,true
-110008,202003,200,43,6013,R,1.212689221,1,182.2366412,4,0,4,false,true,false,true
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110001,202003,100,89,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false
+110002,202001,100,83,4826,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110002,202003,100,83,4743,R,0.780928323,1,70.26136364,3,0,3,false,true,false
+110003,202001,100,4,7586,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110003,202003,100,4,1429,R,0.780928323,1,70.26136364,3,0,3,false,true,false
+110004,202001,100,76,3975,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110004,202003,100,76,2377.145816,FIR,0.780928323,1,70.26136364,3,0,3,false,true,false
+110005,202001,200,27,5217,R,1,1.016800862,182.25,0,3,3,true,false,false
+110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110005,202003,200,27,9940,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+110006,202001,200,42,5325,R,1,1.016800862,182.25,0,3,3,true,false,false
+110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110006,202003,200,42,6685,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+110007,202001,200,19,5496,R,1,1.016800862,182.25,0,3,3,true,false,false
+110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110007,202003,200,19,1235,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+110008,202001,200,43,3978.741774,BI,1,1.016800862,182.25,0,3,3,true,false,false
+110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110008,202003,200,43,6013,R,1.212689221,1,182.2366412,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 1b4c90ce..142c8ded 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-120001,202001,100,50,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false,true
-120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,true
-120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,true
-120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,true
-120001,202005,100,50,1316,R,0.53449544,1,32.73423423,3,0,3,false,true,false,true
-120002,202001,100,78,7410,R,1,1.268552019,77.38738739,0,3,3,true,false,false,true
-120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,true
-120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,true
-120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,true
-120002,202005,100,78,1535,R,0.53449544,1,32.73423423,3,0,3,false,true,false,true
-120003,202001,100,94,4530,R,1,1.268552019,77.38738739,0,3,3,true,false,false,true
-120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,true
-120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,true
-120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,true
-120003,202005,100,94,4416,R,0.53449544,1,32.73423423,3,0,3,false,true,false,true
-120004,202001,100,100,7738.738739,C,1,1.268552019,77.38738739,0,3,3,true,false,false,
-120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false,
-120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false,
-120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false,
-120004,202005,100,100,3273.423424,FIC,0.53449544,1,32.73423423,3,0,3,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+120001,202001,100,50,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false
+120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120001,202005,100,50,1316,R,0.53449544,1,32.73423423,3,0,3,false,true,false
+120002,202001,100,78,7410,R,1,1.268552019,77.38738739,0,3,3,true,false,false
+120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120002,202005,100,78,1535,R,0.53449544,1,32.73423423,3,0,3,false,true,false
+120003,202001,100,94,4530,R,1,1.268552019,77.38738739,0,3,3,true,false,false
+120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120003,202005,100,94,4416,R,0.53449544,1,32.73423423,3,0,3,false,true,false
+120004,202001,100,100,7738.738739,C,1,1.268552019,77.38738739,0,3,3,true,false,false
+120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120004,202005,100,100,3273.423424,FIC,0.53449544,1,32.73423423,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index aed6a1d0..cad00886 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-130001,202001,100,20,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false,true
-130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,true
-130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,true
-130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,true
-130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,true
-130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,true
-130001,202007,100,20,3282,R,0.798832987,1,158.7757576,3,0,4,false,true,false,true
-130002,202001,100,69,687,R,1,0.6743401,102.7515152,0,3,4,true,false,false,true
-130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,true
-130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,true
-130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,true
-130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,true
-130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,true
-130002,202007,100,69,9834,R,0.798832987,1,158.7757576,3,0,4,false,true,false,true
-130003,202001,100,39,7113,R,1,0.6743401,102.7515152,0,3,4,true,false,false,true
-130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,true
-130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,true
-130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false,true
-130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,true
-130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,true
-130003,202007,100,39,6461,R,0.798832987,1,158.7757576,3,0,4,false,true,false,true
-130004,202001,100,37,2571,R,1,0.6743401,102.7515152,0,3,4,true,false,false,true
-130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false,
-130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false,
-130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false,
-130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false,
-130004,202007,100,37,6621,R,0.798832987,1,158.7757576,3,0,4,false,true,false,true
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+130001,202001,100,20,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
+130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130001,202007,100,20,3282,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+130002,202001,100,69,687,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
+130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130002,202007,100,69,9834,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+130003,202001,100,39,7113,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
+130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130003,202007,100,39,6461,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+130004,202001,100,37,2571,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130004,202007,100,37,6621,R,0.798832987,1,158.7757576,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index ed6e69a3..c4fffd80 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
-140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
-140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
-140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
-140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
-140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
-140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
-140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
-140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
-140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
-140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
-140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
-140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
-140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
-140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
-140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
-140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
-140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
-140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
-140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
-140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
-140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
-140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
-140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false
+140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
+140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false
+140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
+140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false
+140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
+140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false
+140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index b22597ca..d05857f5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
-150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
-150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
-150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
-150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
-150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
-150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
-150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
-150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
-150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
-150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
-150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
-150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
-150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
-150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
-150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,
-150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
-150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
-150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false
+150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
+150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false
+150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false
+150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
+150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false
+150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false
+150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
+150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false
+150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false
+150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 66b55da6..e5d1b61a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-160001,202001,100,76,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false,true
-160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,true
-160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,true
-160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,true
-160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,true
-160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,true
-160001,202007,100,76,1666,R,0.819547983,1,71.77202073,3,0,3,false,true,false,true
-160002,202001,100,32,430,R,1,0.285048351,29.78238342,0,3,3,true,false,false,true
-160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,true
-160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,true
-160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,true
-160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,true
-160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,true
-160002,202007,100,32,2678,R,0.819547983,1,71.77202073,3,0,3,false,true,false,true
-160003,202001,100,85,3232,R,1,0.285048351,29.78238342,0,3,3,true,false,false,true
-160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,true
-160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,true
-160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false,true
-160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,true
-160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,true
-160003,202007,100,85,9508,R,0.819547983,1,71.77202073,3,0,3,false,true,false,true
-160004,202001,100,33,1022.611409,BI,1,0.285048351,29.78238342,0,3,3,true,false,false,
-160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false,
-160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false,true
-160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false,
-160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false,
-160004,202007,100,33,2368.476683,FIC,0.819547983,1,71.77202073,3,0,3,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false
+160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
+160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160001,202007,100,76,1666,R,0.819547983,1,71.77202073,3,0,3,false,true,false
+160002,202001,100,32,430,R,1,0.285048351,29.78238342,0,3,3,true,false,false
+160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
+160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160002,202007,100,32,2678,R,0.819547983,1,71.77202073,3,0,3,false,true,false
+160003,202001,100,85,3232,R,1,0.285048351,29.78238342,0,3,3,true,false,false
+160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
+160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160003,202007,100,85,9508,R,0.819547983,1,71.77202073,3,0,3,false,true,false
+160004,202001,100,33,1022.611409,BI,1,0.285048351,29.78238342,0,3,3,true,false,false
+160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160004,202007,100,33,2368.476683,FIC,0.819547983,1,71.77202073,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index a23ce5a3..5fe2932e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-170001,202001,100,69,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false,true
-170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,true
-170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,true
-170001,202004,100,69,7120,R,1.231814548,1,109.0330189,3,0,3,false,true,false,true
-170002,202001,100,62,449,R,1,0.41470355,41.93396226,0,3,3,true,false,false,true
-170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,true
-170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,true
-170002,202004,100,62,6745,R,1.231814548,1,109.0330189,3,0,3,false,true,false,true
-170003,202001,100,81,1961,R,1,0.41470355,41.93396226,0,3,3,true,false,false,true
-170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,true
-170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,true
-170003,202004,100,81,9250,R,1.231814548,1,109.0330189,3,0,3,false,true,false,true
-170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false,true
-170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+170001,202001,100,69,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false
+170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+170001,202004,100,69,7120,R,1.231814548,1,109.0330189,3,0,3,false,true,false
+170002,202001,100,62,449,R,1,0.41470355,41.93396226,0,3,3,true,false,false
+170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+170002,202004,100,62,6745,R,1.231814548,1,109.0330189,3,0,3,false,true,false
+170003,202001,100,81,1961,R,1,0.41470355,41.93396226,0,3,3,true,false,false
+170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+170003,202004,100,81,9250,R,1.231814548,1,109.0330189,3,0,3,false,true,false
+170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 27252732..e0438275 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-180001,202001,100,91,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false,true
-180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,true
-180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,true
-180001,202004,100,91,9291,R,1.709926945,1,175.5441176,3,0,3,false,true,false,true
-180002,202001,100,26,3829,R,1,0.743721487,123.4632353,0,3,3,true,false,false,true
-180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,true
-180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,true
-180002,202004,100,26,8415,R,1.709926945,1,175.5441176,3,0,3,false,true,false,true
-180003,202001,100,19,3774,R,1,0.743721487,123.4632353,0,3,3,true,false,false,true
-180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,true
-180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,true
-180003,202004,100,19,6168,R,1.709926945,1,175.5441176,3,0,3,false,true,false,true
-180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false,
-180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false,true
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+180001,202001,100,91,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false
+180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+180001,202004,100,91,9291,R,1.709926945,1,175.5441176,3,0,3,false,true,false
+180002,202001,100,26,3829,R,1,0.743721487,123.4632353,0,3,3,true,false,false
+180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+180002,202004,100,26,8415,R,1.709926945,1,175.5441176,3,0,3,false,true,false
+180003,202001,100,19,3774,R,1,0.743721487,123.4632353,0,3,3,true,false,false
+180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+180003,202004,100,19,6168,R,1.709926945,1,175.5441176,3,0,3,false,true,false
+180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
index 22bf9d67..69a45692 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
-190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
-190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
-190001,202004,100,95,1.113,1,110.5473,4350,R,0,0,0,false,true,false
-190002,202001,100,17,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
-190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
-190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
-190002,202004,100,17,1.113,1,110.5473,700,R,0,0,0,false,true,false
-190003,202001,100,64,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
-190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
-190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
-190003,202004,100,64,1.113,1,110.5473,4077,R,0,0,0,false,true,false
-190004,202001,100,51,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
-190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
-190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
-190004,202004,100,51,1.113,1,110.5473,8608,R,0,0,0,false,true,false
-190005,202001,100,34,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
-190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
-190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
-190005,202004,100,34,1.113,1,110.5473,5134,R,0,0,0,false,true,false
-190006,202001,100,8,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
-190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
-190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
-190006,202004,100,8,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index 68759eec..6ef80126 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
-200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,
-200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
-200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
-200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
-200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
-200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,
-200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
-200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
-200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
-200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
-200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
-200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
-200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false
+200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false
+200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false
+200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false
+200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false
+200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false
+200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false
+200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false
+200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false
+200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false
+200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false
+200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 173b3432..06c408bb 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-10001,202001,1,10,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false,true
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
-10002,202001,1,50,1,0.992513369,13.17948717,381,R,0,2,3,true,false,false,true
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true
-10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false,true
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true
-10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false,true
-10005,202001,1,18,1,0.992513369,13.17948717,100,R,0,2,3,true,false,false,true
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,
-10005,202003,2,18,1.173184358,1,50,900.0000004,FIC,2,0,2,false,true,false,
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,13.17948717,381,R,0,2,3,true,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false
+10005,202001,1,18,1,0.992513369,13.17948717,100,R,0,2,3,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false
+10005,202003,2,18,1.173184358,1,50,900.0000004,FIC,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 6e60af62..cb4a0209 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,true
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true
-10003,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false,true
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true
-10004,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false,true
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,
-10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false,true
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false
+10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 3ef2c046..e5653547 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,true
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true
-10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false,true
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true
-10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false,true
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false,
-10005,202003,2,18,1.173184358,1,50,900,FIC,2,0,2,false,true,false,
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false
+10005,202003,2,18,1.173184358,1,50,900,FIC,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 9e8bfa9b..6b5489da 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,true
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
-10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false,true
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true
-10003,202003,2,12,1.173184358,1,30.76923077,314,R,2,0,3,false,true,false,true
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true
-10004,202003,2,9,1.173184358,1,30.76923077,736,R,2,0,3,false,true,false,true
-10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false,true
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false,
-10005,202003,2,18,1.173184358,1,30.76923077,150,R,2,0,3,false,true,false,true
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,12,1.173184358,1,30.76923077,314,R,2,0,3,false,true,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,9,1.173184358,1,30.76923077,736,R,2,0,3,false,true,false
+10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false
+10005,202003,2,18,1.173184358,1,30.76923077,150,R,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 08fc1f43..5cc9e504 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false,true
-10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false,true
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
-10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false,true
-10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2,false,false,false,true
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
-10003,202002,2,12,0.590369393,0.934108527131783,30.8974359,267,R,2,3,3,false,false,false,true
-10003,202003,2,12,1.070539419,1,33.07692308,314,R,3,0,3,false,true,false,true
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
-10004,202002,2,9,0.590369393,0.934108527131783,30.8974359,628,R,2,3,3,false,false,false,true
-10004,202003,2,9,1.070539419,1,33.07692308,736,R,3,0,3,false,true,false,true
-10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false,true
-10005,202002,2,18,0.590369393,0.934108527131783,30.8974359,310,R,2,3,3,false,false,false,true
-10005,202003,2,18,1.070539419,1,33.07692308,240,R,3,0,3,false,true,false,true
-10006,202001,1,22,1,0.992513369,13.17948718,289.948718,C,0,2,3,true,false,false,
-10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false,
-10006,202003,1,22,1.186096257,1,18.48333333,346.5012157,FIC,2,0,2,false,true,false,
-10007,202001,2,52,1,1.693854749,72.19047619,3753.904762,C,0,2,2,true,false,false,
-10007,202002,2,52,0.590369393,0.934108527131783,30.8974359,2216.190476,FIC,2,3,3,false,false,false,
-10007,202003,2,52,1.070539419,1,33.07692308,2372.519265,FIC,3,0,3,false,true,false,
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false
+10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false
+10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,12,0.590369393,0.934108527131783,30.8974359,267,R,2,3,3,false,false,false
+10003,202003,2,12,1.070539419,1,33.07692308,314,R,3,0,3,false,true,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,9,0.590369393,0.934108527131783,30.8974359,628,R,2,3,3,false,false,false
+10004,202003,2,9,1.070539419,1,33.07692308,736,R,3,0,3,false,true,false
+10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false
+10005,202002,2,18,0.590369393,0.934108527131783,30.8974359,310,R,2,3,3,false,false,false
+10005,202003,2,18,1.070539419,1,33.07692308,240,R,3,0,3,false,true,false
+10006,202001,1,22,1,0.992513369,13.17948718,289.948718,C,0,2,3,true,false,false
+10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false
+10006,202003,1,22,1.186096257,1,18.48333333,346.5012157,FIC,2,0,2,false,true,false
+10007,202001,2,52,1,1.693854749,72.19047619,3753.904762,C,0,2,2,true,false,false
+10007,202002,2,52,0.590369393,0.934108527131783,30.8974359,2216.190476,FIC,2,3,3,false,false,false
+10007,202003,2,52,1.070539419,1,33.07692308,2372.519265,FIC,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
index 814d0330..c676f335 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
-50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
-50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true,
-50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,true,false,false,true
-50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,true,false,true
-50002,202001,100,36,4851,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
-50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
-50002,202003,100,36,8894,FIR,1,1,1,0,0,0,true,true,true,
-50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,true,false,false,true
-50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,true,false,true
-50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
-50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
-50003,202003,100,76,769,FIR,1,1,1,0,0,0,true,true,true,
-50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,true,false,false,true
-50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,true,false,true
-50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
-50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
-50004,202003,100,30,3245,FIR,1,1,1,0,0,0,true,true,true,
-50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,true,false,false,
-50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,true,false,
-50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,true,false,false,true
-50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,true,false,true
-50005,202003,100,85,130000,FIR,1,1,1,0,0,0,true,true,true,
-50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,true,false,false,true
-50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,true,false,true
-50006,202001,100,71,40747.793706,C,1,1.083783427,573.9125874,0,5,5,true,false,false,
-50006,202002,100,71,37597.727272,FIC,0.922693571,1,529.5454545,5,0,5,false,true,false,
-50006,202003,100,71,37597.727272,FIC,1,1,1,0,0,0,true,true,true,
-50006,202004,100,71,37597.727272,FIC,1,1.161985911,538.03125,0,4,4,true,false,false,
-50006,202005,100,71,32356.439872,FIC,0.860595632,1,463.0273438,4,0,4,false,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true
+50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50002,202001,100,36,4851,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50002,202003,100,36,8894,FIR,1,1,1,0,0,0,true,true,true
+50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50003,202003,100,76,769,FIR,1,1,1,0,0,0,true,true,true
+50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50004,202003,100,30,3245,FIR,1,1,1,0,0,0,true,true,true
+50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,true,false,false
+50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,true,false
+50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50005,202003,100,85,130000,FIR,1,1,1,0,0,0,true,true,true
+50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50006,202001,100,71,40747.793706,C,1,1.083783427,573.9125874,0,5,5,true,false,false
+50006,202002,100,71,37597.727272,FIC,0.922693571,1,529.5454545,5,0,5,false,true,false
+50006,202003,100,71,37597.727272,FIC,1,1,1,0,0,0,true,true,true
+50006,202004,100,71,37597.727272,FIC,1,1.161985911,538.03125,0,4,4,true,false,false
+50006,202005,100,71,32356.439872,FIC,0.860595632,1,463.0273438,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
index 71b6c7e6..9752700f 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,true
-1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,true
-1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,
-1,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false,
-2,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,true
-2,202002,1,1,20,R,2,1,20,2,1,2,false,true,false,true
-2,202003,1,1,0,R,0,0,10,1,1,2,false,false,false,true
-2,202004,1,1,30,R,1,1,30,1,0,1,true,true,false,true
-3,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,true
-3,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false,
-3,202003,1,1,20,R,0,0,10,1,1,2,false,false,false,true
-3,202004,1,1,20,FIR,1,1,30,1,0,1,true,true,false,
-4,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false,true
-4,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false,
-4,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false,
-4,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false,
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
+1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false
+1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false
+1,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false
+2,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
+2,202002,1,1,20,R,2,1,20,2,1,2,false,true,false
+2,202003,1,1,0,R,0,0,10,1,1,2,false,false,false
+2,202004,1,1,30,R,1,1,30,1,0,1,true,true,false
+3,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
+3,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false
+3,202003,1,1,20,R,0,0,10,1,1,2,false,false,false
+3,202004,1,1,20,FIR,1,1,30,1,0,1,true,true,false
+4,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
+4,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false
+4,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false
+4,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
index 261ec7a3..ad46ad72 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,true
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true
-10001,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true
-10001,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true
-10001,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false,true
-10002,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true
-10002,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true
-10002,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false,true
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,
-10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false,true
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10001,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10001,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10001,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false
+10002,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10002,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10002,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false
+10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false

From de3e7ed07b6e9cf4590376a7069cbbcff1342515 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 17:12:11 +0100
Subject: [PATCH 306/531] Clean up and remove other extranious columns

---
 .../methodology_scenarios/01_C_output.csv     |  10 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  18 +-
 .../03_R_R_FI_output.csv                      |  26 +-
 .../04_R_R_FI_FI_output.csv                   |  34 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  42 +--
 .../06_BI_BI_R_output.csv                     |  26 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  58 ++--
 .../methodology_scenarios/08_R_R_R_output.csv |  26 +-
 .../09_R_NS_C_output.csv                      |  24 +-
 .../10_C_FI_NS_R_output.csv                   |  32 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  50 +--
 .../12_C_FI_FI_FI_FI_output.csv               |  42 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  56 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  56 ++--
 .../17_NS_R_FI_NS_output.csv                  |  30 +-
 .../18_NS_BI_R_NS_output.csv                  |  30 +-
 .../20_mixed_data_output.csv                  |  96 +++---
 .../21_class_change_R_C_FI_output.csv         |  32 +-
 .../22_class_change_C_BI_R_output.csv         |  32 +-
 .../23_class_change_C_C_FI_output.csv         |  32 +-
 .../24_class_change_R_BI_R_output.csv         |  32 +-
 .../25_class_change_C_FI_FI_output.csv        |  44 +--
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  44 +--
 .../32_C_FI_FI_no_response_output.csv         |  32 +-
 .../34_default_link_output.csv                |  42 +--
 .../35_TB_10_R_R_FI_output.csv                |  74 ++---
 .../36_TB_10_BI_BI_R_output.csv               |  74 ++---
 .../37_TB_10_C_FI_FI_output.csv               |  74 ++---
 .../38_T_10_R_R_FI_output.csv                 |  74 ++---
 .../39_B_10_R_R_FI_output.csv                 |  74 ++---
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  62 ++--
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 146 ++++-----
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 128 ++++----
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 128 ++++----
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |  70 ++---
 .../methodology_scenarios/47_TB_50_output.csv |  74 ++---
 ...BI_R_R_50_weight_previous_month_output.csv |  50 +--
 .../50_R_R_FI_50_weight_output.csv            |  50 +--
 .../51_R_R_FI_80_weight_output.csv            |  50 +--
 .../52_BI_BI_R_50_weight_output.csv           |  50 +--
 .../53_C_FI_FI_50_weight_output.csv           |  50 +--
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  98 +++---
 .../55_R_R_FI_50_weight_default_output.csv    |  50 +--
 .../56_BI_BI_R_50_weight_default_output.csv   |  50 +--
 .../57_C_FI_FI_50_weight_default_output.csv   |  50 +--
 ...I_R_R_50_weight_partial_default_output.csv |  98 +++---
 .../59_class_change_50_weight_output.csv      |  62 ++--
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv | 114 +++----
 .../62_mixed_data_50_weight_output.csv        |  86 +++---
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 290 +++++++++---------
 .../64_TB_10_C_FI_FI_50_weight_output.csv     | 146 ++++-----
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv |  70 ++---
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv |  70 ++---
 .../methodology_scenarios/01_C_output.csv     |  10 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  18 +-
 .../03_R_R_FI_output.csv                      |  26 +-
 .../04_R_R_FI_FI_output.csv                   |  34 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  42 +--
 .../06_BI_BI_R_output.csv                     |  26 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  58 ++--
 .../methodology_scenarios/08_R_R_R_output.csv |  26 +-
 .../09_R_NS_C_output.csv                      |  24 +-
 .../10_C_FI_NS_R_output.csv                   |  32 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  50 +--
 .../12_C_FI_FI_FI_FI_output.csv               |  42 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  56 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  56 ++--
 .../17_NS_R_FI_NS_output.csv                  |  30 +-
 .../18_NS_BI_R_NS_output.csv                  |  30 +-
 .../20_mixed_data_output.csv                  |  96 +++---
 .../21_class_change_R_C_FI_output.csv         |  32 +-
 .../22_class_change_C_BI_R_output.csv         |  32 +-
 .../23_class_change_C_C_FI_output.csv         |  32 +-
 .../24_class_change_R_BI_R_output.csv         |  32 +-
 .../25_class_change_C_FI_FI_output.csv        |  44 +--
 .../31_no_response_output.csv                 |  62 ++--
 .../32_divide_by_zero_output.csv              |  34 +-
 .../33_multi_variable_C_BI_R_output.csv       |  32 +-
 82 files changed, 2269 insertions(+), 2269 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index 16b5f0b8..b46f3d86 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,,,true,true,false
-10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,,,true,true,false
-10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,,,true,true,false
-10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,true,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,true,false
+10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,true,false
+10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,true,false
+10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 52e4bc0f..596cabe6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
-20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
-20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
-20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
-20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
-20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
-20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,,,true,false,false
-20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,false,false
+20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,false,true,false
+20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,false,false
+20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,false,true,false
+20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,true,false,false
+20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,false,true,false
+20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,true,false,false
+20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 2c459ebb..50e58056 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,,true,true,false,false
-30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
-30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,,false,true,false
-30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,,true,true,false,false
-30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
-30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,true,,false,true,false
-30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,,true,true,false,false
-30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
-30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,true,,false,true,false
-30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,,true,true,false,false
-30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,true,,false,false,false
-30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,false,false
+30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,false,true,false
+30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,true,false,false
+30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,false,true,false
+30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,true,false,false
+30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,false,true,false
+30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,true,false,false
+30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index 88b0824d..b550328e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
-40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
-40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
-40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
-40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
-40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
-40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
-40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
-40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
-40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
-40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
-40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
-40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
-40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,true,,false,false,false
-40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,,,false,false,false
-40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,false,false
+40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,false,true,false
+40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,true,false,false
+40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,false,true,false
+40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,true,false,false
+40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,false,true,false
+40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,true,false,false
+40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 579ce8a1..aad1ac09 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
-50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
-50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
-50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
-50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
-50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
-50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
-50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
-50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
-50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
-50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
-50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
-50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
-50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
-50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
-50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
-50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,true,,false,false,false
-50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,false,false,false
-50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,false,false,false
-50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,false,false
+50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,false,true,false
+50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,true,false,false
+50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,false,true,false
+50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,true,false,false
+50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,false,true,false
+50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,true,false,false
+50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index 39c94b90..5571fa51 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
-60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
-60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
-60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
-60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
-60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
-60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
-60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
-60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
-60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,,,true,false,false
-60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,,,false,false,false
-60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,false,false
+60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,false,true,false
+60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,true,false,false
+60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,false,true,false
+60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,true,false,false
+60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,false,true,false
+60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,true,false,false
+60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 7516338f..acec7fe8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,,true,true,false,false
-70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
-70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
-70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
-70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
-70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
-70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,true,,false,true,false
-70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,,true,true,false,false
-70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
-70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
-70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
-70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
-70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
-70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,true,,false,true,false
-70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,,true,true,false,false
-70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
-70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
-70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
-70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
-70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
-70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,true,,false,true,false
-70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,,,true,false,false
-70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,,,false,false,false
-70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,,,false,false,false
-70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,,,false,false,false
-70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,,,false,false,false
-70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,,,false,false,false
-70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,false,false
+70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,false,true,false
+70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,true,false,false
+70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,false,true,false
+70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,true,false,false
+70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,false,true,false
+70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,true,false,false
+70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index 09ac6c6d..b1d4610f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
-80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
-80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
-80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
-80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
-80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
-80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
-80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
-80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
-80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
-80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
-80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,false,false
+80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,false,true,false
+80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,true,false,false
+80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,false,true,false
+80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,true,false,false
+80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,false,true,false
+80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,true,false,false
+80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 94269506..6f5673fb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
-90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
-90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
-90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
-90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
-90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
-90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
-90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
-90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
-90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,,,true,false,false
-90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,false,false
+90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
+90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,false,true,false
+90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,true,false,false
+90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
+90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,false,true,false
+90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,true,false,false
+90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
+90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,false,true,false
+90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,true,false,false
+90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index d09c24c0..9a716bbe 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
-100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
-100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
-100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
-100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
-100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
-100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
-100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
-100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
-100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
-100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
-100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
-100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,,,true,false,false
-100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,,,false,false,false
-100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,false,false
+100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
+100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,false,true,false
+100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,true,false,false
+100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
+100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,false,true,false
+100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,true,false,false
+100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
+100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,false,true,false
+100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,true,false,false
+100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index fbfe7ef1..f4918ae6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,,true,true,false,false
-110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
-110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
-110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,,true,true,false,false
-110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
-110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
-110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,,true,true,false,false
-110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
-110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
-110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,,true,true,false,false
-110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,true,,false,false,false
-110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,,,false,true,false
-110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,,true,true,false,false
-110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
-110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
-110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,,true,true,false,false
-110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
-110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
-110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,,true,true,false,false
-110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
-110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
-110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,,,true,false,false
-110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,,true,false,false,false
-110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,false,false
+110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,true,false,false
+110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,true,false,false
+110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,true,false,false
+110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,true,false,false
+110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,false,true,false
+110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,true,false,false
+110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,false,true,false
+110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,true,false,false
+110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,false,true,false
+110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,true,false,false
+110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index ca898661..72834ed2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
-120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
-120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
-120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
-120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
-120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
-120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
-120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
-120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
-120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
-120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
-120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
-120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
-120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
-120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
-120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,,,true,false,false
-120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,,,false,false,false
-120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,,,false,false,false
-120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,,,false,false,false
-120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,false,false
+120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,false,true,false
+120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,true,false,false
+120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,false,true,false
+120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,true,false,false
+120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,false,true,false
+120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,true,false,false
+120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index c4c95a60..2d0c0639 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
-130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
-130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
-130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
-130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
-130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
-130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
-130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
-130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
-130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
-130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
-130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
-130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
-130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
-130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
-130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
-130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
-130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
-130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
-130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
-130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
-130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,,,true,false,false
-130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,,,false,false,false
-130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,,,false,false,false
-130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,,,false,false,false
-130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,,,false,false,false
-130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,false,false
+130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
+130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,false,true,false
+130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,true,false,false
+130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
+130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,false,true,false
+130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,true,false,false
+130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
+130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,false,true,false
+130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,true,false,false
+130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 0de8c87f..85b42e81 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
-140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
-140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
-140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
-140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
-140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
-140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
-140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
-140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
-140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
-140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
-140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
-140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
-140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
-140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
-140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
-140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
-140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
-140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
-140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
-140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
-140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,,,true,false,false
-140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,,,false,false,false
-140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,,,false,false,false
-140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,,,false,false,false
-140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,,,false,false,false
-140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,false,false
+140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
+140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,false,true,false
+140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,true,false,false
+140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
+140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,false,true,false
+140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,true,false,false
+140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
+140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,false,true,false
+140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,true,false,false
+140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index f6ec0754..6db51ee1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
-150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
-150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
-150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
-150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
-150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
-150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
-150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
-150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
-150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
-150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
-150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
-150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
-150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
-150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
-150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
-150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
-150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
-150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
-150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
-150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
-150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,,,true,false,false
-150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,false,false,false
-150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,,,false,false,false
-150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,,,false,false,false
-150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,,,false,false,false
-150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,false,false
+150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
+150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,false,true,false
+150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,true,false,false
+150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
+150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,false,true,false
+150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,true,false,false
+150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
+150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,false,true,false
+150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,true,false,false
+150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 40eefc8a..898de9e1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
-160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,,,true,false,false
-160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,,,false,false,false
-160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,,,false,false,false
-160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,,,false,false,false
-160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,,,false,false,false
-160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,false,true,false
+160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,true,false,false
+160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 7963caa2..c9376319 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
-170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
-170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
-170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
-170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
-170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
-170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
-170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
-170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
-170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
-170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
-170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
-170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,,,false,false,false
-170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,,,false,false,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,false,false
+170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,false,true,false
+170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,true,false,false
+170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,false,true,false
+170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,true,false,false
+170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,false,true,false
+170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 889cc8bf..4d2792e5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
-180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
-180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
-180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
-180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
-180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
-180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
-180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
-180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
-180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
-180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
-180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
-180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,,,false,false,false
-180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,,,false,false,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,false,false
+180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,false,true,false
+180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,true,false,false
+180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,false,true,false
+180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,true,false,false
+180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,false,true,false
+180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index 08be556c..f4125f92 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
-200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
-200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
-200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
-200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
-200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
-200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
-200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
-200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
-200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
-200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
-200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
-200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
-200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,true,,false,false,false
-200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,,,false,false,false
-200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,,,false,true,false
-200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,,,true,false,false
-200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,false,false,false
-200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,false,false,false
-200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,,,false,true,false
-200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,,,true,false,false
-200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,,,false,false,false
-200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,,true,false,false,false
-200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
-200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
-200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
-200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
-200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
-200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
-200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
-200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
-200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
-200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
-200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
-200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
-200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
-200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
-200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,,true,false,false,false
-200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,true,,false,false,false
-200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
-200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
-200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,,,false,false,false
-200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
-200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
-200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,,,false,false,false
-200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,,,false,false,false
-200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,false,false
+200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,true,false,false
+200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,true,false,false
+200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,true,false,false
+200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,true,false,false
+200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,true,false,false
+200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,true,false,false
+200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,true,false,false
+200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,true,false,false
+200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,true,false,false
+200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,true,false,false
+200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,true,false,false
+200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 67b8c9eb..bb7a557d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,,false,true,false
-210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,,false,true,false
-210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
-210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
-210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
+210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
+210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,false,true,false
+210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,false,true,false
+210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 9c116a23..3e9171b7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
-220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
-220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,true,,false,true,false
-220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,true,,false,true,false
-220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,true,false,false
-220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
-220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,false,false
+220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,false,false
+220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,false,true,false
+220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,false,true,false
+220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,true,false,false
+220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 5e3b325a..1e9d4baa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
-230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
-230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,,false,true,false
-230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,,false,true,false
-230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,true,false,false
-230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
-230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,false,false
+230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,false,false
+230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,false,true,false
+230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,false,true,false
+230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,true,false,false
+230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index a5242247..27285e21 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,true,,false,true,false
-240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,true,,false,true,false
-240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
-240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
-240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
+240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
+240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,false,true,false
+240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,false,true,false
+240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index fe7ea411..54f49f94 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,true,true,false,false,false
-250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
-250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,true,true,false,false,false
-250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
-250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
-250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,,true,false,false,false
-250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
-250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
-250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,,,false,false,false
-250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,,,false,true,false
-250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,,,true,false,false
-250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,,,false,false,false
-250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
+250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
+250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,false,true,false
+250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,false,true,false
+250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,false,true,false
+250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,false,true,false
+250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,true,false,false
+250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index 1e6cbe1c..53d7fd04 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,,,true,true,false
-110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,,,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,,,true,true,false
-110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,,,true,true,false
-110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,,,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,,,true,true,false
-110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,,,true,true,false
-110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,,,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,,,true,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,false,true,false
+110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,true,true,false
+110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,true,true,false
+110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,true,true,false
+110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,true,true,false
+110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,true,true,false
+110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index 4845af83..c96a4f46 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,,1,1,1,27,C,0,0,0,,,true,true,true
-110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,,,true,true,true
-110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,,,true,true,true
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,false,true,false
+110005,202001,200,27,,,1,1,1,27,C,0,0,0,true,true,true
+110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,true,true,true
+110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index 6e1dc4ca..8145b9cb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,,true,true,false,true
-120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,true,true,false,false,true
-120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,true,true,false,false,true
-120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,true,true,false,false,true
-120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,true,,false,true,true
-120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,,true,true,false,true
-120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,true,true,false,false,true
-120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,true,true,false,false,true
-120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,true,true,false,false,true
-120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,true,,false,true,true
-120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,,true,true,false,true
-120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,true,true,false,false,true
-120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,true,true,false,false,true
-120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,true,true,false,false,true
-120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,true,,false,true,true
-120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,,,true,false,true
-120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,,,false,false,true
-120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,,,false,false,true
-120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,,,false,false,true
-120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,,,false,true,true
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,false,true
+120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,false,false,true
+120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,false,false,true
+120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,false,false,true
+120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,false,true,true
+120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,true,false,true
+120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,false,false,true
+120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,false,false,true
+120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,false,false,true
+120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,false,true,true
+120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,true,false,true
+120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,false,false,true
+120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,false,false,true
+120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,false,false,true
+120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,false,true,true
+120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,true,false,true
+120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,false,false,true
+120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,false,false,true
+120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,false,false,true
+120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,false,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 423122d9..85f86898 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,,true,true,false,false
-30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,true,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,true,false,false
+30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,false,true,false
+30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,false,true,false
+30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,false,false
+30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index ec344277..040ac5d0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,true,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,,,false,false,false
-30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,false,true,false
+30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,false,false,false
+30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index 476af72c..d3b65d74 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,false,true,false
+30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index b9fc2b54..870926e0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,,true,true,false,false
-30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,true,,false,false,false
-30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,false,false,false
+30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,false,true,false
+30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,true,false,false
+30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,false,false,false
+30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index 7fcd436a..4771e1e5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,,true,true,false,false
-30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,true,,false,false,false
-30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,true,false,false
+30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,false,true,false
+30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,false,false,false
+30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,true,false,false
+30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,false,false,false
+30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index 767cbfb8..fdc96e37 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,,true,true,false,false
-30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,true,,false,false,false
-30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,true,false,false
+30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,false,false,false
+30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 7abdc719..555dedfb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,,true,true,false,false
-80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,true,true,false,false,false
-80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,,false,true,false
-80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,,true,true,false,false
-80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,true,true,false,false,false
-80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,true,,false,true,false
-80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,,true,true,false,false
-80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,true,true,false,false,false
-80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,true,,false,true,false
-80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,,true,true,false,false
-80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,true,true,false,false,false
-80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,true,,false,true,false
-80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,,true,true,false,false
-80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,true,true,false,false,false
-80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,true,,false,true,false
-80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,,true,true,false,false
-80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,true,true,false,false,false
-80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,true,,false,true,false
-80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,,true,true,false,false
-80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,true,true,false,false,false
-80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,true,,false,true,false
-80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,,true,true,false,false
-80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,true,true,false,false,false
-80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,true,,false,true,false
-80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,,true,true,false,false
-80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,true,true,false,false,false
-80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,true,,false,true,false
-80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,,true,true,false,false
-80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,true,true,false,false,false
-80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,true,,false,true,false
-80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,,true,true,false,false
-80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,true,true,false,false,false
-80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,true,,false,true,false
-80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,,true,true,false,false
-80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,true,,false,false,false
-80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,,,false,true,false
-80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,,true,true,false,false
-80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,true,true,false,false,false
-80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,true,,false,true,false
-80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,,true,true,false,false
-80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,true,true,false,false,false
-80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,true,,false,true,false
-80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,,true,true,false,false
-80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,true,true,false,false,false
-80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,true,,false,true,false
-80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,,true,true,false,false
-80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,true,true,false,false,false
-80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,true,,false,true,false
-80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,,true,true,false,false
-80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,true,true,false,false,false
-80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,true,,false,true,false
-80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,,true,true,false,false
-80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,true,true,false,false,false
-80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,true,,false,true,false
-80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,,true,true,false,false
-80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,true,true,false,false,false
-80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,true,,false,true,false
-80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,,true,true,false,false
-80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,true,true,false,false,false
-80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,true,,false,true,false
-80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,,true,true,false,false
-80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,true,true,false,false,false
-80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,true,,false,true,false
-80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,,true,true,false,false
-80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,true,true,false,false,false
-80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,true,,false,true,false
-80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,,true,true,false,false
-80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,true,true,false,false,false
-80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,true,,false,true,false
-80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,,,true,false,false
-80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,,true,false,false,false
-80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,true,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,false,false
+80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,false,false,false
+80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,false,true,false
+80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,true,false,false
+80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,false,false,false
+80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,false,true,false
+80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,true,false,false
+80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,false,false,false
+80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,false,true,false
+80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,true,false,false
+80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,false,false,false
+80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,false,true,false
+80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,true,false,false
+80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,false,false,false
+80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,false,true,false
+80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,true,false,false
+80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,false,false,false
+80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,false,true,false
+80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,true,false,false
+80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,false,false,false
+80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,false,true,false
+80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,true,false,false
+80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,false,false,false
+80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,false,true,false
+80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,true,false,false
+80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,false,false,false
+80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,false,true,false
+80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,true,false,false
+80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,false,false,false
+80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,false,true,false
+80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,true,false,false
+80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,false,false,false
+80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,false,true,false
+80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,true,false,false
+80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,false,false,false
+80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,false,true,false
+80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,false,false
+80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,false,false,false
+80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,false,true,false
+80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,false,false
+80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,false,false,false
+80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,false,true,false
+80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,false,false
+80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,false,false,false
+80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,false,true,false
+80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,false,false
+80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,false,false,false
+80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,false,true,false
+80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,false,false
+80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,false,false,false
+80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,false,true,false
+80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,false,false
+80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,false,false,false
+80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,false,true,false
+80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,false,false
+80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,false,false,false
+80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,false,true,false
+80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,false,false
+80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,false,false,false
+80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,false,true,false
+80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,false,false
+80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,false,false,false
+80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,false,true,false
+80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,false,false
+80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,false,false,false
+80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,false,true,false
+80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,false,false
+80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,false,false,false
+80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,false,true,false
+80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,true,false,false
+80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,false,false,false
+80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index d7ea5894..ad1513f9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,,true,true,false,false
-90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,true,true,false,false,false
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,,false,true,false
-90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,,true,true,false,false
-90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,true,true,false,false,false
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,,false,true,false
-90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,,true,true,false,false
-90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,true,true,false,false,false
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,,false,true,false
-90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,,true,true,false,false
-90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,true,true,false,false,false
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,,false,true,false
-90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,,true,true,false,false
-90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,true,true,false,false,false
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,,false,true,false
-90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,,true,true,false,false
-90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,true,true,false,false,false
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,,false,true,false
-90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,,true,true,false,false
-90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,true,true,false,false,false
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,,false,true,false
-90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,,true,true,false,false
-90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,true,true,false,false,false
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,,false,true,false
-90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,,true,true,false,false
-90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,true,true,false,false,false
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,,false,true,false
-90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,,true,true,false,false
-90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,true,true,false,false,false
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,,false,true,false
-90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,,true,true,false,false
-90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,true,true,false,false,false
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,,false,true,false
-90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,,true,true,false,false
-90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,true,true,false,false,false
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,,false,true,false
-90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,,true,true,false,false
-90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,true,true,false,false,false
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,,false,true,false
-90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,,true,true,false,false
-90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,true,true,false,false,false
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,,false,true,false
-90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,,true,true,false,false
-90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,true,true,false,false,false
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,,false,true,false
-90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,,true,true,false,false
-90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,true,true,false,false,false
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,,false,true,false
-90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,,true,true,false,false
-90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,true,true,false,false,false
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,,false,true,false
-90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,,true,true,false,false
-90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,true,true,false,false,false
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,,false,true,false
-90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,,true,true,false,false
-90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,true,true,false,false,false
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,,false,true,false
-90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,,true,true,false,false
-90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,true,true,false,false,false
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,,false,true,false
-90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,,,true,false,false
-90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,,,false,false,false
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,false,false
+90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,false,false,false
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,false,true,false
+90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,true,false,false
+90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,false,false,false
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,false,true,false
+90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,true,false,false
+90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,false,false,false
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,false,true,false
+90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,true,false,false
+90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,false,false,false
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,false,true,false
+90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,true,false,false
+90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,false,false,false
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,false,true,false
+90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,true,false,false
+90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,false,false,false
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,false,true,false
+90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,true,false,false
+90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,false,false,false
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,false,true,false
+90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,false,false
+90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,false,false,false
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,false,true,false
+90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,true,false,false
+90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,false,false,false
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,false,true,false
+90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,true,false,false
+90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,false,false,false
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,false,true,false
+90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,true,false,false
+90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,false,false,false
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,false,true,false
+90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,false,false
+90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,false,false,false
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,false,true,false
+90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,true,false,false
+90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,false,false,false
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,false,true,false
+90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,true,false,false
+90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,false,false,false
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,false,true,false
+90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,true,false,false
+90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,false,false,false
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,false,true,false
+90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,true,false,false
+90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,false,false,false
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,false,true,false
+90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,true,false,false
+90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,false,false,false
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,false,true,false
+90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,true,false,false
+90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,false,false,false
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,false,true,false
+90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,true,false,false
+90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,false,false,false
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,false,true,false
+90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,true,false,false
+90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,false,false,false
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,false,true,false
+90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,true,false,false
+90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,false,false,false
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index d4277f90..560b8c9a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,,true,true,false,false
-100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,true,true,false,false,false
-100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,true,,false,true,false
-100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,,true,true,false,false
-100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,true,true,false,false,false
-100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,true,,false,true,false
-100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,,true,true,false,false
-100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,true,true,false,false,false
-100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,true,,false,true,false
-100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,,true,true,false,false
-100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,true,true,false,false,false
-100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,true,,false,true,false
-100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,,true,true,false,false
-100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,true,true,false,false,false
-100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,true,,false,true,false
-100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,,true,true,false,false
-100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,true,true,false,false,false
-100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,true,,false,true,false
-100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,,true,true,false,false
-100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,true,true,false,false,false
-100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,true,,false,true,false
-100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,,true,true,false,false
-100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,true,true,false,false,false
-100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,true,,false,true,false
-100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,,true,true,false,false
-100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,true,true,false,false,false
-100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,true,,false,true,false
-100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,,true,true,false,false
-100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,true,true,false,false,false
-100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,true,,false,true,false
-100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,,true,true,false,false
-100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,true,true,false,false,false
-100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,true,,false,true,false
-100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,,true,true,false,false
-100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,true,true,false,false,false
-100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,true,,false,true,false
-100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,,true,true,false,false
-100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,true,true,false,false,false
-100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,true,,false,true,false
-100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,,true,true,false,false
-100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,true,true,false,false,false
-100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,true,,false,true,false
-100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,,true,true,false,false
-100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,true,true,false,false,false
-100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,true,,false,true,false
-100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,,true,true,false,false
-100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,true,true,false,false,false
-100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,true,,false,true,false
-100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,,true,true,false,false
-100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,true,true,false,false,false
-100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,true,,false,true,false
-100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,,true,true,false,false
-100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,true,true,false,false,false
-100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,true,,false,true,false
-100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,,true,true,false,false
-100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,true,true,false,false,false
-100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,true,,false,true,false
-100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,,true,true,false,false
-100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,true,true,false,false,false
-100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,true,,false,true,false
-100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,,,true,false,false
-100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,,,false,false,false
-100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,false,false
+100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,false,false,false
+100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,false,true,false
+100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,true,false,false
+100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,false,false,false
+100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,false,true,false
+100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,true,false,false
+100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,false,false,false
+100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,false,true,false
+100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,true,false,false
+100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,false,false,false
+100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,false,true,false
+100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,true,false,false
+100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,false,false,false
+100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,false,true,false
+100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,true,false,false
+100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,false,false,false
+100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,false,true,false
+100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,true,false,false
+100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,false,false,false
+100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,false,true,false
+100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,false,false
+100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,false,false,false
+100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,false,true,false
+100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,true,false,false
+100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,false,false,false
+100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,false,true,false
+100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,true,false,false
+100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,false,false,false
+100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,false,true,false
+100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,true,false,false
+100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,false,false,false
+100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,false,true,false
+100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,false,false
+100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,false,false,false
+100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,false,true,false
+100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,true,false,false
+100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,false,false,false
+100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,false,true,false
+100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,true,false,false
+100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,false,false,false
+100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,false,true,false
+100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,true,false,false
+100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,false,false,false
+100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,false,true,false
+100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,true,false,false
+100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,false,false,false
+100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,false,true,false
+100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,true,false,false
+100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,false,false,false
+100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,false,true,false
+100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,true,false,false
+100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,false,false,false
+100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,false,true,false
+100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,true,false,false
+100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,false,false,false
+100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,false,true,false
+100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,true,false,false
+100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,false,false,false
+100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,false,true,false
+100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,true,false,false
+100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,false,false,false
+100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index efee5fad..f760bbc7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,,true,true,false,false
-30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,,true,true,false,false
-30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,,true,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,,true,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,,true,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,,true,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,,true,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,true,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,,true,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,,true,true,false,false
-30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,true,,false,false,false
-30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,,true,true,false,false
-30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,true,,false,false,false
-30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,,true,true,false,false
-30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,true,,false,false,false
-30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,false,false
+30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,false,false,false
+30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,true,false,false
+30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,false,false,false
+30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,false,false,false
+30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,false,false,false
+30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,false,false,false
+30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,false,false,false
+30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,false,false,false
+30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,false,false,false
+30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,true,false,false
+30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,false,false,false
+30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,true,false,false
+30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,false,false,false
+30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,true,false,false
+30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,false,false,false
+30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index 56e5d8df..1f7c7504 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,,true,true,false,false
-30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,true,true,false,false,false
-30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,true,,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,,true,true,false,false
-30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,true,true,false,false,false
-30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,true,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,,true,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,true,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,,true,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,true,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,,true,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,true,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,,true,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,true,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,,true,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,true,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,,true,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,true,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,true,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,,true,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,true,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,,true,true,false,false
-30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,true,true,false,false,false
-30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,,true,true,false,false
-30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,true,true,false,false,false
-30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,true,,false,true,false
-30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,,true,true,false,false
-30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,true,,false,false,false
-30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,false,false
+30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,false,false,false
+30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,true,false,false
+30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,false,false,false
+30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,false,false,false
+30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,false,false,false
+30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,false,false,false
+30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,false,false,false
+30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,false,false,false
+30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,false,false,false
+30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,false,false,false
+30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,true,false,false
+30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,false,false,false
+30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,false,true,false
+30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,true,false,false
+30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,false,false,false
+30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,false,true,false
+30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,true,false,false
+30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,false,false,false
+30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
index b0f6908a..62ed7876 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.7103175,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.7103175,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.7103175,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,,true,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,true,true,false,false,false
-110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,true,,false,true,false
-110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,,true,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,true,true,false,false,false
-110006,202003,200,42,0.862914677,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,true,,false,true,false
-110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,,true,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,true,true,false,false,false
-110007,202003,200,19,1.222772277,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,true,,false,true,false
-110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.48471,BI,0,3,3,,,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,,true,false,false,false
-110008,202003,200,43,1.53667263,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,true,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.7103175,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.7103175,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.7103175,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,false,true,false
+110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,false,false,false
+110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,false,true,false
+110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,false,false,false
+110006,202003,200,42,0.862914677,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,false,true,false
+110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,false,false,false
+110007,202003,200,19,1.222772277,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,false,true,false
+110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.48471,BI,0,3,3,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,false,false,false
+110008,202003,200,43,1.53667263,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 0d399687..742f461f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,,true,true,false,false
-30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,,false,false,false
-30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,,,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,false,false,false
+30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,false,false,false
+30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,false,false,false
+30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,true,false,false
+30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,false,false,false
+30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index 6273276e..aa6f1128 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,,true,true,false,false
-30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,,,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,false,false,false
+30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,true,false,false
+30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index fe23ecca..fedf150b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,,true,true,false,false
-60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,true,true,false,false,false
-60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,true,,false,true,false
-60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,,true,true,false,false
-60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,true,true,false,false,false
-60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,true,,false,true,false
-60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,,true,true,false,false
-60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,true,true,false,false,false
-60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,true,,false,true,false
-60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,,,true,false,false
-60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,,,false,false,false
-60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,,,false,true,false
-60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,,,
-60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,,,
-60002,201901,100,71,,,,,,1,1.5274,50.3694,,,,,,,,,,
-60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-60002,201903,100,71,,,,,,1.113,1,89.3761,,,,,,,,,,
-60003,201901,100,26,,,,,,1,1.5274,50.3694,,,,,,,,,,
-60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-60003,201903,100,26,,,,,,1.113,1,89.3761,,,,,,,,,,
-60004,201901,100,3,,,,,,1,1.5274,50.3694,,,,,,,,,,
-60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-60004,201903,100,3,,,,,,1.113,1,89.3761,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,false,false
+60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,false,false,false
+60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,false,true,false
+60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,true,false,false
+60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,false,false,false
+60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,false,true,false
+60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,true,false,false
+60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,false,false,false
+60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,false,true,false
+60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,true,false,false
+60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,false,false,false
+60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,false,true,false
+60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,
+60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,
+60002,201901,100,71,,,,,,1,1.5274,50.3694,,,,,,,,
+60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+60002,201903,100,71,,,,,,1.113,1,89.3761,,,,,,,,
+60003,201901,100,26,,,,,,1,1.5274,50.3694,,,,,,,,
+60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+60003,201903,100,26,,,,,,1.113,1,89.3761,,,,,,,,
+60004,201901,100,3,,,,,,1,1.5274,50.3694,,,,,,,,
+60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+60004,201903,100,3,,,,,,1.113,1,89.3761,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index 6ee1ca3f..e3896fa4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
-30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,,,true,false,false
-30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,,,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,,,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,false,false,false
+30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,true,false,false
+30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index f222bebe..ccca4704 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,,true,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,,true,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,,true,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,true,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,
-110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,
+110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 78f446c1..01847685 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,,true,true,false,false
-30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,true,,false,false,false
-30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,,,false,true,false
-30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,,,
-30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,,,
-30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,,,
-30002,201901,100,72,,,1,1.5274,50.3694,,,,,,,,,,,,,
-30002,201902,100,72,,,1,1.8795,121.4187,,,,,,,,,,,,,
-30002,201903,100,72,,,1,1,89.3761,,,,,,,,,,,,,
-30003,201901,100,7,,,1,1.5274,50.3694,,,,,,,,,,,,,
-30003,201902,100,7,,,1,1.8795,121.4187,,,,,,,,,,,,,
-30003,201903,100,7,,,1,1,89.3761,,,,,,,,,,,,,
-30004,201901,100,81,,,1,1.5274,50.3694,,,,,,,,,,,,,
-30004,201902,100,81,,,1,1.8795,121.4187,,,,,,,,,,,,,
-30004,201903,100,81,,,1,1,89.3761,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,false,false,false
+30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,false,false,false
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,false,false,false
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,true,false,false
+30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,false,false,false
+30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,false,true,false
+30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,
+30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,
+30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,
+30002,201901,100,72,,,1,1.5274,50.3694,,,,,,,,,,,
+30002,201902,100,72,,,1,1.8795,121.4187,,,,,,,,,,,
+30002,201903,100,72,,,1,1,89.3761,,,,,,,,,,,
+30003,201901,100,7,,,1,1.5274,50.3694,,,,,,,,,,,
+30003,201902,100,7,,,1,1.8795,121.4187,,,,,,,,,,,
+30003,201903,100,7,,,1,1,89.3761,,,,,,,,,,,
+30004,201901,100,81,,,1,1.5274,50.3694,,,,,,,,,,,
+30004,201902,100,81,,,1,1.8795,121.4187,,,,,,,,,,,
+30004,201903,100,81,,,1,1,89.3761,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index 5974c5b5..07f587fa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,,true,true,false,false
-60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,true,true,false,false,false
-60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,true,,false,true,false
-60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,,true,true,false,false
-60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,true,true,false,false,false
-60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,true,,false,true,false
-60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,,true,true,false,false
-60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,true,true,false,false,false
-60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,true,,false,true,false
-60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,,,true,false,false
-60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,,,false,false,false
-60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,,,false,true,false
-60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,,,
-60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,,,
-60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,,,
-60002,201901,100,71,,,1,1,50.3694,,,,,,,,,,,,,
-60002,201902,100,71,,,0.9685,1,121.4187,,,,,,,,,,,,,
-60002,201903,100,71,,,1.113,1,89.3761,,,,,,,,,,,,,
-60003,201901,100,26,,,1,1,50.3694,,,,,,,,,,,,,
-60003,201902,100,26,,,0.9685,1,121.4187,,,,,,,,,,,,,
-60003,201903,100,26,,,1.113,1,89.3761,,,,,,,,,,,,,
-60004,201901,100,3,,,1,1,50.3694,,,,,,,,,,,,,
-60004,201902,100,3,,,0.9685,1,121.4187,,,,,,,,,,,,,
-60004,201903,100,3,,,1.113,1,89.3761,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,true,false,false
+60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,false,false,false
+60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,false,true,false
+60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,true,false,false
+60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,false,false,false
+60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,false,true,false
+60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,true,false,false
+60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,false,false,false
+60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,false,true,false
+60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,true,false,false
+60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,false,false,false
+60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,false,true,false
+60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,
+60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,
+60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,
+60002,201901,100,71,,,1,1,50.3694,,,,,,,,,,,
+60002,201902,100,71,,,0.9685,1,121.4187,,,,,,,,,,,
+60002,201903,100,71,,,1.113,1,89.3761,,,,,,,,,,,
+60003,201901,100,26,,,1,1,50.3694,,,,,,,,,,,
+60003,201902,100,26,,,0.9685,1,121.4187,,,,,,,,,,,
+60003,201903,100,26,,,1.113,1,89.3761,,,,,,,,,,,
+60004,201901,100,3,,,1,1,50.3694,,,,,,,,,,,
+60004,201902,100,3,,,0.9685,1,121.4187,,,,,,,,,,,
+60004,201903,100,3,,,1.113,1,89.3761,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index 56069578..755ab6ab 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,true,,false,true,false
-30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,,,true,false,false
-30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,,,false,false,false
-30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,,,false,true,false
-30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,,,
-30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,,,
-30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,,,
-30002,201901,100,72,,,1,1.5274,1,,,,,,,,,,,,,
-30002,201902,100,72,,,0.9685,1.8795,1,,,,,,,,,,,,,
-30002,201903,100,72,,,1.113,1,1,,,,,,,,,,,,,
-30003,201901,100,7,,,1,1.5274,1,,,,,,,,,,,,,
-30003,201902,100,7,,,0.9685,1.8795,1,,,,,,,,,,,,,
-30003,201903,100,7,,,1.113,1,1,,,,,,,,,,,,,
-30004,201901,100,81,,,1,1.5274,1,,,,,,,,,,,,,
-30004,201902,100,81,,,0.9685,1.8795,1,,,,,,,,,,,,,
-30004,201903,100,81,,,1.113,1,1,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,false,false,false
+30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,false,false,false
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,false,false,false
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,true,false,false
+30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,false,false,false
+30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,false,true,false
+30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,
+30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,
+30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,
+30002,201901,100,72,,,1,1.5274,1,,,,,,,,,,,
+30002,201902,100,72,,,0.9685,1.8795,1,,,,,,,,,,,
+30002,201903,100,72,,,1.113,1,1,,,,,,,,,,,
+30003,201901,100,7,,,1,1.5274,1,,,,,,,,,,,
+30003,201902,100,7,,,0.9685,1.8795,1,,,,,,,,,,,
+30003,201903,100,7,,,1.113,1,1,,,,,,,,,,,
+30004,201901,100,81,,,1,1.5274,1,,,,,,,,,,,
+30004,201902,100,81,,,0.9685,1.8795,1,,,,,,,,,,,
+30004,201903,100,81,,,1.113,1,1,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index e9bccde0..3e4b7b81 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,,true,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,true,true,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,,true,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,true,true,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,,true,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,true,true,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,,,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,,true,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,
-110005,201901,200,27,,,1,1,107.48,,,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110006,201901,200,42,,,1,1,107.48,,,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110007,201901,200,19,,,1,1,107.48,,,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110008,201901,200,43,,,1,1,107.48,,,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,
+110005,201901,200,27,,,1,1,107.48,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,1,54.70285714,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110006,201901,200,42,,,1,1,107.48,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,1,54.70285714,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110007,201901,200,19,,,1,1,107.48,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,1,54.70285714,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110008,201901,200,43,,,1,1,107.48,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,1,54.70285714,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index 11061d21..c3478e8d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,,true,true,false,false
-210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,true,true,false,false,false
-210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,true,,false,true,false
-210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,,true,true,false,false
-210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,true,true,false,false,false
-210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,true,,false,true,false
-210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,,true,true,false,false
-210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,true,true,false,false,false
-210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,true,,false,true,false
-210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,,true,true,false,false
-210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,true,true,false,false,false
-210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,true,,false,true,false
-210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,,,true,false,false
-210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,,,false,false,false
-210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,,,false,true,false
-210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
-210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,
-210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,,,
-210002,201901,1,50,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
-210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,
-210002,201903,1,50,,,0.968230653,1,70.26136364,,,,,,,,,,,,,
-210003,201901,2,12,,,1,0.68736285,182.25,,,,,,,,,,,,,
-210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
-210003,201903,2,12,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
-210004,201901,2,9,,,1,0.68736285,182.25,,,,,,,,,,,,,
-210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
-210004,201903,2,9,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
-210005,201901,1,18,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
-210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
-210005,201903,2,18,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,true,false,false
+210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,false,false,false
+210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,false,true,false
+210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,true,false,false
+210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,false,false,false
+210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,false,true,false
+210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,true,false,false
+210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,false,false,false
+210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,false,true,false
+210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,true,false,false
+210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,false,false,false
+210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,false,true,false
+210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,true,false,false
+210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,false,false,false
+210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,false,true,false
+210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,
+210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,
+210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,
+210002,201901,1,50,,,1,2.656680299,101.7103175,,,,,,,,,,,
+210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,
+210002,201903,1,50,,,0.968230653,1,70.26136364,,,,,,,,,,,
+210003,201901,2,12,,,1,0.68736285,182.25,,,,,,,,,,,
+210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
+210003,201903,2,12,,,1.259780318,1,182.2366412,,,,,,,,,,,
+210004,201901,2,9,,,1,0.68736285,182.25,,,,,,,,,,,
+210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
+210004,201903,2,9,,,1.259780318,1,182.2366412,,,,,,,,,,,
+210005,201901,1,18,,,1,2.656680299,101.7103175,,,,,,,,,,,
+210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
+210005,201903,2,18,,,1.259780318,1,182.2366412,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index 072aed01..2d062fdd 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,57 +1,57 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,,true,true,false,false
-70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,true,true,false,false,false
-70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,true,true,false,false,false
-70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,true,true,false,false,false
-70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,true,true,false,false,false
-70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,true,true,false,false,false
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,true,,false,true,false
-70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,,true,true,false,false
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,true,true,false,false,false
-70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,true,true,false,false,false
-70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,true,true,false,false,false
-70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,true,true,false,false,false
-70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,true,true,false,false,false
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,true,,false,true,false
-70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,,true,true,false,false
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,true,true,false,false,false
-70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,true,true,false,false,false
-70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,true,true,false,false,false
-70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,true,true,false,false,false
-70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,true,true,false,false,false
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,true,,false,true,false
-70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,,,true,false,false
-70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,,,false,false,false
-70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,,,false,false,false
-70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,,,false,false,false
-70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,,,false,false,false
-70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,,,false,false,false
-70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,,,false,true,false
-70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
-70001,201902,100,39,,,1,1,1,,,,,,,,,,,,,
-70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
-70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
-70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
-70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
-70001,201907,100,39,,,1,1,1,,,,,,,,,,,,,
-70002,201901,100,94,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
-70002,201902,100,94,,,1,1,1,,,,,,,,,,,,,
-70002,201903,100,94,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
-70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
-70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
-70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
-70002,201907,100,94,,,1,1,1,,,,,,,,,,,,,
-70003,201901,100,42,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
-70003,201902,100,42,,,1,1,1,,,,,,,,,,,,,
-70003,201903,100,42,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
-70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
-70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
-70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
-70003,201907,100,42,,,1,1,1,,,,,,,,,,,,,
-70004,201901,100,6,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
-70004,201902,100,6,,,1,1,1,,,,,,,,,,,,,
-70004,201903,100,6,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
-70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
-70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
-70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
-70004,201907,100,6,,,1,1,1,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,true,false,false
+70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,false,false,false
+70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,false,false,false
+70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,false,false,false
+70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,false,false,false
+70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,false,false,false
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,false,true,false
+70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,true,false,false
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,false,false,false
+70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,false,false,false
+70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,false,false,false
+70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,false,false,false
+70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,false,false,false
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,false,true,false
+70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,true,false,false
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,false,false,false
+70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,false,false,false
+70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,false,false,false
+70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,false,false,false
+70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,false,false,false
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,false,true,false
+70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,true,false,false
+70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,false,false,false
+70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,false,false,false
+70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,false,false,false
+70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,false,false,false
+70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,false,false,false
+70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,false,true,false
+70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,
+70001,201902,100,39,,,1,1,1,,,,,,,,,,,
+70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,
+70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
+70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
+70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
+70001,201907,100,39,,,1,1,1,,,,,,,,,,,
+70002,201901,100,94,,,1,1.511049724,101.7103175,,,,,,,,,,,
+70002,201902,100,94,,,1,1,1,,,,,,,,,,,
+70002,201903,100,94,,,1.082864299,1,70.26136364,,,,,,,,,,,
+70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
+70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
+70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
+70002,201907,100,94,,,1,1,1,,,,,,,,,,,
+70003,201901,100,42,,,1,1.511049724,101.7103175,,,,,,,,,,,
+70003,201902,100,42,,,1,1,1,,,,,,,,,,,
+70003,201903,100,42,,,1.082864299,1,70.26136364,,,,,,,,,,,
+70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
+70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
+70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
+70003,201907,100,42,,,1,1,1,,,,,,,,,,,
+70004,201901,100,6,,,1,1.511049724,101.7103175,,,,,,,,,,,
+70004,201902,100,6,,,1,1,1,,,,,,,,,,,
+70004,201903,100,6,,,1.082864299,1,70.26136364,,,,,,,,,,,
+70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
+70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
+70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
+70004,201907,100,6,,,1,1,1,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index 813ace8f..e1df2ea8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -1,43 +1,43 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,,,true,true,true
-110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,,,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,,true,true,true,true
-110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,,true,true,true
-110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,,,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,,,true,true,true
-110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,,,true,true,true
-110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,,,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,,,true,true,true
-110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-110002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-110002,201903,100,83,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-110003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-110003,201903,100,4,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-110004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-110004,201903,100,76,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-110005,201901,200,27,,,1,2.642597676,144.865,,,,,,,,,,,,,
-110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-110005,201903,200,27,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-110006,201901,200,42,,,1,2.642597676,144.865,,,,,,,,,,,,,
-110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-110006,201903,200,42,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-110007,201901,200,19,,,1,2.642597676,144.865,,,,,,,,,,,,,
-110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-110007,201903,200,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,false,true,false
+110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,true,true,true
+110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,true,true,true
+110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,true,true
+110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,true,true,true
+110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,true,true,true
+110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,true,true,true
+110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,
+110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
+110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,
+110002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,
+110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
+110002,201903,100,83,,,1.040615327,1,79.81873182,,,,,,,,,,,
+110003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,
+110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
+110003,201903,100,4,,,1.040615327,1,79.81873182,,,,,,,,,,,
+110004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,
+110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
+110004,201903,100,76,,,1.040615327,1,79.81873182,,,,,,,,,,,
+110005,201901,200,27,,,1,2.642597676,144.865,,,,,,,,,,,
+110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
+110005,201903,200,27,,,1.106182973,1,140.2509173,,,,,,,,,,,
+110006,201901,200,42,,,1,2.642597676,144.865,,,,,,,,,,,
+110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
+110006,201903,200,42,,,1.106182973,1,140.2509173,,,,,,,,,,,
+110007,201901,200,19,,,1,2.642597676,144.865,,,,,,,,,,,
+110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
+110007,201903,200,19,,,1.106182973,1,140.2509173,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 564a421f..600c798d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,145 +1,145 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,true,,true,true,false,false
-80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,true,true,true,true,false,false,false
-80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,true,,true,,false,true,false
-80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,true,,true,true,false,false
-80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,true,true,true,true,false,false,false
-80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,true,,true,,false,true,false
-80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,true,,true,true,false,false
-80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,true,true,true,true,false,false,false
-80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,true,,true,,false,true,false
-80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,true,,true,true,false,false
-80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,true,true,true,true,false,false,false
-80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,true,,true,,false,true,false
-80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,false,,true,true,false,false
-80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,false,false,true,true,false,false,false
-80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,true,,true,,false,true,false
-80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,true,,true,true,false,false
-80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,true,true,true,true,false,false,false
-80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,true,,true,,false,true,false
-80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,true,,true,true,false,false
-80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,true,true,true,true,false,false,false
-80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,true,,true,,false,true,false
-80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,,true,true,false,false
-80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,true,true,true,true,false,false,false
-80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,true,,true,,false,true,false
-80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,true,,true,true,false,false
-80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,true,true,true,true,false,false,false
-80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,true,,true,,false,true,false
-80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,true,,true,true,false,false
-80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,true,true,true,true,false,false,false
-80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,false,,true,,false,true,false
-80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,false,,true,true,false,false
-80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,false,false,true,true,false,false,false
-80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,false,,true,,false,true,false
-80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,,true,true,false,false
-80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,true,,true,,false,false,false
-80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,,,false,true,false
-80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,true,,true,true,false,false
-80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,true,true,true,true,false,false,false
-80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,true,,true,,false,true,false
-80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,true,,true,true,false,false
-80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,true,true,true,true,false,false,false
-80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,true,,true,,false,true,false
-80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,false,,true,true,false,false
-80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,false,true,true,true,false,false,false
-80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,true,,true,,false,true,false
-80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,true,,true,true,false,false
-80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,true,true,true,true,false,false,false
-80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,true,,true,,false,true,false
-80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,true,,true,true,false,false
-80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,true,true,true,true,false,false,false
-80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,true,,true,,false,true,false
-80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,true,,true,true,false,false
-80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,true,true,true,true,false,false,false
-80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,true,,true,,false,true,false
-80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,true,,true,true,false,false
-80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,true,false,true,true,false,false,false
-80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,false,,true,,false,true,false
-80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,true,,true,true,false,false
-80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,true,false,true,true,false,false,false
-80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,false,,true,,false,true,false
-80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,true,,true,true,false,false
-80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,true,true,true,true,false,false,false
-80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,true,,true,,false,true,false
-80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,false,,true,true,false,false
-80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,true,false,true,true,false,false,false
-80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,true,,true,,false,true,false
-80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,true,,true,true,false,false
-80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,true,true,true,true,false,false,false
-80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,true,,true,,false,true,false
-80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,,,true,false,false
-80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,,true,false,false,false
-80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,true,,false,true,false
-80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80002,201901,100,83,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80002,201903,100,83,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80003,201901,100,4,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80003,201903,100,4,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80004,201901,100,76,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80004,201903,100,76,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80005,201901,100,18,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80005,201903,100,18,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80006,201901,100,94,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80006,201903,100,94,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80007,201901,100,8,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80007,201903,100,8,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80008,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80008,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80009,201901,100,45,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80009,201903,100,45,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80010,201901,100,100,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80010,201903,100,100,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80011,201901,100,19,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80011,201903,100,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80012,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80012,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80013,201901,200,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80013,201903,200,54,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80014,201901,200,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80014,201903,200,42,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80015,201901,200,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80015,201903,200,57,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80016,201901,200,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80016,201903,200,163,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80017,201901,200,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80017,201903,200,149,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80018,201901,200,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80018,201903,200,126,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80019,201901,200,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80019,201903,200,6,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80020,201901,200,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80020,201903,200,22,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80021,201901,200,108,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80021,201903,200,108,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80022,201901,200,67,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80022,201903,200,67,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80023,201901,200,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80023,201903,200,18,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80024,201901,200,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80024,201903,200,155,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,true,true,false,false
+80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,true,true,false,false,false
+80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,true,,false,true,false
+80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,true,true,false,false
+80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,true,true,false,false,false
+80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,true,,false,true,false
+80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,true,true,false,false
+80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,true,true,false,false,false
+80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,true,,false,true,false
+80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,true,true,false,false
+80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,true,true,false,false,false
+80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,true,,false,true,false
+80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,false,true,false,false
+80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,false,false,false,false,false
+80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,true,,false,true,false
+80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,true,true,false,false
+80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,true,true,false,false,false
+80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,true,,false,true,false
+80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,true,true,false,false
+80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,true,true,false,false,false
+80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,true,,false,true,false
+80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,false,false
+80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,true,true,false,false,false
+80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,true,,false,true,false
+80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,true,true,false,false
+80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,true,true,false,false,false
+80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,true,,false,true,false
+80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,true,true,false,false
+80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,true,true,false,false,false
+80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,false,,false,true,false
+80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,false,true,false,false
+80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,false,false,false,false,false
+80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,false,,false,true,false
+80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,false,false
+80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,true,,false,false,false
+80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,false,true,false
+80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,true,true,false,false
+80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,true,true,false,false,false
+80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,true,,false,true,false
+80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,true,true,false,false
+80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,true,true,false,false,false
+80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,true,,false,true,false
+80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,false,true,false,false
+80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,false,true,false,false,false
+80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,true,,false,true,false
+80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,true,true,false,false
+80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,true,true,false,false,false
+80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,true,,false,true,false
+80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,true,true,false,false
+80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,true,true,false,false,false
+80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,true,,false,true,false
+80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,true,true,false,false
+80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,true,true,false,false,false
+80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,true,,false,true,false
+80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,true,true,false,false
+80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,true,false,false,false,false
+80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,false,,false,true,false
+80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,true,true,false,false
+80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,true,false,false,false,false
+80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,false,,false,true,false
+80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,true,true,false,false
+80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,true,true,false,false,false
+80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,true,,false,true,false
+80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,false,true,false,false
+80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,true,false,false,false,false
+80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,true,,false,true,false
+80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,true,true,false,false
+80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,true,true,false,false,false
+80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,true,,false,true,false
+80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,true,false,false
+80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,false,false,false
+80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,false,true,false
+80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80002,201901,100,83,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80002,201903,100,83,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80003,201901,100,4,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80003,201903,100,4,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80004,201901,100,76,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80004,201903,100,76,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80005,201901,100,18,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80005,201903,100,18,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80006,201901,100,94,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80006,201903,100,94,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80007,201901,100,8,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80007,201903,100,8,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80008,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80008,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80009,201901,100,45,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80009,201903,100,45,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80010,201901,100,100,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80010,201903,100,100,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80011,201901,100,19,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80011,201903,100,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80012,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80012,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80013,201901,200,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80013,201903,200,54,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80014,201901,200,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80014,201903,200,42,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80015,201901,200,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80015,201903,200,57,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80016,201901,200,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80016,201903,200,163,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80017,201901,200,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80017,201903,200,149,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80018,201901,200,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80018,201903,200,126,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80019,201901,200,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80019,201903,200,6,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80020,201901,200,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80020,201903,200,22,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80021,201901,200,108,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80021,201903,200,108,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80022,201901,200,67,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80022,201903,200,67,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80023,201901,200,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80023,201903,200,18,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80024,201901,200,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80024,201903,200,155,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index c030a07b..dfa0aaf8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,true,,true,,false,true,false
-30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,,true,,true,true,false,false
-30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,true,true,true,true,false,false,false
-30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,true,,true,,false,true,false
-30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,,true,,true,true,false,false
-30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,true,true,true,true,false,false,false
-30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,true,,true,,false,true,false
-30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,,true,,true,true,false,false
-30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,true,true,true,true,false,false,false
-30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,true,,true,,false,true,false
-30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,,true,,true,true,false,false
-30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,true,true,true,true,false,false,false
-30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,true,,true,,false,true,false
-30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,,true,,true,true,false,false
-30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,true,true,true,true,false,false,false
-30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,true,,true,,false,true,false
-30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,,true,,true,true,false,false
-30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,true,true,true,true,false,false,false
-30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,,true,,true,true,false,false
-30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,true,true,true,true,false,false,false
-30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,true,,true,,false,true,false
-30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,,,true,false,false
-30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,,,false,false,false
-30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,,,false,true,false
-30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,true,,false,true,false
+30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,,true,true,false,false
+30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,true,true,false,false,false
+30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,true,,false,true,false
+30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,,true,true,false,false
+30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,true,true,false,false,false
+30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,true,,false,true,false
+30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,,true,true,false,false
+30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,true,true,false,false,false
+30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,true,,false,true,false
+30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,,true,true,false,false
+30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,true,true,false,false,false
+30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,true,,false,true,false
+30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,,true,true,false,false
+30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,true,true,false,false,false
+30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,true,,false,true,false
+30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,,true,true,false,false
+30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,true,true,false,false,false
+30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,true,,false,true,false
+30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,,true,true,false,false
+30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,true,true,false,false,false
+30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,true,,false,true,false
+30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,true,false,false
+30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,false,false,false
+30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,false,true,false
+30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index 65f6451c..69c70eb9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
-160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
-160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
-160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
-160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
-160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
-160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
-160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
-160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,,,true,false,false
-160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,,,false,false,false
-160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,,,false,false,false
-160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,,,false,false,false
-160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,,,false,false,false
-160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,true,false,false
+160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,true,false,false
+160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index 525f0f04..4c97e19b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
-160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
-160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
-160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
-160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
-160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
-160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
-160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
-160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,,,true,false,false
-160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,,,false,false,false
-160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,,,false,false,false
-160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,,,false,false,false
-160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,,,false,false,false
-160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,true,false,false
+160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,true,false,false
+160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index 37c2647e..3f2ff2d6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false
-10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false
-10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false
-10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,true,true,false
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index 49fe2104..e3c0074c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction
-20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false
-20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false
-20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false
-20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,true,false
-20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,true,false,false
-20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,true,false
-20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,true,false,false
-20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,true,false
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index e7524725..384ee9a8 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false
-30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
-30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false
-30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4,true,false,false
-30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
-30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3,false,true,false
-30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4,true,false,false
-30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
-30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,true,false
-30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,true,false,false
-30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
-30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index b60954ab..8e5db810 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-40001,202001,100,35,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false
-40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
-40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
-40001,202004,100,35,4911,R,0.637121844,1,73.71052632,3,0,3,false,true,false
-40002,202001,100,63,2095,R,1,1.060305409,128.0208333,0,4,4,true,false,false
-40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
-40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
-40002,202004,100,63,2115,R,0.637121844,1,73.71052632,3,0,3,false,true,false
-40003,202001,100,16,7863,R,1,1.060305409,128.0208333,0,4,4,true,false,false
-40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
-40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
-40003,202004,100,16,1377,R,0.637121844,1,73.71052632,3,0,3,false,true,false
-40004,202001,100,78,5131,R,1,1.060305409,128.0208333,0,4,4,true,false,false
-40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
-40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
-40004,202004,100,78,6193.009741,FIR,0.637121844,1,73.71052632,3,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 71fc0e73..c5302e6b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-50001,202010,100,59,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false
-50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
-50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
-50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
-50001,202102,100,59,4687,R,0.481224628,1,49.9122807,3,0,3,false,true,false
-50002,202010,100,36,4851,R,1,0.659160839,70.34328358,0,4,4,true,false,false
-50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
-50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
-50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
-50002,202102,100,36,2327,R,0.481224628,1,49.9122807,3,0,3,false,true,false
-50003,202010,100,76,2238,R,1,0.659160839,70.34328358,0,4,4,true,false,false
-50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
-50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
-50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
-50003,202102,100,76,1521,R,0.481224628,1,49.9122807,3,0,3,false,true,false
-50004,202010,100,30,688,R,1,0.659160839,70.34328358,0,4,4,true,false,false
-50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
-50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
-50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
-50004,202102,100,30,1521.344411,FIR,0.481224628,1,49.9122807,3,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index d47bfb64..384ee9a8 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-60001,202001,100,15,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false
-60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
-60001,202003,100,15,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false
-60002,202001,100,71,1588,R,1,1.408039237,117.9107143,0,3,3,true,false,false
-60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
-60002,202003,100,71,3807,R,1.194583644,1,100.913043,3,0,4,false,true,false
-60003,202001,100,26,6541,R,1,1.408039237,117.9107143,0,3,3,true,false,false
-60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
-60003,202003,100,26,6351,R,1.194583644,1,100.913043,3,0,4,false,true,false
-60004,202001,100,3,472.653159,BI,1,1.408039237,117.9107143,0,3,3,true,false,false
-60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
-60004,202003,100,3,401,R,1.194583644,1,100.913043,3,0,4,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 8c3a3aab..9776ccf0 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-70001,202001,100,39,5951,R,1,1.964796824,107.48,0,3,3,true,false,false
-70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
-70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
-70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
-70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
-70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
-70001,202007,100,39,49,R,0.913631634,1,70.24,3,0,3,false,true,false
-70002,202001,100,94,6705,R,1,1.964796824,107.48,0,3,3,true,false,false
-70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
-70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
-70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
-70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
-70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
-70002,202007,100,94,3475,R,0.913631634,1,70.24,3,0,3,false,true,false
-70003,202001,100,42,6153,R,1,1.964796824,107.48,0,3,3,true,false,false
-70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
-70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
-70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
-70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
-70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
-70003,202007,100,42,8768,R,0.913631634,1,70.24,3,0,3,false,true,false
-70004,202001,100,6,10286.222995,BI,1,1.964796824,107.48,0,3,3,true,false,false
-70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
-70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
-70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
-70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
-70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
-70004,202007,100,6,5367.585848,FIR,0.913631634,1,70.24,3,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
index 39912e13..384ee9a8 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-80001,202001,100,91,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false
-80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
-80001,202003,100,91,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false
-80002,202001,100,85,7138,R,1,1.646151294,69.14982578,0,4,4,true,false,false
-80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
-80002,202003,100,85,2746,R,1.711844725,1,71.90940767,4,0,4,false,true,false
-80003,202001,100,41,2846,R,1,1.646151294,69.14982578,0,4,4,true,false,false
-80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
-80003,202003,100,41,9015,R,1.711844725,1,71.90940767,4,0,4,false,true,false
-80004,202001,100,70,5820,R,1,1.646151294,69.14982578,0,4,4,true,false,false
-80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
-80004,202003,100,70,8233,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index 1f6b4f10..1901ba93 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-90001,202001,100,66,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false
-90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
-90001,202003,100,66,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false
-90002,202001,100,27,1706,R,1,0.294381131,71.77777778,0,3,4,true,false,false
-90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
-90002,202003,100,27,8390,R,1.027612406,1,169.3831776,3,0,3,false,true,false
-90003,202001,100,14,1069,R,1,0.294381131,71.77777778,0,3,4,true,false,false
-90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
-90003,202003,100,14,2415,R,1.027612406,1,169.3831776,3,0,3,false,true,false
-90004,202001,100,73,7728,R,1,0.294381131,71.77777778,0,3,4,true,false,false
-90004,202003,100,73,12364.971963,C,1.027612406,1,169.3831776,3,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index 2a308b81..a02e2345 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-100001,202001,100,26,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false
-100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
-100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
-100001,202004,100,26,3540,R,3.027849407,1,119.1751412,3,0,4,false,true,false
-100002,202001,100,19,8084,R,1,1.046156805,179.3296703,0,3,3,true,false,false
-100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
-100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
-100002,202004,100,19,5608,R,3.027849407,1,119.1751412,3,0,4,false,true,false
-100003,202001,100,46,5161,R,1,1.046156805,179.3296703,0,3,3,true,false,false
-100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
-100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
-100003,202004,100,46,2594,R,3.027849407,1,119.1751412,3,0,4,false,true,false
-100004,202001,100,86,15422.351648,C,1,1.046156805,179.3296703,0,3,3,true,false,false
-100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
-100004,202004,100,86,9352,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 7229f4fa..69a45692 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false
-110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
-110001,202003,100,89,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false
-110002,202001,100,83,4826,R,1,1.357646062,101.710317,0,4,4,true,false,false
-110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
-110002,202003,100,83,4743,R,0.780928323,1,70.26136364,3,0,3,false,true,false
-110003,202001,100,4,7586,R,1,1.357646062,101.710317,0,4,4,true,false,false
-110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
-110003,202003,100,4,1429,R,0.780928323,1,70.26136364,3,0,3,false,true,false
-110004,202001,100,76,3975,R,1,1.357646062,101.710317,0,4,4,true,false,false
-110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
-110004,202003,100,76,2377.145816,FIR,0.780928323,1,70.26136364,3,0,3,false,true,false
-110005,202001,200,27,5217,R,1,1.016800862,182.25,0,3,3,true,false,false
-110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
-110005,202003,200,27,9940,R,1.212689221,1,182.2366412,4,0,4,false,true,false
-110006,202001,200,42,5325,R,1,1.016800862,182.25,0,3,3,true,false,false
-110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
-110006,202003,200,42,6685,R,1.212689221,1,182.2366412,4,0,4,false,true,false
-110007,202001,200,19,5496,R,1,1.016800862,182.25,0,3,3,true,false,false
-110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
-110007,202003,200,19,1235,R,1.212689221,1,182.2366412,4,0,4,false,true,false
-110008,202001,200,43,3978.741774,BI,1,1.016800862,182.25,0,3,3,true,false,false
-110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
-110008,202003,200,43,6013,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 142c8ded..c5302e6b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-120001,202001,100,50,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false
-120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
-120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
-120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
-120001,202005,100,50,1316,R,0.53449544,1,32.73423423,3,0,3,false,true,false
-120002,202001,100,78,7410,R,1,1.268552019,77.38738739,0,3,3,true,false,false
-120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
-120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
-120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
-120002,202005,100,78,1535,R,0.53449544,1,32.73423423,3,0,3,false,true,false
-120003,202001,100,94,4530,R,1,1.268552019,77.38738739,0,3,3,true,false,false
-120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
-120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
-120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
-120003,202005,100,94,4416,R,0.53449544,1,32.73423423,3,0,3,false,true,false
-120004,202001,100,100,7738.738739,C,1,1.268552019,77.38738739,0,3,3,true,false,false
-120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
-120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
-120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
-120004,202005,100,100,3273.423424,FIC,0.53449544,1,32.73423423,3,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index cad00886..872151b2 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-130001,202001,100,20,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false
-130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
-130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
-130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
-130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
-130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
-130001,202007,100,20,3282,R,0.798832987,1,158.7757576,3,0,4,false,true,false
-130002,202001,100,69,687,R,1,0.6743401,102.7515152,0,3,4,true,false,false
-130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
-130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
-130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
-130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
-130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
-130002,202007,100,69,9834,R,0.798832987,1,158.7757576,3,0,4,false,true,false
-130003,202001,100,39,7113,R,1,0.6743401,102.7515152,0,3,4,true,false,false
-130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
-130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
-130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
-130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
-130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
-130003,202007,100,39,6461,R,0.798832987,1,158.7757576,3,0,4,false,true,false
-130004,202001,100,37,2571,R,1,0.6743401,102.7515152,0,3,4,true,false,false
-130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
-130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
-130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
-130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
-130004,202007,100,37,6621,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index c4fffd80..872151b2 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false
-140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
-140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
-140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
-140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
-140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
-140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
-140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false
-140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
-140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
-140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
-140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
-140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
-140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
-140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false
-140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
-140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
-140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
-140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
-140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
-140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
-140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false
-140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
-140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
-140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
-140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
-140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index d05857f5..872151b2 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false
-150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
-150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
-150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
-150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
-150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
-150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false
-150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false
-150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
-150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
-150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
-150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
-150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
-150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false
-150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false
-150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
-150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
-150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
-150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
-150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
-150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false
-150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false
-150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
-150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
-150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
-150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
-150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index e5d1b61a..872151b2 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false
-160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
-160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
-160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
-160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
-160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
-160001,202007,100,76,1666,R,0.819547983,1,71.77202073,3,0,3,false,true,false
-160002,202001,100,32,430,R,1,0.285048351,29.78238342,0,3,3,true,false,false
-160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
-160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
-160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
-160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
-160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
-160002,202007,100,32,2678,R,0.819547983,1,71.77202073,3,0,3,false,true,false
-160003,202001,100,85,3232,R,1,0.285048351,29.78238342,0,3,3,true,false,false
-160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
-160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
-160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
-160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
-160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
-160003,202007,100,85,9508,R,0.819547983,1,71.77202073,3,0,3,false,true,false
-160004,202001,100,33,1022.611409,BI,1,0.285048351,29.78238342,0,3,3,true,false,false
-160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
-160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
-160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
-160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
-160004,202007,100,33,2368.476683,FIC,0.819547983,1,71.77202073,3,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 5fe2932e..6f6f000e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-170001,202001,100,69,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false
-170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
-170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
-170001,202004,100,69,7120,R,1.231814548,1,109.0330189,3,0,3,false,true,false
-170002,202001,100,62,449,R,1,0.41470355,41.93396226,0,3,3,true,false,false
-170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
-170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
-170002,202004,100,62,6745,R,1.231814548,1,109.0330189,3,0,3,false,true,false
-170003,202001,100,81,1961,R,1,0.41470355,41.93396226,0,3,3,true,false,false
-170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
-170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
-170003,202004,100,81,9250,R,1.231814548,1,109.0330189,3,0,3,false,true,false
-170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
-170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index e0438275..6f6f000e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-180001,202001,100,91,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false
-180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
-180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
-180001,202004,100,91,9291,R,1.709926945,1,175.5441176,3,0,3,false,true,false
-180002,202001,100,26,3829,R,1,0.743721487,123.4632353,0,3,3,true,false,false
-180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
-180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
-180002,202004,100,26,8415,R,1.709926945,1,175.5441176,3,0,3,false,true,false
-180003,202001,100,19,3774,R,1,0.743721487,123.4632353,0,3,3,true,false,false
-180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
-180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
-180003,202004,100,19,6168,R,1.709926945,1,175.5441176,3,0,3,false,true,false
-180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
-180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index 6ef80126..9226aaf7 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false
-200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false
-200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false
-200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false
-200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false
-200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false
-200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false
-200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false
-200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false
-200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false
-200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false
-200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false
-200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false
-200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
-200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false
-200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false
-200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
-200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false
-200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false
-200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
-200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false
-200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false
-200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
-200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false
-200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false
-200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false
-200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false
-200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
-200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 06c408bb..a02e2345 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,13.17948717,381,R,0,2,3,true,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
-10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
-10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false
-10005,202001,1,18,1,0.992513369,13.17948717,100,R,0,2,3,true,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false
-10005,202003,2,18,1.173184358,1,50,900.0000004,FIC,2,0,2,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index cb4a0209..a02e2345 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
-10003,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
-10004,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false
-10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index e5653547..a02e2345 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
-10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
-10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false
-10005,202003,2,18,1.173184358,1,50,900,FIC,2,0,2,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 6b5489da..a02e2345 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
-10003,202003,2,12,1.173184358,1,30.76923077,314,R,2,0,3,false,true,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
-10004,202003,2,9,1.173184358,1,30.76923077,736,R,2,0,3,false,true,false
-10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false
-10005,202003,2,18,1.173184358,1,30.76923077,150,R,2,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 5cc9e504..901c11fe 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false
-10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false
-10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10003,202002,2,12,0.590369393,0.934108527131783,30.8974359,267,R,2,3,3,false,false,false
-10003,202003,2,12,1.070539419,1,33.07692308,314,R,3,0,3,false,true,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10004,202002,2,9,0.590369393,0.934108527131783,30.8974359,628,R,2,3,3,false,false,false
-10004,202003,2,9,1.070539419,1,33.07692308,736,R,3,0,3,false,true,false
-10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false
-10005,202002,2,18,0.590369393,0.934108527131783,30.8974359,310,R,2,3,3,false,false,false
-10005,202003,2,18,1.070539419,1,33.07692308,240,R,3,0,3,false,true,false
-10006,202001,1,22,1,0.992513369,13.17948718,289.948718,C,0,2,3,true,false,false
-10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false
-10006,202003,1,22,1.186096257,1,18.48333333,346.5012157,FIC,2,0,2,false,true,false
-10007,202001,2,52,1,1.693854749,72.19047619,3753.904762,C,0,2,2,true,false,false
-10007,202002,2,52,0.590369393,0.934108527131783,30.8974359,2216.190476,FIC,2,3,3,false,false,false
-10007,202003,2,52,1.070539419,1,33.07692308,2372.519265,FIC,3,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
index c676f335..2fadc166 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false
-50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false
-50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true
-50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,true,false,false
-50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,true,false
-50002,202001,100,36,4851,R,1,1.083783427,573.9125874,0,5,5,true,false,false
-50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,true,false
-50002,202003,100,36,8894,FIR,1,1,1,0,0,0,true,true,true
-50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,true,false,false
-50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,true,false
-50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,true,false,false
-50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,true,false
-50003,202003,100,76,769,FIR,1,1,1,0,0,0,true,true,true
-50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,true,false,false
-50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,true,false
-50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,true,false,false
-50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,true,false
-50004,202003,100,30,3245,FIR,1,1,1,0,0,0,true,true,true
-50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,true,false,false
-50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,true,false
-50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,true,false,false
-50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,true,false
-50005,202003,100,85,130000,FIR,1,1,1,0,0,0,true,true,true
-50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,true,false,false
-50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,true,false
-50006,202001,100,71,40747.793706,C,1,1.083783427,573.9125874,0,5,5,true,false,false
-50006,202002,100,71,37597.727272,FIC,0.922693571,1,529.5454545,5,0,5,false,true,false
-50006,202003,100,71,37597.727272,FIC,1,1,1,0,0,0,true,true,true
-50006,202004,100,71,37597.727272,FIC,1,1.161985911,538.03125,0,4,4,true,false,false
-50006,202005,100,71,32356.439872,FIC,0.860595632,1,463.0273438,4,0,4,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
index 9752700f..8e5db810 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
-1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false
-1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false
-1,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false
-2,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
-2,202002,1,1,20,R,2,1,20,2,1,2,false,true,false
-2,202003,1,1,0,R,0,0,10,1,1,2,false,false,false
-2,202004,1,1,30,R,1,1,30,1,0,1,true,true,false
-3,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
-3,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false
-3,202003,1,1,20,R,0,0,10,1,1,2,false,false,false
-3,202004,1,1,20,FIR,1,1,30,1,0,1,true,true,false
-4,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
-4,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false
-4,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false
-4,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
index ad46ad72..a02e2345 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10001,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10001,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
-10001,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false
-10002,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10002,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
-10002,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false
-10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

From 5e3ebbea00fbeae38c2d67c4921aee5055d86384 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 15 May 2023 17:12:26 +0100
Subject: [PATCH 307/531] Restore Data

---
 .../imputation/engine/unit/back_data_no_output.csv     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv b/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
index 3f2ff2d6..c8e23433 100644
--- a/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
+++ b/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
@@ -1,5 +1,5 @@
-
-
-
-
-
+identifier,date,group,other,marker
+111,202901,1,1,R
+111,202902,1,1,R
+111,202903,1,1,R
+111,202904,1,1,R
\ No newline at end of file

From 2bc849bc6836479bdff9f8782447fad2993f05c4 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 17:19:28 +0100
Subject: [PATCH 308/531] Complete conditional inclusion marker column work

---
 .../imputation/engine.py                       |  2 ++
 .../imputation/ratio_calculators.py            | 18 +++++++-----------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index f89286c4..292e9637 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -60,6 +60,8 @@ def impute(
     default_forward_col: Optional[str] = "default_forward",
     default_backward_col: Optional[str] = "default_backward",
     link_inclusion_current_col: Optional[str] = "link_inclusion_current",
+    link_inclusion_previous_col: Optional[str] = "link_inclusion_previous",
+    link_inclusion_next_col: Optional[str] = "link_inclusion_next",
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
     periodicity: Optional[int] = 1,
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 8ae59b89..50865a8c 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -31,8 +31,6 @@ def mean_of_ratios(
     include_zeros: Optional[bool] = False,
     growth_forward_col: Optional[str] = "growth_forward",
     growth_backward_col: Optional[str] = "growth_backward",
-    link_inclusion_previous_col: Optional[str] = "link_inclusion_previous",
-    link_inclusion_next_col: Optional[str] = "link_inclusion_next",
     trim_inclusion_forward_col: Optional[str] = "trim_inclusion_forward",
     trim_inclusion_backward_col: Optional[str] = "trim_inclusion_backward",
     **_kwargs,
@@ -46,24 +44,22 @@ def mean_of_ratios(
         "period",
         "grouping",
         "ref",
-        when(col("current.match"), col("aux")).alias("aux"),
+        when(col("link_inclusion_current"), col("aux")).alias("aux"),
         when(
-            col("previous.match")
+            col("link_inclusion_previous")
             & (lit(include_zeros) | (col("previous.output") != lit(0))),
             col("previous.output"),
         ).alias("previous_output"),
         when(
-            col("current.match")
+            col("link_inclusion_current")
             & (lit(include_zeros) | (col("current.output") != lit(0))),
             col("current.output"),
         ).alias("current_output"),
         when(
-            col("next.match") & (lit(include_zeros) | (col("next.output") != lit(0))),
+            col("link_inclusion_next")
+            & (lit(include_zeros) | (col("next.output") != lit(0))),
             col("next.output"),
         ).alias("next_output"),
-        expr("previous.match AS link_inclusion_previous"),
-        expr("current.match AS link_inclusion_current"),
-        expr("next.match AS link_inclusion_next"),
     ).selectExpr(
         "period",
         "grouping",
@@ -316,7 +312,7 @@ def upper_bound(c):
 
 def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
     df = (
-        df.filter(col("current.match"))
+        df.filter(col("link_inclusion_current"))
         .groupBy("period", "grouping")
         .agg(
             expr(
@@ -365,7 +361,7 @@ def construction(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
     return [
         RatioCalculationResult(
             data=(
-                df.filter(col("current.match"))
+                df.filter(col("link_inclusion_current"))
                 .groupBy("period", "grouping")
                 .agg(
                     expr("sum(current.output)/sum(aux) AS construction"),

From c47452168e572753375ce769af330a92b11834d5 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 15 May 2023 17:23:08 +0100
Subject: [PATCH 309/531] Bad File

---
 tests/fixture_data/imputation/[] | 1 -
 1 file changed, 1 deletion(-)
 delete mode 100644 tests/fixture_data/imputation/[]

diff --git a/tests/fixture_data/imputation/[] b/tests/fixture_data/imputation/[]
deleted file mode 100644
index 8b137891..00000000
--- a/tests/fixture_data/imputation/[]
+++ /dev/null
@@ -1 +0,0 @@
-

From eefdbe277c87900bff5db25cf5fce6ef2889653e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 17:36:47 +0100
Subject: [PATCH 310/531] Revert "Clean up and remove other extranious columns"

This reverts commit de3e7ed07b6e9cf4590376a7069cbbcff1342515.
---
 .../methodology_scenarios/01_C_output.csv     |  10 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  18 +-
 .../03_R_R_FI_output.csv                      |  26 +-
 .../04_R_R_FI_FI_output.csv                   |  34 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  42 +--
 .../06_BI_BI_R_output.csv                     |  26 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  58 ++--
 .../methodology_scenarios/08_R_R_R_output.csv |  26 +-
 .../09_R_NS_C_output.csv                      |  24 +-
 .../10_C_FI_NS_R_output.csv                   |  32 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  50 +--
 .../12_C_FI_FI_FI_FI_output.csv               |  42 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  56 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  56 ++--
 .../17_NS_R_FI_NS_output.csv                  |  30 +-
 .../18_NS_BI_R_NS_output.csv                  |  30 +-
 .../20_mixed_data_output.csv                  |  96 +++---
 .../21_class_change_R_C_FI_output.csv         |  32 +-
 .../22_class_change_C_BI_R_output.csv         |  32 +-
 .../23_class_change_C_C_FI_output.csv         |  32 +-
 .../24_class_change_R_BI_R_output.csv         |  32 +-
 .../25_class_change_C_FI_FI_output.csv        |  44 +--
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  44 +--
 .../32_C_FI_FI_no_response_output.csv         |  32 +-
 .../34_default_link_output.csv                |  42 +--
 .../35_TB_10_R_R_FI_output.csv                |  74 ++---
 .../36_TB_10_BI_BI_R_output.csv               |  74 ++---
 .../37_TB_10_C_FI_FI_output.csv               |  74 ++---
 .../38_T_10_R_R_FI_output.csv                 |  74 ++---
 .../39_B_10_R_R_FI_output.csv                 |  74 ++---
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  62 ++--
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 146 ++++-----
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 128 ++++----
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 128 ++++----
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |  70 ++---
 .../methodology_scenarios/47_TB_50_output.csv |  74 ++---
 ...BI_R_R_50_weight_previous_month_output.csv |  50 +--
 .../50_R_R_FI_50_weight_output.csv            |  50 +--
 .../51_R_R_FI_80_weight_output.csv            |  50 +--
 .../52_BI_BI_R_50_weight_output.csv           |  50 +--
 .../53_C_FI_FI_50_weight_output.csv           |  50 +--
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  98 +++---
 .../55_R_R_FI_50_weight_default_output.csv    |  50 +--
 .../56_BI_BI_R_50_weight_default_output.csv   |  50 +--
 .../57_C_FI_FI_50_weight_default_output.csv   |  50 +--
 ...I_R_R_50_weight_partial_default_output.csv |  98 +++---
 .../59_class_change_50_weight_output.csv      |  62 ++--
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv | 114 +++----
 .../62_mixed_data_50_weight_output.csv        |  86 +++---
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 290 +++++++++---------
 .../64_TB_10_C_FI_FI_50_weight_output.csv     | 146 ++++-----
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv |  70 ++---
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv |  70 ++---
 .../methodology_scenarios/01_C_output.csv     |  10 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  18 +-
 .../03_R_R_FI_output.csv                      |  26 +-
 .../04_R_R_FI_FI_output.csv                   |  34 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  42 +--
 .../06_BI_BI_R_output.csv                     |  26 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  58 ++--
 .../methodology_scenarios/08_R_R_R_output.csv |  26 +-
 .../09_R_NS_C_output.csv                      |  24 +-
 .../10_C_FI_NS_R_output.csv                   |  32 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  50 +--
 .../12_C_FI_FI_FI_FI_output.csv               |  42 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  56 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  56 ++--
 .../17_NS_R_FI_NS_output.csv                  |  30 +-
 .../18_NS_BI_R_NS_output.csv                  |  30 +-
 .../20_mixed_data_output.csv                  |  96 +++---
 .../21_class_change_R_C_FI_output.csv         |  32 +-
 .../22_class_change_C_BI_R_output.csv         |  32 +-
 .../23_class_change_C_C_FI_output.csv         |  32 +-
 .../24_class_change_R_BI_R_output.csv         |  32 +-
 .../25_class_change_C_FI_FI_output.csv        |  44 +--
 .../31_no_response_output.csv                 |  62 ++--
 .../32_divide_by_zero_output.csv              |  34 +-
 .../33_multi_variable_C_BI_R_output.csv       |  32 +-
 82 files changed, 2269 insertions(+), 2269 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index b46f3d86..16b5f0b8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,true,false
-10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,true,false
-10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,true,false
-10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,true,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,,,true,true,false
+10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,,,true,true,false
+10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,,,true,true,false
+10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 596cabe6..52e4bc0f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,false,false
-20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,false,true,false
-20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,false,false
-20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,false,true,false
-20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,true,false,false
-20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,false,true,false
-20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,true,false,false
-20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
+20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
+20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
+20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
+20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
+20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
+20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,,,true,false,false
+20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 50e58056..2c459ebb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,false,false
-30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,false,false,false
-30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,false,true,false
-30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,true,false,false
-30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,false,false,false
-30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,false,true,false
-30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,true,false,false
-30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,false,false,false
-30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,false,true,false
-30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,true,false,false
-30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,false,false,false
-30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,,true,true,false,false
+30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
+30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,,false,true,false
+30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,,true,true,false,false
+30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
+30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,true,,false,true,false
+30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,,true,true,false,false
+30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
+30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,true,,false,true,false
+30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,,true,true,false,false
+30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,true,,false,false,false
+30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index b550328e..88b0824d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,false,false
-40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
-40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
-40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,false,true,false
-40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,true,false,false
-40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
-40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
-40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,false,true,false
-40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,true,false,false
-40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
-40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
-40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,false,true,false
-40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,true,false,false
-40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
-40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
-40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
+40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
+40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
+40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
+40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
+40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
+40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
+40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
+40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
+40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
+40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
+40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
+40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
+40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,true,,false,false,false
+40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,,,false,false,false
+40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index aad1ac09..579ce8a1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,false,false
-50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
-50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
-50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
-50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,false,true,false
-50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,true,false,false
-50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
-50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
-50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
-50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,false,true,false
-50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,true,false,false
-50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
-50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
-50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
-50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,false,true,false
-50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,true,false,false
-50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
-50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
-50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
-50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
+50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
+50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
+50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
+50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
+50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
+50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
+50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
+50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
+50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
+50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
+50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
+50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
+50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
+50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
+50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
+50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,true,,false,false,false
+50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,false,false,false
+50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,false,false,false
+50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index 5571fa51..39c94b90 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,false,false
-60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
-60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,false,true,false
-60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,true,false,false
-60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
-60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,false,true,false
-60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,true,false,false
-60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
-60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,false,true,false
-60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,true,false,false
-60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
-60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
+60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
+60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
+60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
+60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
+60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
+60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
+60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
+60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
+60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,,,true,false,false
+60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,,,false,false,false
+60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index acec7fe8..7516338f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,false,false
-70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
-70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
-70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
-70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
-70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
-70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,false,true,false
-70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,true,false,false
-70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
-70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
-70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
-70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
-70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
-70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,false,true,false
-70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,true,false,false
-70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
-70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
-70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
-70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
-70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
-70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,false,true,false
-70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,true,false,false
-70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
-70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
-70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
-70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
-70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
-70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,,true,true,false,false
+70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
+70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
+70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
+70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
+70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
+70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,true,,false,true,false
+70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,,true,true,false,false
+70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
+70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
+70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
+70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
+70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
+70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,true,,false,true,false
+70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,,true,true,false,false
+70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
+70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
+70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
+70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
+70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
+70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,true,,false,true,false
+70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,,,true,false,false
+70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,,,false,false,false
+70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,,,false,false,false
+70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,,,false,false,false
+70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,,,false,false,false
+70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,,,false,false,false
+70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index b1d4610f..09ac6c6d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,false,false
-80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
-80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,false,true,false
-80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,true,false,false
-80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
-80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,false,true,false
-80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,true,false,false
-80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
-80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,false,true,false
-80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,true,false,false
-80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
-80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
+80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
+80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
+80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
+80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
+80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
+80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
+80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
+80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
+80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
+80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
+80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 6f5673fb..94269506 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,false,false
-90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
-90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,false,true,false
-90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,true,false,false
-90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
-90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,false,true,false
-90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,true,false,false
-90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
-90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,false,true,false
-90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,true,false,false
-90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
+90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
+90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
+90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
+90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
+90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
+90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
+90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
+90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
+90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,,,true,false,false
+90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index 9a716bbe..d09c24c0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,false,false
-100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
-100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
-100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,false,true,false
-100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,true,false,false
-100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
-100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
-100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,false,true,false
-100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,true,false,false
-100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
-100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
-100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,false,true,false
-100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,true,false,false
-100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
-100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
+100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
+100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
+100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
+100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
+100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
+100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
+100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
+100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
+100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
+100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
+100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
+100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,,,true,false,false
+100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,,,false,false,false
+100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index f4918ae6..fbfe7ef1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,false,false
-110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
-110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,false,true,false
-110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,true,false,false
-110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
-110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,false,true,false
-110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,true,false,false
-110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
-110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,false,true,false
-110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,true,false,false
-110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
-110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,false,true,false
-110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,true,false,false
-110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
-110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,false,true,false
-110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,true,false,false
-110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
-110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,false,true,false
-110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,true,false,false
-110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
-110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,false,true,false
-110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,true,false,false
-110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
-110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,,true,true,false,false
+110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
+110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
+110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,,true,true,false,false
+110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
+110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
+110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,,true,true,false,false
+110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
+110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
+110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,,true,true,false,false
+110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,true,,false,false,false
+110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,,,false,true,false
+110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,,true,true,false,false
+110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
+110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
+110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,,true,true,false,false
+110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
+110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
+110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,,true,true,false,false
+110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
+110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
+110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,,,true,false,false
+110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,,true,false,false,false
+110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 72834ed2..ca898661 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,false,false
-120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
-120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
-120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
-120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,false,true,false
-120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,true,false,false
-120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
-120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
-120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
-120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,false,true,false
-120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,true,false,false
-120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
-120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
-120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
-120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,false,true,false
-120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,true,false,false
-120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
-120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
-120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
-120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
+120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
+120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
+120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
+120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
+120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
+120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
+120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
+120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
+120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
+120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
+120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
+120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
+120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
+120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
+120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,,,true,false,false
+120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,,,false,false,false
+120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,,,false,false,false
+120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,,,false,false,false
+120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 2d0c0639..c4c95a60 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,false,false
-130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
-130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
-130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
-130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
-130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
-130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,false,true,false
-130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,true,false,false
-130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
-130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
-130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
-130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
-130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
-130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,false,true,false
-130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,true,false,false
-130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
-130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
-130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
-130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
-130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
-130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,false,true,false
-130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,true,false,false
-130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
-130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
-130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
-130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
-130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
+130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
+130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
+130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
+130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
+130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
+130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
+130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
+130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
+130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
+130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
+130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
+130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
+130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
+130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
+130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
+130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
+130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
+130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
+130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
+130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
+130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,,,true,false,false
+130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,,,false,false,false
+130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,,,false,false,false
+130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,,,false,false,false
+130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,,,false,false,false
+130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 85b42e81..0de8c87f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,false,false
-140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
-140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
-140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
-140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
-140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
-140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,false,true,false
-140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,true,false,false
-140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
-140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
-140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
-140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
-140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
-140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,false,true,false
-140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,true,false,false
-140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
-140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
-140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
-140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
-140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
-140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,false,true,false
-140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,true,false,false
-140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
-140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
-140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
-140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
-140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
+140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
+140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
+140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
+140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
+140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
+140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
+140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
+140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
+140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
+140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
+140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
+140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
+140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
+140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
+140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
+140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
+140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
+140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
+140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
+140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
+140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,,,true,false,false
+140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,,,false,false,false
+140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,,,false,false,false
+140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,,,false,false,false
+140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,,,false,false,false
+140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 6db51ee1..f6ec0754 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,false,false
-150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
-150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
-150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
-150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
-150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
-150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,false,true,false
-150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,true,false,false
-150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
-150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
-150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
-150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
-150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
-150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,false,true,false
-150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,true,false,false
-150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
-150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
-150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
-150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
-150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
-150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,false,true,false
-150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,true,false,false
-150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
-150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
-150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
-150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
-150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
+150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
+150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
+150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
+150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
+150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
+150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
+150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
+150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
+150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
+150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
+150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
+150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
+150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
+150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
+150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
+150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
+150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
+150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
+150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
+150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
+150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,,,true,false,false
+150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,false,false,false
+150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,,,false,false,false
+150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,,,false,false,false
+150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,,,false,false,false
+150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 898de9e1..40eefc8a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,false,true,false
-160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,true,false,false
-160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
-160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
-160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
-160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
-160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
+160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,,,true,false,false
+160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,,,false,false,false
+160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,,,false,false,false
+160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,,,false,false,false
+160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,,,false,false,false
+160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index c9376319..7963caa2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,false,false
-170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
-170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
-170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,false,true,false
-170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,true,false,false
-170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
-170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
-170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,false,true,false
-170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,true,false,false
-170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
-170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
-170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,false,true,false
-170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
-170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
+170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
+170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
+170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
+170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
+170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
+170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
+170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
+170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
+170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
+170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
+170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
+170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,,,false,false,false
+170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,,,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 4d2792e5..889cc8bf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,false,false
-180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
-180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
-180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,false,true,false
-180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,true,false,false
-180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
-180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
-180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,false,true,false
-180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,true,false,false
-180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
-180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
-180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,false,true,false
-180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
-180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
+180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
+180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
+180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
+180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
+180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
+180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
+180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
+180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
+180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
+180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
+180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
+180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,,,false,false,false
+180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,,,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index f4125f92..08be556c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,false,false
-200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,true,false,false
-200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,true,false,false
-200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,true,false,false
-200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,true,false,false
-200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,true,false,false
-200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,true,false,false
-200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
-200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,false,true,false
-200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,true,false,false
-200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
-200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,false,true,false
-200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,true,false,false
-200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
-200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,false,true,false
-200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,true,false,false
-200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
-200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,false,true,false
-200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,true,false,false
-200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,false,true,false
-200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,true,false,false
-200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
-200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
+200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
+200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
+200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
+200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
+200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
+200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
+200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
+200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
+200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
+200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
+200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
+200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
+200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,true,,false,false,false
+200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,,,false,false,false
+200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,,,false,true,false
+200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,,,true,false,false
+200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,false,false,false
+200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,false,false,false
+200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,,,false,true,false
+200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,,,true,false,false
+200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,,,false,false,false
+200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,,true,false,false,false
+200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
+200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
+200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
+200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
+200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
+200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
+200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
+200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
+200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
+200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
+200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
+200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
+200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
+200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
+200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,,true,false,false,false
+200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,true,,false,false,false
+200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
+200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
+200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,,,false,false,false
+200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
+200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
+200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,,,false,false,false
+200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,,,false,false,false
+200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index bb7a557d..67b8c9eb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
-210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
-210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
-210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
-210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
-210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,false,true,false
-210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
-210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,false,true,false
-210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
-210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,,false,true,false
+210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,,false,true,false
+210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
+210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
+210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 3e9171b7..9c116a23 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,false,false
-220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
-220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,false,false
-220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
-220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
-220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,false,true,false
-220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
-220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,false,true,false
-220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,true,false,false
-220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
+220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
+220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,true,,false,true,false
+220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,true,,false,true,false
+220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,true,false,false
+220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
+220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 1e9d4baa..5e3b325a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,false,false
-230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
-230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,false,false
-230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
-230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
-230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,false,true,false
-230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
-230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,false,true,false
-230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,true,false,false
-230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
+230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
+230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,,false,true,false
+230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,,false,true,false
+230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,true,false,false
+230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
+230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 27285e21..a5242247 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
-240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
-240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
-240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
-240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
-240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,false,true,false
-240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
-240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,false,true,false
-240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
-240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,true,,false,true,false
+240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
+240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,true,,false,true,false
+240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
+240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
+240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 54f49f94..fe7ea411 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
-250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
-250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
-250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
-250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
-250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
-250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,false,true,false
-250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
-250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
-250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,false,true,false
-250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
-250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
-250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,false,true,false
-250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,true,false,false
-250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,false,true,false
-250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,true,false,false
-250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
-250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
+250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
+250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
+250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,true,true,false,false,false
+250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
+250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
+250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,true,true,false,false,false
+250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
+250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
+250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,,true,false,false,false
+250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
+250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
+250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,,,false,false,false
+250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,,,false,true,false
+250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,,,true,false,false
+250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,,,false,false,false
+250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index 53d7fd04..1e6cbe1c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,false,true,false
-110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,true,true,false
-110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,true,true,false
-110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,true,true,false
-110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,true,true,false
-110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,true,true,false
-110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,true,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,,,true,true,false
+110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,,,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,,,true,true,false
+110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,,,true,true,false
+110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,,,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,,,true,true,false
+110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,,,true,true,false
+110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,,,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,,,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index c96a4f46..4845af83 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,false,true,false
-110005,202001,200,27,,,1,1,1,27,C,0,0,0,true,true,true
-110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,true,true,true
-110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,true,true,true
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,,1,1,1,27,C,0,0,0,,,true,true,true
+110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,,,true,true,true
+110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,,,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index 8145b9cb..6e1dc4ca 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,false,true
-120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,false,false,true
-120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,false,false,true
-120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,false,false,true
-120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,false,true,true
-120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,true,false,true
-120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,false,false,true
-120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,false,false,true
-120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,false,false,true
-120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,false,true,true
-120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,true,false,true
-120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,false,false,true
-120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,false,false,true
-120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,false,false,true
-120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,false,true,true
-120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,true,false,true
-120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,false,false,true
-120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,false,false,true
-120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,false,false,true
-120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,false,true,true
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,,true,true,false,true
+120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,true,true,false,false,true
+120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,true,true,false,false,true
+120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,true,true,false,false,true
+120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,true,,false,true,true
+120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,,true,true,false,true
+120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,true,true,false,false,true
+120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,true,true,false,false,true
+120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,true,true,false,false,true
+120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,true,,false,true,true
+120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,,true,true,false,true
+120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,true,true,false,false,true
+120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,true,true,false,false,true
+120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,true,true,false,false,true
+120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,true,,false,true,true
+120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,,,true,false,true
+120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,,,false,false,true
+120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,,,false,false,true
+120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,,,false,false,true
+120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,,,false,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 85f86898..423122d9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,true,false,false
-30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,false,true,false
-30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,false,true,false
-30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,false,false
-30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,,true,true,false,false
+30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,true,,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index 040ac5d0..ec344277 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,false,false,false
-30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,true,,false,true,false
+30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,,,false,false,false
+30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index d3b65d74..476af72c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,,false,true,false
+30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,,,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index 870926e0..b9fc2b54 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,false,false,false
-30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,false,true,false
-30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,true,false,false
-30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,false,false,false
-30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,,true,true,false,false
+30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,true,,false,false,false
+30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index 4771e1e5..7fcd436a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,true,false,false
-30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,false,true,false
-30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,false,false,false
-30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,true,false,false
-30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,false,false,false
-30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,,true,true,false,false
+30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,true,,false,false,false
+30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index fdc96e37..767cbfb8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,true,false,false
-30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,false,false,false
-30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,,true,true,false,false
+30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,true,,false,false,false
+30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 555dedfb..7abdc719 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,false,false
-80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,false,false,false
-80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,false,true,false
-80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,true,false,false
-80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,false,false,false
-80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,false,true,false
-80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,true,false,false
-80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,false,false,false
-80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,false,true,false
-80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,true,false,false
-80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,false,false,false
-80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,false,true,false
-80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,true,false,false
-80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,false,false,false
-80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,false,true,false
-80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,true,false,false
-80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,false,false,false
-80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,false,true,false
-80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,true,false,false
-80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,false,false,false
-80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,false,true,false
-80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,true,false,false
-80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,false,false,false
-80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,false,true,false
-80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,true,false,false
-80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,false,false,false
-80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,false,true,false
-80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,true,false,false
-80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,false,false,false
-80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,false,true,false
-80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,true,false,false
-80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,false,false,false
-80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,false,true,false
-80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,true,false,false
-80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,false,false,false
-80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,false,true,false
-80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,false,false
-80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,false,false,false
-80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,false,true,false
-80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,false,false
-80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,false,false,false
-80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,false,true,false
-80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,false,false
-80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,false,false,false
-80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,false,true,false
-80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,false,false
-80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,false,false,false
-80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,false,true,false
-80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,false,false
-80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,false,false,false
-80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,false,true,false
-80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,false,false
-80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,false,false,false
-80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,false,true,false
-80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,false,false
-80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,false,false,false
-80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,false,true,false
-80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,false,false
-80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,false,false,false
-80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,false,true,false
-80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,false,false
-80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,false,false,false
-80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,false,true,false
-80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,false,false
-80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,false,false,false
-80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,false,true,false
-80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,false,false
-80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,false,false,false
-80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,false,true,false
-80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,true,false,false
-80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,false,false,false
-80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,,true,true,false,false
+80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,true,true,false,false,false
+80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,,false,true,false
+80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,,true,true,false,false
+80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,true,true,false,false,false
+80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,true,,false,true,false
+80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,,true,true,false,false
+80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,true,true,false,false,false
+80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,true,,false,true,false
+80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,,true,true,false,false
+80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,true,true,false,false,false
+80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,true,,false,true,false
+80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,,true,true,false,false
+80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,true,true,false,false,false
+80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,true,,false,true,false
+80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,,true,true,false,false
+80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,true,true,false,false,false
+80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,true,,false,true,false
+80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,,true,true,false,false
+80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,true,true,false,false,false
+80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,true,,false,true,false
+80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,,true,true,false,false
+80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,true,true,false,false,false
+80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,true,,false,true,false
+80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,,true,true,false,false
+80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,true,true,false,false,false
+80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,true,,false,true,false
+80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,,true,true,false,false
+80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,true,true,false,false,false
+80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,true,,false,true,false
+80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,,true,true,false,false
+80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,true,true,false,false,false
+80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,true,,false,true,false
+80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,,true,true,false,false
+80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,true,,false,false,false
+80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,,,false,true,false
+80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,,true,true,false,false
+80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,true,true,false,false,false
+80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,true,,false,true,false
+80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,,true,true,false,false
+80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,true,true,false,false,false
+80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,true,,false,true,false
+80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,,true,true,false,false
+80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,true,true,false,false,false
+80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,true,,false,true,false
+80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,,true,true,false,false
+80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,true,true,false,false,false
+80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,true,,false,true,false
+80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,,true,true,false,false
+80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,true,true,false,false,false
+80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,true,,false,true,false
+80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,,true,true,false,false
+80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,true,true,false,false,false
+80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,true,,false,true,false
+80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,,true,true,false,false
+80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,true,true,false,false,false
+80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,true,,false,true,false
+80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,,true,true,false,false
+80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,true,true,false,false,false
+80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,true,,false,true,false
+80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,,true,true,false,false
+80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,true,true,false,false,false
+80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,true,,false,true,false
+80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,,true,true,false,false
+80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,true,true,false,false,false
+80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,true,,false,true,false
+80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,,true,true,false,false
+80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,true,true,false,false,false
+80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,true,,false,true,false
+80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,,,true,false,false
+80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,,true,false,false,false
+80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index ad1513f9..d7ea5894 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,false,false
-90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,false,false,false
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,false,true,false
-90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,true,false,false
-90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,false,false,false
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,false,true,false
-90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,true,false,false
-90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,false,false,false
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,false,true,false
-90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,true,false,false
-90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,false,false,false
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,false,true,false
-90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,true,false,false
-90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,false,false,false
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,false,true,false
-90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,true,false,false
-90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,false,false,false
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,false,true,false
-90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,true,false,false
-90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,false,false,false
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,false,true,false
-90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,false,false
-90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,false,false,false
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,false,true,false
-90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,true,false,false
-90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,false,false,false
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,false,true,false
-90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,true,false,false
-90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,false,false,false
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,false,true,false
-90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,true,false,false
-90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,false,false,false
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,false,true,false
-90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,false,false
-90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,false,false,false
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,false,true,false
-90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,true,false,false
-90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,false,false,false
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,false,true,false
-90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,true,false,false
-90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,false,false,false
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,false,true,false
-90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,true,false,false
-90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,false,false,false
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,false,true,false
-90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,true,false,false
-90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,false,false,false
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,false,true,false
-90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,true,false,false
-90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,false,false,false
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,false,true,false
-90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,true,false,false
-90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,false,false,false
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,false,true,false
-90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,true,false,false
-90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,false,false,false
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,false,true,false
-90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,true,false,false
-90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,false,false,false
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,false,true,false
-90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,true,false,false
-90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,false,false,false
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,,true,true,false,false
+90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,true,true,false,false,false
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,,false,true,false
+90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,,true,true,false,false
+90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,true,true,false,false,false
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,,false,true,false
+90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,,true,true,false,false
+90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,true,true,false,false,false
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,,false,true,false
+90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,,true,true,false,false
+90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,true,true,false,false,false
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,,false,true,false
+90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,,true,true,false,false
+90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,true,true,false,false,false
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,,false,true,false
+90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,,true,true,false,false
+90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,true,true,false,false,false
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,,false,true,false
+90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,,true,true,false,false
+90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,true,true,false,false,false
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,,false,true,false
+90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,,true,true,false,false
+90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,true,true,false,false,false
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,,false,true,false
+90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,,true,true,false,false
+90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,true,true,false,false,false
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,,false,true,false
+90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,,true,true,false,false
+90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,true,true,false,false,false
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,,false,true,false
+90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,,true,true,false,false
+90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,true,true,false,false,false
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,,false,true,false
+90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,,true,true,false,false
+90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,true,true,false,false,false
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,,false,true,false
+90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,,true,true,false,false
+90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,true,true,false,false,false
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,,false,true,false
+90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,,true,true,false,false
+90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,true,true,false,false,false
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,,false,true,false
+90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,,true,true,false,false
+90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,true,true,false,false,false
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,,false,true,false
+90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,,true,true,false,false
+90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,true,true,false,false,false
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,,false,true,false
+90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,,true,true,false,false
+90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,true,true,false,false,false
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,,false,true,false
+90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,,true,true,false,false
+90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,true,true,false,false,false
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,,false,true,false
+90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,,true,true,false,false
+90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,true,true,false,false,false
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,,false,true,false
+90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,,true,true,false,false
+90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,true,true,false,false,false
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,,false,true,false
+90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,,,true,false,false
+90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,,,false,false,false
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index 560b8c9a..d4277f90 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,false,false
-100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,false,false,false
-100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,false,true,false
-100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,true,false,false
-100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,false,false,false
-100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,false,true,false
-100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,true,false,false
-100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,false,false,false
-100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,false,true,false
-100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,true,false,false
-100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,false,false,false
-100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,false,true,false
-100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,true,false,false
-100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,false,false,false
-100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,false,true,false
-100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,true,false,false
-100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,false,false,false
-100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,false,true,false
-100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,true,false,false
-100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,false,false,false
-100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,false,true,false
-100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,false,false
-100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,false,false,false
-100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,false,true,false
-100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,true,false,false
-100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,false,false,false
-100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,false,true,false
-100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,true,false,false
-100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,false,false,false
-100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,false,true,false
-100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,true,false,false
-100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,false,false,false
-100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,false,true,false
-100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,false,false
-100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,false,false,false
-100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,false,true,false
-100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,true,false,false
-100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,false,false,false
-100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,false,true,false
-100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,true,false,false
-100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,false,false,false
-100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,false,true,false
-100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,true,false,false
-100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,false,false,false
-100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,false,true,false
-100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,true,false,false
-100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,false,false,false
-100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,false,true,false
-100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,true,false,false
-100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,false,false,false
-100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,false,true,false
-100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,true,false,false
-100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,false,false,false
-100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,false,true,false
-100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,true,false,false
-100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,false,false,false
-100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,false,true,false
-100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,true,false,false
-100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,false,false,false
-100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,false,true,false
-100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,true,false,false
-100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,false,false,false
-100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,,true,true,false,false
+100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,true,true,false,false,false
+100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,true,,false,true,false
+100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,,true,true,false,false
+100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,true,true,false,false,false
+100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,true,,false,true,false
+100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,,true,true,false,false
+100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,true,true,false,false,false
+100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,true,,false,true,false
+100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,,true,true,false,false
+100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,true,true,false,false,false
+100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,true,,false,true,false
+100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,,true,true,false,false
+100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,true,true,false,false,false
+100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,true,,false,true,false
+100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,,true,true,false,false
+100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,true,true,false,false,false
+100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,true,,false,true,false
+100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,,true,true,false,false
+100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,true,true,false,false,false
+100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,true,,false,true,false
+100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,,true,true,false,false
+100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,true,true,false,false,false
+100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,true,,false,true,false
+100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,,true,true,false,false
+100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,true,true,false,false,false
+100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,true,,false,true,false
+100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,,true,true,false,false
+100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,true,true,false,false,false
+100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,true,,false,true,false
+100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,,true,true,false,false
+100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,true,true,false,false,false
+100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,true,,false,true,false
+100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,,true,true,false,false
+100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,true,true,false,false,false
+100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,true,,false,true,false
+100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,,true,true,false,false
+100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,true,true,false,false,false
+100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,true,,false,true,false
+100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,,true,true,false,false
+100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,true,true,false,false,false
+100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,true,,false,true,false
+100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,,true,true,false,false
+100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,true,true,false,false,false
+100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,true,,false,true,false
+100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,,true,true,false,false
+100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,true,true,false,false,false
+100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,true,,false,true,false
+100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,,true,true,false,false
+100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,true,true,false,false,false
+100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,true,,false,true,false
+100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,,true,true,false,false
+100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,true,true,false,false,false
+100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,true,,false,true,false
+100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,,true,true,false,false
+100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,true,true,false,false,false
+100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,true,,false,true,false
+100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,,true,true,false,false
+100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,true,true,false,false,false
+100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,true,,false,true,false
+100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,,,true,false,false
+100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,,,false,false,false
+100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index f760bbc7..efee5fad 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,false,false
-30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,false,false,false
-30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,true,false,false
-30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,false,false,false
-30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,true,false,false
-30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,false,false,false
-30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,true,false,false
-30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,false,false,false
-30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,true,false,false
-30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,false,false,false
-30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,,true,true,false,false
+30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,,true,true,false,false
+30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,,true,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,true,true,false,false,false
+30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,true,true,false,false,false
+30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,,true,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,true,true,false,false,false
+30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,,true,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,true,true,false,false,false
+30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,,true,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,true,true,false,false,false
+30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,,true,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,true,true,false,false,false
+30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,,true,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,,true,true,false,false
+30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,true,,false,false,false
+30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,,true,true,false,false
+30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,true,,false,false,false
+30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,,true,true,false,false
+30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,true,,false,false,false
+30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index 1f7c7504..56e5d8df 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,false,false
-30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,false,false,false
-30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,true,false,false
-30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,false,false,false
-30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,false,false,false
-30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,false,false,false
-30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,false,false,false
-30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,false,false,false
-30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,false,false,false
-30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,false,false,false
-30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,false,false,false
-30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,true,false,false
-30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,false,false,false
-30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,false,true,false
-30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,true,false,false
-30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,false,false,false
-30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,false,true,false
-30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,true,false,false
-30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,false,false,false
-30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,,true,true,false,false
+30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,true,true,false,false,false
+30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,true,,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,,true,true,false,false
+30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,true,true,false,false,false
+30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,true,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,,true,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,true,true,false,false,false
+30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,true,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,,true,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,true,true,false,false,false
+30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,true,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,,true,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,true,true,false,false,false
+30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,true,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,,true,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,true,true,false,false,false
+30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,true,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,,true,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,true,true,false,false,false
+30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,true,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,,true,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,true,true,false,false,false
+30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,true,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,,true,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,true,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,,true,true,false,false
+30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,true,true,false,false,false
+30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,,true,true,false,false
+30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,true,true,false,false,false
+30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,true,,false,true,false
+30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,,true,true,false,false
+30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,true,,false,false,false
+30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
index 62ed7876..b0f6908a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.7103175,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.7103175,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.7103175,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,false,true,false
-110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,false,false,false
-110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,false,true,false
-110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,false,false,false
-110006,202003,200,42,0.862914677,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,false,true,false
-110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,false,false,false
-110007,202003,200,19,1.222772277,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,false,true,false
-110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.48471,BI,0,3,3,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,false,false,false
-110008,202003,200,43,1.53667263,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.7103175,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.7103175,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.7103175,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,,true,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,true,true,false,false,false
+110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,true,,false,true,false
+110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,,true,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,true,true,false,false,false
+110006,202003,200,42,0.862914677,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,true,,false,true,false
+110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,,true,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,true,true,false,false,false
+110007,202003,200,19,1.222772277,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,true,,false,true,false
+110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.48471,BI,0,3,3,,,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,,true,false,false,false
+110008,202003,200,43,1.53667263,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 742f461f..0d399687 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,false,false,false
-30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,false,false,false
-30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,false,false,false
-30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,true,false,false
-30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,false,false,false
-30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,,true,true,false,false
+30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,,false,false,false
+30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,,,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index aa6f1128..6273276e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,false,false,false
-30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,true,false,false
-30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,,true,true,false,false
+30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,,,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index fedf150b..fe23ecca 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,false,false
-60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,false,false,false
-60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,false,true,false
-60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,true,false,false
-60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,false,false,false
-60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,false,true,false
-60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,true,false,false
-60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,false,false,false
-60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,false,true,false
-60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,true,false,false
-60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,false,false,false
-60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,false,true,false
-60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,
-60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,
-60002,201901,100,71,,,,,,1,1.5274,50.3694,,,,,,,,
-60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-60002,201903,100,71,,,,,,1.113,1,89.3761,,,,,,,,
-60003,201901,100,26,,,,,,1,1.5274,50.3694,,,,,,,,
-60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-60003,201903,100,26,,,,,,1.113,1,89.3761,,,,,,,,
-60004,201901,100,3,,,,,,1,1.5274,50.3694,,,,,,,,
-60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-60004,201903,100,3,,,,,,1.113,1,89.3761,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,,true,true,false,false
+60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,true,true,false,false,false
+60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,true,,false,true,false
+60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,,true,true,false,false
+60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,true,true,false,false,false
+60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,true,,false,true,false
+60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,,true,true,false,false
+60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,true,true,false,false,false
+60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,true,,false,true,false
+60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,,,true,false,false
+60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,,,false,false,false
+60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,,,false,true,false
+60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,,,
+60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,,,
+60002,201901,100,71,,,,,,1,1.5274,50.3694,,,,,,,,,,
+60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+60002,201903,100,71,,,,,,1.113,1,89.3761,,,,,,,,,,
+60003,201901,100,26,,,,,,1,1.5274,50.3694,,,,,,,,,,
+60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+60003,201903,100,26,,,,,,1.113,1,89.3761,,,,,,,,,,
+60004,201901,100,3,,,,,,1,1.5274,50.3694,,,,,,,,,,
+60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+60004,201903,100,3,,,,,,1.113,1,89.3761,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index e3896fa4..6ee1ca3f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,false,false,false
-30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,true,false,false
-30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
+30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,,,true,false,false
+30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,,,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,,,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index ccca4704..f222bebe 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,
-110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,,true,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,,true,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,,true,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,true,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,,false,true,false
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,
+110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 01847685..78f446c1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,false,false,false
-30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,false,false,false
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,false,false,false
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,true,false,false
-30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,false,false,false
-30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,false,true,false
-30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,
-30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,
-30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,
-30002,201901,100,72,,,1,1.5274,50.3694,,,,,,,,,,,
-30002,201902,100,72,,,1,1.8795,121.4187,,,,,,,,,,,
-30002,201903,100,72,,,1,1,89.3761,,,,,,,,,,,
-30003,201901,100,7,,,1,1.5274,50.3694,,,,,,,,,,,
-30003,201902,100,7,,,1,1.8795,121.4187,,,,,,,,,,,
-30003,201903,100,7,,,1,1,89.3761,,,,,,,,,,,
-30004,201901,100,81,,,1,1.5274,50.3694,,,,,,,,,,,
-30004,201902,100,81,,,1,1.8795,121.4187,,,,,,,,,,,
-30004,201903,100,81,,,1,1,89.3761,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,,true,true,false,false
+30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,true,,false,false,false
+30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,,,false,true,false
+30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,,,
+30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,,,
+30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,,,
+30002,201901,100,72,,,1,1.5274,50.3694,,,,,,,,,,,,,
+30002,201902,100,72,,,1,1.8795,121.4187,,,,,,,,,,,,,
+30002,201903,100,72,,,1,1,89.3761,,,,,,,,,,,,,
+30003,201901,100,7,,,1,1.5274,50.3694,,,,,,,,,,,,,
+30003,201902,100,7,,,1,1.8795,121.4187,,,,,,,,,,,,,
+30003,201903,100,7,,,1,1,89.3761,,,,,,,,,,,,,
+30004,201901,100,81,,,1,1.5274,50.3694,,,,,,,,,,,,,
+30004,201902,100,81,,,1,1.8795,121.4187,,,,,,,,,,,,,
+30004,201903,100,81,,,1,1,89.3761,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index 07f587fa..5974c5b5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,true,false,false
-60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,false,false,false
-60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,false,true,false
-60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,true,false,false
-60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,false,false,false
-60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,false,true,false
-60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,true,false,false
-60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,false,false,false
-60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,false,true,false
-60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,true,false,false
-60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,false,false,false
-60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,false,true,false
-60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,
-60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,
-60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,
-60002,201901,100,71,,,1,1,50.3694,,,,,,,,,,,
-60002,201902,100,71,,,0.9685,1,121.4187,,,,,,,,,,,
-60002,201903,100,71,,,1.113,1,89.3761,,,,,,,,,,,
-60003,201901,100,26,,,1,1,50.3694,,,,,,,,,,,
-60003,201902,100,26,,,0.9685,1,121.4187,,,,,,,,,,,
-60003,201903,100,26,,,1.113,1,89.3761,,,,,,,,,,,
-60004,201901,100,3,,,1,1,50.3694,,,,,,,,,,,
-60004,201902,100,3,,,0.9685,1,121.4187,,,,,,,,,,,
-60004,201903,100,3,,,1.113,1,89.3761,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,,true,true,false,false
+60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,true,true,false,false,false
+60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,true,,false,true,false
+60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,,true,true,false,false
+60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,true,true,false,false,false
+60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,true,,false,true,false
+60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,,true,true,false,false
+60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,true,true,false,false,false
+60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,true,,false,true,false
+60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,,,true,false,false
+60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,,,false,false,false
+60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,,,false,true,false
+60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,,,
+60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,,,
+60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,,,
+60002,201901,100,71,,,1,1,50.3694,,,,,,,,,,,,,
+60002,201902,100,71,,,0.9685,1,121.4187,,,,,,,,,,,,,
+60002,201903,100,71,,,1.113,1,89.3761,,,,,,,,,,,,,
+60003,201901,100,26,,,1,1,50.3694,,,,,,,,,,,,,
+60003,201902,100,26,,,0.9685,1,121.4187,,,,,,,,,,,,,
+60003,201903,100,26,,,1.113,1,89.3761,,,,,,,,,,,,,
+60004,201901,100,3,,,1,1,50.3694,,,,,,,,,,,,,
+60004,201902,100,3,,,0.9685,1,121.4187,,,,,,,,,,,,,
+60004,201903,100,3,,,1.113,1,89.3761,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index 755ab6ab..56069578 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,false,false,false
-30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,false,false,false
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,false,false,false
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,true,false,false
-30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,false,false,false
-30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,false,true,false
-30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,
-30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,
-30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,
-30002,201901,100,72,,,1,1.5274,1,,,,,,,,,,,
-30002,201902,100,72,,,0.9685,1.8795,1,,,,,,,,,,,
-30002,201903,100,72,,,1.113,1,1,,,,,,,,,,,
-30003,201901,100,7,,,1,1.5274,1,,,,,,,,,,,
-30003,201902,100,7,,,0.9685,1.8795,1,,,,,,,,,,,
-30003,201903,100,7,,,1.113,1,1,,,,,,,,,,,
-30004,201901,100,81,,,1,1.5274,1,,,,,,,,,,,
-30004,201902,100,81,,,0.9685,1.8795,1,,,,,,,,,,,
-30004,201903,100,81,,,1.113,1,1,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,true,,false,true,false
+30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,,,true,false,false
+30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,,,false,false,false
+30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,,,false,true,false
+30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,,,
+30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,,,
+30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,,,
+30002,201901,100,72,,,1,1.5274,1,,,,,,,,,,,,,
+30002,201902,100,72,,,0.9685,1.8795,1,,,,,,,,,,,,,
+30002,201903,100,72,,,1.113,1,1,,,,,,,,,,,,,
+30003,201901,100,7,,,1,1.5274,1,,,,,,,,,,,,,
+30003,201902,100,7,,,0.9685,1.8795,1,,,,,,,,,,,,,
+30003,201903,100,7,,,1.113,1,1,,,,,,,,,,,,,
+30004,201901,100,81,,,1,1.5274,1,,,,,,,,,,,,,
+30004,201902,100,81,,,0.9685,1.8795,1,,,,,,,,,,,,,
+30004,201903,100,81,,,1.113,1,1,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index 3e4b7b81..e9bccde0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,
-110005,201901,200,27,,,1,1,107.48,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,1,54.70285714,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110006,201901,200,42,,,1,1,107.48,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,1,54.70285714,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110007,201901,200,19,,,1,1,107.48,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,1,54.70285714,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110008,201901,200,43,,,1,1,107.48,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,1,54.70285714,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,,true,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,true,true,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,,true,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,true,true,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,,true,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,true,true,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,,,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,,true,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,,false,true,false
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,
+110005,201901,200,27,,,1,1,107.48,,,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110006,201901,200,42,,,1,1,107.48,,,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110007,201901,200,19,,,1,1,107.48,,,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+110008,201901,200,43,,,1,1,107.48,,,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index c3478e8d..11061d21 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,true,false,false
-210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,false,false,false
-210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,false,true,false
-210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,true,false,false
-210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,false,false,false
-210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,false,true,false
-210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,true,false,false
-210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,false,false,false
-210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,false,true,false
-210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,true,false,false
-210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,false,false,false
-210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,false,true,false
-210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,true,false,false
-210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,false,false,false
-210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,false,true,false
-210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,
-210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,
-210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,
-210002,201901,1,50,,,1,2.656680299,101.7103175,,,,,,,,,,,
-210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,
-210002,201903,1,50,,,0.968230653,1,70.26136364,,,,,,,,,,,
-210003,201901,2,12,,,1,0.68736285,182.25,,,,,,,,,,,
-210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
-210003,201903,2,12,,,1.259780318,1,182.2366412,,,,,,,,,,,
-210004,201901,2,9,,,1,0.68736285,182.25,,,,,,,,,,,
-210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
-210004,201903,2,9,,,1.259780318,1,182.2366412,,,,,,,,,,,
-210005,201901,1,18,,,1,2.656680299,101.7103175,,,,,,,,,,,
-210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
-210005,201903,2,18,,,1.259780318,1,182.2366412,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,,true,true,false,false
+210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,true,true,false,false,false
+210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,true,,false,true,false
+210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,,true,true,false,false
+210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,true,true,false,false,false
+210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,true,,false,true,false
+210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,,true,true,false,false
+210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,true,true,false,false,false
+210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,true,,false,true,false
+210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,,true,true,false,false
+210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,true,true,false,false,false
+210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,true,,false,true,false
+210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,,,true,false,false
+210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,,,false,false,false
+210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,,,false,true,false
+210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
+210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,
+210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,,,
+210002,201901,1,50,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
+210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,
+210002,201903,1,50,,,0.968230653,1,70.26136364,,,,,,,,,,,,,
+210003,201901,2,12,,,1,0.68736285,182.25,,,,,,,,,,,,,
+210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
+210003,201903,2,12,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
+210004,201901,2,9,,,1,0.68736285,182.25,,,,,,,,,,,,,
+210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
+210004,201903,2,9,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
+210005,201901,1,18,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
+210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
+210005,201903,2,18,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index 2d062fdd..072aed01 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,57 +1,57 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,true,false,false
-70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,false,false,false
-70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,false,false,false
-70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,false,false,false
-70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,false,false,false
-70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,false,false,false
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,false,true,false
-70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,true,false,false
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,false,false,false
-70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,false,false,false
-70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,false,false,false
-70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,false,false,false
-70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,false,false,false
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,false,true,false
-70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,true,false,false
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,false,false,false
-70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,false,false,false
-70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,false,false,false
-70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,false,false,false
-70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,false,false,false
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,false,true,false
-70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,true,false,false
-70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,false,false,false
-70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,false,false,false
-70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,false,false,false
-70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,false,false,false
-70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,false,false,false
-70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,false,true,false
-70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,
-70001,201902,100,39,,,1,1,1,,,,,,,,,,,
-70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,
-70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
-70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
-70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
-70001,201907,100,39,,,1,1,1,,,,,,,,,,,
-70002,201901,100,94,,,1,1.511049724,101.7103175,,,,,,,,,,,
-70002,201902,100,94,,,1,1,1,,,,,,,,,,,
-70002,201903,100,94,,,1.082864299,1,70.26136364,,,,,,,,,,,
-70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
-70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
-70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
-70002,201907,100,94,,,1,1,1,,,,,,,,,,,
-70003,201901,100,42,,,1,1.511049724,101.7103175,,,,,,,,,,,
-70003,201902,100,42,,,1,1,1,,,,,,,,,,,
-70003,201903,100,42,,,1.082864299,1,70.26136364,,,,,,,,,,,
-70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
-70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
-70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
-70003,201907,100,42,,,1,1,1,,,,,,,,,,,
-70004,201901,100,6,,,1,1.511049724,101.7103175,,,,,,,,,,,
-70004,201902,100,6,,,1,1,1,,,,,,,,,,,
-70004,201903,100,6,,,1.082864299,1,70.26136364,,,,,,,,,,,
-70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
-70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
-70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
-70004,201907,100,6,,,1,1,1,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,,true,true,false,false
+70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,true,true,false,false,false
+70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,true,true,false,false,false
+70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,true,true,false,false,false
+70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,true,true,false,false,false
+70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,true,true,false,false,false
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,true,,false,true,false
+70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,,true,true,false,false
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,true,true,false,false,false
+70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,true,true,false,false,false
+70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,true,true,false,false,false
+70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,true,true,false,false,false
+70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,true,true,false,false,false
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,true,,false,true,false
+70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,,true,true,false,false
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,true,true,false,false,false
+70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,true,true,false,false,false
+70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,true,true,false,false,false
+70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,true,true,false,false,false
+70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,true,true,false,false,false
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,true,,false,true,false
+70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,,,true,false,false
+70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,,,false,false,false
+70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,,,false,false,false
+70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,,,false,false,false
+70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,,,false,false,false
+70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,,,false,false,false
+70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,,,false,true,false
+70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
+70001,201902,100,39,,,1,1,1,,,,,,,,,,,,,
+70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
+70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
+70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
+70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
+70001,201907,100,39,,,1,1,1,,,,,,,,,,,,,
+70002,201901,100,94,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
+70002,201902,100,94,,,1,1,1,,,,,,,,,,,,,
+70002,201903,100,94,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
+70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
+70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
+70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
+70002,201907,100,94,,,1,1,1,,,,,,,,,,,,,
+70003,201901,100,42,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
+70003,201902,100,42,,,1,1,1,,,,,,,,,,,,,
+70003,201903,100,42,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
+70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
+70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
+70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
+70003,201907,100,42,,,1,1,1,,,,,,,,,,,,,
+70004,201901,100,6,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
+70004,201902,100,6,,,1,1,1,,,,,,,,,,,,,
+70004,201903,100,6,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
+70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
+70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
+70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
+70004,201907,100,6,,,1,1,1,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index e1df2ea8..813ace8f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -1,43 +1,43 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,false,true,false
-110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,true,true,true
-110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,true,true,true
-110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,true,true
-110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,true,true,true
-110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,true,true,true
-110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,true,true,true
-110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,
-110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
-110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,
-110002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,
-110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
-110002,201903,100,83,,,1.040615327,1,79.81873182,,,,,,,,,,,
-110003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,
-110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
-110003,201903,100,4,,,1.040615327,1,79.81873182,,,,,,,,,,,
-110004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,
-110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
-110004,201903,100,76,,,1.040615327,1,79.81873182,,,,,,,,,,,
-110005,201901,200,27,,,1,2.642597676,144.865,,,,,,,,,,,
-110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
-110005,201903,200,27,,,1.106182973,1,140.2509173,,,,,,,,,,,
-110006,201901,200,42,,,1,2.642597676,144.865,,,,,,,,,,,
-110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
-110006,201903,200,42,,,1.106182973,1,140.2509173,,,,,,,,,,,
-110007,201901,200,19,,,1,2.642597676,144.865,,,,,,,,,,,
-110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
-110007,201903,200,19,,,1.106182973,1,140.2509173,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,,true,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,true,true,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,true,,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,,true,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,true,true,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,true,,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,,true,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,true,true,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,true,,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,,true,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,true,,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,,,false,true,false
+110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,,,true,true,true
+110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,,,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,,true,true,true,true
+110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,,true,true,true
+110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,,,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,,,true,true,true
+110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,,,true,true,true
+110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,,,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,,,true,true,true
+110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+110002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+110002,201903,100,83,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+110003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+110003,201903,100,4,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+110004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+110004,201903,100,76,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+110005,201901,200,27,,,1,2.642597676,144.865,,,,,,,,,,,,,
+110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+110005,201903,200,27,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+110006,201901,200,42,,,1,2.642597676,144.865,,,,,,,,,,,,,
+110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+110006,201903,200,42,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+110007,201901,200,19,,,1,2.642597676,144.865,,,,,,,,,,,,,
+110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+110007,201903,200,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 600c798d..564a421f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,145 +1,145 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,true,true,false,false
-80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,true,true,false,false,false
-80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,true,,false,true,false
-80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,true,true,false,false
-80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,true,true,false,false,false
-80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,true,,false,true,false
-80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,true,true,false,false
-80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,true,true,false,false,false
-80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,true,,false,true,false
-80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,true,true,false,false
-80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,true,true,false,false,false
-80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,true,,false,true,false
-80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,false,true,false,false
-80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,false,false,false,false,false
-80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,true,,false,true,false
-80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,true,true,false,false
-80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,true,true,false,false,false
-80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,true,,false,true,false
-80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,true,true,false,false
-80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,true,true,false,false,false
-80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,true,,false,true,false
-80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,false,false
-80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,true,true,false,false,false
-80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,true,,false,true,false
-80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,true,true,false,false
-80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,true,true,false,false,false
-80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,true,,false,true,false
-80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,true,true,false,false
-80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,true,true,false,false,false
-80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,false,,false,true,false
-80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,false,true,false,false
-80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,false,false,false,false,false
-80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,false,,false,true,false
-80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,false,false
-80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,true,,false,false,false
-80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,false,true,false
-80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,true,true,false,false
-80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,true,true,false,false,false
-80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,true,,false,true,false
-80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,true,true,false,false
-80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,true,true,false,false,false
-80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,true,,false,true,false
-80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,false,true,false,false
-80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,false,true,false,false,false
-80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,true,,false,true,false
-80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,true,true,false,false
-80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,true,true,false,false,false
-80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,true,,false,true,false
-80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,true,true,false,false
-80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,true,true,false,false,false
-80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,true,,false,true,false
-80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,true,true,false,false
-80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,true,true,false,false,false
-80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,true,,false,true,false
-80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,true,true,false,false
-80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,true,false,false,false,false
-80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,false,,false,true,false
-80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,true,true,false,false
-80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,true,false,false,false,false
-80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,false,,false,true,false
-80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,true,true,false,false
-80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,true,true,false,false,false
-80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,true,,false,true,false
-80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,false,true,false,false
-80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,true,false,false,false,false
-80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,true,,false,true,false
-80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,true,true,false,false
-80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,true,true,false,false,false
-80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,true,,false,true,false
-80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,true,false,false
-80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,false,false,false
-80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,false,true,false
-80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80002,201901,100,83,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80002,201903,100,83,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80003,201901,100,4,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80003,201903,100,4,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80004,201901,100,76,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80004,201903,100,76,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80005,201901,100,18,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80005,201903,100,18,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80006,201901,100,94,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80006,201903,100,94,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80007,201901,100,8,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80007,201903,100,8,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80008,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80008,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80009,201901,100,45,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80009,201903,100,45,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80010,201901,100,100,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80010,201903,100,100,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80011,201901,100,19,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80011,201903,100,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80012,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80012,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80013,201901,200,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80013,201903,200,54,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80014,201901,200,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80014,201903,200,42,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80015,201901,200,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80015,201903,200,57,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80016,201901,200,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80016,201903,200,163,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80017,201901,200,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80017,201903,200,149,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80018,201901,200,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80018,201903,200,126,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80019,201901,200,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80019,201903,200,6,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80020,201901,200,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80020,201903,200,22,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80021,201901,200,108,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80021,201903,200,108,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80022,201901,200,67,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80022,201903,200,67,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80023,201901,200,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80023,201903,200,18,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80024,201901,200,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80024,201903,200,155,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,true,,true,true,false,false
+80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,true,true,true,true,false,false,false
+80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,true,,true,,false,true,false
+80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,true,,true,true,false,false
+80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,true,true,true,true,false,false,false
+80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,true,,true,,false,true,false
+80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,true,,true,true,false,false
+80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,true,true,true,true,false,false,false
+80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,true,,true,,false,true,false
+80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,true,,true,true,false,false
+80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,true,true,true,true,false,false,false
+80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,true,,true,,false,true,false
+80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,false,,true,true,false,false
+80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,false,false,true,true,false,false,false
+80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,true,,true,,false,true,false
+80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,true,,true,true,false,false
+80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,true,true,true,true,false,false,false
+80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,true,,true,,false,true,false
+80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,true,,true,true,false,false
+80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,true,true,true,true,false,false,false
+80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,true,,true,,false,true,false
+80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,,true,true,false,false
+80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,true,true,true,true,false,false,false
+80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,true,,true,,false,true,false
+80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,true,,true,true,false,false
+80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,true,true,true,true,false,false,false
+80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,true,,true,,false,true,false
+80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,true,,true,true,false,false
+80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,true,true,true,true,false,false,false
+80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,false,,true,,false,true,false
+80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,false,,true,true,false,false
+80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,false,false,true,true,false,false,false
+80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,false,,true,,false,true,false
+80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,,true,true,false,false
+80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,true,,true,,false,false,false
+80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,,,false,true,false
+80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,true,,true,true,false,false
+80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,true,true,true,true,false,false,false
+80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,true,,true,,false,true,false
+80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,true,,true,true,false,false
+80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,true,true,true,true,false,false,false
+80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,true,,true,,false,true,false
+80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,false,,true,true,false,false
+80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,false,true,true,true,false,false,false
+80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,true,,true,,false,true,false
+80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,true,,true,true,false,false
+80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,true,true,true,true,false,false,false
+80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,true,,true,,false,true,false
+80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,true,,true,true,false,false
+80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,true,true,true,true,false,false,false
+80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,true,,true,,false,true,false
+80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,true,,true,true,false,false
+80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,true,true,true,true,false,false,false
+80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,true,,true,,false,true,false
+80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,true,,true,true,false,false
+80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,true,false,true,true,false,false,false
+80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,false,,true,,false,true,false
+80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,true,,true,true,false,false
+80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,true,false,true,true,false,false,false
+80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,false,,true,,false,true,false
+80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,true,,true,true,false,false
+80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,true,true,true,true,false,false,false
+80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,true,,true,,false,true,false
+80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,false,,true,true,false,false
+80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,true,false,true,true,false,false,false
+80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,true,,true,,false,true,false
+80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,true,,true,true,false,false
+80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,true,true,true,true,false,false,false
+80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,true,,true,,false,true,false
+80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,,,true,false,false
+80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,,true,false,false,false
+80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,true,,false,true,false
+80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80002,201901,100,83,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80002,201903,100,83,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80003,201901,100,4,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80003,201903,100,4,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80004,201901,100,76,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80004,201903,100,76,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80005,201901,100,18,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80005,201903,100,18,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80006,201901,100,94,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80006,201903,100,94,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80007,201901,100,8,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80007,201903,100,8,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80008,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80008,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80009,201901,100,45,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80009,201903,100,45,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80010,201901,100,100,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80010,201903,100,100,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80011,201901,100,19,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80011,201903,100,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80012,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
+80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
+80012,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
+80013,201901,200,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80013,201903,200,54,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80014,201901,200,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80014,201903,200,42,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80015,201901,200,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80015,201903,200,57,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80016,201901,200,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80016,201903,200,163,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80017,201901,200,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80017,201903,200,149,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80018,201901,200,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80018,201903,200,126,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80019,201901,200,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80019,201903,200,6,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80020,201901,200,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80020,201903,200,22,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80021,201901,200,108,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80021,201903,200,108,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80022,201901,200,67,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80022,201903,200,67,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80023,201901,200,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80023,201903,200,18,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+80024,201901,200,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
+80024,201903,200,155,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index dfa0aaf8..c030a07b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,true,,false,true,false
-30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,,true,true,false,false
-30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,true,true,false,false,false
-30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,true,,false,true,false
-30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,,true,true,false,false
-30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,true,true,false,false,false
-30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,true,,false,true,false
-30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,,true,true,false,false
-30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,true,true,false,false,false
-30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,true,,false,true,false
-30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,,true,true,false,false
-30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,true,true,false,false,false
-30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,true,,false,true,false
-30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,,true,true,false,false
-30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,true,true,false,false,false
-30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,true,,false,true,false
-30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,,true,true,false,false
-30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,true,true,false,false,false
-30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,true,,false,true,false
-30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,,true,true,false,false
-30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,true,true,false,false,false
-30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,true,,false,true,false
-30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,true,false,false
-30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,false,false,false
-30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,false,true,false
-30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,,true,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,true,true,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,true,,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,,true,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,true,true,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,true,,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,,true,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,true,true,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,true,,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,true,true,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,true,,true,,false,true,false
+30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,,true,,true,true,false,false
+30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,true,true,true,true,false,false,false
+30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,true,,true,,false,true,false
+30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,,true,,true,true,false,false
+30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,true,true,true,true,false,false,false
+30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,true,,true,,false,true,false
+30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,,true,,true,true,false,false
+30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,true,true,true,true,false,false,false
+30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,true,,true,,false,true,false
+30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,,true,,true,true,false,false
+30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,true,true,true,true,false,false,false
+30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,true,,true,,false,true,false
+30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,,true,,true,true,false,false
+30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,true,true,true,true,false,false,false
+30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,true,,true,,false,true,false
+30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,,true,,true,true,false,false
+30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,true,true,true,true,false,false,false
+30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,true,,true,,false,true,false
+30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,,true,,true,true,false,false
+30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,true,true,true,true,false,false,false
+30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,true,,true,,false,true,false
+30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,,,true,false,false
+30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,,,false,false,false
+30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,,,false,true,false
+30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
+30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
+30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index 69c70eb9..65f6451c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,false,true,false
-160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,true,false,false
-160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
-160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
-160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
-160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
-160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
-160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,false,true,false
-160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,true,false,false
-160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
-160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
-160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
-160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
-160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
+160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
+160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
+160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
+160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
+160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
+160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
+160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
+160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,,,true,false,false
+160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,,,false,false,false
+160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,,,false,false,false
+160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,,,false,false,false
+160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,,,false,false,false
+160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index 4c97e19b..525f0f04 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,false,true,false
-160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,true,false,false
-160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
-160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
-160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
-160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
-160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
-160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,false,true,false
-160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,true,false,false
-160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
-160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
-160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
-160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
-160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
+160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
+160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
+160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
+160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
+160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
+160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
+160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
+160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,,,true,false,false
+160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,,,false,false,false
+160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,,,false,false,false
+160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,,,false,false,false
+160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,,,false,false,false
+160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,,,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index 3f2ff2d6..37c2647e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false
+10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false
+10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false
+10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,true,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index e3c0074c..49fe2104 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction
+20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false
+20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false
+20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false
+20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,true,false
+20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,true,false,false
+20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,true,false
+20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,true,false,false
+20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index 384ee9a8..e7524725 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false
+30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3,false,true,false
+30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,true,false
+30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index 8e5db810..b60954ab 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+40001,202001,100,35,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40001,202004,100,35,4911,R,0.637121844,1,73.71052632,3,0,3,false,true,false
+40002,202001,100,63,2095,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40002,202004,100,63,2115,R,0.637121844,1,73.71052632,3,0,3,false,true,false
+40003,202001,100,16,7863,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40003,202004,100,16,1377,R,0.637121844,1,73.71052632,3,0,3,false,true,false
+40004,202001,100,78,5131,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40004,202004,100,78,6193.009741,FIR,0.637121844,1,73.71052632,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index c5302e6b..71fc0e73 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+50001,202010,100,59,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50001,202102,100,59,4687,R,0.481224628,1,49.9122807,3,0,3,false,true,false
+50002,202010,100,36,4851,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50002,202102,100,36,2327,R,0.481224628,1,49.9122807,3,0,3,false,true,false
+50003,202010,100,76,2238,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50003,202102,100,76,1521,R,0.481224628,1,49.9122807,3,0,3,false,true,false
+50004,202010,100,30,688,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50004,202102,100,30,1521.344411,FIR,0.481224628,1,49.9122807,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index 384ee9a8..d47bfb64 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,15,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false
+60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60001,202003,100,15,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false
+60002,202001,100,71,1588,R,1,1.408039237,117.9107143,0,3,3,true,false,false
+60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60002,202003,100,71,3807,R,1.194583644,1,100.913043,3,0,4,false,true,false
+60003,202001,100,26,6541,R,1,1.408039237,117.9107143,0,3,3,true,false,false
+60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60003,202003,100,26,6351,R,1.194583644,1,100.913043,3,0,4,false,true,false
+60004,202001,100,3,472.653159,BI,1,1.408039237,117.9107143,0,3,3,true,false,false
+60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60004,202003,100,3,401,R,1.194583644,1,100.913043,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 9776ccf0..8c3a3aab 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+70001,202001,100,39,5951,R,1,1.964796824,107.48,0,3,3,true,false,false
+70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70001,202007,100,39,49,R,0.913631634,1,70.24,3,0,3,false,true,false
+70002,202001,100,94,6705,R,1,1.964796824,107.48,0,3,3,true,false,false
+70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70002,202007,100,94,3475,R,0.913631634,1,70.24,3,0,3,false,true,false
+70003,202001,100,42,6153,R,1,1.964796824,107.48,0,3,3,true,false,false
+70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70003,202007,100,42,8768,R,0.913631634,1,70.24,3,0,3,false,true,false
+70004,202001,100,6,10286.222995,BI,1,1.964796824,107.48,0,3,3,true,false,false
+70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70004,202007,100,6,5367.585848,FIR,0.913631634,1,70.24,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
index 384ee9a8..39912e13 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+80001,202001,100,91,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80001,202003,100,91,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+80002,202001,100,85,7138,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80002,202003,100,85,2746,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+80003,202001,100,41,2846,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80003,202003,100,41,9015,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+80004,202001,100,70,5820,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80004,202003,100,70,8233,R,1.711844725,1,71.90940767,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index 1901ba93..1f6b4f10 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+90001,202001,100,66,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
+90001,202003,100,66,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false
+90002,202001,100,27,1706,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
+90002,202003,100,27,8390,R,1.027612406,1,169.3831776,3,0,3,false,true,false
+90003,202001,100,14,1069,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
+90003,202003,100,14,2415,R,1.027612406,1,169.3831776,3,0,3,false,true,false
+90004,202001,100,73,7728,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90004,202003,100,73,12364.971963,C,1.027612406,1,169.3831776,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index a02e2345..2a308b81 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+100001,202001,100,26,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false
+100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
+100001,202004,100,26,3540,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+100002,202001,100,19,8084,R,1,1.046156805,179.3296703,0,3,3,true,false,false
+100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
+100002,202004,100,19,5608,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+100003,202001,100,46,5161,R,1,1.046156805,179.3296703,0,3,3,true,false,false
+100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
+100003,202004,100,46,2594,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+100004,202001,100,86,15422.351648,C,1,1.046156805,179.3296703,0,3,3,true,false,false
+100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100004,202004,100,86,9352,R,3.027849407,1,119.1751412,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 69a45692..7229f4fa 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110001,202003,100,89,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false
+110002,202001,100,83,4826,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110002,202003,100,83,4743,R,0.780928323,1,70.26136364,3,0,3,false,true,false
+110003,202001,100,4,7586,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110003,202003,100,4,1429,R,0.780928323,1,70.26136364,3,0,3,false,true,false
+110004,202001,100,76,3975,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110004,202003,100,76,2377.145816,FIR,0.780928323,1,70.26136364,3,0,3,false,true,false
+110005,202001,200,27,5217,R,1,1.016800862,182.25,0,3,3,true,false,false
+110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110005,202003,200,27,9940,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+110006,202001,200,42,5325,R,1,1.016800862,182.25,0,3,3,true,false,false
+110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110006,202003,200,42,6685,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+110007,202001,200,19,5496,R,1,1.016800862,182.25,0,3,3,true,false,false
+110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110007,202003,200,19,1235,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+110008,202001,200,43,3978.741774,BI,1,1.016800862,182.25,0,3,3,true,false,false
+110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110008,202003,200,43,6013,R,1.212689221,1,182.2366412,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index c5302e6b..142c8ded 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+120001,202001,100,50,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false
+120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120001,202005,100,50,1316,R,0.53449544,1,32.73423423,3,0,3,false,true,false
+120002,202001,100,78,7410,R,1,1.268552019,77.38738739,0,3,3,true,false,false
+120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120002,202005,100,78,1535,R,0.53449544,1,32.73423423,3,0,3,false,true,false
+120003,202001,100,94,4530,R,1,1.268552019,77.38738739,0,3,3,true,false,false
+120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120003,202005,100,94,4416,R,0.53449544,1,32.73423423,3,0,3,false,true,false
+120004,202001,100,100,7738.738739,C,1,1.268552019,77.38738739,0,3,3,true,false,false
+120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120004,202005,100,100,3273.423424,FIC,0.53449544,1,32.73423423,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 872151b2..cad00886 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+130001,202001,100,20,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
+130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130001,202007,100,20,3282,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+130002,202001,100,69,687,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
+130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130002,202007,100,69,9834,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+130003,202001,100,39,7113,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
+130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130003,202007,100,39,6461,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+130004,202001,100,37,2571,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130004,202007,100,37,6621,R,0.798832987,1,158.7757576,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 872151b2..c4fffd80 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false
+140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
+140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false
+140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
+140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false
+140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
+140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false
+140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 872151b2..d05857f5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false
+150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
+150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false
+150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false
+150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
+150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false
+150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false
+150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
+150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false
+150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false
+150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 872151b2..e5d1b61a 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false
+160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
+160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160001,202007,100,76,1666,R,0.819547983,1,71.77202073,3,0,3,false,true,false
+160002,202001,100,32,430,R,1,0.285048351,29.78238342,0,3,3,true,false,false
+160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
+160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160002,202007,100,32,2678,R,0.819547983,1,71.77202073,3,0,3,false,true,false
+160003,202001,100,85,3232,R,1,0.285048351,29.78238342,0,3,3,true,false,false
+160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
+160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160003,202007,100,85,9508,R,0.819547983,1,71.77202073,3,0,3,false,true,false
+160004,202001,100,33,1022.611409,BI,1,0.285048351,29.78238342,0,3,3,true,false,false
+160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160004,202007,100,33,2368.476683,FIC,0.819547983,1,71.77202073,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 6f6f000e..5fe2932e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+170001,202001,100,69,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false
+170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+170001,202004,100,69,7120,R,1.231814548,1,109.0330189,3,0,3,false,true,false
+170002,202001,100,62,449,R,1,0.41470355,41.93396226,0,3,3,true,false,false
+170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+170002,202004,100,62,6745,R,1.231814548,1,109.0330189,3,0,3,false,true,false
+170003,202001,100,81,1961,R,1,0.41470355,41.93396226,0,3,3,true,false,false
+170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+170003,202004,100,81,9250,R,1.231814548,1,109.0330189,3,0,3,false,true,false
+170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 6f6f000e..e0438275 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+180001,202001,100,91,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false
+180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+180001,202004,100,91,9291,R,1.709926945,1,175.5441176,3,0,3,false,true,false
+180002,202001,100,26,3829,R,1,0.743721487,123.4632353,0,3,3,true,false,false
+180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+180002,202004,100,26,8415,R,1.709926945,1,175.5441176,3,0,3,false,true,false
+180003,202001,100,19,3774,R,1,0.743721487,123.4632353,0,3,3,true,false,false
+180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+180003,202004,100,19,6168,R,1.709926945,1,175.5441176,3,0,3,false,true,false
+180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index 9226aaf7..6ef80126 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false
+200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false
+200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false
+200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false
+200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false
+200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false
+200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false
+200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false
+200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false
+200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false
+200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false
+200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index a02e2345..06c408bb 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,13.17948717,381,R,0,2,3,true,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false
+10005,202001,1,18,1,0.992513369,13.17948717,100,R,0,2,3,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false
+10005,202003,2,18,1.173184358,1,50,900.0000004,FIC,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index a02e2345..cb4a0209 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false
+10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index a02e2345..e5653547 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false
+10005,202003,2,18,1.173184358,1,50,900,FIC,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index a02e2345..6b5489da 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,12,1.173184358,1,30.76923077,314,R,2,0,3,false,true,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,9,1.173184358,1,30.76923077,736,R,2,0,3,false,true,false
+10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false
+10005,202003,2,18,1.173184358,1,30.76923077,150,R,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 901c11fe..5cc9e504 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false
+10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false
+10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,12,0.590369393,0.934108527131783,30.8974359,267,R,2,3,3,false,false,false
+10003,202003,2,12,1.070539419,1,33.07692308,314,R,3,0,3,false,true,false
+10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,9,0.590369393,0.934108527131783,30.8974359,628,R,2,3,3,false,false,false
+10004,202003,2,9,1.070539419,1,33.07692308,736,R,3,0,3,false,true,false
+10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false
+10005,202002,2,18,0.590369393,0.934108527131783,30.8974359,310,R,2,3,3,false,false,false
+10005,202003,2,18,1.070539419,1,33.07692308,240,R,3,0,3,false,true,false
+10006,202001,1,22,1,0.992513369,13.17948718,289.948718,C,0,2,3,true,false,false
+10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false
+10006,202003,1,22,1.186096257,1,18.48333333,346.5012157,FIC,2,0,2,false,true,false
+10007,202001,2,52,1,1.693854749,72.19047619,3753.904762,C,0,2,2,true,false,false
+10007,202002,2,52,0.590369393,0.934108527131783,30.8974359,2216.190476,FIC,2,3,3,false,false,false
+10007,202003,2,52,1.070539419,1,33.07692308,2372.519265,FIC,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
index 2fadc166..c676f335 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
@@ -1,31 +1,31 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true
+50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50002,202001,100,36,4851,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50002,202003,100,36,8894,FIR,1,1,1,0,0,0,true,true,true
+50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50003,202003,100,76,769,FIR,1,1,1,0,0,0,true,true,true
+50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50004,202003,100,30,3245,FIR,1,1,1,0,0,0,true,true,true
+50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,true,false,false
+50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,true,false
+50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50005,202003,100,85,130000,FIR,1,1,1,0,0,0,true,true,true
+50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50006,202001,100,71,40747.793706,C,1,1.083783427,573.9125874,0,5,5,true,false,false
+50006,202002,100,71,37597.727272,FIC,0.922693571,1,529.5454545,5,0,5,false,true,false
+50006,202003,100,71,37597.727272,FIC,1,1,1,0,0,0,true,true,true
+50006,202004,100,71,37597.727272,FIC,1,1.161985911,538.03125,0,4,4,true,false,false
+50006,202005,100,71,32356.439872,FIC,0.860595632,1,463.0273438,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
index 8e5db810..9752700f 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
@@ -1,17 +1,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
+1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false
+1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false
+1,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false
+2,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
+2,202002,1,1,20,R,2,1,20,2,1,2,false,true,false
+2,202003,1,1,0,R,0,0,10,1,1,2,false,false,false
+2,202004,1,1,30,R,1,1,30,1,0,1,true,true,false
+3,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
+3,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false
+3,202003,1,1,20,R,0,0,10,1,1,2,false,false,false
+3,202004,1,1,20,FIR,1,1,30,1,0,1,true,true,false
+4,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
+4,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false
+4,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false
+4,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
index a02e2345..ad46ad72 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
+10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
+10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10001,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10001,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10001,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false
+10002,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10002,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10002,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false
+10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
+10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false
+10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false

From e930fb02c1b2e0a413ffe3f251249a9b9982273c Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 17:52:43 +0100
Subject: [PATCH 311/531] Another attempt to remove extranious columns without
 blasting all the data this time

---
 .../methodology_scenarios/01_C_output.csv     |  10 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  18 +-
 .../03_R_R_FI_output.csv                      |  26 +-
 .../04_R_R_FI_FI_output.csv                   |  34 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  42 +--
 .../06_BI_BI_R_output.csv                     |  26 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  58 ++--
 .../methodology_scenarios/08_R_R_R_output.csv |  26 +-
 .../09_R_NS_C_output.csv                      |  24 +-
 .../10_C_FI_NS_R_output.csv                   |  32 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  50 +--
 .../12_C_FI_FI_FI_FI_output.csv               |  42 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  56 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  56 ++--
 .../17_NS_R_FI_NS_output.csv                  |  30 +-
 .../18_NS_BI_R_NS_output.csv                  |  30 +-
 .../20_mixed_data_output.csv                  |  96 +++---
 .../21_class_change_R_C_FI_output.csv         |  32 +-
 .../22_class_change_C_BI_R_output.csv         |  32 +-
 .../23_class_change_C_C_FI_output.csv         |  32 +-
 .../24_class_change_R_BI_R_output.csv         |  32 +-
 .../25_class_change_C_FI_FI_output.csv        |  44 +--
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  44 +--
 .../32_C_FI_FI_no_response_output.csv         |  32 +-
 .../34_default_link_output.csv                |  42 +--
 .../35_TB_10_R_R_FI_output.csv                |  74 ++---
 .../36_TB_10_BI_BI_R_output.csv               |  74 ++---
 .../37_TB_10_C_FI_FI_output.csv               |  74 ++---
 .../38_T_10_R_R_FI_output.csv                 |  74 ++---
 .../39_B_10_R_R_FI_output.csv                 |  74 ++---
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  62 ++--
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 146 ++++-----
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 128 ++++----
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 128 ++++----
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |  70 ++---
 .../methodology_scenarios/47_TB_50_output.csv |  74 ++---
 ...BI_R_R_50_weight_previous_month_output.csv |  50 +--
 .../50_R_R_FI_50_weight_output.csv            |  50 +--
 .../51_R_R_FI_80_weight_output.csv            |  50 +--
 .../52_BI_BI_R_50_weight_output.csv           |  50 +--
 .../53_C_FI_FI_50_weight_output.csv           |  50 +--
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  98 +++---
 .../55_R_R_FI_50_weight_default_output.csv    |  50 +--
 .../56_BI_BI_R_50_weight_default_output.csv   |  50 +--
 .../57_C_FI_FI_50_weight_default_output.csv   |  50 +--
 ...I_R_R_50_weight_partial_default_output.csv |  98 +++---
 .../59_class_change_50_weight_output.csv      |  62 ++--
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv | 114 +++----
 .../62_mixed_data_50_weight_output.csv        |  86 +++---
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 290 +++++++++---------
 .../64_TB_10_C_FI_FI_50_weight_output.csv     | 146 ++++-----
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv |  70 ++---
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv |  70 ++---
 55 files changed, 1735 insertions(+), 1735 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index 16b5f0b8..b46f3d86 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,,,true,true,false
-10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,,,true,true,false
-10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,,,true,true,false
-10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,,,true,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,true,false
+10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,true,false
+10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,true,false
+10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 52e4bc0f..596cabe6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
-20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
-20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
-20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
-20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,,true,true,false,false
-20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,true,,false,true,false
-20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,,,true,false,false
-20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,false,false
+20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,false,true,false
+20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,false,false
+20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,false,true,false
+20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,true,false,false
+20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,false,true,false
+20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,true,false,false
+20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 2c459ebb..50e58056 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,,true,true,false,false
-30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
-30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,true,,false,true,false
-30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,,true,true,false,false
-30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
-30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,true,,false,true,false
-30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,,true,true,false,false
-30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,true,true,false,false,false
-30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,true,,false,true,false
-30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,,true,true,false,false
-30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,true,,false,false,false
-30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,false,false
+30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,false,true,false
+30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,true,false,false
+30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,false,true,false
+30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,true,false,false
+30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,false,true,false
+30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,true,false,false
+30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index 88b0824d..b550328e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
-40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
-40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
-40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
-40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
-40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
-40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
-40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
-40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
-40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,true,true,false,false,false
-40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,true,true,false,false,false
-40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,true,,false,true,false
-40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,,true,true,false,false
-40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,true,,false,false,false
-40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,,,false,false,false
-40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,false,false
+40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,false,true,false
+40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,true,false,false
+40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,false,true,false
+40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,true,false,false
+40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,false,true,false
+40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,true,false,false
+40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 579ce8a1..aad1ac09 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
-50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
-50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
-50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
-50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
-50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
-50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
-50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
-50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
-50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
-50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
-50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,true,true,false,false,false
-50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,true,true,false,false,false
-50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,true,true,false,false,false
-50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,true,,false,true,false
-50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,,true,true,false,false
-50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,true,,false,false,false
-50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,,,false,false,false
-50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,,,false,false,false
-50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,false,false
+50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,false,true,false
+50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,true,false,false
+50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,false,true,false
+50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,true,false,false
+50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,false,true,false
+50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,true,false,false
+50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index 39c94b90..5571fa51 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
-60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
-60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
-60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
-60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
-60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
-60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,,true,true,false,false
-60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,true,true,false,false,false
-60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,true,,false,true,false
-60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,,,true,false,false
-60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,,,false,false,false
-60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,false,false
+60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,false,true,false
+60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,true,false,false
+60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,false,true,false
+60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,true,false,false
+60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,false,true,false
+60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,true,false,false
+60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 7516338f..acec7fe8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,,true,true,false,false
-70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
-70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
-70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
-70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
-70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
-70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,true,,false,true,false
-70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,,true,true,false,false
-70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
-70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
-70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
-70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
-70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
-70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,true,,false,true,false
-70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,,true,true,false,false
-70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,true,true,false,false,false
-70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,true,true,false,false,false
-70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,true,true,false,false,false
-70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,true,true,false,false,false
-70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,true,true,false,false,false
-70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,true,,false,true,false
-70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,,,true,false,false
-70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,,,false,false,false
-70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,,,false,false,false
-70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,,,false,false,false
-70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,,,false,false,false
-70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,,,false,false,false
-70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,false,false
+70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,false,true,false
+70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,true,false,false
+70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,false,true,false
+70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,true,false,false
+70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,false,true,false
+70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,true,false,false
+70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index 09ac6c6d..b1d4610f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
-80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
-80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
-80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
-80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
-80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
-80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
-80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
-80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
-80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,,true,true,false,false
-80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,true,true,false,false,false
-80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,true,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,false,false
+80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,false,true,false
+80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,true,false,false
+80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,false,true,false
+80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,true,false,false
+80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,false,true,false
+80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,true,false,false
+80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 94269506..6f5673fb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
-90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
-90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
-90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
-90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
-90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
-90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,,true,true,false,false
-90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,true,true,false,false,false
-90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,true,,false,true,false
-90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,,,true,false,false
-90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,false,false
+90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
+90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,false,true,false
+90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,true,false,false
+90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
+90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,false,true,false
+90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,true,false,false
+90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
+90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,false,true,false
+90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,true,false,false
+90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index d09c24c0..9a716bbe 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
-100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
-100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
-100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
-100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
-100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
-100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
-100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
-100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,,true,true,false,false
-100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,true,true,false,false,false
-100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,true,true,false,false,false
-100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,true,,false,true,false
-100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,,,true,false,false
-100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,,,false,false,false
-100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,false,false
+100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
+100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,false,true,false
+100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,true,false,false
+100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
+100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,false,true,false
+100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,true,false,false
+100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
+100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,false,true,false
+100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,true,false,false
+100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index fbfe7ef1..f4918ae6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,,true,true,false,false
-110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
-110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
-110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,,true,true,false,false
-110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
-110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
-110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,,true,true,false,false
-110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,true,true,false,false,false
-110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,true,,false,true,false
-110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,,true,true,false,false
-110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,true,,false,false,false
-110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,,,false,true,false
-110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,,true,true,false,false
-110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
-110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
-110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,,true,true,false,false
-110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
-110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
-110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,,true,true,false,false
-110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,true,true,false,false,false
-110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
-110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,,,true,false,false
-110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,,true,false,false,false
-110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,true,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,false,false
+110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,true,false,false
+110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,true,false,false
+110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,true,false,false
+110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,true,false,false
+110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,false,true,false
+110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,true,false,false
+110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,false,true,false
+110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,true,false,false
+110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,false,true,false
+110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,true,false,false
+110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index ca898661..72834ed2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
-120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
-120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
-120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
-120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
-120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
-120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
-120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
-120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
-120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
-120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,,true,true,false,false
-120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,true,true,false,false,false
-120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,true,true,false,false,false
-120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,true,true,false,false,false
-120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,true,,false,true,false
-120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,,,true,false,false
-120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,,,false,false,false
-120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,,,false,false,false
-120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,,,false,false,false
-120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,false,false
+120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,false,true,false
+120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,true,false,false
+120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,false,true,false
+120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,true,false,false
+120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,false,true,false
+120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,true,false,false
+120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index c4c95a60..2d0c0639 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
-130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
-130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
-130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
-130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
-130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
-130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
-130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
-130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
-130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
-130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
-130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
-130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
-130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
-130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,,true,true,false,false
-130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,true,true,false,false,false
-130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,true,true,false,false,false
-130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,true,true,false,false,false
-130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,true,true,false,false,false
-130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,true,true,false,false,false
-130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,true,,false,true,false
-130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,,,true,false,false
-130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,,,false,false,false
-130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,,,false,false,false
-130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,,,false,false,false
-130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,,,false,false,false
-130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,false,false
+130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
+130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,false,true,false
+130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,true,false,false
+130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
+130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,false,true,false
+130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,true,false,false
+130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
+130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,false,true,false
+130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,true,false,false
+130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 0de8c87f..85b42e81 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
-140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
-140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
-140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
-140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
-140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
-140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
-140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
-140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
-140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
-140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
-140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
-140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
-140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
-140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,,true,true,false,false
-140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,true,true,false,false,false
-140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,true,true,false,false,false
-140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,true,true,false,false,false
-140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,true,true,false,false,false
-140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,true,true,false,false,false
-140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,true,,false,true,false
-140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,,,true,false,false
-140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,,,false,false,false
-140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,,,false,false,false
-140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,,,false,false,false
-140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,,,false,false,false
-140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,false,false
+140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
+140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,false,true,false
+140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,true,false,false
+140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
+140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,false,true,false
+140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,true,false,false
+140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
+140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,false,true,false
+140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,true,false,false
+140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index f6ec0754..6db51ee1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
-150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
-150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
-150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
-150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
-150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
-150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
-150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
-150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
-150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
-150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
-150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
-150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
-150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
-150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,,true,true,false,false
-150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,true,true,false,false,false
-150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,true,true,false,false,false
-150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,true,true,false,false,false
-150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,true,true,false,false,false
-150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,true,true,false,false,false
-150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,true,,false,true,false
-150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,,,true,false,false
-150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,,,false,false,false
-150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,,,false,false,false
-150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,,,false,false,false
-150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,,,false,false,false
-150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,false,false
+150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
+150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,false,true,false
+150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,true,false,false
+150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
+150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,false,true,false
+150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,true,false,false
+150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
+150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,false,true,false
+150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,true,false,false
+150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 40eefc8a..898de9e1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,,true,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,true,true,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,true,true,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,true,true,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,true,true,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,true,,false,true,false
-160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,,,true,false,false
-160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,,,false,false,false
-160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,,,false,false,false
-160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,,,false,false,false
-160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,,,false,false,false
-160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,false,true,false
+160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,true,false,false
+160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 7963caa2..c9376319 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
-170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
-170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
-170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
-170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
-170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
-170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
-170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
-170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,,true,true,false,false
-170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,true,true,false,false,false
-170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,true,true,false,false,false
-170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,true,,false,true,false
-170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,,,false,false,false
-170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,,,false,false,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,false,false
+170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,false,true,false
+170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,true,false,false
+170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,false,true,false
+170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,true,false,false
+170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,false,true,false
+170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 889cc8bf..4d2792e5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
-180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
-180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
-180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
-180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
-180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
-180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
-180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
-180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,,true,true,false,false
-180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,true,true,false,false,false
-180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,true,true,false,false,false
-180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,true,,false,true,false
-180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,,,false,false,false
-180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,,,false,false,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,false,false
+180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,false,true,false
+180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,true,false,false
+180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,false,true,false
+180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,true,false,false
+180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,false,true,false
+180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index 08be556c..f4125f92 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
-200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
-200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
-200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
-200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
-200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
-200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
-200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
-200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
-200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,true,true,false,false,false
-200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,true,true,false,false,false
-200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
-200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,,true,true,false,false
-200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,true,,false,false,false
-200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,,,false,false,false
-200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,,,false,true,false
-200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,,,true,false,false
-200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,,,false,false,false
-200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,,,false,false,false
-200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,,,false,true,false
-200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,,,true,false,false
-200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,,,false,false,false
-200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,,true,false,false,false
-200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,true,,false,true,false
-200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
-200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
-200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
-200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
-200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
-200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
-200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
-200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
-200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,,true,true,false,false
-200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,true,true,false,false,false
-200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,true,true,false,false,false
-200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,true,,false,true,false
-200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
-200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,,true,false,false,false
-200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,true,,false,false,false
-200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
-200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
-200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,,,false,false,false
-200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
-200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,,,true,false,false
-200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,,,false,false,false
-200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,,,false,false,false
-200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,false,false
+200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,true,false,false
+200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,true,false,false
+200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,true,false,false
+200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,true,false,false
+200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,true,false,false
+200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,true,false,false
+200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,true,false,false
+200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,true,false,false
+200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,true,false,false
+200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,true,false,false
+200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,true,false,false
+200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 67b8c9eb..bb7a557d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,,false,true,false
-210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,,false,true,false
-210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
-210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
-210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
+210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
+210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,false,true,false
+210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,false,true,false
+210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 9c116a23..3e9171b7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
-220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
-220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,true,,false,true,false
-220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,true,,false,true,false
-220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,true,false,false
-220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
-220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,false,false
+220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,false,false
+220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,false,true,false
+220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,false,true,false
+220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,true,false,false
+220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 5e3b325a..1e9d4baa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
-230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,,true,true,false,false
-230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,true,,false,true,false
-230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,true,,false,true,false
-230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,,,true,false,false
-230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
-230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,false,false
+230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,false,false
+230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,false,true,false
+230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,false,true,false
+230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,true,false,false
+230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index a5242247..27285e21 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,true,,false,true,false
-240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,true,true,false,false,false
-240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,true,,false,true,false
-240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
-240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,,,false,false,false
-240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
+240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
+240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,false,true,false
+240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,false,true,false
+240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index fe7ea411..54f49f94 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,,true,true,false,false
-250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,true,true,false,false,false
-250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,true,,false,true,false
-250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,true,true,false,false,false
-250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
-250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,,true,true,false,false
-250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,true,true,false,false,false
-250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
-250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
-250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,,true,false,false,false
-250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,true,,false,true,false
-250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,,,true,false,false
-250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,,,false,false,false
-250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,,,false,true,false
-250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,,,true,false,false
-250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,,,false,false,false
-250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
+250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
+250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,false,true,false
+250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,false,true,false
+250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,false,true,false
+250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,false,true,false
+250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,true,false,false
+250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index 1e6cbe1c..53d7fd04 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,,,true,true,false
-110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,,,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,,,true,true,false
-110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,,,true,true,false
-110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,,,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,,,true,true,false
-110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,,,true,true,false
-110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,,,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,,,true,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,false,true,false
+110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,true,true,false
+110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,true,true,false
+110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,true,true,false
+110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,true,true,false
+110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,true,true,false
+110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index 4845af83..c96a4f46 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,,1,1,1,27,C,0,0,0,,,true,true,true
-110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,,,true,true,true
-110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,,,true,true,true
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,false,true,false
+110005,202001,200,27,,,1,1,1,27,C,0,0,0,true,true,true
+110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,true,true,true
+110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index 6e1dc4ca..8145b9cb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,,true,true,false,true
-120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,true,true,false,false,true
-120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,true,true,false,false,true
-120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,true,true,false,false,true
-120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,true,,false,true,true
-120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,,true,true,false,true
-120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,true,true,false,false,true
-120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,true,true,false,false,true
-120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,true,true,false,false,true
-120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,true,,false,true,true
-120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,,true,true,false,true
-120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,true,true,false,false,true
-120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,true,true,false,false,true
-120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,true,true,false,false,true
-120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,true,,false,true,true
-120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,,,true,false,true
-120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,,,false,false,true
-120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,,,false,false,true
-120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,,,false,false,true
-120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,,,false,true,true
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,false,true
+120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,false,false,true
+120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,false,false,true
+120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,false,false,true
+120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,false,true,true
+120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,true,false,true
+120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,false,false,true
+120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,false,false,true
+120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,false,false,true
+120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,false,true,true
+120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,true,false,true
+120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,false,false,true
+120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,false,false,true
+120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,false,false,true
+120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,false,true,true
+120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,true,false,true
+120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,false,false,true
+120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,false,false,true
+120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,false,false,true
+120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,false,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 423122d9..85f86898 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,,true,true,false,false
-30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,true,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,true,false,false
+30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,false,true,false
+30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,false,true,false
+30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,false,false
+30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index ec344277..040ac5d0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,true,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,,,false,false,false
-30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,false,true,false
+30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,false,false,false
+30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index 476af72c..d3b65d74 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,true,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,true,false,false
+30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,false,false,false
+30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,false,true,false
+30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,true,false,false
+30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,false,false,false
+30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,false,true,false
+30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index b9fc2b54..870926e0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,,true,true,false,false
-30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,true,,false,false,false
-30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,false,false,false
+30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,true,false,false
+30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,false,false,false
+30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,false,true,false
+30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,true,false,false
+30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,false,false,false
+30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index 7fcd436a..4771e1e5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,,true,true,false,false
-30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,true,,false,false,false
-30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,true,false,false
+30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,false,true,false
+30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,true,false,false
+30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,false,false,false
+30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,false,true,false
+30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,true,false,false
+30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,false,false,false
+30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,false,true,false
+30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,true,false,false
+30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,false,false,false
+30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index 767cbfb8..fdc96e37 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,,true,true,false,false
-30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,true,,false,false,false
-30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,false,true,false
+30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,true,false,false
+30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,false,false,false
+30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,false,true,false
+30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,true,false,false
+30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,false,false,false
+30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,false,true,false
+30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,true,false,false
+30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,false,false,false
+30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,false,true,false
+30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,true,false,false
+30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,false,false,false
+30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,false,true,false
+30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,true,false,false
+30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,false,false,false
+30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,false,true,false
+30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,true,false,false
+30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,false,false,false
+30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 7abdc719..555dedfb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,,true,true,false,false
-80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,true,true,false,false,false
-80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,true,,false,true,false
-80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,,true,true,false,false
-80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,true,true,false,false,false
-80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,true,,false,true,false
-80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,,true,true,false,false
-80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,true,true,false,false,false
-80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,true,,false,true,false
-80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,,true,true,false,false
-80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,true,true,false,false,false
-80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,true,,false,true,false
-80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,,true,true,false,false
-80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,true,true,false,false,false
-80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,true,,false,true,false
-80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,,true,true,false,false
-80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,true,true,false,false,false
-80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,true,,false,true,false
-80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,,true,true,false,false
-80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,true,true,false,false,false
-80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,true,,false,true,false
-80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,,true,true,false,false
-80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,true,true,false,false,false
-80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,true,,false,true,false
-80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,,true,true,false,false
-80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,true,true,false,false,false
-80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,true,,false,true,false
-80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,,true,true,false,false
-80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,true,true,false,false,false
-80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,true,,false,true,false
-80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,,true,true,false,false
-80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,true,true,false,false,false
-80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,true,,false,true,false
-80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,,true,true,false,false
-80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,true,,false,false,false
-80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,,,false,true,false
-80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,,true,true,false,false
-80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,true,true,false,false,false
-80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,true,,false,true,false
-80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,,true,true,false,false
-80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,true,true,false,false,false
-80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,true,,false,true,false
-80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,,true,true,false,false
-80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,true,true,false,false,false
-80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,true,,false,true,false
-80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,,true,true,false,false
-80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,true,true,false,false,false
-80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,true,,false,true,false
-80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,,true,true,false,false
-80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,true,true,false,false,false
-80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,true,,false,true,false
-80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,,true,true,false,false
-80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,true,true,false,false,false
-80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,true,,false,true,false
-80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,,true,true,false,false
-80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,true,true,false,false,false
-80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,true,,false,true,false
-80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,,true,true,false,false
-80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,true,true,false,false,false
-80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,true,,false,true,false
-80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,,true,true,false,false
-80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,true,true,false,false,false
-80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,true,,false,true,false
-80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,,true,true,false,false
-80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,true,true,false,false,false
-80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,true,,false,true,false
-80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,,true,true,false,false
-80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,true,true,false,false,false
-80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,true,,false,true,false
-80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,,,true,false,false
-80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,,true,false,false,false
-80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,true,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,false,false
+80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,false,false,false
+80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,false,true,false
+80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,true,false,false
+80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,false,false,false
+80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,false,true,false
+80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,true,false,false
+80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,false,false,false
+80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,false,true,false
+80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,true,false,false
+80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,false,false,false
+80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,false,true,false
+80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,true,false,false
+80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,false,false,false
+80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,false,true,false
+80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,true,false,false
+80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,false,false,false
+80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,false,true,false
+80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,true,false,false
+80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,false,false,false
+80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,false,true,false
+80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,true,false,false
+80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,false,false,false
+80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,false,true,false
+80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,true,false,false
+80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,false,false,false
+80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,false,true,false
+80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,true,false,false
+80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,false,false,false
+80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,false,true,false
+80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,true,false,false
+80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,false,false,false
+80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,false,true,false
+80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,true,false,false
+80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,false,false,false
+80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,false,true,false
+80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,false,false
+80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,false,false,false
+80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,false,true,false
+80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,false,false
+80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,false,false,false
+80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,false,true,false
+80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,false,false
+80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,false,false,false
+80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,false,true,false
+80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,false,false
+80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,false,false,false
+80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,false,true,false
+80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,false,false
+80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,false,false,false
+80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,false,true,false
+80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,false,false
+80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,false,false,false
+80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,false,true,false
+80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,false,false
+80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,false,false,false
+80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,false,true,false
+80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,false,false
+80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,false,false,false
+80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,false,true,false
+80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,false,false
+80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,false,false,false
+80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,false,true,false
+80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,false,false
+80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,false,false,false
+80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,false,true,false
+80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,false,false
+80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,false,false,false
+80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,false,true,false
+80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,true,false,false
+80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,false,false,false
+80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index d7ea5894..ad1513f9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,,true,true,false,false
-90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,true,true,false,false,false
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,,false,true,false
-90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,,true,true,false,false
-90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,true,true,false,false,false
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,,false,true,false
-90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,,true,true,false,false
-90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,true,true,false,false,false
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,,false,true,false
-90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,,true,true,false,false
-90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,true,true,false,false,false
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,,false,true,false
-90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,,true,true,false,false
-90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,true,true,false,false,false
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,,false,true,false
-90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,,true,true,false,false
-90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,true,true,false,false,false
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,,false,true,false
-90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,,true,true,false,false
-90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,true,true,false,false,false
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,,false,true,false
-90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,,true,true,false,false
-90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,true,true,false,false,false
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,,false,true,false
-90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,,true,true,false,false
-90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,true,true,false,false,false
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,,false,true,false
-90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,,true,true,false,false
-90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,true,true,false,false,false
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,,false,true,false
-90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,,true,true,false,false
-90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,true,true,false,false,false
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,,false,true,false
-90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,,true,true,false,false
-90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,true,true,false,false,false
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,,false,true,false
-90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,,true,true,false,false
-90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,true,true,false,false,false
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,,false,true,false
-90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,,true,true,false,false
-90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,true,true,false,false,false
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,,false,true,false
-90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,,true,true,false,false
-90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,true,true,false,false,false
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,,false,true,false
-90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,,true,true,false,false
-90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,true,true,false,false,false
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,,false,true,false
-90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,,true,true,false,false
-90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,true,true,false,false,false
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,,false,true,false
-90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,,true,true,false,false
-90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,true,true,false,false,false
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,,false,true,false
-90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,,true,true,false,false
-90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,true,true,false,false,false
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,,false,true,false
-90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,,true,true,false,false
-90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,true,true,false,false,false
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,,false,true,false
-90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,,,true,false,false
-90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,,,false,false,false
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,false,false
+90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,false,false,false
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,false,true,false
+90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,true,false,false
+90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,false,false,false
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,false,true,false
+90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,true,false,false
+90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,false,false,false
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,false,true,false
+90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,true,false,false
+90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,false,false,false
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,false,true,false
+90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,true,false,false
+90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,false,false,false
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,false,true,false
+90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,true,false,false
+90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,false,false,false
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,false,true,false
+90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,true,false,false
+90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,false,false,false
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,false,true,false
+90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,false,false
+90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,false,false,false
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,false,true,false
+90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,true,false,false
+90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,false,false,false
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,false,true,false
+90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,true,false,false
+90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,false,false,false
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,false,true,false
+90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,true,false,false
+90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,false,false,false
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,false,true,false
+90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,false,false
+90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,false,false,false
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,false,true,false
+90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,true,false,false
+90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,false,false,false
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,false,true,false
+90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,true,false,false
+90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,false,false,false
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,false,true,false
+90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,true,false,false
+90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,false,false,false
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,false,true,false
+90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,true,false,false
+90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,false,false,false
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,false,true,false
+90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,true,false,false
+90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,false,false,false
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,false,true,false
+90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,true,false,false
+90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,false,false,false
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,false,true,false
+90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,true,false,false
+90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,false,false,false
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,false,true,false
+90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,true,false,false
+90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,false,false,false
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,false,true,false
+90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,true,false,false
+90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,false,false,false
+90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index d4277f90..560b8c9a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,,true,true,false,false
-100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,true,true,false,false,false
-100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,true,,false,true,false
-100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,,true,true,false,false
-100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,true,true,false,false,false
-100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,true,,false,true,false
-100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,,true,true,false,false
-100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,true,true,false,false,false
-100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,true,,false,true,false
-100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,,true,true,false,false
-100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,true,true,false,false,false
-100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,true,,false,true,false
-100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,,true,true,false,false
-100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,true,true,false,false,false
-100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,true,,false,true,false
-100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,,true,true,false,false
-100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,true,true,false,false,false
-100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,true,,false,true,false
-100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,,true,true,false,false
-100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,true,true,false,false,false
-100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,true,,false,true,false
-100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,,true,true,false,false
-100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,true,true,false,false,false
-100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,true,,false,true,false
-100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,,true,true,false,false
-100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,true,true,false,false,false
-100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,true,,false,true,false
-100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,,true,true,false,false
-100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,true,true,false,false,false
-100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,true,,false,true,false
-100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,,true,true,false,false
-100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,true,true,false,false,false
-100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,true,,false,true,false
-100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,,true,true,false,false
-100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,true,true,false,false,false
-100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,true,,false,true,false
-100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,,true,true,false,false
-100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,true,true,false,false,false
-100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,true,,false,true,false
-100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,,true,true,false,false
-100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,true,true,false,false,false
-100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,true,,false,true,false
-100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,,true,true,false,false
-100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,true,true,false,false,false
-100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,true,,false,true,false
-100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,,true,true,false,false
-100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,true,true,false,false,false
-100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,true,,false,true,false
-100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,,true,true,false,false
-100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,true,true,false,false,false
-100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,true,,false,true,false
-100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,,true,true,false,false
-100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,true,true,false,false,false
-100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,true,,false,true,false
-100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,,true,true,false,false
-100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,true,true,false,false,false
-100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,true,,false,true,false
-100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,,true,true,false,false
-100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,true,true,false,false,false
-100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,true,,false,true,false
-100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,,,true,false,false
-100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,,,false,false,false
-100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,false,false
+100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,false,false,false
+100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,false,true,false
+100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,true,false,false
+100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,false,false,false
+100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,false,true,false
+100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,true,false,false
+100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,false,false,false
+100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,false,true,false
+100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,true,false,false
+100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,false,false,false
+100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,false,true,false
+100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,true,false,false
+100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,false,false,false
+100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,false,true,false
+100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,true,false,false
+100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,false,false,false
+100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,false,true,false
+100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,true,false,false
+100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,false,false,false
+100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,false,true,false
+100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,false,false
+100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,false,false,false
+100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,false,true,false
+100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,true,false,false
+100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,false,false,false
+100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,false,true,false
+100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,true,false,false
+100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,false,false,false
+100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,false,true,false
+100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,true,false,false
+100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,false,false,false
+100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,false,true,false
+100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,false,false
+100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,false,false,false
+100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,false,true,false
+100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,true,false,false
+100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,false,false,false
+100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,false,true,false
+100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,true,false,false
+100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,false,false,false
+100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,false,true,false
+100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,true,false,false
+100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,false,false,false
+100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,false,true,false
+100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,true,false,false
+100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,false,false,false
+100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,false,true,false
+100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,true,false,false
+100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,false,false,false
+100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,false,true,false
+100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,true,false,false
+100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,false,false,false
+100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,false,true,false
+100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,true,false,false
+100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,false,false,false
+100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,false,true,false
+100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,true,false,false
+100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,false,false,false
+100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,false,true,false
+100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,true,false,false
+100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,false,false,false
+100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index efee5fad..f760bbc7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,,true,true,false,false
-30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,true,,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,,true,true,false,false
-30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,true,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,,true,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,true,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,true,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,,true,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,true,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,,true,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,true,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,,true,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,true,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,,true,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,true,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,true,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,,true,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,true,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,,true,true,false,false
-30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,true,,false,false,false
-30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,,true,true,false,false
-30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,true,,false,false,false
-30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,,true,true,false,false
-30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,true,,false,false,false
-30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,false,false
+30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,false,false,false
+30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,true,false,false
+30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,false,false,false
+30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,false,false,false
+30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,false,false,false
+30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,false,false,false
+30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,false,false,false
+30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,false,false,false
+30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,false,false,false
+30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,true,false,false
+30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,false,false,false
+30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,true,false,false
+30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,false,false,false
+30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,true,false,false
+30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,false,false,false
+30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index 56e5d8df..1f7c7504 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,,true,true,false,false
-30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,true,true,false,false,false
-30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,true,,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,,true,true,false,false
-30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,true,true,false,false,false
-30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,true,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,,true,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,true,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,,true,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,true,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,,true,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,true,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,,true,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,true,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,,true,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,true,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,,true,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,true,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,true,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,,true,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,true,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,,true,true,false,false
-30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,true,true,false,false,false
-30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,,true,true,false,false
-30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,true,true,false,false,false
-30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,true,,false,true,false
-30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,,true,true,false,false
-30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,true,,false,false,false
-30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,false,false
+30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,false,false,false
+30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,false,true,false
+30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,true,false,false
+30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,false,false,false
+30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,false,false,false
+30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,false,false,false
+30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,false,false,false
+30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,false,false,false
+30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,false,false,false
+30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,false,false,false
+30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,false,false,false
+30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,true,false,false
+30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,false,false,false
+30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,false,true,false
+30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,true,false,false
+30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,false,false,false
+30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,false,true,false
+30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,true,false,false
+30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,false,false,false
+30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
index b0f6908a..62ed7876 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.7103175,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.7103175,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.7103175,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,,true,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,true,true,false,false,false
-110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,true,,false,true,false
-110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,,true,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,true,true,false,false,false
-110006,202003,200,42,0.862914677,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,true,,false,true,false
-110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,,true,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,true,true,false,false,false
-110007,202003,200,19,1.222772277,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,true,,false,true,false
-110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.48471,BI,0,3,3,,,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,,true,false,false,false
-110008,202003,200,43,1.53667263,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,true,,false,true,false
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.7103175,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.7103175,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.7103175,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,false,true,false
+110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,false,false,false
+110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,false,true,false
+110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,false,false,false
+110006,202003,200,42,0.862914677,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,false,true,false
+110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,false,false,false
+110007,202003,200,19,1.222772277,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,false,true,false
+110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.48471,BI,0,3,3,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,false,false,false
+110008,202003,200,43,1.53667263,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 0d399687..742f461f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,,true,true,false,false
-30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,,false,false,false
-30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,,,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,false,false,false
+30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,false,false,false
+30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,false,false,false
+30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,true,false,false
+30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,false,false,false
+30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index 6273276e..aa6f1128 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,,true,true,false,false
-30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,true,,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,,,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,false,false,false
+30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,true,false,false
+30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index fe23ecca..fedf150b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,,true,true,false,false
-60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,true,true,false,false,false
-60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,true,,false,true,false
-60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,,true,true,false,false
-60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,true,true,false,false,false
-60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,true,,false,true,false
-60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,,true,true,false,false
-60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,true,true,false,false,false
-60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,true,,false,true,false
-60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,,,true,false,false
-60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,,,false,false,false
-60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,,,false,true,false
-60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,,,
-60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,,,
-60002,201901,100,71,,,,,,1,1.5274,50.3694,,,,,,,,,,
-60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-60002,201903,100,71,,,,,,1.113,1,89.3761,,,,,,,,,,
-60003,201901,100,26,,,,,,1,1.5274,50.3694,,,,,,,,,,
-60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-60003,201903,100,26,,,,,,1.113,1,89.3761,,,,,,,,,,
-60004,201901,100,3,,,,,,1,1.5274,50.3694,,,,,,,,,,
-60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-60004,201903,100,3,,,,,,1.113,1,89.3761,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,false,false
+60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,false,false,false
+60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,false,true,false
+60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,true,false,false
+60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,false,false,false
+60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,false,true,false
+60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,true,false,false
+60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,false,false,false
+60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,false,true,false
+60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,true,false,false
+60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,false,false,false
+60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,false,true,false
+60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,
+60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,
+60002,201901,100,71,,,,,,1,1.5274,50.3694,,,,,,,,
+60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+60002,201903,100,71,,,,,,1.113,1,89.3761,,,,,,,,
+60003,201901,100,26,,,,,,1,1.5274,50.3694,,,,,,,,
+60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+60003,201903,100,26,,,,,,1.113,1,89.3761,,,,,,,,
+60004,201901,100,3,,,,,,1,1.5274,50.3694,,,,,,,,
+60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+60004,201903,100,3,,,,,,1.113,1,89.3761,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index 6ee1ca3f..e3896fa4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,true,,false,true,false
-30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,,,true,false,false
-30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,,,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,,,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,false,false,false
+30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,true,false,false
+30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index f222bebe..ccca4704 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,,true,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,,true,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,,true,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,,true,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,
-110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,
+110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 78f446c1..01847685 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,,true,true,false,false
-30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,true,,false,false,false
-30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,,,false,true,false
-30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,,,
-30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,,,
-30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,,,
-30002,201901,100,72,,,1,1.5274,50.3694,,,,,,,,,,,,,
-30002,201902,100,72,,,1,1.8795,121.4187,,,,,,,,,,,,,
-30002,201903,100,72,,,1,1,89.3761,,,,,,,,,,,,,
-30003,201901,100,7,,,1,1.5274,50.3694,,,,,,,,,,,,,
-30003,201902,100,7,,,1,1.8795,121.4187,,,,,,,,,,,,,
-30003,201903,100,7,,,1,1,89.3761,,,,,,,,,,,,,
-30004,201901,100,81,,,1,1.5274,50.3694,,,,,,,,,,,,,
-30004,201902,100,81,,,1,1.8795,121.4187,,,,,,,,,,,,,
-30004,201903,100,81,,,1,1,89.3761,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,false,false,false
+30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,false,false,false
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,false,false,false
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,true,false,false
+30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,false,false,false
+30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,false,true,false
+30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,
+30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,
+30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,
+30002,201901,100,72,,,1,1.5274,50.3694,,,,,,,,,,,
+30002,201902,100,72,,,1,1.8795,121.4187,,,,,,,,,,,
+30002,201903,100,72,,,1,1,89.3761,,,,,,,,,,,
+30003,201901,100,7,,,1,1.5274,50.3694,,,,,,,,,,,
+30003,201902,100,7,,,1,1.8795,121.4187,,,,,,,,,,,
+30003,201903,100,7,,,1,1,89.3761,,,,,,,,,,,
+30004,201901,100,81,,,1,1.5274,50.3694,,,,,,,,,,,
+30004,201902,100,81,,,1,1.8795,121.4187,,,,,,,,,,,
+30004,201903,100,81,,,1,1,89.3761,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index 5974c5b5..07f587fa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,,true,true,false,false
-60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,true,true,false,false,false
-60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,true,,false,true,false
-60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,,true,true,false,false
-60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,true,true,false,false,false
-60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,true,,false,true,false
-60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,,true,true,false,false
-60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,true,true,false,false,false
-60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,true,,false,true,false
-60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,,,true,false,false
-60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,,,false,false,false
-60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,,,false,true,false
-60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,,,
-60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,,,
-60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,,,
-60002,201901,100,71,,,1,1,50.3694,,,,,,,,,,,,,
-60002,201902,100,71,,,0.9685,1,121.4187,,,,,,,,,,,,,
-60002,201903,100,71,,,1.113,1,89.3761,,,,,,,,,,,,,
-60003,201901,100,26,,,1,1,50.3694,,,,,,,,,,,,,
-60003,201902,100,26,,,0.9685,1,121.4187,,,,,,,,,,,,,
-60003,201903,100,26,,,1.113,1,89.3761,,,,,,,,,,,,,
-60004,201901,100,3,,,1,1,50.3694,,,,,,,,,,,,,
-60004,201902,100,3,,,0.9685,1,121.4187,,,,,,,,,,,,,
-60004,201903,100,3,,,1.113,1,89.3761,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,true,false,false
+60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,false,false,false
+60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,false,true,false
+60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,true,false,false
+60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,false,false,false
+60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,false,true,false
+60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,true,false,false
+60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,false,false,false
+60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,false,true,false
+60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,true,false,false
+60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,false,false,false
+60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,false,true,false
+60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,
+60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,
+60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,
+60002,201901,100,71,,,1,1,50.3694,,,,,,,,,,,
+60002,201902,100,71,,,0.9685,1,121.4187,,,,,,,,,,,
+60002,201903,100,71,,,1.113,1,89.3761,,,,,,,,,,,
+60003,201901,100,26,,,1,1,50.3694,,,,,,,,,,,
+60003,201902,100,26,,,0.9685,1,121.4187,,,,,,,,,,,
+60003,201903,100,26,,,1.113,1,89.3761,,,,,,,,,,,
+60004,201901,100,3,,,1,1,50.3694,,,,,,,,,,,
+60004,201902,100,3,,,0.9685,1,121.4187,,,,,,,,,,,
+60004,201903,100,3,,,1.113,1,89.3761,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index 56069578..755ab6ab 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,true,,false,true,false
-30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,,,true,false,false
-30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,,,false,false,false
-30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,,,false,true,false
-30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,,,
-30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,,,
-30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,,,
-30002,201901,100,72,,,1,1.5274,1,,,,,,,,,,,,,
-30002,201902,100,72,,,0.9685,1.8795,1,,,,,,,,,,,,,
-30002,201903,100,72,,,1.113,1,1,,,,,,,,,,,,,
-30003,201901,100,7,,,1,1.5274,1,,,,,,,,,,,,,
-30003,201902,100,7,,,0.9685,1.8795,1,,,,,,,,,,,,,
-30003,201903,100,7,,,1.113,1,1,,,,,,,,,,,,,
-30004,201901,100,81,,,1,1.5274,1,,,,,,,,,,,,,
-30004,201902,100,81,,,0.9685,1.8795,1,,,,,,,,,,,,,
-30004,201903,100,81,,,1.113,1,1,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,false,false,false
+30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,false,false,false
+30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,false,false,false
+30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,true,false,false
+30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,false,false,false
+30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,false,true,false
+30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,
+30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,
+30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,
+30002,201901,100,72,,,1,1.5274,1,,,,,,,,,,,
+30002,201902,100,72,,,0.9685,1.8795,1,,,,,,,,,,,
+30002,201903,100,72,,,1.113,1,1,,,,,,,,,,,
+30003,201901,100,7,,,1,1.5274,1,,,,,,,,,,,
+30003,201902,100,7,,,0.9685,1.8795,1,,,,,,,,,,,
+30003,201903,100,7,,,1.113,1,1,,,,,,,,,,,
+30004,201901,100,81,,,1,1.5274,1,,,,,,,,,,,
+30004,201902,100,81,,,0.9685,1.8795,1,,,,,,,,,,,
+30004,201903,100,81,,,1.113,1,1,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index e9bccde0..3e4b7b81 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,,true,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,true,true,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,,true,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,true,true,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,,true,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,true,true,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,,,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,,true,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,
-110005,201901,200,27,,,1,1,107.48,,,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110006,201901,200,42,,,1,1,107.48,,,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110007,201901,200,19,,,1,1,107.48,,,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
-110008,201901,200,43,,,1,1,107.48,,,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,1,54.70285714,,,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,false,true,false
+110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,true,false,false
+110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,false,false,false
+110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,false,true,false
+110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,true,false,false
+110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,false,false,false
+110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,false,true,false
+110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,true,false,false
+110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,false,false,false
+110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,false,true,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,true,false,false
+110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,false,false,false
+110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
+110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,
+110005,201901,200,27,,,1,1,107.48,,,,,,,,,,,
+110005,201902,200,27,,,1.377938182,1,54.70285714,,,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110006,201901,200,42,,,1,1,107.48,,,,,,,,,,,
+110006,201902,200,42,,,1.377938182,1,54.70285714,,,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110007,201901,200,19,,,1,1,107.48,,,,,,,,,,,
+110007,201902,200,19,,,1.377938182,1,54.70285714,,,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110008,201901,200,43,,,1,1,107.48,,,,,,,,,,,
+110008,201902,200,43,,,1.377938182,1,54.70285714,,,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index 11061d21..c3478e8d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,,true,true,false,false
-210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,true,true,false,false,false
-210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,true,,false,true,false
-210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,,true,true,false,false
-210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,true,true,false,false,false
-210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,true,,false,true,false
-210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,,true,true,false,false
-210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,true,true,false,false,false
-210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,true,,false,true,false
-210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,,true,true,false,false
-210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,true,true,false,false,false
-210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,true,,false,true,false
-210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,,,true,false,false
-210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,,,false,false,false
-210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,,,false,true,false
-210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
-210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,
-210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,,,
-210002,201901,1,50,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
-210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,
-210002,201903,1,50,,,0.968230653,1,70.26136364,,,,,,,,,,,,,
-210003,201901,2,12,,,1,0.68736285,182.25,,,,,,,,,,,,,
-210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
-210003,201903,2,12,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
-210004,201901,2,9,,,1,0.68736285,182.25,,,,,,,,,,,,,
-210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
-210004,201903,2,9,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
-210005,201901,1,18,,,1,2.656680299,101.7103175,,,,,,,,,,,,,
-210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,,,
-210005,201903,2,18,,,1.259780318,1,182.2366412,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,true,false,false
+210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,false,false,false
+210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,false,true,false
+210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,true,false,false
+210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,false,false,false
+210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,false,true,false
+210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,true,false,false
+210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,false,false,false
+210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,false,true,false
+210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,true,false,false
+210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,false,false,false
+210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,false,true,false
+210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,true,false,false
+210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,false,false,false
+210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,false,true,false
+210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,
+210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,
+210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,
+210002,201901,1,50,,,1,2.656680299,101.7103175,,,,,,,,,,,
+210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,
+210002,201903,1,50,,,0.968230653,1,70.26136364,,,,,,,,,,,
+210003,201901,2,12,,,1,0.68736285,182.25,,,,,,,,,,,
+210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
+210003,201903,2,12,,,1.259780318,1,182.2366412,,,,,,,,,,,
+210004,201901,2,9,,,1,0.68736285,182.25,,,,,,,,,,,
+210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
+210004,201903,2,9,,,1.259780318,1,182.2366412,,,,,,,,,,,
+210005,201901,1,18,,,1,2.656680299,101.7103175,,,,,,,,,,,
+210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
+210005,201903,2,18,,,1.259780318,1,182.2366412,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index 072aed01..2d062fdd 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,57 +1,57 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,,true,true,false,false
-70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,true,true,false,false,false
-70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,true,true,false,false,false
-70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,true,true,false,false,false
-70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,true,true,false,false,false
-70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,true,true,false,false,false
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,true,,false,true,false
-70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,,true,true,false,false
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,true,true,false,false,false
-70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,true,true,false,false,false
-70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,true,true,false,false,false
-70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,true,true,false,false,false
-70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,true,true,false,false,false
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,true,,false,true,false
-70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,,true,true,false,false
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,true,true,false,false,false
-70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,true,true,false,false,false
-70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,true,true,false,false,false
-70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,true,true,false,false,false
-70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,true,true,false,false,false
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,true,,false,true,false
-70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,,,true,false,false
-70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,,,false,false,false
-70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,,,false,false,false
-70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,,,false,false,false
-70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,,,false,false,false
-70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,,,false,false,false
-70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,,,false,true,false
-70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
-70001,201902,100,39,,,1,1,1,,,,,,,,,,,,,
-70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
-70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
-70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
-70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
-70001,201907,100,39,,,1,1,1,,,,,,,,,,,,,
-70002,201901,100,94,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
-70002,201902,100,94,,,1,1,1,,,,,,,,,,,,,
-70002,201903,100,94,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
-70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
-70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
-70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
-70002,201907,100,94,,,1,1,1,,,,,,,,,,,,,
-70003,201901,100,42,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
-70003,201902,100,42,,,1,1,1,,,,,,,,,,,,,
-70003,201903,100,42,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
-70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
-70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
-70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
-70003,201907,100,42,,,1,1,1,,,,,,,,,,,,,
-70004,201901,100,6,,,1,1.511049724,101.7103175,,,,,,,,,,,,,
-70004,201902,100,6,,,1,1,1,,,,,,,,,,,,,
-70004,201903,100,6,,,1.082864299,1,70.26136364,,,,,,,,,,,,,
-70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,,,
-70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,,,
-70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,,,
-70004,201907,100,6,,,1,1,1,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,true,false,false
+70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,false,false,false
+70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,false,false,false
+70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,false,false,false
+70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,false,false,false
+70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,false,false,false
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,false,true,false
+70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,true,false,false
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,false,false,false
+70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,false,false,false
+70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,false,false,false
+70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,false,false,false
+70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,false,false,false
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,false,true,false
+70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,true,false,false
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,false,false,false
+70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,false,false,false
+70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,false,false,false
+70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,false,false,false
+70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,false,false,false
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,false,true,false
+70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,true,false,false
+70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,false,false,false
+70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,false,false,false
+70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,false,false,false
+70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,false,false,false
+70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,false,false,false
+70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,false,true,false
+70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,
+70001,201902,100,39,,,1,1,1,,,,,,,,,,,
+70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,
+70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
+70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
+70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
+70001,201907,100,39,,,1,1,1,,,,,,,,,,,
+70002,201901,100,94,,,1,1.511049724,101.7103175,,,,,,,,,,,
+70002,201902,100,94,,,1,1,1,,,,,,,,,,,
+70002,201903,100,94,,,1.082864299,1,70.26136364,,,,,,,,,,,
+70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
+70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
+70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
+70002,201907,100,94,,,1,1,1,,,,,,,,,,,
+70003,201901,100,42,,,1,1.511049724,101.7103175,,,,,,,,,,,
+70003,201902,100,42,,,1,1,1,,,,,,,,,,,
+70003,201903,100,42,,,1.082864299,1,70.26136364,,,,,,,,,,,
+70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
+70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
+70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
+70003,201907,100,42,,,1,1,1,,,,,,,,,,,
+70004,201901,100,6,,,1,1.511049724,101.7103175,,,,,,,,,,,
+70004,201902,100,6,,,1,1,1,,,,,,,,,,,
+70004,201903,100,6,,,1.082864299,1,70.26136364,,,,,,,,,,,
+70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
+70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
+70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
+70004,201907,100,6,,,1,1,1,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index 813ace8f..e1df2ea8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -1,43 +1,43 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,,,false,true,false
-110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,,,true,true,true
-110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,,,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,,true,true,true,true
-110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,,true,true,true
-110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,,,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,,,true,true,true
-110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,,,true,true,true
-110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,,,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,,,true,true,true
-110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-110002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-110002,201903,100,83,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-110003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-110003,201903,100,4,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-110004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-110004,201903,100,76,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-110005,201901,200,27,,,1,2.642597676,144.865,,,,,,,,,,,,,
-110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-110005,201903,200,27,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-110006,201901,200,42,,,1,2.642597676,144.865,,,,,,,,,,,,,
-110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-110006,201903,200,42,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-110007,201901,200,19,,,1,2.642597676,144.865,,,,,,,,,,,,,
-110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-110007,201903,200,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,false,true,false
+110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,true,true,true
+110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,true,true,true
+110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,true,true
+110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,true,true,true
+110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,true,true,true
+110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,true,true,true
+110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,
+110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
+110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,
+110002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,
+110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
+110002,201903,100,83,,,1.040615327,1,79.81873182,,,,,,,,,,,
+110003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,
+110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
+110003,201903,100,4,,,1.040615327,1,79.81873182,,,,,,,,,,,
+110004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,
+110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
+110004,201903,100,76,,,1.040615327,1,79.81873182,,,,,,,,,,,
+110005,201901,200,27,,,1,2.642597676,144.865,,,,,,,,,,,
+110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
+110005,201903,200,27,,,1.106182973,1,140.2509173,,,,,,,,,,,
+110006,201901,200,42,,,1,2.642597676,144.865,,,,,,,,,,,
+110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
+110006,201903,200,42,,,1.106182973,1,140.2509173,,,,,,,,,,,
+110007,201901,200,19,,,1,2.642597676,144.865,,,,,,,,,,,
+110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
+110007,201903,200,19,,,1.106182973,1,140.2509173,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 564a421f..600c798d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,145 +1,145 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,true,,true,true,false,false
-80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,true,true,true,true,false,false,false
-80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,true,,true,,false,true,false
-80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,true,,true,true,false,false
-80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,true,true,true,true,false,false,false
-80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,true,,true,,false,true,false
-80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,true,,true,true,false,false
-80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,true,true,true,true,false,false,false
-80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,true,,true,,false,true,false
-80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,true,,true,true,false,false
-80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,true,true,true,true,false,false,false
-80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,true,,true,,false,true,false
-80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,false,,true,true,false,false
-80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,false,false,true,true,false,false,false
-80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,true,,true,,false,true,false
-80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,true,,true,true,false,false
-80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,true,true,true,true,false,false,false
-80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,true,,true,,false,true,false
-80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,true,,true,true,false,false
-80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,true,true,true,true,false,false,false
-80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,true,,true,,false,true,false
-80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,,true,true,false,false
-80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,true,true,true,true,false,false,false
-80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,true,,true,,false,true,false
-80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,true,,true,true,false,false
-80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,true,true,true,true,false,false,false
-80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,true,,true,,false,true,false
-80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,true,,true,true,false,false
-80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,true,true,true,true,false,false,false
-80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,false,,true,,false,true,false
-80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,false,,true,true,false,false
-80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,false,false,true,true,false,false,false
-80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,false,,true,,false,true,false
-80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,,true,true,false,false
-80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,true,,true,,false,false,false
-80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,,,false,true,false
-80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,true,,true,true,false,false
-80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,true,true,true,true,false,false,false
-80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,true,,true,,false,true,false
-80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,true,,true,true,false,false
-80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,true,true,true,true,false,false,false
-80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,true,,true,,false,true,false
-80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,false,,true,true,false,false
-80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,false,true,true,true,false,false,false
-80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,true,,true,,false,true,false
-80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,true,,true,true,false,false
-80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,true,true,true,true,false,false,false
-80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,true,,true,,false,true,false
-80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,true,,true,true,false,false
-80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,true,true,true,true,false,false,false
-80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,true,,true,,false,true,false
-80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,true,,true,true,false,false
-80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,true,true,true,true,false,false,false
-80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,true,,true,,false,true,false
-80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,true,,true,true,false,false
-80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,true,false,true,true,false,false,false
-80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,false,,true,,false,true,false
-80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,true,,true,true,false,false
-80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,true,false,true,true,false,false,false
-80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,false,,true,,false,true,false
-80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,true,,true,true,false,false
-80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,true,true,true,true,false,false,false
-80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,true,,true,,false,true,false
-80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,false,,true,true,false,false
-80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,true,false,true,true,false,false,false
-80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,true,,true,,false,true,false
-80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,true,,true,true,false,false
-80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,true,true,true,true,false,false,false
-80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,true,,true,,false,true,false
-80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,,,true,false,false
-80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,,true,false,false,false
-80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,true,,false,true,false
-80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80002,201901,100,83,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80002,201903,100,83,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80003,201901,100,4,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80003,201903,100,4,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80004,201901,100,76,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80004,201903,100,76,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80005,201901,100,18,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80005,201903,100,18,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80006,201901,100,94,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80006,201903,100,94,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80007,201901,100,8,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80007,201903,100,8,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80008,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80008,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80009,201901,100,45,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80009,201903,100,45,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80010,201901,100,100,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80010,201903,100,100,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80011,201901,100,19,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80011,201903,100,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80012,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,,,
-80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,,,
-80012,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,,,
-80013,201901,200,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80013,201903,200,54,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80014,201901,200,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80014,201903,200,42,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80015,201901,200,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80015,201903,200,57,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80016,201901,200,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80016,201903,200,163,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80017,201901,200,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80017,201903,200,149,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80018,201901,200,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80018,201903,200,126,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80019,201901,200,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80019,201903,200,6,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80020,201901,200,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80020,201903,200,22,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80021,201901,200,108,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80021,201903,200,108,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80022,201901,200,67,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80022,201903,200,67,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80023,201901,200,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80023,201903,200,18,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
-80024,201901,200,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,,,
-80024,201903,200,155,,,1.040615327,1,79.81873182,,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,true,true,false,false
+80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,true,true,false,false,false
+80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,true,,false,true,false
+80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,true,true,false,false
+80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,true,true,false,false,false
+80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,true,,false,true,false
+80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,true,true,false,false
+80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,true,true,false,false,false
+80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,true,,false,true,false
+80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,true,true,false,false
+80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,true,true,false,false,false
+80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,true,,false,true,false
+80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,false,true,false,false
+80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,false,false,false,false,false
+80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,true,,false,true,false
+80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,true,true,false,false
+80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,true,true,false,false,false
+80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,true,,false,true,false
+80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,true,true,false,false
+80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,true,true,false,false,false
+80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,true,,false,true,false
+80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,false,false
+80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,true,true,false,false,false
+80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,true,,false,true,false
+80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,true,true,false,false
+80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,true,true,false,false,false
+80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,true,,false,true,false
+80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,true,true,false,false
+80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,true,true,false,false,false
+80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,false,,false,true,false
+80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,false,true,false,false
+80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,false,false,false,false,false
+80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,false,,false,true,false
+80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,false,false
+80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,true,,false,false,false
+80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,false,true,false
+80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,true,true,false,false
+80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,true,true,false,false,false
+80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,true,,false,true,false
+80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,true,true,false,false
+80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,true,true,false,false,false
+80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,true,,false,true,false
+80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,false,true,false,false
+80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,false,true,false,false,false
+80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,true,,false,true,false
+80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,true,true,false,false
+80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,true,true,false,false,false
+80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,true,,false,true,false
+80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,true,true,false,false
+80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,true,true,false,false,false
+80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,true,,false,true,false
+80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,true,true,false,false
+80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,true,true,false,false,false
+80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,true,,false,true,false
+80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,true,true,false,false
+80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,true,false,false,false,false
+80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,false,,false,true,false
+80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,true,true,false,false
+80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,true,false,false,false,false
+80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,false,,false,true,false
+80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,true,true,false,false
+80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,true,true,false,false,false
+80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,true,,false,true,false
+80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,false,true,false,false
+80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,true,false,false,false,false
+80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,true,,false,true,false
+80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,true,true,false,false
+80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,true,true,false,false,false
+80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,true,,false,true,false
+80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,true,false,false
+80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,false,false,false
+80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,false,true,false
+80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80002,201901,100,83,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80002,201903,100,83,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80003,201901,100,4,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80003,201903,100,4,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80004,201901,100,76,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80004,201903,100,76,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80005,201901,100,18,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80005,201903,100,18,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80006,201901,100,94,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80006,201903,100,94,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80007,201901,100,8,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80007,201903,100,8,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80008,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80008,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80009,201901,100,45,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80009,201903,100,45,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80010,201901,100,100,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80010,201903,100,100,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80011,201901,100,19,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80011,201903,100,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80012,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,
+80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
+80012,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
+80013,201901,200,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80013,201903,200,54,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80014,201901,200,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80014,201903,200,42,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80015,201901,200,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80015,201903,200,57,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80016,201901,200,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80016,201903,200,163,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80017,201901,200,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80017,201903,200,149,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80018,201901,200,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80018,201903,200,126,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80019,201901,200,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80019,201903,200,6,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80020,201901,200,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80020,201903,200,22,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80021,201901,200,108,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80021,201903,200,108,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80022,201901,200,67,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80022,201903,200,67,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80023,201901,200,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80023,201903,200,18,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80024,201901,200,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
+80024,201903,200,155,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index c030a07b..dfa0aaf8 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,true,,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,true,,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,true,,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,true,true,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,true,,true,,false,true,false
-30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,,true,,true,true,false,false
-30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,true,true,true,true,false,false,false
-30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,true,,true,,false,true,false
-30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,,true,,true,true,false,false
-30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,true,true,true,true,false,false,false
-30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,true,,true,,false,true,false
-30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,,true,,true,true,false,false
-30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,true,true,true,true,false,false,false
-30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,true,,true,,false,true,false
-30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,,true,,true,true,false,false
-30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,true,true,true,true,false,false,false
-30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,true,,true,,false,true,false
-30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,,true,,true,true,false,false
-30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,true,true,true,true,false,false,false
-30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,true,,true,,false,true,false
-30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,,true,,true,true,false,false
-30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,true,true,true,true,false,false,false
-30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,true,,true,,false,true,false
-30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,,true,,true,true,false,false
-30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,true,true,true,true,false,false,false
-30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,true,,true,,false,true,false
-30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,,,true,false,false
-30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,,,false,false,false
-30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,,,false,true,false
-30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
-30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,
-30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,
-30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,true,,false,true,false
+30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,,true,true,false,false
+30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,true,true,false,false,false
+30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,true,,false,true,false
+30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,,true,true,false,false
+30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,true,true,false,false,false
+30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,true,,false,true,false
+30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,,true,true,false,false
+30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,true,true,false,false,false
+30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,true,,false,true,false
+30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,,true,true,false,false
+30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,true,true,false,false,false
+30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,true,,false,true,false
+30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,,true,true,false,false
+30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,true,true,false,false,false
+30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,true,,false,true,false
+30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,,true,true,false,false
+30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,true,true,false,false,false
+30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,true,,false,true,false
+30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,,true,true,false,false
+30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,true,true,false,false,false
+30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,true,,false,true,false
+30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,true,false,false
+30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,false,false,false
+30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,false,true,false
+30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
+30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
+30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index 65f6451c..69c70eb9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
-160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,,true,true,false,false
-160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,true,true,false,false,false
-160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,true,true,false,false,false
-160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,true,true,false,false,false
-160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,true,true,false,false,false
-160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,true,true,false,false,false
-160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,true,,false,true,false
-160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,,,true,false,false
-160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,,,false,false,false
-160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,,,false,false,false
-160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,,,false,false,false
-160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,,,false,false,false
-160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,true,false,false
+160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,true,false,false
+160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index 525f0f04..4c97e19b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
-160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,,true,true,false,false
-160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,true,true,false,false,false
-160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,true,true,false,false,false
-160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,true,true,false,false,false
-160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,true,true,false,false,false
-160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,true,true,false,false,false
-160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,true,,false,true,false
-160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,,,true,false,false
-160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,,,false,false,false
-160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,,,false,false,false
-160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,,,false,false,false
-160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,,,false,false,false
-160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,,,false,true,false
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,true,false,false
+160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,true,false,false
+160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,true,false,false
+160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,true,false,false
+160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,true,false,false
+160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,false,true,false

From f3378469b103dc68fb5ae756105e0309280731c6 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 17:56:02 +0100
Subject: [PATCH 312/531] New rc to fix several bugs

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 4fc5fc70..1849311a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc8"
+version = "12.0.0-rc9"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From a71c48aa78b2350a448752310a4ecdaf41953e59 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 15 May 2023 18:07:58 +0100
Subject: [PATCH 313/531] Restore Files

---
 .../19_link_columns_output.csv                | 50 +++++++++----------
 .../33_partial_link_columns_output.csv        | 50 +++++++++----------
 .../19_link_columns_output.csv                | 50 +++++++++----------
 3 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index 69a45692..f642918c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,0,0,0,false,false,false
+190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,0,0,0,false,false,false
+190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,0,0,0,false,false,false
+190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,0,0,0,false,false,false
+190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,0,0,0,false,false,false
+190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,0,0,0,false,false,false
+190004,202001,100,51,2247,R,,,1,0.9214,50.3694,0,0,0,false,false,false
+190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190004,202004,100,51,8608,R,,,1.113,1,110.5473,0,0,0,false,false,false
+190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,0,0,0,false,false,false
+190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,0,0,0,false,false,false
+190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,0,0,0,true,false,false
+190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190006,202004,100,8,370.1196299,FIC,,,1.113,1,110.5473,0,0,0,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index 69a45692..341ca059 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,25 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,,1.853682946,1,0.9214,96.16299559,9261,R,0,0,4,true,false,false
+190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,0,0,3,false,false,false
+190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,0,0,4,false,false,false
+190001,202004,100,95,2.939189189,,1.113,1,87.62068966,4350,R,0,0,5,false,true,false
+190002,202001,100,17,,0.562673451,1,0.9214,96.16299559,2433,R,0,0,4,true,false,false
+190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,0,0,3,false,false,false
+190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,0,0,4,false,false,false
+190002,202004,100,17,11.26857143,,1.113,1,87.62068966,700,R,0,0,5,false,true,false
+190003,202001,100,64,,1.870080607,1,0.9214,96.16299559,7888,R,0,0,4,true,false,false
+190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,0,0,3,false,false,false
+190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,0,0,4,false,false,false
+190003,202004,100,64,0.537083388,,1.113,1,87.62068966,4077,R,0,0,5,false,true,false
+190004,202001,100,51,,,1,0.9214,96.16299559,2247,R,0,0,4,true,false,false
+190004,202002,100,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,0,0,3,false,false,false
+190004,202003,100,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,0,0,4,false,false,false
+190004,202004,100,51,,,1.113,1,87.62068966,8608,R,0,0,5,false,true,false
+190005,202001,100,34,,,1,0.9214,96.16299559,6271.13538,BI,0,0,4,true,false,false
+190005,202002,100,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,0,0,3,false,false,false
+190005,202003,100,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,0,0,4,false,false,false
+190005,202004,100,34,1.152154399,,1.113,1,87.62068966,5134,R,0,0,5,false,true,false
+190006,202001,100,8,,,1,0.9214,96.16299559,769.3039647,C,0,0,4,true,false,false
+190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.523909,FIC,0,0,3,false,false,false
+190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.874906,FIC,0,0,4,false,false,false
+190006,202004,100,8,,,1.113,1,87.62068966,706.6157695,FIC,0,0,5,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
index 69a45692..964ccb69 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
+190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
+190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
+190001,202004,100,95,1.113,1,110.5473,4350,R,0,0,0,false,true,false
+190002,202001,100,17,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
+190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
+190002,202004,100,17,1.113,1,110.5473,700,R,0,0,0,false,true,false
+190003,202001,100,64,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
+190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
+190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
+190003,202004,100,64,1.113,1,110.5473,4077,R,0,0,0,false,true,false
+190004,202001,100,51,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
+190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
+190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
+190004,202004,100,51,1.113,1,110.5473,8608,R,0,0,0,false,true,false
+190005,202001,100,34,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
+190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
+190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
+190005,202004,100,34,1.113,1,110.5473,5134,R,0,0,0,false,true,false
+190006,202001,100,8,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
+190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
+190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
+190006,202004,100,8,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
\ No newline at end of file

From 19d4d48b3b18f49232481cac92b674c74110dde4 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 18:20:36 +0100
Subject: [PATCH 314/531] Must use working rather than filtered data frame for
 inclusion markers

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 292e9637..7dafeba7 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -358,7 +358,7 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
             df = df.fillna(fill_value, fill_column)
         if link_filter:
             df = df.join(
-                filtered_df.select(
+                working_df.select(
                     "ref", "period", "grouping", "link_inclusion_previous", "link_inclusion_current", "link_inclusion_next"
                 ),
                 ["ref", "period", "grouping"],

From 67f2aa8848dcdb763c10391950045a358839ff4b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 May 2023 19:18:50 +0100
Subject: [PATCH 315/531] Bump rc version (now passes all ratio of means tests)

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 1849311a..93d98ac4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc9"
+version = "12.0.0-rc10"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 88a183a78d4f7459cadb1d088079db2a7f77e702 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 16 May 2023 11:58:01 +0100
Subject: [PATCH 316/531] Adding Back Data To Weighting + Weight At
 Period/Group Level Not Period/Ref Level

---
 .../imputation/engine.py                      | 49 ++++++++++++++-----
 .../imputation/ratio_calculators.py           |  5 +-
 ...BI_R_R_50_weight_previous_month_output.csv | 26 +++++-----
 tests/imputation/test_mean_of_ratios.py       | 21 +++++---
 4 files changed, 69 insertions(+), 32 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 7dafeba7..36acb854 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -127,6 +127,13 @@ def impute(
         "output": output_col,
         "marker": marker_col,
     }
+    if weight is not None:
+        weighted_expected_columns = {
+            "forward": "unweighted_forward",
+            "backward": "unweighted_backward",
+            "construction": "unweighted_construction",
+        }
+        weighted_expected_columns.update(back_expected_columns)
 
     type_mapping = {
         "period": StringType,
@@ -169,6 +176,14 @@ def impute(
                 "match"
             ),
         )
+    prepared_weight_data_df = None
+    if weight is not None:
+        prepared_weight_data_df = validation.validate_dataframe(
+            back_data_df,
+            weighted_expected_columns,
+            type_mapping,
+            ["ref", "period", "grouping"],
+        )
 
     # Store the value for the period prior to the start of imputation.
     # Stored as a value to avoid a join in output creation.
@@ -359,18 +374,26 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
         if link_filter:
             df = df.join(
                 working_df.select(
-                    "ref", "period", "grouping", "link_inclusion_previous", "link_inclusion_current", "link_inclusion_next"
+                    "ref",
+                    "period",
+                    "grouping",
+                    "link_inclusion_previous",
+                    "link_inclusion_current",
+                    "link_inclusion_next",
                 ),
                 ["ref", "period", "grouping"],
                 "left",
             )
-            output_col_mapping.update({
-                "link_inclusion_current": link_inclusion_current_col,
-                "link_inclusion_previous": link_inclusion_previous_col,
-                "link_inclusion_next": link_inclusion_next_col,
-            })
+            output_col_mapping.update(
+                {
+                    "link_inclusion_current": link_inclusion_current_col,
+                    "link_inclusion_previous": link_inclusion_previous_col,
+                    "link_inclusion_next": link_inclusion_next_col,
+                }
+            )
 
         if weight is not None:
+            nonlocal prepared_weight_data_df
             output_col_mapping.update(
                 {
                     "unweighted_forward": "unweighted_forward",
@@ -391,17 +414,19 @@ def calculate_weighted_link(link_name):
                     .alias(link_name)
                 )
 
-            weighting_df = df.select(
-                "period", "ref", "grouping", "forward", "backward", "construction"
+            weighting_df = (
+                df.unionByName(prepared_weight_data_df, True)
+                .select("period", "grouping", "forward", "backward", "construction")
+                .distinct()
             )
+
             curr_df = weighting_df.alias("curr")
             prev_df = weighting_df.alias("prev")
             df = (
                 curr_df.join(
                     prev_df,
                     (
-                        (col("curr.ref") == col("prev.ref"))
-                        & (
+                        (
                             col("prev.period")
                             == calculate_previous_period(
                                 col("curr.period"), weight_periodicity
@@ -413,7 +438,7 @@ def calculate_weighted_link(link_name):
                 )
                 .select(
                     expr("curr.period AS period"),
-                    expr("curr.ref AS ref"),
+                    expr("curr.grouping AS grouping"),
                     calculate_weighted_link("forward"),
                     calculate_weighted_link("backward"),
                     calculate_weighted_link("construction"),
@@ -422,7 +447,7 @@ def calculate_weighted_link(link_name):
                     df.withColumnRenamed("forward", "unweighted_forward")
                     .withColumnRenamed("backward", "unweighted_backward")
                     .withColumnRenamed("construction", "unweighted_construction"),
-                    ["period", "ref"],
+                    ["period", "grouping"],
                 )
             )
 
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 50865a8c..05067f18 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -45,6 +45,9 @@ def mean_of_ratios(
         "grouping",
         "ref",
         when(col("link_inclusion_current"), col("aux")).alias("aux"),
+        "link_inclusion_previous",
+        "link_inclusion_next",
+        "link_inclusion_current",
         when(
             col("link_inclusion_previous")
             & (lit(include_zeros) | (col("previous.output") != lit(0))),
@@ -271,8 +274,6 @@ def upper_bound(c):
     growth_additional_outputs = {
         "growth_forward": growth_forward_col,
         "growth_backward": growth_backward_col,
-        "link_inclusion_previous": link_inclusion_previous_col,
-        "link_inclusion_next": link_inclusion_next_col,
     }
 
     if lower_trim is not None:
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
index 62ed7876..6800fe09 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -1,16 +1,18 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.7103175,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.7103175,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.7103175,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.7103175,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.870040426,1,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,false,true,false
+110001,201912,100,89,,,,,,1,1.5274,50.3694,0,BI,,,,,,
+110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
+110001,202002,100,89,0.964517525,1.43945754,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
+110001,202003,100,89,0.694706146,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
+110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
+110002,202002,100,83,1.223166183,1.244570947,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
+110002,202003,100,83,0.803489751,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
+110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
+110003,202002,100,4,0.133930925,0.710986704,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
+110003,202003,100,4,1.406496063,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
+110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
+110004,202002,100,76,0.765786164,,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
+110004,202003,100,76,,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,false,true,false
+110005,201912,200,27,,,,,,1,2.994350985,107.48,0,BI,,,,,,
 110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,true,false,false
 110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,false,false,false
 110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,false,true,false
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 8e8e94a2..18897a3a 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -236,18 +236,27 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         )
     )
 
-    if "link_columns" in scenario:
-        scenario_expected_output = scenario_expected_output.drop(
-            forward_growth_col,
-            backward_growth_col,
-        )
-    else:
+    if "link_columns" not in scenario:
         scenario_actual_output = scenario_actual_output.withColumn(
             forward_growth_col, bround(col(forward_growth_col).cast(decimal_type), 6)
         ).withColumn(
             backward_growth_col, bround(col(backward_growth_col).cast(decimal_type), 6)
         )
 
+    if "weight" in scenario:
+        scenario_actual_output = (
+            scenario_actual_output.withColumn(
+                un_forward_col, bround(col(un_forward_col).cast(decimal_type), 6)
+            )
+            .withColumn(
+                un_backward_col, bround(col(un_backward_col).cast(decimal_type), 6)
+            )
+            .withColumn(
+                un_construction_col,
+                bround(col(un_construction_col).cast(decimal_type), 6),
+            )
+        )
+
     select_cols = list(set(dataframe_columns) & set(scenario_expected_output.columns))
     assert isinstance(scenario_actual_output, type(scenario_input))
     sort_col_list = [reference_col, period_col]

From f68413a67920fe558f63f7e7ebb932dfde11fe36 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 16 May 2023 12:11:49 +0100
Subject: [PATCH 317/531] Fix some breakages in mean of ratios which were not
 spotted due to the focus on weighting

---
 .../imputation/ratio_calculators.py           | 20 ++++++-------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 05067f18..083b98e5 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -44,6 +44,9 @@ def mean_of_ratios(
         "period",
         "grouping",
         "ref",
+        "link_inclusion_previous",
+        "link_inclusion_current",
+        "link_inclusion_next",
         when(col("link_inclusion_current"), col("aux")).alias("aux"),
         "link_inclusion_previous",
         "link_inclusion_next",
@@ -262,15 +265,6 @@ def upper_bound(c):
         .withColumn("default_backward", expr("backward IS NULL"))
     )
 
-    growth_select_cols = [
-        "ref",
-        "period",
-        "grouping",
-        "growth_forward",
-        "growth_backward",
-        "link_inclusion_previous",
-        "link_inclusion_next",
-    ]
     growth_additional_outputs = {
         "growth_forward": growth_forward_col,
         "growth_backward": growth_backward_col,
@@ -283,12 +277,10 @@ def upper_bound(c):
                 "trim_inclusion_backward": trim_inclusion_backward_col,
             }
         )
-        growth_select_cols += [
-            "trim_inclusion_forward",
-            "trim_inclusion_backward",
-        ]
 
-    growth_df = df.select(growth_select_cols)
+    growth_df = df.select(
+        "ref", "period", "grouping", *growth_additional_outputs.keys()
+    )
 
     return [
         RatioCalculationResult(

From e2cd08f5daa5f3e31ff9a31a0bfd74e8f774df59 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 16 May 2023 12:23:03 +0100
Subject: [PATCH 318/531] 49 Main Test Passes. Back Data Test Fails. Possible
 Cartesian product?

---
 ...BI_R_R_50_weight_previous_month_output.csv | 20 +++++++++----------
 tests/imputation/test_mean_of_ratios.py       |  3 ++-
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
index 6800fe09..9525b68d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -11,17 +11,17 @@ identifier,date,group,other,growth_forward,growth_backward,forward,backward,cons
 110003,202003,100,4,1.406496063,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
 110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
 110004,202002,100,76,0.765786164,,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,2648.403057,FIR,3,0,3,false,true,false
+110004,202003,100,76,,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,2648.403058,FIR,3,0,3,false,true,false
 110005,201912,200,27,,,,,,1,2.994350985,107.48,0,BI,,,,,,
 110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,false,false,false
-110005,202003,200,27,1.416761688,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,false,true,false
+110005,202002,200,27,1.344834196,0.70583501,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,false,false,false
+110005,202003,200,27,1.416761688,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,false,true,false
 110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,false,false,false
-110006,202003,200,42,0.862914677,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,false,true,false
+110006,202002,200,42,1.454835681,1.158863126,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,false,false,false
+110006,202003,200,42,0.862914677,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,false,true,false
 110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,false,false,false
-110007,202003,200,19,1.222772277,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,false,true,false
-110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.48471,BI,0,3,3,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,false,false,false
-110008,202003,200,43,1.53667263,,1.127130141,1,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,false,true,false
+110007,202002,200,19,0.183770015,0.817813765,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,false,false,false
+110007,202003,200,19,1.222772277,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,false,true,false
+110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.484733,BI,0,3,3,true,false,false
+110008,202002,200,43,,0.650756694,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,false,false,false
+110008,202003,200,43,1.53667263,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,false,true,false
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 18897a3a..975e3c6d 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -217,7 +217,8 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     scenario_expected_output = scenario_expected_output.filter(
         col(period_col) >= imputation_kwargs["starting_period"]
     )
-
+    scenario_input.show(100)
+    back_data_df.show(100)
     # We need to drop our grouping and auxiliary columns from our output now
     # we've potentially set up our back data as these must not come out of
     # imputation.

From e4e8610861ec95912f9558c5cd5aa1ac87a7f13e Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 16 May 2023 13:52:34 +0100
Subject: [PATCH 319/531] No Growth Needed As No Calculations Occur

---
 .../19_link_columns_output.csv                | 50 +++++++++----------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index f642918c..3ca20b6b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,9261,R,,1.853682946,1,0.9214,50.3694,0,0,0,false,false,false
-190001,202002,100,95,4996,R,0.53946658,3.375675676,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190001,202003,100,95,1480,R,0.29623699,0.340229885,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190001,202004,100,95,4350,R,2.939189189,,1.113,1,110.5473,0,0,0,false,false,false
-190002,202001,100,17,2433,R,,0.562673451,1,0.9214,50.3694,0,0,0,false,false,false
-190002,202002,100,17,4324,R,1.525901943,0.655350106,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190002,202003,100,17,6598,R,0.106092755,9.425714286,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190002,202004,100,17,700,R,11.26857143,,1.113,1,110.5473,0,0,0,false,false,false
-190003,202001,100,64,7888,R,,1.870080607,1,0.9214,50.3694,0,0,0,false,false,false
-190003,202002,100,64,4218,R,0.534736308,0.555658016,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190003,202003,100,64,7591,R,1.799668089,1.861908266,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190003,202004,100,64,4077,R,0.537083388,,1.113,1,110.5473,0,0,0,false,false,false
-190004,202001,100,51,2247,R,,,1,0.9214,50.3694,0,0,0,false,false,false
-190004,202002,100,51,1914.6687,FIR,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190004,202003,100,51,1854.356636,FIR,,,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190004,202004,100,51,8608,R,,,1.113,1,110.5473,0,0,0,false,false,false
-190005,202001,100,34,6271.13538,BI,,,1,0.9214,50.3694,0,0,0,false,false,false
-190005,202002,100,34,6806.0944,BI,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190005,202003,100,34,4456,R,,0.867939229,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190005,202004,100,34,5134,R,1.152154399,,1.113,1,110.5473,0,0,0,false,false,false
-190006,202001,100,8,402.9552,C,,,1,0.9214,50.3694,0,0,0,true,false,false
-190006,202002,100,8,343.3581259,FIC,,,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190006,202003,100,8,332.542345,FIC,,,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190006,202004,100,8,370.1196299,FIC,,,1.113,1,110.5473,0,0,0,false,true,false
\ No newline at end of file
+identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,9261,R,1,0.9214,50.3694,0,0,0,false,false,false
+190001,202002,100,95,4996,R,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190001,202003,100,95,1480,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190001,202004,100,95,4350,R,1.113,1,110.5473,0,0,0,false,false,false
+190002,202001,100,17,2433,R,1,0.9214,50.3694,0,0,0,false,false,false
+190002,202002,100,17,4324,R,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190002,202003,100,17,6598,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190002,202004,100,17,700,R,1.113,1,110.5473,0,0,0,false,false,false
+190003,202001,100,64,7888,R,1,0.9214,50.3694,0,0,0,false,false,false
+190003,202002,100,64,4218,R,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190003,202003,100,64,7591,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190003,202004,100,64,4077,R,1.113,1,110.5473,0,0,0,false,false,false
+190004,202001,100,51,2247,R,1,0.9214,50.3694,0,0,0,false,false,false
+190004,202002,100,51,1914.6687,FIR,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190004,202003,100,51,1854.356636,FIR,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190004,202004,100,51,8608,R,1.113,1,110.5473,0,0,0,false,false,false
+190005,202001,100,34,6271.13538,BI,1,0.9214,50.3694,0,0,0,false,false,false
+190005,202002,100,34,6806.0944,BI,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190005,202003,100,34,4456,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190005,202004,100,34,5134,R,1.113,1,110.5473,0,0,0,false,false,false
+190006,202001,100,8,402.9552,C,1,0.9214,50.3694,0,0,0,true,false,false
+190006,202002,100,8,343.3581259,FIC,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190006,202003,100,8,332.542345,FIC,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190006,202004,100,8,370.1196299,FIC,1.113,1,110.5473,0,0,0,false,true,false

From 1a83cdf7bf7f6bddd1b4fee79fc48dd5d957ff1d Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 16 May 2023 14:03:20 +0100
Subject: [PATCH 320/531] Need to select these to get them out.

---
 statistical_methods_library/imputation/ratio_calculators.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 083b98e5..f48808f4 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -44,9 +44,6 @@ def mean_of_ratios(
         "period",
         "grouping",
         "ref",
-        "link_inclusion_previous",
-        "link_inclusion_current",
-        "link_inclusion_next",
         when(col("link_inclusion_current"), col("aux")).alias("aux"),
         "link_inclusion_previous",
         "link_inclusion_next",
@@ -279,7 +276,8 @@ def upper_bound(c):
         )
 
     growth_df = df.select(
-        "ref", "period", "grouping", *growth_additional_outputs.keys()
+        "ref", "period", "grouping", "link_inclusion_previous", "link_inclusion_next",
+        "link_inclusion_current", *growth_additional_outputs.keys()
     )
 
     return [

From 20be8fefafc78f88d0cbd3da033449afd3ec1eba Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 16 May 2023 14:49:16 +0100
Subject: [PATCH 321/531] Update

---
 statistical_methods_library/imputation/engine.py |  2 +-
 .../imputation/ratio_calculators.py              |  3 +--
 ...FI-BI_R_R_50_weight_previous_month_output.csv | 16 ++++++++--------
 tests/imputation/test_mean_of_ratios.py          |  3 +--
 4 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 36acb854..043e9a5b 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -450,7 +450,7 @@ def calculate_weighted_link(link_name):
                     ["period", "grouping"],
                 )
             )
-
+        
         return df
 
     # Caching for both imputed and unimputed data.
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index f48808f4..ffc6df02 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -276,8 +276,7 @@ def upper_bound(c):
         )
 
     growth_df = df.select(
-        "ref", "period", "grouping", "link_inclusion_previous", "link_inclusion_next",
-        "link_inclusion_current", *growth_additional_outputs.keys()
+        "ref", "period", "grouping", *growth_additional_outputs.keys()
     )
 
     return [
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
index 9525b68d..c8c5e413 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -1,27 +1,27 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
 110001,201912,100,89,,,,,,1,1.5274,50.3694,0,BI,,,,,,
-110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
+110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.65668,101.710317,9244,R,0,4,4,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
 110001,202003,100,89,0.694706146,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
+110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.65668,101.710317,4826,R,0,4,4,true,false,false
 110002,202002,100,83,1.223166183,1.244570947,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
 110002,202003,100,83,0.803489751,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
+110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.65668,101.710317,7586,R,0,4,4,true,false,false
 110003,202002,100,4,0.133930925,0.710986704,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
 110003,202003,100,4,1.406496063,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
+110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.65668,101.710317,3975,R,0,4,4,true,false,false
 110004,202002,100,76,0.765786164,,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
 110004,202003,100,76,,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,2648.403058,FIR,3,0,3,false,true,false
 110005,201912,200,27,,,,,,1,2.994350985,107.48,0,BI,,,,,,
-110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844366,182.25,5217,R,0,3,3,true,false,false
+110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844,182.25,5217,R,0,3,3,true,false,false
 110005,202002,200,27,1.344834196,0.70583501,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,false,false,false
 110005,202003,200,27,1.416761688,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,false,true,false
-110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844366,182.25,5325,R,0,3,3,true,false,false
+110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844,182.25,5325,R,0,3,3,true,false,false
 110006,202002,200,42,1.454835681,1.158863126,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,false,false,false
 110006,202003,200,42,0.862914677,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,false,true,false
-110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844366,182.25,5496,R,0,3,3,true,false,false
+110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844,182.25,5496,R,0,3,3,true,false,false
 110007,202002,200,19,0.183770015,0.817813765,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,false,false,false
 110007,202003,200,19,1.222772277,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,false,true,false
-110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844366,182.25,10340.484733,BI,0,3,3,true,false,false
+110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844,182.25,10340.484733,BI,0,3,3,true,false,false
 110008,202002,200,43,,0.650756694,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,false,false,false
 110008,202003,200,43,1.53667263,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,false,true,false
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 975e3c6d..18897a3a 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -217,8 +217,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     scenario_expected_output = scenario_expected_output.filter(
         col(period_col) >= imputation_kwargs["starting_period"]
     )
-    scenario_input.show(100)
-    back_data_df.show(100)
+
     # We need to drop our grouping and auxiliary columns from our output now
     # we've potentially set up our back data as these must not come out of
     # imputation.

From bd4ebebbfc961558bafb38fccd91a32db20ac921 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 16 May 2023 15:34:25 +0100
Subject: [PATCH 322/531] Moving logic around, not expected to work properly

---
 .../imputation/engine.py                      | 162 +++++++-----------
 1 file changed, 65 insertions(+), 97 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 043e9a5b..6521df9d 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -119,7 +119,7 @@ def impute(
     if construction_link_col in input_df.columns:
         input_params["construction"] = construction_link_col
 
-    back_expected_columns = {
+    back_input_params = {
         "ref": reference_col,
         "period": period_col,
         "grouping": grouping_col,
@@ -127,13 +127,13 @@ def impute(
         "output": output_col,
         "marker": marker_col,
     }
-    if weight is not None:
-        weighted_expected_columns = {
-            "forward": "unweighted_forward",
-            "backward": "unweighted_backward",
-            "construction": "unweighted_construction",
-        }
-        weighted_expected_columns.update(back_expected_columns)
+
+    if weight:
+        back_input_params.update({
+                "forward": forward_link_col,
+                "backward": backward_link_col,
+                "construction": construction_link_col,
+            })
 
     type_mapping = {
         "period": StringType,
@@ -146,13 +146,26 @@ def impute(
         "construction": DecimalType,
     }
 
-    aliased_input_df = validation.validate_dataframe(
-        input_df,
-        input_params,
-        type_mapping,
-        ["ref", "period", "grouping"],
-        ["target", "forward", "backward", "construction"],
+    prepared_df = (
+        validation.validate_dataframe(
+            input_df,
+            input_params,
+            type_mapping,
+            ["ref", "period", "grouping"],
+            ["target", "forward", "backward", "construction"],
+        )
+        .withColumnRenamed("target", "output")
+        .withColumn("marker", when(~col("output").isNull(), Marker.RESPONSE.value))
+        .withColumn(
+            "previous_period", calculate_previous_period(col("period"), periodicity)
+        )
+        .withColumn(
+            "next_period", calculate_next_period(col("period"), periodicity)
+        )
     )
+    prior_period_df = prepared_df.selectExpr(
+        "min(previous_period) AS prior_period"
+    ).localCheckpoint(eager=True)
 
     # Cache the prepared back data df since we'll need a few differently
     # filtered versions
@@ -161,82 +174,25 @@ def impute(
     if back_data_df:
         prepared_back_data_df = validation.validate_dataframe(
             back_data_df,
-            back_expected_columns,
+            back_input_params,
             type_mapping,
             ["ref", "period", "grouping"],
-        )
-        input_df = input_df.unionByName(back_data_df, allowMissingColumns=True)
+        ).localCheckpoint(eager=False)
 
     if link_filter:
-        filtered_refs = input_df.select(
-            col(reference_col).alias("ref"),
-            col(period_col).alias("period"),
-            col(grouping_col).alias("grouping"),
-            (expr(link_filter) if isinstance(link_filter, str) else link_filter).alias(
-                "match"
-            ),
-        )
-    prepared_weight_data_df = None
-    if weight is not None:
-        prepared_weight_data_df = validation.validate_dataframe(
-            back_data_df,
-            weighted_expected_columns,
-            type_mapping,
-            ["ref", "period", "grouping"],
-        )
-
-    # Store the value for the period prior to the start of imputation.
-    # Stored as a value to avoid a join in output creation.
-    prior_period_df = None
-
-    # --- Run ---
-    def run() -> DataFrame:
-        nonlocal back_data_df
-
-        def should_null_check(func, perform_null_check, *args, **kwargs):
-            return lambda df: (func(df, *args, **kwargs), perform_null_check)
-
-        stages = [
-            should_null_check(prepare_df, False),
-            should_null_check(calculate_ratios, True),
-            should_null_check(forward_impute_from_response, True),
-            should_null_check(backward_impute, True),
-            should_null_check(construct_values, True),
-            should_null_check(forward_impute_from_construction, True),
-        ]
-        df = aliased_input_df
-        for stage in stages:
-            result = stage(df)
-            if result:
-                df = result[0].localCheckpoint(eager=False)
-
-                if result[1] and df.filter(col("output").isNull()).count() == 0:
-                    break
-
-        return create_output(df)
-
-    # --- Prepare DF ---
-
-    def prepare_df(df: DataFrame) -> DataFrame:
-        nonlocal prepared_back_data_df
-
-        prepared_df = (
-            df.withColumn("output", col("target"))
-            .drop("target")
-            .withColumn("marker", when(~col("output").isNull(), Marker.RESPONSE.value))
-            .withColumn(
-                "previous_period", calculate_previous_period(col("period"), periodicity)
-            )
-            .withColumn(
-                "next_period", calculate_next_period(col("period"), periodicity)
+        filtered_refs = (
+            input_df.unionByName(back_data_df, allowMissingColumns=True)
+            .select(
+                col(reference_col).alias("ref"),
+                col(period_col).alias("period"),
+                col(grouping_col).alias("grouping"),
+                (expr(link_filter) if isinstance(link_filter, str) else link_filter).alias(
+                    "match"
+                ),
             )
-        )
+        ).localCheckpoint(eager=False)
 
-        nonlocal prior_period_df
 
-        prior_period_df = prepared_df.selectExpr(
-            "min(previous_period) AS prior_period"
-        ).localCheckpoint(eager=True)
 
         if prepared_back_data_df:
             prepared_back_data_df = (
@@ -265,8 +221,25 @@ def prepare_df(df: DataFrame) -> DataFrame:
             filter_back_data(col("marker") == lit(Marker.RESPONSE.value)),
             allowMissingColumns=True,
         )
+    # --- Run ---
+    def run() -> DataFrame:
+        stages = [
+            calculate_ratios,
+            forward_impute_from_response,
+            backward_impute,
+            construct_values,
+            forward_impute_from_construction,
+        ]
+        df = prepared_df
+        for stage in stages:
+            df = stage(df)
+            if df:
+                df = df.localCheckpoint(eager=False)
 
-        return prepared_df
+                if df.filter(col("output").isNull()).count() == 0:
+                    break
+
+        return create_output(df)
 
     # --- Calculate Ratios ---
 
@@ -392,16 +365,6 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
                 }
             )
 
-        if weight is not None:
-            nonlocal prepared_weight_data_df
-            output_col_mapping.update(
-                {
-                    "unweighted_forward": "unweighted_forward",
-                    "unweighted_backward": "unweighted_backward",
-                    "unweighted_construction": "unweighted_construction",
-                }
-            )
-
             def calculate_weighted_link(link_name):
                 prev_link = col(f"prev.{link_name}")
                 curr_link = col(f"curr.{link_name}")
@@ -415,9 +378,14 @@ def calculate_weighted_link(link_name):
                 )
 
             weighting_df = (
-                df.unionByName(prepared_weight_data_df, True)
-                .select("period", "grouping", "forward", "backward", "construction")
-                .distinct()
+                df.select("period", "grouping", "forward", "backward", "construction")
+                .groupBy("period", "grouping")
+                .agg(
+                    expr("first(forward) AS forward"),
+                    expr("first(backward) AS backward"),
+                    expr("first(construction) AS construction"),
+                )
+
             )
 
             curr_df = weighting_df.alias("curr")

From 33ecada8bfb4865a3e53a36135e3af1a2fbba0e0 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 16 May 2023 16:13:01 +0100
Subject: [PATCH 323/531] Another intermediate logic moving commit to remove
 unnecessary subfunctions

---
 .../imputation/engine.py                      | 161 +++++++++---------
 1 file changed, 79 insertions(+), 82 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 6521df9d..41a87ff9 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -67,6 +67,9 @@ def impute(
     periodicity: Optional[int] = 1,
     weight: Optional[Number] = None,
     weight_periodicity_multiplier: Optional[int] = None,
+    unweighted_forward_link_col: Optional[str] = "forward_unweighted",
+    unweighted_backward_link_col: Optional[str] = "backward_unweighted",
+    unweighted_construction_link_col: Optional[str] = "construction_unweighted",
     **ratio_calculator_params,
 ) -> DataFrame:
     # --- Validate params ---
@@ -77,10 +80,6 @@ def impute(
     if any(link_cols) and not all(link_cols):
         raise TypeError("Either all or no link columns must be specified")
 
-    if weight is not None:
-        weight = lit(Decimal(weight))
-        weight_periodicity = weight_periodicity_multiplier * periodicity
-
     input_params = {
         "ref": reference_col,
         "period": period_col,
@@ -128,12 +127,30 @@ def impute(
         "marker": marker_col,
     }
 
-    if weight:
-        back_input_params.update({
-                "forward": forward_link_col,
-                "backward": backward_link_col,
-                "construction": construction_link_col,
-            })
+    if weight is not None:
+        weight = lit(Decimal(weight))
+        weight_periodicity = weight_periodicity_multiplier * periodicity
+        back_input_params.update(
+            {
+                "forward_unweighted": unweighted_forward_link_col,
+                "backward_unweighted": unweighted_backward_link_col,
+                "construction_unweighted": unweighted_construction_link_col,
+            }
+        )
+        input_params.update(
+            {
+                unweighted_backward_link_col: "backward_unweighted",
+                unweighted_forward_link_col: "forward_unweighted",
+                unweighted_construction_link_col: "construction_unweighted",
+            }
+        )
+        output_col_mapping.update(
+            {
+                "backward_unweighted": unweighted_backward_link_col,
+                "forward_unweighted": unweighted_forward_link_col,
+                "construction_unweighted": unweighted_construction_link_col,
+            }
+        )
 
     type_mapping = {
         "period": StringType,
@@ -144,6 +161,9 @@ def impute(
         "forward": DecimalType,
         "backward": DecimalType,
         "construction": DecimalType,
+        "forward_unweighted": DecimalType,
+        "backward_unweighted": DecimalType,
+        "construction_unweighted": DecimalType,
     }
 
     prepared_df = (
@@ -159,87 +179,54 @@ def impute(
         .withColumn(
             "previous_period", calculate_previous_period(col("period"), periodicity)
         )
-        .withColumn(
-            "next_period", calculate_next_period(col("period"), periodicity)
-        )
+        .withColumn("next_period", calculate_next_period(col("period"), periodicity))
     )
     prior_period_df = prepared_df.selectExpr(
         "min(previous_period) AS prior_period"
     ).localCheckpoint(eager=True)
 
-    # Cache the prepared back data df since we'll need a few differently
-    # filtered versions
-    prepared_back_data_df = None
-
     if back_data_df:
-        prepared_back_data_df = validation.validate_dataframe(
+        validated_back_data_df = validation.validate_dataframe(
             back_data_df,
             back_input_params,
             type_mapping,
             ["ref", "period", "grouping"],
         ).localCheckpoint(eager=False)
+        back_data_period_df = (
+            validated_back_data_df.select(
+                "ref", "period", "grouping", "output", "aux", "marker"
+            )
+            .join(prior_period_df, [col("period") == col("prior_period")])
+            .drop("prior_period")
+            .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
+            .withColumn(
+                "previous_period",
+                calculate_previous_period(col("period"), periodicity),
+            )
+            .withColumn(
+                "next_period", calculate_next_period(col("period"), periodicity)
+            )
+            .localCheckpoint(eager=false)
+        )
 
     if link_filter:
         filtered_refs = (
-            input_df.unionByName(back_data_df, allowMissingColumns=True)
-            .select(
+            input_df.unionByName(back_data_df, allowMissingColumns=True).select(
                 col(reference_col).alias("ref"),
                 col(period_col).alias("period"),
                 col(grouping_col).alias("grouping"),
-                (expr(link_filter) if isinstance(link_filter, str) else link_filter).alias(
-                    "match"
-                ),
+                (
+                    expr(link_filter) if isinstance(link_filter, str) else link_filter
+                ).alias("match"),
             )
         ).localCheckpoint(eager=False)
 
-
-
-        if prepared_back_data_df:
-            prepared_back_data_df = (
-                prepared_back_data_df.join(
-                    prior_period_df, [col("period") == col("prior_period")]
-                )
-                .drop("prior_period")
-                .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
-                .withColumn(
-                    "previous_period",
-                    calculate_previous_period(col("period"), periodicity),
-                )
-                .withColumn(
-                    "next_period", calculate_next_period(col("period"), periodicity)
-                )
-            )
-
-        else:
-            # Set the prepared_back_data_df to be empty when back_data not
-            # supplied.
-            prepared_back_data_df = prepared_df.filter(col(period_col).isNull())
-
-        prepared_back_data_df = prepared_back_data_df.localCheckpoint(eager=True)
+    if prepared_back_data_df:
         # Ratio calculation needs all the responses from the back data
         prepared_df = prepared_df.unionByName(
-            filter_back_data(col("marker") == lit(Marker.RESPONSE.value)),
+            back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)),
             allowMissingColumns=True,
         )
-    # --- Run ---
-    def run() -> DataFrame:
-        stages = [
-            calculate_ratios,
-            forward_impute_from_response,
-            backward_impute,
-            construct_values,
-            forward_impute_from_construction,
-        ]
-        df = prepared_df
-        for stage in stages:
-            df = stage(df)
-            if df:
-                df = df.localCheckpoint(eager=False)
-
-                if df.filter(col("output").isNull()).count() == 0:
-                    break
-
-        return create_output(df)
 
     # --- Calculate Ratios ---
 
@@ -385,7 +372,6 @@ def calculate_weighted_link(link_name):
                     expr("first(backward) AS backward"),
                     expr("first(construction) AS construction"),
                 )
-
             )
 
             curr_df = weighting_df.alias("curr")
@@ -418,7 +404,7 @@ def calculate_weighted_link(link_name):
                     ["period", "grouping"],
                 )
             )
-        
+
         return df
 
     # Caching for both imputed and unimputed data.
@@ -527,7 +513,7 @@ def impute_helper(
     def forward_impute_from_response(df: DataFrame) -> DataFrame:
         # Add the forward imputes from responses from the back data
         df = df.unionByName(
-            filter_back_data(
+            back_data_period_df.filter(
                 col("marker") == lit(Marker.FORWARD_IMPUTE_FROM_RESPONSE.value)
             ),
             allowMissingColumns=True,
@@ -541,7 +527,7 @@ def backward_impute(df: DataFrame) -> DataFrame:
     def construct_values(df: DataFrame) -> DataFrame:
         # Add in the constructions and forward imputes from construction in the back data
         df = df.unionByName(
-            filter_back_data(
+            back_data_period_df.filter(
                 (
                     (col("marker") == lit(Marker.CONSTRUCTED.value))
                     | (
@@ -605,13 +591,6 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         )
 
     # --- Utility functions ---
-    def create_output(df: DataFrame) -> DataFrame:
-        return df.join(prior_period_df, [col("prior_period") < col("period")]).select(
-            [
-                col(k).alias(output_col_mapping[k])
-                for k in sorted(output_col_mapping.keys() & set(df.columns))
-            ]
-        )
 
     def calculate_previous_period(period: Column, relative: int):
         period = period.cast("integer")
@@ -630,9 +609,27 @@ def calculate_next_period(period: Column, relative: int) -> Column:
             * (relative // 12 + ((period % 100) + (relative % 12) > 12).cast("integer"))
         ).cast("string")
 
-    def filter_back_data(filter_col: Column) -> DataFrame:
-        return prepared_back_data_df.filter(filter_col).localCheckpoint(eager=True)
-
     # ----------
 
-    return run()
+    stages = []
+    df = prepared_df
+    for stage in (
+        calculate_ratios,
+        forward_impute_from_response,
+        backward_impute,
+        construct_values,
+        forward_impute_from_construction,
+    ):
+        df = stage(df)
+        if df:
+            df = df.localCheckpoint(eager=False)
+
+            if df.filter(col("output").isNull()).count() == 0:
+                break
+
+    return df.join(prior_period_df, [col("prior_period") < col("period")]).select(
+        [
+            col(k).alias(output_col_mapping[k])
+            for k in sorted(output_col_mapping.keys() & set(df.columns))
+        ]
+    )

From 223df4077122fbde5bc54be23647fb1bda4a4fac Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 16 May 2023 16:32:39 +0100
Subject: [PATCH 324/531] Separate out period calculation utility functions

---
 .../imputation/engine.py                      | 33 ++++---------------
 .../utilities/__init__.py                     |  0
 .../utilities/periods.py                      | 18 ++++++++++
 3 files changed, 24 insertions(+), 27 deletions(-)
 create mode 100644 statistical_methods_library/utilities/__init__.py
 create mode 100644 statistical_methods_library/utilities/periods.py

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 41a87ff9..3fb5bea9 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -12,8 +12,8 @@
 from pyspark.sql.functions import col, expr, lit, when
 from pyspark.sql.types import DecimalType, StringType
 
-from statistical_methods_library.utilities import validation
-
+from statistical_methods_library.utilities.validation import validate_dataframe
+from statistical_methods_library.utilities.periods import calculate_previous_period, calculate_next_period
 from .ratio_calculators import RatioCalculator, construction
 
 # --- Marker constants ---
@@ -167,7 +167,7 @@ def impute(
     }
 
     prepared_df = (
-        validation.validate_dataframe(
+        validate_dataframe(
             input_df,
             input_params,
             type_mapping,
@@ -186,7 +186,7 @@ def impute(
     ).localCheckpoint(eager=True)
 
     if back_data_df:
-        validated_back_data_df = validation.validate_dataframe(
+        validated_back_data_df = validate_dataframe(
             back_data_df,
             back_input_params,
             type_mapping,
@@ -206,7 +206,7 @@ def impute(
             .withColumn(
                 "next_period", calculate_next_period(col("period"), periodicity)
             )
-            .localCheckpoint(eager=false)
+            .localCheckpoint(eager=False)
         )
 
     if link_filter:
@@ -221,7 +221,7 @@ def impute(
             )
         ).localCheckpoint(eager=False)
 
-    if prepared_back_data_df:
+    if back_data_df:
         # Ratio calculation needs all the responses from the back data
         prepared_df = prepared_df.unionByName(
             back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)),
@@ -590,28 +590,7 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
             df, "forward", Marker.FORWARD_IMPUTE_FROM_CONSTRUCTION, True
         )
 
-    # --- Utility functions ---
-
-    def calculate_previous_period(period: Column, relative: int):
-        period = period.cast("integer")
-        return (
-            period
-            - relative
-            - 88 * (relative // 12 + (period % 100 <= relative % 12).cast("integer"))
-        ).cast("string")
-
-    def calculate_next_period(period: Column, relative: int) -> Column:
-        period = period.cast("integer")
-        return (
-            period
-            + relative
-            + 88
-            * (relative // 12 + ((period % 100) + (relative % 12) > 12).cast("integer"))
-        ).cast("string")
-
-    # ----------
 
-    stages = []
     df = prepared_df
     for stage in (
         calculate_ratios,
diff --git a/statistical_methods_library/utilities/__init__.py b/statistical_methods_library/utilities/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/statistical_methods_library/utilities/periods.py b/statistical_methods_library/utilities/periods.py
new file mode 100644
index 00000000..5205e8f6
--- /dev/null
+++ b/statistical_methods_library/utilities/periods.py
@@ -0,0 +1,18 @@
+from pyspark.sql import Column
+
+def calculate_previous_period(period: Column, relative: int):
+    period = period.cast("integer")
+    return (
+        period
+        - relative
+        - 88 * (relative // 12 + (period % 100 <= relative % 12).cast("integer"))
+    ).cast("string")
+
+def calculate_next_period(period: Column, relative: int) -> Column:
+    period = period.cast("integer")
+    return (
+        period
+        + relative
+        + 88
+        * (relative // 12 + ((period % 100) + (relative % 12) > 12).cast("integer"))
+    ).cast("string")

From b5106d0968002e87816a09f9e90b3c468ee8ac44 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 16 May 2023 16:49:06 +0100
Subject: [PATCH 325/531] Put back more of the weighting code

---
 .../imputation/engine.py                      | 40 +++++++++++++------
 1 file changed, 28 insertions(+), 12 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 3fb5bea9..50d620da 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -13,7 +13,10 @@
 from pyspark.sql.types import DecimalType, StringType
 
 from statistical_methods_library.utilities.validation import validate_dataframe
-from statistical_methods_library.utilities.periods import calculate_previous_period, calculate_next_period
+from statistical_methods_library.utilities.periods import (
+    calculate_previous_period,
+    calculate_next_period,
+)
 from .ratio_calculators import RatioCalculator, construction
 
 # --- Marker constants ---
@@ -352,6 +355,8 @@ def calculate_ratios(df: DataFrame) -> DataFrame:
                 }
             )
 
+        if weight is not None:
+
             def calculate_weighted_link(link_name):
                 prev_link = col(f"prev.{link_name}")
                 curr_link = col(f"curr.{link_name}")
@@ -365,12 +370,27 @@ def calculate_weighted_link(link_name):
                 )
 
             weighting_df = (
-                df.select("period", "grouping", "forward", "backward", "construction")
+                df.select(
+                    "period",
+                    "grouping",
+                    expr("forward AS forward_unweighted"),
+                    expr("backward AS backward_unweighted"),
+                    expr("construction AS construction_unweighted"),
+                )
+                .unionByName(
+                    validated_back_data_df.select(
+                        "period",
+                        "grouping",
+                        "forward_unweighted",
+                        "backward_unweighted",
+                        "construction_unweighted",
+                    )
+                )
                 .groupBy("period", "grouping")
                 .agg(
-                    expr("first(forward) AS forward"),
-                    expr("first(backward) AS backward"),
-                    expr("first(construction) AS construction"),
+                    expr("first(forward_unweighted) AS forward"),
+                    expr("first(backward_unweighted) AS backward"),
+                    expr("first(construction_unweighted) AS construction"),
                 )
             )
 
@@ -590,7 +610,6 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
             df, "forward", Marker.FORWARD_IMPUTE_FROM_CONSTRUCTION, True
         )
 
-
     df = prepared_df
     for stage in (
         calculate_ratios,
@@ -599,12 +618,9 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         construct_values,
         forward_impute_from_construction,
     ):
-        df = stage(df)
-        if df:
-            df = df.localCheckpoint(eager=False)
-
-            if df.filter(col("output").isNull()).count() == 0:
-                break
+        df = stage(df).localCheckpoint(eager=False)
+        if df.filter(col("output").isNull()).count() == 0:
+            break
 
     return df.join(prior_period_df, [col("prior_period") < col("period")]).select(
         [

From b749522efea4df878cbffa69406cfddfc37bf122 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 16 May 2023 17:26:08 +0100
Subject: [PATCH 326/531] Move a couple of logic blocks around to combine if
 statements

---
 .../imputation/engine.py                      | 27 +++++++++----------
 .../utilities/periods.py                      |  2 ++
 2 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 50d620da..7909a777 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -169,6 +169,18 @@ def impute(
         "construction_unweighted": DecimalType,
     }
 
+    if link_filter:
+        filtered_refs = (
+            input_df.unionByName(back_data_df, allowMissingColumns=True).select(
+                col(reference_col).alias("ref"),
+                col(period_col).alias("period"),
+                col(grouping_col).alias("grouping"),
+                (
+                    expr(link_filter) if isinstance(link_filter, str) else link_filter
+                ).alias("match"),
+            )
+        ).localCheckpoint(eager=False)
+
     prepared_df = (
         validate_dataframe(
             input_df,
@@ -211,21 +223,6 @@ def impute(
             )
             .localCheckpoint(eager=False)
         )
-
-    if link_filter:
-        filtered_refs = (
-            input_df.unionByName(back_data_df, allowMissingColumns=True).select(
-                col(reference_col).alias("ref"),
-                col(period_col).alias("period"),
-                col(grouping_col).alias("grouping"),
-                (
-                    expr(link_filter) if isinstance(link_filter, str) else link_filter
-                ).alias("match"),
-            )
-        ).localCheckpoint(eager=False)
-
-    if back_data_df:
-        # Ratio calculation needs all the responses from the back data
         prepared_df = prepared_df.unionByName(
             back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)),
             allowMissingColumns=True,
diff --git a/statistical_methods_library/utilities/periods.py b/statistical_methods_library/utilities/periods.py
index 5205e8f6..7d506872 100644
--- a/statistical_methods_library/utilities/periods.py
+++ b/statistical_methods_library/utilities/periods.py
@@ -1,5 +1,6 @@
 from pyspark.sql import Column
 
+
 def calculate_previous_period(period: Column, relative: int):
     period = period.cast("integer")
     return (
@@ -8,6 +9,7 @@ def calculate_previous_period(period: Column, relative: int):
         - 88 * (relative // 12 + (period % 100 <= relative % 12).cast("integer"))
     ).cast("string")
 
+
 def calculate_next_period(period: Column, relative: int) -> Column:
     period = period.cast("integer")
     return (

From 2a57497130c0c10d0d782be571d097fd1763fd42 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 16 May 2023 17:26:40 +0100
Subject: [PATCH 327/531] Unproduced Columns

---
 .../28_link_columns_filtered_output.csv       | 66 +++++++++----------
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
index a324f3d5..4998c04c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,,1.853682946,1,0.9214,50.3694,9261,R,0,0,0,false,false,false
-190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
-190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
-190001,202004,100,95,2.939189189,,1.113,1,110.5473,4350,R,0,0,0,false,false,false
-190002,202001,100,17,,0.562673451,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
-190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
-190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
-190002,202004,100,17,11.26857143,,1.113,1,110.5473,700,R,0,0,0,false,false,false
-190003,202001,100,64,,1.870080607,1,0.9214,50.3694,7888,R,0,0,0,false,false,false
-190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
-190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
-190003,202004,100,64,0.537083388,,1.113,1,110.5473,4077,R,0,0,0,false,false,false
-190004,202001,100,51,,,1,0.9214,50.3694,2247,R,0,0,0,false,false,false
-190004,202002,100,51,,,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
-190004,202003,100,51,,,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
-190004,202004,100,51,,,1.113,1,110.5473,8608,R,0,0,0,false,false,false
-190005,202001,100,34,,,1,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false
-190005,202002,100,34,,,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
-190005,202003,100,34,,0.867939229,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
-190005,202004,100,34,1.152154399,,1.113,1,110.5473,5134,R,0,0,0,false,false,false
-190006,202001,100,8,,,1,0.9214,50.3694,402.9552,C,0,0,0,false,false,false
-190006,202002,100,8,,,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
-190006,202003,100,8,,,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
-190006,202004,100,8,,,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,false,false
-190007,202001,100,85,,,1,0.9214,50.3694,150000,R,0,0,0,false,false,false
-190007,202002,100,85,,,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false
-190007,202003,100,85,,,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false
-190007,202004,100,85,,,1.113,1,110.5473,180000,R,0,0,0,false,false,false
-190008,202001,100,71,,,1,0.9214,50.3694,3576.2274,C,0,0,0,false,false,false
-190008,202002,100,71,,,0.8521,1.5274,121.4187,3047.303368,FIC,0,0,0,false,false,false
-190008,202003,100,71,,,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false
-190008,202004,100,71,,,1.113,1,110.5473,3284.811716,FIC,0,0,0,false,false,false
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,1,0.9214,50.3694,9261,R,0,0,0,false,false,false
+190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
+190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
+190001,202004,100,95,1.113,1,110.5473,4350,R,0,0,0,false,false,false
+190002,202001,100,17,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
+190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
+190002,202004,100,17,1.113,1,110.5473,700,R,0,0,0,false,false,false
+190003,202001,100,64,1,0.9214,50.3694,7888,R,0,0,0,false,false,false
+190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
+190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
+190003,202004,100,64,1.113,1,110.5473,4077,R,0,0,0,false,false,false
+190004,202001,100,51,1,0.9214,50.3694,2247,R,0,0,0,false,false,false
+190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
+190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
+190004,202004,100,51,1.113,1,110.5473,8608,R,0,0,0,false,false,false
+190005,202001,100,34,1,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false
+190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
+190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
+190005,202004,100,34,1.113,1,110.5473,5134,R,0,0,0,false,false,false
+190006,202001,100,8,1,0.9214,50.3694,402.9552,C,0,0,0,false,false,false
+190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
+190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
+190006,202004,100,8,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,false,false
+190007,202001,100,85,1,0.9214,50.3694,150000,R,0,0,0,false,false,false
+190007,202002,100,85,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false
+190007,202003,100,85,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false
+190007,202004,100,85,1.113,1,110.5473,180000,R,0,0,0,false,false,false
+190008,202001,100,71,1,0.9214,50.3694,3576.2274,C,0,0,0,false,false,false
+190008,202002,100,71,0.8521,1.5274,121.4187,3047.303368,FIC,0,0,0,false,false,false
+190008,202003,100,71,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false
+190008,202004,100,71,1.113,1,110.5473,3284.811716,FIC,0,0,0,false,false,false

From e1a68561980b2d6440a293bf508bc05a010b6280 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 16 May 2023 18:50:49 +0100
Subject: [PATCH 328/531] ratio calculation no longer needs to be in its own
 function so flatten the logic

---
 .../imputation/engine.py                      | 340 +++++++++---------
 1 file changed, 167 insertions(+), 173 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 7909a777..9f18104e 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -230,199 +230,194 @@ def impute(
 
     # --- Calculate Ratios ---
 
-    def calculate_ratios(df: DataFrame) -> DataFrame:
-        ratio_calculators = []
-        if "forward" in df.columns:
-            df = (
-                df.withColumn("default_forward", expr("forward IS NULL"))
-                .withColumn("default_backward", expr("backward IS NULL"))
-                .fillna(1.0, ["forward", "backward"])
-                .withColumn("count_forward", lit(0).cast("long"))
-                .withColumn("count_backward", lit(0).cast("long"))
-            )
+    ratio_calculators = []
+    if "forward" in prepared_df.columns:
+        prepared_df = (
+            prepared_df.withColumn("default_forward", expr("forward IS NULL"))
+            .withColumn("default_backward", expr("backward IS NULL"))
+            .fillna(1.0, ["forward", "backward"])
+            .withColumn("count_forward", lit(0).cast("long"))
+            .withColumn("count_backward", lit(0).cast("long"))
+        )
 
-        else:
-            ratio_calculators.append(ratio_calculator)
+    else:
+        ratio_calculators.append(ratio_calculator)
 
-        if "construction" in df.columns:
-            df = (
-                df.withColumn("default_construction", expr("construction IS NULL"))
-                .fillna(1.0, ["construction"])
-                .withColumn("count_construction", lit(0).cast("long"))
-            )
+    if "construction" in prepared_df.columns:
+        prepared_df = (
+            prepared_df.withColumn("default_construction", expr("construction IS NULL"))
+            .fillna(1.0, ["construction"])
+            .withColumn("count_construction", lit(0).cast("long"))
+        )
 
-        else:
-            ratio_calculators.append(construction)
+    else:
+        ratio_calculators.append(construction)
 
-        if not ratio_calculators:
-            return df
+    # Since we're going to join on to the main df filtering here
+    # won't cause us to lose grouping as they'll just be filled with
+    # default ratios.
+    if link_filter:
+        ratio_filter_df = prepared_df.join(filtered_refs, ["ref", "period", "grouping"])
+    else:
+        ratio_filter_df = prepared_df.withColumn("match", lit(True))
+    ratio_filter_df = ratio_filter_df.filter(~ratio_filter_df.output.isNull()).select(
+        "ref",
+        "period",
+        "grouping",
+        "output",
+        "aux",
+        "previous_period",
+        "next_period",
+        "match",
+    )
 
-        # Since we're going to join on to the main df at the end filtering here
-        # won't cause us to lose grouping as they'll just be filled with
-        # default ratios.
-        if link_filter:
-            filtered_df = df.join(filtered_refs, ["ref", "period", "grouping"])
-        else:
-            filtered_df = df.withColumn("match", lit(True))
-        filtered_df = filtered_df.filter(~filtered_df.output.isNull()).select(
-            "ref",
-            "period",
-            "grouping",
-            "output",
-            "aux",
-            "previous_period",
-            "next_period",
-            "match",
+    # Put the values from the current and previous periods for a
+    # contributor on the same row.
+    ratio_calculation_df = ratio_filter_df.alias("current")
+    ratio_calculation_df = (
+        ratio_calculation_df.join(
+            ratio_filter_df.select(
+                "ref", "period", "output", "grouping", "match"
+            ).alias("previous"),
+            [
+                col("current.ref") == col("previous.ref"),
+                col("current.previous_period") == col("previous.period"),
+                col("current.grouping") == col("previous.grouping"),
+            ],
+            "leftouter",
         )
-
-        # Put the values from the current and previous periods for a
-        # contributor on the same row.
-        working_df = filtered_df.alias("current")
-        working_df = (
-            working_df.join(
-                filtered_df.select(
-                    "ref", "period", "output", "grouping", "match"
-                ).alias("previous"),
-                [
-                    col("current.ref") == col("previous.ref"),
-                    col("current.previous_period") == col("previous.period"),
-                    col("current.grouping") == col("previous.grouping"),
-                ],
-                "leftouter",
-            )
-            .join(
-                filtered_df.select(
-                    "ref", "period", "output", "grouping", "match"
-                ).alias("next"),
-                [
-                    col("current.ref") == col("next.ref"),
-                    col("current.next_period") == col("next.period"),
-                    col("current.grouping") == col("next.grouping"),
-                ],
-                "leftouter",
-            )
-            .select(
-                col("current.ref").alias("ref"),
-                col("current.grouping").alias("grouping"),
-                col("current.period").alias("period"),
-                col("current.aux").alias("aux"),
-                col("current.output"),
-                col("current.match").alias("link_inclusion_current"),
-                col("next.output"),
-                col("next.match").alias("link_inclusion_next"),
-                col("previous.output"),
-                col("previous.match").alias("link_inclusion_previous"),
-            )
+        .join(
+            ratio_filter_df.select(
+                "ref", "period", "output", "grouping", "match"
+            ).alias("next"),
+            [
+                col("current.ref") == col("next.ref"),
+                col("current.next_period") == col("next.period"),
+                col("current.grouping") == col("next.grouping"),
+            ],
+            "leftouter",
         )
+        .select(
+            col("current.ref").alias("ref"),
+            col("current.grouping").alias("grouping"),
+            col("current.period").alias("period"),
+            col("current.aux").alias("aux"),
+            col("current.output"),
+            col("current.match").alias("link_inclusion_current"),
+            col("next.output"),
+            col("next.match").alias("link_inclusion_next"),
+            col("previous.output"),
+            col("previous.match").alias("link_inclusion_previous"),
+        )
+    )
+
+    # Join the grouping ratios onto the input such that each contributor has
+    # a set of ratios.
+    fill_values = {}
+    for result in sum(
+        (
+            calculator(df=ratio_calculation_df, **ratio_calculator_params)
+            for calculator in ratio_calculators
+        ),
+        [],
+    ):
+        prepared_df = prepared_df.join(result.data, result.join_columns, "left")
+        fill_values.update(result.fill_values)
+        output_col_mapping.update(result.additional_outputs)
 
-        # Join the grouping ratios onto the input such that each contributor has
-        # a set of ratios.
-        fill_values = {}
-        for result in sum(
-            (
-                calculator(df=working_df, **ratio_calculator_params)
-                for calculator in ratio_calculators
+    for fill_column, fill_value in fill_values.items():
+        prepared_df = prepared_df.fillna(fill_value, fill_column)
+
+    if link_filter:
+        prepared_df = prepared_df.join(
+            ratio_calculation_df.select(
+                "ref",
+                "period",
+                "grouping",
+                "link_inclusion_previous",
+                "link_inclusion_current",
+                "link_inclusion_next",
             ),
-            [],
-        ):
-            df = df.join(result.data, result.join_columns, "left")
-            fill_values.update(result.fill_values)
-            output_col_mapping.update(result.additional_outputs)
-
-        for fill_column, fill_value in fill_values.items():
-            df = df.fillna(fill_value, fill_column)
-        if link_filter:
-            df = df.join(
-                working_df.select(
-                    "ref",
-                    "period",
-                    "grouping",
-                    "link_inclusion_previous",
-                    "link_inclusion_current",
-                    "link_inclusion_next",
-                ),
-                ["ref", "period", "grouping"],
-                "left",
-            )
-            output_col_mapping.update(
-                {
-                    "link_inclusion_current": link_inclusion_current_col,
-                    "link_inclusion_previous": link_inclusion_previous_col,
-                    "link_inclusion_next": link_inclusion_next_col,
-                }
-            )
+            ["ref", "period", "grouping"],
+            "left",
+        )
+        output_col_mapping.update(
+            {
+                "link_inclusion_current": link_inclusion_current_col,
+                "link_inclusion_previous": link_inclusion_previous_col,
+                "link_inclusion_next": link_inclusion_next_col,
+            }
+        )
 
-        if weight is not None:
+    if weight is not None:
 
-            def calculate_weighted_link(link_name):
-                prev_link = col(f"prev.{link_name}")
-                curr_link = col(f"curr.{link_name}")
-                return (
-                    when(
-                        prev_link.isNotNull(),
-                        weight * curr_link + (lit(Decimal(1)) - weight) * prev_link,
-                    )
-                    .otherwise(curr_link)
-                    .alias(link_name)
+        def calculate_weighted_link(link_name):
+            prev_link = col(f"prev.{link_name}")
+            curr_link = col(f"curr.{link_name}")
+            return (
+                when(
+                    prev_link.isNotNull(),
+                    weight * curr_link + (lit(Decimal(1)) - weight) * prev_link,
                 )
+                .otherwise(curr_link)
+                .alias(link_name)
+            )
 
-            weighting_df = (
-                df.select(
+        weighting_df = (
+            prepared_df.select(
+                "period",
+                "grouping",
+                expr("forward AS forward_unweighted"),
+                expr("backward AS backward_unweighted"),
+                expr("construction AS construction_unweighted"),
+            )
+            .unionByName(
+                validated_back_data_df.select(
                     "period",
                     "grouping",
-                    expr("forward AS forward_unweighted"),
-                    expr("backward AS backward_unweighted"),
-                    expr("construction AS construction_unweighted"),
-                )
-                .unionByName(
-                    validated_back_data_df.select(
-                        "period",
-                        "grouping",
-                        "forward_unweighted",
-                        "backward_unweighted",
-                        "construction_unweighted",
-                    )
-                )
-                .groupBy("period", "grouping")
-                .agg(
-                    expr("first(forward_unweighted) AS forward"),
-                    expr("first(backward_unweighted) AS backward"),
-                    expr("first(construction_unweighted) AS construction"),
+                    "forward_unweighted",
+                    "backward_unweighted",
+                    "construction_unweighted",
                 )
             )
+            .groupBy("period", "grouping")
+            .agg(
+                expr("first(forward_unweighted) AS forward"),
+                expr("first(backward_unweighted) AS backward"),
+                expr("first(construction_unweighted) AS construction"),
+            )
+        )
 
-            curr_df = weighting_df.alias("curr")
-            prev_df = weighting_df.alias("prev")
-            df = (
-                curr_df.join(
-                    prev_df,
+        curr_df = weighting_df.alias("curr")
+        prev_df = weighting_df.alias("prev")
+        prepared_df = (
+            curr_df.join(
+                prev_df,
+                (
                     (
-                        (
-                            col("prev.period")
-                            == calculate_previous_period(
-                                col("curr.period"), weight_periodicity
-                            )
+                        col("prev.period")
+                        == calculate_previous_period(
+                            col("curr.period"), weight_periodicity
                         )
-                        & (col("curr.grouping") == col("prev.grouping"))
-                    ),
-                    "left",
-                )
-                .select(
-                    expr("curr.period AS period"),
-                    expr("curr.grouping AS grouping"),
-                    calculate_weighted_link("forward"),
-                    calculate_weighted_link("backward"),
-                    calculate_weighted_link("construction"),
-                )
-                .join(
-                    df.withColumnRenamed("forward", "unweighted_forward")
-                    .withColumnRenamed("backward", "unweighted_backward")
-                    .withColumnRenamed("construction", "unweighted_construction"),
-                    ["period", "grouping"],
-                )
+                    )
+                    & (col("curr.grouping") == col("prev.grouping"))
+                ),
+                "left",
             )
-
-        return df
+            .select(
+                expr("curr.period AS period"),
+                expr("curr.grouping AS grouping"),
+                calculate_weighted_link("forward"),
+                calculate_weighted_link("backward"),
+                calculate_weighted_link("construction"),
+            )
+            .join(
+                prepared_df.withColumnRenamed("forward", "unweighted_forward")
+                .withColumnRenamed("backward", "unweighted_backward")
+                .withColumnRenamed("construction", "unweighted_construction"),
+                ["period", "grouping"],
+            )
+        )
 
     # Caching for both imputed and unimputed data.
     imputed_df = None
@@ -609,7 +604,6 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
 
     df = prepared_df
     for stage in (
-        calculate_ratios,
         forward_impute_from_response,
         backward_impute,
         construct_values,

From 1a8dc1239f02c22cc7e002912072703f1de1c1bb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 17 May 2023 10:28:12 +0100
Subject: [PATCH 329/531] Fix unprotected use of back data related data frames

---
 .../imputation/engine.py                      | 41 ++++++++++---------
 1 file changed, 22 insertions(+), 19 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 9f18104e..d7d6f137 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -523,13 +523,14 @@ def impute_helper(
 
     # --- Imputation functions ---
     def forward_impute_from_response(df: DataFrame) -> DataFrame:
-        # Add the forward imputes from responses from the back data
-        df = df.unionByName(
-            back_data_period_df.filter(
-                col("marker") == lit(Marker.FORWARD_IMPUTE_FROM_RESPONSE.value)
-            ),
-            allowMissingColumns=True,
-        )
+        if back_data_df:
+            # Add the forward imputes from responses from the back data
+            df = df.unionByName(
+                back_data_period_df.filter(
+                    col("marker") == lit(Marker.FORWARD_IMPUTE_FROM_RESPONSE.value)
+                ),
+                allowMissingColumns=True,
+            )
         return impute_helper(df, "forward", Marker.FORWARD_IMPUTE_FROM_RESPONSE, True)
 
     def backward_impute(df: DataFrame) -> DataFrame:
@@ -537,19 +538,21 @@ def backward_impute(df: DataFrame) -> DataFrame:
 
     # --- Construction functions ---
     def construct_values(df: DataFrame) -> DataFrame:
-        # Add in the constructions and forward imputes from construction in the back data
-        df = df.unionByName(
-            back_data_period_df.filter(
-                (
-                    (col("marker") == lit(Marker.CONSTRUCTED.value))
-                    | (
-                        col("marker")
-                        == lit(Marker.FORWARD_IMPUTE_FROM_CONSTRUCTION.value)
+        if back_data_df:
+            # Add in the constructions and forward imputes from construction in the back data
+            df = df.unionByName(
+                back_data_period_df.filter(
+                    (
+                        (col("marker") == lit(Marker.CONSTRUCTED.value))
+                        | (
+                            col("marker")
+                            == lit(Marker.FORWARD_IMPUTE_FROM_CONSTRUCTION.value)
+                        )
                     )
-                )
-            ),
-            allowMissingColumns=True,
-        )
+                ),
+                allowMissingColumns=True,
+            )
+
         construction_df = df.filter(df.output.isNull()).select(
             "ref", "period", "grouping", "aux", "construction", "previous_period"
         )

From 031fadfac7ce0be6e377ad354ea02481fdb3c2b5 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 17 May 2023 12:04:27 +0100
Subject: [PATCH 330/531] First Weighted Test Passes

---
 .../imputation/engine.py                      | 14 ++----
 .../33_partial_link_columns_output.csv        | 50 +++++++++----------
 tests/imputation/test_mean_of_ratios.py       | 35 +++++++------
 3 files changed, 48 insertions(+), 51 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index d7d6f137..6da37ad0 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -140,13 +140,7 @@ def impute(
                 "construction_unweighted": unweighted_construction_link_col,
             }
         )
-        input_params.update(
-            {
-                unweighted_backward_link_col: "backward_unweighted",
-                unweighted_forward_link_col: "forward_unweighted",
-                unweighted_construction_link_col: "construction_unweighted",
-            }
-        )
+
         output_col_mapping.update(
             {
                 "backward_unweighted": unweighted_backward_link_col,
@@ -412,9 +406,9 @@ def calculate_weighted_link(link_name):
                 calculate_weighted_link("construction"),
             )
             .join(
-                prepared_df.withColumnRenamed("forward", "unweighted_forward")
-                .withColumnRenamed("backward", "unweighted_backward")
-                .withColumnRenamed("construction", "unweighted_construction"),
+                prepared_df.withColumnRenamed("forward", "forward_unweighted")
+                .withColumnRenamed("backward", "backward_unweighted")
+                .withColumnRenamed("construction", "construction_unweighted"),
                 ["period", "grouping"],
             )
         )
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index 341ca059..e6e0f7de 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,,1.853682946,1,0.9214,96.16299559,9261,R,0,0,4,true,false,false
-190001,202002,100,95,0.53946658,3.375675676,0.8521,1.5274,76.92045455,4996,R,0,0,3,false,false,false
-190001,202003,100,95,0.29623699,0.340229885,0.9685,1.8795,95.83333333,1480,R,0,0,4,false,false,false
-190001,202004,100,95,2.939189189,,1.113,1,87.62068966,4350,R,0,0,5,false,true,false
-190002,202001,100,17,,0.562673451,1,0.9214,96.16299559,2433,R,0,0,4,true,false,false
-190002,202002,100,17,1.525901943,0.655350106,0.8521,1.5274,76.92045455,4324,R,0,0,3,false,false,false
-190002,202003,100,17,0.106092755,9.425714286,0.9685,1.8795,95.83333333,6598,R,0,0,4,false,false,false
-190002,202004,100,17,11.26857143,,1.113,1,87.62068966,700,R,0,0,5,false,true,false
-190003,202001,100,64,,1.870080607,1,0.9214,96.16299559,7888,R,0,0,4,true,false,false
-190003,202002,100,64,0.534736308,0.555658016,0.8521,1.5274,76.92045455,4218,R,0,0,3,false,false,false
-190003,202003,100,64,1.799668089,1.861908266,0.9685,1.8795,95.83333333,7591,R,0,0,4,false,false,false
-190003,202004,100,64,0.537083388,,1.113,1,87.62068966,4077,R,0,0,5,false,true,false
-190004,202001,100,51,,,1,0.9214,96.16299559,2247,R,0,0,4,true,false,false
-190004,202002,100,51,,,0.8521,1.5274,76.92045455,1914.6687,FIR,0,0,3,false,false,false
-190004,202003,100,51,,,0.9685,1.8795,95.83333333,1854.356636,FIR,0,0,4,false,false,false
-190004,202004,100,51,,,1.113,1,87.62068966,8608,R,0,0,5,false,true,false
-190005,202001,100,34,,,1,0.9214,96.16299559,6271.13538,BI,0,0,4,true,false,false
-190005,202002,100,34,,,0.8521,1.5274,76.92045455,6806.0944,BI,0,0,3,false,false,false
-190005,202003,100,34,,0.867939229,0.9685,1.8795,95.83333333,4456,R,0,0,4,false,false,false
-190005,202004,100,34,1.152154399,,1.113,1,87.62068966,5134,R,0,0,5,false,true,false
-190006,202001,100,8,,,1,0.9214,96.16299559,769.3039647,C,0,0,4,true,false,false
-190006,202002,100,8,,,0.8521,1.5274,76.92045455,655.523909,FIC,0,0,3,false,false,false
-190006,202003,100,8,,,0.9685,1.8795,95.83333333,634.874906,FIC,0,0,4,false,false,false
-190006,202004,100,8,,,1.113,1,87.62068966,706.6157695,FIC,0,0,5,false,true,false
\ No newline at end of file
+identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,1,0.9214,96.16299559,9261,R,0,0,4,true,false,false
+190001,202002,100,95,0.8521,1.5274,76.92045455,4996,R,0,0,3,false,false,false
+190001,202003,100,95,0.9685,1.8795,95.83333333,1480,R,0,0,4,false,false,false
+190001,202004,100,95,1.113,1,87.62068966,4350,R,0,0,5,false,true,false
+190002,202001,100,17,1,0.9214,96.16299559,2433,R,0,0,4,true,false,false
+190002,202002,100,17,0.8521,1.5274,76.92045455,4324,R,0,0,3,false,false,false
+190002,202003,100,17,0.9685,1.8795,95.83333333,6598,R,0,0,4,false,false,false
+190002,202004,100,17,1.113,1,87.62068966,700,R,0,0,5,false,true,false
+190003,202001,100,64,1,0.9214,96.16299559,7888,R,0,0,4,true,false,false
+190003,202002,100,64,0.8521,1.5274,76.92045455,4218,R,0,0,3,false,false,false
+190003,202003,100,64,0.9685,1.8795,95.83333333,7591,R,0,0,4,false,false,false
+190003,202004,100,64,1.113,1,87.62068966,4077,R,0,0,5,false,true,false
+190004,202001,100,51,1,0.9214,96.16299559,2247,R,0,0,4,true,false,false
+190004,202002,100,51,0.8521,1.5274,76.92045455,1914.6687,FIR,0,0,3,false,false,false
+190004,202003,100,51,0.9685,1.8795,95.83333333,1854.356636,FIR,0,0,4,false,false,false
+190004,202004,100,51,1.113,1,87.62068966,8608,R,0,0,5,false,true,false
+190005,202001,100,34,1,0.9214,96.16299559,6271.13538,BI,0,0,4,true,false,false
+190005,202002,100,34,0.8521,1.5274,76.92045455,6806.0944,BI,0,0,3,false,false,false
+190005,202003,100,34,0.9685,1.8795,95.83333333,4456,R,0,0,4,false,false,false
+190005,202004,100,34,1.113,1,87.62068966,5134,R,0,0,5,false,true,false
+190006,202001,100,8,1,0.9214,96.16299559,769.3039647,C,0,0,4,true,false,false
+190006,202002,100,8,0.8521,1.5274,76.92045455,655.523909,FIC,0,0,3,false,false,false
+190006,202003,100,8,0.9685,1.8795,95.83333333,634.874906,FIC,0,0,4,false,false,false
+190006,202004,100,8,1.113,1,87.62068966,706.6157695,FIC,0,0,5,false,true,false
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 18897a3a..830c83ec 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -33,9 +33,9 @@
 link_inclusion_next_col = "link_inclusion_next"
 trimmed_forward_col = "trim_inclusion_forward"
 trimmed_backward_col = "trim_inclusion_backward"
-un_construction_col = "unweighted_construction"
-un_backward_col = "unweighted_backward"
-un_forward_col = "unweighted_forward"
+unweighted_construction_link_col = "unweighted_construction"
+unweighted_backward_link_col = "unweighted_backward"
+unweighted_forward_link_col = "unweighted_forward"
 
 decimal_type = DecimalType(15, 6)
 
@@ -62,9 +62,9 @@
 link_inclusion_next_type = BooleanType()
 trimmed_forward_type = BooleanType()
 trimmed_backward_type = BooleanType()
-un_construction_type = decimal_type
-un_backward_type = decimal_type
-un_forward_type = decimal_type
+unweighted_construction_link_type = decimal_type
+unweighted_backward_link_type = decimal_type
+unweighted_forward_link_type = decimal_type
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -92,9 +92,9 @@
     default_backward_col,
     default_construction_col,
     link_inclusion_current_col,
-    un_construction_col,
-    un_backward_col,
-    un_forward_col,
+    unweighted_construction_link_col,
+    unweighted_backward_link_col,
+    unweighted_forward_link_col,
 )
 
 dataframe_types = {
@@ -121,9 +121,9 @@
     link_inclusion_next_col: link_inclusion_next_type,
     trimmed_forward_col: trimmed_forward_type,
     trimmed_backward_col: trimmed_backward_type,
-    un_construction_col: un_construction_type,
-    un_backward_col: un_backward_type,
-    un_forward_col: un_forward_type,
+    unweighted_construction_link_col: unweighted_construction_link_type,
+    unweighted_backward_link_col: unweighted_backward_link_type,
+    unweighted_forward_link_col: unweighted_forward_link_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()
@@ -140,6 +140,9 @@
     "marker_col": marker_col,
     "ratio_calculator": mean_of_ratios,
     "starting_period": "202001",
+    "unweighted_construction_link_col": unweighted_construction_link_col,
+    "unweighted_backward_link_col": unweighted_backward_link_col,
+    "unweighted_forward_link_col": unweighted_forward_link_col,
 }
 
 test_scenarios = []
@@ -246,14 +249,14 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     if "weight" in scenario:
         scenario_actual_output = (
             scenario_actual_output.withColumn(
-                un_forward_col, bround(col(un_forward_col).cast(decimal_type), 6)
+                unweighted_forward_link_col, bround(col(unweighted_forward_link_col).cast(decimal_type), 6)
             )
             .withColumn(
-                un_backward_col, bround(col(un_backward_col).cast(decimal_type), 6)
+                unweighted_backward_link_col, bround(col(unweighted_backward_link_col).cast(decimal_type), 6)
             )
             .withColumn(
-                un_construction_col,
-                bround(col(un_construction_col).cast(decimal_type), 6),
+                unweighted_construction_link_col,
+                bround(col(unweighted_construction_link_col).cast(decimal_type), 6),
             )
         )
 

From 1a87a0e9375a00ab8d5dae27143631b4d9ab8b8e Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 17 May 2023 12:30:33 +0100
Subject: [PATCH 331/531] Add Tests To TOML.

---
 .../50_R_R_FI_50_weight_output.csv            | 24 +++++++++----------
 tests/imputation/mean_of_ratios.toml          | 24 +++++++++----------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 742f461f..7eb3315b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,16 +1,16 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.591203,85.28422607,1,1.655006,120.1990521,8444,R,0,4,4,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7476,R,4,3,4,false,false,false
-30001,202003,100,51,0.267924024,,1.3199735,1,96.19575,1.526947,1,103.0154,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,1.591203,85.28425,1,1.655006,120.1991,9343,R,0,4,4,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,7818,R,4,3,4,false,false,false
-30002,202003,100,72,0.626375032,,1.3199735,1,96.19575,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,1.591203,85.28425,1,1.655006,120.1991,7511,R,0,4,4,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,1761,R,4,3,4,false,false,false
-30003,202003,100,7,3.686541738,,1.3199735,1,96.19575,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,0.030288689,1,1.591203,85.28425,1,1.655006,120.1991,64,R,0,4,4,true,false,false
-30004,202002,100,81,33.015625,,4.855777465,1.6435545,106.13115,8.743054929,1.407609,90.8436,2113,R,4,3,4,false,false,false
-30004,202003,100,81,,,1.3199735,1,96.19575,1.526947,1,103.0154,2789.104006,FIR,3,0,3,false,true,false
+30001,202001,100,51,,1.129481006,1,1.591203,85.284226,1,1.655006,120.199052,8444,R,0,4,4,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,7476,R,4,3,4,false,false,false
+30001,202003,100,51,0.267924024,,1.319973,1,96.195742,1.526947,1,103.015385,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,1.591203,85.284226,1,1.655006,120.199052,9343,R,0,4,4,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,7818,R,4,3,4,false,false,false
+30002,202003,100,72,0.626375032,,1.319973,1,96.195742,1.526947,1,103.015385,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,1.591203,85.284226,1,1.655006,120.199052,7511,R,0,4,4,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,1761,R,4,3,4,false,false,false
+30003,202003,100,7,3.686541738,,1.319973,1,96.195742,1.526947,1,103.015385,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,0.030288689,1,1.591203,85.284226,1,1.655006,120.199052,64,R,0,4,4,true,false,false
+30004,202002,100,81,33.015625,,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,2113,R,4,3,4,false,false,false
+30004,202003,100,81,,,1.319973,1,96.195742,1.526947,1,103.015385,2789.103933,FIR,3,0,3,false,true,false
 30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,
 30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
 30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 794076fd..c616c14e 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -106,43 +106,43 @@ weight_periodicity_multiplier = 1
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[51]
+[51_R_R_FI_80_weight]
 weight = 0.8
 weight_periodicity_multiplier = 12
 
-[52]
+[52_BI_BI_R_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[53]
+[53_C_FI_FI_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[54]
+[54_R_R_FI-BI_R_R_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[55]
+[55_R_R_FI_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[56]
+[56_BI_BI_R_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[57]
+[57_C_FI_FI_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[58]
+[58_R_R_FI-BI_R_R_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[59]
+[59_class_change_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[60]
+[60_BI_BI_R_FI_FI_R_FI_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 
@@ -155,11 +155,11 @@ link_filter = "identifier NOT IN ('110009', '110009')"
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[63]
+[63_TB_10_R_R_FI-BI_R_R_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 
-[64]
+[64_TB_10_C_FI_FI_50_weight]
 weight = 0.5
 weight_periodicity_multiplier = 12
 

From 0148f27fcc9e9c368883df71e663d1a8232c98e7 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 17 May 2023 12:33:32 +0100
Subject: [PATCH 332/531] Calculate_ratios as a function but not a stage just
 structural so we can return early

---
 .../imputation/engine.py                      | 350 +++++++++---------
 1 file changed, 181 insertions(+), 169 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 6da37ad0..d4ed6170 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -222,196 +222,208 @@ def impute(
             allowMissingColumns=True,
         )
 
-    # --- Calculate Ratios ---
-
-    ratio_calculators = []
-    if "forward" in prepared_df.columns:
-        prepared_df = (
-            prepared_df.withColumn("default_forward", expr("forward IS NULL"))
-            .withColumn("default_backward", expr("backward IS NULL"))
-            .fillna(1.0, ["forward", "backward"])
-            .withColumn("count_forward", lit(0).cast("long"))
-            .withColumn("count_backward", lit(0).cast("long"))
-        )
+    def calculate_ratios():
+        # This allows us to return early if we have nothing to do
+        nonlocal prepared_df
+        ratio_calculators = []
+        if "forward" in prepared_df.columns:
+            prepared_df = (
+                prepared_df.withColumn("default_forward", expr("forward IS NULL"))
+                .withColumn("default_backward", expr("backward IS NULL"))
+                .fillna(1.0, ["forward", "backward"])
+                .withColumn("count_forward", lit(0).cast("long"))
+                .withColumn("count_backward", lit(0).cast("long"))
+            )
 
-    else:
-        ratio_calculators.append(ratio_calculator)
+        else:
+            ratio_calculators.append(ratio_calculator)
 
-    if "construction" in prepared_df.columns:
-        prepared_df = (
-            prepared_df.withColumn("default_construction", expr("construction IS NULL"))
-            .fillna(1.0, ["construction"])
-            .withColumn("count_construction", lit(0).cast("long"))
-        )
+        if "construction" in prepared_df.columns:
+            prepared_df = (
+                prepared_df.withColumn(
+                    "default_construction", expr("construction IS NULL")
+                )
+                .fillna(1.0, ["construction"])
+                .withColumn("count_construction", lit(0).cast("long"))
+            )
 
-    else:
-        ratio_calculators.append(construction)
+        else:
+            ratio_calculators.append(construction)
 
-    # Since we're going to join on to the main df filtering here
-    # won't cause us to lose grouping as they'll just be filled with
-    # default ratios.
-    if link_filter:
-        ratio_filter_df = prepared_df.join(filtered_refs, ["ref", "period", "grouping"])
-    else:
-        ratio_filter_df = prepared_df.withColumn("match", lit(True))
-    ratio_filter_df = ratio_filter_df.filter(~ratio_filter_df.output.isNull()).select(
-        "ref",
-        "period",
-        "grouping",
-        "output",
-        "aux",
-        "previous_period",
-        "next_period",
-        "match",
-    )
+        if not ratio_calculators:
+            return
 
-    # Put the values from the current and previous periods for a
-    # contributor on the same row.
-    ratio_calculation_df = ratio_filter_df.alias("current")
-    ratio_calculation_df = (
-        ratio_calculation_df.join(
-            ratio_filter_df.select(
-                "ref", "period", "output", "grouping", "match"
-            ).alias("previous"),
-            [
-                col("current.ref") == col("previous.ref"),
-                col("current.previous_period") == col("previous.period"),
-                col("current.grouping") == col("previous.grouping"),
-            ],
-            "leftouter",
-        )
-        .join(
-            ratio_filter_df.select(
-                "ref", "period", "output", "grouping", "match"
-            ).alias("next"),
-            [
-                col("current.ref") == col("next.ref"),
-                col("current.next_period") == col("next.period"),
-                col("current.grouping") == col("next.grouping"),
-            ],
-            "leftouter",
-        )
-        .select(
-            col("current.ref").alias("ref"),
-            col("current.grouping").alias("grouping"),
-            col("current.period").alias("period"),
-            col("current.aux").alias("aux"),
-            col("current.output"),
-            col("current.match").alias("link_inclusion_current"),
-            col("next.output"),
-            col("next.match").alias("link_inclusion_next"),
-            col("previous.output"),
-            col("previous.match").alias("link_inclusion_previous"),
+        # Since we're going to join on to the main df filtering here
+        # won't cause us to lose grouping as they'll just be filled with
+        # default ratios.
+        if link_filter:
+            ratio_filter_df = prepared_df.join(
+                filtered_refs, ["ref", "period", "grouping"]
+            )
+        else:
+            ratio_filter_df = prepared_df.withColumn("match", lit(True))
+        ratio_filter_df = ratio_filter_df.filter(
+            ~ratio_filter_df.output.isNull()
+        ).select(
+            "ref",
+            "period",
+            "grouping",
+            "output",
+            "aux",
+            "previous_period",
+            "next_period",
+            "match",
         )
-    )
 
-    # Join the grouping ratios onto the input such that each contributor has
-    # a set of ratios.
-    fill_values = {}
-    for result in sum(
-        (
-            calculator(df=ratio_calculation_df, **ratio_calculator_params)
-            for calculator in ratio_calculators
-        ),
-        [],
-    ):
-        prepared_df = prepared_df.join(result.data, result.join_columns, "left")
-        fill_values.update(result.fill_values)
-        output_col_mapping.update(result.additional_outputs)
-
-    for fill_column, fill_value in fill_values.items():
-        prepared_df = prepared_df.fillna(fill_value, fill_column)
+        # Put the values from the current and previous periods for a
+        # contributor on the same row.
+        ratio_calculation_df = ratio_filter_df.alias("current")
+        ratio_calculation_df = (
+            ratio_calculation_df.join(
+                ratio_filter_df.select(
+                    "ref", "period", "output", "grouping", "match"
+                ).alias("previous"),
+                [
+                    col("current.ref") == col("previous.ref"),
+                    col("current.previous_period") == col("previous.period"),
+                    col("current.grouping") == col("previous.grouping"),
+                ],
+                "leftouter",
+            )
+            .join(
+                ratio_filter_df.select(
+                    "ref", "period", "output", "grouping", "match"
+                ).alias("next"),
+                [
+                    col("current.ref") == col("next.ref"),
+                    col("current.next_period") == col("next.period"),
+                    col("current.grouping") == col("next.grouping"),
+                ],
+                "leftouter",
+            )
+            .select(
+                col("current.ref").alias("ref"),
+                col("current.grouping").alias("grouping"),
+                col("current.period").alias("period"),
+                col("current.aux").alias("aux"),
+                col("current.output"),
+                col("current.match").alias("link_inclusion_current"),
+                col("next.output"),
+                col("next.match").alias("link_inclusion_next"),
+                col("previous.output"),
+                col("previous.match").alias("link_inclusion_previous"),
+            )
+        )
 
-    if link_filter:
-        prepared_df = prepared_df.join(
-            ratio_calculation_df.select(
-                "ref",
-                "period",
-                "grouping",
-                "link_inclusion_previous",
-                "link_inclusion_current",
-                "link_inclusion_next",
+        # Join the grouping ratios onto the input such that each contributor has
+        # a set of ratios.
+        fill_values = {}
+        for result in sum(
+            (
+                calculator(df=ratio_calculation_df, **ratio_calculator_params)
+                for calculator in ratio_calculators
             ),
-            ["ref", "period", "grouping"],
-            "left",
-        )
-        output_col_mapping.update(
-            {
-                "link_inclusion_current": link_inclusion_current_col,
-                "link_inclusion_previous": link_inclusion_previous_col,
-                "link_inclusion_next": link_inclusion_next_col,
-            }
-        )
+            [],
+        ):
+            prepared_df = prepared_df.join(result.data, result.join_columns, "left")
+            fill_values.update(result.fill_values)
+            output_col_mapping.update(result.additional_outputs)
+
+        for fill_column, fill_value in fill_values.items():
+            prepared_df = prepared_df.fillna(fill_value, fill_column)
+
+        if link_filter:
+            prepared_df = prepared_df.join(
+                ratio_calculation_df.select(
+                    "ref",
+                    "period",
+                    "grouping",
+                    "link_inclusion_previous",
+                    "link_inclusion_current",
+                    "link_inclusion_next",
+                ),
+                ["ref", "period", "grouping"],
+                "left",
+            )
+            output_col_mapping.update(
+                {
+                    "link_inclusion_current": link_inclusion_current_col,
+                    "link_inclusion_previous": link_inclusion_previous_col,
+                    "link_inclusion_next": link_inclusion_next_col,
+                }
+            )
 
-    if weight is not None:
+        if weight is not None:
 
-        def calculate_weighted_link(link_name):
-            prev_link = col(f"prev.{link_name}")
-            curr_link = col(f"curr.{link_name}")
-            return (
-                when(
-                    prev_link.isNotNull(),
-                    weight * curr_link + (lit(Decimal(1)) - weight) * prev_link,
+            def calculate_weighted_link(link_name):
+                prev_link = col(f"prev.{link_name}")
+                curr_link = col(f"curr.{link_name}")
+                return (
+                    when(
+                        prev_link.isNotNull(),
+                        weight * curr_link + (lit(Decimal(1)) - weight) * prev_link,
+                    )
+                    .otherwise(curr_link)
+                    .alias(link_name)
                 )
-                .otherwise(curr_link)
-                .alias(link_name)
-            )
 
-        weighting_df = (
-            prepared_df.select(
-                "period",
-                "grouping",
-                expr("forward AS forward_unweighted"),
-                expr("backward AS backward_unweighted"),
-                expr("construction AS construction_unweighted"),
-            )
-            .unionByName(
-                validated_back_data_df.select(
+            weighting_df = (
+                prepared_df.select(
                     "period",
                     "grouping",
-                    "forward_unweighted",
-                    "backward_unweighted",
-                    "construction_unweighted",
+                    expr("forward AS forward_unweighted"),
+                    expr("backward AS backward_unweighted"),
+                    expr("construction AS construction_unweighted"),
+                )
+                .unionByName(
+                    validated_back_data_df.select(
+                        "period",
+                        "grouping",
+                        "forward_unweighted",
+                        "backward_unweighted",
+                        "construction_unweighted",
+                    )
+                )
+                .groupBy("period", "grouping")
+                .agg(
+                    expr("first(forward_unweighted) AS forward"),
+                    expr("first(backward_unweighted) AS backward"),
+                    expr("first(construction_unweighted) AS construction"),
                 )
             )
-            .groupBy("period", "grouping")
-            .agg(
-                expr("first(forward_unweighted) AS forward"),
-                expr("first(backward_unweighted) AS backward"),
-                expr("first(construction_unweighted) AS construction"),
-            )
-        )
 
-        curr_df = weighting_df.alias("curr")
-        prev_df = weighting_df.alias("prev")
-        prepared_df = (
-            curr_df.join(
-                prev_df,
-                (
+            curr_df = weighting_df.alias("curr")
+            prev_df = weighting_df.alias("prev")
+            prepared_df = (
+                curr_df.join(
+                    prev_df,
                     (
-                        col("prev.period")
-                        == calculate_previous_period(
-                            col("curr.period"), weight_periodicity
+                        (
+                            col("prev.period")
+                            == calculate_previous_period(
+                                col("curr.period"), weight_periodicity
+                            )
                         )
-                    )
-                    & (col("curr.grouping") == col("prev.grouping"))
-                ),
-                "left",
-            )
-            .select(
-                expr("curr.period AS period"),
-                expr("curr.grouping AS grouping"),
-                calculate_weighted_link("forward"),
-                calculate_weighted_link("backward"),
-                calculate_weighted_link("construction"),
-            )
-            .join(
-                prepared_df.withColumnRenamed("forward", "forward_unweighted")
-                .withColumnRenamed("backward", "backward_unweighted")
-                .withColumnRenamed("construction", "construction_unweighted"),
-                ["period", "grouping"],
+                        & (col("curr.grouping") == col("prev.grouping"))
+                    ),
+                    "left",
+                )
+                .select(
+                    expr("curr.period AS period"),
+                    expr("curr.grouping AS grouping"),
+                    calculate_weighted_link("forward"),
+                    calculate_weighted_link("backward"),
+                    calculate_weighted_link("construction"),
+                )
+                .join(
+                    prepared_df.withColumnRenamed("forward", "forward_unweighted")
+                    .withColumnRenamed("backward", "backward_unweighted")
+                    .withColumnRenamed("construction", "construction_unweighted"),
+                    ["period", "grouping"],
+                )
             )
-        )
+
+    calculate_ratios()
 
     # Caching for both imputed and unimputed data.
     imputed_df = None

From f045c3d08ac7f758685b7fb00770ade4166b0d9b Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 17 May 2023 14:23:43 +0100
Subject: [PATCH 333/531] Update TOML

---
 .../51_R_R_FI_80_weight_output.csv            |  46 +++---
 .../52_BI_BI_R_50_weight_output.csv           |  32 ++--
 .../53_C_FI_FI_50_weight_output.csv           |  48 +++---
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  58 +++----
 .../55_R_R_FI_50_weight_default_output.csv    |  24 +--
 .../56_BI_BI_R_50_weight_default_output.csv   |  24 +--
 .../57_C_FI_FI_50_weight_default_output.csv   |  24 +--
 ...I_R_R_50_weight_partial_default_output.csv |  48 +++---
 .../59_class_change_50_weight_output.csv      |  30 ++--
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv |  56 +++----
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv |  72 ++++-----
 .../62_mixed_data_50_weight_output.csv        |  42 ++---
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 144 +++++++++---------
 .../64_TB_10_C_FI_FI_50_weight_output.csv     |  72 ++++-----
 ...B_10_BI_BI_R_50_weight_filtered_output.csv | 126 +++++++--------
 ...weight_filtered_partial_default_output.csv |  72 ++++-----
 ...50_weight_filtered_full_default_output.csv |  72 ++++-----
 tests/imputation/mean_of_ratios.toml          |  46 +++---
 18 files changed, 518 insertions(+), 518 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index aa6f1128..9604a43f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
 30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7476,R,4,3,4,false,false,false
-30001,202003,100,51,0.267924024,,1.4441576,1,100.28754,1.526947,1,103.0154,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,1.6294848,106.23316,1,1.655006,120.1991,9343,R,0,4,4,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,7818,R,4,3,4,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,1.6294848,106.23316,1,1.655006,120.1991,7511,R,0,4,4,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,1761,R,4,3,4,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,0.030288689,1,1.6294848,106.23316,1,1.655006,120.1991,64,R,0,4,4,true,false,false
-30004,202002,100,81,33.015625,,7.188143943,1.5019872,96.95862,8.743054929,1.407609,90.8436,2113,R,4,3,4,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,3051.505009,FIR,3,0,3,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,
+30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,7476,R,4,3,4,false,false,false
+30001,202003,100,51,0.267924024,,1.4441576,1,100.287528,1.526947,1,103.015385,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,1.6294848,106.233122,1,1.655006,120.199052,9343,R,0,4,4,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,7818,R,4,3,4,false,false,false
+30002,202003,100,72,0.626375032,,1.4441576,1,100.287528,1.526947,1,103.015385,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,1.6294848,106.233122,1,1.655006,120.199052,7511,R,0,4,4,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,1761,R,4,3,4,false,false,false
+30003,202003,100,7,3.686541738,,1.4441576,1,100.287528,1.526947,1,103.015385,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,0.030288689,1,1.6294848,106.233122,1,1.655006,120.199052,64,R,0,4,4,true,false,false
+30004,202002,100,81,33.015625,,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,2113,R,4,3,4,false,false,false
+30004,202003,100,81,,,1.4441576,1,100.287528,1.526947,1,103.015385,3051.504892,FIR,3,0,3,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index fedf150b..4728286c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
 60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,false,false
 60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,false,false,false
-60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,1046,R,3,0,4,false,true,false
+60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.913043,1046,R,3,0,4,false,true,false
 60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,true,false,false
 60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,false,false,false
-60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,3807,R,3,0,4,false,true,false
+60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.913043,3807,R,3,0,4,false,true,false
 60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,true,false,false
 60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,false,false,false
-60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,6351,R,3,0,4,false,true,false
+60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.913043,6351,R,3,0,4,false,true,false
 60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,true,false,false
 60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,false,false,false
-60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.9130435,401,R,3,0,4,false,true,false
-60001,201901,100,15,,,,,,1,1.5274,50.3694,,,,,,,,
-60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-60001,201903,100,15,,,,,,1.113,1,89.3761,,,,,,,,
-60002,201901,100,71,,,,,,1,1.5274,50.3694,,,,,,,,
-60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-60002,201903,100,71,,,,,,1.113,1,89.3761,,,,,,,,
-60003,201901,100,26,,,,,,1,1.5274,50.3694,,,,,,,,
-60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-60003,201903,100,26,,,,,,1.113,1,89.3761,,,,,,,,
-60004,201901,100,3,,,,,,1,1.5274,50.3694,,,,,,,,
-60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-60004,201903,100,3,,,,,,1.113,1,89.3761,,,,,,,,
+60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.913043,401,R,3,0,4,false,true,false
+60001,201901,100,15,,,,,,1,1.5274,50.3694,0,R,,,,,,
+60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+60001,201903,100,15,,,,,,1.113,1,89.3761,0,R,,,,,,
+60002,201901,100,71,,,,,,1,1.5274,50.3694,0,R,,,,,,
+60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+60002,201903,100,71,,,,,,1.113,1,89.3761,0,R,,,,,,
+60003,201901,100,26,,,,,,1,1.5274,50.3694,0,R,,,,,,
+60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+60003,201903,100,26,,,,,,1.113,1,89.3761,0,R,,,,,,
+60004,201901,100,3,,,,,,1,1.5274,50.3694,0,R,,,,,,
+60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+60004,201903,100,3,,,,,,1.113,1,89.3761,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index e3896fa4..94a57c48 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.062742377,165.75388,1,2.196577972,194.6,8444,R,0,3,3,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7476,R,3,3,3,false,false,false
-30001,202003,100,51,0.267924024,,1.444157545,1,100.28754,1.526946931,1,103.0154,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,2.062742377,165.75388,1,2.196577972,194.6,9343,R,0,3,3,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,7818,R,3,3,3,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.28754,1.526947,1,103.0154,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,2.062742377,165.75388,1,2.196577972,194.6,7511,R,0,3,3,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,1761,R,3,3,3,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.28754,1.526947,1,103.0154,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,,1,2.062742377,165.75388,1,2.196577972,194.6,13426.06428,C,0,3,3,true,false,false
-30004,202002,100,81,,,0.71545859,1.86927226,96.95862,0.652198238,1.866715325,90.8436,9605.793024,FIC,3,3,3,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.28754,1.526947,1,103.0154,13872.279,FIC,3,0,3,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,,,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,,,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,,,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,,,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,,,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,,,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,,,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,,,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,,,,,,,,
+30001,202001,100,51,,1.129481006,1,1.861989,122.4847,1,2.196577972,194.6,8444,R,0,3,3,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,7476,R,3,3,3,false,false,false
+30001,202003,100,51,0.267924024,,1.319973,1,96.195742,1.526946931,1,103.015385,2003,R,3,0,3,false,true,false
+30002,202001,100,72,,1.195062676,1,1.861989,122.4847,1,2.196577972,194.6,9343,R,0,3,3,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,7818,R,3,3,3,false,false,false
+30002,202003,100,72,0.626375032,,1.319973,1,96.195742,1.526947,1,103.015385,4897,R,3,0,3,false,true,false
+30003,202001,100,7,,4.265190233,1,1.861989,122.4847,1,2.196577972,194.6,7511,R,0,3,3,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,1761,R,3,3,3,false,false,false
+30003,202003,100,7,3.686541738,,1.319973,1,96.195742,1.526947,1,103.015385,6492,R,3,0,3,false,true,false
+30004,202001,100,81,,,1,1.861989,122.4847,1,2.196577972,194.6,9921.2607,C,0,3,3,true,false,false
+30004,202002,100,81,,,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,8039.684869,FIC,3,3,3,false,false,false
+30004,202003,100,81,,,1.319973,1,96.195742,1.526947,1,103.015385,10612.170698,FIC,3,0,3,false,true,false
+30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,
+30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,
+30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,
+30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index ccca4704..2c45f402 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,14 +1,14 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
 110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,false,false,false
 110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
 110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,false,false,false
 110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
 110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,false,false,false
 110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,false,true,false
 110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,false,false
@@ -20,30 +20,30 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,false,false
 110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,false,false,false
 110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,true,false,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,10340.484733,BI,0,3,3,true,false,false
 110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,false,false,false
 110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,
-110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110001,201901,100,89,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,0,R,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,0,R,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,0,R,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,0,R,,,,,,
+110005,201901,200,27,,,1,2.994350985,107.48,,,,0,R,,,,,,
+110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
+110006,201901,200,42,,,1,2.994350985,107.48,,,,0,R,,,,,,
+110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
+110007,201901,200,19,,,1,2.994350985,107.48,,,,0,R,,,,,,
+110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
+110008,201901,200,43,,,1,2.994350985,107.48,,,,0,R,,,,,,
+110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
index 01847685..548ac79e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
@@ -11,15 +11,15 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,true,false,false
 30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,false,false,false
 30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,false,true,false
-30001,201901,100,51,,,1,1.5274,50.3694,,,,,,,,,,,
-30001,201902,100,51,,,1,1.8795,121.4187,,,,,,,,,,,
-30001,201903,100,51,,,1,1,89.3761,,,,,,,,,,,
-30002,201901,100,72,,,1,1.5274,50.3694,,,,,,,,,,,
-30002,201902,100,72,,,1,1.8795,121.4187,,,,,,,,,,,
-30002,201903,100,72,,,1,1,89.3761,,,,,,,,,,,
-30003,201901,100,7,,,1,1.5274,50.3694,,,,,,,,,,,
-30003,201902,100,7,,,1,1.8795,121.4187,,,,,,,,,,,
-30003,201903,100,7,,,1,1,89.3761,,,,,,,,,,,
-30004,201901,100,81,,,1,1.5274,50.3694,,,,,,,,,,,
-30004,201902,100,81,,,1,1.8795,121.4187,,,,,,,,,,,
-30004,201903,100,81,,,1,1,89.3761,,,,,,,,,,,
+30001,201901,100,51,,,1,1.5274,50.3694,,,,0,R,,,,,,
+30001,201902,100,51,,,1,1.8795,121.4187,,,,0,R,,,,,,
+30001,201903,100,51,,,1,1,89.3761,,,,0,R,,,,,,
+30002,201901,100,72,,,1,1.5274,50.3694,,,,0,R,,,,,,
+30002,201902,100,72,,,1,1.8795,121.4187,,,,0,R,,,,,,
+30002,201903,100,72,,,1,1,89.3761,,,,0,R,,,,,,
+30003,201901,100,7,,,1,1.5274,50.3694,,,,0,R,,,,,,
+30003,201902,100,7,,,1,1.8795,121.4187,,,,0,R,,,,,,
+30003,201903,100,7,,,1,1,89.3761,,,,0,R,,,,,,
+30004,201901,100,81,,,1,1.5274,50.3694,,,,0,R,,,,,,
+30004,201902,100,81,,,1,1.8795,121.4187,,,,0,R,,,,,,
+30004,201903,100,81,,,1,1,89.3761,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
index 07f587fa..3374f3b1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
@@ -11,15 +11,15 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,true,false,false
 60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,false,false,false
 60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,false,true,false
-60001,201901,100,15,,,1,1,50.3694,,,,,,,,,,,
-60001,201902,100,15,,,0.9685,1,121.4187,,,,,,,,,,,
-60001,201903,100,15,,,1.113,1,89.3761,,,,,,,,,,,
-60002,201901,100,71,,,1,1,50.3694,,,,,,,,,,,
-60002,201902,100,71,,,0.9685,1,121.4187,,,,,,,,,,,
-60002,201903,100,71,,,1.113,1,89.3761,,,,,,,,,,,
-60003,201901,100,26,,,1,1,50.3694,,,,,,,,,,,
-60003,201902,100,26,,,0.9685,1,121.4187,,,,,,,,,,,
-60003,201903,100,26,,,1.113,1,89.3761,,,,,,,,,,,
-60004,201901,100,3,,,1,1,50.3694,,,,,,,,,,,
-60004,201902,100,3,,,0.9685,1,121.4187,,,,,,,,,,,
-60004,201903,100,3,,,1.113,1,89.3761,,,,,,,,,,,
+60001,201901,100,15,,,1,1,50.3694,,,,0,R,,,,,,
+60001,201902,100,15,,,0.9685,1,121.4187,,,,0,R,,,,,,
+60001,201903,100,15,,,1.113,1,89.3761,,,,0,R,,,,,,
+60002,201901,100,71,,,1,1,50.3694,,,,0,R,,,,,,
+60002,201902,100,71,,,0.9685,1,121.4187,,,,0,R,,,,,,
+60002,201903,100,71,,,1.113,1,89.3761,,,,0,R,,,,,,
+60003,201901,100,26,,,1,1,50.3694,,,,0,R,,,,,,
+60003,201902,100,26,,,0.9685,1,121.4187,,,,0,R,,,,,,
+60003,201903,100,26,,,1.113,1,89.3761,,,,0,R,,,,,,
+60004,201901,100,3,,,1,1,50.3694,,,,0,R,,,,,,
+60004,201902,100,3,,,0.9685,1,121.4187,,,,0,R,,,,,,
+60004,201903,100,3,,,1.113,1,89.3761,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
index 755ab6ab..4c17f94b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
@@ -11,15 +11,15 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,true,false,false
 30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,false,false,false
 30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,false,true,false
-30001,201901,100,51,,,1,1.5274,1,,,,,,,,,,,
-30001,201902,100,51,,,0.9685,1.8795,1,,,,,,,,,,,
-30001,201903,100,51,,,1.113,1,1,,,,,,,,,,,
-30002,201901,100,72,,,1,1.5274,1,,,,,,,,,,,
-30002,201902,100,72,,,0.9685,1.8795,1,,,,,,,,,,,
-30002,201903,100,72,,,1.113,1,1,,,,,,,,,,,
-30003,201901,100,7,,,1,1.5274,1,,,,,,,,,,,
-30003,201902,100,7,,,0.9685,1.8795,1,,,,,,,,,,,
-30003,201903,100,7,,,1.113,1,1,,,,,,,,,,,
-30004,201901,100,81,,,1,1.5274,1,,,,,,,,,,,
-30004,201902,100,81,,,0.9685,1.8795,1,,,,,,,,,,,
-30004,201903,100,81,,,1.113,1,1,,,,,,,,,,,
+30001,201901,100,51,,,1,1.5274,1,,,,0,R,,,,,,
+30001,201902,100,51,,,0.9685,1.8795,1,,,,0,R,,,,,,
+30001,201903,100,51,,,1.113,1,1,,,,0,R,,,,,,
+30002,201901,100,72,,,1,1.5274,1,,,,0,R,,,,,,
+30002,201902,100,72,,,0.9685,1.8795,1,,,,0,R,,,,,,
+30002,201903,100,72,,,1.113,1,1,,,,0,R,,,,,,
+30003,201901,100,7,,,1,1.5274,1,,,,0,R,,,,,,
+30003,201902,100,7,,,0.9685,1.8795,1,,,,0,R,,,,,,
+30003,201903,100,7,,,1.113,1,1,,,,0,R,,,,,,
+30004,201901,100,81,,,1,1.5274,1,,,,0,R,,,,,,
+30004,201902,100,81,,,0.9685,1.8795,1,,,,0,R,,,,,,
+30004,201903,100,81,,,1.113,1,1,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
index 3e4b7b81..cc71dcce 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
@@ -23,27 +23,27 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,true,false,false
 110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,false,false,false
 110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,
-110005,201901,200,27,,,1,1,107.48,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,1,54.70285714,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110006,201901,200,42,,,1,1,107.48,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,1,54.70285714,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110007,201901,200,19,,,1,1,107.48,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,1,54.70285714,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,
-110008,201901,200,43,,,1,1,107.48,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,1,54.70285714,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,
+110001,201901,100,89,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,0,R,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,0,R,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,0,R,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,0,R,,,,,,
+110005,201901,200,27,,,1,1,107.48,,,,0,R,,,,,,
+110005,201902,200,27,,,1.377938182,1,54.70285714,,,,0,R,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
+110006,201901,200,42,,,1,1,107.48,,,,0,R,,,,,,
+110006,201902,200,42,,,1.377938182,1,54.70285714,,,,0,R,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
+110007,201901,200,19,,,1,1,107.48,,,,0,R,,,,,,
+110007,201902,200,19,,,1.377938182,1,54.70285714,,,,0,R,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
+110008,201901,200,43,,,1,1,107.48,,,,0,R,,,,,,
+110008,201902,200,43,,,1.377938182,1,54.70285714,,,,0,R,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index c3478e8d..a9118669 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -14,18 +14,18 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,true,false,false
 210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,false,false,false
 210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,false,true,false
-210001,201901,1,10,,,1,2.656680299,101.7103175,,,,,,,,,,,
-210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,
-210001,201903,1,10,,,0.968230653,1,70.26136364,,,,,,,,,,,
-210002,201901,1,50,,,1,2.656680299,101.7103175,,,,,,,,,,,
-210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,
-210002,201903,1,50,,,0.968230653,1,70.26136364,,,,,,,,,,,
-210003,201901,2,12,,,1,0.68736285,182.25,,,,,,,,,,,
-210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
-210003,201903,2,12,,,1.259780318,1,182.2366412,,,,,,,,,,,
-210004,201901,2,9,,,1,0.68736285,182.25,,,,,,,,,,,
-210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
-210004,201903,2,9,,,1.259780318,1,182.2366412,,,,,,,,,,,
-210005,201901,1,18,,,1,2.656680299,101.7103175,,,,,,,,,,,
-210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,,,,,,,,
-210005,201903,2,18,,,1.259780318,1,182.2366412,,,,,,,,,,,
+210001,201901,1,10,,,1,2.656680299,101.7103175,,,,0,R,,,,,,
+210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,
+210001,201903,1,10,,,0.968230653,1,70.26136364,,,,0,R,,,,,,
+210002,201901,1,50,,,1,2.656680299,101.7103175,,,,0,R,,,,,,
+210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,
+210002,201903,1,50,,,0.968230653,1,70.26136364,,,,0,R,,,,,,
+210003,201901,2,12,,,1,0.68736285,182.25,,,,0,R,,,,,,
+210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,0,R,,,,,,
+210003,201903,2,12,,,1.259780318,1,182.2366412,,,,0,R,,,,,,
+210004,201901,2,9,,,1,0.68736285,182.25,,,,0,R,,,,,,
+210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,0,R,,,,,,
+210004,201903,2,9,,,1.259780318,1,182.2366412,,,,0,R,,,,,,
+210005,201901,1,18,,,1,2.656680299,101.7103175,,,,0,R,,,,,,
+210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,0,R,,,,,,
+210005,201903,2,18,,,1.259780318,1,182.2366412,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index 2d062fdd..869427e7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -27,31 +27,31 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,false,false,false
 70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,false,false,false
 70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,false,true,false
-70001,201901,100,39,,,1,1.511049724,101.7103175,,,,,,,,,,,
-70001,201902,100,39,,,1,1,1,,,,,,,,,,,
-70001,201903,100,39,,,1.082864299,1,70.26136364,,,,,,,,,,,
-70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
-70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
-70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
-70001,201907,100,39,,,1,1,1,,,,,,,,,,,
-70002,201901,100,94,,,1,1.511049724,101.7103175,,,,,,,,,,,
-70002,201902,100,94,,,1,1,1,,,,,,,,,,,
-70002,201903,100,94,,,1.082864299,1,70.26136364,,,,,,,,,,,
-70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
-70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
-70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
-70002,201907,100,94,,,1,1,1,,,,,,,,,,,
-70003,201901,100,42,,,1,1.511049724,101.7103175,,,,,,,,,,,
-70003,201902,100,42,,,1,1,1,,,,,,,,,,,
-70003,201903,100,42,,,1.082864299,1,70.26136364,,,,,,,,,,,
-70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
-70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
-70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
-70003,201907,100,42,,,1,1,1,,,,,,,,,,,
-70004,201901,100,6,,,1,1.511049724,101.7103175,,,,,,,,,,,
-70004,201902,100,6,,,1,1,1,,,,,,,,,,,
-70004,201903,100,6,,,1.082864299,1,70.26136364,,,,,,,,,,,
-70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,,,,,,,,
-70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,,,,,,,,
-70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,,,,,,,,
-70004,201907,100,6,,,1,1,1,,,,,,,,,,,
+70001,201901,100,39,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70001,201902,100,39,,,1,1,1,,,,0,R,,,,,,
+70001,201903,100,39,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+70001,201907,100,39,,,1,1,1,,,,0,R,,,,,,
+70002,201901,100,94,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70002,201902,100,94,,,1,1,1,,,,0,R,,,,,,
+70002,201903,100,94,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+70002,201907,100,94,,,1,1,1,,,,0,R,,,,,,
+70003,201901,100,42,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70003,201902,100,42,,,1,1,1,,,,0,R,,,,,,
+70003,201903,100,42,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+70003,201907,100,42,,,1,1,1,,,,0,R,,,,,,
+70004,201901,100,6,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70004,201902,100,6,,,1,1,1,,,,0,R,,,,,,
+70004,201903,100,6,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+70004,201907,100,6,,,1,1,1,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index 9823dcbd..562a67e9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -35,39 +35,39 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 110012,202001,200,71,,,1,2.290844366,182.25,1,2.642597676,144.865,10285.415,C,0,3,3,,,,true,false,false
 110012,202002,200,71,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,,false,false,false
 110012,202003,200,71,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,13496.15416,FIC,4,0,4,,,,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,,,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,,,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,,,,,,,,,,,
-110005,201901,200,27,,,1,2.994350985,107.48,,,,,,,,,,,,,,
-110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
-110006,201901,200,42,,,1,2.994350985,107.48,,,,,,,,,,,,,,
-110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
-110007,201901,200,19,,,1,2.994350985,107.48,,,,,,,,,,,,,,
-110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
-110008,201901,200,43,,,1,2.994350985,107.48,,,,,,,,,,,,,,
-110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,,,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,,,,,,,,,,,
-110009,201901,100,85,,,1,1,1,,,,,,,,,,,,,,
-110009,201902,100,85,,,1,1,1,,,,,,,,,,,,,,
-110009,201903,100,85,,,1,1,1,,,,,,,,,,,,,,
-110010,201901,100,71,,,1,1,1,,,,,,,,,,,,,,
-110010,201902,100,71,,,1,1,1,,,,,,,,,,,,,,
-110010,201903,100,71,,,1,1,1,,,,,,,,,,,,,,
-110011,201901,200,85,,,1,1,1,,,,,,,,,,,,,,
-110011,201902,200,85,,,1,1,1,,,,,,,,,,,,,,
-110011,201903,200,85,,,1,1,1,,,,,,,,,,,,,,
-110012,201901,200,71,,,1,1,1,,,,,,,,,,,,,,
-110012,201902,200,71,,,1,1,1,,,,,,,,,,,,,,
-110012,201903,200,71,,,1,1,1,,,,,,,,,,,,,,
+110001,201901,100,89,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
+110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
+110001,201903,100,89,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
+110002,201901,100,83,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
+110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
+110002,201903,100,83,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
+110003,201901,100,4,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
+110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
+110003,201903,100,4,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
+110004,201901,100,76,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
+110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
+110004,201903,100,76,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
+110005,201901,200,27,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
+110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
+110005,201903,200,27,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
+110006,201901,200,42,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
+110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
+110006,201903,200,42,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
+110007,201901,200,19,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
+110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
+110007,201903,200,19,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
+110008,201901,200,43,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
+110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
+110008,201903,200,43,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
+110009,201901,100,85,,,1,1,1,,,,0,R,,,,,,,,,
+110009,201902,100,85,,,1,1,1,,,,0,R,,,,,,,,,
+110009,201903,100,85,,,1,1,1,,,,0,R,,,,,,,,,
+110010,201901,100,71,,,1,1,1,,,,0,R,,,,,,,,,
+110010,201902,100,71,,,1,1,1,,,,0,R,,,,,,,,,
+110010,201903,100,71,,,1,1,1,,,,0,R,,,,,,,,,
+110011,201901,200,85,,,1,1,1,,,,0,R,,,,,,,,,
+110011,201902,200,85,,,1,1,1,,,,0,R,,,,,,,,,
+110011,201903,200,85,,,1,1,1,,,,0,R,,,,,,,,,
+110012,201901,200,71,,,1,1,1,,,,0,R,,,,,,,,,
+110012,201902,200,71,,,1,1,1,,,,0,R,,,,,,,,,
+110012,201903,200,71,,,1,1,1,,,,0,R,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index e1df2ea8..f50e77b3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -20,24 +20,24 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,true,true,true
 110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,true,true,true
 110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,true,true,true
-110001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,
-110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
-110001,201903,100,89,,,1.040615327,1,79.81873182,,,,,,,,,,,
-110002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,
-110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
-110002,201903,100,83,,,1.040615327,1,79.81873182,,,,,,,,,,,
-110003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,
-110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
-110003,201903,100,4,,,1.040615327,1,79.81873182,,,,,,,,,,,
-110004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,
-110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,
-110004,201903,100,76,,,1.040615327,1,79.81873182,,,,,,,,,,,
-110005,201901,200,27,,,1,2.642597676,144.865,,,,,,,,,,,
-110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
-110005,201903,200,27,,,1.106182973,1,140.2509173,,,,,,,,,,,
-110006,201901,200,42,,,1,2.642597676,144.865,,,,,,,,,,,
-110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
-110006,201903,200,42,,,1.106182973,1,140.2509173,,,,,,,,,,,
-110007,201901,200,19,,,1,2.642597676,144.865,,,,,,,,,,,
-110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,
-110007,201903,200,19,,,1.106182973,1,140.2509173,,,,,,,,,,,
+110001,201901,100,89,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
+110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
+110001,201903,100,89,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
+110002,201901,100,83,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
+110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
+110002,201903,100,83,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
+110003,201901,100,4,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
+110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
+110003,201903,100,4,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
+110004,201901,100,76,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
+110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
+110004,201903,100,76,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
+110005,201901,200,27,,,1,2.642597676,144.865,,,,0,R,,,,,,
+110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,
+110005,201903,200,27,,,1.106182973,1,140.2509173,,,,0,R,,,,,,
+110006,201901,200,42,,,1,2.642597676,144.865,,,,0,R,,,,,,
+110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,
+110006,201903,200,42,,,1.106182973,1,140.2509173,,,,0,R,,,,,,
+110007,201901,200,19,,,1,2.642597676,144.865,,,,0,R,,,,,,
+110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,
+110007,201903,200,19,,,1.106182973,1,140.2509173,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 600c798d..60689c7b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -71,75 +71,75 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,true,false,false
 80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,false,false,false
 80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,false,true,false
-80001,201901,100,89,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80001,201903,100,89,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80002,201901,100,83,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80002,201903,100,83,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80003,201901,100,4,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80003,201903,100,4,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80004,201901,100,76,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80004,201903,100,76,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80005,201901,100,18,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80005,201903,100,18,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80006,201901,100,94,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80006,201903,100,94,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80007,201901,100,8,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80007,201903,100,8,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80008,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80008,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80009,201901,100,45,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80009,201903,100,45,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80010,201901,100,100,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80010,201903,100,100,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80011,201901,100,19,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80011,201903,100,19,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80012,201901,100,304,,,1,2.642597676,144.865,,,,,,,,,,,,,
-80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,,,,,,,,,,
-80012,201903,100,304,,,1.106182973,1,140.2509173,,,,,,,,,,,,,
-80013,201901,200,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80013,201903,200,54,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80014,201901,200,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80014,201903,200,42,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80015,201901,200,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80015,201903,200,57,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80016,201901,200,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80016,201903,200,163,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80017,201901,200,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80017,201903,200,149,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80018,201901,200,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80018,201903,200,126,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80019,201901,200,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80019,201903,200,6,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80020,201901,200,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80020,201903,200,22,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80021,201901,200,108,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80021,201903,200,108,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80022,201901,200,67,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80022,201903,200,67,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80023,201901,200,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80023,201903,200,18,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
-80024,201901,200,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,,,,,,,,,,
-80024,201903,200,155,,,1.040615327,1,79.81873182,,,,,,,,,,,,,
+80001,201901,100,89,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80001,201903,100,89,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80002,201901,100,83,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80002,201903,100,83,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80003,201901,100,4,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80003,201903,100,4,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80004,201901,100,76,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80004,201903,100,76,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80005,201901,100,18,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80005,201903,100,18,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80006,201901,100,94,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80006,201903,100,94,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80007,201901,100,8,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80007,201903,100,8,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80008,201901,100,304,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80008,201903,100,304,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80009,201901,100,45,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80009,201903,100,45,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80010,201901,100,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80010,201903,100,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80011,201901,100,19,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80011,201903,100,19,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80012,201901,100,304,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80012,201903,100,304,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80013,201901,200,54,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80013,201903,200,54,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80014,201901,200,47,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80014,201903,200,42,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80015,201901,200,57,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80015,201903,200,57,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80016,201901,200,163,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80016,201903,200,163,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80017,201901,200,149,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80017,201903,200,149,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80018,201901,200,126,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80018,201903,200,126,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80019,201901,200,6,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80019,201903,200,6,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80020,201901,200,22,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80020,201903,200,22,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80021,201901,200,108,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80021,201903,200,108,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80022,201901,200,67,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80022,201903,200,67,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80023,201901,200,18,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80023,201903,200,18,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80024,201901,200,155,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80024,201903,200,155,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index dfa0aaf8..7739bf59 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -35,39 +35,39 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,true,false,false
 30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,false,false,false
 30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,false,true,false
-30001,201901,100,51,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30001,201903,100,51,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30002,201901,100,72,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30002,201903,100,72,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30003,201901,100,7,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30003,201903,100,7,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30004,201901,100,81,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30004,201903,100,81,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30005,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30005,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30006,201901,100,14,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30006,201903,100,14,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30007,201901,100,12,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30007,201903,100,12,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30008,201901,100,162,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30008,201903,100,162,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30009,201901,100,26,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30009,201903,100,26,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30010,201901,100,144,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30010,201903,100,144,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30011,201901,100,5,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30011,201903,100,5,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
-30012,201901,100,275,,,1,2.09204015,76.03985875,,,,,,,,,,,,,
-30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,
-30012,201903,100,275,,,2.040615327,1,84.81873182,,,,,,,,,,,,,
+30001,201901,100,51,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30001,201903,100,51,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30002,201901,100,72,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30002,201903,100,72,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30003,201901,100,7,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30003,201903,100,7,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30004,201901,100,81,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30004,201903,100,81,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30005,201901,100,5,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30005,201903,100,5,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30006,201901,100,14,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30006,201903,100,14,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30007,201901,100,12,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30007,201903,100,12,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30008,201901,100,162,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30008,201903,100,162,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30009,201901,100,26,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30009,201903,100,26,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30010,201901,100,144,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30010,201903,100,144,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30011,201901,100,5,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30011,201903,100,5,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30012,201901,100,275,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30012,201903,100,275,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index d06e392c..f6039f70 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -62,66 +62,66 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 90021,202001,100,155,,,1,1.504436071,128.8429705,1,1.798238111,102.4414146,48979.92546,BI,0,17,19,,,,,,true,false,false
 90021,202002,100,155,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,,,,,,false,false,false
 90021,202003,100,155,,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,21046,R,18,0,21,,,true,,,false,true,false
-90001,201901,100,89,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90001,201902,100,89,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90001,201903,100,89,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90002,201901,100,83,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90002,201902,100,83,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90002,201903,100,83,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90003,201901,100,4,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90003,201902,100,4,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90003,201903,100,4,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90004,201901,100,76,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90004,201902,100,76,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90004,201903,100,76,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90005,201901,100,18,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90005,201902,100,18,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90005,201903,100,18,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90006,201901,100,94,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90006,201902,100,94,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90006,201903,100,94,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90007,201901,100,8,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90007,201902,100,8,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90007,201903,100,8,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90008,201901,100,304,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90008,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90008,201903,100,304,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90009,201901,100,45,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90009,201902,100,45,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90009,201903,100,45,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90010,201901,100,100,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90010,201902,100,100,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90010,201903,100,100,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90011,201901,100,19,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90011,201902,100,19,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90011,201903,100,19,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90012,201901,100,304,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90012,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90012,201903,100,304,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90013,201901,100,54,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90013,201902,100,54,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90013,201903,100,54,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90014,201901,100,47,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90014,201902,100,42,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90014,201903,100,42,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90015,201901,100,57,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90015,201902,100,57,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90015,201903,100,57,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90016,201901,100,163,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90016,201902,100,163,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90016,201903,100,163,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90017,201901,100,149,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90017,201902,100,149,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90017,201903,100,149,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90018,201901,100,126,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90018,201902,100,126,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90018,201903,100,126,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90019,201901,100,6,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90019,201902,100,6,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90019,201903,100,6,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90020,201901,100,22,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90020,201902,100,22,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90020,201903,100,22,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
-90021,201901,100,155,,,1,2.09204015,76.03985875,,,,,,,,,,,,,,,,
-90021,201902,100,155,,,0.8701751,1.505585865,123.1676833,,,,,,,,,,,,,,,,
-90021,201903,100,155,,,2.040615327,1,84.81873182,,,,,,,,,,,,,,,,
+90001,201901,100,89,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90001,201902,100,89,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90001,201903,100,89,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90002,201901,100,83,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90002,201902,100,83,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90002,201903,100,83,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90003,201901,100,4,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90003,201902,100,4,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90003,201903,100,4,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90004,201901,100,76,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90004,201902,100,76,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90004,201903,100,76,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90005,201901,100,18,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90005,201902,100,18,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90005,201903,100,18,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90006,201901,100,94,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90006,201902,100,94,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90006,201903,100,94,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90007,201901,100,8,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90007,201902,100,8,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90007,201903,100,8,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90008,201901,100,304,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90008,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90008,201903,100,304,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90009,201901,100,45,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90009,201902,100,45,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90009,201903,100,45,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90010,201901,100,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90010,201902,100,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90010,201903,100,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90011,201901,100,19,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90011,201902,100,19,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90011,201903,100,19,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90012,201901,100,304,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90012,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90012,201903,100,304,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90013,201901,100,54,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90013,201902,100,54,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90013,201903,100,54,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90014,201901,100,47,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90014,201902,100,42,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90014,201903,100,42,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90015,201901,100,57,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90015,201902,100,57,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90015,201903,100,57,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90016,201901,100,163,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90016,201902,100,163,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90016,201903,100,163,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90017,201901,100,149,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90017,201902,100,149,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90017,201903,100,149,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90018,201901,100,126,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90018,201902,100,126,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90018,201903,100,126,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90019,201901,100,6,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90019,201902,100,6,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90019,201903,100,6,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90020,201901,100,22,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90020,201902,100,22,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90020,201903,100,22,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90021,201901,100,155,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90021,201902,100,155,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90021,201903,100,155,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index b0cdace5..5f86acfe 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -35,39 +35,39 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 30012,202001,100,275,,0.034032235,1,1,61.12436116,1,1.82834015,81.41733933,256,R,0,0,9,,false,true,,true,true,true,false
 30012,202002,100,275,29.38390625,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,false,,true,true,,true,true,false
 30012,202003,100,275,,,1,1,85.37820513,0.984115327,1,77.81978439,7402.515486,FIR,0,0,10,,,,,,true,true,false
-30001,201901,100,51,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30001,201902,100,51,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30001,201903,100,51,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30002,201901,100,72,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30002,201902,100,72,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30002,201903,100,72,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30003,201901,100,7,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30003,201902,100,7,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30003,201903,100,7,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30004,201901,100,81,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30004,201902,100,81,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30004,201903,100,81,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30005,201901,100,5,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30005,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30005,201903,100,5,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30006,201901,100,14,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30006,201902,100,14,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30006,201903,100,14,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30007,201901,100,12,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30007,201902,100,12,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30007,201903,100,12,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30008,201901,100,162,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30008,201902,100,162,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30008,201903,100,162,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30009,201901,100,26,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30009,201902,100,26,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30009,201903,100,26,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30010,201901,100,144,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30010,201902,100,144,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30010,201903,100,144,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30011,201901,100,5,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30011,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30011,201903,100,5,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30012,201901,100,275,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30012,201902,100,275,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30012,201903,100,275,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30001,201901,100,51,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30001,201902,100,51,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30001,201903,100,51,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30002,201901,100,72,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30002,201902,100,72,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30002,201903,100,72,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30003,201901,100,7,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30003,201902,100,7,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30003,201903,100,7,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30004,201901,100,81,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30004,201902,100,81,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30004,201903,100,81,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30005,201901,100,5,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30005,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30005,201903,100,5,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30006,201901,100,14,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30006,201902,100,14,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30006,201903,100,14,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30007,201901,100,12,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30007,201902,100,12,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30007,201903,100,12,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30008,201901,100,162,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30008,201902,100,162,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30008,201903,100,162,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30009,201901,100,26,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30009,201902,100,26,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30009,201903,100,26,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30010,201901,100,144,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30010,201902,100,144,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30010,201903,100,144,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30011,201901,100,5,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30011,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30011,201903,100,5,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30012,201901,100,275,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30012,201902,100,275,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30012,201903,100,275,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index e40b6e5b..1180517f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -35,39 +35,39 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 30012,202001,100,0,,0.034032235,1,1,1,1,1.82834015,51.35515875,256,R,0,0,9,,false,true,,true,true,true,true
 30012,202002,100,0,29.38390625,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,false,,true,true,,true,true,true
 30012,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,7402.515486,FIR,0,0,10,,,,,,true,true,true
-30001,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30001,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30001,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30002,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30002,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30002,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30003,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30003,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30003,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30004,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30004,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30004,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30005,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30005,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30005,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30006,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30006,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30006,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30007,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30007,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30007,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30008,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30008,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30008,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30009,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30009,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30009,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30010,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30010,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30010,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30011,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30011,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30011,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
-30012,201901,100,0,,,1,2.656680299,101.7103175,,,,,,,,,,,,,,,,
-30012,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,,,,,,,,,,,,,
-30012,201903,100,0,,,0.968230653,1,70.26136364,,,,,,,,,,,,,,,,
+30001,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30001,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30001,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30002,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30002,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30002,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30003,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30003,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30003,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30004,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30004,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30004,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30005,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30005,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30005,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30006,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30006,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30006,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30007,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30007,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30007,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30008,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30008,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30008,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30009,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30009,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30009,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30010,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30010,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30010,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30011,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30011,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30011,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
+30012,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
+30012,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
+30012,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index c616c14e..6a5e2223 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -99,72 +99,72 @@ trim_threshold = 10
 link_filter = "identifier NOT IN ('110005', '110006', '110007')"
 
 [49_R_R_FI-BI_R_R_50_weight_previous_month]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 1
 
 [50_R_R_FI_50_weight]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
 [51_R_R_FI_80_weight]
-weight = 0.8
+weight = "0.8"
 weight_periodicity_multiplier = 12
 
 [52_BI_BI_R_50_weight]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
 [53_C_FI_FI_50_weight]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
 [54_R_R_FI-BI_R_R_50_weight]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[55_R_R_FI_50_weight]
-weight = 0.5
+[55_R_R_FI_50_weight_default]
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[56_BI_BI_R_50_weight]
-weight = 0.5
+[56_BI_BI_R_50_weight_default]
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[57_C_FI_FI_50_weight]
-weight = 0.5
+[57_C_FI_FI_50_weight_default]
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[58_R_R_FI-BI_R_R_50_weight]
-weight = 0.5
+[58_R_R_FI-BI_R_R_50_weight_partial_default]
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
 [59_class_change_50_weight]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
 [60_BI_BI_R_FI_FI_R_FI_50_weight]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
 [61_R_R_FI-BI_R_R_50_weight_filtered]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 link_filter = "identifier NOT IN ('110009', '110009')"
 
 [62_mixed_data_50_weight]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
 [63_TB_10_R_R_FI-BI_R_R_50_weight]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
 [64_TB_10_C_FI_FI_50_weight]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 
 [65_TB_10_BI_BI_R_50_weight_filtered]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 link_filter = "NOT(identifier = '90003' AND date = '202001')"
 lower_trim = 50
@@ -172,7 +172,7 @@ upper_trim = 50
 trim_threshold = 10
 
 [66_TB_50_50_weight_filtered_partial_default]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 link_filter = "identifier NOT IN ('30001', '30002', '30010')"
 lower_trim = 50
@@ -180,7 +180,7 @@ upper_trim = 50
 trim_threshold = 10
 
 [67_TB_50_50_weight_filtered_full_default]
-weight = 0.5
+weight = "0.5"
 weight_periodicity_multiplier = 12
 link_filter = "identifier NOT IN ('30001', '30002', '30010')"
 lower_trim = 50

From 3a24dd1424a14bd6bd4ec2859117b8de9fe7bbc0 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 17 May 2023 17:00:08 +0100
Subject: [PATCH 334/531] We need people to pass decimals as weights to avoid
 floating point madness

---
 statistical_methods_library/imputation/engine.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index d4ed6170..866f5898 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -5,7 +5,6 @@
 """
 from decimal import Decimal
 from enum import Enum
-from numbers import Number
 from typing import Optional, Union
 
 from pyspark.sql import Column, DataFrame
@@ -68,7 +67,7 @@ def impute(
     back_data_df: Optional[DataFrame] = None,
     link_filter: Optional[Union[str, Column]] = None,
     periodicity: Optional[int] = 1,
-    weight: Optional[Number] = None,
+    weight: Optional[Decimal] = None,
     weight_periodicity_multiplier: Optional[int] = None,
     unweighted_forward_link_col: Optional[str] = "forward_unweighted",
     unweighted_backward_link_col: Optional[str] = "backward_unweighted",
@@ -131,7 +130,10 @@ def impute(
     }
 
     if weight is not None:
-        weight = lit(Decimal(weight))
+        if not isinstance(weight, Decimal):
+            raise TypeError("weight must be of type Decimal")
+
+        weight = lit(weight)
         weight_periodicity = weight_periodicity_multiplier * periodicity
         back_input_params.update(
             {

From d17b31a9acce25af5e2823a44f822c54dff88c10 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 17 May 2023 17:00:35 +0100
Subject: [PATCH 335/531] Configure fields and types in toml

---
 tests/imputation/mean_of_ratios.toml    |  73 ++++++--
 tests/imputation/test_mean_of_ratios.py | 215 +++++-------------------
 2 files changed, 102 insertions(+), 186 deletions(-)

diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 6a5e2223..752f3476 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -1,11 +1,65 @@
+starting_period = "202001"
+back_data_starting_period = "202002"
+
+[field_names]
+auxiliary_col = "other"
+backward_col = "backward"
+forward_col = "forward"
+marker_col = "marker"
+output_col = "output"
+period_col = "date"
+reference_col = "identifier"
+grouping_col = "group"
+target_col = "question"
+construction_col = "construction"
+count_forward_col = "count_forward"
+count_backward_col = "count_backward"
+count_construction_col = "count_construction"
+forward_growth_col = "growth_forward"
+backward_growth_col = "growth_backward"
+default_forward_col = "default_forward"
+default_backward_col = "default_backward"
+default_construction_col = "default_construction"
+link_inclusion_current_col = "link_inclusion_current"
+link_inclusion_previous_col = "link_inclusion_previous"
+link_inclusion_next_col = "link_inclusion_next"
+trimmed_forward_col = "trim_inclusion_forward"
+trimmed_backward_col = "trim_inclusion_backward"
+unweighted_construction_link_col = "unweighted_construction"
+unweighted_backward_link_col = "unweighted_backward"
+unweighted_forward_link_col = "unweighted_forward"
+
+[field_types]
+reference_col = "string"
+period_col = "string"
+grouping_col = "string"
+target_col = "decimal(15,6)"
+auxiliary_col = "decimal(15,6)"
+output_col = "decimal(15,6)"
+marker_col = "string"
+backward_col = "decimal(15,6)"
+forward_col = "decimal(15,6)"
+construction_col = "decimal(15,6)"
+count_forward_col = "long"
+count_backward_col = "long"
+count_construction_col = "long"
+forward_growth_col = "decimal(15,6)"
+backward_growth_col = "decimal(15,6)"
+default_forward_col = "boolean"
+default_backward_col = "boolean"
+default_construction_col = "boolean"
+link_inclusion_current_col = "boolean"
+link_inclusion_previous_col = "boolean"
+link_inclusion_next_col = "boolean"
+trimmed_forward_col = "boolean"
+trimmed_backward_col = "boolean"
+unweighted_construction_link_col = "decimal(15,6)"
+unweighted_backward_link_col = "decimal(15,6)"
+unweighted_forward_link_col = "decimal(15,6)"
+
 [05_R_R_FI_FI_FI_year_span]
 starting_period = "202010"
 
-[19_link_columns]
-forward_link_col = "forward"
-backward_link_col = "backward"
-construction_link_col = "construction"
-
 [26_C_FI_FI_NS_BI_BI_R_filtered]
 link_filter = "identifier != '140005'"
 
@@ -13,9 +67,6 @@ link_filter = "identifier != '140005'"
 link_filter = "identifier NOT IN ('150005', '150006')"
 
 [28_link_columns_filtered]
-forward_link_col = "forward"
-backward_link_col = "backward"
-construction_link_col = "construction"
 link_filter = "identifier != '190007'"
 
 [29_mixed_data_filtered]
@@ -24,10 +75,6 @@ link_filter = "identifier NOT IN ('200013', '200014')"
 [30_class_change_C_C_FI_filtered]
 link_filter = "identifier NOT IN ('230006', '230008')"
 
-[33_partial_link_columns]
-forward_link_col = "forward"
-backward_link_col = "backward"
-
 [35_TB_10_R_R_FI]
 lower_trim = 10
 upper_trim = 10
@@ -98,6 +145,8 @@ trim_threshold = 10
 [48_BI_BI_R-R_R_FI_filtered_default]
 link_filter = "identifier NOT IN ('110005', '110006', '110007')"
 
+# Provide weights as strings here as they'll be converted in the test code
+# to Decimal to avoid floating point to Decimal issues
 [49_R_R_FI-BI_R_R_50_weight_previous_month]
 weight = "0.5"
 weight_periodicity_multiplier = 1
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_mean_of_ratios.py
index 830c83ec..66182964 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_mean_of_ratios.py
@@ -5,146 +5,10 @@
 import pytest
 import toml
 from chispa.dataframe_comparer import assert_df_equality
+from decimal import Decimal
 from pyspark.sql.functions import bround, col
-from pyspark.sql.types import BooleanType, DecimalType, LongType, StringType
-
 from statistical_methods_library.imputation import impute, mean_of_ratios
 
-auxiliary_col = "other"
-backward_col = "backward"
-forward_col = "forward"
-marker_col = "marker"
-output_col = "output"
-period_col = "date"
-reference_col = "identifier"
-grouping_col = "group"
-target_col = "question"
-construction_col = "construction"
-count_forward_col = "count_forward"
-count_backward_col = "count_backward"
-count_construction_col = "count_construction"
-forward_growth_col = "growth_forward"
-backward_growth_col = "growth_backward"
-default_forward_col = "default_forward"
-default_backward_col = "default_backward"
-default_construction_col = "default_construction"
-link_inclusion_current_col = "link_inclusion_current"
-link_inclusion_previous_col = "link_inclusion_previous"
-link_inclusion_next_col = "link_inclusion_next"
-trimmed_forward_col = "trim_inclusion_forward"
-trimmed_backward_col = "trim_inclusion_backward"
-unweighted_construction_link_col = "unweighted_construction"
-unweighted_backward_link_col = "unweighted_backward"
-unweighted_forward_link_col = "unweighted_forward"
-
-decimal_type = DecimalType(15, 6)
-
-reference_type = StringType()
-period_type = StringType()
-grouping_type = StringType()
-target_type = decimal_type
-auxiliary_type = decimal_type
-min_accuracy = decimal_type
-marker_type = StringType()
-backward_type = decimal_type
-forward_type = decimal_type
-construction_type = decimal_type
-count_forward_type = LongType()
-count_backward_type = LongType()
-count_construction_type = LongType()
-forward_growth_type = decimal_type
-backward_growth_type = decimal_type
-default_forward_type = BooleanType()
-default_backward_type = BooleanType()
-default_construction_type = BooleanType()
-link_inclusion_current_type = BooleanType()
-link_inclusion_previous_type = BooleanType()
-link_inclusion_next_type = BooleanType()
-trimmed_forward_type = BooleanType()
-trimmed_backward_type = BooleanType()
-unweighted_construction_link_type = decimal_type
-unweighted_backward_link_type = decimal_type
-unweighted_forward_link_type = decimal_type
-
-# Columns we expect in either our input or output test dataframes and their
-# respective types
-dataframe_columns = (
-    reference_col,
-    period_col,
-    grouping_col,
-    target_col,
-    auxiliary_col,
-    output_col,
-    marker_col,
-    forward_col,
-    backward_col,
-    construction_col,
-    count_forward_col,
-    count_backward_col,
-    count_construction_col,
-    forward_growth_col,
-    backward_growth_col,
-    link_inclusion_previous_col,
-    link_inclusion_next_col,
-    trimmed_forward_col,
-    trimmed_backward_col,
-    default_forward_col,
-    default_backward_col,
-    default_construction_col,
-    link_inclusion_current_col,
-    unweighted_construction_link_col,
-    unweighted_backward_link_col,
-    unweighted_forward_link_col,
-)
-
-dataframe_types = {
-    reference_col: reference_type,
-    period_col: period_type,
-    grouping_col: grouping_type,
-    target_col: target_type,
-    auxiliary_col: auxiliary_type,
-    output_col: min_accuracy,
-    marker_col: marker_type,
-    backward_col: backward_type,
-    forward_col: forward_type,
-    construction_col: construction_type,
-    count_forward_col: count_forward_type,
-    count_backward_col: count_backward_type,
-    count_construction_col: count_construction_type,
-    forward_growth_col: forward_growth_type,
-    backward_growth_col: backward_growth_type,
-    default_forward_col: default_forward_type,
-    default_backward_col: default_backward_type,
-    default_construction_col: default_construction_type,
-    link_inclusion_current_col: link_inclusion_current_type,
-    link_inclusion_previous_col: link_inclusion_previous_type,
-    link_inclusion_next_col: link_inclusion_next_type,
-    trimmed_forward_col: trimmed_forward_type,
-    trimmed_backward_col: trimmed_backward_type,
-    unweighted_construction_link_col: unweighted_construction_link_type,
-    unweighted_backward_link_col: unweighted_backward_link_type,
-    unweighted_forward_link_col: unweighted_forward_link_type,
-}
-
-bad_dataframe_types = dataframe_types.copy()
-bad_dataframe_types[target_col] = reference_type
-
-# Params used when calling impute
-params = {
-    "reference_col": reference_col,
-    "period_col": period_col,
-    "grouping_col": grouping_col,
-    "target_col": target_col,
-    "auxiliary_col": auxiliary_col,
-    "output_col": output_col,
-    "marker_col": marker_col,
-    "ratio_calculator": mean_of_ratios,
-    "starting_period": "202001",
-    "unweighted_construction_link_col": unweighted_construction_link_col,
-    "unweighted_backward_link_col": unweighted_backward_link_col,
-    "unweighted_forward_link_col": unweighted_forward_link_col,
-}
-
 test_scenarios = []
 
 scenario_path_prefix = pathlib.Path(
@@ -167,102 +31,105 @@
     if scenario_type.split("_", 1)[0] in ("dev", "methodology")
 ]
 
-
-# --- Test type validation on the input dataframe(s) ---
-
-
 @pytest.mark.parametrize(
     "scenario_type, scenario",
     test_scenarios,
 )
 def test_calculations(fxt_load_test_csv, scenario_type, scenario):
-    imputation_kwargs = params.copy()
+    with open("tests/imputation/mean_of_ratios.toml", "r") as f:
+        test_params = toml.load(f)
 
+    imputation_kwargs = test_params["field_names"].copy()
+    imputation_kwargs["ratio_calculator"] = mean_of_ratios
     if "back_data_" in scenario_type:
-        imputation_kwargs["starting_period"] = "202002"
-
+        starting_period = test_params["back_data_starting_period"]
+    else:
+        starting_period = test_params["starting_period"]
+
+    scenario_params = test_params.get(scenario, {}).copy()
+    starting_period = scenario_params.pop("starting_period", starting_period)
+    imputation_kwargs.update(scenario_params)
+
+    fields = test_params["field_names"]
+    types = {
+        test_params["field_names"][k]: v
+        for k,v in test_params["field_types"].items()
+    }
     scenario_file_type = scenario_type.replace("back_data_", "")
     scenario_input = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
+        fields.values(),
+        types,
         "imputation",
         "mean_of_ratios",
         scenario_file_type,
         f"{scenario}_input",
     )
     scenario_expected_output = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
+        fields.values(),
+        types,
         "imputation",
         "mean_of_ratios",
         scenario_file_type,
         f"{scenario}_output",
     )
 
-    with open("tests/imputation/mean_of_ratios.toml", "r") as f:
-        new_toml_string = toml.load(f)
-    if scenario in new_toml_string.keys():
-        imputation_kwargs.update(new_toml_string[scenario])
-
+    if "weight" in imputation_kwargs:
+        imputation_kwargs["weight"] = Decimal(imputation_kwargs["weight"])
     back_data_df = scenario_expected_output.filter(
-        col(period_col) < imputation_kwargs["starting_period"]
+        col(fields["period_col"]) < starting_period
     )
 
-    if "filtered" in scenario:
-        back_data_df = back_data_df.withColumn(target_col, col(output_col))
-
     imputation_kwargs["back_data_df"] = back_data_df
 
     scenario_input = scenario_input.filter(
-        col(period_col) >= imputation_kwargs["starting_period"]
+        col(fields["period_col"]) >= starting_period
     )
 
     scenario_expected_output = scenario_expected_output.filter(
-        col(period_col) >= imputation_kwargs["starting_period"]
+        col(fields["period_col"]) >= starting_period
     )
 
     # We need to drop our grouping and auxiliary columns from our output now
     # we've potentially set up our back data as these must not come out of
     # imputation.
     scenario_expected_output = scenario_expected_output.drop(
-        grouping_col,
-        auxiliary_col,
+        fields["grouping_col"],
+        fields["auxiliary_col"],
     )
     scenario_actual_output = impute(input_df=scenario_input, **imputation_kwargs)
 
     scenario_actual_output = (
-        scenario_actual_output.withColumn(output_col, bround(col(output_col), 6))
-        .withColumn(forward_col, bround(col(forward_col), 6))
-        .withColumn(backward_col, bround(col(backward_col).cast(decimal_type), 6))
+        scenario_actual_output.withColumn(fields["output_col"], bround(col(fields["output_col"]), 6))
+        .withColumn(fields["forward_col"], bround(col(fields["forward_col"]), 6))
+        .withColumn(fields["backward_col"], bround(col(fields["backward_col"]), 6))
         .withColumn(
-            construction_col, bround(col(construction_col).cast(decimal_type), 6)
+            fields["construction_col"], bround(col(fields["construction_col"]), 6)
         )
     )
 
     if "link_columns" not in scenario:
         scenario_actual_output = scenario_actual_output.withColumn(
-            forward_growth_col, bround(col(forward_growth_col).cast(decimal_type), 6)
+            fields["forward_growth_col"], bround(col(fields["forward_growth_col"]), 6)
         ).withColumn(
-            backward_growth_col, bround(col(backward_growth_col).cast(decimal_type), 6)
+            fields["backward_growth_col"], bround(col(fields["backward_growth_col"]), 6)
         )
 
     if "weight" in scenario:
         scenario_actual_output = (
             scenario_actual_output.withColumn(
-                unweighted_forward_link_col, bround(col(unweighted_forward_link_col).cast(decimal_type), 6)
+                fields["unweighted_forward_link_col"], bround(col(fields["unweighted_forward_link_col"]), 6)
             )
             .withColumn(
-                unweighted_backward_link_col, bround(col(unweighted_backward_link_col).cast(decimal_type), 6)
+                fields["unweighted_backward_link_col"], bround(col(fields["unweighted_backward_link_col"]), 6)
             )
             .withColumn(
-                unweighted_construction_link_col,
-                bround(col(unweighted_construction_link_col).cast(decimal_type), 6),
+                fields["unweighted_construction_link_col"],
+                bround(col(fields["unweighted_construction_link_col"]), 6),
             )
         )
 
-    select_cols = list(set(dataframe_columns) & set(scenario_expected_output.columns))
-    assert isinstance(scenario_actual_output, type(scenario_input))
-    sort_col_list = [reference_col, period_col]
+    select_cols = list(set(fields.values()) & set(scenario_expected_output.columns))
+    sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]
     assert_df_equality(
         scenario_actual_output.sort(sort_col_list).select(select_cols),
         scenario_expected_output.sort(sort_col_list).select(select_cols),

From 6dcd14a055b6eca15323776bf0978cf93cebe7fa Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 17 May 2023 17:20:52 +0100
Subject: [PATCH 336/531] More Weight Tests. Removed Bad Tests, Will Feedback
 To Ellie.

---
 .../55_R_R_FI_50_weight_default_input.csv     |  13 --
 .../55_R_R_FI_50_weight_default_output.csv    |  25 ---
 .../56_BI_BI_R_50_weight_default_input.csv    |  13 --
 .../56_BI_BI_R_50_weight_default_output.csv   |  25 ---
 .../57_C_FI_FI_50_weight_default_input.csv    |  13 --
 .../57_C_FI_FI_50_weight_default_output.csv   |  25 ---
 ...BI_R_R_50_weight_partial_default_input.csv |  25 ---
 ...I_R_R_50_weight_partial_default_output.csv |  49 ------
 .../59_class_change_50_weight_output.csv      |  14 +-
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv |  36 ++---
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv |  24 +--
 .../62_mixed_data_50_weight_output.csv        |  28 ++--
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 144 +++++++++---------
 tests/imputation/mean_of_ratios.toml          |  24 +--
 14 files changed, 130 insertions(+), 328 deletions(-)
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
deleted file mode 100644
index 2fd5ae2a..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_input.csv
+++ /dev/null
@@ -1,13 +0,0 @@
-identifier,date,group,question,other
-30001,202001,100,8444,51
-30001,202002,100,7476,51
-30001,202003,100,2003,51
-30002,202001,100,9343,72
-30002,202002,100,7818,72
-30002,202003,100,4897,72
-30003,202001,100,7511,7
-30003,202002,100,1761,7
-30003,202003,100,6492,7
-30004,202001,100,64,81
-30004,202002,100,2113,81
-30004,202003,100,,81
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
deleted file mode 100644
index 548ac79e..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_R_R_FI_50_weight_default_output.csv
+++ /dev/null
@@ -1,25 +0,0 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.655006,120.1990521,1,1.591203,85.28422607,8444,R,0,4,4,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7476,R,4,3,4,false,false,false
-30001,202003,100,51,0.267924024,,1.526947,1,103.0154,1.526947,1,96.19575,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,1.655006,120.1991,1,1.591203,85.28425,9343,R,0,4,4,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,7818,R,4,3,4,false,false,false
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.526947,1,96.19575,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,1.655006,120.1991,1,1.591203,85.28425,7511,R,0,4,4,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,1761,R,4,3,4,false,false,false
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.526947,1,96.19575,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,0.030288689,1,1.655006,120.1991,1,1.591203,85.28425,64,R,0,4,4,true,false,false
-30004,202002,100,81,33.015625,,8.743054929,1.407609,90.8436,8.743054929,1.6435545,106.13115,2113,R,4,3,4,false,false,false
-30004,202003,100,81,,,1.526947,1,103.0154,1.526947,1,96.19575,3226.439011,FIR,3,0,3,false,true,false
-30001,201901,100,51,,,1,1.5274,50.3694,,,,0,R,,,,,,
-30001,201902,100,51,,,1,1.8795,121.4187,,,,0,R,,,,,,
-30001,201903,100,51,,,1,1,89.3761,,,,0,R,,,,,,
-30002,201901,100,72,,,1,1.5274,50.3694,,,,0,R,,,,,,
-30002,201902,100,72,,,1,1.8795,121.4187,,,,0,R,,,,,,
-30002,201903,100,72,,,1,1,89.3761,,,,0,R,,,,,,
-30003,201901,100,7,,,1,1.5274,50.3694,,,,0,R,,,,,,
-30003,201902,100,7,,,1,1.8795,121.4187,,,,0,R,,,,,,
-30003,201903,100,7,,,1,1,89.3761,,,,0,R,,,,,,
-30004,201901,100,81,,,1,1.5274,50.3694,,,,0,R,,,,,,
-30004,201902,100,81,,,1,1.8795,121.4187,,,,0,R,,,,,,
-30004,201903,100,81,,,1,1,89.3761,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
deleted file mode 100644
index dd22608a..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_input.csv
+++ /dev/null
@@ -1,13 +0,0 @@
-identifier,date,group,question,other
-60001,202001,100,5077,15
-60001,202002,100,7830,15
-60001,202003,100,1046,15
-60002,202001,100,1588,71
-60002,202002,100,1213,71
-60002,202003,100,3807,71
-60003,202001,100,6541,26
-60003,202002,100,336,26
-60003,202003,100,6351,26
-60004,202001,100,,3
-60004,202002,100,,3
-60004,202003,100,401,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
deleted file mode 100644
index 3374f3b1..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_50_weight_default_output.csv
+++ /dev/null
@@ -1,25 +0,0 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,7.141605449,117.9107143,1,7.141605449,84.14005715,5077,R,0,3,3,true,false,false
-60001,202002,100,15,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,7830,R,3,3,3,false,false,false
-60001,202003,100,15,0.133588761,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,1046,R,3,0,4,false,true,false
-60002,202001,100,71,,1.309150866,1,7.141605449,117.9107143,1,7.141605449,84.14005715,1588,R,0,3,3,true,false,false
-60002,202002,100,71,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1213,R,3,3,3,false,false,false
-60002,202003,100,71,3.138499588,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,3807,R,3,0,4,false,true,false
-60003,202001,100,26,,19.4672619,1,7.141605449,117.9107143,1,7.141605449,84.14005715,6541,R,0,3,3,true,false,false
-60003,202002,100,26,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,336,R,3,3,3,false,false,false
-60003,202003,100,26,18.90178571,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,6351,R,3,0,4,false,true,false
-60004,202001,100,3,,,1,7.141605449,117.9107143,1,7.141605449,84.14005715,7500.429481,BI,0,3,3,true,false,false
-60004,202002,100,3,,,0.785823852,2.619062766,83.74107143,0.877161926,2.619062766,102.5798857,1050.244169,BI,3,3,3,false,false,false
-60004,202003,100,3,,,7.391291354,1,100.9130435,4.252145677,1,95.14457175,401,R,3,0,4,false,true,false
-60001,201901,100,15,,,1,1,50.3694,,,,0,R,,,,,,
-60001,201902,100,15,,,0.9685,1,121.4187,,,,0,R,,,,,,
-60001,201903,100,15,,,1.113,1,89.3761,,,,0,R,,,,,,
-60002,201901,100,71,,,1,1,50.3694,,,,0,R,,,,,,
-60002,201902,100,71,,,0.9685,1,121.4187,,,,0,R,,,,,,
-60002,201903,100,71,,,1.113,1,89.3761,,,,0,R,,,,,,
-60003,201901,100,26,,,1,1,50.3694,,,,0,R,,,,,,
-60003,201902,100,26,,,0.9685,1,121.4187,,,,0,R,,,,,,
-60003,201903,100,26,,,1.113,1,89.3761,,,,0,R,,,,,,
-60004,201901,100,3,,,1,1,50.3694,,,,0,R,,,,,,
-60004,201902,100,3,,,0.9685,1,121.4187,,,,0,R,,,,,,
-60004,201903,100,3,,,1.113,1,89.3761,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
deleted file mode 100644
index 9004a1cc..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_input.csv
+++ /dev/null
@@ -1,13 +0,0 @@
-identifier,date,group,question,other
-30001,202001,100,8444,51
-30001,202002,100,7476,51
-30001,202003,100,2003,51
-30002,202001,100,9343,72
-30002,202002,100,7818,72
-30002,202003,100,4897,72
-30003,202001,100,7511,7
-30003,202002,100,1761,7
-30003,202003,100,6492,7
-30004,202001,100,,81
-30004,202002,100,,81
-30004,202003,100,,81
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
deleted file mode 100644
index 4c17f94b..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_C_FI_FI_50_weight_default_output.csv
+++ /dev/null
@@ -1,25 +0,0 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,2.196577972,194.6,1,2.062742377,194.6,8444,R,0,3,3,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7476,R,3,3,3,false,false,false
-30001,202003,100,51,0.267924024,,1.526946931,1,103.0154,1.444157545,1,103.0154,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,2.196577972,194.6,1,2.062742377,194.6,9343,R,0,3,3,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,7818,R,3,3,3,false,false,false
-30002,202003,100,72,0.626375032,,1.526947,1,103.0154,1.4441576,1,103.0154,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,2.196577972,194.6,1,2.062742377,194.6,7511,R,0,3,3,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,1761,R,3,3,3,false,false,false
-30003,202003,100,7,3.686541738,,1.526947,1,103.0154,1.4441576,1,103.0154,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,,1,2.196577972,194.6,1,2.062742377,194.6,15762.6,C,0,3,3,true,false,false
-30004,202002,100,81,,,0.652198238,1.866715325,90.8436,0.71545859,1.86927226,90.8436,11277.48757,FIC,3,3,3,false,false,false
-30004,202003,100,81,,,1.526947,1,103.0154,1.4441576,1,103.0154,16286.46938,FIC,3,0,3,false,true,false
-30001,201901,100,51,,,1,1.5274,1,,,,0,R,,,,,,
-30001,201902,100,51,,,0.9685,1.8795,1,,,,0,R,,,,,,
-30001,201903,100,51,,,1.113,1,1,,,,0,R,,,,,,
-30002,201901,100,72,,,1,1.5274,1,,,,0,R,,,,,,
-30002,201902,100,72,,,0.9685,1.8795,1,,,,0,R,,,,,,
-30002,201903,100,72,,,1.113,1,1,,,,0,R,,,,,,
-30003,201901,100,7,,,1,1.5274,1,,,,0,R,,,,,,
-30003,201902,100,7,,,0.9685,1.8795,1,,,,0,R,,,,,,
-30003,201903,100,7,,,1.113,1,1,,,,0,R,,,,,,
-30004,201901,100,81,,,1,1.5274,1,,,,0,R,,,,,,
-30004,201902,100,81,,,0.9685,1.8795,1,,,,0,R,,,,,,
-30004,201903,100,81,,,1.113,1,1,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
deleted file mode 100644
index 97acb466..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_input.csv
+++ /dev/null
@@ -1,25 +0,0 @@
-identifier,date,group,question,other
-110001,202001,100,9244,89
-110001,202002,100,8916,89
-110001,202003,100,6194,89
-110002,202001,100,4826,83
-110002,202002,100,5903,83
-110002,202003,100,4743,83
-110003,202001,100,7586,4
-110003,202002,100,1016,4
-110003,202003,100,1429,4
-110004,202001,100,3975,76
-110004,202002,100,3044,76
-110004,202003,100,,76
-110005,202001,200,5217,27
-110005,202002,200,7016,27
-110005,202003,200,9940,27
-110006,202001,200,5325,42
-110006,202002,200,7747,42
-110006,202003,200,6685,42
-110007,202001,200,5496,19
-110007,202002,200,1010,19
-110007,202003,200,1235,19
-110008,202001,200,,43
-110008,202002,200,3913,43
-110008,202003,200,6013,43
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
deleted file mode 100644
index cc71dcce..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_R_R_FI-BI_R_R_50_weight_partial_default_output.csv
+++ /dev/null
@@ -1,49 +0,0 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.290844366,144.865,5217,R,0,3,3,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7016,R,3,4,4,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.290844366,144.865,5325,R,0,3,3,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,7747,R,3,4,4,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.290844366,144.865,5496,R,0,3,3,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,1010,R,3,4,4,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.290844366,144.865,8964.074004,BI,0,3,3,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.833317149,102.4888332,3913,R,3,4,4,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,0,R,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,0,R,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,0,R,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,0,R,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,0,R,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,0,R,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,0,R,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,0,R,,,,,,
-110005,201901,200,27,,,1,1,107.48,,,,0,R,,,,,,
-110005,201902,200,27,,,1.377938182,1,54.70285714,,,,0,R,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
-110006,201901,200,42,,,1,1,107.48,,,,0,R,,,,,,
-110006,201902,200,42,,,1.377938182,1,54.70285714,,,,0,R,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
-110007,201901,200,19,,,1,1,107.48,,,,0,R,,,,,,
-110007,201902,200,19,,,1.377938182,1,54.70285714,,,,0,R,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
-110008,201901,200,43,,,1,1,107.48,,,,0,R,,,,,,
-110008,201902,200,43,,,1.377938182,1,54.70285714,,,,0,R,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index a9118669..bf82ec9b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,19 +1,19 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.44490234,547,R,0,2,3,true,false,false
+210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.444903,547,R,0,2,3,true,false,false
 210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,false,false,false
-210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,895,R,2,0,2,false,true,false
-210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.44490234,381,R,0,2,3,true,false,false
+210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195578,1,44.372349,895,R,2,0,2,false,true,false
+210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.444903,381,R,0,2,3,true,false,false
 210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,false,false,false
-210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195577487,1,44.37234849,214,R,2,0,2,false,true,false
+210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195578,1,44.372349,214,R,2,0,2,false,true,false
 210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,true,false,false
 210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,false,false,false
 210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,false,true,false
 210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,true,false,false
 210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,false,false,false
 210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,false,true,false
-210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.44490234,100,R,0,2,3,true,false,false
-210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.044711,C,2,2,2,false,false,false
-210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577671,FIC,2,0,2,false,true,false
+210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.444903,100,R,0,2,3,true,false,false
+210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.04471,C,2,2,2,false,false,false
+210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577394,FIC,2,0,2,false,true,false
 210001,201901,1,10,,,1,2.656680299,101.7103175,,,,0,R,,,,,,
 210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,
 210001,201903,1,10,,,0.968230653,1,70.26136364,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
index 869427e7..f0f5ea87 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
@@ -1,32 +1,32 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
 70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,true,false,false
-70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,false,false,false
-70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,734,R,3,3,4,false,false,false
-70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,96,R,3,3,3,false,false,false
+70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.760865,1.151252,27.851429,1814,R,3,3,3,false,false,false
+70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,734,R,3,3,4,false,false,false
+70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,96,R,3,3,3,false,false,false
 70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,false,false,false
 70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,false,false,false
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,false,true,false
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.296674,1,35.62,49,R,3,0,3,false,true,false
 70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,true,false,false
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,false,false,false
-70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5361,R,3,3,4,false,false,false
-70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,8767,R,3,3,3,false,false,false
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.760865,1.151252,27.851429,48,R,3,3,3,false,false,false
+70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,5361,R,3,3,4,false,false,false
+70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,8767,R,3,3,3,false,false,false
 70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,false,false,false
 70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,false,false,false
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,false,true,false
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.296674,1,35.62,3475,R,3,0,3,false,true,false
 70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,true,false,false
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,false,false,false
-70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,5403,R,3,3,4,false,false,false
-70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7445,R,3,3,3,false,false,false
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.760865,1.151252,27.851429,7711,R,3,3,3,false,false,false
+70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,5403,R,3,3,4,false,false,false
+70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,7445,R,3,3,3,false,false,false
 70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,false,false,false
 70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,false,false,false
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,false,true,false
-70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.0564,BI,0,3,3,true,false,false
-70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.147856,BI,3,3,3,false,false,false
-70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.497175493,84.26327851,6288,R,3,3,4,false,false,false
-70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.44944447,7768.64643,FIR,3,3,3,false,false,false
-70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.3954,FIR,3,3,3,false,false,false
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.296674,1,35.62,8768,R,3,0,3,false,true,false
+70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,178924.807638,BI,0,3,3,true,false,false
+70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.760865,1.151252,27.851429,7239.073928,BI,3,3,3,false,false,false
+70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,6288,R,3,3,4,false,false,false
+70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,7768.645424,FIR,3,3,3,false,false,false
+70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.380507,FIR,3,3,3,false,false,false
 70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,false,false,false
-70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924059,FIR,3,0,3,false,true,false
+70004,202007,100,6,,,1.593348776,1,70.24,1.296674,1,35.62,7617.962031,FIR,3,0,3,false,true,false
 70001,201901,100,39,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
 70001,201902,100,39,,,1,1,1,,,,0,R,,,,,,
 70001,201903,100,39,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index 562a67e9..ad637cda 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -1,14 +1,14 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_next,link_inclusion_previous,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.09204015,76.03985875,9244,R,0,4,4,true,,true,true,false,false
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,1,2.09204015,76.03985875,9244,R,0,4,4,true,,true,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.09204015,76.03985875,4826,R,0,4,4,true,,true,true,false,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,1,2.09204015,76.03985875,4826,R,0,4,4,true,,true,true,false,false
 110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,true,false,false,false
 110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.09204015,76.03985875,7586,R,0,4,4,true,,true,true,false,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,1,2.09204015,76.03985875,7586,R,0,4,4,true,,true,true,false,false
 110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,true,false,false,false
 110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.09204015,76.03985875,3975,R,0,4,4,true,,true,true,false,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,1,2.09204015,76.03985875,3975,R,0,4,4,true,,true,true,false,false
 110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,true,,false,false,false
 110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,false,true,false
 110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,,true,true,false,false
@@ -20,21 +20,21 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,,true,true,false,false
 110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,true,false,false,false
 110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,true,,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,2942.431489,BI,0,3,3,,,,true,false,false
+110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,10340.484733,BI,0,3,3,,,,true,false,false
 110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,true,,true,false,false,false
 110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,true,,false,true,false
-110009,202001,100,85,,,1,2.656680299,101.7103175,1,2.09204015,76.03985875,150000,R,0,4,4,false,,false,true,false,false
+110009,202001,100,85,,,1,2.656680299,101.710317,1,2.09204015,76.03985875,150000,R,0,4,4,false,,false,true,false,false
 110009,202002,100,85,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,false,false,false,false,false,false
 110009,202003,100,85,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,120000,R,3,0,3,false,false,,false,true,false
-110010,202001,100,71,,,1,2.656680299,101.7103175,1,2.09204015,76.03985875,5398.829971,C,0,4,4,,,,true,false,false
-110010,202002,100,71,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.92741,FIC,4,3,4,,,,false,false,false
-110010,202003,100,71,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4888.735268,FIC,3,0,3,,,,false,true,false
+110010,202001,100,71,,,1,2.656680299,101.710317,1,2.09204015,76.03985875,5398.82997,C,0,4,4,,,,true,false,false
+110010,202002,100,71,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.927407,FIC,4,3,4,,,,false,false,false
+110010,202003,100,71,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4888.735263,FIC,3,0,3,,,,false,true,false
 110011,202001,200,85,,,1,2.290844366,182.25,1,2.642597676,144.865,150000,R,0,3,3,false,,false,true,false,false
 110011,202002,200,85,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,false,false,false,false,false,false
 110011,202003,200,85,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,120000,R,4,0,4,false,false,,false,true,false
 110012,202001,200,71,,,1,2.290844366,182.25,1,2.642597676,144.865,10285.415,C,0,3,3,,,,true,false,false
-110012,202002,200,71,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.65259,FIC,3,4,4,,,,false,false,false
-110012,202003,200,71,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,13496.15416,FIC,4,0,4,,,,false,true,false
+110012,202002,200,71,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.651655,FIC,3,4,4,,,,false,false,false
+110012,202003,200,71,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,13496.155388,FIC,4,0,4,,,,false,true,false
 110001,201901,100,89,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
 110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
 110001,201903,100,89,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index f50e77b3..245ebacf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.7103175,1,2.374360225,88.87508813,9244,R,0,4,4,true,false,false
+110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,1,2.374360225,88.87508813,9244,R,0,4,4,true,false,false
 110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,false,false,false
 110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.7103175,1,2.374360225,88.87508813,4826,R,0,4,4,true,false,false
+110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,1,2.374360225,88.87508813,4826,R,0,4,4,true,false,false
 110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,false,false,false
 110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.7103175,1,2.374360225,88.87508813,7586,R,0,4,4,true,false,false
+110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,1,2.374360225,88.87508813,7586,R,0,4,4,true,false,false
 110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,false,false,false
 110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.7103175,1,2.374360225,88.87508813,3975,R,0,4,4,true,false,false
+110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,1,2.374360225,88.87508813,3975,R,0,4,4,true,false,false
 110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463582,FIR,3,0,3,false,true,false
-110005,202001,200,27,,,1,1,1,1,1.821298838,72.9325,9940,BI,0,0,0,true,true,true
-110005,202002,200,27,,,1,1,1,1.093104537,0.875981535,51.7444166,9940,BI,0,0,0,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,1.053091487,1,254.1995327,9940,R,0,0,1,true,true,true
-110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,true,true
-110006,202002,200,42,,,1,1,1,1.093104537,0.875981535,51.7444166,5325,FIR,0,0,0,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,1.053091487,1,254.1995327,5325,FIR,0,0,1,true,true,true
-110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,true,true,true
-110007,202002,200,19,,,1,1,1,1.093104537,0.875981535,51.7444166,2820.954967,FIC,0,0,0,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,1.053091487,1,254.1995327,2970.72366,FIC,0,0,1,true,true,true
+110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463084,FIR,3,0,3,false,true,false
+110005,202001,200,27,,,1,1,126.785714,1,1.821298838,135.825357,15858.516846,BI,0,0,1,true,true,false
+110005,202002,200,27,,,1,1,1,1.093104,0.875981535,51.7444166,8707.25611,BI,0,0,0,true,true,true
+110005,202003,200,27,,,1,1,368.1481481,1.053092,1,254.1995327,9940,R,0,0,1,true,true,false
+110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,true,false
+110006,202002,200,42,,,1,1,1,1.093104,0.875981535,51.7444166,5820.781462,FIR,0,0,0,true,true,true
+110006,202003,200,42,,,1,1,368.1481481,1.053092,1,254.1995327,6129.815482,FIR,0,0,1,true,true,false
+110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,true,true,false
+110007,202002,200,19,,,1,1,1,1.093104,0.875981535,51.7444166,2820.954873,FIC,0,0,0,true,true,true
+110007,202003,200,19,,,1,1,368.1481481,1.053092,1,254.1995327,2970.723599,FIC,0,0,1,true,true,false
 110001,201901,100,89,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
 110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
 110001,201903,100,89,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 60689c7b..996f17e1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,76 +1,76 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.036787797,1,2.076255394,107.1910333,1,2.359426535,126.0280167,9244,R,0,10,12,,true,true,false,false
-80001,202002,100,89,0.964517525,1.43945754,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,8916,R,10,9,12,true,true,false,false,false
-80001,202003,100,89,0.694706146,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6194,R,9,0,11,true,,false,true,false
-80002,202001,100,83,,0.817550398,1,2.076255394,107.1910333,1,2.359426535,126.0280167,4826,R,0,10,12,,true,true,false,false
-80002,202002,100,83,1.223166183,1.244570947,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,5903,R,10,9,12,true,true,false,false,false
-80002,202003,100,83,0.803489751,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4743,R,9,0,11,true,,false,true,false
-80003,202001,100,4,,7.466535433,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7586,R,0,10,12,,true,true,false,false
-80003,202002,100,4,0.133930925,0.710986704,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,1016,R,10,9,12,true,true,false,false,false
-80003,202003,100,4,1.406496063,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1429,R,9,0,11,true,,false,true,false
-80004,202001,100,76,,1.305847569,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3975,R,0,10,12,,true,true,false,false
-80004,202002,100,76,0.765786164,0.82875034,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3044,R,10,9,12,true,true,false,false,false
-80004,202003,100,76,1.206636005,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3673,R,9,0,11,true,,false,true,false
-80005,202001,100,18,,0.622072678,1,2.076255394,107.1910333,1,2.359426535,126.0280167,1941,R,0,10,12,,false,true,false,false
-80005,202002,100,18,1.607529208,2.583641738,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3121,R,10,9,12,false,false,false,false,false
-80005,202003,100,18,0.387050567,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,1208,R,9,0,11,true,,false,true,false
-80006,202001,100,94,,0.763047038,1,2.076255394,107.1910333,1,2.359426535,126.0280167,5405,R,0,10,12,,true,true,false,false
-80006,202002,100,94,1.310535196,1.422366796,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,7084,R,10,9,12,true,true,false,false,false
-80006,202003,100,94,0.703053532,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4980,R,9,0,11,true,,false,true,false
-80007,202001,100,8,,5.333239595,1,2.076255394,107.1910333,1,2.359426535,126.0280167,15172,R,0,10,12,,true,true,false,false
-80007,202002,100,8,0.187503296,0.812556233,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,2845,R,10,9,12,true,true,false,false,false
-80007,202003,100,8,1.230684055,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,3501,R,9,0,11,true,,false,true,false
-80008,202001,100,304,,1.129530598,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,false,false
-80008,202002,100,304,0.885323516,1.009357249,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,14429,R,10,9,12,true,true,false,false,false
-80008,202003,100,304,0.990729498,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,14295,R,9,0,11,true,,false,true,false
-80009,202001,100,45,,0.740562712,1,2.076255394,107.1910333,1,2.359426535,126.0280167,3698,R,0,10,12,,true,true,false,false
-80009,202002,100,45,1.350324535,1.185435621,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,4993,R,10,9,12,true,true,false,false,false
-80009,202003,100,45,0.843571749,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,4212,R,9,0,11,true,,false,true,false
-80010,202001,100,100,,0.760511998,1,2.076255394,107.1910333,1,2.359426535,126.0280167,7722,R,0,10,12,,true,true,false,false
-80010,202002,100,100,1.314903647,1.551204368,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,10153,R,10,9,12,true,true,false,false,false
-80010,202003,100,100,0.644660382,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,6545,R,9,0,11,false,,false,true,false
-80011,202001,100,19,,8.365866031,1,2.076255394,107.1910333,1,2.359426535,126.0280167,30344,R,0,10,12,,false,true,false,false
-80011,202002,100,19,0.119533351,0.497690693,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,3627,R,10,9,12,false,false,false,false,false
-80011,202003,100,19,2.00928009,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,7288,R,9,0,11,false,,false,true,false
-80012,202001,100,304,,1.408940798,1,2.076255394,107.1910333,1,2.359426535,126.0280167,16298,R,0,10,12,,true,true,false,false
-80012,202002,100,304,0.70975303,,0.884574402,1.133853978,67.10794565,1.035391738,0.942908524,84.79838943,11567,R,10,9,12,true,,false,false,false
-80012,202003,100,304,,,0.918490819,1,69.22002885,1.012336896,1,104.7354731,11709.70088,FIR,9,0,11,,,false,true,false
-80013,202001,200,54,,1.106799294,1,1.313944665,186.8459267,1,1.702992408,131.4428927,20190,R,0,9,11,,true,true,false,false
-80013,202002,200,54,0.903506178,0.632817595,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18242,R,9,10,12,true,true,false,false,false
-80013,202003,200,54,1.58023419,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,28826,R,10,0,12,true,,false,true,false
-80014,202001,200,47,,0.845985046,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4260,R,0,9,11,,true,true,false,false
-80014,202002,200,42,1.182053991,0.776557765,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,5036,R,9,10,12,true,true,false,false,false
-80014,202003,200,42,1.28773421,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,6484,R,10,0,12,true,,false,true,false
-80015,202001,200,57,,3.886845827,1,1.313944665,186.8459267,1,1.702992408,131.4428927,19236,R,0,9,11,,false,true,false,false
-80015,202002,200,57,0.25727802,1.396267404,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,4949,R,9,10,12,false,true,false,false,false
-80015,202003,200,57,0.716195191,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,3544,R,10,0,12,true,,false,true,false
-80016,202001,200,163,,0.906730921,1,1.313944665,186.8459267,1,1.702992408,131.4428927,14902,R,0,9,11,,true,true,false,false
-80016,202002,200,163,1.102863018,0.666628808,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,16435,R,9,10,12,true,true,false,false,false
-80016,202003,200,163,1.500085186,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,24653,R,10,0,12,true,,false,true,false
-80017,202001,200,149,,0.702275751,1,1.313944665,186.8459267,1,1.702992408,131.4428927,35476,R,0,9,11,,true,true,false,false
-80017,202002,200,149,1.42394209,0.944611909,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,50515,R,9,10,12,true,true,false,false,false
-80017,202003,200,149,1.058635817,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,53477,R,10,0,12,true,,false,true,false
-80018,202001,200,126,,0.543204684,1,1.313944665,186.8459267,1,1.702992408,131.4428927,13845,R,0,9,11,,true,true,false,false
-80018,202002,200,126,1.840926688,0.929916997,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,25488,R,9,10,12,true,true,false,false,false
-80018,202003,200,126,1.075364795,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,27409,R,10,0,12,true,,false,true,false
-80019,202001,200,6,,2.530969376,1,1.313944665,186.8459267,1,1.702992408,131.4428927,1099,R,0,9,11,,true,true,false,false
-80019,202002,200,6,0.395105531,3.51659919,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,434,R,9,10,12,true,false,false,false,false
-80019,202003,200,6,0.284365646,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,124,R,10,0,12,false,,false,true,false
-80020,202001,200,22,,1.677715809,1,1.313944665,186.8459267,1,1.702992408,131.4428927,3348,R,0,9,11,,true,true,false,false
-80020,202002,200,22,0.596048505,0.395102278,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1996,R,9,10,12,true,false,false,false,false
-80020,202003,200,22,2.530990214,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,5051,R,10,0,12,false,,false,true,false
-80021,202001,200,108,,0.855047659,1,1.313944665,186.8459267,1,1.702992408,131.4428927,29215,R,0,9,11,,true,true,false,false
-80021,202002,200,108,1.169525453,0.554422016,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,34168,R,9,10,12,true,true,false,false,false
-80021,202003,200,108,1.803680177,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,61628,R,10,0,12,true,,false,true,false
-80022,202001,200,67,,0.502948427,1,1.313944665,186.8459267,1,1.702992408,131.4428927,6390,R,0,9,11,,false,true,false,false
-80022,202002,200,67,1.98827543,1.061751691,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,12705,R,9,10,12,true,false,false,false,false
-80022,202003,200,67,0.9418398,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,11966,R,10,0,12,true,,false,true,false
-80023,202001,200,18,,2.656773442,1,1.313944665,186.8459267,1,1.702992408,131.4428927,4562,R,0,9,11,,true,true,false,false
-80023,202002,200,18,0.376396415,0.724105938,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,1717,R,9,10,12,true,true,false,false,false
-80023,202003,200,18,1.381013395,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,2371,R,10,0,12,true,,false,true,false
-80024,202001,200,155,,,1,1.313944665,186.8459267,1,1.702992408,131.4428927,31985.6034,BI,0,9,11,,,true,false,false
-80024,202002,200,155,,0.892466323,0.998929763,0.857954645,197.1492703,0.934552432,1.181770255,147.6584768,18782,R,9,10,12,,true,false,false,false
-80024,202003,200,155,1.120490459,,1.246527322,1,255.2315185,1.143571325,1,167.5251252,21046,R,10,0,12,true,,false,true,false
+80001,202001,100,89,,1.036787797,1,2.076231,107.088287,1,2.359415,125.976643,9244,R,0,10,12,,true,true,false,false
+80001,202002,100,89,0.964517525,1.43945754,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,8916,R,10,9,12,true,true,false,false,false
+80001,202003,100,89,0.694706146,,0.947092,1,69.128571,1.026638,1,104.689744,6194,R,9,0,11,true,,false,true,false
+80002,202001,100,83,,0.817550398,1,2.076231,107.088287,1,2.359415,125.976643,4826,R,0,10,12,,true,true,false,false
+80002,202002,100,83,1.223166183,1.244570947,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,5903,R,10,9,12,true,true,false,false,false
+80002,202003,100,83,0.803489751,,0.947092,1,69.128571,1.026638,1,104.689744,4743,R,9,0,11,true,,false,true,false
+80003,202001,100,4,,7.466535433,1,2.076231,107.088287,1,2.359415,125.976643,7586,R,0,10,12,,true,true,false,false
+80003,202002,100,4,0.133930925,0.710986704,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,1016,R,10,9,12,true,true,false,false,false
+80003,202003,100,4,1.406496063,,0.947092,1,69.128571,1.026638,1,104.689744,1429,R,9,0,11,true,,false,true,false
+80004,202001,100,76,,1.305847569,1,2.076231,107.088287,1,2.359415,125.976643,3975,R,0,10,12,,true,true,false,false
+80004,202002,100,76,0.765786164,0.82875034,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3044,R,10,9,12,true,true,false,false,false
+80004,202003,100,76,1.206636005,,0.947092,1,69.128571,1.026638,1,104.689744,3673,R,9,0,11,true,,false,true,false
+80005,202001,100,18,,0.621916,1,2.076231,107.088287,1,2.359415,125.976643,1941,R,0,10,12,,false,true,false,false
+80005,202002,100,18,1.607934,2.583609,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3121,R,10,9,12,false,false,false,false,false
+80005,202003,100,18,0.387055,,0.947092,1,69.128571,1.026638,1,104.689744,1208,R,9,0,11,false,,false,true,false
+80006,202001,100,94,,0.762987,1,2.076231,107.088287,1,2.359415,125.976643,5405,R,0,10,12,,true,true,false,false
+80006,202002,100,94,1.310638,1.42249,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,7084,R,10,9,12,true,true,false,false,false
+80006,202003,100,94,0.702993,,0.947092,1,69.128571,1.026638,1,104.689744,4980,R,9,0,11,true,,false,true,false
+80007,202001,100,8,,5.332865,1,2.076231,107.088287,1,2.359415,125.976643,15172,R,0,10,12,,true,true,false,false
+80007,202002,100,8,0.187516,0.812625,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,2845,R,10,9,12,true,true,false,false,false
+80007,202003,100,8,1.23058,,0.947092,1,69.128571,1.026638,1,104.689744,3501,R,9,0,11,true,,false,true,false
+80008,202001,100,304,,1.129530598,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
+80008,202002,100,304,0.885323,1.009374,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,14429,R,10,9,12,true,true,false,false,false
+80008,202003,100,304,0.990713,,0.947092,1,69.128571,1.026638,1,104.689744,14295,R,9,0,11,true,,false,true,false
+80009,202001,100,45,,0.740637,1,2.076231,107.088287,1,2.359415,125.976643,3698,R,0,10,12,,true,true,false,false
+80009,202002,100,45,1.350189,1.185423,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,4993,R,10,9,12,true,true,false,false,false
+80009,202003,100,45,0.843581,,0.947092,1,69.128571,1.026638,1,104.689744,4212,R,9,0,11,true,,false,true,false
+80010,202001,100,100,,0.760563,1,2.076231,107.088287,1,2.359415,125.976643,7722,R,0,10,12,,true,true,false,false
+80010,202002,100,100,1.314815,1.551261,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,10153,R,10,9,12,true,true,false,false,false
+80010,202003,100,100,0.644637,,0.947092,1,69.128571,1.026638,1,104.689744,6545,R,9,0,11,true,,false,true,false
+80011,202001,100,19,,8.366143,1,2.076231,107.088287,1,2.359415,125.976643,30344,R,0,10,12,,false,true,false,false
+80011,202002,100,19,0.119529,0.497667,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3627,R,10,9,12,false,false,false,false,false
+80011,202003,100,19,2.009374,,0.947092,1,69.128571,1.026638,1,104.689744,7288,R,9,0,11,false,,false,true,false
+80012,202001,100,304,,1.409008,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
+80012,202002,100,304,0.709719,,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,11567,R,10,9,12,true,,false,false,false
+80012,202003,100,304,,,0.947092,1,69.128571,1.026638,1,104.689744,11875.118407,FIR,9,0,11,,,false,true,false
+80013,202001,200,54,,1.106787,1,1.314057,186.686659,1,1.703049,131.363259,20190,R,0,9,11,,true,true,false,false
+80013,202002,200,54,0.903517,0.632831,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18242,R,9,10,12,true,true,false,false,false
+80013,202003,200,54,1.5802,,1.246482,1,254.993795,1.143548,1,167.406264,28826,R,10,0,12,true,,false,true,false
+80014,202001,200,47,,0.845909,1,1.314057,186.686659,1,1.703049,131.363259,4260,R,0,9,11,,true,true,false,false
+80014,202002,200,42,1.18216,0.776681,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,5036,R,9,10,12,true,true,false,false,false
+80014,202003,200,42,1.28753,,1.246482,1,254.993795,1.143548,1,167.406264,6484,R,10,0,12,true,,false,true,false
+80015,202001,200,57,,3.886845827,1,1.314057,186.686659,1,1.703049,131.363259,19236,R,0,9,11,,false,true,false,false
+80015,202002,200,57,0.25727802,1.396445,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,4949,R,9,10,12,false,true,false,false,false
+80015,202003,200,57,0.716104,,1.246482,1,254.993795,1.143548,1,167.406264,3544,R,10,0,12,true,,false,true,false
+80016,202001,200,163,,0.906723,1,1.314057,186.686659,1,1.703049,131.363259,14902,R,0,9,11,,true,true,false,false
+80016,202002,200,163,1.102872,0.666653,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,16435,R,9,10,12,true,true,false,false,false
+80016,202003,200,163,1.50003,,1.246482,1,254.993795,1.143548,1,167.406264,24653,R,10,0,12,true,,false,true,false
+80017,202001,200,149,,0.702286,1,1.314057,186.686659,1,1.703049,131.363259,35476,R,0,9,11,,true,true,false,false
+80017,202002,200,149,1.42392,0.944612,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,50515,R,9,10,12,true,true,false,false,false
+80017,202003,200,149,1.058635817,,1.246482,1,254.993795,1.143548,1,167.406264,53477,R,10,0,12,true,,false,true,false
+80018,202001,200,126,,0.543197,1,1.314057,186.686659,1,1.703049,131.363259,13845,R,0,9,11,,true,true,false,false
+80018,202002,200,126,1.840953,0.929914,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,25488,R,9,10,12,true,true,false,false,false
+80018,202003,200,126,1.075369,,1.246482,1,254.993795,1.143548,1,167.406264,27409,R,10,0,12,true,,false,true,false
+80019,202001,200,6,,2.532258,1,1.314057,186.686659,1,1.703049,131.363259,1099,R,0,9,11,,true,true,false,false
+80019,202002,200,6,0.394904,3.5,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,434,R,9,10,12,true,false,false,false,false
+80019,202003,200,6,0.285714,,1.246482,1,254.993795,1.143548,1,167.406264,124,R,10,0,12,false,,false,true,false
+80020,202001,200,22,,1.677355,1,1.314057,186.686659,1,1.703049,131.363259,3348,R,0,9,11,,true,true,false,false
+80020,202002,200,22,0.596177,0.395169,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1996,R,9,10,12,true,false,false,false,false
+80020,202003,200,22,2.530561,,1.246482,1,254.993795,1.143548,1,167.406264,5051,R,10,0,12,false,,false,true,false
+80021,202001,200,108,,0.85504,1,1.314057,186.686659,1,1.703049,131.363259,29215,R,0,9,11,,true,true,false,false
+80021,202002,200,108,1.169536,0.554423,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,34168,R,9,10,12,true,true,false,false,false
+80021,202003,200,108,1.803676,,1.246482,1,254.993795,1.143548,1,167.406264,61628,R,10,0,12,true,,false,true,false
+80022,202001,200,67,,0.502952,1,1.314057,186.686659,1,1.703049,131.363259,6390,R,0,9,11,,false,true,false,false
+80022,202002,200,67,1.988263,1.061758,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,12705,R,9,10,12,false,true,false,false,false
+80022,202003,200,67,0.941834,,1.246482,1,254.993795,1.143548,1,167.406264,11966,R,10,0,12,true,,false,true,false
+80023,202001,200,18,,2.65696,1,1.314057,186.686659,1,1.703049,131.363259,4562,R,0,9,11,,true,true,false,false
+80023,202002,200,18,0.37637,0.724167,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1717,R,9,10,12,true,true,false,false,false
+80023,202003,200,18,1.380897,,1.246482,1,254.993795,1.143548,1,167.406264,2371,R,10,0,12,true,,false,true,false
+80024,202001,200,155,,,1,1.314057,186.686659,1,1.703049,131.363259,31986.659101,BI,0,9,11,,,true,false,false
+80024,202002,200,155,,0.892426,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18782,R,9,10,12,,true,false,false,false
+80024,202003,200,155,1.120541,,1.246482,1,254.993795,1.143548,1,167.406264,21046,R,10,0,12,true,,false,true,false
 80001,201901,100,89,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
 80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
 80001,201903,100,89,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 752f3476..58851a30 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -171,22 +171,6 @@ weight_periodicity_multiplier = 12
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[55_R_R_FI_50_weight_default]
-weight = "0.5"
-weight_periodicity_multiplier = 12
-
-[56_BI_BI_R_50_weight_default]
-weight = "0.5"
-weight_periodicity_multiplier = 12
-
-[57_C_FI_FI_50_weight_default]
-weight = "0.5"
-weight_periodicity_multiplier = 12
-
-[58_R_R_FI-BI_R_R_50_weight_partial_default]
-weight = "0.5"
-weight_periodicity_multiplier = 12
-
 [59_class_change_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
@@ -198,7 +182,7 @@ weight_periodicity_multiplier = 12
 [61_R_R_FI-BI_R_R_50_weight_filtered]
 weight = "0.5"
 weight_periodicity_multiplier = 12
-link_filter = "identifier NOT IN ('110009', '110009')"
+link_filter = "identifier NOT IN ('110009', '110011')"
 
 [62_mixed_data_50_weight]
 weight = "0.5"
@@ -207,10 +191,16 @@ weight_periodicity_multiplier = 12
 [63_TB_10_R_R_FI-BI_R_R_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
 
 [64_TB_10_C_FI_FI_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
 
 [65_TB_10_BI_BI_R_50_weight_filtered]
 weight = "0.5"

From 57bd62e50688a6227ed968b68211fc713962cf61 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 17 May 2023 17:56:06 +0100
Subject: [PATCH 337/531] Now imputation methodology scenarios are fully
 configurable use a single test runner for mean of ratios and ratio of means

---
 tests/imputation/default.toml                 |  58 +++++
 tests/imputation/mean_of_ratios.toml          |  59 -----
 tests/imputation/ratio_of_means.toml          |   8 -
 tests/imputation/test_ratio_of_means.py       | 209 ------------------
 ...st_mean_of_ratios.py => test_scenarios.py} |  76 +++----
 5 files changed, 84 insertions(+), 326 deletions(-)
 create mode 100644 tests/imputation/default.toml
 delete mode 100644 tests/imputation/test_ratio_of_means.py
 rename tests/imputation/{test_mean_of_ratios.py => test_scenarios.py} (50%)

diff --git a/tests/imputation/default.toml b/tests/imputation/default.toml
new file mode 100644
index 00000000..810167ef
--- /dev/null
+++ b/tests/imputation/default.toml
@@ -0,0 +1,58 @@
+starting_period = "202001"
+back_data_starting_period = "202002"
+
+[field_names]
+auxiliary_col = "other"
+backward_col = "backward"
+forward_col = "forward"
+marker_col = "marker"
+output_col = "output"
+period_col = "date"
+reference_col = "identifier"
+grouping_col = "group"
+target_col = "question"
+construction_col = "construction"
+count_forward_col = "count_forward"
+count_backward_col = "count_backward"
+count_construction_col = "count_construction"
+forward_growth_col = "growth_forward"
+backward_growth_col = "growth_backward"
+default_forward_col = "default_forward"
+default_backward_col = "default_backward"
+default_construction_col = "default_construction"
+link_inclusion_current_col = "link_inclusion_current"
+link_inclusion_previous_col = "link_inclusion_previous"
+link_inclusion_next_col = "link_inclusion_next"
+trimmed_forward_col = "trim_inclusion_forward"
+trimmed_backward_col = "trim_inclusion_backward"
+unweighted_construction_link_col = "unweighted_construction"
+unweighted_backward_link_col = "unweighted_backward"
+unweighted_forward_link_col = "unweighted_forward"
+
+[field_types]
+reference_col = "string"
+period_col = "string"
+grouping_col = "string"
+target_col = "decimal(15,6)"
+auxiliary_col = "decimal(15,6)"
+output_col = "decimal(15,6)"
+marker_col = "string"
+backward_col = "decimal(15,6)"
+forward_col = "decimal(15,6)"
+construction_col = "decimal(15,6)"
+count_forward_col = "long"
+count_backward_col = "long"
+count_construction_col = "long"
+forward_growth_col = "decimal(15,6)"
+backward_growth_col = "decimal(15,6)"
+default_forward_col = "boolean"
+default_backward_col = "boolean"
+default_construction_col = "boolean"
+link_inclusion_current_col = "boolean"
+link_inclusion_previous_col = "boolean"
+link_inclusion_next_col = "boolean"
+trimmed_forward_col = "boolean"
+trimmed_backward_col = "boolean"
+unweighted_construction_link_col = "decimal(15,6)"
+unweighted_backward_link_col = "decimal(15,6)"
+unweighted_forward_link_col = "decimal(15,6)"
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 58851a30..deee5567 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -1,62 +1,3 @@
-starting_period = "202001"
-back_data_starting_period = "202002"
-
-[field_names]
-auxiliary_col = "other"
-backward_col = "backward"
-forward_col = "forward"
-marker_col = "marker"
-output_col = "output"
-period_col = "date"
-reference_col = "identifier"
-grouping_col = "group"
-target_col = "question"
-construction_col = "construction"
-count_forward_col = "count_forward"
-count_backward_col = "count_backward"
-count_construction_col = "count_construction"
-forward_growth_col = "growth_forward"
-backward_growth_col = "growth_backward"
-default_forward_col = "default_forward"
-default_backward_col = "default_backward"
-default_construction_col = "default_construction"
-link_inclusion_current_col = "link_inclusion_current"
-link_inclusion_previous_col = "link_inclusion_previous"
-link_inclusion_next_col = "link_inclusion_next"
-trimmed_forward_col = "trim_inclusion_forward"
-trimmed_backward_col = "trim_inclusion_backward"
-unweighted_construction_link_col = "unweighted_construction"
-unweighted_backward_link_col = "unweighted_backward"
-unweighted_forward_link_col = "unweighted_forward"
-
-[field_types]
-reference_col = "string"
-period_col = "string"
-grouping_col = "string"
-target_col = "decimal(15,6)"
-auxiliary_col = "decimal(15,6)"
-output_col = "decimal(15,6)"
-marker_col = "string"
-backward_col = "decimal(15,6)"
-forward_col = "decimal(15,6)"
-construction_col = "decimal(15,6)"
-count_forward_col = "long"
-count_backward_col = "long"
-count_construction_col = "long"
-forward_growth_col = "decimal(15,6)"
-backward_growth_col = "decimal(15,6)"
-default_forward_col = "boolean"
-default_backward_col = "boolean"
-default_construction_col = "boolean"
-link_inclusion_current_col = "boolean"
-link_inclusion_previous_col = "boolean"
-link_inclusion_next_col = "boolean"
-trimmed_forward_col = "boolean"
-trimmed_backward_col = "boolean"
-unweighted_construction_link_col = "decimal(15,6)"
-unweighted_backward_link_col = "decimal(15,6)"
-unweighted_forward_link_col = "decimal(15,6)"
-
 [05_R_R_FI_FI_FI_year_span]
 starting_period = "202010"
 
diff --git a/tests/imputation/ratio_of_means.toml b/tests/imputation/ratio_of_means.toml
index 99806a1c..a56b6350 100644
--- a/tests/imputation/ratio_of_means.toml
+++ b/tests/imputation/ratio_of_means.toml
@@ -1,11 +1,6 @@
 [05_R_R_FI_FI_FI_year_span]
 starting_period = "202010"
 
-[19_link_columns]
-forward_link_col = "forward"
-backward_link_col = "backward"
-construction_link_col = "construction"
-
 [26_C_FI_FI_NS_BI_BI_R_filtered]
 link_filter = "question < 100000"
 
@@ -14,9 +9,6 @@ link_filter = "question < 100000"
 
 [28_link_columns_filtered]
 link_filter = "question < 100000"
-forward_link_col = "forward"
-backward_link_col = "backward"
-construction_link_col = "construction"
 
 [29_mixed_data_filtered]
 link_filter = "question < 100000"
diff --git a/tests/imputation/test_ratio_of_means.py b/tests/imputation/test_ratio_of_means.py
deleted file mode 100644
index 0ad130fe..00000000
--- a/tests/imputation/test_ratio_of_means.py
+++ /dev/null
@@ -1,209 +0,0 @@
-import glob
-import os
-import pathlib
-
-import pytest
-import toml
-from chispa.dataframe_comparer import assert_df_equality
-from pyspark.sql.functions import bround, col
-from pyspark.sql.types import BooleanType, DecimalType, LongType, StringType
-
-from statistical_methods_library.imputation import impute, ratio_of_means
-
-auxiliary_col = "other"
-backward_col = "backward"
-forward_col = "forward"
-marker_col = "marker"
-output_col = "output"
-period_col = "date"
-reference_col = "identifier"
-grouping_col = "group"
-target_col = "question"
-construction_col = "construction"
-count_forward_col = "count_forward"
-count_backward_col = "count_backward"
-count_construction_col = "count_construction"
-default_forward_col = "default_forward"
-default_backward_col = "default_backward"
-default_construction_col = "default_construction"
-link_inclusion_current_col = "link_inclusion_current"
-
-decimal_type = DecimalType(15, 6)
-
-reference_type = StringType()
-period_type = StringType()
-grouping_type = StringType()
-target_type = decimal_type
-auxiliary_type = decimal_type
-min_accuracy = decimal_type
-marker_type = StringType()
-backward_type = decimal_type
-forward_type = decimal_type
-construction_type = decimal_type
-count_forward_type = LongType()
-count_backward_type = LongType()
-count_construction_type = LongType()
-default_forward_type = BooleanType()
-default_backward_type = BooleanType()
-default_construction_type = BooleanType()
-link_inclusion_current_type = BooleanType()
-
-# Columns we expect in either our input or output test dataframes and their
-# respective types
-dataframe_columns = (
-    reference_col,
-    period_col,
-    grouping_col,
-    target_col,
-    auxiliary_col,
-    output_col,
-    marker_col,
-    forward_col,
-    backward_col,
-    construction_col,
-    count_forward_col,
-    count_backward_col,
-    count_construction_col,
-    default_forward_col,
-    default_backward_col,
-    default_construction_col,
-    link_inclusion_current_col,
-)
-
-dataframe_types = {
-    reference_col: reference_type,
-    period_col: period_type,
-    grouping_col: grouping_type,
-    target_col: target_type,
-    auxiliary_col: auxiliary_type,
-    output_col: min_accuracy,
-    marker_col: marker_type,
-    backward_col: backward_type,
-    forward_col: forward_type,
-    construction_col: construction_type,
-    count_forward_col: count_forward_type,
-    count_backward_col: count_backward_type,
-    count_construction_col: count_construction_type,
-    default_forward_col: default_forward_type,
-    default_backward_col: default_backward_type,
-    default_construction_col: default_construction_type,
-    link_inclusion_current_col: link_inclusion_current_type,
-}
-
-bad_dataframe_types = dataframe_types.copy()
-bad_dataframe_types[target_col] = reference_type
-
-# Params used when calling impute
-params = {
-    "reference_col": reference_col,
-    "period_col": period_col,
-    "grouping_col": grouping_col,
-    "target_col": target_col,
-    "auxiliary_col": auxiliary_col,
-    "output_col": output_col,
-    "marker_col": marker_col,
-    "ratio_calculator": ratio_of_means,
-    "starting_period": "202001",
-}
-
-test_scenarios = []
-
-scenario_path_prefix = pathlib.Path(
-    "tests", "fixture_data", "imputation", "ratio_of_means"
-)
-for scenario_category in ("dev", "methodology"):
-    scenario_type = f"{scenario_category}_scenarios"
-    test_files = glob.glob(str(scenario_path_prefix / scenario_type / "*_input.csv"))
-    test_scenarios += sorted(
-        (
-            (scenario_type, os.path.basename(f).replace("_input.csv", ""))
-            for f in test_files
-        ),
-        key=lambda t: t[1],
-    )
-
-test_scenarios += [
-    (f"back_data_{scenario_type}", scenario_file)
-    for scenario_type, scenario_file in test_scenarios
-    if scenario_type.split("_", 1)[0] in ("dev", "methodology")
-]
-
-# --- Test Scenarios.
-
-
-@pytest.mark.parametrize(
-    "scenario_type, scenario",
-    test_scenarios,
-)
-def test_calculations(fxt_load_test_csv, scenario_type, scenario):
-    imputation_kwargs = params.copy()
-
-    if "back_data_" in scenario_type:
-        imputation_kwargs["starting_period"] = "202002"
-
-    scenario_file_type = scenario_type.replace("back_data_", "")
-    scenario_input = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        scenario_file_type,
-        f"{scenario}_input",
-    )
-    scenario_expected_output = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "imputation",
-        "ratio_of_means",
-        scenario_file_type,
-        f"{scenario}_output",
-    )
-
-    with open("tests/imputation/ratio_of_means.toml", "r") as f:
-        new_toml_string = toml.load(f)
-    if scenario in new_toml_string.keys():
-        imputation_kwargs.update(new_toml_string[scenario])
-
-    back_data_df = scenario_expected_output.filter(
-        col(period_col) < imputation_kwargs["starting_period"]
-    )
-
-    if "filtered" in scenario:
-        back_data_df = back_data_df.withColumn(target_col, col(output_col))
-
-    imputation_kwargs["back_data_df"] = back_data_df
-
-    scenario_input = scenario_input.filter(
-        col(period_col) >= imputation_kwargs["starting_period"]
-    )
-
-    scenario_expected_output = scenario_expected_output.filter(
-        col(period_col) >= imputation_kwargs["starting_period"]
-    )
-
-    # We need to drop our grouping and auxiliary columns from our output now
-    # we've potentially set up our back data as these must not come out of
-    # imputation.
-    scenario_expected_output = scenario_expected_output.drop(
-        grouping_col,
-        auxiliary_col,
-    )
-    scenario_actual_output = impute(input_df=scenario_input, **imputation_kwargs)
-
-    scenario_actual_output = (
-        scenario_actual_output.withColumn(output_col, bround(col(output_col), 6))
-        .withColumn(forward_col, bround(col(forward_col), 6))
-        .withColumn(backward_col, bround(col(backward_col).cast(decimal_type), 6))
-        .withColumn(
-            construction_col, bround(col(construction_col).cast(decimal_type), 6)
-        )
-    )
-
-    select_cols = list(set(dataframe_columns) & set(scenario_expected_output.columns))
-    assert isinstance(scenario_actual_output, type(scenario_input))
-    sort_col_list = [reference_col, period_col, grouping_col]
-    assert_df_equality(
-        scenario_actual_output.sort(sort_col_list).select(select_cols),
-        scenario_expected_output.sort(sort_col_list).select(select_cols),
-        ignore_nullable=True,
-    )
diff --git a/tests/imputation/test_mean_of_ratios.py b/tests/imputation/test_scenarios.py
similarity index 50%
rename from tests/imputation/test_mean_of_ratios.py
rename to tests/imputation/test_scenarios.py
index 66182964..9f0291e9 100644
--- a/tests/imputation/test_mean_of_ratios.py
+++ b/tests/imputation/test_scenarios.py
@@ -7,40 +7,42 @@
 from chispa.dataframe_comparer import assert_df_equality
 from decimal import Decimal
 from pyspark.sql.functions import bround, col
-from statistical_methods_library.imputation import impute, mean_of_ratios
-
-test_scenarios = []
+from statistical_methods_library import imputation
 
 scenario_path_prefix = pathlib.Path(
-    "tests", "fixture_data", "imputation", "mean_of_ratios"
+    "tests", "fixture_data", "imputation"
 )
-for scenario_category in ("dev", "methodology"):
-    scenario_type = f"{scenario_category}_scenarios"
-    test_files = glob.glob(str(scenario_path_prefix / scenario_type / "*_input.csv"))
+test_scenarios = []
+for ratio_calculator in ("mean_of_ratios", "ratio_of_means"):
+    scenario_type = "methodology_scenarios"
+    test_files = glob.glob(str(scenario_path_prefix / ratio_calculator / scenario_type / "*_input.csv"))
     test_scenarios += sorted(
         (
-            (scenario_type, os.path.basename(f).replace("_input.csv", ""))
+            (ratio_calculator, scenario_type, os.path.basename(f).replace("_input.csv", ""))
             for f in test_files
         ),
-        key=lambda t: t[1],
+        key=lambda t: t[2],
     )
 
 test_scenarios += [
-    (f"back_data_{scenario_type}", scenario_file)
-    for scenario_type, scenario_file in test_scenarios
-    if scenario_type.split("_", 1)[0] in ("dev", "methodology")
+    (ratio_calculator, f"back_data_{scenario_type}", scenario_file)
+    for ratio_calculator, scenario_type, scenario_file in test_scenarios
 ]
+toml_path_prefix = pathlib.Path("tests", "imputation")
+with open(toml_path_prefix / "default.toml", "r") as f:
+    default_params = toml.load(f)
 
 @pytest.mark.parametrize(
-    "scenario_type, scenario",
+    "ratio_calculator, scenario_type, scenario",
     test_scenarios,
 )
-def test_calculations(fxt_load_test_csv, scenario_type, scenario):
-    with open("tests/imputation/mean_of_ratios.toml", "r") as f:
-        test_params = toml.load(f)
+def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenario):
+    test_params = default_params.copy()
+    with open(toml_path_prefix / f"{ratio_calculator}.toml", "r") as f:
+        test_params.update(toml.load(f))
 
     imputation_kwargs = test_params["field_names"].copy()
-    imputation_kwargs["ratio_calculator"] = mean_of_ratios
+    imputation_kwargs["ratio_calculator"] = getattr(imputation, ratio_calculator)
     if "back_data_" in scenario_type:
         starting_period = test_params["back_data_starting_period"]
     else:
@@ -75,6 +77,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
 
     if "weight" in imputation_kwargs:
         imputation_kwargs["weight"] = Decimal(imputation_kwargs["weight"])
+
     back_data_df = scenario_expected_output.filter(
         col(fields["period_col"]) < starting_period
     )
@@ -89,44 +92,17 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         col(fields["period_col"]) >= starting_period
     )
 
-    # We need to drop our grouping and auxiliary columns from our output now
-    # we've potentially set up our back data as these must not come out of
+    # We need to drop our auxiliary column from our output now
+    # we've potentially set up our back data as this must not come out of
     # imputation.
     scenario_expected_output = scenario_expected_output.drop(
-        fields["grouping_col"],
         fields["auxiliary_col"],
     )
-    scenario_actual_output = impute(input_df=scenario_input, **imputation_kwargs)
-
-    scenario_actual_output = (
-        scenario_actual_output.withColumn(fields["output_col"], bround(col(fields["output_col"]), 6))
-        .withColumn(fields["forward_col"], bround(col(fields["forward_col"]), 6))
-        .withColumn(fields["backward_col"], bround(col(fields["backward_col"]), 6))
-        .withColumn(
-            fields["construction_col"], bround(col(fields["construction_col"]), 6)
-        )
-    )
-
-    if "link_columns" not in scenario:
-        scenario_actual_output = scenario_actual_output.withColumn(
-            fields["forward_growth_col"], bround(col(fields["forward_growth_col"]), 6)
-        ).withColumn(
-            fields["backward_growth_col"], bround(col(fields["backward_growth_col"]), 6)
-        )
+    scenario_actual_output = imputation.impute(input_df=scenario_input, **imputation_kwargs)
 
-    if "weight" in scenario:
-        scenario_actual_output = (
-            scenario_actual_output.withColumn(
-                fields["unweighted_forward_link_col"], bround(col(fields["unweighted_forward_link_col"]), 6)
-            )
-            .withColumn(
-                fields["unweighted_backward_link_col"], bround(col(fields["unweighted_backward_link_col"]), 6)
-            )
-            .withColumn(
-                fields["unweighted_construction_link_col"],
-                bround(col(fields["unweighted_construction_link_col"]), 6),
-            )
-        )
+    for field_name, field_type in scenario_actual_output.dtypes:
+        if field_type.startswith("decimal"):
+            scenario_actual_output = scenario_actual_output.withColumn(field_name, bround(field_name, 6))
 
     select_cols = list(set(fields.values()) & set(scenario_expected_output.columns))
     sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]

From f17772dc216a9756ff6287e8634803b935b25d98 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 17 May 2023 21:03:11 +0100
Subject: [PATCH 338/531] Hopefully fix multiple config issues

---
 tests/imputation/default.toml        |  9 +--
 tests/imputation/mean_of_ratios.toml | 86 ++++++++++++++++------------
 tests/imputation/ratio_of_means.toml | 14 ++---
 tests/imputation/test_scenarios.py   | 56 ++++++++++--------
 4 files changed, 90 insertions(+), 75 deletions(-)

diff --git a/tests/imputation/default.toml b/tests/imputation/default.toml
index 810167ef..f7c9887e 100644
--- a/tests/imputation/default.toml
+++ b/tests/imputation/default.toml
@@ -15,16 +15,12 @@ construction_col = "construction"
 count_forward_col = "count_forward"
 count_backward_col = "count_backward"
 count_construction_col = "count_construction"
-forward_growth_col = "growth_forward"
-backward_growth_col = "growth_backward"
 default_forward_col = "default_forward"
 default_backward_col = "default_backward"
 default_construction_col = "default_construction"
 link_inclusion_current_col = "link_inclusion_current"
 link_inclusion_previous_col = "link_inclusion_previous"
 link_inclusion_next_col = "link_inclusion_next"
-trimmed_forward_col = "trim_inclusion_forward"
-trimmed_backward_col = "trim_inclusion_backward"
 unweighted_construction_link_col = "unweighted_construction"
 unweighted_backward_link_col = "unweighted_backward"
 unweighted_forward_link_col = "unweighted_forward"
@@ -43,16 +39,13 @@ construction_col = "decimal(15,6)"
 count_forward_col = "long"
 count_backward_col = "long"
 count_construction_col = "long"
-forward_growth_col = "decimal(15,6)"
-backward_growth_col = "decimal(15,6)"
 default_forward_col = "boolean"
 default_backward_col = "boolean"
 default_construction_col = "boolean"
 link_inclusion_current_col = "boolean"
 link_inclusion_previous_col = "boolean"
 link_inclusion_next_col = "boolean"
-trimmed_forward_col = "boolean"
-trimmed_backward_col = "boolean"
+
 unweighted_construction_link_col = "decimal(15,6)"
 unweighted_backward_link_col = "decimal(15,6)"
 unweighted_forward_link_col = "decimal(15,6)"
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index deee5567..cc4af50c 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -1,149 +1,161 @@
-[05_R_R_FI_FI_FI_year_span]
+[field_names]
+forward_growth_col = "growth_forward"
+backward_growth_col = "growth_backward"
+trimmed_forward_col = "trim_inclusion_forward"
+trimmed_backward_col = "trim_inclusion_backward"
+
+[field_types]
+forward_growth_col = "decimal(15,6)"
+backward_growth_col = "decimal(15,6)"
+trimmed_forward_col = "boolean"
+trimmed_backward_col = "boolean"
+
+[scenarios.05_R_R_FI_FI_FI_year_span]
 starting_period = "202010"
 
-[26_C_FI_FI_NS_BI_BI_R_filtered]
+[scenarios.26_C_FI_FI_NS_BI_BI_R_filtered]
 link_filter = "identifier != '140005'"
 
-[27_BI_BI_R_NS_R_FI_FI_filtered]
+[scenarios.27_BI_BI_R_NS_R_FI_FI_filtered]
 link_filter = "identifier NOT IN ('150005', '150006')"
 
-[28_link_columns_filtered]
+[scenarios.28_link_columns_filtered]
 link_filter = "identifier != '190007'"
 
-[29_mixed_data_filtered]
+[scenarios.29_mixed_data_filtered]
 link_filter = "identifier NOT IN ('200013', '200014')"
 
-[30_class_change_C_C_FI_filtered]
+[scenarios.30_class_change_C_C_FI_filtered]
 link_filter = "identifier NOT IN ('230006', '230008')"
 
-[35_TB_10_R_R_FI]
+[scenarios.35_TB_10_R_R_FI]
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[36_TB_10_BI_BI_R]
+[scenarios.36_TB_10_BI_BI_R]
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[37_TB_10_C_FI_FI]
+[scenarios.37_TB_10_C_FI_FI]
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[38_T_10_R_R_FI]
+[scenarios.38_T_10_R_R_FI]
 lower_trim = 0
 upper_trim = 10
 trim_threshold = 10
 
-[39_B_10_R_R_FI]
+[scenarios.39_B_10_R_R_FI]
 lower_trim = 10
 upper_trim = 0
 trim_threshold = 10
 
-[40_TB_10_R_R_FI_no_trim]
+[scenarios.40_TB_10_R_R_FI_no_trim]
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[41_TB_10_R_R_FI_filtered]
+[scenarios.41_TB_10_R_R_FI_filtered]
 link_filter = "NOT(identifier = '30004' AND date = '202002')"
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[42_TB_10_R_R_FI-BI_R_R]
+[scenarios.42_TB_10_R_R_FI-BI_R_R]
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[43_TB_10_BI_BI_R_boundary]
+[scenarios.43_TB_10_BI_BI_R_boundary]
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[44_TB_5_BI_BI_R_boundary]
+[scenarios.44_TB_5_BI_BI_R_boundary]
 lower_trim = 5
 upper_trim = 5
 trim_threshold = 10
 
-[45_TB_10_R_R_FI_partial_no_trim]
+[scenarios.45_TB_10_R_R_FI_partial_no_trim]
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[46_TB_10_BI_BI_R_filtered]
+[scenarios.46_TB_10_BI_BI_R_filtered]
 link_filter = "NOT(identifier = '90003' AND date = '202001')"
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[47_TB_50]
+[scenarios.47_TB_50]
 lower_trim = 50
 upper_trim = 50
 trim_threshold = 10
 
-[48_BI_BI_R-R_R_FI_filtered_default]
+[scenarios.48_BI_BI_R-R_R_FI_filtered_default]
 link_filter = "identifier NOT IN ('110005', '110006', '110007')"
 
 # Provide weights as strings here as they'll be converted in the test code
 # to Decimal to avoid floating point to Decimal issues
-[49_R_R_FI-BI_R_R_50_weight_previous_month]
+[scenarios.49_R_R_FI-BI_R_R_50_weight_previous_month]
 weight = "0.5"
 weight_periodicity_multiplier = 1
 
-[50_R_R_FI_50_weight]
+[scenarios.50_R_R_FI_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[51_R_R_FI_80_weight]
+[scenarios.51_R_R_FI_80_weight]
 weight = "0.8"
 weight_periodicity_multiplier = 12
 
-[52_BI_BI_R_50_weight]
+[scenarios.52_BI_BI_R_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[53_C_FI_FI_50_weight]
+[scenarios.53_C_FI_FI_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[54_R_R_FI-BI_R_R_50_weight]
+[scenarios.54_R_R_FI-BI_R_R_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[59_class_change_50_weight]
+[scenarios.59_class_change_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[60_BI_BI_R_FI_FI_R_FI_50_weight]
+[scenarios.60_BI_BI_R_FI_FI_R_FI_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[61_R_R_FI-BI_R_R_50_weight_filtered]
+[scenarios.61_R_R_FI-BI_R_R_50_weight_filtered]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 link_filter = "identifier NOT IN ('110009', '110011')"
 
-[62_mixed_data_50_weight]
+[scenarios.62_mixed_data_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[63_TB_10_R_R_FI-BI_R_R_50_weight]
+[scenarios.63_TB_10_R_R_FI-BI_R_R_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[64_TB_10_C_FI_FI_50_weight]
+[scenarios.64_TB_10_C_FI_FI_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[65_TB_10_BI_BI_R_50_weight_filtered]
+[scenarios.65_TB_10_BI_BI_R_50_weight_filtered]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 link_filter = "NOT(identifier = '90003' AND date = '202001')"
@@ -151,7 +163,7 @@ lower_trim = 50
 upper_trim = 50
 trim_threshold = 10
 
-[66_TB_50_50_weight_filtered_partial_default]
+[scenarios.66_TB_50_50_weight_filtered_partial_default]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 link_filter = "identifier NOT IN ('30001', '30002', '30010')"
@@ -159,7 +171,7 @@ lower_trim = 50
 upper_trim = 50
 trim_threshold = 10
 
-[67_TB_50_50_weight_filtered_full_default]
+[scenarios.67_TB_50_50_weight_filtered_full_default]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 link_filter = "identifier NOT IN ('30001', '30002', '30010')"
@@ -167,8 +179,8 @@ lower_trim = 50
 upper_trim = 50
 trim_threshold = 10
 
-[68_BI_BI_R_NS_C_FI_FI_zeros_included]
+[scenarios.68_BI_BI_R_NS_C_FI_FI_zeros_included]
 include_zeros = true
 
-[70_BI_BI_R_FI_FI_R_FI_alternating_filtered]
+[scenarios.70_BI_BI_R_FI_FI_R_FI_alternating_filtered]
 link_filter = "NOT(identifier = '70001' AND date IN ('202003', '202005'))"
diff --git a/tests/imputation/ratio_of_means.toml b/tests/imputation/ratio_of_means.toml
index a56b6350..15659b63 100644
--- a/tests/imputation/ratio_of_means.toml
+++ b/tests/imputation/ratio_of_means.toml
@@ -1,20 +1,20 @@
-[05_R_R_FI_FI_FI_year_span]
+[scenarios.05_R_R_FI_FI_FI_year_span]
 starting_period = "202010"
 
-[26_C_FI_FI_NS_BI_BI_R_filtered]
+[scenarios.26_C_FI_FI_NS_BI_BI_R_filtered]
 link_filter = "question < 100000"
 
-[27_BI_BI_R_NS_R_FI_FI_filtered]
+[scenarios.27_BI_BI_R_NS_R_FI_FI_filtered]
 link_filter = "question < 100000"
 
-[28_link_columns_filtered]
+[scenarios.28_link_columns_filtered]
 link_filter = "question < 100000"
 
-[29_mixed_data_filtered]
+[scenarios.29_mixed_data_filtered]
 link_filter = "question < 100000"
 
-[30_class_change_C_C_FI_filtered]
+[scenarios.30_class_change_C_C_FI_filtered]
 link_filter = "question < 100000"
 
-[34_multi_variable_C_BI_R_filtered]
+[scenarios.34_multi_variable_C_BI_R_filtered]
 link_filter = "identifier != '10003'"
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 9f0291e9..1e9ae01b 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -12,57 +12,66 @@
 scenario_path_prefix = pathlib.Path(
     "tests", "fixture_data", "imputation"
 )
+ratio_calculators = ("mean_of_ratios", "ratio_of_means")
 test_scenarios = []
-for ratio_calculator in ("mean_of_ratios", "ratio_of_means"):
+for ratio_calculator in ratio_calculators:
     scenario_type = "methodology_scenarios"
     test_files = glob.glob(str(scenario_path_prefix / ratio_calculator / scenario_type / "*_input.csv"))
-    test_scenarios += sorted(
+    test_list = sorted(
         (
             (ratio_calculator, scenario_type, os.path.basename(f).replace("_input.csv", ""))
             for f in test_files
         ),
         key=lambda t: t[2],
     )
+    test_scenarios += test_list
+    test_scenarios += [
+        (ratio_calculator, f"back_data_{scenario_type}", scenario_file)
+        for ratio_calculator, scenario_type, scenario_file in test_list
+    ]
 
-test_scenarios += [
-    (ratio_calculator, f"back_data_{scenario_type}", scenario_file)
-    for ratio_calculator, scenario_type, scenario_file in test_scenarios
-]
 toml_path_prefix = pathlib.Path("tests", "imputation")
-with open(toml_path_prefix / "default.toml", "r") as f:
-    default_params = toml.load(f)
 
 @pytest.mark.parametrize(
     "ratio_calculator, scenario_type, scenario",
     test_scenarios,
 )
 def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenario):
-    test_params = default_params.copy()
+    with open(toml_path_prefix / "default.toml", "r") as f:
+        default_config = toml.load(f)
+
     with open(toml_path_prefix / f"{ratio_calculator}.toml", "r") as f:
-        test_params.update(toml.load(f))
+        test_config = (toml.load(f))
 
-    imputation_kwargs = test_params["field_names"].copy()
+    scenarios = test_config.pop("scenarios", {})
+    scenario_config = scenarios.get(scenario, {})
+    fields = default_config["field_names"]
+    fields.update(test_config.get("field_names", {}))
+    fields.update(scenario_config.get("field_names", {}))
+    imputation_kwargs = fields.copy()
     imputation_kwargs["ratio_calculator"] = getattr(imputation, ratio_calculator)
     if "back_data_" in scenario_type:
-        starting_period = test_params["back_data_starting_period"]
+        starting_period_key = "back_data_starting_period"
     else:
-        starting_period = test_params["starting_period"]
-
-    scenario_params = test_params.get(scenario, {}).copy()
-    starting_period = scenario_params.pop("starting_period", starting_period)
-    imputation_kwargs.update(scenario_params)
-
-    fields = test_params["field_names"]
+        starting_period_key = "starting_period"
+    starting_period = scenario_config.get(starting_period_key,
+        test_config.get(starting_period_key,
+            default_config[starting_period_key]
+        )
+    )
+    field_types = default_config["field_types"]
+    field_types.update(test_config.get("field_types", {}))
+    field_types.update(scenario_config.get("field_types", {}))
     types = {
-        test_params["field_names"][k]: v
-        for k,v in test_params["field_types"].items()
+        fields[k]: v
+        for k,v in field_types.items()
     }
     scenario_file_type = scenario_type.replace("back_data_", "")
     scenario_input = fxt_load_test_csv(
         fields.values(),
         types,
         "imputation",
-        "mean_of_ratios",
+        ratio_calculator,
         scenario_file_type,
         f"{scenario}_input",
     )
@@ -70,7 +79,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
         fields.values(),
         types,
         "imputation",
-        "mean_of_ratios",
+        ratio_calculator,
         scenario_file_type,
         f"{scenario}_output",
     )
@@ -101,6 +110,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     scenario_actual_output = imputation.impute(input_df=scenario_input, **imputation_kwargs)
 
     for field_name, field_type in scenario_actual_output.dtypes:
+
         if field_type.startswith("decimal"):
             scenario_actual_output = scenario_actual_output.withColumn(field_name, bround(field_name, 6))
 

From f7abf621ffd5b4359dfb8c6f6a0aceecaf3f70eb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 17 May 2023 21:57:46 +0100
Subject: [PATCH 339/531] Swap imputation tests to pyspark-test rather than
 chispa

The chispa errors may have been all nicely coloured but, as a blind
developer, my current screen access setup doesn't make it easy to get the
text colours and the tables were just painful to read (I've had to resort to
reading the terminal escape sequences in the past). After spending about 5
hours trying to track down a test error today it seems somewhat unproductive
to keep the coloured error messages when there's another library which can
do simpler errors more in the spirit of output diffs.
---
 poetry.lock                        | 17 ++++++++++++++++-
 pyproject.toml                     |  1 +
 tests/imputation/test_scenarios.py |  7 ++++---
 3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 1ffe36ff..48c61de2 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -382,6 +382,21 @@ ml = ["numpy (>=1.7)"]
 mllib = ["numpy (>=1.7)"]
 sql = ["pandas (>=0.23.2)", "pyarrow (>=1.0.0)"]
 
+[[package]]
+name = "pyspark-test"
+version = "0.2.0"
+description = "Check that left and right spark DataFrame are equal."
+category = "dev"
+optional = false
+python-versions = "*"
+files = [
+    {file = "pyspark_test-0.2.0-py3-none-any.whl", hash = "sha256:dd4fb03c4f438f718a870a9268a459f2f8924829c767302f5515202707c97709"},
+    {file = "pyspark_test-0.2.0.tar.gz", hash = "sha256:0d9d8d3a352a9b1c30761b0553a5771cb9dbb9a278955b3e7b0aed0ae13892d8"},
+]
+
+[package.dependencies]
+pyspark = ">=2.1.2"
+
 [[package]]
 name = "pytest"
 version = "7.3.1"
@@ -559,4 +574,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.7"
-content-hash = "5c7609c0dfcd0bdbde607960c17975d889343d3b36a0e1057999b3d6c1c63129"
+content-hash = "ce3016b4dd645255ad2399419f6c2c1f2f84da2c3e32c47e32736792729e6654"
diff --git a/pyproject.toml b/pyproject.toml
index 93d98ac4..e7ea4c06 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -20,6 +20,7 @@ pytest-cov = "^4.0.0"
 chispa = "*"
 pytest-dependency = "^0.5.1"
 pytest-tap = "^3.3"
+pyspark-test = "^0.2.0"
 
 [tool.isort]
 profile = "black"
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 1e9ae01b..570c821e 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -4,7 +4,7 @@
 
 import pytest
 import toml
-from chispa.dataframe_comparer import assert_df_equality
+from pyspark_test import assert_pyspark_df_equal
 from decimal import Decimal
 from pyspark.sql.functions import bround, col
 from statistical_methods_library import imputation
@@ -116,8 +116,9 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
 
     select_cols = list(set(fields.values()) & set(scenario_expected_output.columns))
     sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]
-    assert_df_equality(
+    assert_pyspark_df_equal(
         scenario_actual_output.sort(sort_col_list).select(select_cols),
         scenario_expected_output.sort(sort_col_list).select(select_cols),
-        ignore_nullable=True,
+        check_dtype=False,
+        check_column_names=True
     )

From 843d30c9a9271f13f179c6ab753ac41af2dc23ed Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 10:19:59 +0100
Subject: [PATCH 340/531] pyspark-test was stopping on the first error but we
 probably want the entire diff so switch to the (probably slower) pytest
 assert check on the df collects

---
 poetry.lock                        | 17 +----------------
 pyproject.toml                     |  1 -
 tests/imputation/test_scenarios.py |  9 +++------
 3 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 48c61de2..1ffe36ff 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -382,21 +382,6 @@ ml = ["numpy (>=1.7)"]
 mllib = ["numpy (>=1.7)"]
 sql = ["pandas (>=0.23.2)", "pyarrow (>=1.0.0)"]
 
-[[package]]
-name = "pyspark-test"
-version = "0.2.0"
-description = "Check that left and right spark DataFrame are equal."
-category = "dev"
-optional = false
-python-versions = "*"
-files = [
-    {file = "pyspark_test-0.2.0-py3-none-any.whl", hash = "sha256:dd4fb03c4f438f718a870a9268a459f2f8924829c767302f5515202707c97709"},
-    {file = "pyspark_test-0.2.0.tar.gz", hash = "sha256:0d9d8d3a352a9b1c30761b0553a5771cb9dbb9a278955b3e7b0aed0ae13892d8"},
-]
-
-[package.dependencies]
-pyspark = ">=2.1.2"
-
 [[package]]
 name = "pytest"
 version = "7.3.1"
@@ -574,4 +559,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.7"
-content-hash = "ce3016b4dd645255ad2399419f6c2c1f2f84da2c3e32c47e32736792729e6654"
+content-hash = "5c7609c0dfcd0bdbde607960c17975d889343d3b36a0e1057999b3d6c1c63129"
diff --git a/pyproject.toml b/pyproject.toml
index e7ea4c06..93d98ac4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -20,7 +20,6 @@ pytest-cov = "^4.0.0"
 chispa = "*"
 pytest-dependency = "^0.5.1"
 pytest-tap = "^3.3"
-pyspark-test = "^0.2.0"
 
 [tool.isort]
 profile = "black"
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 570c821e..217a9e8a 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -4,7 +4,6 @@
 
 import pytest
 import toml
-from pyspark_test import assert_pyspark_df_equal
 from decimal import Decimal
 from pyspark.sql.functions import bround, col
 from statistical_methods_library import imputation
@@ -116,9 +115,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
 
     select_cols = list(set(fields.values()) & set(scenario_expected_output.columns))
     sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]
-    assert_pyspark_df_equal(
-        scenario_actual_output.sort(sort_col_list).select(select_cols),
-        scenario_expected_output.sort(sort_col_list).select(select_cols),
-        check_dtype=False,
-        check_column_names=True
+    assert (
+        scenario_actual_output.sort(sort_col_list).select(select_cols).collect()
+        == scenario_expected_output.sort(sort_col_list).select(select_cols).collect()
     )

From efca57fc313e506b313bdfa0039bde589c0534b5 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 10:32:44 +0100
Subject: [PATCH 341/531] Remove chispa

---
 poetry.lock                            | 14 +-------------
 pyproject.toml                         |  1 -
 tests/estimation/test_ht_ratio.py      |  8 +++-----
 tests/outliering/test_winsorisation.py |  9 +++------
 4 files changed, 7 insertions(+), 25 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 1ffe36ff..921102e1 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -51,18 +51,6 @@ d = ["aiohttp (>=3.7.4)"]
 jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]
 uvloop = ["uvloop (>=0.15.2)"]
 
-[[package]]
-name = "chispa"
-version = "0.9.2"
-description = "Pyspark test helper library"
-category = "dev"
-optional = false
-python-versions = ">=3.5"
-files = [
-    {file = "chispa-0.9.2-py3-none-any.whl", hash = "sha256:c6eae922f5c3ccd08f4dc3707202291bb249e68e319d0641795d92d80cfb1cad"},
-    {file = "chispa-0.9.2.tar.gz", hash = "sha256:621ad2e64fd27e7372c7b90ab2d5ad1f8dd69b737a3421ba5b6f84b113a18b84"},
-]
-
 [[package]]
 name = "click"
 version = "8.1.3"
@@ -559,4 +547,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.7"
-content-hash = "5c7609c0dfcd0bdbde607960c17975d889343d3b36a0e1057999b3d6c1c63129"
+content-hash = "8cfaf90bbd58884fc343110ef2f1894b324339690380010bb6db7aaf223843c6"
diff --git a/pyproject.toml b/pyproject.toml
index 93d98ac4..3cf50923 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -17,7 +17,6 @@ isort = "^5.11.4"
 flake8 = "^5.0.4"
 coverage = "^7.0"
 pytest-cov = "^4.0.0"
-chispa = "*"
 pytest-dependency = "^0.5.1"
 pytest-tap = "^3.3"
 
diff --git a/tests/estimation/test_ht_ratio.py b/tests/estimation/test_ht_ratio.py
index 77f73690..6fa1c1de 100644
--- a/tests/estimation/test_ht_ratio.py
+++ b/tests/estimation/test_ht_ratio.py
@@ -3,7 +3,6 @@
 import pathlib
 
 import pytest
-from chispa import assert_df_equality
 from pyspark.sql.functions import bround, col, lit
 from pyspark.sql.types import BooleanType, DecimalType, StringType
 
@@ -483,8 +482,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
             calibration_factor_col, bround(col(calibration_factor_col), 6)
         )
 
-    assert_df_equality(
-        ret_val.sort(sort_col_list).select(select_cols),
-        exp_val.sort(sort_col_list).select(select_cols),
-        ignore_nullable=True,
+    assert (
+        ret_val.sort(sort_col_list).select(select_cols).collect()
+        == exp_val.sort(sort_col_list).select(select_cols).collect()
     )
diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index 06f90026..de52e881 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -3,7 +3,6 @@
 import pathlib
 
 import pytest
-from chispa import assert_df_equality
 from pyspark.sql.functions import lit
 from pyspark.sql.types import DecimalType, StringType
 
@@ -99,7 +98,6 @@
 @pytest.mark.dependency()
 def test_input_not_a_dataframe():
     with pytest.raises(TypeError):
-        # noinspection PyTypeChecker
         winsorisation.outlier("not_a_dataframe", *params)
 
 
@@ -351,10 +349,9 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
 
     assert isinstance(ret_val, type(test_dataframe))
     sort_col_list = [reference_col, period_col]
-    assert_df_equality(
-        ret_val.sort(sort_col_list),
-        exp_val.sort(sort_col_list),
-        ignore_nullable=True,
+    assert (
+        ret_val.sort(sort_col_list).select(exp_val.columns).collect()
+        == exp_val.sort(sort_col_list).collect()
     )
 
 

From 369a2a8e8ba751cc495ae4ad3693dafd00f6c3f8 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 11:48:30 +0100
Subject: [PATCH 342/531] Swap from bround to just casting decimal precision

---
 tests/imputation/test_scenarios.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 217a9e8a..6d552257 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -5,7 +5,7 @@
 import pytest
 import toml
 from decimal import Decimal
-from pyspark.sql.functions import bround, col
+from pyspark.sql.functions import col
 from statistical_methods_library import imputation
 
 scenario_path_prefix = pathlib.Path(
@@ -107,11 +107,9 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
         fields["auxiliary_col"],
     )
     scenario_actual_output = imputation.impute(input_df=scenario_input, **imputation_kwargs)
-
     for field_name, field_type in scenario_actual_output.dtypes:
-
         if field_type.startswith("decimal"):
-            scenario_actual_output = scenario_actual_output.withColumn(field_name, bround(field_name, 6))
+            scenario_actual_output = scenario_actual_output.withColumn(field_name, col(field_name).cast("decimal(15, 6)"))
 
     select_cols = list(set(fields.values()) & set(scenario_expected_output.columns))
     sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]

From dfc7bdc8c9d7828e2fa57ccd0279de65b3609544 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 12:57:23 +0100
Subject: [PATCH 343/531] Log missing columns

---
 tests/imputation/test_scenarios.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 6d552257..2e94178a 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -111,7 +111,8 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
         if field_type.startswith("decimal"):
             scenario_actual_output = scenario_actual_output.withColumn(field_name, col(field_name).cast("decimal(15, 6)"))
 
-    select_cols = list(set(fields.values()) & set(scenario_expected_output.columns))
+    select_cols = sorted(set(fields.values()) & set(scenario_expected_output.columns))
+    assert sorted(scenario_actual_output.columns) == select_cols
     sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]
     assert (
         scenario_actual_output.sort(sort_col_list).select(select_cols).collect()

From ab2c16b1af4e5d1f99af0cef0a956ddca2b90110 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 18 May 2023 13:02:19 +0100
Subject: [PATCH 344/531] Bad Params + Change Test Base Of Ellie's Feedback

---
 ..._R_FI_FI_R_FI_50_weight_default_input.csv} |  0
 ..._R_FI_FI_R_FI_50_weight_default_output.csv | 49 ++++++++++++++++
 ...60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv | 57 -------------------
 tests/imputation/mean_of_ratios.toml          |  2 +-
 tests/imputation/test_scenarios.py            |  2 +-
 5 files changed, 51 insertions(+), 59 deletions(-)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv => 60_BI_BI_R_FI_FI_R_FI_50_weight_default_input.csv} (100%)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv
new file mode 100644
index 00000000..10cd85f2
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv
@@ -0,0 +1,49 @@
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,true,false,false
+70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,false,false,false
+70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,734,R,3,3,4,false,false,false
+70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,96,R,3,3,3,false,false,false
+70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,false,false,false
+70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,false,false,false
+70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,false,true,false
+70002,202001,100,94,,139.6875,2,48.92201545,108.48,2,25.71653259,105.5951588,6705,R,0,3,3,true,false,false
+70002,202002,100,94,0.007158837,0.008953553,1.521730457,2.30250443,55.70285714,1.521730457,2.30250443,55.70285714,48,R,3,3,3,false,false,false
+70002,202003,100,94,111.6875,0.611497662,38.59760599,3.994350985,99.26519337,20.34023514,2.997175,85.26327851,5361,R,3,3,4,false,false,false
+70002,202004,100,94,1.63532923,0.951486868,2.048019201,1.670608989,94.18857143,2.235471761,1.667765228,98.449445,8767,R,3,3,3,false,false,false
+70002,202005,100,94,1.050986654,1.23396277,33.21646854,3.338226887,146.0971429,17.46057605,3.50789849,111.0069048,9214,R,3,3,3,false,false,false
+70002,202006,100,94,0.810397222,2.148776978,1.510795988,28.65768328,107.7900552,1.842399115,15.03107628,145.5133482,7467,R,3,3,4,false,false,false
+70002,202007,100,94,0.46538101,,2.593348776,2,71.24,2.593348776,2,71.24,3475,R,3,0,3,false,true,false
+70003,202001,100,42,,0.797950979,3,49.92201545,109.48,3,26.71653259,106.5951588,6153,R,0,3,3,true,false,false
+70003,202002,100,42,1.253209816,1.427170091,2.521730457,3.30250443,56.70285714,2.521730457,3.30250443,56.70285714,7711,R,3,3,3,false,false,false
+70003,202003,100,42,0.70068733,0.725721961,39.59760599,4.994350985,100.26519337,21.34023514,3.997175,86.26327851,5403,R,3,3,4,false,false,false
+70003,202004,100,42,1.377938182,1.049774394,3.048019201,2.670608989,95.18857143,3.235471761,2.667765228,99.449445,7445,R,3,3,3,false,false,false
+70003,202005,100,42,0.952585628,3.479882237,34.21646854,4.338226887,147.0971429,18.46057605,4.50789849,112.0069048,7092,R,3,3,3,false,false,false
+70003,202006,100,42,0.287366046,0.232436131,2.510795988,29.65768328,108.7900552,2.842399115,16.03107628,146.5133482,2038,R,3,3,4,false,false,false
+70003,202007,100,42,4.302257115,,3.593348776,3,72.24,3.593348776,3,72.24,8768,R,3,0,3,false,true,false
+70004,202001,100,6,,,4,50.92201545,110.48,4,27.71653259,107.5951588,749847.170741068,BI,0,3,3,true,false,false
+70004,202002,100,6,,,3.521730457,4.30250443,57.70285714,3.521730457,4.30250443,57.70285714,27054.14785584,BI,3,3,3,false,false,false
+70004,202003,100,6,,,40.59760599,5.994350985,101.26519337,22.34023514,4.997175,87.26327851,6288,R,3,3,4,false,false,false
+70004,202004,100,6,,,4.048019201,3.670608989,96.18857143,4.235471761,3.667765228,100.449445,7768.645424,FIR,3,3,3,false,false,false
+70004,202005,100,6,,,35.21646854,5.338226887,148.0971429,19.46057605,5.50789849,113.0069048,127876.380507,FIR,3,3,3,false,false,false
+70004,202006,100,6,,,3.510795988,30.65768328,109.7900552,3.842399115,17.03107628,147.5133482,5875,R,3,3,4,false,false,false
+70004,202007,100,6,,,4.593348776,4,73.24,4.593348776,4,73.24,26985.924059,FIR,3,0,3,false,true,false
+70001,201901,100,39,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70001,201903,100,39,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+70002,201901,100,94,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70002,201903,100,94,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+70003,201901,100,42,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70003,201903,100,42,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+70004,201901,100,6,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70004,201903,100,6,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
deleted file mode 100644
index f0f5ea87..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_output.csv
+++ /dev/null
@@ -1,57 +0,0 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,true,false,false
-70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.760865,1.151252,27.851429,1814,R,3,3,3,false,false,false
-70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,734,R,3,3,4,false,false,false
-70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,96,R,3,3,3,false,false,false
-70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,false,false,false
-70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,false,false,false
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.296674,1,35.62,49,R,3,0,3,false,true,false
-70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,true,false,false
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.760865,1.151252,27.851429,48,R,3,3,3,false,false,false
-70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,5361,R,3,3,4,false,false,false
-70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,8767,R,3,3,3,false,false,false
-70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,false,false,false
-70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,false,false,false
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.296674,1,35.62,3475,R,3,0,3,false,true,false
-70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,true,false,false
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.760865,1.151252,27.851429,7711,R,3,3,3,false,false,false
-70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,5403,R,3,3,4,false,false,false
-70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,7445,R,3,3,3,false,false,false
-70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,false,false,false
-70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,false,false,false
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.296674,1,35.62,8768,R,3,0,3,false,true,false
-70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,178924.807638,BI,0,3,3,true,false,false
-70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.760865,1.151252,27.851429,7239.073928,BI,3,3,3,false,false,false
-70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,6288,R,3,3,4,false,false,false
-70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,7768.645424,FIR,3,3,3,false,false,false
-70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.380507,FIR,3,3,3,false,false,false
-70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,false,false,false
-70004,202007,100,6,,,1.593348776,1,70.24,1.296674,1,35.62,7617.962031,FIR,3,0,3,false,true,false
-70001,201901,100,39,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
-70001,201902,100,39,,,1,1,1,,,,0,R,,,,,,
-70001,201903,100,39,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
-70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
-70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
-70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
-70001,201907,100,39,,,1,1,1,,,,0,R,,,,,,
-70002,201901,100,94,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
-70002,201902,100,94,,,1,1,1,,,,0,R,,,,,,
-70002,201903,100,94,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
-70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
-70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
-70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
-70002,201907,100,94,,,1,1,1,,,,0,R,,,,,,
-70003,201901,100,42,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
-70003,201902,100,42,,,1,1,1,,,,0,R,,,,,,
-70003,201903,100,42,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
-70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
-70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
-70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
-70003,201907,100,42,,,1,1,1,,,,0,R,,,,,,
-70004,201901,100,6,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
-70004,201902,100,6,,,1,1,1,,,,0,R,,,,,,
-70004,201903,100,6,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
-70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
-70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
-70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
-70004,201907,100,6,,,1,1,1,,,,0,R,,,,,,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index cc4af50c..27fab6d7 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -128,7 +128,7 @@ weight_periodicity_multiplier = 12
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
-[scenarios.60_BI_BI_R_FI_FI_R_FI_50_weight]
+[scenarios.60_BI_BI_R_FI_FI_R_FI_50_weight_default]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 2e94178a..28ecc2c8 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -46,7 +46,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     scenario_config = scenarios.get(scenario, {})
     fields = default_config["field_names"]
     fields.update(test_config.get("field_names", {}))
-    fields.update(scenario_config.get("field_names", {}))
+    fields.update(scenario_config)
     imputation_kwargs = fields.copy()
     imputation_kwargs["ratio_calculator"] = getattr(imputation, ratio_calculator)
     if "back_data_" in scenario_type:

From 4548437570b8c830a7e226af7847ac47612af76d Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 18 May 2023 13:07:16 +0100
Subject: [PATCH 345/531] Revert

---
 tests/imputation/test_scenarios.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 28ecc2c8..2e94178a 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -46,7 +46,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     scenario_config = scenarios.get(scenario, {})
     fields = default_config["field_names"]
     fields.update(test_config.get("field_names", {}))
-    fields.update(scenario_config)
+    fields.update(scenario_config.get("field_names", {}))
     imputation_kwargs = fields.copy()
     imputation_kwargs["ratio_calculator"] = getattr(imputation, ratio_calculator)
     if "back_data_" in scenario_type:

From c2cfb5691477ec10c84452d040f6a8ad0acd8390 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 13:17:03 +0100
Subject: [PATCH 346/531] Correctly handle scenario specific kwargs

---
 tests/imputation/test_scenarios.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 2e94178a..ffbade49 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -46,14 +46,14 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     scenario_config = scenarios.get(scenario, {})
     fields = default_config["field_names"]
     fields.update(test_config.get("field_names", {}))
-    fields.update(scenario_config.get("field_names", {}))
+    fields.update(scenario_config.pop("field_names", {}))
     imputation_kwargs = fields.copy()
     imputation_kwargs["ratio_calculator"] = getattr(imputation, ratio_calculator)
     if "back_data_" in scenario_type:
         starting_period_key = "back_data_starting_period"
     else:
         starting_period_key = "starting_period"
-    starting_period = scenario_config.get(starting_period_key,
+    starting_period = scenario_config.pop(starting_period_key,
         test_config.get(starting_period_key,
             default_config[starting_period_key]
         )
@@ -61,6 +61,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     field_types = default_config["field_types"]
     field_types.update(test_config.get("field_types", {}))
     field_types.update(scenario_config.get("field_types", {}))
+    imputation_kwargs.update(scenario_config)
     types = {
         fields[k]: v
         for k,v in field_types.items()
@@ -112,7 +113,6 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
             scenario_actual_output = scenario_actual_output.withColumn(field_name, col(field_name).cast("decimal(15, 6)"))
 
     select_cols = sorted(set(fields.values()) & set(scenario_expected_output.columns))
-    assert sorted(scenario_actual_output.columns) == select_cols
     sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]
     assert (
         scenario_actual_output.sort(sort_col_list).select(select_cols).collect()

From ac36ba1b672325f2c7f09a35cf24001fb5383a7f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 15:20:27 +0100
Subject: [PATCH 347/531] New dataframe comparer

---
 pyproject.toml                     |  7 ++++++-
 tests/helpers.py                   | 33 ++++++++++++++++++++++++++++++
 tests/imputation/test_scenarios.py |  8 ++++----
 3 files changed, 43 insertions(+), 5 deletions(-)
 create mode 100644 tests/helpers.py

diff --git a/pyproject.toml b/pyproject.toml
index 3cf50923..066164f7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -25,7 +25,12 @@ profile = "black"
 
 [tool.pytest.ini_options]
 junit_suite_name = "statistical_methods_library"
-addopts = "--exitfirst --cov=statistical_methods_library --cov-fail-under=95"
+addopts = [
+    "--exitfirst",
+    "--cov=statistical_methods_library",
+    "--cov-fail-under=95",
+    "--import-mode=importlib"
+]
 
 [build-system]
 requires = ["poetry-core>=1.0.0"]
diff --git a/tests/helpers.py b/tests/helpers.py
new file mode 100644
index 00000000..1ef24e3e
--- /dev/null
+++ b/tests/helpers.py
@@ -0,0 +1,33 @@
+from pytest import fail
+from pyspark.sql.functions import col, monotonically_increasing_id
+from functools import reduce
+def check_df_equality(df1, df2):
+    msg = []
+    df1_cols = set(df1.columns)
+    df2_cols = set(df2.columns)
+    df1_col_check = df1_cols - df2_cols
+    df2_col_check = df2_cols - df1_cols
+    if df1_col_check:
+        msg.append("extra columns in df1: {', '.join(df1_col_check)}")
+
+    if df2_col_check:
+        msg.append("extra columns in df2: {', '.join(df2_col_check)}")
+
+    if msg:
+        fail('\n'.join(msg))
+
+    df1 = df1.select(sorted(df1.columns)).alias("df1").withColumn("id", monotonically_increasing_id())
+    df2 = df2.select(sorted(df2.columns)).alias("df2").withColumn("id", monotonically_increasing_id())
+    filter_list = [
+        ~col(f"df1.{name}").eqNullSafe(col(f"df2.{name}"))
+        for name in df1_cols
+    ]
+    diff_df = (
+        df1.join(df2, ["id"], "full")
+        .filter(reduce(lambda x, y: x & y, filter_list))
+    )
+    if diff_df.count() > 0:
+        diff_str = diff_df._jdf.showString(100, 100, False)
+        fail(
+            "Mismatching rows in provided data frames:\n\n{diff_str}"
+        )
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index ffbade49..09cc161d 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -1,7 +1,7 @@
 import glob
 import os
 import pathlib
-
+from tests.helpers import check_df_equality
 import pytest
 import toml
 from decimal import Decimal
@@ -114,7 +114,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
 
     select_cols = sorted(set(fields.values()) & set(scenario_expected_output.columns))
     sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]
-    assert (
-        scenario_actual_output.sort(sort_col_list).select(select_cols).collect()
-        == scenario_expected_output.sort(sort_col_list).select(select_cols).collect()
+    check_df_equality(
+        scenario_actual_output.sort(sort_col_list).select(select_cols),
+        scenario_expected_output.sort(sort_col_list).select(select_cols)
     )

From d3e62d239384373261f54cce3aaf1c9672718070 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 18 May 2023 15:41:33 +0100
Subject: [PATCH 348/531] More Tests Done.

---
 ..._R_FI_FI_R_FI_50_weight_default_output.csv |  42 +++---
 .../62_mixed_data_50_weight_output.csv        |   6 +-
 .../64_TB_10_C_FI_FI_50_weight_output.csv     |  72 +++++-----
 ...B_10_BI_BI_R_50_weight_filtered_output.csv | 126 +++++++++---------
 ...weight_filtered_partial_default_output.csv |  52 ++++----
 tests/imputation/mean_of_ratios.toml          |   4 +-
 6 files changed, 151 insertions(+), 151 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv
index 10cd85f2..6dcd14cf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv
@@ -6,27 +6,27 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,false,false,false
 70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,false,false,false
 70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,false,true,false
-70002,202001,100,94,,139.6875,2,48.92201545,108.48,2,25.71653259,105.5951588,6705,R,0,3,3,true,false,false
-70002,202002,100,94,0.007158837,0.008953553,1.521730457,2.30250443,55.70285714,1.521730457,2.30250443,55.70285714,48,R,3,3,3,false,false,false
-70002,202003,100,94,111.6875,0.611497662,38.59760599,3.994350985,99.26519337,20.34023514,2.997175,85.26327851,5361,R,3,3,4,false,false,false
-70002,202004,100,94,1.63532923,0.951486868,2.048019201,1.670608989,94.18857143,2.235471761,1.667765228,98.449445,8767,R,3,3,3,false,false,false
-70002,202005,100,94,1.050986654,1.23396277,33.21646854,3.338226887,146.0971429,17.46057605,3.50789849,111.0069048,9214,R,3,3,3,false,false,false
-70002,202006,100,94,0.810397222,2.148776978,1.510795988,28.65768328,107.7900552,1.842399115,15.03107628,145.5133482,7467,R,3,3,4,false,false,false
-70002,202007,100,94,0.46538101,,2.593348776,2,71.24,2.593348776,2,71.24,3475,R,3,0,3,false,true,false
-70003,202001,100,42,,0.797950979,3,49.92201545,109.48,3,26.71653259,106.5951588,6153,R,0,3,3,true,false,false
-70003,202002,100,42,1.253209816,1.427170091,2.521730457,3.30250443,56.70285714,2.521730457,3.30250443,56.70285714,7711,R,3,3,3,false,false,false
-70003,202003,100,42,0.70068733,0.725721961,39.59760599,4.994350985,100.26519337,21.34023514,3.997175,86.26327851,5403,R,3,3,4,false,false,false
-70003,202004,100,42,1.377938182,1.049774394,3.048019201,2.670608989,95.18857143,3.235471761,2.667765228,99.449445,7445,R,3,3,3,false,false,false
-70003,202005,100,42,0.952585628,3.479882237,34.21646854,4.338226887,147.0971429,18.46057605,4.50789849,112.0069048,7092,R,3,3,3,false,false,false
-70003,202006,100,42,0.287366046,0.232436131,2.510795988,29.65768328,108.7900552,2.842399115,16.03107628,146.5133482,2038,R,3,3,4,false,false,false
-70003,202007,100,42,4.302257115,,3.593348776,3,72.24,3.593348776,3,72.24,8768,R,3,0,3,false,true,false
-70004,202001,100,6,,,4,50.92201545,110.48,4,27.71653259,107.5951588,749847.170741068,BI,0,3,3,true,false,false
-70004,202002,100,6,,,3.521730457,4.30250443,57.70285714,3.521730457,4.30250443,57.70285714,27054.14785584,BI,3,3,3,false,false,false
-70004,202003,100,6,,,40.59760599,5.994350985,101.26519337,22.34023514,4.997175,87.26327851,6288,R,3,3,4,false,false,false
-70004,202004,100,6,,,4.048019201,3.670608989,96.18857143,4.235471761,3.667765228,100.449445,7768.645424,FIR,3,3,3,false,false,false
-70004,202005,100,6,,,35.21646854,5.338226887,148.0971429,19.46057605,5.50789849,113.0069048,127876.380507,FIR,3,3,3,false,false,false
-70004,202006,100,6,,,3.510795988,30.65768328,109.7900552,3.842399115,17.03107628,147.5133482,5875,R,3,3,4,false,false,false
-70004,202007,100,6,,,4.593348776,4,73.24,4.593348776,4,73.24,26985.924059,FIR,3,0,3,false,true,false
+70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,true,false,false
+70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,false,false,false
+70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,5361,R,3,3,4,false,false,false
+70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,8767,R,3,3,3,false,false,false
+70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,false,false,false
+70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,false,false,false
+70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,false,true,false
+70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,true,false,false
+70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,false,false,false
+70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,5403,R,3,3,4,false,false,false
+70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,7445,R,3,3,3,false,false,false
+70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,false,false,false
+70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,false,false,false
+70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,false,true,false
+70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.057503,BI,0,3,3,true,false,false
+70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.14785584,BI,3,3,3,false,false,false
+70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,6288,R,3,3,4,false,false,false
+70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,7768.645424,FIR,3,3,3,false,false,false
+70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.380507,FIR,3,3,3,false,false,false
+70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,false,false,false
+70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924061,FIR,3,0,3,false,true,false
 70001,201901,100,39,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
 70001,201903,100,39,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
 70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index 245ebacf..93b9b0eb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -12,13 +12,13 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,false,false,false
 110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463084,FIR,3,0,3,false,true,false
 110005,202001,200,27,,,1,1,126.785714,1,1.821298838,135.825357,15858.516846,BI,0,0,1,true,true,false
-110005,202002,200,27,,,1,1,1,1.093104,0.875981535,51.7444166,8707.25611,BI,0,0,0,true,true,true
+110005,202002,200,27,,,1,1,1,1.093105,0.875981535,51.7444166,8707.25611,BI,0,0,0,true,true,true
 110005,202003,200,27,,,1,1,368.1481481,1.053092,1,254.1995327,9940,R,0,0,1,true,true,false
 110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,true,false
-110006,202002,200,42,,,1,1,1,1.093104,0.875981535,51.7444166,5820.781462,FIR,0,0,0,true,true,true
+110006,202002,200,42,,,1,1,1,1.093105,0.875981535,51.7444166,5820.781463,FIR,0,0,0,true,true,true
 110006,202003,200,42,,,1,1,368.1481481,1.053092,1,254.1995327,6129.815482,FIR,0,0,1,true,true,false
 110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,true,true,false
-110007,202002,200,19,,,1,1,1,1.093104,0.875981535,51.7444166,2820.954873,FIC,0,0,0,true,true,true
+110007,202002,200,19,,,1,1,1,1.093105,0.875981535,51.7444166,2820.954873,FIC,0,0,0,true,true,true
 110007,202003,200,19,,,1,1,368.1481481,1.053092,1,254.1995327,2970.723599,FIC,0,0,1,true,true,false
 110001,201901,100,89,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
 110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index 7739bf59..480070a1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,40 +1,40 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772802559,142.3186593,1,1.932421355,109.179259,8444,R,0,9,11,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7476,R,9,9,11,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,2003,R,9,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772802559,142.3186593,1,1.932421355,109.179259,9343,R,0,9,11,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,7818,R,9,9,11,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,4897,R,9,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772802559,142.3186593,1,1.932421355,109.179259,7511,R,0,9,11,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1761,R,9,9,11,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,6492,R,9,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772802559,142.3186593,1,1.932421355,109.179259,64,R,0,9,11,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2113,R,9,9,11,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,185,R,9,0,11,true,,false,true,false
-30005,202001,100,5,,0.941234172,1,1.772802559,142.3186593,1,1.932421355,109.179259,844,R,0,9,11,,true,true,false,false
-30005,202002,100,5,1.062434865,3.199201198,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,897,R,9,9,11,true,true,false,false,false
-30005,202003,100,5,0.312578027,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,280,R,9,0,11,true,,false,true,false
-30006,202001,100,14,,0.995885563,1,1.772802559,142.3186593,1,1.932421355,109.179259,1869,R,0,9,11,,true,true,false,false
-30006,202002,100,14,1.004131435,1.368417982,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1876,R,9,9,11,true,true,false,false,false
-30006,202003,100,14,0.730770871,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1371,R,9,0,11,true,,false,true,false
-30007,202001,100,12,,4.475816911,1,1.772802559,142.3186593,1,1.932421355,109.179259,12769,R,0,9,11,,true,true,false,false
-30007,202002,100,12,0.223422901,0.248269056,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,2853,R,9,9,11,true,true,false,false,false
-30007,202003,100,12,4.027888195,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,11491,R,9,0,11,true,,false,true,false
-30008,202001,100,162,,0.023463069,1,1.772802559,142.3186593,1,1.932421355,109.179259,141,R,0,9,11,,true,true,false,false
-30008,202002,100,162,42.62017045,13.86213906,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,6001,R,9,9,11,true,true,false,false,false
-30008,202003,100,162,0.072138939,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,433,R,9,0,11,true,,false,true,false
-30009,202001,100,26,,1.589639934,1,1.772802559,142.3186593,1,1.932421355,109.179259,6417,R,0,9,11,,true,true,false,false
-30009,202002,100,26,0.629073275,3.053782962,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,4037,R,9,9,11,true,true,false,false,false
-30009,202003,100,26,0.327462695,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,1322,R,9,0,11,true,,false,true,false
-30010,202001,100,144,,1.332623847,1,1.772802559,142.3186593,1,1.932421355,109.179259,28963,R,0,9,11,,true,true,false,false
-30010,202002,100,144,0.750399298,2.064295653,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,21734,R,9,9,11,true,true,false,false,false
-30010,202003,100,144,0.484426733,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,10529,R,9,0,11,true,,false,true,false
-30011,202001,100,5,,5.249464902,1,1.772802559,142.3186593,1,1.932421355,109.179259,6009,R,0,9,11,,true,true,false,false
-30011,202002,100,5,0.190495606,0.226047443,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,1145,R,9,9,11,true,true,false,false,false
-30011,202003,100,5,4.423850085,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,5064,R,9,0,11,true,,false,true,false
-30012,202001,100,275,,,1,1.772802559,142.3186593,1,1.932421355,109.179259,30024.29623,C,0,9,11,,,true,false,false
-30012,202002,100,275,,,4.293520165,2.995081605,99.70786109,2.581847633,2.250333735,111.4377722,77518.15814,FIC,9,9,11,,,false,false,false
-30012,202003,100,275,,,1.172391173,1,76.13443331,1.60650325,1,80.47658257,124533.173,FIC,9,0,11,,,false,true,false
+30001,202001,100,51,,1.129481006,1,1.772778,142.26943,1,1.932409,109.154645,8444,R,0,9,11,,true,true,false,false
+30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,7476,R,9,9,11,true,true,false,false,false
+30001,202003,100,51,0.267924024,,1.172329,1,76.108808,1.606472,1,80.46377,2003,R,9,0,11,true,,false,true,false
+30002,202001,100,72,,1.195062676,1,1.772778,142.26943,1,1.932409,109.154645,9343,R,0,9,11,,true,true,false,false
+30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,7818,R,9,9,11,true,true,false,false,false
+30002,202003,100,72,0.626375032,,1.172329,1,76.108808,1.606472,1,80.46377,4897,R,9,0,11,true,,false,true,false
+30003,202001,100,7,,4.265190233,1,1.772778,142.26943,1,1.932409,109.154645,7511,R,0,9,11,,true,true,false,false
+30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,1761,R,9,9,11,true,true,false,false,false
+30003,202003,100,7,3.686541738,,1.172329,1,76.108808,1.606472,1,80.46377,6492,R,9,0,11,true,,false,true,false
+30004,202001,100,81,,0.030288689,1,1.772778,142.26943,1,1.932409,109.154645,64,R,0,9,11,,true,true,false,false
+30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,2113,R,9,9,11,true,true,false,false,false
+30004,202003,100,81,0.087553242,,1.172329,1,76.108808,1.606472,1,80.46377,185,R,9,0,11,true,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,1.772778,142.26943,1,1.932409,109.154645,844,R,0,9,11,,true,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,897,R,9,9,11,true,true,false,false,false
+30005,202003,100,5,0.312151616499443,,1.172329,1,76.108808,1.606472,1,80.46377,280,R,9,0,11,true,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,1.772778,142.26943,1,1.932409,109.154645,1869,R,0,9,11,,true,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,1876,R,9,9,11,true,true,false,false,false
+30006,202003,100,14,0.730810234541578,,1.172329,1,76.108808,1.606472,1,80.46377,1371,R,9,0,11,true,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,1.772778,142.26943,1,1.932409,109.154645,12769,R,0,9,11,,true,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,2853,R,9,9,11,true,true,false,false,false
+30007,202003,100,12,4.02769015071854,,1.172329,1,76.108808,1.606472,1,80.46377,11491,R,9,0,11,true,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,1.772778,142.26943,1,1.932409,109.154645,141,R,0,9,11,,false,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,6001,R,9,9,11,false,false,false,false,false
+30008,202003,100,162,0.0721546408931845,,1.172329,1,76.108808,1.606472,1,80.46377,433,R,9,0,11,false,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,1.772778,142.26943,1,1.932409,109.154645,6417,R,0,9,11,,true,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,4037,R,9,9,11,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,1.172329,1,76.108808,1.606472,1,80.46377,1322,R,9,0,11,true,,false,true,false
+30010,202001,100,144,,1.33261249654919,1,1.772778,142.26943,1,1.932409,109.154645,28963,R,0,9,11,,true,true,false,false
+30010,202002,100,144,0.750405690018299,2.06420362807484,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,21734,R,9,9,11,true,true,false,false,false
+30010,202003,100,144,0.484448329805834,,1.172329,1,76.108808,1.606472,1,80.46377,10529,R,9,0,11,true,,false,true,false
+30011,202001,100,5,,5.24803493449782,1,1.772778,142.26943,1,1.932409,109.154645,6009,R,0,9,11,,false,true,false,false
+30011,202002,100,5,0.190547512065235,0.226105845181675,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,1145,R,9,9,11,false,false,false,false,false
+30011,202003,100,5,4.42270742358079,,1.172329,1,76.108808,1.606472,1,80.46377,5064,R,9,0,11,false,,false,true,false
+30012,202001,100,275,,,1,1.772778,142.26943,1,1.932409,109.154645,30017.527245,C,0,9,11,,,true,false,false
+30012,202002,100,275,,,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,77500.725796,FIC,9,9,11,,,false,false,false
+30012,202003,100,275,,,1.172329,1,76.108808,1.606472,1,80.46377,124502.764316,FIC,9,0,11,,,false,true,false
 30001,201901,100,51,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
 30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
 30001,201903,100,51,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index f6039f70..72943bb4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -1,67 +1,67 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.036787797,1,1.504436071,128.8429705,1,1.798238111,102.4414146,9244,R,0,17,19,,true,true,,true,true,false,false
-90001,202002,100,89,0.964517525,1.43945754,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,8916,R,17,18,20,true,true,true,true,true,false,false,false
-90001,202003,100,89,0.694706146,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6194,R,18,0,21,true,,true,true,,false,true,false
-90002,202001,100,83,,0.817550398,1,1.504436071,128.8429705,1,1.798238111,102.4414146,4826,R,0,17,19,,true,true,,true,true,false,false
-90002,202002,100,83,1.223166183,1.244570947,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5903,R,17,18,20,true,true,true,true,true,false,false,false
-90002,202003,100,83,0.803489751,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4743,R,18,0,21,true,,true,true,,false,true,false
-90003,202001,100,4,,,1,1.504436071,128.8429705,1,1.798238111,102.4414146,7586,R,0,17,19,,true,false,,true,true,false,false
-90003,202002,100,4,,0.710986704,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1016,R,17,18,20,true,true,true,false,true,false,false,false
-90003,202003,100,4,1.406496063,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,1429,R,18,0,21,true,,true,true,,false,true,false
-90004,202001,100,76,,1.305847569,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3975,R,0,17,19,,true,true,,true,true,false,false
-90004,202002,100,76,0.765786164,0.82875034,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3044,R,17,18,20,true,true,true,true,true,false,false,false
-90004,202003,100,76,1.206636005,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3673,R,18,0,21,true,,true,true,,false,true,false
-90005,202001,100,18,,0.622072678,1,1.504436071,128.8429705,1,1.798238111,102.4414146,1941,R,0,17,19,,true,true,,true,true,false,false
-90005,202002,100,18,1.607529208,2.583641738,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3121,R,17,18,20,true,true,true,true,true,false,false,false
-90005,202003,100,18,0.387050567,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,1208,R,18,0,21,true,,true,true,,false,true,false
-90006,202001,100,94,,0.763047038,1,1.504436071,128.8429705,1,1.798238111,102.4414146,5405,R,0,17,19,,true,true,,true,true,false,false
-90006,202002,100,94,1.310535196,1.422366796,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,7084,R,17,18,20,true,true,true,true,true,false,false,false
-90006,202003,100,94,0.703053532,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4980,R,18,0,21,true,,true,true,,false,true,false
-90007,202001,100,8,,5.333239595,1,1.504436071,128.8429705,1,1.798238111,102.4414146,15172,R,0,17,19,,true,true,,true,true,false,false
-90007,202002,100,8,0.187503296,0.812556233,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,2845,R,17,18,20,true,true,true,true,true,false,false,false
-90007,202003,100,8,1.230684055,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3501,R,18,0,21,true,,true,true,,false,true,false
-90008,202001,100,304,,1.129530598,1,1.504436071,128.8429705,1,1.798238111,102.4414146,16298,R,0,17,19,,true,true,,true,true,false,false
-90008,202002,100,304,0.885323516,1.009357249,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,14429,R,17,18,20,true,true,true,true,true,false,false,false
-90008,202003,100,304,0.990729498,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,14295,R,18,0,21,true,,true,true,,false,true,false
-90009,202001,100,45,,0.740562712,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3698,R,0,17,19,,true,true,,true,true,false,false
-90009,202002,100,45,1.350324535,1.185435621,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4993,R,17,18,20,true,true,true,true,true,false,false,false
-90009,202003,100,45,0.843571749,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,4212,R,18,0,21,true,,true,true,,false,true,false
-90010,202001,100,100,,0.760511998,1,1.504436071,128.8429705,1,1.798238111,102.4414146,7722,R,0,17,19,,true,true,,true,true,false,false
-90010,202002,100,100,1.314903647,1.551204368,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,10153,R,17,18,20,true,true,true,true,true,false,false,false
-90010,202003,100,100,0.644660382,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6545,R,18,0,21,true,,true,true,,false,true,false
-90011,202001,100,19,,8.365866031,1,1.504436071,128.8429705,1,1.798238111,102.4414146,30344,R,0,17,19,,true,true,,true,true,false,false
-90011,202002,100,19,0.119533351,0.497690693,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,3627,R,17,18,20,true,true,true,true,true,false,false,false
-90011,202003,100,19,2.00928009,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,7288,R,18,0,21,true,,true,true,,false,true,false
-90012,202001,100,304,,1.408940798,1,1.504436071,128.8429705,1,1.798238111,102.4414146,16298,R,0,17,19,,true,true,,true,true,false,false
-90012,202002,100,304,0.70975303,0.857831504,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,11567,R,17,18,20,true,true,true,true,true,false,false,false
-90012,202003,100,304,1.165730094,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,13484,R,18,0,21,true,,true,true,,false,true,false
-90013,202001,100,54,,1.106799294,1,1.504436071,128.8429705,1,1.798238111,102.4414146,20190,R,0,17,19,,true,true,,true,true,false,false
-90013,202002,100,54,0.903506178,0.632817595,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,18242,R,17,18,20,true,true,true,true,true,false,false,false
-90013,202003,100,54,1.58023419,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,28826,R,18,0,21,true,,true,true,,false,true,false
-90014,202001,100,47,,0.845985046,1,1.504436071,128.8429705,1,1.798238111,102.4414146,4260,R,0,17,19,,true,true,,true,true,false,false
-90014,202002,100,42,1.182053991,0.776557765,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,5036,R,17,18,20,true,true,true,true,true,false,false,false
-90014,202003,100,42,1.28773421,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,6484,R,18,0,21,true,,true,true,,false,true,false
-90015,202001,100,57,,3.886845827,1,1.504436071,128.8429705,1,1.798238111,102.4414146,19236,R,0,17,19,,true,true,,true,true,false,false
-90015,202002,100,57,0.25727802,1.396267404,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,4949,R,17,18,20,true,true,true,true,true,false,false,false
-90015,202003,100,57,0.716195191,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,3544,R,18,0,21,true,,true,true,,false,true,false
-90016,202001,100,163,,0.906730921,1,1.504436071,128.8429705,1,1.798238111,102.4414146,14902,R,0,17,19,,true,true,,true,true,false,false
-90016,202002,100,163,1.102863018,0.666628808,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,16435,R,17,18,20,true,true,true,true,true,false,false,false
-90016,202003,100,163,1.500085186,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,24653,R,18,0,21,true,,true,true,,false,true,false
-90017,202001,100,149,,0.702275751,1,1.504436071,128.8429705,1,1.798238111,102.4414146,35476,R,0,17,19,,true,true,,true,true,false,false
-90017,202002,100,149,1.42394209,0.944611909,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,50515,R,17,18,20,true,true,true,true,true,false,false,false
-90017,202003,100,149,1.058635817,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,53477,R,18,0,21,true,,true,true,,false,true,false
-90018,202001,100,126,,0.543204684,1,1.504436071,128.8429705,1,1.798238111,102.4414146,13845,R,0,17,19,,true,true,,true,true,false,false
-90018,202002,100,126,1.840926688,0.929916997,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,25488,R,17,18,20,true,true,true,true,true,false,false,false
-90018,202003,100,126,1.075364795,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,27409,R,18,0,21,true,,true,true,,false,true,false
-90019,202001,100,6,,2.530969376,1,1.504436071,128.8429705,1,1.798238111,102.4414146,1099,R,0,17,19,,true,true,,true,true,false,false
-90019,202002,100,6,0.395105531,3.51659919,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,434,R,17,18,20,true,true,true,true,true,false,false,false
-90019,202003,100,6,0.284365646,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,124,R,18,0,21,true,,true,true,,false,true,false
-90020,202001,100,22,,1.677715809,1,1.504436071,128.8429705,1,1.798238111,102.4414146,3348,R,0,17,19,,true,true,,true,true,false,false
-90020,202002,100,22,0.596048505,0.395102278,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,1996,R,17,18,20,true,true,true,true,true,false,false,false
-90020,202003,100,22,2.530990214,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,5051,R,18,0,21,true,,true,true,,false,true,false
-90021,202001,100,155,,,1,1.504436071,128.8429705,1,1.798238111,102.4414146,48979.92546,BI,0,17,19,,,,,,true,false,false
-90021,202002,100,155,,,0.95177292,1.082813901,113.3255814,0.91097401,1.294199883,118.2466324,27237.73074,BI,17,18,20,,,,,,false,false,false
-90021,202003,100,155,,,1.072463185,1,126.2596455,1.556539256,1,105.5391887,21046,R,18,0,21,,,true,,,false,true,false
+90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,1,1.798251,102.4414146,9244,R,0,17,19,,true,true,,true,true,false,false
+90001,202002,100,89,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,8916,R,17,18,20,true,true,true,true,true,false,false,false
+90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,1.556526,1,105.5391887,6194,R,18,0,21,true,,true,true,,false,true,false
+90002,202001,100,83,,0.81755039810266,1,1.504462,128.8429705,1,1.798251,102.4414146,4826,R,0,17,19,,true,true,,true,true,false,false
+90002,202002,100,83,1.22316618317447,1.24457094665823,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,5903,R,17,18,20,true,true,true,true,true,false,false,false
+90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,1.556526,1,105.5391887,4743,R,18,0,21,true,,true,true,,false,true,false
+90003,202001,100,4,,,1,1.504462,128.8429705,1,1.798251,102.4414146,7586,R,0,17,19,,,false,,true,true,false,false
+90003,202002,100,4,,0.710986703988803,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,1016,R,17,18,20,,true,true,false,true,false,false,false
+90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1.556526,1,105.5391887,1429,R,18,0,21,true,,true,true,,false,true,false
+90004,202001,100,76,,1.30584756898817,1,1.504462,128.8429705,1,1.798251,102.4414146,3975,R,0,17,19,,true,true,,true,true,false,false
+90004,202002,100,76,0.765786163522013,0.828750340321263,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,3044,R,17,18,20,true,true,true,true,true,false,false,false
+90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,1.556526,1,105.5391887,3673,R,18,0,21,true,,true,true,,false,true,false
+90005,202001,100,18,,0.62191605254726,1,1.504462,128.8429705,1,1.798251,102.4414146,1941,R,0,17,19,,true,true,,true,true,false,false
+90005,202002,100,18,1.60793405461103,2.58360927152318,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,3121,R,17,18,20,true,true,true,true,true,false,false,false
+90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1.556526,1,105.5391887,1208,R,18,0,21,true,,true,true,,false,true,false
+90006,202001,100,94,,0.762987012987013,1,1.504462,128.8429705,1,1.798251,102.4414146,5405,R,0,17,19,,true,true,,true,true,false,false
+90006,202002,100,94,1.31063829787234,1.42248995983936,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,7084,R,17,18,20,true,true,true,true,true,false,false,false
+90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,1.556526,1,105.5391887,4980,R,18,0,21,true,,true,true,,false,true,false
+90007,202001,100,8,,5.33286467486819,1,1.504462,128.8429705,1,1.798251,102.4414146,15172,R,0,17,19,,true,true,,true,true,false,false
+90007,202002,100,8,0.18751647772212,0.812624964295915,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,2845,R,17,18,20,true,true,true,true,true,false,false,false
+90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,1.556526,1,105.5391887,3501,R,18,0,21,true,,true,true,,false,true,false
+90008,202001,100,304,,1.12953080601566,1,1.504462,128.8429705,1,1.798251,102.4414146,16298,R,0,17,19,,true,true,,true,true,false,false
+90008,202002,100,304,0.885323352558596,1.00937390696048,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,14429,R,17,18,20,true,true,true,true,true,false,false,false
+90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,1.556526,1,105.5391887,14295,R,18,0,21,true,,true,true,,false,true,false
+90009,202001,100,45,,0.740636891648308,1,1.504462,128.8429705,1,1.798251,102.4414146,3698,R,0,17,19,,true,true,,true,true,false,false
+90009,202002,100,45,1.35018929150892,1.18542260208927,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,4993,R,17,18,20,true,true,true,true,true,false,false,false
+90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,1.556526,1,105.5391887,4212,R,18,0,21,true,,true,true,,false,true,false
+90010,202001,100,100,,0.76056338028169,1,1.504462,128.8429705,1,1.798251,102.4414146,7722,R,0,17,19,,true,true,,true,true,false,false
+90010,202002,100,100,1.31481481481481,1.55126050420168,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,10153,R,17,18,20,true,true,true,true,true,false,false,false
+90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,1.556526,1,105.5391887,6545,R,18,0,21,true,,true,true,,false,true,false
+90011,202001,100,19,,8.36614281775572,1,1.504462,128.8429705,1,1.798251,102.4414146,30344,R,0,17,19,,false,true,,true,true,false,false
+90011,202002,100,19,0.119529396256262,0.497667398463227,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,3627,R,17,18,20,false,true,true,true,true,false,false,false
+90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,1.556526,1,105.5391887,7288,R,18,0,21,true,,true,true,,false,true,false
+90012,202001,100,304,,1.40900838592548,1,1.504462,128.8429705,1,1.798251,102.4414146,16298,R,0,17,19,,true,true,,true,true,false,false
+90012,202002,100,304,0.709718983924408,0.857831504004746,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,11567,R,17,18,20,true,true,true,true,true,false,false,false
+90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,1.556526,1,105.5391887,13484,R,18,0,21,true,,true,true,,false,true,false
+90013,202001,100,54,,1.10678653656397,1,1.504462,128.8429705,1,1.798251,102.4414146,20190,R,0,17,19,,true,true,,true,true,false,false
+90013,202002,100,54,0.903516592372462,0.63283147158815,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,18242,R,17,18,20,true,true,true,true,true,false,false,false
+90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,1.556526,1,105.5391887,28826,R,18,0,21,true,,true,true,,false,true,false
+90014,202001,100,47,,0.845909451945989,1,1.504462,128.8429705,1,1.798251,102.4414146,4260,R,0,17,19,,true,true,,true,true,false,false
+90014,202002,100,42,1.18215962441315,0.776681061073411,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,5036,R,17,18,20,true,true,true,true,true,false,false,false
+90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,1.556526,1,105.5391887,6484,R,18,0,21,true,,true,true,,false,true,false
+90015,202001,100,57,,3.88684582743989,1,1.504462,128.8429705,1,1.798251,102.4414146,19236,R,0,17,19,,true,true,,true,true,false,false
+90015,202002,100,57,0.257278020378457,1.39644469525959,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,4949,R,17,18,20,true,true,true,true,true,false,false,false
+90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,1.556526,1,105.5391887,3544,R,18,0,21,true,,true,true,,false,true,false
+90016,202001,100,163,,0.906723456038941,1,1.504462,128.8429705,1,1.798251,102.4414146,14902,R,0,17,19,,true,true,,true,true,false,false
+90016,202002,100,163,1.10287209770501,0.666653145661786,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,16435,R,17,18,20,true,true,true,true,true,false,false,false
+90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,1.556526,1,105.5391887,24653,R,18,0,21,true,,true,true,,false,true,false
+90017,202001,100,149,,0.702286449569435,1,1.504462,128.8429705,1,1.798251,102.4414146,35476,R,0,17,19,,true,true,,true,true,false,false
+90017,202002,100,149,1.42392039688804,0.944611702227126,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,50515,R,17,18,20,true,true,true,true,true,false,false,false
+90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,1.556526,1,105.5391887,53477,R,18,0,21,true,,true,true,,false,true,false
+90018,202001,100,126,,0.543196798493409,1,1.504462,128.8429705,1,1.798251,102.4414146,13845,R,0,17,19,,false,true,,true,true,false,false
+90018,202002,100,126,1.8409534127844,0.929913532051516,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,25488,R,17,18,20,false,true,true,true,true,false,false,false
+90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,1.556526,1,105.5391887,27409,R,18,0,21,true,,true,true,,false,true,false
+90019,202001,100,6,,2.53225806451613,1,1.504462,128.8429705,1,1.798251,102.4414146,1099,R,0,17,19,,true,true,,true,true,false,false
+90019,202002,100,6,0.394904458598726,3.5,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,434,R,17,18,20,true,false,true,true,true,false,false,false
+90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,1.556526,1,105.5391887,124,R,18,0,21,false,,true,true,,false,true,false
+90020,202001,100,22,,1.67735470941884,1,1.504462,128.8429705,1,1.798251,102.4414146,3348,R,0,17,19,,true,true,,true,true,false,false
+90020,202002,100,22,0.596176821983274,0.395169273411206,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,1996,R,17,18,20,true,false,true,true,true,false,false,false
+90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,1.556526,1,105.5391887,5051,R,18,0,21,false,,true,true,,false,true,false
+90021,202001,100,155,,,1,1.504462,128.8429705,1,1.798251,102.4414146,48980.840128,BI,0,17,19,,,,,,true,false,false
+90021,202002,100,155,,,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,27238.042605,BI,17,18,20,,,,,,false,false,false
+90021,202003,100,155,,,1.072437,1,126.259645,1.556526,1,105.5391887,21046,R,18,0,21,,,true,,,false,true,false
 90001,201901,100,89,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
 90001,201902,100,89,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
 90001,201903,100,89,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index 5f86acfe..50aec530 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -5,35 +5,35 @@ identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,un
 30002,202001,100,72,,,1,1,61.12436116,1,1.82834015,81.41733933,9343,R,0,0,9,,false,true,,true,true,true,false
 30002,202002,100,72,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,false,false,true,true,true,true,true,false
 30002,202003,100,72,,,1,1,85.37820513,0.984115327,1,77.81978439,4897,R,0,0,10,false,,true,true,,true,true,false
-30003,202001,100,7,,4.265190233,1,1,61.12436116,1,1.82834015,81.41733933,7511,R,0,0,9,,false,true,,true,true,true,false
-30003,202002,100,7,0.234456131,0.271256932,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,false,false,true,true,true,true,true,false
-30003,202003,100,7,3.686541738,,1,1,85.37820513,0.984115327,1,77.81978439,6492,R,0,0,10,false,,true,true,,true,true,false
-30004,202001,100,81,,0.030288689,1,1,61.12436116,1,1.82834015,81.41733933,64,R,0,0,9,,false,true,,true,true,true,false
-30004,202002,100,81,33.015625,11.42162162,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,false,false,true,true,true,true,true,false
-30004,202003,100,81,0.087553242,,1,1,85.37820513,0.984115327,1,77.81978439,185,R,0,0,10,false,,true,true,,true,true,false
-30005,202001,100,5,,0.941234172,1,1,61.12436116,1,1.82834015,81.41733933,844,R,0,0,9,,false,true,,true,true,true,false
-30005,202002,100,5,1.062434865,3.199201198,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,false,false,true,true,true,true,true,false
-30005,202003,100,5,0.312578027,,1,1,85.37820513,0.984115327,1,77.81978439,280,R,0,0,10,false,,true,true,,true,true,false
-30006,202001,100,14,,0.995885563,1,1,61.12436116,1,1.82834015,81.41733933,1869,R,0,0,9,,false,true,,true,true,true,false
-30006,202002,100,14,1.004131435,1.368417982,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,false,false,true,true,true,true,true,false
-30006,202003,100,14,0.730770871,,1,1,85.37820513,0.984115327,1,77.81978439,1371,R,0,0,10,false,,true,true,,true,true,false
-30007,202001,100,12,,4.475816911,1,1,61.12436116,1,1.82834015,81.41733933,12769,R,0,0,9,,false,true,,true,true,true,false
-30007,202002,100,12,0.223422901,0.248269056,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,false,false,true,true,true,true,true,false
-30007,202003,100,12,4.027888195,,1,1,85.37820513,0.984115327,1,77.81978439,11491,R,0,0,10,false,,true,true,,true,true,false
-30008,202001,100,162,,0.023463069,1,1,61.12436116,1,1.82834015,81.41733933,141,R,0,0,9,,false,true,,true,true,true,false
-30008,202002,100,162,42.62017045,13.86213906,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,false,false,true,true,true,true,true,false
-30008,202003,100,162,0.072138939,,1,1,85.37820513,0.984115327,1,77.81978439,433,R,0,0,10,false,,true,true,,true,true,false
-30009,202001,100,26,,1.589639934,1,1,61.12436116,1,1.82834015,81.41733933,6417,R,0,0,9,,false,true,,true,true,true,false
-30009,202002,100,26,0.629073275,3.053782962,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,false,false,true,true,true,true,true,false
-30009,202003,100,26,0.327462695,,1,1,85.37820513,0.984115327,1,77.81978439,1322,R,0,0,10,false,,true,true,,true,true,false
+30003,202001,100,7,,4.26519023282226,1,1,61.12436116,1,1.82834015,81.41733933,7511,R,0,0,9,,false,true,,true,true,true,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,false,false,true,true,true,true,true,false
+30003,202003,100,7,3.68654173764906,,1,1,85.37820513,0.984115327,1,77.81978439,6492,R,0,0,10,false,,true,true,,true,true,false
+30004,202001,100,81,,0.0302886890676763,1,1,61.12436116,1,1.82834015,81.41733933,64,R,0,0,9,,false,true,,true,true,true,false
+30004,202002,100,81,33.015625,11.4216216216216,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,false,false,true,true,true,true,true,false
+30004,202003,100,81,0.0875532418362518,,1,1,85.37820513,0.984115327,1,77.81978439,185,R,0,0,10,false,,true,true,,true,true,false
+30005,202001,100,5,,0.940914158305463,1,1,61.12436116,1,1.82834015,81.41733933,844,R,0,0,9,,false,true,,true,true,true,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,false,false,true,true,true,true,true,false
+30005,202003,100,5,0.312151616499443,,1,1,85.37820513,0.984115327,1,77.81978439,280,R,0,0,10,false,,true,true,,true,true,false
+30006,202001,100,14,,0.996268656716418,1,1,61.12436116,1,1.82834015,81.41733933,1869,R,0,0,9,,false,true,,true,true,true,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,false,false,true,true,true,true,true,false
+30006,202003,100,14,0.730810234541578,,1,1,85.37820513,0.984115327,1,77.81978439,1371,R,0,0,10,false,,true,true,,true,true,false
+30007,202001,100,12,,4.47563967753242,1,1,61.12436116,1,1.82834015,81.41733933,12769,R,0,0,9,,false,true,,true,true,true,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,false,false,true,true,true,true,true,false
+30007,202003,100,12,4.02769015071854,,1,1,85.37820513,0.984115327,1,77.81978439,11491,R,0,0,10,false,,true,true,,true,true,false
+30008,202001,100,162,,0.0234960839860023,1,1,61.12436116,1,1.82834015,81.41733933,141,R,0,0,9,,false,true,,true,true,true,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,false,false,true,true,true,true,true,false
+30008,202003,100,162,0.0721546408931845,,1,1,85.37820513,0.984115327,1,77.81978439,433,R,0,0,10,false,,true,true,,true,true,false
+30009,202001,100,26,,1.58954669308893,1,1,61.12436116,1,1.82834015,81.41733933,6417,R,0,0,9,,false,true,,true,true,true,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,false,false,true,true,true,true,true,false
+30009,202003,100,26,0.327470894228387,,1,1,85.37820513,0.984115327,1,77.81978439,1322,R,0,0,10,false,,true,true,,true,true,false
 30010,202001,100,144,,,1,1,61.12436116,1,1.82834015,81.41733933,28963,R,0,0,9,,false,true,,true,true,true,false
 30010,202002,100,144,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,false,false,true,true,true,true,true,false
 30010,202003,100,144,,,1,1,85.37820513,0.984115327,1,77.81978439,10529,R,0,0,10,false,,true,true,,true,true,false
-30011,202001,100,5,,5.249464902,1,1,61.12436116,1,1.82834015,81.41733933,6009,R,0,0,9,,false,true,,true,true,true,false
-30011,202002,100,5,0.190495606,0.226047443,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,false,false,true,true,true,true,true,false
-30011,202003,100,5,4.423850085,,1,1,85.37820513,0.984115327,1,77.81978439,5064,R,0,0,10,false,,true,true,,true,true,false
-30012,202001,100,275,,0.034032235,1,1,61.12436116,1,1.82834015,81.41733933,256,R,0,0,9,,false,true,,true,true,true,false
-30012,202002,100,275,29.38390625,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,false,,true,true,,true,true,false
+30011,202001,100,5,,5.24803493449782,1,1,61.12436116,1,1.82834015,81.41733933,6009,R,0,0,9,,false,true,,true,true,true,false
+30011,202002,100,5,0.190547512065235,0.226105845181675,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,false,false,true,true,true,true,true,false
+30011,202003,100,5,4.42270742358079,,1,1,85.37820513,0.984115327,1,77.81978439,5064,R,0,0,10,false,,true,true,,true,true,false
+30012,202001,100,275,,0.0340335017282638,1,1,61.12436116,1,1.82834015,81.41733933,256,R,0,0,9,,false,true,,true,true,true,false
+30012,202002,100,275,29.3828125,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,false,,true,true,,true,true,false
 30012,202003,100,275,,,1,1,85.37820513,0.984115327,1,77.81978439,7402.515486,FIR,0,0,10,,,,,,true,true,false
 30001,201901,100,51,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
 30001,201902,100,51,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 27fab6d7..fb650e06 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -159,8 +159,8 @@ trim_threshold = 10
 weight = "0.5"
 weight_periodicity_multiplier = 12
 link_filter = "NOT(identifier = '90003' AND date = '202001')"
-lower_trim = 50
-upper_trim = 50
+lower_trim = 10
+upper_trim = 10
 trim_threshold = 10
 
 [scenarios.66_TB_50_50_weight_filtered_partial_default]

From cf6046defa5dcab520f6bbb038ac63830587f2f4 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 16:10:06 +0100
Subject: [PATCH 349/531] Make data frame comparer actually fail when data
 frames do not match

---
 tests/helpers.py | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/tests/helpers.py b/tests/helpers.py
index 1ef24e3e..94cc7e87 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -16,18 +16,23 @@ def check_df_equality(df1, df2):
     if msg:
         fail('\n'.join(msg))
 
-    df1 = df1.select(sorted(df1.columns)).alias("df1").withColumn("id", monotonically_increasing_id())
-    df2 = df2.select(sorted(df2.columns)).alias("df2").withColumn("id", monotonically_increasing_id())
+    col_list = sorted(df1.columns)
+    df1 = df1.select(col_list).alias("df1").withColumn("id", monotonically_increasing_id())
+    df2 = df2.select(col_list).alias("df2").withColumn("id", monotonically_increasing_id())
     filter_list = [
         ~col(f"df1.{name}").eqNullSafe(col(f"df2.{name}"))
-        for name in df1_cols
+        for name in col_list
     ]
     diff_df = (
         df1.join(df2, ["id"], "full")
-        .filter(reduce(lambda x, y: x & y, filter_list))
+        .filter(reduce(lambda x, y: x | y, filter_list))
+        .select(
+            *(col(f"df1.{name}").alias(f"df1_{name}") for name in col_list),
+            *(col(f"df2.{name}").alias(f"df2_{name}") for name in col_list)
+        )
     )
     if diff_df.count() > 0:
         diff_str = diff_df._jdf.showString(100, 100, False)
         fail(
-            "Mismatching rows in provided data frames:\n\n{diff_str}"
+            f"Mismatching rows in provided data frames:\n\n{diff_str}"
         )

From 46c242caf8f0203e2d7f90c5b7642a62ee228dcd Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 18 May 2023 17:09:06 +0100
Subject: [PATCH 350/531] Tests Adjustments - Unfinished

---
 ...weight_filtered_partial_default_output.csv | 72 +++++++++----------
 ...50_weight_filtered_full_default_output.csv | 72 +++++++++----------
 2 files changed, 72 insertions(+), 72 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
index 50aec530..502b0caf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
@@ -1,40 +1,40 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,,1,1,61.12436116,1,1.82834015,81.41733933,8444,R,0,0,9,,false,true,,true,true,true,false
-30001,202002,100,51,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7476,R,0,0,9,false,false,true,true,true,true,true,false
-30001,202003,100,51,,,1,1,85.37820513,0.984115327,1,77.81978439,2003,R,0,0,10,false,,true,true,,true,true,false
-30002,202001,100,72,,,1,1,61.12436116,1,1.82834015,81.41733933,9343,R,0,0,9,,false,true,,true,true,true,false
-30002,202002,100,72,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7818,R,0,0,9,false,false,true,true,true,true,true,false
-30002,202003,100,72,,,1,1,85.37820513,0.984115327,1,77.81978439,4897,R,0,0,10,false,,true,true,,true,true,false
-30003,202001,100,7,,4.26519023282226,1,1,61.12436116,1,1.82834015,81.41733933,7511,R,0,0,9,,false,true,,true,true,true,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1761,R,0,0,9,false,false,true,true,true,true,true,false
-30003,202003,100,7,3.68654173764906,,1,1,85.37820513,0.984115327,1,77.81978439,6492,R,0,0,10,false,,true,true,,true,true,false
-30004,202001,100,81,,0.0302886890676763,1,1,61.12436116,1,1.82834015,81.41733933,64,R,0,0,9,,false,true,,true,true,true,false
-30004,202002,100,81,33.015625,11.4216216216216,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2113,R,0,0,9,false,false,true,true,true,true,true,false
-30004,202003,100,81,0.0875532418362518,,1,1,85.37820513,0.984115327,1,77.81978439,185,R,0,0,10,false,,true,true,,true,true,false
-30005,202001,100,5,,0.940914158305463,1,1,61.12436116,1,1.82834015,81.41733933,844,R,0,0,9,,false,true,,true,true,true,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,1,1,48.04940375,0.8859251,1.065835865,61.48303521,897,R,0,0,9,false,false,true,true,true,true,true,false
-30005,202003,100,5,0.312151616499443,,1,1,85.37820513,0.984115327,1,77.81978439,280,R,0,0,10,false,,true,true,,true,true,false
-30006,202001,100,14,,0.996268656716418,1,1,61.12436116,1,1.82834015,81.41733933,1869,R,0,0,9,,false,true,,true,true,true,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1876,R,0,0,9,false,false,true,true,true,true,true,false
-30006,202003,100,14,0.730810234541578,,1,1,85.37820513,0.984115327,1,77.81978439,1371,R,0,0,10,false,,true,true,,true,true,false
-30007,202001,100,12,,4.47563967753242,1,1,61.12436116,1,1.82834015,81.41733933,12769,R,0,0,9,,false,true,,true,true,true,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,1,1,48.04940375,0.8859251,1.065835865,61.48303521,2853,R,0,0,9,false,false,true,true,true,true,true,false
-30007,202003,100,12,4.02769015071854,,1,1,85.37820513,0.984115327,1,77.81978439,11491,R,0,0,10,false,,true,true,,true,true,false
-30008,202001,100,162,,0.0234960839860023,1,1,61.12436116,1,1.82834015,81.41733933,141,R,0,0,9,,false,true,,true,true,true,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,1,1,48.04940375,0.8859251,1.065835865,61.48303521,6001,R,0,0,9,false,false,true,true,true,true,true,false
-30008,202003,100,162,0.0721546408931845,,1,1,85.37820513,0.984115327,1,77.81978439,433,R,0,0,10,false,,true,true,,true,true,false
-30009,202001,100,26,,1.58954669308893,1,1,61.12436116,1,1.82834015,81.41733933,6417,R,0,0,9,,false,true,,true,true,true,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,1,1,48.04940375,0.8859251,1.065835865,61.48303521,4037,R,0,0,9,false,false,true,true,true,true,true,false
-30009,202003,100,26,0.327470894228387,,1,1,85.37820513,0.984115327,1,77.81978439,1322,R,0,0,10,false,,true,true,,true,true,false
-30010,202001,100,144,,,1,1,61.12436116,1,1.82834015,81.41733933,28963,R,0,0,9,,false,true,,true,true,true,false
-30010,202002,100,144,,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,21734,R,0,0,9,false,false,true,true,true,true,true,false
-30010,202003,100,144,,,1,1,85.37820513,0.984115327,1,77.81978439,10529,R,0,0,10,false,,true,true,,true,true,false
-30011,202001,100,5,,5.24803493449782,1,1,61.12436116,1,1.82834015,81.41733933,6009,R,0,0,9,,false,true,,true,true,true,false
-30011,202002,100,5,0.190547512065235,0.226105845181675,1,1,48.04940375,0.8859251,1.065835865,61.48303521,1145,R,0,0,9,false,false,true,true,true,true,true,false
-30011,202003,100,5,4.42270742358079,,1,1,85.37820513,0.984115327,1,77.81978439,5064,R,0,0,10,false,,true,true,,true,true,false
-30012,202001,100,275,,0.0340335017282638,1,1,61.12436116,1,1.82834015,81.41733933,256,R,0,0,9,,false,true,,true,true,true,false
-30012,202002,100,275,29.3828125,,1,1,48.04940375,0.8859251,1.065835865,61.48303521,7522,R,0,0,9,false,,true,true,,true,true,false
-30012,202003,100,275,,,1,1,85.37820513,0.984115327,1,77.81978439,7402.515486,FIR,0,0,10,,,,,,true,true,false
+30001,202001,100,51,,,1,0.996269,61.124361,1,1.826474,81.41734,8444,R,0,1,9,,,false,,false,true,false,false
+30001,202002,100,51,,,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,7476,R,1,2,9,,,false,false,false,false,false,false
+30001,202003,100,51,,,0.529141,1,85.378205,0.748686,1,77.819785,2003,R,2,0,8,,,false,false,,false,true,false
+30002,202001,100,72,,,1,0.996269,61.124361,1,1.826474,81.41734,9343,R,0,1,9,,,false,,false,true,false,false
+30002,202002,100,72,,,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,7818,R,1,2,9,,,false,false,false,false,false,false
+30002,202003,100,72,,,0.529141,1,85.378205,0.748686,1,77.819785,4897,R,2,0,8,,,false,false,,false,true,false
+30003,202001,100,7,,4.26519023282226,1,0.996269,61.124361,1,1.826474,81.41734,7511,R,0,1,9,,false,true,,true,true,false,false
+30003,202002,100,7,0.234456131007855,0.271256931608133,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,1761,R,1,2,9,false,false,true,true,true,false,false,false
+30003,202003,100,7,3.68654173764906,,0.529141,1,85.378205,0.748686,1,77.819785,6492,R,2,0,8,false,,true,true,,false,true,false
+30004,202001,100,81,,0.0302886890676763,1,0.996269,61.124361,1,1.826474,81.41734,64,R,0,1,9,,false,true,,true,true,false,false
+30004,202002,100,81,33.015625,11.4216216216216,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,2113,R,1,2,9,false,false,true,true,true,false,false,false
+30004,202003,100,81,0.0875532418362518,,0.529141,1,85.378205,0.748686,1,77.819785,185,R,2,0,8,false,,true,true,,false,true,false
+30005,202001,100,5,,0.940914158305463,1,0.996269,61.124361,1,1.826474,81.41734,844,R,0,1,9,,false,true,,true,true,false,false
+30005,202002,100,5,1.06279620853081,3.20357142857143,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,897,R,1,2,9,false,false,true,true,true,false,false,false
+30005,202003,100,5,0.312151616499443,,0.529141,1,85.378205,0.748686,1,77.819785,280,R,2,0,8,false,,true,true,,false,true,false
+30006,202001,100,14,,0.996268656716418,1,0.996269,61.124361,1,1.826474,81.41734,1869,R,0,1,9,,true,true,,true,true,false,false
+30006,202002,100,14,1.00374531835206,1.36834427425237,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,1876,R,1,2,9,true,true,true,true,true,false,false,false
+30006,202003,100,14,0.730810234541578,,0.529141,1,85.378205,0.748686,1,77.819785,1371,R,2,0,8,true,,true,true,,false,true,false
+30007,202001,100,12,,4.47563967753242,1,0.996269,61.124361,1,1.826474,81.41734,12769,R,0,1,9,,false,true,,true,true,false,false
+30007,202002,100,12,0.223431748766544,0.248281263597598,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,2853,R,1,2,9,false,false,true,true,true,false,false,false
+30007,202003,100,12,4.02769015071854,,0.529141,1,85.378205,0.748686,1,77.819785,11491,R,2,0,8,false,,true,true,,false,true,false
+30008,202001,100,162,,0.0234960839860023,1,0.996269,61.124361,1,1.826474,81.41734,141,R,0,1,9,,false,true,,true,true,false,false
+30008,202002,100,162,42.5602836879433,13.8591224018476,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,6001,R,1,2,9,false,false,true,true,true,false,false,false
+30008,202003,100,162,0.0721546408931845,,0.529141,1,85.378205,0.748686,1,77.819785,433,R,2,0,8,false,,true,true,,false,true,false
+30009,202001,100,26,,1.58954669308893,1,0.996269,61.124361,1,1.826474,81.41734,6417,R,0,1,9,,false,true,,true,true,false,false
+30009,202002,100,26,0.629110176094748,3.05370650529501,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,4037,R,1,2,9,false,true,true,true,true,false,false,false
+30009,202003,100,26,0.327470894228387,,0.529141,1,85.378205,0.748686,1,77.819785,1322,R,2,0,8,true,,true,true,,false,true,false
+30010,202001,100,144,,,1,0.996269,61.124361,1,1.826474,81.41734,28963,R,0,1,9,,,false,,false,true,false,false
+30010,202002,100,144,,,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,21734,R,1,2,9,,,false,false,false,false,false,false
+30010,202003,100,144,,,0.529141,1,85.378205,0.748686,1,77.819785,10529,R,2,0,8,,,false,false,,false,true,false
+30011,202001,100,5,,5.24803493449782,1,0.996269,61.124361,1,1.826474,81.41734,6009,R,0,1,9,,false,true,,true,true,false,false
+30011,202002,100,5,0.190547512065235,0.226105845181675,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,1145,R,1,2,9,false,false,true,true,true,false,false,false
+30011,202003,100,5,4.42270742358079,,0.529141,1,85.378205,0.748686,1,77.819785,5064,R,2,0,8,false,,true,true,,false,true,false
+30012,202001,100,275,,0.0340335017282638,1,0.996269,61.124361,1,1.826474,81.41734,256,R,0,1,9,,false,true,,true,true,false,false
+30012,202002,100,275,29.3828125,,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,7522,R,1,2,9,false,,true,true,,false,false,false
+30012,202003,100,275,,,0.529141,1,85.378205,0.748686,1,77.819785,5631.614454,FIR,2,0,8,,,,,,false,true,false
 30001,201901,100,51,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
 30001,201902,100,51,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
 30001,201903,100,51,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index 1180517f..a29b5a1e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -1,40 +1,40 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,8444,R,0,0,9,,false,false,,false,true,true,true
-30001,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,7476,R,0,0,9,false,false,false,false,false,true,true,true
-30001,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,2003,R,0,0,10,false,,false,false,,true,true,true
-30002,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,9343,R,0,0,9,,false,false,,false,true,true,true
-30002,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,7818,R,0,0,9,false,false,false,false,false,true,true,true
-30002,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,4897,R,0,0,10,false,,false,false,,true,true,true
-30003,202001,100,0,,4.265190233,1,1,1,1,1.82834015,51.35515875,7511,R,0,0,9,,false,true,,true,true,true,true
-30003,202002,100,0,0.234456131,0.271256932,1,1,1,0.8859251,1.065835865,37.95833334,1761,R,0,0,9,false,false,true,true,true,true,true,true
-30003,202003,100,0,3.686541738,,1,1,1,0.984115327,1,35.63068182,6492,R,0,0,10,false,,true,true,,true,true,true
-30004,202001,100,0,,0.030288689,1,1,1,1,1.82834015,51.35515875,64,R,0,0,9,,false,true,,true,true,true,true
-30004,202002,100,0,33.015625,11.42162162,1,1,1,0.8859251,1.065835865,37.95833334,2113,R,0,0,9,false,false,true,true,true,true,true,true
-30004,202003,100,0,0.087553242,,1,1,1,0.984115327,1,35.63068182,185,R,0,0,10,false,,true,true,,true,true,true
-30005,202001,100,0,,0.941234172,1,1,1,1,1.82834015,51.35515875,844,R,0,0,9,,false,true,,true,true,true,true
-30005,202002,100,0,1.062434865,3.199201198,1,1,1,0.8859251,1.065835865,37.95833334,897,R,0,0,9,false,false,true,true,true,true,true,true
-30005,202003,100,0,0.312578027,,1,1,1,0.984115327,1,35.63068182,280,R,0,0,10,false,,true,true,,true,true,true
-30006,202001,100,0,,0.995885563,1,1,1,1,1.82834015,51.35515875,1869,R,0,0,9,,false,true,,true,true,true,true
-30006,202002,100,0,1.004131435,1.368417982,1,1,1,0.8859251,1.065835865,37.95833334,1876,R,0,0,9,false,false,true,true,true,true,true,true
-30006,202003,100,0,0.730770871,,1,1,1,0.984115327,1,35.63068182,1371,R,0,0,10,false,,true,true,,true,true,true
-30007,202001,100,0,,4.475816911,1,1,1,1,1.82834015,51.35515875,12769,R,0,0,9,,false,true,,true,true,true,true
-30007,202002,100,0,0.223422901,0.248269056,1,1,1,0.8859251,1.065835865,37.95833334,2853,R,0,0,9,false,false,true,true,true,true,true,true
-30007,202003,100,0,4.027888195,,1,1,1,0.984115327,1,35.63068182,11491,R,0,0,10,false,,true,true,,true,true,true
-30008,202001,100,0,,0.023463069,1,1,1,1,1.82834015,51.35515875,141,R,0,0,9,,false,true,,true,true,true,true
-30008,202002,100,0,42.62017045,13.86213906,1,1,1,0.8859251,1.065835865,37.95833334,6001,R,0,0,9,false,false,true,true,true,true,true,true
-30008,202003,100,0,0.072138939,,1,1,1,0.984115327,1,35.63068182,433,R,0,0,10,false,,true,true,,true,true,true
-30009,202001,100,0,,1.589639934,1,1,1,1,1.82834015,51.35515875,6417,R,0,0,9,,false,true,,true,true,true,true
-30009,202002,100,0,0.629073275,3.053782962,1,1,1,0.8859251,1.065835865,37.95833334,4037,R,0,0,9,false,false,true,true,true,true,true,true
-30009,202003,100,0,0.327462695,,1,1,1,0.984115327,1,35.63068182,1322,R,0,0,10,false,,true,true,,true,true,true
-30010,202001,100,0,,,1,1,1,1,1.82834015,51.35515875,28963,R,0,0,9,,false,false,,false,true,true,true
-30010,202002,100,0,,,1,1,1,0.8859251,1.065835865,37.95833334,21734,R,0,0,9,false,false,false,false,false,true,true,true
-30010,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,10529,R,0,0,10,false,,false,false,,true,true,true
-30011,202001,100,0,,5.249464902,1,1,1,1,1.82834015,51.35515875,6009,R,0,0,9,,false,true,,true,true,true,true
-30011,202002,100,0,0.190495606,0.226047443,1,1,1,0.8859251,1.065835865,37.95833334,1145,R,0,0,9,false,false,true,true,true,true,true,true
-30011,202003,100,0,4.423850085,,1,1,1,0.984115327,1,35.63068182,5064,R,0,0,10,false,,true,true,,true,true,true
-30012,202001,100,0,,0.034032235,1,1,1,1,1.82834015,51.35515875,256,R,0,0,9,,false,true,,true,true,true,true
-30012,202002,100,0,29.38390625,,1,1,1,0.8859251,1.065835865,37.95833334,7522,R,0,0,9,false,,true,true,,true,true,true
-30012,202003,100,0,,,1,1,1,0.984115327,1,35.63068182,7402.515486,FIR,0,0,10,,,,,,true,true,true
+30001,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,8444,R,0,1,9,,false,false,,false,true,true,true
+30001,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.95833334,7476,R,1,2,9,false,false,false,false,false,true,true,true
+30001,202003,100,0,,,1,1,1,0.748686,1,35.63068182,2003,R,2,0,8,false,,false,false,,true,true,true
+30002,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,9343,R,0,1,9,,false,false,,false,true,true,true
+30002,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.95833334,7818,R,1,2,9,false,false,false,false,false,true,true,true
+30002,202003,100,0,,,1,1,1,0.748686,1,35.63068182,4897,R,2,0,8,false,,false,false,,true,true,true
+30003,202001,100,0,,4.26519023282226,1,0.996269,1,1,1.826474,51.35515875,7511,R,0,1,9,,false,true,,true,true,true,true
+30003,202002,100,0,0.234456131007855,0.271256931608133,1.003745,2.211025,1,0.887798,1.671349,37.95833334,1761,R,1,2,9,false,false,true,true,true,true,true,true
+30003,202003,100,0,3.68654173764906,,1,1,1,0.748686,1,35.63068182,6492,R,2,0,8,false,,true,true,,true,true,true
+30004,202001,100,0,,0.0302886890676763,1,0.996269,1,1,1.826474,51.35515875,64,R,0,1,9,,false,true,,true,true,true,true
+30004,202002,100,0,33.015625,11.4216216216216,1.003745,2.211025,1,0.887798,1.671349,37.95833334,2113,R,1,2,9,false,false,true,true,true,true,true,true
+30004,202003,100,0,0.0875532418362518,,1,1,1,0.748686,1,35.63068182,185,R,2,0,8,false,,true,true,,true,true,true
+30005,202001,100,0,,0.940914158305463,1,0.996269,1,1,1.826474,51.35515875,844,R,0,1,9,,false,true,,true,true,true,true
+30005,202002,100,0,1.06279620853081,3.20357142857143,1.003745,2.211025,1,0.887798,1.671349,37.95833334,897,R,1,2,9,false,false,true,true,true,true,true,true
+30005,202003,100,0,0.312151616499443,,1,1,1,0.748686,1,35.63068182,280,R,2,0,8,false,,true,true,,true,true,true
+30006,202001,100,0,,0.996268656716418,1,0.996269,1,1,1.826474,51.35515875,1869,R,0,1,9,,false,true,,true,true,true,true
+30006,202002,100,0,1.00374531835206,1.36834427425237,1.003745,2.211025,1,0.887798,1.671349,37.95833334,1876,R,1,2,9,false,false,true,true,true,true,true,true
+30006,202003,100,0,0.730810234541578,,1,1,1,0.748686,1,35.63068182,1371,R,2,0,8,false,,true,true,,true,true,true
+30007,202001,100,0,,4.47563967753242,1,0.996269,1,1,1.826474,51.35515875,12769,R,0,1,9,,false,true,,true,true,true,true
+30007,202002,100,0,0.223431748766544,0.248281263597598,1.003745,2.211025,1,0.887798,1.671349,37.95833334,2853,R,1,2,9,false,false,true,true,true,true,true,true
+30007,202003,100,0,4.02769015071854,,1,1,1,0.748686,1,35.63068182,11491,R,2,0,8,false,,true,true,,true,true,true
+30008,202001,100,0,,0.0234960839860023,1,0.996269,1,1,1.826474,51.35515875,141,R,0,1,9,,false,true,,true,true,true,true
+30008,202002,100,0,42.5602836879433,13.8591224018476,1.003745,2.211025,1,0.887798,1.671349,37.95833334,6001,R,1,2,9,false,false,true,true,true,true,true,true
+30008,202003,100,0,0.0721546408931845,,1,1,1,0.748686,1,35.63068182,433,R,2,0,8,false,,true,true,,true,true,true
+30009,202001,100,0,,1.58954669308893,1,0.996269,1,1,1.826474,51.35515875,6417,R,0,1,9,,false,true,,true,true,true,true
+30009,202002,100,0,0.629110176094748,3.05370650529501,1.003745,2.211025,1,0.887798,1.671349,37.95833334,4037,R,1,2,9,false,false,true,true,true,true,true,true
+30009,202003,100,0,0.327470894228387,,1,1,1,0.748686,1,35.63068182,1322,R,2,0,8,false,,true,true,,true,true,true
+30010,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,28963,R,0,1,9,,false,false,,false,true,true,true
+30010,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.95833334,21734,R,1,2,9,false,false,false,false,false,true,true,true
+30010,202003,100,0,,,1,1,1,0.748686,1,35.63068182,10529,R,2,0,8,false,,false,false,,true,true,true
+30011,202001,100,0,,5.24803493449782,1,0.996269,1,1,1.826474,51.35515875,6009,R,0,1,9,,false,true,,true,true,true,true
+30011,202002,100,0,0.190547512065235,0.226105845181675,1.003745,2.211025,1,0.887798,1.671349,37.95833334,1145,R,1,2,9,false,false,true,true,true,true,true,true
+30011,202003,100,0,4.42270742358079,,1,1,1,0.748686,1,35.63068182,5064,R,2,0,8,false,,true,true,,true,true,true
+30012,202001,100,0,,0.0340335017282638,1,0.996269,1,1,1.826474,51.35515875,256,R,0,1,9,,false,true,,true,true,true,true
+30012,202002,100,0,29.3828125,,1.003745,2.211025,1,0.887798,1.671349,37.95833334,7522,R,1,2,9,false,,true,true,,true,true,true
+30012,202003,100,0,,,1,1,1,0.748686,1,35.63068182,7402.515486,FIR,2,0,8,,,,,,true,true,true
 30001,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
 30001,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
 30001,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,

From bf9cbfe7c42c1f7134c7a4391d44f7d0f8b4662a Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 17:09:04 +0100
Subject: [PATCH 351/531] test comparison improvements

---
 tests/helpers.py                   | 34 +++++++++++++++++++++++++++---
 tests/imputation/test_scenarios.py |  3 ++-
 2 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/tests/helpers.py b/tests/helpers.py
index 94cc7e87..d0932c8a 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -1,7 +1,11 @@
 from pytest import fail
-from pyspark.sql.functions import col, monotonically_increasing_id
+from pyspark.sql.functions import col, count, monotonically_increasing_id, when
 from functools import reduce
-def check_df_equality(df1, df2):
+def check_df_equality(df1, df2, keep_cols=None):
+    if keep_cols is None:
+        keep_cols = []
+    else:
+        keep_cols = list(keep_cols)
     msg = []
     df1_cols = set(df1.columns)
     df2_cols = set(df2.columns)
@@ -31,7 +35,31 @@ def check_df_equality(df1, df2):
             *(col(f"df2.{name}").alias(f"df2_{name}") for name in col_list)
         )
     )
-    if diff_df.count() > 0:
+    diff_count = diff_df.count()
+    if diff_count > 0:
+        # Drop any columns where all values are equal as we don't need these
+        # in our output.
+        # This expression should only return 1 row so will scale.
+        equal_counts = diff_df.select(
+            [
+                count(
+                    when(col(f"df1_{c}").eqNullSafe(col(f"df2_{c}")), c)
+                ).alias(c)
+                for c in col_list
+            ]
+        ).collect()[0].asDict()
+        drop_cols = [
+            k for k, v in equal_counts.items()
+            if v == diff_count and k not in keep_cols
+        ]
+        diff_df = diff_df.drop(
+            *[f"df1_{c}" for c in drop_cols],
+            *[f"df_2{c}" for c in drop_cols]
+        )
+
+        if keep_cols:
+            diff_df = diff_df.sort([f"df1_{c}" for c in keep_cols] + [f"df2_{c}" for c in keep_cols])
+
         diff_str = diff_df._jdf.showString(100, 100, False)
         fail(
             f"Mismatching rows in provided data frames:\n\n{diff_str}"
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 09cc161d..cae48735 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -116,5 +116,6 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]
     check_df_equality(
         scenario_actual_output.sort(sort_col_list).select(select_cols),
-        scenario_expected_output.sort(sort_col_list).select(select_cols)
+        scenario_expected_output.sort(sort_col_list).select(select_cols),
+        keep_cols=sort_col_list
     )

From 49ba900b3e6556908e7597a224aefd87b4a6d61b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 17:14:40 +0100
Subject: [PATCH 352/531] Fix incorrect drop logic in df comparer

---
 tests/helpers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/helpers.py b/tests/helpers.py
index d0932c8a..b0f769d9 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -54,7 +54,7 @@ def check_df_equality(df1, df2, keep_cols=None):
         ]
         diff_df = diff_df.drop(
             *[f"df1_{c}" for c in drop_cols],
-            *[f"df_2{c}" for c in drop_cols]
+            *[f"df2_{c}" for c in drop_cols]
         )
 
         if keep_cols:

From bcf5c3e3a5f0e02f91e1c8058bbe792d40d707cf Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 18 May 2023 17:50:38 +0100
Subject: [PATCH 353/531] Test Fixes

---
 ...50_weight_filtered_full_default_output.csv | 72 +++++++++----------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
index a29b5a1e..8b9b1157 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
@@ -1,40 +1,40 @@
 identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,8444,R,0,1,9,,false,false,,false,true,true,true
-30001,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.95833334,7476,R,1,2,9,false,false,false,false,false,true,true,true
-30001,202003,100,0,,,1,1,1,0.748686,1,35.63068182,2003,R,2,0,8,false,,false,false,,true,true,true
-30002,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,9343,R,0,1,9,,false,false,,false,true,true,true
-30002,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.95833334,7818,R,1,2,9,false,false,false,false,false,true,true,true
-30002,202003,100,0,,,1,1,1,0.748686,1,35.63068182,4897,R,2,0,8,false,,false,false,,true,true,true
-30003,202001,100,0,,4.26519023282226,1,0.996269,1,1,1.826474,51.35515875,7511,R,0,1,9,,false,true,,true,true,true,true
-30003,202002,100,0,0.234456131007855,0.271256931608133,1.003745,2.211025,1,0.887798,1.671349,37.95833334,1761,R,1,2,9,false,false,true,true,true,true,true,true
-30003,202003,100,0,3.68654173764906,,1,1,1,0.748686,1,35.63068182,6492,R,2,0,8,false,,true,true,,true,true,true
-30004,202001,100,0,,0.0302886890676763,1,0.996269,1,1,1.826474,51.35515875,64,R,0,1,9,,false,true,,true,true,true,true
-30004,202002,100,0,33.015625,11.4216216216216,1.003745,2.211025,1,0.887798,1.671349,37.95833334,2113,R,1,2,9,false,false,true,true,true,true,true,true
-30004,202003,100,0,0.0875532418362518,,1,1,1,0.748686,1,35.63068182,185,R,2,0,8,false,,true,true,,true,true,true
-30005,202001,100,0,,0.940914158305463,1,0.996269,1,1,1.826474,51.35515875,844,R,0,1,9,,false,true,,true,true,true,true
-30005,202002,100,0,1.06279620853081,3.20357142857143,1.003745,2.211025,1,0.887798,1.671349,37.95833334,897,R,1,2,9,false,false,true,true,true,true,true,true
-30005,202003,100,0,0.312151616499443,,1,1,1,0.748686,1,35.63068182,280,R,2,0,8,false,,true,true,,true,true,true
-30006,202001,100,0,,0.996268656716418,1,0.996269,1,1,1.826474,51.35515875,1869,R,0,1,9,,false,true,,true,true,true,true
-30006,202002,100,0,1.00374531835206,1.36834427425237,1.003745,2.211025,1,0.887798,1.671349,37.95833334,1876,R,1,2,9,false,false,true,true,true,true,true,true
-30006,202003,100,0,0.730810234541578,,1,1,1,0.748686,1,35.63068182,1371,R,2,0,8,false,,true,true,,true,true,true
-30007,202001,100,0,,4.47563967753242,1,0.996269,1,1,1.826474,51.35515875,12769,R,0,1,9,,false,true,,true,true,true,true
-30007,202002,100,0,0.223431748766544,0.248281263597598,1.003745,2.211025,1,0.887798,1.671349,37.95833334,2853,R,1,2,9,false,false,true,true,true,true,true,true
-30007,202003,100,0,4.02769015071854,,1,1,1,0.748686,1,35.63068182,11491,R,2,0,8,false,,true,true,,true,true,true
-30008,202001,100,0,,0.0234960839860023,1,0.996269,1,1,1.826474,51.35515875,141,R,0,1,9,,false,true,,true,true,true,true
-30008,202002,100,0,42.5602836879433,13.8591224018476,1.003745,2.211025,1,0.887798,1.671349,37.95833334,6001,R,1,2,9,false,false,true,true,true,true,true,true
-30008,202003,100,0,0.0721546408931845,,1,1,1,0.748686,1,35.63068182,433,R,2,0,8,false,,true,true,,true,true,true
-30009,202001,100,0,,1.58954669308893,1,0.996269,1,1,1.826474,51.35515875,6417,R,0,1,9,,false,true,,true,true,true,true
-30009,202002,100,0,0.629110176094748,3.05370650529501,1.003745,2.211025,1,0.887798,1.671349,37.95833334,4037,R,1,2,9,false,false,true,true,true,true,true,true
-30009,202003,100,0,0.327470894228387,,1,1,1,0.748686,1,35.63068182,1322,R,2,0,8,false,,true,true,,true,true,true
-30010,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,28963,R,0,1,9,,false,false,,false,true,true,true
-30010,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.95833334,21734,R,1,2,9,false,false,false,false,false,true,true,true
-30010,202003,100,0,,,1,1,1,0.748686,1,35.63068182,10529,R,2,0,8,false,,false,false,,true,true,true
-30011,202001,100,0,,5.24803493449782,1,0.996269,1,1,1.826474,51.35515875,6009,R,0,1,9,,false,true,,true,true,true,true
-30011,202002,100,0,0.190547512065235,0.226105845181675,1.003745,2.211025,1,0.887798,1.671349,37.95833334,1145,R,1,2,9,false,false,true,true,true,true,true,true
-30011,202003,100,0,4.42270742358079,,1,1,1,0.748686,1,35.63068182,5064,R,2,0,8,false,,true,true,,true,true,true
-30012,202001,100,0,,0.0340335017282638,1,0.996269,1,1,1.826474,51.35515875,256,R,0,1,9,,false,true,,true,true,true,true
-30012,202002,100,0,29.3828125,,1.003745,2.211025,1,0.887798,1.671349,37.95833334,7522,R,1,2,9,false,,true,true,,true,true,true
-30012,202003,100,0,,,1,1,1,0.748686,1,35.63068182,7402.515486,FIR,2,0,8,,,,,,true,true,true
+30001,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,8444,R,0,1,9,,,false,,false,true,false,true
+30001,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.958334,7476,R,1,2,9,,,false,false,false,false,false,true
+30001,202003,100,0,,,0.529141,1,1,0.748686,1,35.63068182,2003,R,2,0,8,,,false,false,,false,true,true
+30002,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,9343,R,0,1,9,,,false,,false,true,false,true
+30002,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.958334,7818,R,1,2,9,,,false,false,false,false,false,true
+30002,202003,100,0,,,0.529141,1,1,0.748686,1,35.63068182,4897,R,2,0,8,,,false,false,,false,true,true
+30003,202001,100,0,,4.26519023282226,1,0.996269,1,1,1.826474,51.35515875,7511,R,0,1,9,,false,true,,true,true,false,true
+30003,202002,100,0,0.234456131007855,0.271256931608133,1.003745,2.211025,1,0.887798,1.671349,37.958334,1761,R,1,2,9,false,false,true,true,true,false,false,true
+30003,202003,100,0,3.68654173764906,,0.529141,1,1,0.748686,1,35.63068182,6492,R,2,0,8,false,,true,true,,false,true,true
+30004,202001,100,0,,0.0302886890676763,1,0.996269,1,1,1.826474,51.35515875,64,R,0,1,9,,false,true,,true,true,false,true
+30004,202002,100,0,33.015625,11.4216216216216,1.003745,2.211025,1,0.887798,1.671349,37.958334,2113,R,1,2,9,false,false,true,true,true,false,false,true
+30004,202003,100,0,0.0875532418362518,,0.529141,1,1,0.748686,1,35.63068182,185,R,2,0,8,false,,true,true,,false,true,true
+30005,202001,100,0,,0.940914158305463,1,0.996269,1,1,1.826474,51.35515875,844,R,0,1,9,,false,true,,true,true,false,true
+30005,202002,100,0,1.06279620853081,3.20357142857143,1.003745,2.211025,1,0.887798,1.671349,37.958334,897,R,1,2,9,false,false,true,true,true,false,false,true
+30005,202003,100,0,0.312151616499443,,0.529141,1,1,0.748686,1,35.63068182,280,R,2,0,8,false,,true,true,,false,true,true
+30006,202001,100,0,,0.996268656716418,1,0.996269,1,1,1.826474,51.35515875,1869,R,0,1,9,,true,true,,true,true,false,true
+30006,202002,100,0,1.00374531835206,1.36834427425237,1.003745,2.211025,1,0.887798,1.671349,37.958334,1876,R,1,2,9,true,true,true,true,true,false,false,true
+30006,202003,100,0,0.730810234541578,,0.529141,1,1,0.748686,1,35.63068182,1371,R,2,0,8,true,,true,true,,false,true,true
+30007,202001,100,0,,4.47563967753242,1,0.996269,1,1,1.826474,51.35515875,12769,R,0,1,9,,false,true,,true,true,false,true
+30007,202002,100,0,0.223431748766544,0.248281263597598,1.003745,2.211025,1,0.887798,1.671349,37.958334,2853,R,1,2,9,false,false,true,true,true,false,false,true
+30007,202003,100,0,4.02769015071854,,0.529141,1,1,0.748686,1,35.63068182,11491,R,2,0,8,false,,true,true,,false,true,true
+30008,202001,100,0,,0.0234960839860023,1,0.996269,1,1,1.826474,51.35515875,141,R,0,1,9,,false,true,,true,true,false,true
+30008,202002,100,0,42.5602836879433,13.8591224018476,1.003745,2.211025,1,0.887798,1.671349,37.958334,6001,R,1,2,9,false,false,true,true,true,false,false,true
+30008,202003,100,0,0.0721546408931845,,0.529141,1,1,0.748686,1,35.63068182,433,R,2,0,8,false,,true,true,,false,true,true
+30009,202001,100,0,,1.58954669308893,1,0.996269,1,1,1.826474,51.35515875,6417,R,0,1,9,,false,true,,true,true,false,true
+30009,202002,100,0,0.629110176094748,3.05370650529501,1.003745,2.211025,1,0.887798,1.671349,37.958334,4037,R,1,2,9,false,true,true,true,true,false,false,true
+30009,202003,100,0,0.327470894228387,,0.529141,1,1,0.748686,1,35.63068182,1322,R,2,0,8,true,,true,true,,false,true,true
+30010,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,28963,R,0,1,9,,,false,,false,true,false,true
+30010,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.958334,21734,R,1,2,9,,,false,false,false,false,false,true
+30010,202003,100,0,,,0.529141,1,1,0.748686,1,35.63068182,10529,R,2,0,8,,,false,false,,false,true,true
+30011,202001,100,0,,5.24803493449782,1,0.996269,1,1,1.826474,51.35515875,6009,R,0,1,9,,false,true,,true,true,false,true
+30011,202002,100,0,0.190547512065235,0.226105845181675,1.003745,2.211025,1,0.887798,1.671349,37.958334,1145,R,1,2,9,false,false,true,true,true,false,false,true
+30011,202003,100,0,4.42270742358079,,0.529141,1,1,0.748686,1,35.63068182,5064,R,2,0,8,false,,true,true,,false,true,true
+30012,202001,100,0,,0.0340335017282638,1,0.996269,1,1,1.826474,51.35515875,256,R,0,1,9,,false,true,,true,true,false,true
+30012,202002,100,0,29.3828125,,1.003745,2.211025,1,0.887798,1.671349,37.958334,7522,R,1,2,9,false,,true,true,,false,false,true
+30012,202003,100,0,,,0.529141,1,1,0.748686,1,35.63068182,5631.614454,FIR,2,0,8,,,,,,false,true,true
 30001,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
 30001,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
 30001,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,

From 84e46d716e26edb235789e411d1c7de5c8a8e472 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 18:11:26 +0100
Subject: [PATCH 354/531] Provide comparison as df1 and df2 paired in column
 maps

---
 tests/helpers.py | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/tests/helpers.py b/tests/helpers.py
index b0f769d9..8de19389 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -1,5 +1,5 @@
 from pytest import fail
-from pyspark.sql.functions import col, count, monotonically_increasing_id, when
+from pyspark.sql.functions import col, count, create_map, monotonically_increasing_id, lit, when
 from functools import reduce
 def check_df_equality(df1, df2, keep_cols=None):
     if keep_cols is None:
@@ -48,17 +48,19 @@ def check_df_equality(df1, df2, keep_cols=None):
                 for c in col_list
             ]
         ).collect()[0].asDict()
-        drop_cols = [
-            k for k, v in equal_counts.items()
-            if v == diff_count and k not in keep_cols
-        ]
-        diff_df = diff_df.drop(
-            *[f"df1_{c}" for c in drop_cols],
-            *[f"df2_{c}" for c in drop_cols]
-        )
 
-        if keep_cols:
-            diff_df = diff_df.sort([f"df1_{c}" for c in keep_cols] + [f"df2_{c}" for c in keep_cols])
+        diff_df = diff_df.select(
+            [
+                create_map(
+                    lit("df1"),
+                    col(f"df1_{name}"),
+                    lit("df2"),
+                    col(f"df2_{name}")
+                ).alias(name)
+                for name in sorted(col_list)
+                if equal_counts[name] != diff_count or name in keep_cols
+            ]
+        )
 
         diff_str = diff_df._jdf.showString(100, 100, False)
         fail(

From d480e31fc107373b3856b38b01144f66cc87699c Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 18:38:05 +0100
Subject: [PATCH 355/531] Make outliering tests use new comparer

---
 tests/outliering/test_winsorisation.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index de52e881..1618a825 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -1,7 +1,7 @@
 import glob
 import os
 import pathlib
-
+from tests.helpers import check_df_equality
 import pytest
 from pyspark.sql.functions import lit
 from pyspark.sql.types import DecimalType, StringType
@@ -349,9 +349,9 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
 
     assert isinstance(ret_val, type(test_dataframe))
     sort_col_list = [reference_col, period_col]
-    assert (
-        ret_val.sort(sort_col_list).select(exp_val.columns).collect()
-        == exp_val.sort(sort_col_list).collect()
+    check_df_equality(
+        ret_val.sort(sort_col_list).select(exp_val.columns),
+        exp_val.sort(sort_col_list)
     )
 
 

From 7bfe5aefe2d756d2508d23517858c05cf23ab8af Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 18:38:22 +0100
Subject: [PATCH 356/531] Make estimation tests use new comparer

---
 tests/estimation/test_ht_ratio.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/estimation/test_ht_ratio.py b/tests/estimation/test_ht_ratio.py
index 6fa1c1de..78930a15 100644
--- a/tests/estimation/test_ht_ratio.py
+++ b/tests/estimation/test_ht_ratio.py
@@ -5,7 +5,7 @@
 import pytest
 from pyspark.sql.functions import bround, col, lit
 from pyspark.sql.types import BooleanType, DecimalType, StringType
-
+from tests.helpers import check_df_equality
 from statistical_methods_library.estimation import ht_ratio
 from statistical_methods_library.utilities.exceptions import ValidationError
 
@@ -482,7 +482,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
             calibration_factor_col, bround(col(calibration_factor_col), 6)
         )
 
-    assert (
-        ret_val.sort(sort_col_list).select(select_cols).collect()
-        == exp_val.sort(sort_col_list).select(select_cols).collect()
+    check_df_equality(
+        ret_val.sort(sort_col_list).select(select_cols),
+        exp_val.sort(sort_col_list).select(select_cols)
     )

From e976a38eeed9a2c6ab9a9c7cfb8988ebd8ab1218 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 18:38:53 +0100
Subject: [PATCH 357/531] Start outputting rows as strings rather than the show
 string

---
 tests/helpers.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/helpers.py b/tests/helpers.py
index 8de19389..f1c97734 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -62,7 +62,7 @@ def check_df_equality(df1, df2, keep_cols=None):
             ]
         )
 
-        diff_str = diff_df._jdf.showString(100, 100, False)
+        diff_str = "\n".join(str(row) for row in diff_df.take(100))
         fail(
-            f"Mismatching rows in provided data frames:\n\n{diff_str}"
+            f"Mismatching rows in provided data frames (showing first 100):\n\n{diff_str}"
         )

From f74e97278513d76176e44b8708d06a99b757d3e6 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 18:51:16 +0100
Subject: [PATCH 358/531] Alter comparer to output expected and actual

---
 tests/estimation/test_ht_ratio.py  |  5 ++--
 tests/helpers.py                   | 44 +++++++++++++++---------------
 tests/imputation/test_scenarios.py |  4 +--
 3 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/tests/estimation/test_ht_ratio.py b/tests/estimation/test_ht_ratio.py
index 78930a15..0a395071 100644
--- a/tests/estimation/test_ht_ratio.py
+++ b/tests/estimation/test_ht_ratio.py
@@ -87,7 +87,6 @@
 @pytest.mark.dependency()
 def test_input_not_a_dataframe():
     with pytest.raises(TypeError):
-        # noinspection PyTypeChecker
         ht_ratio.estimate("not_a_dataframe", **params)
 
 
@@ -483,6 +482,6 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
         )
 
     check_df_equality(
-        ret_val.sort(sort_col_list).select(select_cols),
-        exp_val.sort(sort_col_list).select(select_cols)
+        actual=ret_val.sort(sort_col_list).select(select_cols),
+        expected=exp_val.sort(sort_col_list).select(select_cols)
     )
diff --git a/tests/helpers.py b/tests/helpers.py
index f1c97734..827fb67c 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -1,38 +1,38 @@
 from pytest import fail
 from pyspark.sql.functions import col, count, create_map, monotonically_increasing_id, lit, when
 from functools import reduce
-def check_df_equality(df1, df2, keep_cols=None):
+def check_df_equality(expected, actual, keep_cols=None):
     if keep_cols is None:
         keep_cols = []
     else:
         keep_cols = list(keep_cols)
     msg = []
-    df1_cols = set(df1.columns)
-    df2_cols = set(df2.columns)
-    df1_col_check = df1_cols - df2_cols
-    df2_col_check = df2_cols - df1_cols
-    if df1_col_check:
-        msg.append("extra columns in df1: {', '.join(df1_col_check)}")
+    expected_cols = set(expected.columns)
+    actual_cols = set(actual.columns)
+    expected_col_check = expected_cols - actual_cols
+    actual_col_check = actual_cols - expected_cols
+    if expected_col_check:
+        msg.append("extra columns in expected: {', '.join(expected_col_check)}")
 
-    if df2_col_check:
-        msg.append("extra columns in df2: {', '.join(df2_col_check)}")
+    if actual_col_check:
+        msg.append("extra columns in actual: {', '.join(actual_col_check)}")
 
     if msg:
         fail('\n'.join(msg))
 
-    col_list = sorted(df1.columns)
-    df1 = df1.select(col_list).alias("df1").withColumn("id", monotonically_increasing_id())
-    df2 = df2.select(col_list).alias("df2").withColumn("id", monotonically_increasing_id())
+    col_list = sorted(expected.columns)
+    expected = expected.select(col_list).alias("expected").withColumn("id", monotonically_increasing_id())
+    actual = actual.select(col_list).alias("actual").withColumn("id", monotonically_increasing_id())
     filter_list = [
-        ~col(f"df1.{name}").eqNullSafe(col(f"df2.{name}"))
+        ~col(f"expected.{name}").eqNullSafe(col(f"actual.{name}"))
         for name in col_list
     ]
     diff_df = (
-        df1.join(df2, ["id"], "full")
+        expected.join(actual, ["id"], "full")
         .filter(reduce(lambda x, y: x | y, filter_list))
         .select(
-            *(col(f"df1.{name}").alias(f"df1_{name}") for name in col_list),
-            *(col(f"df2.{name}").alias(f"df2_{name}") for name in col_list)
+            *(col(f"expected.{name}").alias(f"expected_{name}") for name in col_list),
+            *(col(f"actual.{name}").alias(f"actual_{name}") for name in col_list)
         )
     )
     diff_count = diff_df.count()
@@ -43,7 +43,7 @@ def check_df_equality(df1, df2, keep_cols=None):
         equal_counts = diff_df.select(
             [
                 count(
-                    when(col(f"df1_{c}").eqNullSafe(col(f"df2_{c}")), c)
+                    when(col(f"expected_{c}").eqNullSafe(col(f"actual_{c}")), c)
                 ).alias(c)
                 for c in col_list
             ]
@@ -52,10 +52,10 @@ def check_df_equality(df1, df2, keep_cols=None):
         diff_df = diff_df.select(
             [
                 create_map(
-                    lit("df1"),
-                    col(f"df1_{name}"),
-                    lit("df2"),
-                    col(f"df2_{name}")
+                    lit("expected"),
+                    col(f"expected_{name}"),
+                    lit("actual"),
+                    col(f"actual_{name}")
                 ).alias(name)
                 for name in sorted(col_list)
                 if equal_counts[name] != diff_count or name in keep_cols
@@ -64,5 +64,5 @@ def check_df_equality(df1, df2, keep_cols=None):
 
         diff_str = "\n".join(str(row) for row in diff_df.take(100))
         fail(
-            f"Mismatching rows in provided data frames (showing first 100):\n\n{diff_str}"
+            f"Mismatching rows in provided data frames (showing up to 100):\n\n{diff_str}"
         )
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index cae48735..b97b32b9 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -115,7 +115,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     select_cols = sorted(set(fields.values()) & set(scenario_expected_output.columns))
     sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]
     check_df_equality(
-        scenario_actual_output.sort(sort_col_list).select(select_cols),
-        scenario_expected_output.sort(sort_col_list).select(select_cols),
+        actual=scenario_actual_output.sort(sort_col_list).select(select_cols),
+        expected=scenario_expected_output.sort(sort_col_list).select(select_cols),
         keep_cols=sort_col_list
     )

From b71e87768f332989812717e8e795da9960216c5f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 18:56:48 +0100
Subject: [PATCH 359/531] Make outliering use new comparer args

---
 tests/outliering/test_winsorisation.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index 1618a825..f4abf555 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -350,8 +350,8 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     assert isinstance(ret_val, type(test_dataframe))
     sort_col_list = [reference_col, period_col]
     check_df_equality(
-        ret_val.sort(sort_col_list).select(exp_val.columns),
-        exp_val.sort(sort_col_list)
+        actual=ret_val.sort(sort_col_list).select(exp_val.columns),
+        expected=exp_val.sort(sort_col_list)
     )
 
 

From ce6ba5853371e79e78ef04bf825b782e11a235c2 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 18 May 2023 18:58:13 +0100
Subject: [PATCH 360/531] reformat with black and isort

---
 .../imputation/engine.py                      |  5 +-
 tests/estimation/test_ht_ratio.py             |  5 +-
 tests/helpers.py                              | 55 +++++++++++++------
 tests/imputation/test_scenarios.py            | 55 +++++++++++--------
 tests/outliering/test_winsorisation.py        |  5 +-
 5 files changed, 79 insertions(+), 46 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 866f5898..136bdde0 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -11,11 +11,12 @@
 from pyspark.sql.functions import col, expr, lit, when
 from pyspark.sql.types import DecimalType, StringType
 
-from statistical_methods_library.utilities.validation import validate_dataframe
 from statistical_methods_library.utilities.periods import (
-    calculate_previous_period,
     calculate_next_period,
+    calculate_previous_period,
 )
+from statistical_methods_library.utilities.validation import validate_dataframe
+
 from .ratio_calculators import RatioCalculator, construction
 
 # --- Marker constants ---
diff --git a/tests/estimation/test_ht_ratio.py b/tests/estimation/test_ht_ratio.py
index 0a395071..7acf8219 100644
--- a/tests/estimation/test_ht_ratio.py
+++ b/tests/estimation/test_ht_ratio.py
@@ -5,9 +5,10 @@
 import pytest
 from pyspark.sql.functions import bround, col, lit
 from pyspark.sql.types import BooleanType, DecimalType, StringType
-from tests.helpers import check_df_equality
+
 from statistical_methods_library.estimation import ht_ratio
 from statistical_methods_library.utilities.exceptions import ValidationError
+from tests.helpers import check_df_equality
 
 unique_identifier_col = "identifier"
 period_col = "date"
@@ -483,5 +484,5 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
 
     check_df_equality(
         actual=ret_val.sort(sort_col_list).select(select_cols),
-        expected=exp_val.sort(sort_col_list).select(select_cols)
+        expected=exp_val.sort(sort_col_list).select(select_cols),
     )
diff --git a/tests/helpers.py b/tests/helpers.py
index 827fb67c..3b771267 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -1,6 +1,16 @@
-from pytest import fail
-from pyspark.sql.functions import col, count, create_map, monotonically_increasing_id, lit, when
 from functools import reduce
+
+from pyspark.sql.functions import (
+    col,
+    count,
+    create_map,
+    lit,
+    monotonically_increasing_id,
+    when,
+)
+from pytest import fail
+
+
 def check_df_equality(expected, actual, keep_cols=None):
     if keep_cols is None:
         keep_cols = []
@@ -18,21 +28,28 @@ def check_df_equality(expected, actual, keep_cols=None):
         msg.append("extra columns in actual: {', '.join(actual_col_check)}")
 
     if msg:
-        fail('\n'.join(msg))
+        fail("\n".join(msg))
 
     col_list = sorted(expected.columns)
-    expected = expected.select(col_list).alias("expected").withColumn("id", monotonically_increasing_id())
-    actual = actual.select(col_list).alias("actual").withColumn("id", monotonically_increasing_id())
+    expected = (
+        expected.select(col_list)
+        .alias("expected")
+        .withColumn("id", monotonically_increasing_id())
+    )
+    actual = (
+        actual.select(col_list)
+        .alias("actual")
+        .withColumn("id", monotonically_increasing_id())
+    )
     filter_list = [
-        ~col(f"expected.{name}").eqNullSafe(col(f"actual.{name}"))
-        for name in col_list
+        ~col(f"expected.{name}").eqNullSafe(col(f"actual.{name}")) for name in col_list
     ]
     diff_df = (
         expected.join(actual, ["id"], "full")
         .filter(reduce(lambda x, y: x | y, filter_list))
         .select(
             *(col(f"expected.{name}").alias(f"expected_{name}") for name in col_list),
-            *(col(f"actual.{name}").alias(f"actual_{name}") for name in col_list)
+            *(col(f"actual.{name}").alias(f"actual_{name}") for name in col_list),
         )
     )
     diff_count = diff_df.count()
@@ -40,14 +57,18 @@ def check_df_equality(expected, actual, keep_cols=None):
         # Drop any columns where all values are equal as we don't need these
         # in our output.
         # This expression should only return 1 row so will scale.
-        equal_counts = diff_df.select(
-            [
-                count(
-                    when(col(f"expected_{c}").eqNullSafe(col(f"actual_{c}")), c)
-                ).alias(c)
-                for c in col_list
-            ]
-        ).collect()[0].asDict()
+        equal_counts = (
+            diff_df.select(
+                [
+                    count(
+                        when(col(f"expected_{c}").eqNullSafe(col(f"actual_{c}")), c)
+                    ).alias(c)
+                    for c in col_list
+                ]
+            )
+            .collect()[0]
+            .asDict()
+        )
 
         diff_df = diff_df.select(
             [
@@ -55,7 +76,7 @@ def check_df_equality(expected, actual, keep_cols=None):
                     lit("expected"),
                     col(f"expected_{name}"),
                     lit("actual"),
-                    col(f"actual_{name}")
+                    col(f"actual_{name}"),
                 ).alias(name)
                 for name in sorted(col_list)
                 if equal_counts[name] != diff_count or name in keep_cols
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index b97b32b9..3b481fc8 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -1,24 +1,30 @@
 import glob
 import os
 import pathlib
-from tests.helpers import check_df_equality
+from decimal import Decimal
+
 import pytest
 import toml
-from decimal import Decimal
 from pyspark.sql.functions import col
+
 from statistical_methods_library import imputation
+from tests.helpers import check_df_equality
 
-scenario_path_prefix = pathlib.Path(
-    "tests", "fixture_data", "imputation"
-)
+scenario_path_prefix = pathlib.Path("tests", "fixture_data", "imputation")
 ratio_calculators = ("mean_of_ratios", "ratio_of_means")
 test_scenarios = []
 for ratio_calculator in ratio_calculators:
     scenario_type = "methodology_scenarios"
-    test_files = glob.glob(str(scenario_path_prefix / ratio_calculator / scenario_type / "*_input.csv"))
+    test_files = glob.glob(
+        str(scenario_path_prefix / ratio_calculator / scenario_type / "*_input.csv")
+    )
     test_list = sorted(
         (
-            (ratio_calculator, scenario_type, os.path.basename(f).replace("_input.csv", ""))
+            (
+                ratio_calculator,
+                scenario_type,
+                os.path.basename(f).replace("_input.csv", ""),
+            )
             for f in test_files
         ),
         key=lambda t: t[2],
@@ -31,6 +37,7 @@
 
 toml_path_prefix = pathlib.Path("tests", "imputation")
 
+
 @pytest.mark.parametrize(
     "ratio_calculator, scenario_type, scenario",
     test_scenarios,
@@ -40,7 +47,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
         default_config = toml.load(f)
 
     with open(toml_path_prefix / f"{ratio_calculator}.toml", "r") as f:
-        test_config = (toml.load(f))
+        test_config = toml.load(f)
 
     scenarios = test_config.pop("scenarios", {})
     scenario_config = scenarios.get(scenario, {})
@@ -53,19 +60,15 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
         starting_period_key = "back_data_starting_period"
     else:
         starting_period_key = "starting_period"
-    starting_period = scenario_config.pop(starting_period_key,
-        test_config.get(starting_period_key,
-            default_config[starting_period_key]
-        )
+    starting_period = scenario_config.pop(
+        starting_period_key,
+        test_config.get(starting_period_key, default_config[starting_period_key]),
     )
     field_types = default_config["field_types"]
     field_types.update(test_config.get("field_types", {}))
     field_types.update(scenario_config.get("field_types", {}))
     imputation_kwargs.update(scenario_config)
-    types = {
-        fields[k]: v
-        for k,v in field_types.items()
-    }
+    types = {fields[k]: v for k, v in field_types.items()}
     scenario_file_type = scenario_type.replace("back_data_", "")
     scenario_input = fxt_load_test_csv(
         fields.values(),
@@ -93,9 +96,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
 
     imputation_kwargs["back_data_df"] = back_data_df
 
-    scenario_input = scenario_input.filter(
-        col(fields["period_col"]) >= starting_period
-    )
+    scenario_input = scenario_input.filter(col(fields["period_col"]) >= starting_period)
 
     scenario_expected_output = scenario_expected_output.filter(
         col(fields["period_col"]) >= starting_period
@@ -107,15 +108,23 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     scenario_expected_output = scenario_expected_output.drop(
         fields["auxiliary_col"],
     )
-    scenario_actual_output = imputation.impute(input_df=scenario_input, **imputation_kwargs)
+    scenario_actual_output = imputation.impute(
+        input_df=scenario_input, **imputation_kwargs
+    )
     for field_name, field_type in scenario_actual_output.dtypes:
         if field_type.startswith("decimal"):
-            scenario_actual_output = scenario_actual_output.withColumn(field_name, col(field_name).cast("decimal(15, 6)"))
+            scenario_actual_output = scenario_actual_output.withColumn(
+                field_name, col(field_name).cast("decimal(15, 6)")
+            )
 
     select_cols = sorted(set(fields.values()) & set(scenario_expected_output.columns))
-    sort_col_list = [fields["reference_col"], fields["period_col"], fields["grouping_col"]]
+    sort_col_list = [
+        fields["reference_col"],
+        fields["period_col"],
+        fields["grouping_col"],
+    ]
     check_df_equality(
         actual=scenario_actual_output.sort(sort_col_list).select(select_cols),
         expected=scenario_expected_output.sort(sort_col_list).select(select_cols),
-        keep_cols=sort_col_list
+        keep_cols=sort_col_list,
     )
diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index f4abf555..9763dff4 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -1,13 +1,14 @@
 import glob
 import os
 import pathlib
-from tests.helpers import check_df_equality
+
 import pytest
 from pyspark.sql.functions import lit
 from pyspark.sql.types import DecimalType, StringType
 
 from statistical_methods_library.outliering import winsorisation
 from statistical_methods_library.utilities.exceptions import ValidationError
+from tests.helpers import check_df_equality
 
 reference_col = "identifier"
 period_col = "date"
@@ -351,7 +352,7 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     sort_col_list = [reference_col, period_col]
     check_df_equality(
         actual=ret_val.sort(sort_col_list).select(exp_val.columns),
-        expected=exp_val.sort(sort_col_list)
+        expected=exp_val.sort(sort_col_list),
     )
 
 

From eb325076b7c36cde8e6e192ea1263293337806d1 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 19 May 2023 10:16:28 +0100
Subject: [PATCH 361/531] Preserve row ordering in comparer

---
 tests/helpers.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/helpers.py b/tests/helpers.py
index 3b771267..9db1593c 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -47,7 +47,7 @@ def check_df_equality(expected, actual, keep_cols=None):
     diff_df = (
         expected.join(actual, ["id"], "full")
         .filter(reduce(lambda x, y: x | y, filter_list))
-        .select(
+        .select("id",
             *(col(f"expected.{name}").alias(f"expected_{name}") for name in col_list),
             *(col(f"actual.{name}").alias(f"actual_{name}") for name in col_list),
         )
@@ -70,7 +70,7 @@ def check_df_equality(expected, actual, keep_cols=None):
             .asDict()
         )
 
-        diff_df = diff_df.select(
+        diff_df = diff_df.sort("id").select(
             [
                 create_map(
                     lit("expected"),

From d059e702cc1c60d544f182764176f8f8a55c5468 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 22 May 2023 13:09:29 +0100
Subject: [PATCH 362/531] Ellie Confirmed Test Removal. New Test Added

---
 ..._weight_filtered_partial_default_input.csv |  37 -----
 ...weight_filtered_partial_default_output.csv |  73 ---------
 ..._50_weight_filtered_full_default_input.csv |  37 -----
 ...50_weight_filtered_full_default_output.csv |  73 ---------
 ...71_TB_10_muti_variable_50_weight_input.csv |  73 +++++++++
 ...1_TB_10_muti_variable_50_weight_output.csv | 145 ++++++++++++++++++
 tests/imputation/mean_of_ratios.toml          |   7 +
 7 files changed, 225 insertions(+), 220 deletions(-)
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
 delete mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
deleted file mode 100644
index 5d0a69d4..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_input.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-identifier,date,group,question,other
-30001,202001,100,8444,51
-30001,202002,100,7476,51
-30001,202003,100,2003,51
-30002,202001,100,9343,72
-30002,202002,100,7818,72
-30002,202003,100,4897,72
-30003,202001,100,7511,7
-30003,202002,100,1761,7
-30003,202003,100,6492,7
-30004,202001,100,64,81
-30004,202002,100,2113,81
-30004,202003,100,185,81
-30005,202001,100,844,5
-30005,202002,100,897,5
-30005,202003,100,280,5
-30006,202001,100,1869,14
-30006,202002,100,1876,14
-30006,202003,100,1371,14
-30007,202001,100,12769,12
-30007,202002,100,2853,12
-30007,202003,100,11491,12
-30008,202001,100,141,162
-30008,202002,100,6001,162
-30008,202003,100,433,162
-30009,202001,100,6417,26
-30009,202002,100,4037,26
-30009,202003,100,1322,26
-30010,202001,100,28963,144
-30010,202002,100,21734,144
-30010,202003,100,10529,144
-30011,202001,100,6009,5
-30011,202002,100,1145,5
-30011,202003,100,5064,5
-30012,202001,100,256,275
-30012,202002,100,7522,275
-30012,202003,100,,275
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
deleted file mode 100644
index 502b0caf..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_TB_50_50_weight_filtered_partial_default_output.csv
+++ /dev/null
@@ -1,73 +0,0 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,,1,0.996269,61.124361,1,1.826474,81.41734,8444,R,0,1,9,,,false,,false,true,false,false
-30001,202002,100,51,,,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,7476,R,1,2,9,,,false,false,false,false,false,false
-30001,202003,100,51,,,0.529141,1,85.378205,0.748686,1,77.819785,2003,R,2,0,8,,,false,false,,false,true,false
-30002,202001,100,72,,,1,0.996269,61.124361,1,1.826474,81.41734,9343,R,0,1,9,,,false,,false,true,false,false
-30002,202002,100,72,,,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,7818,R,1,2,9,,,false,false,false,false,false,false
-30002,202003,100,72,,,0.529141,1,85.378205,0.748686,1,77.819785,4897,R,2,0,8,,,false,false,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,0.996269,61.124361,1,1.826474,81.41734,7511,R,0,1,9,,false,true,,true,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,1761,R,1,2,9,false,false,true,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,0.529141,1,85.378205,0.748686,1,77.819785,6492,R,2,0,8,false,,true,true,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,0.996269,61.124361,1,1.826474,81.41734,64,R,0,1,9,,false,true,,true,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,2113,R,1,2,9,false,false,true,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,0.529141,1,85.378205,0.748686,1,77.819785,185,R,2,0,8,false,,true,true,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,0.996269,61.124361,1,1.826474,81.41734,844,R,0,1,9,,false,true,,true,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,897,R,1,2,9,false,false,true,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,0.529141,1,85.378205,0.748686,1,77.819785,280,R,2,0,8,false,,true,true,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,0.996269,61.124361,1,1.826474,81.41734,1869,R,0,1,9,,true,true,,true,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,1876,R,1,2,9,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,0.529141,1,85.378205,0.748686,1,77.819785,1371,R,2,0,8,true,,true,true,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,0.996269,61.124361,1,1.826474,81.41734,12769,R,0,1,9,,false,true,,true,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,2853,R,1,2,9,false,false,true,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,0.529141,1,85.378205,0.748686,1,77.819785,11491,R,2,0,8,false,,true,true,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,0.996269,61.124361,1,1.826474,81.41734,141,R,0,1,9,,false,true,,true,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,6001,R,1,2,9,false,false,true,true,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,0.529141,1,85.378205,0.748686,1,77.819785,433,R,2,0,8,false,,true,true,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,0.996269,61.124361,1,1.826474,81.41734,6417,R,0,1,9,,false,true,,true,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,4037,R,1,2,9,false,true,true,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,0.529141,1,85.378205,0.748686,1,77.819785,1322,R,2,0,8,true,,true,true,,false,true,false
-30010,202001,100,144,,,1,0.996269,61.124361,1,1.826474,81.41734,28963,R,0,1,9,,,false,,false,true,false,false
-30010,202002,100,144,,,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,21734,R,1,2,9,,,false,false,false,false,false,false
-30010,202003,100,144,,,0.529141,1,85.378205,0.748686,1,77.819785,10529,R,2,0,8,,,false,false,,false,true,false
-30011,202001,100,5,,5.24803493449782,1,0.996269,61.124361,1,1.826474,81.41734,6009,R,0,1,9,,false,true,,true,true,false,false
-30011,202002,100,5,0.190547512065235,0.226105845181675,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,1145,R,1,2,9,false,false,true,true,true,false,false,false
-30011,202003,100,5,4.42270742358079,,0.529141,1,85.378205,0.748686,1,77.819785,5064,R,2,0,8,false,,true,true,,false,true,false
-30012,202001,100,275,,0.0340335017282638,1,0.996269,61.124361,1,1.826474,81.41734,256,R,0,1,9,,false,true,,true,true,false,false
-30012,202002,100,275,29.3828125,,1.003745,2.211025,48.049404,0.887798,1.671349,61.483035,7522,R,1,2,9,false,,true,true,,false,false,false
-30012,202003,100,275,,,0.529141,1,85.378205,0.748686,1,77.819785,5631.614454,FIR,2,0,8,,,,,,false,true,false
-30001,201901,100,51,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30001,201902,100,51,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30001,201903,100,51,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30002,201901,100,72,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30002,201902,100,72,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30002,201903,100,72,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30003,201901,100,7,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30003,201902,100,7,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30003,201903,100,7,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30004,201901,100,81,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30004,201902,100,81,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30004,201903,100,81,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30005,201901,100,5,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30005,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30005,201903,100,5,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30006,201901,100,14,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30006,201902,100,14,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30006,201903,100,14,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30007,201901,100,12,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30007,201902,100,12,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30007,201903,100,12,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30008,201901,100,162,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30008,201902,100,162,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30008,201903,100,162,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30009,201901,100,26,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30009,201902,100,26,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30009,201903,100,26,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30010,201901,100,144,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30010,201902,100,144,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30010,201903,100,144,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30011,201901,100,5,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30011,201902,100,5,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30011,201903,100,5,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30012,201901,100,275,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30012,201902,100,275,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30012,201903,100,275,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
deleted file mode 100644
index f4a7b4aa..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_input.csv
+++ /dev/null
@@ -1,37 +0,0 @@
-identifier,date,group,question,other
-30001,202001,100,8444,0
-30001,202002,100,7476,0
-30001,202003,100,2003,0
-30002,202001,100,9343,0
-30002,202002,100,7818,0
-30002,202003,100,4897,0
-30003,202001,100,7511,0
-30003,202002,100,1761,0
-30003,202003,100,6492,0
-30004,202001,100,64,0
-30004,202002,100,2113,0
-30004,202003,100,185,0
-30005,202001,100,844,0
-30005,202002,100,897,0
-30005,202003,100,280,0
-30006,202001,100,1869,0
-30006,202002,100,1876,0
-30006,202003,100,1371,0
-30007,202001,100,12769,0
-30007,202002,100,2853,0
-30007,202003,100,11491,0
-30008,202001,100,141,0
-30008,202002,100,6001,0
-30008,202003,100,433,0
-30009,202001,100,6417,0
-30009,202002,100,4037,0
-30009,202003,100,1322,0
-30010,202001,100,28963,0
-30010,202002,100,21734,0
-30010,202003,100,10529,0
-30011,202001,100,6009,0
-30011,202002,100,1145,0
-30011,202003,100,5064,0
-30012,202001,100,256,0
-30012,202002,100,7522,0
-30012,202003,100,,0
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
deleted file mode 100644
index 8b9b1157..00000000
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_50_50_weight_filtered_full_default_output.csv
+++ /dev/null
@@ -1,73 +0,0 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,8444,R,0,1,9,,,false,,false,true,false,true
-30001,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.958334,7476,R,1,2,9,,,false,false,false,false,false,true
-30001,202003,100,0,,,0.529141,1,1,0.748686,1,35.63068182,2003,R,2,0,8,,,false,false,,false,true,true
-30002,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,9343,R,0,1,9,,,false,,false,true,false,true
-30002,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.958334,7818,R,1,2,9,,,false,false,false,false,false,true
-30002,202003,100,0,,,0.529141,1,1,0.748686,1,35.63068182,4897,R,2,0,8,,,false,false,,false,true,true
-30003,202001,100,0,,4.26519023282226,1,0.996269,1,1,1.826474,51.35515875,7511,R,0,1,9,,false,true,,true,true,false,true
-30003,202002,100,0,0.234456131007855,0.271256931608133,1.003745,2.211025,1,0.887798,1.671349,37.958334,1761,R,1,2,9,false,false,true,true,true,false,false,true
-30003,202003,100,0,3.68654173764906,,0.529141,1,1,0.748686,1,35.63068182,6492,R,2,0,8,false,,true,true,,false,true,true
-30004,202001,100,0,,0.0302886890676763,1,0.996269,1,1,1.826474,51.35515875,64,R,0,1,9,,false,true,,true,true,false,true
-30004,202002,100,0,33.015625,11.4216216216216,1.003745,2.211025,1,0.887798,1.671349,37.958334,2113,R,1,2,9,false,false,true,true,true,false,false,true
-30004,202003,100,0,0.0875532418362518,,0.529141,1,1,0.748686,1,35.63068182,185,R,2,0,8,false,,true,true,,false,true,true
-30005,202001,100,0,,0.940914158305463,1,0.996269,1,1,1.826474,51.35515875,844,R,0,1,9,,false,true,,true,true,false,true
-30005,202002,100,0,1.06279620853081,3.20357142857143,1.003745,2.211025,1,0.887798,1.671349,37.958334,897,R,1,2,9,false,false,true,true,true,false,false,true
-30005,202003,100,0,0.312151616499443,,0.529141,1,1,0.748686,1,35.63068182,280,R,2,0,8,false,,true,true,,false,true,true
-30006,202001,100,0,,0.996268656716418,1,0.996269,1,1,1.826474,51.35515875,1869,R,0,1,9,,true,true,,true,true,false,true
-30006,202002,100,0,1.00374531835206,1.36834427425237,1.003745,2.211025,1,0.887798,1.671349,37.958334,1876,R,1,2,9,true,true,true,true,true,false,false,true
-30006,202003,100,0,0.730810234541578,,0.529141,1,1,0.748686,1,35.63068182,1371,R,2,0,8,true,,true,true,,false,true,true
-30007,202001,100,0,,4.47563967753242,1,0.996269,1,1,1.826474,51.35515875,12769,R,0,1,9,,false,true,,true,true,false,true
-30007,202002,100,0,0.223431748766544,0.248281263597598,1.003745,2.211025,1,0.887798,1.671349,37.958334,2853,R,1,2,9,false,false,true,true,true,false,false,true
-30007,202003,100,0,4.02769015071854,,0.529141,1,1,0.748686,1,35.63068182,11491,R,2,0,8,false,,true,true,,false,true,true
-30008,202001,100,0,,0.0234960839860023,1,0.996269,1,1,1.826474,51.35515875,141,R,0,1,9,,false,true,,true,true,false,true
-30008,202002,100,0,42.5602836879433,13.8591224018476,1.003745,2.211025,1,0.887798,1.671349,37.958334,6001,R,1,2,9,false,false,true,true,true,false,false,true
-30008,202003,100,0,0.0721546408931845,,0.529141,1,1,0.748686,1,35.63068182,433,R,2,0,8,false,,true,true,,false,true,true
-30009,202001,100,0,,1.58954669308893,1,0.996269,1,1,1.826474,51.35515875,6417,R,0,1,9,,false,true,,true,true,false,true
-30009,202002,100,0,0.629110176094748,3.05370650529501,1.003745,2.211025,1,0.887798,1.671349,37.958334,4037,R,1,2,9,false,true,true,true,true,false,false,true
-30009,202003,100,0,0.327470894228387,,0.529141,1,1,0.748686,1,35.63068182,1322,R,2,0,8,true,,true,true,,false,true,true
-30010,202001,100,0,,,1,0.996269,1,1,1.826474,51.35515875,28963,R,0,1,9,,,false,,false,true,false,true
-30010,202002,100,0,,,1.003745,2.211025,1,0.887798,1.671349,37.958334,21734,R,1,2,9,,,false,false,false,false,false,true
-30010,202003,100,0,,,0.529141,1,1,0.748686,1,35.63068182,10529,R,2,0,8,,,false,false,,false,true,true
-30011,202001,100,0,,5.24803493449782,1,0.996269,1,1,1.826474,51.35515875,6009,R,0,1,9,,false,true,,true,true,false,true
-30011,202002,100,0,0.190547512065235,0.226105845181675,1.003745,2.211025,1,0.887798,1.671349,37.958334,1145,R,1,2,9,false,false,true,true,true,false,false,true
-30011,202003,100,0,4.42270742358079,,0.529141,1,1,0.748686,1,35.63068182,5064,R,2,0,8,false,,true,true,,false,true,true
-30012,202001,100,0,,0.0340335017282638,1,0.996269,1,1,1.826474,51.35515875,256,R,0,1,9,,false,true,,true,true,false,true
-30012,202002,100,0,29.3828125,,1.003745,2.211025,1,0.887798,1.671349,37.958334,7522,R,1,2,9,false,,true,true,,false,false,true
-30012,202003,100,0,,,0.529141,1,1,0.748686,1,35.63068182,5631.614454,FIR,2,0,8,,,,,,false,true,true
-30001,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30001,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30001,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30002,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30002,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30002,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30003,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30003,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30003,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30004,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30004,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30004,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30005,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30005,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30005,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30006,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30006,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30006,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30007,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30007,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30007,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30008,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30008,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30008,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30009,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30009,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30009,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30010,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30010,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30010,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30011,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30011,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30011,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
-30012,201901,100,0,,,1,2.656680299,101.7103175,,,,0,R,,,,,,,,,,,
-30012,201902,100,0,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,,,,,,
-30012,201903,100,0,,,0.968230653,1,70.26136364,,,,0,R,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_input.csv
new file mode 100644
index 00000000..e2a0e268
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_input.csv
@@ -0,0 +1,73 @@
+identifier,date,group,question,other
+80001,202001,51100,9244,89
+80001,202002,51100,8916,89
+80001,202003,51100,6194,89
+80002,202001,51100,4826,83
+80002,202002,51100,5903,83
+80002,202003,51100,4743,83
+80003,202001,51100,7586,4
+80003,202002,51100,1016,4
+80003,202003,51100,1429,4
+80004,202001,51100,3975,76
+80004,202002,51100,3044,76
+80004,202003,51100,3673,76
+80005,202001,51100,1941,18
+80005,202002,51100,3121,18
+80005,202003,51100,1208,18
+80006,202001,51100,5405,94
+80006,202002,51100,7084,94
+80006,202003,51100,4980,94
+80007,202001,51100,15172,8
+80007,202002,51100,2845,8
+80007,202003,51100,3501,8
+80008,202001,51100,16298,304
+80008,202002,51100,14429,304
+80008,202003,51100,14295,304
+80009,202001,51100,3698,45
+80009,202002,51100,4993,45
+80009,202003,51100,4212,45
+80010,202001,51100,7722,100
+80010,202002,51100,10153,100
+80010,202003,51100,6545,100
+80011,202001,51100,30344,19
+80011,202002,51100,3627,19
+80011,202003,51100,7288,19
+80012,202001,51100,16298,304
+80012,202002,51100,11567,304
+80012,202003,51100,,304
+80001,202001,52100,20190,54
+80001,202002,52100,18242,54
+80001,202003,52100,28826,54
+80002,202001,52100,4260,47
+80002,202002,52100,5036,42
+80002,202003,52100,6484,42
+80003,202001,52100,19236,57
+80003,202002,52100,4949,57
+80003,202003,52100,3544,57
+80004,202001,52100,14902,163
+80004,202002,52100,16435,163
+80004,202003,52100,24653,163
+80005,202001,52100,35476,149
+80005,202002,52100,50515,149
+80005,202003,52100,53477,149
+80006,202001,52100,13845,126
+80006,202002,52100,25488,126
+80006,202003,52100,27409,126
+80007,202001,52100,1099,6
+80007,202002,52100,434,6
+80007,202003,52100,124,6
+80008,202001,52100,3348,22
+80008,202002,52100,1996,22
+80008,202003,52100,5051,22
+80009,202001,52100,29215,108
+80009,202002,52100,34168,108
+80009,202003,52100,61628,108
+80010,202001,52100,6390,67
+80010,202002,52100,12705,67
+80010,202003,52100,11966,67
+80011,202001,52100,4562,18
+80011,202002,52100,1717,18
+80011,202003,52100,2371,18
+80012,202001,52100,,155
+80012,202002,52100,18782,155
+80012,202003,52100,21046,155
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_output.csv
new file mode 100644
index 00000000..a5023af9
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_output.csv
@@ -0,0 +1,145 @@
+identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,51100,89,,1.03678779721848,1,2.076231,107.088287,1,2.359415,125.976643,9244,R,0,10,12,,true,true,false,false
+80001,202002,51100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,8916,R,10,9,12,true,true,false,false,false
+80001,202003,51100,89,0.694706146253926,,0.947092,1,69.128571,1.026638,1,104.689744,6194,R,9,0,11,true,,false,true,false
+80002,202001,51100,83,,0.81755039810266,1,2.076231,107.088287,1,2.359415,125.976643,4826,R,0,10,12,,true,true,false,false
+80002,202002,51100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,5903,R,10,9,12,true,true,false,false,false
+80002,202003,51100,83,0.803489750974081,,0.947092,1,69.128571,1.026638,1,104.689744,4743,R,9,0,11,true,,false,true,false
+80003,202001,51100,4,,7.46653543307087,1,2.076231,107.088287,1,2.359415,125.976643,7586,R,0,10,12,,true,true,false,false
+80003,202002,51100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,1016,R,10,9,12,true,true,false,false,false
+80003,202003,51100,4,1.40649606299213,,0.947092,1,69.128571,1.026638,1,104.689744,1429,R,9,0,11,true,,false,true,false
+80004,202001,51100,76,,1.30584756898817,1,2.076231,107.088287,1,2.359415,125.976643,3975,R,0,10,12,,true,true,false,false
+80004,202002,51100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3044,R,10,9,12,true,true,false,false,false
+80004,202003,51100,76,1.20663600525624,,0.947092,1,69.128571,1.026638,1,104.689744,3673,R,9,0,11,true,,false,true,false
+80005,202001,51100,18,,0.62191605254726,1,2.076231,107.088287,1,2.359415,125.976643,1941,R,0,10,12,,false,true,false,false
+80005,202002,51100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3121,R,10,9,12,false,false,false,false,false
+80005,202003,51100,18,0.387055430951618,,0.947092,1,69.128571,1.026638,1,104.689744,1208,R,9,0,11,false,,false,true,false
+80006,202001,51100,94,,0.762987012987013,1,2.076231,107.088287,1,2.359415,125.976643,5405,R,0,10,12,,true,true,false,false
+80006,202002,51100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,7084,R,10,9,12,true,true,false,false,false
+80006,202003,51100,94,0.702992659514399,,0.947092,1,69.128571,1.026638,1,104.689744,4980,R,9,0,11,true,,false,true,false
+80007,202001,51100,8,,5.33286467486819,1,2.076231,107.088287,1,2.359415,125.976643,15172,R,0,10,12,,true,true,false,false
+80007,202002,51100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,2845,R,10,9,12,true,true,false,false,false
+80007,202003,51100,8,1.23057996485062,,0.947092,1,69.128571,1.026638,1,104.689744,3501,R,9,0,11,true,,false,true,false
+80008,202001,51100,304,,1.12953080601566,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
+80008,202002,51100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,14429,R,10,9,12,true,true,false,false,false
+80008,202003,51100,304,0.990713147134244,,0.947092,1,69.128571,1.026638,1,104.689744,14295,R,9,0,11,true,,false,true,false
+80009,202001,51100,45,,0.740636891648308,1,2.076231,107.088287,1,2.359415,125.976643,3698,R,0,10,12,,true,true,false,false
+80009,202002,51100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,4993,R,10,9,12,true,true,false,false,false
+80009,202003,51100,45,0.843581013418786,,0.947092,1,69.128571,1.026638,1,104.689744,4212,R,9,0,11,true,,false,true,false
+80010,202001,51100,100,,0.76056338028169,1,2.076231,107.088287,1,2.359415,125.976643,7722,R,0,10,12,,true,true,false,false
+80010,202002,51100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,10153,R,10,9,12,true,true,false,false,false
+80010,202003,51100,100,0.644637053087757,,0.947092,1,69.128571,1.026638,1,104.689744,6545,R,9,0,11,true,,false,true,false
+80011,202001,51100,19,,8.36614281775572,1,2.076231,107.088287,1,2.359415,125.976643,30344,R,0,10,12,,false,true,false,false
+80011,202002,51100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3627,R,10,9,12,false,false,false,false,false
+80011,202003,51100,19,2.0093741384064,,0.947092,1,69.128571,1.026638,1,104.689744,7288,R,9,0,11,false,,false,true,false
+80012,202001,51100,304,,1.40900838592548,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
+80012,202002,51100,304,0.709718983924408,,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,11567,R,10,9,12,true,,false,false,false
+80012,202003,51100,304,,,0.947092,1,69.128571,1.026638,1,104.689744,11875.118407,FIR,9,0,11,,,false,true,false
+80001,202001,52100,54,,1.10678653656397,1,1.314057,186.686659,1,1.703049,131.363259,20190,R,0,9,11,,true,true,false,false
+80001,202002,52100,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18242,R,9,10,12,true,true,false,false,false
+80001,202003,52100,54,1.58019953952418,,1.246482,1,254.993795,1.143548,1,167.406264,28826,R,10,0,12,true,,false,true,false
+80002,202001,52100,47,,0.845909451945989,1,1.314057,186.686659,1,1.703049,131.363259,4260,R,0,9,11,,true,true,false,false
+80002,202002,52100,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,5036,R,9,10,12,true,true,false,false,false
+80002,202003,52100,42,1.28752978554408,,1.246482,1,254.993795,1.143548,1,167.406264,6484,R,10,0,12,true,,false,true,false
+80003,202001,52100,57,,3.88684582743989,1,1.314057,186.686659,1,1.703049,131.363259,19236,R,0,9,11,,false,true,false,false
+80003,202002,52100,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,4949,R,9,10,12,false,true,false,false,false
+80003,202003,52100,57,0.716104263487573,,1.246482,1,254.993795,1.143548,1,167.406264,3544,R,10,0,12,true,,false,true,false
+80004,202001,52100,163,,0.906723456038941,1,1.314057,186.686659,1,1.703049,131.363259,14902,R,0,9,11,,true,true,false,false
+80004,202002,52100,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,16435,R,9,10,12,true,true,false,false,false
+80004,202003,52100,163,1.500030422878,,1.246482,1,254.993795,1.143548,1,167.406264,24653,R,10,0,12,true,,false,true,false
+80005,202001,52100,149,,0.702286449569435,1,1.314057,186.686659,1,1.703049,131.363259,35476,R,0,9,11,,true,true,false,false
+80005,202002,52100,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,50515,R,9,10,12,true,true,false,false,false
+80005,202003,52100,149,1.05863604869841,,1.246482,1,254.993795,1.143548,1,167.406264,53477,R,10,0,12,true,,false,true,false
+80006,202001,52100,126,,0.543196798493409,1,1.314057,186.686659,1,1.703049,131.363259,13845,R,0,9,11,,true,true,false,false
+80006,202002,52100,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,25488,R,9,10,12,true,true,false,false,false
+80006,202003,52100,126,1.07536880100439,,1.246482,1,254.993795,1.143548,1,167.406264,27409,R,10,0,12,true,,false,true,false
+80007,202001,52100,6,,2.53225806451613,1,1.314057,186.686659,1,1.703049,131.363259,1099,R,0,9,11,,true,true,false,false
+80007,202002,52100,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,434,R,9,10,12,true,false,false,false,false
+80007,202003,52100,6,0.285714285714286,,1.246482,1,254.993795,1.143548,1,167.406264,124,R,10,0,12,false,,false,true,false
+80008,202001,52100,22,,1.67735470941884,1,1.314057,186.686659,1,1.703049,131.363259,3348,R,0,9,11,,true,true,false,false
+80008,202002,52100,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1996,R,9,10,12,true,false,false,false,false
+80008,202003,52100,22,2.53056112224449,,1.246482,1,254.993795,1.143548,1,167.406264,5051,R,10,0,12,false,,false,true,false
+80009,202001,52100,108,,0.855039803324748,1,1.314057,186.686659,1,1.703049,131.363259,29215,R,0,9,11,,true,true,false,false
+80009,202002,52100,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,34168,R,9,10,12,true,true,false,false,false
+80009,202003,52100,108,1.80367595410911,,1.246482,1,254.993795,1.143548,1,167.406264,61628,R,10,0,12,true,,false,true,false
+80010,202001,52100,67,,0.502951593860685,1,1.314057,186.686659,1,1.703049,131.363259,6390,R,0,9,11,,false,true,false,false
+80010,202002,52100,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,12705,R,9,10,12,false,true,false,false,false
+80010,202003,52100,67,0.941833923652106,,1.246482,1,254.993795,1.143548,1,167.406264,11966,R,10,0,12,true,,false,true,false
+80011,202001,52100,18,,2.65695981362842,1,1.314057,186.686659,1,1.703049,131.363259,4562,R,0,9,11,,true,true,false,false
+80011,202002,52100,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1717,R,9,10,12,true,true,false,false,false
+80011,202003,52100,18,1.38089691322073,,1.246482,1,254.993795,1.143548,1,167.406264,2371,R,10,0,12,true,,false,true,false
+80012,202001,52100,155,,,1,1.314057,186.686659,1,1.703049,131.363259,31986.659101,BI,0,9,11,,,true,false,false
+80012,202002,52100,155,,0.892426114225981,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18782,R,9,10,12,,true,false,false,false
+80012,202003,52100,155,1.1205409434565,,1.246482,1,254.993795,1.143548,1,167.406264,21046,R,10,0,12,true,,false,true,false
+80001,201901,51100,89,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80001,201902,51100,89,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80001,201903,51100,89,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80002,201901,51100,83,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80002,201902,51100,83,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80002,201903,51100,83,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80003,201901,51100,4,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80003,201902,51100,4,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80003,201903,51100,4,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80004,201901,51100,76,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80004,201902,51100,76,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80004,201903,51100,76,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80005,201901,51100,18,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80005,201902,51100,18,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80005,201903,51100,18,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80006,201901,51100,94,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80006,201902,51100,94,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80006,201903,51100,94,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80007,201901,51100,8,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80007,201902,51100,8,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80007,201903,51100,8,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80008,201901,51100,304,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80008,201902,51100,304,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80008,201903,51100,304,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80009,201901,51100,45,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80009,201902,51100,45,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80009,201903,51100,45,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80010,201901,51100,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80010,201902,51100,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80010,201903,51100,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80011,201901,51100,19,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80011,201902,51100,19,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80011,201903,51100,19,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80012,201901,51100,304,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80012,201902,51100,304,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80012,201903,51100,304,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80001,201901,52100,54,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80001,201902,52100,54,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80001,201903,52100,54,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80002,201901,52100,47,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80002,201902,52100,42,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80002,201903,52100,42,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80003,201901,52100,57,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80003,201902,52100,57,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80003,201903,52100,57,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80004,201901,52100,163,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80004,201902,52100,163,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80004,201903,52100,163,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80005,201901,52100,149,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80005,201902,52100,149,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80005,201903,52100,149,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80006,201901,52100,126,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80006,201902,52100,126,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80006,201903,52100,126,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80007,201901,52100,6,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80007,201902,52100,6,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80007,201903,52100,6,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80008,201901,52100,22,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80008,201902,52100,22,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80008,201903,52100,22,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80009,201901,52100,108,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80009,201902,52100,108,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80009,201903,52100,108,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80010,201901,52100,67,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80010,201902,52100,67,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80010,201903,52100,67,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80011,201901,52100,18,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80011,201902,52100,18,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80011,201903,52100,18,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80012,201901,52100,155,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80012,201902,52100,155,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80012,201903,52100,155,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index fb650e06..857958d1 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -184,3 +184,10 @@ include_zeros = true
 
 [scenarios.70_BI_BI_R_FI_FI_R_FI_alternating_filtered]
 link_filter = "NOT(identifier = '70001' AND date IN ('202003', '202005'))"
+
+[scenarios.71_TB_10_muti_variable_50_weight]
+weight = "0.5"
+weight_periodicity_multiplier = 12
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10

From ede2d55d9990a83b4d370e932b1cd57cdb2b8075 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 22 May 2023 13:41:32 +0100
Subject: [PATCH 363/531] New Test

---
 .../72_partial_links_50_weight_input.csv      | 25 ++++++++++
 .../72_partial_links_50_weight_output.csv     | 49 +++++++++++++++++++
 tests/imputation/mean_of_ratios.toml          |  4 ++
 3 files changed, 78 insertions(+)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_input.csv
new file mode 100644
index 00000000..22811bab
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_input.csv
@@ -0,0 +1,25 @@
+identifier,date,group,question,other,forward,backward
+190001,202001,100,9261,95,1,0.9214
+190001,202002,100,4996,95,0.8521,1.5274
+190001,202003,100,1480,95,0.9685,1.8795
+190001,202004,100,4350,95,1.113,1
+190002,202001,100,2433,17,1,0.9214
+190002,202002,100,4324,17,0.8521,1.5274
+190002,202003,100,6598,17,0.9685,1.8795
+190002,202004,100,700,17,1.113,1
+190003,202001,100,7888,64,1,0.9214
+190003,202002,100,4218,64,0.8521,1.5274
+190003,202003,100,7591,64,0.9685,1.8795
+190003,202004,100,4077,64,1.113,1
+190004,202001,100,2247,51,1,0.9214
+190004,202002,100,,51,0.8521,1.5274
+190004,202003,100,,51,0.9685,1.8795
+190004,202004,100,8608,51,1.113,1
+190005,202001,100,,34,1,0.9214
+190005,202002,100,,34,0.8521,1.5274
+190005,202003,100,4456,34,0.9685,1.8795
+190005,202004,100,5134,34,1.113,1
+190006,202001,100,,8,1,0.9214
+190006,202002,100,,8,0.8521,1.5274
+190006,202003,100,,8,0.9685,1.8795
+190006,202004,100,,8,1.113,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_output.csv
new file mode 100644
index 00000000..b5df0dd0
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_output.csv
@@ -0,0 +1,49 @@
+identifier,date,group,other,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,1,0.9214,96.16299559,1,0.9214,73.2661978,9261,R,0,0,4,false,false,false
+190001,202002,100,95,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4996,R,0,0,3,false,false,false
+190001,202003,100,95,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,1480,R,0,0,4,false,false,false
+190001,202004,100,95,1.113,1,87.62068966,1.113,1,81.24249483,4350,R,0,0,5,false,false,false
+190002,202001,100,17,1,0.9214,96.16299559,1,0.9214,73.2661978,2433,R,0,0,4,false,false,false
+190002,202002,100,17,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4324,R,0,0,3,false,false,false
+190002,202003,100,17,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,6598,R,0,0,4,false,false,false
+190002,202004,100,17,1.113,1,87.62068966,1.113,1,81.24249483,700,R,0,0,5,false,false,false
+190003,202001,100,64,1,0.9214,96.16299559,1,0.9214,73.2661978,7888,R,0,0,4,false,false,false
+190003,202002,100,64,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4218,R,0,0,3,false,false,false
+190003,202003,100,64,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,7591,R,0,0,4,false,false,false
+190003,202004,100,64,1.113,1,87.62068966,1.113,1,81.24249483,4077,R,0,0,5,false,false,false
+190004,202001,100,51,1,0.9214,96.16299559,1,0.9214,73.2661978,2247,R,0,0,4,false,false,false
+190004,202002,100,51,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,1914.6687,FIR,0,0,3,false,false,false
+190004,202003,100,51,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,1854.356636,FIR,0,0,4,false,false,false
+190004,202004,100,51,1.113,1,87.62068966,1.113,1,81.24249483,8608,R,0,0,5,false,false,false
+190005,202001,100,34,1,0.9214,96.16299559,1,0.9214,73.2661978,6271.13538,BI,0,0,4,false,false,false
+190005,202002,100,34,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,6806.0944,BI,0,0,3,false,false,false
+190005,202003,100,34,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,4456,R,0,0,4,false,false,false
+190005,202004,100,34,1.113,1,87.62068966,1.113,1,81.24249483,5134,R,0,0,5,false,false,false
+190006,202001,100,8,1,0.9214,96.16299559,1,0.9214,73.2661978,586.1295824,C,0,0,4,false,false,false
+190006,202002,100,8,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,499.4410171,FIC,0,0,3,false,false,false
+190006,202003,100,8,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,483.7086251,FIC,0,0,4,false,false,false
+190006,202004,100,8,1.113,1,87.62068966,1.113,1,81.24249483,538.3676997,FIC,0,0,5,false,false,false
+190001,201901,100,95,1,1.5274,50.3694,,,,0,R,,,,,,
+190001,201902,100,95,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+190001,201903,100,95,1.113,2.6213,89.3761,,,,0,R,,,,,,
+190001,201904,100,95,0.8763,1,74.8643,,,,0,R,,,,,,
+190002,201901,100,17,1,1.5274,50.3694,,,,0,R,,,,,,
+190002,201902,100,17,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+190002,201903,100,17,1.113,2.6213,89.3761,,,,0,R,,,,,,
+190002,201904,100,17,0.8763,1,74.8643,,,,0,R,,,,,,
+190003,201901,100,64,1,1.5274,50.3694,,,,0,R,,,,,,
+190003,201902,100,64,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+190003,201903,100,64,1.113,2.6213,89.3761,,,,0,R,,,,,,
+190003,201904,100,64,0.8763,1,74.8643,,,,0,R,,,,,,
+190004,201901,100,51,1,1.5274,50.3694,,,,0,R,,,,,,
+190004,201902,100,51,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+190004,201903,100,51,1.113,2.6213,89.3761,,,,0,R,,,,,,
+190004,201904,100,51,0.8763,1,74.8643,,,,0,R,,,,,,
+190005,201901,100,34,1,1.5274,50.3694,,,,0,R,,,,,,
+190005,201902,100,34,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+190005,201903,100,34,1.113,2.6213,89.3761,,,,0,R,,,,,,
+190005,201904,100,34,0.8763,1,74.8643,,,,0,R,,,,,,
+190006,201901,100,8,1,1.5274,50.3694,,,,0,R,,,,,,
+190006,201902,100,8,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+190006,201903,100,8,1.113,2.6213,89.3761,,,,0,R,,,,,,
+190006,201904,100,8,0.8763,1,74.8643,,,,0,R,,,,,,
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 857958d1..3b75948e 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -191,3 +191,7 @@ weight_periodicity_multiplier = 12
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
+
+[scenarios.72_partial_links_50_weight]
+weight = "0.5"
+weight_periodicity_multiplier = 12

From b4c7d5453da898d65a62538380309167466b43bf Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 22 May 2023 14:25:03 +0100
Subject: [PATCH 364/531] Last Test Added. Renumbered To Account For Removed
 Tests. Last MoR Test Failing, Need To Fix.

---
 ..._BI_R_NS_C_FI_FI_zeros_excluded_input.csv} |  0
 ...BI_R_NS_C_FI_FI_zeros_excluded_output.csv} |  0
 ..._BI_R_NS_C_FI_FI_zeros_included_input.csv} |  0
 ...BI_R_NS_C_FI_FI_zeros_included_output.csv} |  0
 ...FI_FI_R_FI_alternating_filtered_input.csv} |  0
 ...I_FI_R_FI_alternating_filtered_output.csv} |  0
 .../58_TB_10_partial_default_input.csv        | 73 +++++++++++++++++++
 .../58_TB_10_partial_default_output.csv       | 73 +++++++++++++++++++
 ...v => 66_partial_links_50_weight_input.csv} |  0
 ... => 66_partial_links_50_weight_output.csv} | 48 ++++++------
 ...7_TB_10_muti_variable_50_weight_input.csv} |  0
 ..._TB_10_muti_variable_50_weight_output.csv} |  0
 tests/imputation/mean_of_ratios.toml          | 37 ++++------
 13 files changed, 183 insertions(+), 48 deletions(-)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{68_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv => 55_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv => 55_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{69_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv => 56_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv => 56_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{70_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv => 57_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv => 57_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv} (100%)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_output.csv
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{72_partial_links_50_weight_input.csv => 66_partial_links_50_weight_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{72_partial_links_50_weight_output.csv => 66_partial_links_50_weight_output.csv} (77%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{71_TB_10_muti_variable_50_weight_input.csv => 67_TB_10_muti_variable_50_weight_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{71_TB_10_muti_variable_50_weight_output.csv => 67_TB_10_muti_variable_50_weight_output.csv} (100%)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_NS_C_FI_FI_zeros_excluded_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_NS_C_FI_FI_zeros_included_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_input.csv
new file mode 100644
index 00000000..fdcad233
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_input.csv
@@ -0,0 +1,73 @@
+identifier,date,group,question,other
+80001,202001,100,9244,89
+80001,202002,100,,89
+80001,202003,100,,89
+80002,202001,100,4826,83
+80002,202002,100,,83
+80002,202003,100,,83
+80003,202001,100,7586,4
+80003,202002,100,,4
+80003,202003,100,,4
+80004,202001,100,3975,76
+80004,202002,100,,76
+80004,202003,100,,76
+80005,202001,100,1941,18
+80005,202002,100,,18
+80005,202003,100,,18
+80006,202001,100,5405,94
+80006,202002,100,,94
+80006,202003,100,,94
+80007,202001,100,15172,8
+80007,202002,100,,8
+80007,202003,100,,8
+80008,202001,100,16298,304
+80008,202002,100,,304
+80008,202003,100,,304
+80009,202001,100,3698,45
+80009,202002,100,,45
+80009,202003,100,,45
+80010,202001,100,7722,100
+80010,202002,100,,100
+80010,202003,100,,100
+80011,202001,100,30344,19
+80011,202002,100,,19
+80011,202003,100,,19
+80012,202001,100,16298,304
+80012,202002,100,,304
+80012,202003,100,,304
+80013,202001,200,20190,54
+80013,202002,200,18242,54
+80013,202003,200,28826,54
+80014,202001,200,4260,47
+80014,202002,200,5036,42
+80014,202003,200,6484,42
+80015,202001,200,19236,57
+80015,202002,200,4949,57
+80015,202003,200,3544,57
+80016,202001,200,14902,163
+80016,202002,200,16435,163
+80016,202003,200,24653,163
+80017,202001,200,35476,149
+80017,202002,200,50515,149
+80017,202003,200,53477,149
+80018,202001,200,13845,126
+80018,202002,200,25488,126
+80018,202003,200,27409,126
+80019,202001,200,1099,6
+80019,202002,200,434,6
+80019,202003,200,124,6
+80020,202001,200,3348,22
+80020,202002,200,1996,22
+80020,202003,200,5051,22
+80021,202001,200,29215,108
+80021,202002,200,34168,108
+80021,202003,200,61628,108
+80022,202001,200,6390,67
+80022,202002,200,12705,67
+80022,202003,200,11966,67
+80023,202001,200,4562,18
+80023,202002,200,1717,18
+80023,202003,200,2371,18
+80024,202001,200,,155
+80024,202002,200,18782,155
+80024,202003,200,21046,155
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_output.csv
new file mode 100644
index 00000000..3208283d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_output.csv
@@ -0,0 +1,73 @@
+identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,100,89,,,1,1,107.0882867,9244,R,0,0,12,,,true,true,false
+80001,202002,100,89,,,1,1,1,9244,FIR,0,0,0,,,true,true,true
+80001,202003,100,89,,,1,1,1,9244,FIR,0,0,0,,,true,true,true
+80002,202001,100,83,,,1,1,107.0882867,4826,R,0,0,12,,,true,true,false
+80002,202002,100,83,,,1,1,1,4826,FIR,0,0,0,,,true,true,true
+80002,202003,100,83,,,1,1,1,4826,FIR,0,0,0,,,true,true,true
+80003,202001,100,4,,,1,1,107.0882867,7586,R,0,0,12,,,true,true,false
+80003,202002,100,4,,,1,1,1,7586,FIR,0,0,0,,,true,true,true
+80003,202003,100,4,,,1,1,1,7586,FIR,0,0,0,,,true,true,true
+80004,202001,100,76,,,1,1,107.0882867,3975,R,0,0,12,,,true,true,false
+80004,202002,100,76,,,1,1,1,3975,FIR,0,0,0,,,true,true,true
+80004,202003,100,76,,,1,1,1,3975,FIR,0,0,0,,,true,true,true
+80005,202001,100,18,,,1,1,107.0882867,1941,R,0,0,12,,,true,true,false
+80005,202002,100,18,,,1,1,1,1941,FIR,0,0,0,,,true,true,true
+80005,202003,100,18,,,1,1,1,1941,FIR,0,0,0,,,true,true,true
+80006,202001,100,94,,,1,1,107.0882867,5405,R,0,0,12,,,true,true,false
+80006,202002,100,94,,,1,1,1,5405,FIR,0,0,0,,,true,true,true
+80006,202003,100,94,,,1,1,1,5405,FIR,0,0,0,,,true,true,true
+80007,202001,100,8,,,1,1,107.0882867,15172,R,0,0,12,,,true,true,false
+80007,202002,100,8,,,1,1,1,15172,FIR,0,0,0,,,true,true,true
+80007,202003,100,8,,,1,1,1,15172,FIR,0,0,0,,,true,true,true
+80008,202001,100,304,,,1,1,107.0882867,16298,R,0,0,12,,,true,true,false
+80008,202002,100,304,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
+80008,202003,100,304,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
+80009,202001,100,45,,,1,1,107.0882867,3698,R,0,0,12,,,true,true,false
+80009,202002,100,45,,,1,1,1,3698,FIR,0,0,0,,,true,true,true
+80009,202003,100,45,,,1,1,1,3698,FIR,0,0,0,,,true,true,true
+80010,202001,100,100,,,1,1,107.0882867,7722,R,0,0,12,,,true,true,false
+80010,202002,100,100,,,1,1,1,7722,FIR,0,0,0,,,true,true,true
+80010,202003,100,100,,,1,1,1,7722,FIR,0,0,0,,,true,true,true
+80011,202001,100,19,,,1,1,107.0882867,30344,R,0,0,12,,,true,true,false
+80011,202002,100,19,,,1,1,1,30344,FIR,0,0,0,,,true,true,true
+80011,202003,100,19,,,1,1,1,30344,FIR,0,0,0,,,true,true,true
+80012,202001,100,304,,,1,1,107.0882867,16298,R,0,0,12,,,true,true,false
+80012,202002,100,304,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
+80012,202003,100,304,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
+80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,false,false
+80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,false,false,false
+80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,false,true,false
+80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,false,false
+80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,false,false,false
+80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,false,true,false
+80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,false,false
+80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,false,false,false
+80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,false,true,false
+80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,false,false
+80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,false,false,false
+80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,false,true,false
+80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,false,false
+80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,false,false,false
+80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,false,true,false
+80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,false,false
+80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,false,false,false
+80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,false,true,false
+80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,false,false
+80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,false,false,false
+80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,false,true,false
+80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,false,false
+80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,false,false,false
+80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,false,true,false
+80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,false,false
+80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,false,false,false
+80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,false,true,false
+80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,false,false
+80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,false,false,false
+80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,false,true,false
+80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,false,false
+80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,false,false,false
+80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,false,true,false
+80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,true,false,false
+80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,false,false,false
+80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
similarity index 77%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
index b5df0dd0..dae2ae01 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_partial_links_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,1,0.9214,96.16299559,1,0.9214,73.2661978,9261,R,0,0,4,false,false,false
-190001,202002,100,95,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4996,R,0,0,3,false,false,false
-190001,202003,100,95,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,1480,R,0,0,4,false,false,false
-190001,202004,100,95,1.113,1,87.62068966,1.113,1,81.24249483,4350,R,0,0,5,false,false,false
-190002,202001,100,17,1,0.9214,96.16299559,1,0.9214,73.2661978,2433,R,0,0,4,false,false,false
-190002,202002,100,17,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4324,R,0,0,3,false,false,false
-190002,202003,100,17,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,6598,R,0,0,4,false,false,false
-190002,202004,100,17,1.113,1,87.62068966,1.113,1,81.24249483,700,R,0,0,5,false,false,false
-190003,202001,100,64,1,0.9214,96.16299559,1,0.9214,73.2661978,7888,R,0,0,4,false,false,false
-190003,202002,100,64,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4218,R,0,0,3,false,false,false
-190003,202003,100,64,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,7591,R,0,0,4,false,false,false
-190003,202004,100,64,1.113,1,87.62068966,1.113,1,81.24249483,4077,R,0,0,5,false,false,false
-190004,202001,100,51,1,0.9214,96.16299559,1,0.9214,73.2661978,2247,R,0,0,4,false,false,false
-190004,202002,100,51,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,1914.6687,FIR,0,0,3,false,false,false
-190004,202003,100,51,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,1854.356636,FIR,0,0,4,false,false,false
-190004,202004,100,51,1.113,1,87.62068966,1.113,1,81.24249483,8608,R,0,0,5,false,false,false
-190005,202001,100,34,1,0.9214,96.16299559,1,0.9214,73.2661978,6271.13538,BI,0,0,4,false,false,false
-190005,202002,100,34,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,6806.0944,BI,0,0,3,false,false,false
-190005,202003,100,34,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,4456,R,0,0,4,false,false,false
-190005,202004,100,34,1.113,1,87.62068966,1.113,1,81.24249483,5134,R,0,0,5,false,false,false
-190006,202001,100,8,1,0.9214,96.16299559,1,0.9214,73.2661978,586.1295824,C,0,0,4,false,false,false
-190006,202002,100,8,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,499.4410171,FIC,0,0,3,false,false,false
-190006,202003,100,8,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,483.7086251,FIC,0,0,4,false,false,false
-190006,202004,100,8,1.113,1,87.62068966,1.113,1,81.24249483,538.3676997,FIC,0,0,5,false,false,false
+190001,202001,100,95,1,0.9214,96.16299559,1,0.9214,73.2661978,9261,R,0,0,4,,,false
+190001,202002,100,95,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4996,R,0,0,3,,,false
+190001,202003,100,95,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,1480,R,0,0,4,,,false
+190001,202004,100,95,1.113,1,87.62068966,1.113,1,81.24249483,4350,R,0,0,5,,,false
+190002,202001,100,17,1,0.9214,96.16299559,1,0.9214,73.2661978,2433,R,0,0,4,,,false
+190002,202002,100,17,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4324,R,0,0,3,,,false
+190002,202003,100,17,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,6598,R,0,0,4,,,false
+190002,202004,100,17,1.113,1,87.62068966,1.113,1,81.24249483,700,R,0,0,5,,,false
+190003,202001,100,64,1,0.9214,96.16299559,1,0.9214,73.2661978,7888,R,0,0,4,,,false
+190003,202002,100,64,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4218,R,0,0,3,,,false
+190003,202003,100,64,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,7591,R,0,0,4,,,false
+190003,202004,100,64,1.113,1,87.62068966,1.113,1,81.24249483,4077,R,0,0,5,,,false
+190004,202001,100,51,1,0.9214,96.16299559,1,0.9214,73.2661978,2247,R,0,0,4,,,false
+190004,202002,100,51,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,1914.6687,FIR,0,0,3,,,false
+190004,202003,100,51,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,1854.356636,FIR,0,0,4,,,false
+190004,202004,100,51,1.113,1,87.62068966,1.113,1,81.24249483,8608,R,0,0,5,,,false
+190005,202001,100,34,1,0.9214,96.16299559,1,0.9214,73.2661978,6271.13538,BI,0,0,4,,,false
+190005,202002,100,34,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,6806.0944,BI,0,0,3,,,false
+190005,202003,100,34,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,4456,R,0,0,4,,,false
+190005,202004,100,34,1.113,1,87.62068966,1.113,1,81.24249483,5134,R,0,0,5,,,false
+190006,202001,100,8,1,0.9214,96.16299559,1,0.9214,73.2661978,586.1295824,C,0,0,4,,,false
+190006,202002,100,8,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,499.4410171,FIC,0,0,3,,,false
+190006,202003,100,8,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,483.7086251,FIC,0,0,4,,,false
+190006,202004,100,8,1.113,1,87.62068966,1.113,1,81.24249483,538.3676997,FIC,0,0,5,,,false
 190001,201901,100,95,1,1.5274,50.3694,,,,0,R,,,,,,
 190001,201902,100,95,0.9685,1.8795,121.4187,,,,0,R,,,,,,
 190001,201903,100,95,1.113,2.6213,89.3761,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_10_muti_variable_50_weight_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_10_muti_variable_50_weight_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_10_muti_variable_50_weight_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_TB_10_muti_variable_50_weight_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_10_muti_variable_50_weight_output.csv
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 3b75948e..1ff30f2f 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -124,6 +124,17 @@ weight_periodicity_multiplier = 12
 weight = "0.5"
 weight_periodicity_multiplier = 12
 
+[scenarios.56_BI_BI_R_NS_C_FI_FI_zeros_included]
+include_zeros = true
+
+[scenarios.57_BI_BI_R_FI_FI_R_FI_alternating_filtered]
+link_filter = "NOT(identifier = '70001' AND date IN ('202003', '202005'))"
+
+[scenarios.58_TB_10_partial_default]
+lower_trim = 10
+upper_trim = 10
+trim_threshold = 10
+
 [scenarios.59_class_change_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
@@ -163,35 +174,13 @@ lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
 
-[scenarios.66_TB_50_50_weight_filtered_partial_default]
-weight = "0.5"
-weight_periodicity_multiplier = 12
-link_filter = "identifier NOT IN ('30001', '30002', '30010')"
-lower_trim = 50
-upper_trim = 50
-trim_threshold = 10
-
-[scenarios.67_TB_50_50_weight_filtered_full_default]
+[scenarios.66_partial_links_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
-link_filter = "identifier NOT IN ('30001', '30002', '30010')"
-lower_trim = 50
-upper_trim = 50
-trim_threshold = 10
-
-[scenarios.68_BI_BI_R_NS_C_FI_FI_zeros_included]
-include_zeros = true
-
-[scenarios.70_BI_BI_R_FI_FI_R_FI_alternating_filtered]
-link_filter = "NOT(identifier = '70001' AND date IN ('202003', '202005'))"
 
-[scenarios.71_TB_10_muti_variable_50_weight]
+[scenarios.67_TB_10_muti_variable_50_weight]
 weight = "0.5"
 weight_periodicity_multiplier = 12
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
-
-[scenarios.72_partial_links_50_weight]
-weight = "0.5"
-weight_periodicity_multiplier = 12

From e42c6f15986ab7a7267945a1524a59dcfdb1b7a5 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 22 May 2023 14:23:51 +0100
Subject: [PATCH 365/531] New output format for comparer

---
 tests/helpers.py | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/tests/helpers.py b/tests/helpers.py
index 9db1593c..dd82b2c8 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -70,20 +70,34 @@ def check_df_equality(expected, actual, keep_cols=None):
             .asDict()
         )
 
-        diff_df = diff_df.sort("id").select(
-            [
+        diff_col_mapping = []
+        diff_cols = (set(col_list) - set(keep_cols)) & {
+            name for name in equal_counts if equal_counts[name] != diff_count
+        }
+        for name in keep_cols + sorted(diff_cols):
+            diff_col_mapping += [
+                lit(name),
                 create_map(
                     lit("expected"),
                     col(f"expected_{name}"),
                     lit("actual"),
-                    col(f"actual_{name}"),
-                ).alias(name)
-                for name in sorted(col_list)
-                if equal_counts[name] != diff_count or name in keep_cols
+                    col(f"actual_{name}")
+                )
             ]
+        diff_df = (
+            diff_df.sort("id")
+            .select("id", create_map(*diff_col_mapping).alias("diff"))
         )
 
-        diff_str = "\n".join(str(row) for row in diff_df.take(100))
+        display_list = []
+        for row in diff_df.take(100):
+            row_dict = row.asDict(True)
+            diff_dict = row_dict["diff"]
+            for key in list(diff_dict.keys()):
+                if diff_dict[key]["expected"] == diff_dict[key]["actual"]:
+                    del diff_dict[key]
+                display_list.append(json.dumps(row_dict, indent=4))
+        diff_str = '\n'.join(display_list)
         fail(
             f"Mismatching rows in provided data frames (showing up to 100):\n\n{diff_str}"
         )

From c7620995aae5316c0704bf7dafa7bf5015332121 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 22 May 2023 14:24:21 +0100
Subject: [PATCH 366/531] Actually import json module

---
 tests/helpers.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/helpers.py b/tests/helpers.py
index dd82b2c8..874b15b1 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -1,3 +1,5 @@
+
+import json
 from functools import reduce
 
 from pyspark.sql.functions import (

From 42d080dbd6995db5da32288a0c70b51743b98424 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 22 May 2023 16:09:04 +0100
Subject: [PATCH 367/531] New comparer format

---
 tests/helpers.py | 41 ++++++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 21 deletions(-)

diff --git a/tests/helpers.py b/tests/helpers.py
index 874b15b1..bb72bc0e 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -1,5 +1,3 @@
-
-import json
 from functools import reduce
 
 from pyspark.sql.functions import (
@@ -73,33 +71,34 @@ def check_df_equality(expected, actual, keep_cols=None):
         )
 
         diff_col_mapping = []
-        diff_cols = (set(col_list) - set(keep_cols)) & {
+        diff_cols = {
             name for name in equal_counts if equal_counts[name] != diff_count
-        }
+        } - set(keep_cols)
         for name in keep_cols + sorted(diff_cols):
-            diff_col_mapping += [
-                lit(name),
+            expected_col = col(f"expected_{name}")
+            actual_col = col(f"actual_{name}")
+            mapping = when(
+                ~expected_col.eqNullSafe(actual_col),
                 create_map(
-                    lit("expected"),
-                    col(f"expected_{name}"),
-                    lit("actual"),
-                    col(f"actual_{name}")
+                    lit("expected"), expected_col,
+                    lit("actual"), actual_col
+                )
+            )
+
+            if name in keep_cols:
+                mapping = mapping.otherwise(
+                   create_map(lit("value"), expected_col)
                 )
-            ]
+
+            diff_col_mapping.append(mapping .alias(name))
+
         diff_df = (
             diff_df.sort("id")
-            .select("id", create_map(*diff_col_mapping).alias("diff"))
+            .select(diff_col_mapping)
         )
 
-        display_list = []
-        for row in diff_df.take(100):
-            row_dict = row.asDict(True)
-            diff_dict = row_dict["diff"]
-            for key in list(diff_dict.keys()):
-                if diff_dict[key]["expected"] == diff_dict[key]["actual"]:
-                    del diff_dict[key]
-                display_list.append(json.dumps(row_dict, indent=4))
-        diff_str = '\n'.join(display_list)
+
+        diff_str = '\n'.join(str(row) for row in diff_df.take(100))
         fail(
             f"Mismatching rows in provided data frames (showing up to 100):\n\n{diff_str}"
         )

From e1c8401aa61c899b87250196675ceb6fb2ff2603 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 23 May 2023 12:03:33 +0100
Subject: [PATCH 368/531] Adjust weighting to support partial links

---
 .../imputation/engine.py                      | 46 ++++++++++++-------
 1 file changed, 30 insertions(+), 16 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 136bdde0..400ec023 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -5,10 +5,11 @@
 """
 from decimal import Decimal
 from enum import Enum
+from functools import reduce
 from typing import Optional, Union
 
 from pyspark.sql import Column, DataFrame
-from pyspark.sql.functions import col, expr, lit, when
+from pyspark.sql.functions import col, expr, first, lit, when
 from pyspark.sql.types import DecimalType, StringType
 
 from statistical_methods_library.utilities.periods import (
@@ -370,28 +371,38 @@ def calculate_weighted_link(link_name):
                     .alias(link_name)
                 )
 
+            weight_col_names = [
+                name for name in ("forward", "backward", "construction")
+                if name not in input_params
+            ]
+
+            if not weight_col_names:
+                return
+
+            weight_cols = [
+
+            ]
             weighting_df = (
                 prepared_df.select(
                     "period",
                     "grouping",
-                    expr("forward AS forward_unweighted"),
-                    expr("backward AS backward_unweighted"),
-                    expr("construction AS construction_unweighted"),
+                    *(col(name).alias(f"{name}_unweighted")
+                        for name in weight_col_names
+                    )
                 )
                 .unionByName(
                     validated_back_data_df.select(
                         "period",
                         "grouping",
-                        "forward_unweighted",
-                        "backward_unweighted",
-                        "construction_unweighted",
+                        *(f"{name}_unweighted" for name in weight_col_names)
                     )
                 )
                 .groupBy("period", "grouping")
                 .agg(
-                    expr("first(forward_unweighted) AS forward"),
-                    expr("first(backward_unweighted) AS backward"),
-                    expr("first(construction_unweighted) AS construction"),
+                    *(
+                        first(f"{name}_unweighted").alias(name)
+                        for name in weight_col_names
+                    )
                 )
             )
 
@@ -414,14 +425,17 @@ def calculate_weighted_link(link_name):
                 .select(
                     expr("curr.period AS period"),
                     expr("curr.grouping AS grouping"),
-                    calculate_weighted_link("forward"),
-                    calculate_weighted_link("backward"),
-                    calculate_weighted_link("construction"),
+                    *(
+                        calculate_weighted_link(name)
+                        for name in weight_col_names
+                    )
                 )
                 .join(
-                    prepared_df.withColumnRenamed("forward", "forward_unweighted")
-                    .withColumnRenamed("backward", "backward_unweighted")
-                    .withColumnRenamed("construction", "construction_unweighted"),
+                    reduce(
+                        lambda d, n: d.withColumnRenamed(n, f"{n}_unweighted"),
+                        weight_col_names,
+                        prepared_df
+                    ),
                     ["period", "grouping"],
                 )
             )

From fcf88c7c5c8892e3e7e5d2314ab2fc4ac3b569f5 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 23 May 2023 12:06:36 +0100
Subject: [PATCH 369/531] Columns Not Output. Nor Input.

---
 .../66_partial_links_50_weight_output.csv     | 98 +++++++++----------
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
index dae2ae01..9cbad422 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,1,0.9214,96.16299559,1,0.9214,73.2661978,9261,R,0,0,4,,,false
-190001,202002,100,95,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4996,R,0,0,3,,,false
-190001,202003,100,95,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,1480,R,0,0,4,,,false
-190001,202004,100,95,1.113,1,87.62068966,1.113,1,81.24249483,4350,R,0,0,5,,,false
-190002,202001,100,17,1,0.9214,96.16299559,1,0.9214,73.2661978,2433,R,0,0,4,,,false
-190002,202002,100,17,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4324,R,0,0,3,,,false
-190002,202003,100,17,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,6598,R,0,0,4,,,false
-190002,202004,100,17,1.113,1,87.62068966,1.113,1,81.24249483,700,R,0,0,5,,,false
-190003,202001,100,64,1,0.9214,96.16299559,1,0.9214,73.2661978,7888,R,0,0,4,,,false
-190003,202002,100,64,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,4218,R,0,0,3,,,false
-190003,202003,100,64,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,7591,R,0,0,4,,,false
-190003,202004,100,64,1.113,1,87.62068966,1.113,1,81.24249483,4077,R,0,0,5,,,false
-190004,202001,100,51,1,0.9214,96.16299559,1,0.9214,73.2661978,2247,R,0,0,4,,,false
-190004,202002,100,51,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,1914.6687,FIR,0,0,3,,,false
-190004,202003,100,51,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,1854.356636,FIR,0,0,4,,,false
-190004,202004,100,51,1.113,1,87.62068966,1.113,1,81.24249483,8608,R,0,0,5,,,false
-190005,202001,100,34,1,0.9214,96.16299559,1,0.9214,73.2661978,6271.13538,BI,0,0,4,,,false
-190005,202002,100,34,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,6806.0944,BI,0,0,3,,,false
-190005,202003,100,34,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,4456,R,0,0,4,,,false
-190005,202004,100,34,1.113,1,87.62068966,1.113,1,81.24249483,5134,R,0,0,5,,,false
-190006,202001,100,8,1,0.9214,96.16299559,1,0.9214,73.2661978,586.1295824,C,0,0,4,,,false
-190006,202002,100,8,0.8521,1.5274,76.92045455,0.8521,1.5274,99.16957728,499.4410171,FIC,0,0,3,,,false
-190006,202003,100,8,0.9685,1.8795,95.83333333,0.9685,1.8795,92.60471667,483.7086251,FIC,0,0,4,,,false
-190006,202004,100,8,1.113,1,87.62068966,1.113,1,81.24249483,538.3676997,FIC,0,0,5,,,false
-190001,201901,100,95,1,1.5274,50.3694,,,,0,R,,,,,,
-190001,201902,100,95,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-190001,201903,100,95,1.113,2.6213,89.3761,,,,0,R,,,,,,
-190001,201904,100,95,0.8763,1,74.8643,,,,0,R,,,,,,
-190002,201901,100,17,1,1.5274,50.3694,,,,0,R,,,,,,
-190002,201902,100,17,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-190002,201903,100,17,1.113,2.6213,89.3761,,,,0,R,,,,,,
-190002,201904,100,17,0.8763,1,74.8643,,,,0,R,,,,,,
-190003,201901,100,64,1,1.5274,50.3694,,,,0,R,,,,,,
-190003,201902,100,64,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-190003,201903,100,64,1.113,2.6213,89.3761,,,,0,R,,,,,,
-190003,201904,100,64,0.8763,1,74.8643,,,,0,R,,,,,,
-190004,201901,100,51,1,1.5274,50.3694,,,,0,R,,,,,,
-190004,201902,100,51,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-190004,201903,100,51,1.113,2.6213,89.3761,,,,0,R,,,,,,
-190004,201904,100,51,0.8763,1,74.8643,,,,0,R,,,,,,
-190005,201901,100,34,1,1.5274,50.3694,,,,0,R,,,,,,
-190005,201902,100,34,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-190005,201903,100,34,1.113,2.6213,89.3761,,,,0,R,,,,,,
-190005,201904,100,34,0.8763,1,74.8643,,,,0,R,,,,,,
-190006,201901,100,8,1,1.5274,50.3694,,,,0,R,,,,,,
-190006,201902,100,8,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-190006,201903,100,8,1.113,2.6213,89.3761,,,,0,R,,,,,,
-190006,201904,100,8,0.8763,1,74.8643,,,,0,R,,,,,,
+identifier,date,group,other,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,95,96.16299559,1,0.9214,73.2661978,9261,R,0,0,4,,,false
+190001,202002,100,95,76.92045455,0.8521,1.5274,99.16957728,4996,R,0,0,3,,,false
+190001,202003,100,95,95.83333333,0.9685,1.8795,92.60471667,1480,R,0,0,4,,,false
+190001,202004,100,95,87.62068966,1.113,1,81.24249483,4350,R,0,0,5,,,false
+190002,202001,100,17,96.16299559,1,0.9214,73.2661978,2433,R,0,0,4,,,false
+190002,202002,100,17,76.92045455,0.8521,1.5274,99.16957728,4324,R,0,0,3,,,false
+190002,202003,100,17,95.83333333,0.9685,1.8795,92.60471667,6598,R,0,0,4,,,false
+190002,202004,100,17,87.62068966,1.113,1,81.24249483,700,R,0,0,5,,,false
+190003,202001,100,64,96.16299559,1,0.9214,73.2661978,7888,R,0,0,4,,,false
+190003,202002,100,64,76.92045455,0.8521,1.5274,99.16957728,4218,R,0,0,3,,,false
+190003,202003,100,64,95.83333333,0.9685,1.8795,92.60471667,7591,R,0,0,4,,,false
+190003,202004,100,64,87.62068966,1.113,1,81.24249483,4077,R,0,0,5,,,false
+190004,202001,100,51,96.16299559,1,0.9214,73.2661978,2247,R,0,0,4,,,false
+190004,202002,100,51,76.92045455,0.8521,1.5274,99.16957728,1914.6687,FIR,0,0,3,,,false
+190004,202003,100,51,95.83333333,0.9685,1.8795,92.60471667,1854.356636,FIR,0,0,4,,,false
+190004,202004,100,51,87.62068966,1.113,1,81.24249483,8608,R,0,0,5,,,false
+190005,202001,100,34,96.16299559,1,0.9214,73.2661978,6271.13538,BI,0,0,4,,,false
+190005,202002,100,34,76.92045455,0.8521,1.5274,99.16957728,6806.0944,BI,0,0,3,,,false
+190005,202003,100,34,95.83333333,0.9685,1.8795,92.60471667,4456,R,0,0,4,,,false
+190005,202004,100,34,87.62068966,1.113,1,81.24249483,5134,R,0,0,5,,,false
+190006,202001,100,8,96.16299559,1,0.9214,73.2661978,586.1295824,C,0,0,4,,,false
+190006,202002,100,8,76.92045455,0.8521,1.5274,99.16957728,499.4410171,FIC,0,0,3,,,false
+190006,202003,100,8,95.83333333,0.9685,1.8795,92.60471667,483.7086251,FIC,0,0,4,,,false
+190006,202004,100,8,87.62068966,1.113,1,81.24249483,538.3676997,FIC,0,0,5,,,false
+190001,201901,100,95,50.3694,,,,0,R,,,,,,
+190001,201902,100,95,121.4187,,,,0,R,,,,,,
+190001,201903,100,95,89.3761,,,,0,R,,,,,,
+190001,201904,100,95,74.8643,,,,0,R,,,,,,
+190002,201901,100,17,50.3694,,,,0,R,,,,,,
+190002,201902,100,17,121.4187,,,,0,R,,,,,,
+190002,201903,100,17,89.3761,,,,0,R,,,,,,
+190002,201904,100,17,74.8643,,,,0,R,,,,,,
+190003,201901,100,64,50.3694,,,,0,R,,,,,,
+190003,201902,100,64,121.4187,,,,0,R,,,,,,
+190003,201903,100,64,89.3761,,,,0,R,,,,,,
+190003,201904,100,64,74.8643,,,,0,R,,,,,,
+190004,201901,100,51,50.3694,,,,0,R,,,,,,
+190004,201902,100,51,121.4187,,,,0,R,,,,,,
+190004,201903,100,51,89.3761,,,,0,R,,,,,,
+190004,201904,100,51,74.8643,,,,0,R,,,,,,
+190005,201901,100,34,50.3694,,,,0,R,,,,,,
+190005,201902,100,34,121.4187,,,,0,R,,,,,,
+190005,201903,100,34,89.3761,,,,0,R,,,,,,
+190005,201904,100,34,74.8643,,,,0,R,,,,,,
+190006,201901,100,8,50.3694,,,,0,R,,,,,,
+190006,201902,100,8,121.4187,,,,0,R,,,,,,
+190006,201903,100,8,89.3761,,,,0,R,,,,,,
+190006,201904,100,8,74.8643,,,,0,R,,,,,,

From f1ae35acbb323e6fab8a0e096f57e568b8c27ba5 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 23 May 2023 12:13:33 +0100
Subject: [PATCH 370/531] Stop looking for non-existant columns in back data
 when partial weighting

---
 .../imputation/engine.py                      | 26 +++++++++----------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 400ec023..54b234e6 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -137,21 +137,19 @@ def impute(
 
         weight = lit(weight)
         weight_periodicity = weight_periodicity_multiplier * periodicity
-        back_input_params.update(
-            {
-                "forward_unweighted": unweighted_forward_link_col,
-                "backward_unweighted": unweighted_backward_link_col,
-                "construction_unweighted": unweighted_construction_link_col,
-            }
-        )
+        weight_col_mapping = {
+            "forward_unweighted": unweighted_forward_link_col,
+            "backward_unweighted": unweighted_backward_link_col,
+            "construction_unweighted": unweighted_construction_link_col,
+        }
 
-        output_col_mapping.update(
-            {
-                "backward_unweighted": unweighted_backward_link_col,
-                "forward_unweighted": unweighted_forward_link_col,
-                "construction_unweighted": unweighted_construction_link_col,
-            }
-        )
+        for name in "forward", "backward", "construction":
+            if name not in input_params:
+                del weight_col_mapping[name]
+
+        back_input_params.update(weight_col_mapping)
+
+        output_col_mapping.update(weight_col_mapping)
 
     type_mapping = {
         "period": StringType,

From dbebda35a73aab221a86905356e7c97add6c2373 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 23 May 2023 12:16:42 +0100
Subject: [PATCH 371/531] Fix partial weighting back data input validation

---
 statistical_methods_library/imputation/engine.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 54b234e6..8566ee7c 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -144,8 +144,8 @@ def impute(
         }
 
         for name in "forward", "backward", "construction":
-            if name not in input_params:
-                del weight_col_mapping[name]
+            if name in input_params:
+                del weight_col_mapping[f"{name}_unweighted"]
 
         back_input_params.update(weight_col_mapping)
 

From da441cbb09bc0a0ff9cd5f5bea2167373f2fc278 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 23 May 2023 12:24:06 +0100
Subject: [PATCH 372/531] Final test working. Linted.

---
 .../imputation/engine.py                      | 27 ++++-------
 .../66_partial_links_50_weight_output.csv     | 48 +++++++++----------
 tests/helpers.py                              | 32 ++++---------
 3 files changed, 43 insertions(+), 64 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 8566ee7c..47f164f1 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -12,10 +12,8 @@
 from pyspark.sql.functions import col, expr, first, lit, when
 from pyspark.sql.types import DecimalType, StringType
 
-from statistical_methods_library.utilities.periods import (
-    calculate_next_period,
-    calculate_previous_period,
-)
+from statistical_methods_library.utilities.periods import (calculate_next_period,
+                                                           calculate_previous_period)
 from statistical_methods_library.utilities.validation import validate_dataframe
 
 from .ratio_calculators import RatioCalculator, construction
@@ -370,29 +368,28 @@ def calculate_weighted_link(link_name):
                 )
 
             weight_col_names = [
-                name for name in ("forward", "backward", "construction")
+                name
+                for name in ("forward", "backward", "construction")
                 if name not in input_params
             ]
 
             if not weight_col_names:
                 return
 
-            weight_cols = [
-
-            ]
             weighting_df = (
                 prepared_df.select(
                     "period",
                     "grouping",
-                    *(col(name).alias(f"{name}_unweighted")
+                    *(
+                        col(name).alias(f"{name}_unweighted")
                         for name in weight_col_names
-                    )
+                    ),
                 )
                 .unionByName(
                     validated_back_data_df.select(
                         "period",
                         "grouping",
-                        *(f"{name}_unweighted" for name in weight_col_names)
+                        *(f"{name}_unweighted" for name in weight_col_names),
                     )
                 )
                 .groupBy("period", "grouping")
@@ -423,16 +420,13 @@ def calculate_weighted_link(link_name):
                 .select(
                     expr("curr.period AS period"),
                     expr("curr.grouping AS grouping"),
-                    *(
-                        calculate_weighted_link(name)
-                        for name in weight_col_names
-                    )
+                    *(calculate_weighted_link(name) for name in weight_col_names),
                 )
                 .join(
                     reduce(
                         lambda d, n: d.withColumnRenamed(n, f"{n}_unweighted"),
                         weight_col_names,
-                        prepared_df
+                        prepared_df,
                     ),
                     ["period", "grouping"],
                 )
@@ -560,7 +554,6 @@ def backward_impute(df: DataFrame) -> DataFrame:
     # --- Construction functions ---
     def construct_values(df: DataFrame) -> DataFrame:
         if back_data_df:
-            # Add in the constructions and forward imputes from construction in the back data
             df = df.unionByName(
                 back_data_period_df.filter(
                     (
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
index 9cbad422..f523f87f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
@@ -1,28 +1,28 @@
 identifier,date,group,other,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,96.16299559,1,0.9214,73.2661978,9261,R,0,0,4,,,false
-190001,202002,100,95,76.92045455,0.8521,1.5274,99.16957728,4996,R,0,0,3,,,false
-190001,202003,100,95,95.83333333,0.9685,1.8795,92.60471667,1480,R,0,0,4,,,false
-190001,202004,100,95,87.62068966,1.113,1,81.24249483,4350,R,0,0,5,,,false
-190002,202001,100,17,96.16299559,1,0.9214,73.2661978,2433,R,0,0,4,,,false
-190002,202002,100,17,76.92045455,0.8521,1.5274,99.16957728,4324,R,0,0,3,,,false
-190002,202003,100,17,95.83333333,0.9685,1.8795,92.60471667,6598,R,0,0,4,,,false
-190002,202004,100,17,87.62068966,1.113,1,81.24249483,700,R,0,0,5,,,false
-190003,202001,100,64,96.16299559,1,0.9214,73.2661978,7888,R,0,0,4,,,false
-190003,202002,100,64,76.92045455,0.8521,1.5274,99.16957728,4218,R,0,0,3,,,false
-190003,202003,100,64,95.83333333,0.9685,1.8795,92.60471667,7591,R,0,0,4,,,false
-190003,202004,100,64,87.62068966,1.113,1,81.24249483,4077,R,0,0,5,,,false
-190004,202001,100,51,96.16299559,1,0.9214,73.2661978,2247,R,0,0,4,,,false
-190004,202002,100,51,76.92045455,0.8521,1.5274,99.16957728,1914.6687,FIR,0,0,3,,,false
-190004,202003,100,51,95.83333333,0.9685,1.8795,92.60471667,1854.356636,FIR,0,0,4,,,false
-190004,202004,100,51,87.62068966,1.113,1,81.24249483,8608,R,0,0,5,,,false
-190005,202001,100,34,96.16299559,1,0.9214,73.2661978,6271.13538,BI,0,0,4,,,false
-190005,202002,100,34,76.92045455,0.8521,1.5274,99.16957728,6806.0944,BI,0,0,3,,,false
-190005,202003,100,34,95.83333333,0.9685,1.8795,92.60471667,4456,R,0,0,4,,,false
-190005,202004,100,34,87.62068966,1.113,1,81.24249483,5134,R,0,0,5,,,false
-190006,202001,100,8,96.16299559,1,0.9214,73.2661978,586.1295824,C,0,0,4,,,false
-190006,202002,100,8,76.92045455,0.8521,1.5274,99.16957728,499.4410171,FIC,0,0,3,,,false
-190006,202003,100,8,95.83333333,0.9685,1.8795,92.60471667,483.7086251,FIC,0,0,4,,,false
-190006,202004,100,8,87.62068966,1.113,1,81.24249483,538.3676997,FIC,0,0,5,,,false
+190001,202001,100,95,96.16299559,1,0.9214,73.2661978,9261,R,0,0,4,false,false,false
+190001,202002,100,95,76.92045455,0.8521,1.5274,99.16957728,4996,R,0,0,3,false,false,false
+190001,202003,100,95,95.83333333,0.9685,1.8795,92.60471667,1480,R,0,0,4,false,false,false
+190001,202004,100,95,87.62068966,1.113,1,81.24249483,4350,R,0,0,5,false,false,false
+190002,202001,100,17,96.16299559,1,0.9214,73.2661978,2433,R,0,0,4,false,false,false
+190002,202002,100,17,76.92045455,0.8521,1.5274,99.16957728,4324,R,0,0,3,false,false,false
+190002,202003,100,17,95.83333333,0.9685,1.8795,92.60471667,6598,R,0,0,4,false,false,false
+190002,202004,100,17,87.62068966,1.113,1,81.24249483,700,R,0,0,5,false,false,false
+190003,202001,100,64,96.16299559,1,0.9214,73.2661978,7888,R,0,0,4,false,false,false
+190003,202002,100,64,76.92045455,0.8521,1.5274,99.16957728,4218,R,0,0,3,false,false,false
+190003,202003,100,64,95.83333333,0.9685,1.8795,92.60471667,7591,R,0,0,4,false,false,false
+190003,202004,100,64,87.62068966,1.113,1,81.24249483,4077,R,0,0,5,false,false,false
+190004,202001,100,51,96.16299559,1,0.9214,73.2661978,2247,R,0,0,4,false,false,false
+190004,202002,100,51,76.92045455,0.8521,1.5274,99.16957728,1914.6687,FIR,0,0,3,false,false,false
+190004,202003,100,51,95.83333333,0.9685,1.8795,92.60471667,1854.356636,FIR,0,0,4,false,false,false
+190004,202004,100,51,87.62068966,1.113,1,81.24249483,8608,R,0,0,5,false,false,false
+190005,202001,100,34,96.16299559,1,0.9214,73.2661978,6271.13538,BI,0,0,4,false,false,false
+190005,202002,100,34,76.92045455,0.8521,1.5274,99.16957728,6806.0944,BI,0,0,3,false,false,false
+190005,202003,100,34,95.83333333,0.9685,1.8795,92.60471667,4456,R,0,0,4,false,false,false
+190005,202004,100,34,87.62068966,1.113,1,81.24249483,5134,R,0,0,5,false,false,false
+190006,202001,100,8,96.16299559,1,0.9214,73.2661978,586.1295824,C,0,0,4,false,false,false
+190006,202002,100,8,76.92045455,0.8521,1.5274,99.16957728,499.4410171,FIC,0,0,3,false,false,false
+190006,202003,100,8,95.83333333,0.9685,1.8795,92.60471667,483.7086251,FIC,0,0,4,false,false,false
+190006,202004,100,8,87.62068966,1.113,1,81.24249483,538.3676997,FIC,0,0,5,false,false,false
 190001,201901,100,95,50.3694,,,,0,R,,,,,,
 190001,201902,100,95,121.4187,,,,0,R,,,,,,
 190001,201903,100,95,89.3761,,,,0,R,,,,,,
diff --git a/tests/helpers.py b/tests/helpers.py
index bb72bc0e..2492fcfd 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -1,13 +1,7 @@
 from functools import reduce
 
-from pyspark.sql.functions import (
-    col,
-    count,
-    create_map,
-    lit,
-    monotonically_increasing_id,
-    when,
-)
+from pyspark.sql.functions import (col, count, create_map, lit,
+                                   monotonically_increasing_id, when)
 from pytest import fail
 
 
@@ -47,7 +41,8 @@ def check_df_equality(expected, actual, keep_cols=None):
     diff_df = (
         expected.join(actual, ["id"], "full")
         .filter(reduce(lambda x, y: x | y, filter_list))
-        .select("id",
+        .select(
+            "id",
             *(col(f"expected.{name}").alias(f"expected_{name}") for name in col_list),
             *(col(f"actual.{name}").alias(f"actual_{name}") for name in col_list),
         )
@@ -79,26 +74,17 @@ def check_df_equality(expected, actual, keep_cols=None):
             actual_col = col(f"actual_{name}")
             mapping = when(
                 ~expected_col.eqNullSafe(actual_col),
-                create_map(
-                    lit("expected"), expected_col,
-                    lit("actual"), actual_col
-                )
+                create_map(lit("expected"), expected_col, lit("actual"), actual_col),
             )
 
             if name in keep_cols:
-                mapping = mapping.otherwise(
-                   create_map(lit("value"), expected_col)
-                )
+                mapping = mapping.otherwise(create_map(lit("value"), expected_col))
 
-            diff_col_mapping.append(mapping .alias(name))
-
-        diff_df = (
-            diff_df.sort("id")
-            .select(diff_col_mapping)
-        )
+            diff_col_mapping.append(mapping.alias(name))
 
+        diff_df = diff_df.sort("id").select(diff_col_mapping)
 
-        diff_str = '\n'.join(str(row) for row in diff_df.take(100))
+        diff_str = "\n".join(str(row) for row in diff_df.take(100))
         fail(
             f"Mismatching rows in provided data frames (showing up to 100):\n\n{diff_str}"
         )

From 9372a11c6f8b0deb4a208b780d8383cc9706f694 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 23 May 2023 12:26:08 +0100
Subject: [PATCH 373/531] New rc with fixed method

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 066164f7..8941f336 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc10"
+version = "12.0.0-rc11"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 861d3a00ea387f1d8e63bb08932beae8f764f4c7 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 23 May 2023 15:24:04 +0100
Subject: [PATCH 374/531] Make spark session session scope as the risk of
 unintended interactions is lower than the risk of issues when constantly
 spinning up and down spark sessions in practice

---
 tests/conftest.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/conftest.py b/tests/conftest.py
index f09231ab..3de3f4a8 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -34,9 +34,7 @@ def load(columns, types, test_module, test_function, test_category, test_data):
 
     return load
 
-
-# We want to isolate the session per tests to prevent interactions
-@pytest.fixture(scope="function")
+@pytest.fixture(scope="session")
 def fxt_spark_session():
     """
     Creates a Spark session to be used throughout all tests.

From d134159b963d7fd70c53b9ab19305c550c068085 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 23 May 2023 17:27:06 +0100
Subject: [PATCH 375/531] Linting

---
 statistical_methods_library/imputation/engine.py |  6 ++++--
 tests/conftest.py                                |  1 +
 tests/helpers.py                                 | 10 ++++++++--
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 47f164f1..b9fa8827 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -12,8 +12,10 @@
 from pyspark.sql.functions import col, expr, first, lit, when
 from pyspark.sql.types import DecimalType, StringType
 
-from statistical_methods_library.utilities.periods import (calculate_next_period,
-                                                           calculate_previous_period)
+from statistical_methods_library.utilities.periods import (
+    calculate_next_period,
+    calculate_previous_period,
+)
 from statistical_methods_library.utilities.validation import validate_dataframe
 
 from .ratio_calculators import RatioCalculator, construction
diff --git a/tests/conftest.py b/tests/conftest.py
index 3de3f4a8..9cb9d27a 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -34,6 +34,7 @@ def load(columns, types, test_module, test_function, test_category, test_data):
 
     return load
 
+
 @pytest.fixture(scope="session")
 def fxt_spark_session():
     """
diff --git a/tests/helpers.py b/tests/helpers.py
index 2492fcfd..006b2d72 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -1,7 +1,13 @@
 from functools import reduce
 
-from pyspark.sql.functions import (col, count, create_map, lit,
-                                   monotonically_increasing_id, when)
+from pyspark.sql.functions import (
+    col,
+    count,
+    create_map,
+    lit,
+    monotonically_increasing_id,
+    when,
+)
 from pytest import fail
 
 

From 2bdc24e56368d1a80188c31a38efcef9dc90862e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 24 May 2023 10:37:15 +0100
Subject: [PATCH 376/531] Update workflows

---
 .github/workflows/ci-checks.yaml              | 62 -------------------
 ...-release-artifact.yml => release-code.yml} | 10 ---
 2 files changed, 72 deletions(-)
 rename .github/workflows/{package-release-artifact.yml => release-code.yml} (69%)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 6e46f261..fb2b059a 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -3,32 +3,6 @@ name: CI Checks
 on: [push]
 
 jobs:
-  build:
-    runs-on: ubuntu-latest
-    strategy:
-      max-parallel: 4
-      matrix:
-        python-version: [3.7]
-        java-version: ['8']
-      fail-fast: false 
-    steps:
-      - uses: actions/checkout@v2
-      - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v1
-        with:
-          python-version: ${{ matrix.python-version }}
-      - uses: actions/setup-java@v2
-        with:
-          distribution: 'adopt'
-          java-version: ${{ matrix.java-version }}
-      - name: Run image
-        uses: abatilo/actions-poetry@v2.0.0
-        with:
-          poetry-version: 1.3.2
-      - name: Install dependencies
-        run: poetry install
-      - name: build
-        run: poetry build
   test:
     runs-on: ubuntu-latest
     strategy:
@@ -75,7 +49,6 @@ jobs:
       max-parallel: 4
       matrix:
         python-version: [3.7]
-        java-version: ['8']
       fail-fast: false 
     steps:
       - uses: actions/checkout@v2
@@ -83,10 +56,6 @@ jobs:
         uses: actions/setup-python@v1
         with:
           python-version: ${{ matrix.python-version }}
-      - uses: actions/setup-java@v2
-        with:
-          distribution: 'adopt'
-          java-version: ${{ matrix.java-version }}
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
@@ -95,39 +64,12 @@ jobs:
         run: poetry install
       - name: run flake8
         run: poetry run flake8 statistical_methods_library tests
-  isort:
-    runs-on: ubuntu-latest
-    strategy:
-      max-parallel: 4
-      matrix:
-        python-version: [3.7]
-        java-version: ['8']
-      fail-fast: false 
-    steps:
-      - uses: actions/checkout@v2
-      - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v1
-        with:
-          python-version: ${{ matrix.python-version }}
-      - uses: actions/setup-java@v2
-        with:
-          distribution: 'adopt'
-          java-version: ${{ matrix.java-version }}
-      - name: Run image
-        uses: abatilo/actions-poetry@v2.0.0
-        with:
-          poetry-version: 1.3.2
-      - name: Install dependencies
-        run: poetry install
-      - name: run isort
-        run: poetry run isort --check-only statistical_methods_library tests
   black:
     runs-on: ubuntu-latest
     strategy:
       max-parallel: 4
       matrix:
         python-version: [3.7]
-        java-version: ['8']
       fail-fast: false 
     steps:
       - uses: actions/checkout@v2
@@ -135,10 +77,6 @@ jobs:
         uses: actions/setup-python@v1
         with:
           python-version: ${{ matrix.python-version }}
-      - uses: actions/setup-java@v2
-        with:
-          distribution: 'adopt'
-          java-version: ${{ matrix.java-version }}
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
diff --git a/.github/workflows/package-release-artifact.yml b/.github/workflows/release-code.yml
similarity index 69%
rename from .github/workflows/package-release-artifact.yml
rename to .github/workflows/release-code.yml
index 42a732f1..1f4d900e 100644
--- a/.github/workflows/package-release-artifact.yml
+++ b/.github/workflows/release-code.yml
@@ -13,7 +13,6 @@ jobs:
       max-parallel: 4
       matrix:
         python-version: [3.7]
-        java-version: ['8']
       fail-fast: false 
     steps:
       - uses: actions/checkout@v2
@@ -21,26 +20,17 @@ jobs:
         uses: actions/setup-python@v1
         with:
           python-version: ${{ matrix.python-version }}
-      - uses: actions/setup-java@v2
-        with:
-          distribution: 'adopt'
-          java-version: ${{ matrix.java-version }}
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
           poetry-version: 1.3.2
-      - name: Install dependencies
-        run: poetry install --no-dev
       - name: build
         run: poetry build
-      - name: echo version
-        run: poetry version -s > statistical-methods-library.version
       - name: Create GitHub release
         uses: softprops/action-gh-release@v1
         with:
           files: |
             dist/*.whl
             dist/*.tar.gz
-            statistical-methods-library.version
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

From bbe5674e630024a39f6e4faf7bf81afb24522fe9 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 24 May 2023 10:39:10 +0100
Subject: [PATCH 377/531] Remove isort and bump dependencies

---
 poetry.lock    | 130 +++++++++++++++++++++----------------------------
 pyproject.toml |   1 -
 2 files changed, 56 insertions(+), 75 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 921102e1..f7918a5e 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -81,63 +81,63 @@ files = [
 
 [[package]]
 name = "coverage"
-version = "7.2.5"
+version = "7.2.6"
 description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "coverage-7.2.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:883123d0bbe1c136f76b56276074b0c79b5817dd4238097ffa64ac67257f4b6c"},
-    {file = "coverage-7.2.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d2fbc2a127e857d2f8898aaabcc34c37771bf78a4d5e17d3e1f5c30cd0cbc62a"},
-    {file = "coverage-7.2.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f3671662dc4b422b15776cdca89c041a6349b4864a43aa2350b6b0b03bbcc7f"},
-    {file = "coverage-7.2.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780551e47d62095e088f251f5db428473c26db7829884323e56d9c0c3118791a"},
-    {file = "coverage-7.2.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:066b44897c493e0dcbc9e6a6d9f8bbb6607ef82367cf6810d387c09f0cd4fe9a"},
-    {file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b9a4ee55174b04f6af539218f9f8083140f61a46eabcaa4234f3c2a452c4ed11"},
-    {file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:706ec567267c96717ab9363904d846ec009a48d5f832140b6ad08aad3791b1f5"},
-    {file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ae453f655640157d76209f42c62c64c4d4f2c7f97256d3567e3b439bd5c9b06c"},
-    {file = "coverage-7.2.5-cp310-cp310-win32.whl", hash = "sha256:f81c9b4bd8aa747d417407a7f6f0b1469a43b36a85748145e144ac4e8d303cb5"},
-    {file = "coverage-7.2.5-cp310-cp310-win_amd64.whl", hash = "sha256:dc945064a8783b86fcce9a0a705abd7db2117d95e340df8a4333f00be5efb64c"},
-    {file = "coverage-7.2.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:40cc0f91c6cde033da493227797be2826cbf8f388eaa36a0271a97a332bfd7ce"},
-    {file = "coverage-7.2.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a66e055254a26c82aead7ff420d9fa8dc2da10c82679ea850d8feebf11074d88"},
-    {file = "coverage-7.2.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c10fbc8a64aa0f3ed136b0b086b6b577bc64d67d5581acd7cc129af52654384e"},
-    {file = "coverage-7.2.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9a22cbb5ede6fade0482111fa7f01115ff04039795d7092ed0db43522431b4f2"},
-    {file = "coverage-7.2.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:292300f76440651529b8ceec283a9370532f4ecba9ad67d120617021bb5ef139"},
-    {file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7ff8f3fb38233035028dbc93715551d81eadc110199e14bbbfa01c5c4a43f8d8"},
-    {file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:a08c7401d0b24e8c2982f4e307124b671c6736d40d1c39e09d7a8687bddf83ed"},
-    {file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ef9659d1cda9ce9ac9585c045aaa1e59223b143f2407db0eaee0b61a4f266fb6"},
-    {file = "coverage-7.2.5-cp311-cp311-win32.whl", hash = "sha256:30dcaf05adfa69c2a7b9f7dfd9f60bc8e36b282d7ed25c308ef9e114de7fc23b"},
-    {file = "coverage-7.2.5-cp311-cp311-win_amd64.whl", hash = "sha256:97072cc90f1009386c8a5b7de9d4fc1a9f91ba5ef2146c55c1f005e7b5c5e068"},
-    {file = "coverage-7.2.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bebea5f5ed41f618797ce3ffb4606c64a5de92e9c3f26d26c2e0aae292f015c1"},
-    {file = "coverage-7.2.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:828189fcdda99aae0d6bf718ea766b2e715eabc1868670a0a07bf8404bf58c33"},
-    {file = "coverage-7.2.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e8a95f243d01ba572341c52f89f3acb98a3b6d1d5d830efba86033dd3687ade"},
-    {file = "coverage-7.2.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8834e5f17d89e05697c3c043d3e58a8b19682bf365048837383abfe39adaed5"},
-    {file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d1f25ee9de21a39b3a8516f2c5feb8de248f17da7eead089c2e04aa097936b47"},
-    {file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1637253b11a18f453e34013c665d8bf15904c9e3c44fbda34c643fbdc9d452cd"},
-    {file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8e575a59315a91ccd00c7757127f6b2488c2f914096077c745c2f1ba5b8c0969"},
-    {file = "coverage-7.2.5-cp37-cp37m-win32.whl", hash = "sha256:509ecd8334c380000d259dc66feb191dd0a93b21f2453faa75f7f9cdcefc0718"},
-    {file = "coverage-7.2.5-cp37-cp37m-win_amd64.whl", hash = "sha256:12580845917b1e59f8a1c2ffa6af6d0908cb39220f3019e36c110c943dc875b0"},
-    {file = "coverage-7.2.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b5016e331b75310610c2cf955d9f58a9749943ed5f7b8cfc0bb89c6134ab0a84"},
-    {file = "coverage-7.2.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:373ea34dca98f2fdb3e5cb33d83b6d801007a8074f992b80311fc589d3e6b790"},
-    {file = "coverage-7.2.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a063aad9f7b4c9f9da7b2550eae0a582ffc7623dca1c925e50c3fbde7a579771"},
-    {file = "coverage-7.2.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38c0a497a000d50491055805313ed83ddba069353d102ece8aef5d11b5faf045"},
-    {file = "coverage-7.2.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2b3b05e22a77bb0ae1a3125126a4e08535961c946b62f30985535ed40e26614"},
-    {file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0342a28617e63ad15d96dca0f7ae9479a37b7d8a295f749c14f3436ea59fdcb3"},
-    {file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:cf97ed82ca986e5c637ea286ba2793c85325b30f869bf64d3009ccc1a31ae3fd"},
-    {file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c2c41c1b1866b670573657d584de413df701f482574bad7e28214a2362cb1fd1"},
-    {file = "coverage-7.2.5-cp38-cp38-win32.whl", hash = "sha256:10b15394c13544fce02382360cab54e51a9e0fd1bd61ae9ce012c0d1e103c813"},
-    {file = "coverage-7.2.5-cp38-cp38-win_amd64.whl", hash = "sha256:a0b273fe6dc655b110e8dc89b8ec7f1a778d78c9fd9b4bda7c384c8906072212"},
-    {file = "coverage-7.2.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c587f52c81211d4530fa6857884d37f514bcf9453bdeee0ff93eaaf906a5c1b"},
-    {file = "coverage-7.2.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4436cc9ba5414c2c998eaedee5343f49c02ca93b21769c5fdfa4f9d799e84200"},
-    {file = "coverage-7.2.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6599bf92f33ab041e36e06d25890afbdf12078aacfe1f1d08c713906e49a3fe5"},
-    {file = "coverage-7.2.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:857abe2fa6a4973f8663e039ead8d22215d31db613ace76e4a98f52ec919068e"},
-    {file = "coverage-7.2.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6f5cab2d7f0c12f8187a376cc6582c477d2df91d63f75341307fcdcb5d60303"},
-    {file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:aa387bd7489f3e1787ff82068b295bcaafbf6f79c3dad3cbc82ef88ce3f48ad3"},
-    {file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:156192e5fd3dbbcb11cd777cc469cf010a294f4c736a2b2c891c77618cb1379a"},
-    {file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bd3b4b8175c1db502adf209d06136c000df4d245105c8839e9d0be71c94aefe1"},
-    {file = "coverage-7.2.5-cp39-cp39-win32.whl", hash = "sha256:ddc5a54edb653e9e215f75de377354e2455376f416c4378e1d43b08ec50acc31"},
-    {file = "coverage-7.2.5-cp39-cp39-win_amd64.whl", hash = "sha256:338aa9d9883aaaad53695cb14ccdeb36d4060485bb9388446330bef9c361c252"},
-    {file = "coverage-7.2.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:8877d9b437b35a85c18e3c6499b23674684bf690f5d96c1006a1ef61f9fdf0f3"},
-    {file = "coverage-7.2.5.tar.gz", hash = "sha256:f99ef080288f09ffc687423b8d60978cf3a465d3f404a18d1a05474bd8575a47"},
+    {file = "coverage-7.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:496b86f1fc9c81a1cd53d8842ef712e950a4611bba0c42d33366a7b91ba969ec"},
+    {file = "coverage-7.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fbe6e8c0a9a7193ba10ee52977d4d5e7652957c1f56ccefed0701db8801a2a3b"},
+    {file = "coverage-7.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d06b721c2550c01a60e5d3093f417168658fb454e5dfd9a23570e9bffe39a1"},
+    {file = "coverage-7.2.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:77a04b84d01f0e12c66f16e69e92616442dc675bbe51b90bfb074b1e5d1c7fbd"},
+    {file = "coverage-7.2.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35db06450272473eab4449e9c2ad9bc6a0a68dab8e81a0eae6b50d9c2838767e"},
+    {file = "coverage-7.2.6-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6727a0d929ff0028b1ed8b3e7f8701670b1d7032f219110b55476bb60c390bfb"},
+    {file = "coverage-7.2.6-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aac1d5fdc5378f6bac2c0c7ebe7635a6809f5b4376f6cf5d43243c1917a67087"},
+    {file = "coverage-7.2.6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1c9e4a5eb1bbc3675ee57bc31f8eea4cd7fb0cbcbe4912cf1cb2bf3b754f4a80"},
+    {file = "coverage-7.2.6-cp310-cp310-win32.whl", hash = "sha256:71f739f97f5f80627f1fee2331e63261355fd1e9a9cce0016394b6707ac3f4ec"},
+    {file = "coverage-7.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:fde5c7a9d9864d3e07992f66767a9817f24324f354caa3d8129735a3dc74f126"},
+    {file = "coverage-7.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bc7b667f8654376e9353dd93e55e12ce2a59fb6d8e29fce40de682273425e044"},
+    {file = "coverage-7.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:697f4742aa3f26c107ddcb2b1784a74fe40180014edbd9adaa574eac0529914c"},
+    {file = "coverage-7.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:541280dde49ce74a4262c5e395b48ea1207e78454788887118c421cb4ffbfcac"},
+    {file = "coverage-7.2.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e7f1a8328eeec34c54f1d5968a708b50fc38d31e62ca8b0560e84a968fbf9a9"},
+    {file = "coverage-7.2.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4bbd58eb5a2371bf160590f4262109f66b6043b0b991930693134cb617bc0169"},
+    {file = "coverage-7.2.6-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ae82c5f168d2a39a5d69a12a69d4dc23837a43cf2ca99be60dfe59996ea6b113"},
+    {file = "coverage-7.2.6-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:f5440cdaf3099e7ab17a5a7065aed59aff8c8b079597b61c1f8be6f32fe60636"},
+    {file = "coverage-7.2.6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a6f03f87fea579d55e0b690d28f5042ec1368650466520fbc400e7aeaf09e995"},
+    {file = "coverage-7.2.6-cp311-cp311-win32.whl", hash = "sha256:dc4d5187ef4d53e0d4c8eaf530233685667844c5fb0b855fea71ae659017854b"},
+    {file = "coverage-7.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:c93d52c3dc7b9c65e39473704988602300e3cc1bad08b5ab5b03ca98bbbc68c1"},
+    {file = "coverage-7.2.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:42c692b55a647a832025a4c048007034fe77b162b566ad537ce65ad824b12a84"},
+    {file = "coverage-7.2.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7786b2fa7809bf835f830779ad285215a04da76293164bb6745796873f0942d"},
+    {file = "coverage-7.2.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25bad4196104761bc26b1dae9b57383826542ec689ff0042f7f4f4dd7a815cba"},
+    {file = "coverage-7.2.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2692306d3d4cb32d2cceed1e47cebd6b1d2565c993d6d2eda8e6e6adf53301e6"},
+    {file = "coverage-7.2.6-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:392154d09bd4473b9d11351ab5d63391f3d5d24d752f27b3be7498b0ee2b5226"},
+    {file = "coverage-7.2.6-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:fa079995432037b5e2ef5ddbb270bcd2ded9f52b8e191a5de11fe59a00ea30d8"},
+    {file = "coverage-7.2.6-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d712cefff15c712329113b01088ba71bbcef0f7ea58478ca0bbec63a824844cb"},
+    {file = "coverage-7.2.6-cp37-cp37m-win32.whl", hash = "sha256:004948e296149644d208964300cb3d98affc5211e9e490e9979af4030b0d6473"},
+    {file = "coverage-7.2.6-cp37-cp37m-win_amd64.whl", hash = "sha256:c1d7a31603c3483ac49c1726723b0934f88f2c011c660e6471e7bd735c2fa110"},
+    {file = "coverage-7.2.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3436927d1794fa6763b89b60c896f9e3bd53212001026ebc9080d23f0c2733c1"},
+    {file = "coverage-7.2.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44c9b9f1a245f3d0d202b1a8fa666a80b5ecbe4ad5d0859c0fb16a52d9763224"},
+    {file = "coverage-7.2.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e3783a286d5a93a2921396d50ce45a909aa8f13eee964465012f110f0cbb611"},
+    {file = "coverage-7.2.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3cff6980fe7100242170092bb40d2b1cdad79502cd532fd26b12a2b8a5f9aee0"},
+    {file = "coverage-7.2.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c534431153caffc7c495c3eddf7e6a6033e7f81d78385b4e41611b51e8870446"},
+    {file = "coverage-7.2.6-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:3062fd5c62df988cea9f2972c593f77fed1182bfddc5a3b12b1e606cb7aba99e"},
+    {file = "coverage-7.2.6-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6284a2005e4f8061c58c814b1600ad0074ccb0289fe61ea709655c5969877b70"},
+    {file = "coverage-7.2.6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:97729e6828643f168a2a3f07848e1b1b94a366b13a9f5aba5484c2215724edc8"},
+    {file = "coverage-7.2.6-cp38-cp38-win32.whl", hash = "sha256:dc11b42fa61ff1e788dd095726a0aed6aad9c03d5c5984b54cb9e1e67b276aa5"},
+    {file = "coverage-7.2.6-cp38-cp38-win_amd64.whl", hash = "sha256:cbcc874f454ee51f158afd604a315f30c0e31dff1d5d5bf499fc529229d964dd"},
+    {file = "coverage-7.2.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d3cacc6a665221108ecdf90517a8028d07a2783df3417d12dcfef1c517e67478"},
+    {file = "coverage-7.2.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:272ab31228a9df857ab5df5d67936d8861464dc89c5d3fab35132626e9369379"},
+    {file = "coverage-7.2.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9a8723ccec4e564d4b9a79923246f7b9a8de4ec55fa03ec4ec804459dade3c4f"},
+    {file = "coverage-7.2.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5906f6a84b47f995cd1bf0aca1c72d591c55ee955f98074e93660d64dfc66eb9"},
+    {file = "coverage-7.2.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:52c139b7ab3f0b15f9aad0a3fedef5a1f8c0b2bdc291d88639ca2c97d3682416"},
+    {file = "coverage-7.2.6-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a5ffd45c6b93c23a8507e2f436983015c6457aa832496b6a095505ca2f63e8f1"},
+    {file = "coverage-7.2.6-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:4f3c7c19581d471af0e9cb49d928172cd8492cd78a2b7a4e82345d33662929bb"},
+    {file = "coverage-7.2.6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e8c0e79820cdd67978e1120983786422d279e07a381dbf89d03bbb23ec670a6"},
+    {file = "coverage-7.2.6-cp39-cp39-win32.whl", hash = "sha256:13cde6bb0e58fb67d09e2f373de3899d1d1e866c5a9ff05d93615f2f54fbd2bb"},
+    {file = "coverage-7.2.6-cp39-cp39-win_amd64.whl", hash = "sha256:6b9f64526286255735847aed0221b189486e0b9ed943446936e41b7e44b08783"},
+    {file = "coverage-7.2.6-pp37.pp38.pp39-none-any.whl", hash = "sha256:6babcbf1e66e46052442f10833cfc4a0d3554d8276aa37af8531a83ed3c1a01d"},
+    {file = "coverage-7.2.6.tar.gz", hash = "sha256:2025f913f2edb0272ef15d00b1f335ff8908c921c8eb2013536fcaf61f5a683d"},
 ]
 
 [package.dependencies]
@@ -211,24 +211,6 @@ files = [
     {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},
 ]
 
-[[package]]
-name = "isort"
-version = "5.11.5"
-description = "A Python utility / library to sort Python imports."
-category = "dev"
-optional = false
-python-versions = ">=3.7.0"
-files = [
-    {file = "isort-5.11.5-py3-none-any.whl", hash = "sha256:ba1d72fb2595a01c7895a5128f9585a5cc4b6d395f1c8d514989b9a7eb2a8746"},
-    {file = "isort-5.11.5.tar.gz", hash = "sha256:6be1f76a507cb2ecf16c7cf14a37e41609ca082330be4e3436a18ef74add55db"},
-]
-
-[package.extras]
-colors = ["colorama (>=0.4.3,<0.5.0)"]
-pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"]
-plugins = ["setuptools"]
-requirements-deprecated-finder = ["pip-api", "pipreqs"]
-
 [[package]]
 name = "mccabe"
 version = "0.7.0"
@@ -518,14 +500,14 @@ files = [
 
 [[package]]
 name = "typing-extensions"
-version = "4.5.0"
+version = "4.6.1"
 description = "Backported and Experimental Type Hints for Python 3.7+"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"},
-    {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"},
+    {file = "typing_extensions-4.6.1-py3-none-any.whl", hash = "sha256:6bac751f4789b135c43228e72de18637e9a6c29d12777023a703fd1a6858469f"},
+    {file = "typing_extensions-4.6.1.tar.gz", hash = "sha256:558bc0c4145f01e6405f4a5fdbd82050bd221b119f4bf72a961a1cfd471349d6"},
 ]
 
 [[package]]
@@ -547,4 +529,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.7"
-content-hash = "8cfaf90bbd58884fc343110ef2f1894b324339690380010bb6db7aaf223843c6"
+content-hash = "838cb980bb1f54d0320dcb1f9069fa93cdff090af70a9a2e80c302099839e832"
diff --git a/pyproject.toml b/pyproject.toml
index 8941f336..1e8105c3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -13,7 +13,6 @@ pyspark = "3.1.1"
 toml = "^0.10.2"
 pytest = "^7.2.1"
 black = "^23.1"
-isort = "^5.11.4"
 flake8 = "^5.0.4"
 coverage = "^7.0"
 pytest-cov = "^4.0.0"

From 069abeb3e6981545c594d96d3af95d727b1510fb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 24 May 2023 10:42:13 +0100
Subject: [PATCH 378/531] Bump rc version

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 1e8105c3..12b1797b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc11"
+version = "12.0.0-rc12"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 8bfa1686afb2b7125c53b8d21c04758d32a5914a Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 24 May 2023 12:17:40 +0100
Subject: [PATCH 379/531] Improve ht ratio estimation documentation

---
 statistical_methods_library/estimation/ht_ratio.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index f868e1f1..9667ad95 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -60,16 +60,18 @@ def estimate(
           otherwise Separate Ratio Estimation takes place.
         unadjusted_design_weight_col: The name of the column which will contain
           the unadjusted design weight. The column isn't output unless this
-          column is specified.
+          column is specified and design weight adjustment is performed.
         design_weight_col: The name of the column which will contain the
           design weight. If birth-death adjustment is being performed this
           will contain the adjusted value.
         calibration_factor_col: The name of the column which will contain the
-          calibration factor.
+          calibration factor if Ratio Estimation is performed.
 
     Returns:
     A data frame containing the estimated weights. The exact columns depend on
-    the type of estimation performed as specified by the provided arguments.
+    the type of estimation performed as specified by the provided arguments. The
+    data frame contains a row for each period, stratum and (if Combined Ratio
+    Estimation is performed) calibration group combination in the input data.
 
     Either both or neither of `adjustment_marker_col` and `h_value_col` must be specified.
     If they are then the design weight is adjusted using birth-death

From 9f90c74023b34ef06548f4d006b83d3e43214df8 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 24 May 2023 12:59:25 +0100
Subject: [PATCH 380/531] Added a quick two comments to tests for clarity.

---
 tests/imputation/test_scenarios.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 3b481fc8..f757d82a 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -13,6 +13,10 @@
 scenario_path_prefix = pathlib.Path("tests", "fixture_data", "imputation")
 ratio_calculators = ("mean_of_ratios", "ratio_of_means")
 test_scenarios = []
+
+# Collate list of test scenarios from ratio_calculators folders.
+# Also for back data testing, duplicate all tests. Will be using
+# first input period as a back data period.
 for ratio_calculator in ratio_calculators:
     scenario_type = "methodology_scenarios"
     test_files = glob.glob(
@@ -43,6 +47,8 @@
     test_scenarios,
 )
 def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenario):
+    # Default parameters and data types stored in default.toml, optional parameters
+    # and overwrites stored in matching ratio calculator toml file.
     with open(toml_path_prefix / "default.toml", "r") as f:
         default_config = toml.load(f)
 

From c4ec31ab7b5ae056176ae20839203d8df3e39995 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 24 May 2023 13:35:32 +0100
Subject: [PATCH 381/531] Make construction ratio calculator overridable for
 api consistency

---
 .../imputation/engine.py                       | 18 +++++++++++-------
 .../imputation/ratio_calculators.py            |  4 +++-
 tests/imputation/test_engine.py                |  2 +-
 tests/imputation/test_scenarios.py             |  4 +++-
 4 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index b9fa8827..3b199e26 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -1,5 +1,8 @@
 """
-Perform imputation on a data frame.
+Perform link-based imputation on a data frame.
+
+This module provides the engine and other core aspects of imputation with
+ratio calculation being handled by provided callbacks.
 
 For Copyright information, please see LICENCE.
 """
@@ -18,9 +21,7 @@
 )
 from statistical_methods_library.utilities.validation import validate_dataframe
 
-from .ratio_calculators import RatioCalculator, construction
-
-# --- Marker constants ---
+from .ratio_calculators import RatioCalculator, ratio_of_means_construction
 
 
 class Marker(Enum):
@@ -51,7 +52,10 @@ def impute(
     grouping_col: str,
     target_col: str,
     auxiliary_col: str,
-    ratio_calculator: RatioCalculator,
+    forward_backward_ratio_calculator: RatioCalculator,
+    construction_ratio_calculator: Optional[
+        RatioCalculator
+    ] = ratio_of_means_construction,
     output_col: Optional[str] = "imputed",
     marker_col: Optional[str] = "imputation_marker",
     forward_link_col: Optional[str] = "forward",
@@ -238,7 +242,7 @@ def calculate_ratios():
             )
 
         else:
-            ratio_calculators.append(ratio_calculator)
+            ratio_calculators.append(forward_backward_ratio_calculator)
 
         if "construction" in prepared_df.columns:
             prepared_df = (
@@ -250,7 +254,7 @@ def calculate_ratios():
             )
 
         else:
-            ratio_calculators.append(construction)
+            ratio_calculators.append(construction_ratio_calculator)
 
         if not ratio_calculators:
             return
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index ffc6df02..f02fc305 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -347,7 +347,9 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
     ]
 
 
-def construction(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
+def ratio_of_means_construction(
+    *, df: DataFrame, **_kw
+) -> List[RatioCalculationResult]:
     return [
         RatioCalculationResult(
             data=(
diff --git a/tests/imputation/test_engine.py b/tests/imputation/test_engine.py
index 77a4881c..fa0c20b8 100644
--- a/tests/imputation/test_engine.py
+++ b/tests/imputation/test_engine.py
@@ -81,7 +81,7 @@
     "auxiliary_col": auxiliary_col,
     "output_col": output_col,
     "marker_col": marker_col,
-    "ratio_calculator": ratio_of_means,
+    "forward_backward_ratio_calculator": ratio_of_means,
 }
 
 test_scenarios = []
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index f757d82a..62fccbca 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -61,7 +61,9 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     fields.update(test_config.get("field_names", {}))
     fields.update(scenario_config.pop("field_names", {}))
     imputation_kwargs = fields.copy()
-    imputation_kwargs["ratio_calculator"] = getattr(imputation, ratio_calculator)
+    imputation_kwargs["forward_backward_ratio_calculator"] = getattr(
+        imputation, ratio_calculator
+    )
     if "back_data_" in scenario_type:
         starting_period_key = "back_data_starting_period"
     else:

From 836323325ea365c7b584ef7884616a2b667fabcd Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 24 May 2023 14:37:53 +0100
Subject: [PATCH 382/531] Tell mypy we're typed

---
 statistical_methods_library/py.typed | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 statistical_methods_library/py.typed

diff --git a/statistical_methods_library/py.typed b/statistical_methods_library/py.typed
new file mode 100644
index 00000000..e69de29b

From 4d863aaa8e580d249a67267e4b954172f8538142 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 24 May 2023 14:41:31 +0100
Subject: [PATCH 383/531] Bump rc version to add typing

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 12b1797b..56f490b6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc12"
+version = "12.0.0-rc13"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From c6cddff35929fa8586e5a63c15455b5f0ec18301 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 24 May 2023 15:04:30 +0100
Subject: [PATCH 384/531] First attempt at release notes.

---
 docs/release-notes/12.0.0.md | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 docs/release-notes/12.0.0.md

diff --git a/docs/release-notes/12.0.0.md b/docs/release-notes/12.0.0.md
new file mode 100644
index 00000000..9e6907f3
--- /dev/null
+++ b/docs/release-notes/12.0.0.md
@@ -0,0 +1,26 @@
+# Statistical Methods Library 11.0.2
+
+Release date: 2023-??-??
+
+## Synopsis
+
+IMPUTATION:
+Added Mean of Ratios ratio calculator.
+Added Weighting functionality.
+Changed API call.
+New marker columns for filtered rows.
+Count columns no longer produce null values, default link marker column instead.
+Validation adjustment to allow multi variable calculations.
+
+## Changes
+
+Changed API to now require users to call the generic engine and pass in which ratio calculator to use. Mean of Ratios is a new ratio calculator alongside Ratio of Means.
+
+Alongside new output columns for mean of ratios, filtering now produces marker columns to better distinguish where data is not used in link calculations. To remove confusion, count columns no longer leave the count as null when links are defaulted due to no responses and zero when defaulted due to divide by zero error. Instead they now always have a number and use a default marker to distingush between, a default due to missing data or not defaulted and set to 1 when mathmatical error occurs.
+
+Weighting functionality is now available for both ratio of means and mean of ratios.
+Validation required data to be unique of identifier and period. Now the grouping is also part of the unique requirements.
+
+## Notes
+
+Testing has been adjusted. Unit test are separate and run against the engine. Ratio calculators are all run as scenarios, using generic code to allow new tests to be easily added.
\ No newline at end of file

From 57dfa616384aeb91e016916c2557130be36a3e30 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 25 May 2023 11:23:53 +0100
Subject: [PATCH 385/531] Removed something shouldn't be in output. Added
 initial docstring.

---
 .../imputation/engine.py                      | 49 ++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 3b199e26..917c717d 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -80,6 +80,54 @@ def impute(
     unweighted_construction_link_col: Optional[str] = "construction_unweighted",
     **ratio_calculator_params,
 ) -> DataFrame:
+    """
+    Perform imputation.
+
+    Missing target variables are imputed using imputation links.
+
+    Args:
+        input_df: The input data frame.
+        reference_col: The name of the column containing the unique identifier for a contributor.
+        period_col: The name of the column containing the period.
+        grouping_col: The name of the column containing the information data is grouped by.
+        target_col: The name of the column containing the target variable to be imputed.
+        auxiliary_col: The name of the column containing the auxiliary value.
+        forward_backward_ratio_calculator: The name of the ratio calculator to used for forwards and backwards imputation. See Ratio Calculators for more details.
+        construction_ratio_calculator: The name of the column containing the ratio calculator to used for construction imputation. See Ratio Calculators for more details.
+        output_col: The name of the column containing the variable post imputation processing.
+        marker_col: The name of the column containing the imputation marker.
+        forward_link_col: The name of the column containing the forward imputation link. If a column containing this is in the input data, the input links will be used instead of calculating them. Must pass both forward and backward.
+        backward_link_col: The name of the column containing the backward imputation link. If a column containing this is in the input data, the input links will be used instead of calculating them. Must pass both forward and backward.
+        construction_link_col: The name of the column containing the construction imputation link. If a column containing this is in the input data, the input links will be used instead of calculating them.
+        count_construction_col: The name of the column containing the count of matched pairs used in the calculation of links.
+        count_forward_col: The name of the column containing the count of matched pairs used in the calculation of links.
+        count_backward_col: The name of the column containing the count of matched pairs used in the calculation of links.
+        default_construction_col: The name of the column containing a marker specifiying a link was defaulted to one and not calculated/passed in.
+        default_forward_col: The name of the column containing a marker specifiying a link was defaulted to one and not calculated/passed in.
+        default_backward_col: The name of the column containing a marker specifiying a link was defaulted to one and not calculated/passed in.
+        link_inclusion_current_col: The name of the column containing a marker specifiying if the contributors current response is still included in calculations if filtering occured.
+        link_inclusion_previous_col: The name of the column containing a marker specifiying if the contributors previous response is still included in calculations if filtering occured.
+        link_inclusion_next_col: The name of the column containing a marker specifiying if the contributors next response is still included in calculations if filtering occured.
+        back_data_df: The back data data frame. Contains previously calculated data to be imputed from and/or data for link weighting.
+        link_filter: An inclusive filter statement that specifiys conditions under which a responce can be used for imputation. If this is provided the link_inclusion columns will be in the output, otherwise they will not be.
+        periodicity: Number of months between response periods.
+        weight: Figure indicating how strongly to weight the links against previous links. This is used on the current link, previous link will be weighted as 1 - weight. If both weight and weight_periodicity_multiplier are provided the unweighted columns will be in the output, otherwise they will not be.
+        weight_periodicity_multiplier: Number of sets of the periodicity back that the previous link is taken from. If both weight and weight_periodicity_multiplier are provided the unweighted columns will be in the output, otherwise they will not be.
+        unweighted_forward_link_col: The name of the column containing the links prior to weighting if weighting occured.
+        unweighted_backward_link_col: The name of the column containing the links prior to weighting if weighting occured.
+        unweighted_construction_link_col: The name of the column containing the links prior to weighting if weighting occured.
+
+    Returns:
+    A data frame containing the imputed variables and links. The exact columns depend on
+    the type of imputation performed as specified by the provided arguments. The
+    data frame contains a row for each reference, period, grouping.
+
+    Either both or neither of `weight` and `weight_periodicity_multiplier` must be specified.
+    If they are then the links are adjusted using weighting, otherwise it is not.
+    Either both or neither of `forward_link_col` and `backward_link_col` must be in the input.
+    If they are then the links are not calculated, otherwise they are.
+    If `link_filter` is provided, the data will filter data to remove data not wanted in calculating links.
+    """
     # --- Validate params ---
     if not isinstance(input_df, DataFrame):
         raise TypeError("Input is not a DataFrame")
@@ -112,7 +160,6 @@ def impute(
         "ref": reference_col,
         "period": period_col,
         "grouping": grouping_col,
-        "target": target_col,
     }
 
     if forward_link_col in input_df.columns or backward_link_col in input_df.columns:

From 89294059044d2b8842abf882bc9c6d3b2bac91e0 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 25 May 2023 11:40:12 +0100
Subject: [PATCH 386/531] Added ratio calculators docstring.

---
 .../imputation/engine.py                      |  2 +
 .../imputation/ratio_calculators.py           | 42 +++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 917c717d..6e1e9ec8 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -127,6 +127,8 @@ def impute(
     Either both or neither of `forward_link_col` and `backward_link_col` must be in the input.
     If they are then the links are not calculated, otherwise they are.
     If `link_filter` is provided, the data will filter data to remove data not wanted in calculating links.
+
+    Note: Additional parameters will need to be passed to this method depending on the ratio calculators used.
     """
     # --- Validate params ---
     if not isinstance(input_df, DataFrame):
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index f02fc305..f8d7b458 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -35,6 +35,28 @@ def mean_of_ratios(
     trim_inclusion_backward_col: Optional[str] = "trim_inclusion_backward",
     **_kwargs,
 ) -> List[RatioCalculationResult]:
+    """
+    Perform Mean of Ratios ratio calculator.
+
+    Args:
+        df: The input data frame.
+        trim_threshold: Number specifying how many matched pairs needed to allow trimming to occur. For trimming to occur, trim_threshold, lower_trim and upper_trim need to be present. When trimming occurs, trim_inclusion_forward_col and trim_inclusion_backward_col will be output.
+        lower_trim: Number specifying percentage to trim off the bottom. For trimming to occur, trim_threshold, lower_trim and upper_trim need to be present. When trimming occurs, trim_inclusion_forward_col and trim_inclusion_backward_col will be output.
+        upper_trim: Number specifying percentage to trim off the top. For trimming to occur, trim_threshold, lower_trim and upper_trim need to be present. When trimming occurs, trim_inclusion_forward_col and trim_inclusion_backward_col will be output.
+        include_zeros: Allows/Prohibits a return of zero being allowed in the calculations.
+        growth_forward_col: The name of the column containing the forward growth ratio.
+        growth_backward_col: The name of the column containing the backward growth ratio.
+        trim_inclusion_forward_col: The name of the column containing an marker specifiying if a growth ratio is included in calculations post trimming.
+        trim_inclusion_backward_col: The name of the column containing an marker specifiying if a growth ratio is included in calculations post trimming.
+
+    Returns:
+    Two datas frame:
+    Ratio DF containing forward and backward links. Count of matched pairs and if the link was defaulted.
+    The data frame contains a row for each period, grouping.
+
+    Growth DF containing forward and backward growth ratios. The exact columns depend on if trimming is performed as specified by the provided arguments.
+    The data frame contains a row for each reference, period, grouping.
+    """
     if lower_trim is not None:
         lower_trim = Decimal(lower_trim)
         upper_trim = Decimal(upper_trim)
@@ -301,6 +323,16 @@ def upper_bound(c):
 
 
 def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
+    """
+    Perform Ratio of Means ratio calculator.
+
+    Args:
+        df: The input data frame.
+
+    Returns:
+    A data frame containing forward and backward links. Count of matched pairs and if the link was defaulted.
+    The data frame contains a row for each period, grouping.
+    """
     df = (
         df.filter(col("link_inclusion_current"))
         .groupBy("period", "grouping")
@@ -350,6 +382,16 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
 def ratio_of_means_construction(
     *, df: DataFrame, **_kw
 ) -> List[RatioCalculationResult]:
+    """
+    Perform construction ratio calculator.
+
+    Args:
+        df: The input data frame.
+
+    Returns:
+    A data frame containing construction links. Count of matched pairs and if the link was defaulted.
+    The data frame contains a row for each period, grouping.
+    """
     return [
         RatioCalculationResult(
             data=(

From 64695dcb9c94152a86723368415fd10aafcb40e6 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Thu, 25 May 2023 11:44:04 +0100
Subject: [PATCH 387/531] Added dependabot changes to this branch.

---
 poetry.lock    | 12 ++++++------
 pyproject.toml |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index f7918a5e..7cd8077d 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand.
 
 [[package]]
 name = "black"
@@ -378,14 +378,14 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no
 
 [[package]]
 name = "pytest-cov"
-version = "4.0.0"
+version = "4.1.0"
 description = "Pytest plugin for measuring coverage."
 category = "dev"
 optional = false
-python-versions = ">=3.6"
+python-versions = ">=3.7"
 files = [
-    {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"},
-    {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"},
+    {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"},
+    {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"},
 ]
 
 [package.dependencies]
@@ -529,4 +529,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.7"
-content-hash = "838cb980bb1f54d0320dcb1f9069fa93cdff090af70a9a2e80c302099839e832"
+content-hash = "35d41c7be7bbb79dff8dadeca6f27dc83f2486e8c500f79f9c722cfd8eb9f404"
diff --git a/pyproject.toml b/pyproject.toml
index 56f490b6..4e932fba 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -11,11 +11,11 @@ pyspark = "3.1.1"
 
 [tool.poetry.group.dev.dependencies]
 toml = "^0.10.2"
-pytest = "^7.2.1"
+pytest = "^7.3.1"
 black = "^23.1"
 flake8 = "^5.0.4"
-coverage = "^7.0"
-pytest-cov = "^4.0.0"
+coverage = "^7.2"
+pytest-cov = "^4.1.0"
 pytest-dependency = "^0.5.1"
 pytest-tap = "^3.3"
 

From b456b17c1355d41ee87e7d7e3b70b2d392efc988 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 25 May 2023 14:57:23 +0100
Subject: [PATCH 388/531] Remove isort option from pyproject toml

---
 pyproject.toml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index 4e932fba..0f443253 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -19,9 +19,6 @@ pytest-cov = "^4.1.0"
 pytest-dependency = "^0.5.1"
 pytest-tap = "^3.3"
 
-[tool.isort]
-profile = "black"
-
 [tool.pytest.ini_options]
 junit_suite_name = "statistical_methods_library"
 addopts = [

From 8dcec758b4c0903fc829da1443b9f490f06cfcba Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 25 May 2023 16:14:24 +0100
Subject: [PATCH 389/531] Edit imputation engine documentation

---
 .../imputation/engine.py                      | 131 ++++++++++++------
 1 file changed, 89 insertions(+), 42 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 6e1e9ec8..9f8bd168 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -2,7 +2,7 @@
 Perform link-based imputation on a data frame.
 
 This module provides the engine and other core aspects of imputation with
-ratio calculation being handled by provided callbacks.
+ratio calculation being handled by provided callables.
 
 For Copyright information, please see LICENCE.
 """
@@ -81,54 +81,101 @@ def impute(
     **ratio_calculator_params,
 ) -> DataFrame:
     """
-    Perform imputation.
-
-    Missing target variables are imputed using imputation links.
+    Impute a target variable using imputation links (a.k.a. ratios).
 
     Args:
         input_df: The input data frame.
-        reference_col: The name of the column containing the unique identifier for a contributor.
+        reference_col: The name of the column containing the identifier for a
+          contributor. Must be unique within a period and grouping.
         period_col: The name of the column containing the period.
-        grouping_col: The name of the column containing the information data is grouped by.
-        target_col: The name of the column containing the target variable to be imputed.
-        auxiliary_col: The name of the column containing the auxiliary value.
-        forward_backward_ratio_calculator: The name of the ratio calculator to used for forwards and backwards imputation. See Ratio Calculators for more details.
-        construction_ratio_calculator: The name of the column containing the ratio calculator to used for construction imputation. See Ratio Calculators for more details.
-        output_col: The name of the column containing the variable post imputation processing.
+        grouping_col: The name of the column containing the imputation
+          grouping for a given record..
+        target_col: The name of the column containing the target variable.
+        auxiliary_col: The name of the column containing the auxiliary variable.
+        forward_backward_ratio_calculator: Used to calculate the ratios for
+            forward and backward imputation. See the
+          `imputation.ratio_calculators` module for more details.
+        construction_ratio_calculator: Used to calculate the ratio for
+          construction imputation. See the `imputation.ratio_calculators`
+          module for more details.
+        output_col: The name of the column containing the imputed variable.
         marker_col: The name of the column containing the imputation marker.
-        forward_link_col: The name of the column containing the forward imputation link. If a column containing this is in the input data, the input links will be used instead of calculating them. Must pass both forward and backward.
-        backward_link_col: The name of the column containing the backward imputation link. If a column containing this is in the input data, the input links will be used instead of calculating them. Must pass both forward and backward.
-        construction_link_col: The name of the column containing the construction imputation link. If a column containing this is in the input data, the input links will be used instead of calculating them.
-        count_construction_col: The name of the column containing the count of matched pairs used in the calculation of links.
-        count_forward_col: The name of the column containing the count of matched pairs used in the calculation of links.
-        count_backward_col: The name of the column containing the count of matched pairs used in the calculation of links.
-        default_construction_col: The name of the column containing a marker specifiying a link was defaulted to one and not calculated/passed in.
-        default_forward_col: The name of the column containing a marker specifiying a link was defaulted to one and not calculated/passed in.
-        default_backward_col: The name of the column containing a marker specifiying a link was defaulted to one and not calculated/passed in.
-        link_inclusion_current_col: The name of the column containing a marker specifiying if the contributors current response is still included in calculations if filtering occured.
-        link_inclusion_previous_col: The name of the column containing a marker specifiying if the contributors previous response is still included in calculations if filtering occured.
-        link_inclusion_next_col: The name of the column containing a marker specifiying if the contributors next response is still included in calculations if filtering occured.
-        back_data_df: The back data data frame. Contains previously calculated data to be imputed from and/or data for link weighting.
-        link_filter: An inclusive filter statement that specifiys conditions under which a responce can be used for imputation. If this is provided the link_inclusion columns will be in the output, otherwise they will not be.
-        periodicity: Number of months between response periods.
-        weight: Figure indicating how strongly to weight the links against previous links. This is used on the current link, previous link will be weighted as 1 - weight. If both weight and weight_periodicity_multiplier are provided the unweighted columns will be in the output, otherwise they will not be.
-        weight_periodicity_multiplier: Number of sets of the periodicity back that the previous link is taken from. If both weight and weight_periodicity_multiplier are provided the unweighted columns will be in the output, otherwise they will not be.
-        unweighted_forward_link_col: The name of the column containing the links prior to weighting if weighting occured.
-        unweighted_backward_link_col: The name of the column containing the links prior to weighting if weighting occured.
-        unweighted_construction_link_col: The name of the column containing the links prior to weighting if weighting occured.
+        forward_link_col: The name of the column containing the forward
+          imputation link.
+        backward_link_col: The name of the column containing the backward
+          imputation link.
+        construction_link_col: The name of the column containing the
+          construction imputation link.
+        count_construction_col: The name of the column containing the count of
+          matched pairs used in construction link calculations.
+        count_forward_col: The name of the column containing the count of
+          matched pairs used inforward link calculations.
+        count_backward_col: The name of the column containing the count of
+          matched pairs used in backward link calculations.
+        default_construction_col: The name of the column containing the default
+          marker for the construction link.
+        default_forward_col: The name of the column containing the default
+          marker for the forward link.
+        default_backward_col: The name of the column containing the default
+          marker for the backward link.
+        link_inclusion_current_col: The name of the column containing the
+          inclusion marker for the current period.
+        link_inclusion_previous_col: The name of the column containing the
+          inclusion marker for the previous period.
+        link_inclusion_next_col: The name of the column containing the
+          inclusion marker for the next period.
+        back_data_df: The back data data frame.
+        link_filter: An inclusive filter statement that specifies conditions
+          under which a responce can be used for ratio calculation. The link
+          inclusion marker columns will only be present in the output if this is provided.
+        periodicity: The periodicity of the data as used by the calculation
+          functions in the `utilities.periods` module.
+        unweighted_forward_link_col: The name of the column containing the
+          forward link prior to weighting.
+        unweighted_backward_link_col: The name of the column containing the
+          backward link prior to weighting.
+        unweighted_construction_link_col: The name of the column containing the
+          construction link prior to weighting.
+        weight: A decimal value between 0 and 1 inclusive used to weigh links
+          in the current period against those in a previous period. The current
+          link is multiplied by the weight whereas the corresponding previous
+          link is multiplied by (1 - weight). If no corresponding previous link can be found
+          the current link is left unchanged. Link weighting is only performed
+          and the unweighted link columns above are only present in the output
+          if this value is provided.
+        weight_periodicity_multiplier: Multiplied by the periodicity of the
+          dataset to calculate the previous period when finding the previous links for weighting.
+        ratio_calculator_params: Any extra keyword arguments to the engine are
+          passed to the specified ratio calculators as keyword args and are
+          otherwise ignored by this function. Please see the specified ratio
+          calculator callables for details.
 
     Returns:
-    A data frame containing the imputed variables and links. The exact columns depend on
-    the type of imputation performed as specified by the provided arguments. The
-    data frame contains a row for each reference, period, grouping.
-
-    Either both or neither of `weight` and `weight_periodicity_multiplier` must be specified.
-    If they are then the links are adjusted using weighting, otherwise it is not.
-    Either both or neither of `forward_link_col` and `backward_link_col` must be in the input.
-    If they are then the links are not calculated, otherwise they are.
-    If `link_filter` is provided, the data will filter data to remove data not wanted in calculating links.
-
-    Note: Additional parameters will need to be passed to this method depending on the ratio calculators used.
+    A data frame containing the imputed variable and links. The exact columns
+    depend on the provided arguments.
+    the specified arguments. The data frame contains a row for each reference,
+    period and grouping combination in the input data.
+
+    Either both or neither of `weight` and `weight_periodicity_multiplier`
+    must be specified.
+
+    Either both or neither of `forward_link_col` and `backward_link_col` must
+    be in the input.
+
+    If `forward_link_col` and `backward_link_col` are present in the input
+    then they will not be calculated or weighted. The same also applies to
+    `construction_link_col`. This also means that the corresponding unweighted
+    columns will not be present in the output even if the arguments for
+    weighting are specified. In addition the corresponding count columns will
+    be set to `0` in this case and any NULL values defaulted with the
+    corresponding default markers set accordingly.
+
+    If `link_filter` is provided then the inclusion marker columns will be
+    present in the output otherwise they will not be.
+
+    Ratio calculators may also provide additional output columns.
+    Please see the specified ratio calculators and the
+    `imputation.ratio_calculators` module for more details.
     """
     # --- Validate params ---
     if not isinstance(input_df, DataFrame):

From d955ab2e99be8345f0901c34dc45b18c26637d52 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 25 May 2023 16:22:38 +0100
Subject: [PATCH 390/531] reformat engine docstring

---
 statistical_methods_library/imputation/engine.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 9f8bd168..f49fd058 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -127,7 +127,8 @@ def impute(
         back_data_df: The back data data frame.
         link_filter: An inclusive filter statement that specifies conditions
           under which a responce can be used for ratio calculation. The link
-          inclusion marker columns will only be present in the output if this is provided.
+          inclusion marker columns will only be present in the output if this
+          is provided.
         periodicity: The periodicity of the data as used by the calculation
           functions in the `utilities.periods` module.
         unweighted_forward_link_col: The name of the column containing the
@@ -139,12 +140,13 @@ def impute(
         weight: A decimal value between 0 and 1 inclusive used to weigh links
           in the current period against those in a previous period. The current
           link is multiplied by the weight whereas the corresponding previous
-          link is multiplied by (1 - weight). If no corresponding previous link can be found
-          the current link is left unchanged. Link weighting is only performed
-          and the unweighted link columns above are only present in the output
-          if this value is provided.
+          link is multiplied by (1 - weight). If no corresponding previous link
+          can be found the current link is left unchanged. Link weighting is
+          only performed and the unweighted link columns above are only present
+          in the output if this value is provided.
         weight_periodicity_multiplier: Multiplied by the periodicity of the
-          dataset to calculate the previous period when finding the previous links for weighting.
+          dataset to calculate the previous period when finding the previous
+          links for weighting.
         ratio_calculator_params: Any extra keyword arguments to the engine are
           passed to the specified ratio calculators as keyword args and are
           otherwise ignored by this function. Please see the specified ratio

From 32eca8a1519917ffa8bbcf32115bbaa144a72e03 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 26 May 2023 12:05:44 +0100
Subject: [PATCH 391/531] More api documentation

---
 .../imputation/engine.py                      |  15 ++-
 .../imputation/ratio_calculators.py           | 104 ++++++++++++++----
 2 files changed, 90 insertions(+), 29 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index f49fd058..0f689860 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -118,12 +118,15 @@ def impute(
           marker for the forward link.
         default_backward_col: The name of the column containing the default
           marker for the backward link.
-        link_inclusion_current_col: The name of the column containing the
-          inclusion marker for the current period.
-        link_inclusion_previous_col: The name of the column containing the
-          inclusion marker for the previous period.
-        link_inclusion_next_col: The name of the column containing the
-          inclusion marker for the next period.
+        link_inclusion_current_col: The name of the column marking whether the
+          value was included in link calculations based on filtering for the
+          current period.
+        link_inclusion_previous_col: The name of the column marking whether the
+          value was included in link calculations based on filtering for the
+          previous period.
+        link_inclusion_next_col: The name of the column marking whether the
+          value was included in link calculations based on filtering for the
+          next period.
         back_data_df: The back data data frame.
         link_filter: An inclusive filter statement that specifies conditions
           under which a responce can be used for ratio calculation. The link
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index f8d7b458..365ae937 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -1,4 +1,30 @@
-# For Copyright information, please see LICENCE.
+"""
+Ratio calculator functions written for use with the imputation engine.
+
+At a minimum ratio calculators are passed a data frame containing the following columns:
+* `ref` - Aliased from the `reference_col` engine argument
+* `grouping` - Aliased from the `grouping_col` engine argument
+* `period` - Aliased from the `period_col` engine argument
+* `aux` - Aliased from the `auxiliary_col` engine argument
+`current.output` - Aliased version of the `target_col` engine argument for
+  the data in the current period
+`link_inclusion_current` - See the `link_inclusion_current_col` argument for the
+  semantics of this column
+`next.output` - Aliased version of the `target_col` engine argument for
+  the data in the next period
+`link_inclusion_next` - See the `link_inclusion_next_col` argument for the
+  semantics of this column
+`previous.output` - Aliased version of the `target_col` engine argument for
+  the data in the previous period
+`link_inclusion_previous` - See the `link_inclusion_previous_col` argument for the
+  semantics of this column
+
+Ratio calculators can also accept arbitrary keyword arguments from the engine
+(see the `ratio_calculator_params` engine argument).
+
+For Copyright information, please see LICENCE.
+"""
+
 from dataclasses import dataclass, field
 from decimal import Decimal
 from numbers import Number
@@ -13,13 +39,31 @@
 
 @dataclass
 class RatioCalculationResult:
+    "Type for returns from ratio calculators"
     data: DataFrame
+    "The data being returned"
+
     join_columns: List[str]
-    fill_values: Optional[Dict[str, str]] = field(default_factory=dict)
+    """
+    The names of columns used to join the `data` attribute to the data to be
+    imputed.
+    """
+
+    fill_values: Optional[Dict[str, Any]] = field(default_factory=dict)
+    """
+    A mapping of column names in the `data` attribute to their fill values for
+    columns requiring filling.
+    """
     additional_outputs: Optional[Dict[str, str]] = field(default_factory=dict)
+    """
+    A mapping from the column name in the `data` attribute to the column's
+    user-provided name for output in cases where the ratio calculator provides
+    additional output columns.
+    """
 
 
 RatioCalculator = Callable[[DataFrame, Any], Iterable[RatioCalculationResult]]
+"The overall type for a ratio calculator to be provided to the engine"
 
 
 def mean_of_ratios(
@@ -36,27 +80,39 @@ def mean_of_ratios(
     **_kwargs,
 ) -> List[RatioCalculationResult]:
     """
-    Perform Mean of Ratios ratio calculator.
+    Perform Mean of Ratios forward and backward ratio calculation.
 
     Args:
         df: The input data frame.
-        trim_threshold: Number specifying how many matched pairs needed to allow trimming to occur. For trimming to occur, trim_threshold, lower_trim and upper_trim need to be present. When trimming occurs, trim_inclusion_forward_col and trim_inclusion_backward_col will be output.
-        lower_trim: Number specifying percentage to trim off the bottom. For trimming to occur, trim_threshold, lower_trim and upper_trim need to be present. When trimming occurs, trim_inclusion_forward_col and trim_inclusion_backward_col will be output.
-        upper_trim: Number specifying percentage to trim off the top. For trimming to occur, trim_threshold, lower_trim and upper_trim need to be present. When trimming occurs, trim_inclusion_forward_col and trim_inclusion_backward_col will be output.
-        include_zeros: Allows/Prohibits a return of zero being allowed in the calculations.
-        growth_forward_col: The name of the column containing the forward growth ratio.
-        growth_backward_col: The name of the column containing the backward growth ratio.
-        trim_inclusion_forward_col: The name of the column containing an marker specifiying if a growth ratio is included in calculations post trimming.
-        trim_inclusion_backward_col: The name of the column containing an marker specifiying if a growth ratio is included in calculations post trimming.
+        trim_threshold: The Number of matched pairs needed for trimming to
+          occur.
+        lower_trim: The percentage to trim off the bottom.
+        upper_trim: percentage to trim off the top.
+        include_zeros: Set to True to include zeros in ratio calculations,
+            otherwise zeros are removed from the data prior to processing.
+        growth_forward_col: The name of the column containing the forward
+          growth ratio.
+        growth_backward_col: The name of the column containing the backward
+          growth ratio.
+        trim_inclusion_forward_col: The name of the column marking whether the
+          growth ratio was included in forward ratio calculations post trimming.
+        trim_inclusion_backward_col: The name of the column marking whether the
+          growth ratio was included in backward ratio calculations post trimming.
 
-    Returns:
-    Two datas frame:
-    Ratio DF containing forward and backward links. Count of matched pairs and if the link was defaulted.
-    The data frame contains a row for each period, grouping.
+    Returns a list of results:
+        A result containing forward and backward links, count of matched pairs
+          and if the links were defaulted. The data frame contains a row for
+          each period and grouping combination in the input data.
+        A result containing forward and backward growth ratios. The exact
+            columns depend on if trimming is performed as specified by the
+            provided arguments. The data frame contains a row for each
+            reference, period and grouping combination in the input data.
 
-    Growth DF containing forward and backward growth ratios. The exact columns depend on if trimming is performed as specified by the provided arguments.
-    The data frame contains a row for each reference, period, grouping.
+    For trimming to occur, `trim_threshold`, `lower_trim` and `upper_trim` need
+    to be present. When trimming occurs, `trim_inclusion_forward_col` and
+    `trim_inclusion_backward_col` will be output.
     """
+
     if lower_trim is not None:
         lower_trim = Decimal(lower_trim)
         upper_trim = Decimal(upper_trim)
@@ -324,14 +380,15 @@ def upper_bound(c):
 
 def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
     """
-    Perform Ratio of Means ratio calculator.
+    Perform Ratio of Means forward and backward ratio calculation.
 
     Args:
         df: The input data frame.
 
     Returns:
-    A data frame containing forward and backward links. Count of matched pairs and if the link was defaulted.
-    The data frame contains a row for each period, grouping.
+    A result containing forward and backward links, count of matched pairs and
+        if the links were defaulted. The data frame contains a row for each
+        period and grouping combination in the input data.
     """
     df = (
         df.filter(col("link_inclusion_current"))
@@ -383,14 +440,15 @@ def ratio_of_means_construction(
     *, df: DataFrame, **_kw
 ) -> List[RatioCalculationResult]:
     """
-    Perform construction ratio calculator.
+    Perform Ratio of Means construction ratio calculation.
 
     Args:
         df: The input data frame.
 
     Returns:
-    A data frame containing construction links. Count of matched pairs and if the link was defaulted.
-    The data frame contains a row for each period, grouping.
+    A result containing construction links, the count of matched pairs and if the
+    links were defaulted. The data frame contains a row for each period and
+    grouping combination in the input data.
     """
     return [
         RatioCalculationResult(

From 042f2384dad79342d5c521d29b422338f856561b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 26 May 2023 14:54:33 +0100
Subject: [PATCH 392/531] Document period calculation module and ensure that
 periods always end up as 6 characters

---
 .../utilities/periods.py                      | 66 +++++++++++++++----
 1 file changed, 55 insertions(+), 11 deletions(-)

diff --git a/statistical_methods_library/utilities/periods.py b/statistical_methods_library/utilities/periods.py
index 7d506872..45136a7e 100644
--- a/statistical_methods_library/utilities/periods.py
+++ b/statistical_methods_library/utilities/periods.py
@@ -1,20 +1,64 @@
+"""
+Functions to work with periods. Periods are in "yyyymm" format i.e. 4 digit
+year and 2 digit month. The terms year and month here do not necessarily have
+to be actual years and months although the period calculations assume 12
+periods in a year. In particular, because these functions are intended to work
+with data where the periods are used to identify sample periods rather than to
+act as calendar dates (e.g. accounting periods in economic survey data) no
+calendar related arithmetic is performed (e.g. leap years etc) with all
+calculations being strictly period based.
+
+For Copyright information, please see LICENCE.
+"""
+
 from pyspark.sql import Column
+from pyspark.sql.functions import lpad
 
 
 def calculate_previous_period(period: Column, relative: int):
+    """
+    Calculate the previous period.
+
+    Args:
+        period - The column containing the period.
+        relative: The mount of periods to subtract.
+
+    Returns:
+    A column containing the previous period.
+    """
+
     period = period.cast("integer")
-    return (
-        period
-        - relative
-        - 88 * (relative // 12 + (period % 100 <= relative % 12).cast("integer"))
-    ).cast("string")
+    return lpad(
+        (
+            period
+            - relative
+            - 88 * (relative // 12 + (period % 100 <= relative % 12).cast("integer"))
+        ).cast("string"),
+        6,
+        "0",
+    )
 
 
 def calculate_next_period(period: Column, relative: int) -> Column:
+    """
+    Calculate the next period.
+
+    Args:
+        period - The column containing the period.
+        relative: The mount of periods to add.
+
+    Returns:
+    A column containing the next period.
+    """
+
     period = period.cast("integer")
-    return (
-        period
-        + relative
-        + 88
-        * (relative // 12 + ((period % 100) + (relative % 12) > 12).cast("integer"))
-    ).cast("string")
+    return lpad(
+        (
+            period
+            + relative
+            + 88
+            * (relative // 12 + ((period % 100) + (relative % 12) > 12).cast("integer"))
+        ).cast("string"),
+        6,
+        "0",
+    )

From 211f2b42355292733da5ee21ef8f3626d0dec4fa Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 26 May 2023 15:27:50 +0100
Subject: [PATCH 393/531] More documentation and docstring reformatting

---
 .../imputation/ratio_calculators.py           | 57 ++++++++++---------
 1 file changed, 31 insertions(+), 26 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 365ae937..71ea8661 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -1,23 +1,24 @@
 """
 Ratio calculator functions written for use with the imputation engine.
 
-At a minimum ratio calculators are passed a data frame containing the following columns:
-* `ref` - Aliased from the `reference_col` engine argument
-* `grouping` - Aliased from the `grouping_col` engine argument
-* `period` - Aliased from the `period_col` engine argument
-* `aux` - Aliased from the `auxiliary_col` engine argument
-`current.output` - Aliased version of the `target_col` engine argument for
-  the data in the current period
-`link_inclusion_current` - See the `link_inclusion_current_col` argument for the
-  semantics of this column
-`next.output` - Aliased version of the `target_col` engine argument for
-  the data in the next period
-`link_inclusion_next` - See the `link_inclusion_next_col` argument for the
-  semantics of this column
-`previous.output` - Aliased version of the `target_col` engine argument for
-  the data in the previous period
-`link_inclusion_previous` - See the `link_inclusion_previous_col` argument for the
-  semantics of this column
+At a minimum ratio calculators are passed a data frame containing the
+following columns:
+    ref: Aliased from the `reference_col` engine argument.
+    grouping: Aliased from the `grouping_col` engine argument.
+    period: Aliased from the `period_col` engine argument.
+    aux: Aliased from the `auxiliary_col` engine argument.
+    current.output: Aliased version of the `target_col` engine argument for
+      the data in the current period.
+    link_inclusion_current: See the `link_inclusion_current_col` argument for
+      the semantics of this column.
+    next.output: Aliased version of the `target_col` engine argument for
+      the data in the next period.
+    link_inclusion_next: See the `link_inclusion_next_col` argument for the
+      semantics of this column.
+    previous.output: Aliased version of the `target_col` engine argument for
+      the data in the previous period.
+    link_inclusion_previous: See the `link_inclusion_previous_col` argument for the
+      semantics of this column.
 
 Ratio calculators can also accept arbitrary keyword arguments from the engine
 (see the `ratio_calculator_params` engine argument).
@@ -63,7 +64,7 @@ class RatioCalculationResult:
 
 
 RatioCalculator = Callable[[DataFrame, Any], Iterable[RatioCalculationResult]]
-"The overall type for a ratio calculator to be provided to the engine"
+"The overall type for a ratio calculator to be provided to the engine."
 
 
 def mean_of_ratios(
@@ -84,10 +85,10 @@ def mean_of_ratios(
 
     Args:
         df: The input data frame.
-        trim_threshold: The Number of matched pairs needed for trimming to
-          occur.
+        trim_threshold: The minimum number of matched pairs needed for trimming
+          to occur.
         lower_trim: The percentage to trim off the bottom.
-        upper_trim: percentage to trim off the top.
+        upper_trim: The percentage to trim off the top.
         include_zeros: Set to True to include zeros in ratio calculations,
             otherwise zeros are removed from the data prior to processing.
         growth_forward_col: The name of the column containing the forward
@@ -97,20 +98,24 @@ def mean_of_ratios(
         trim_inclusion_forward_col: The name of the column marking whether the
           growth ratio was included in forward ratio calculations post trimming.
         trim_inclusion_backward_col: The name of the column marking whether the
-          growth ratio was included in backward ratio calculations post trimming.
+          growth ratio was included in backward ratio calculations post
+          trimming.
 
-    Returns a list of results:
+    Returns:
         A result containing forward and backward links, count of matched pairs
           and if the links were defaulted. The data frame contains a row for
           each period and grouping combination in the input data.
         A result containing forward and backward growth ratios. The exact
-            columns depend on if trimming is performed as specified by the
-            provided arguments. The data frame contains a row for each
-            reference, period and grouping combination in the input data.
+          columns depend on if trimming is performed as specified by the
+          provided arguments. The data frame contains a row for each
+          reference, period and grouping combination in the input data.
 
     For trimming to occur, `trim_threshold`, `lower_trim` and `upper_trim` need
     to be present. When trimming occurs, `trim_inclusion_forward_col` and
     `trim_inclusion_backward_col` will be output.
+
+    The `lower_trim` and `upper_trim` are approximate percentages as trimming
+    uses exclusive bounds when calculating which rows to remove.
     """
 
     if lower_trim is not None:

From 6867f867178f01408460aa1a97fc8eca847388d4 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 30 May 2023 16:23:24 +0100
Subject: [PATCH 394/531] 12.0.0 release notes

---
 docs/release-notes/12.0.0.md                  |  74 +++++++++--
 poetry.lock                                   | 121 ++++++++++--------
 pyproject.toml                                |   2 +-
 statistical_methods_library/__init__.py       |   6 +
 .../estimation/__init__.py                    |   6 +
 .../imputation/__init__.py                    |   6 +
 .../outliering/__init__.py                    |   6 +
 statistical_methods_library/py.typed          |   0
 .../utilities/__init__.py                     |   7 +
 .../utilities/exceptions.py                   |   9 +-
 .../utilities/periods.py                      |  24 ++--
 .../utilities/validation.py                   |   2 +
 12 files changed, 180 insertions(+), 83 deletions(-)
 delete mode 100644 statistical_methods_library/py.typed

diff --git a/docs/release-notes/12.0.0.md b/docs/release-notes/12.0.0.md
index 9e6907f3..c1e30fd4 100644
--- a/docs/release-notes/12.0.0.md
+++ b/docs/release-notes/12.0.0.md
@@ -1,26 +1,72 @@
-# Statistical Methods Library 11.0.2
+# Statistical Methods Library 12.0.0
 
-Release date: 2023-??-??
+Release date: 2023-05-30
 
 ## Synopsis
 
-IMPUTATION:
-Added Mean of Ratios ratio calculator.
-Added Weighting functionality.
-Changed API call.
-New marker columns for filtered rows.
-Count columns no longer produce null values, default link marker column instead.
-Validation adjustment to allow multi variable calculations.
+This release brings a fundamental rewrite of the imputation API as well as
+more complete (and differently formatted) API documentation. Support for
+Mean of Ratios Imputation has also been added. In addition, the library
+packaging has been altered to allow the overall statistical methods library,
+as well as subpackages, to be imported more easily.
 
 ## Changes
 
-Changed API to now require users to call the generic engine and pass in which ratio calculator to use. Mean of Ratios is a new ratio calculator alongside Ratio of Means.
+### Imputation
 
-Alongside new output columns for mean of ratios, filtering now produces marker columns to better distinguish where data is not used in link calculations. To remove confusion, count columns no longer leave the count as null when links are defaulted due to no responses and zero when defaulted due to divide by zero error. Instead they now always have a number and use a default marker to distingush between, a default due to missing data or not defaulted and set to 1 when mathmatical error occurs.
+The imputation API has been changed to use a generic engine and ratio
+calculators. Ratio of Means has been rewritten as a ratio calculator with
+the construction calculation separated out into its own ratio calculator. In
+addition Mean of Ratios has been added as a ratio calculator. This new API
+also means that when passing forward and backward ratio (a.k.a. link)
+columns the method can perform construction ratio calculations and vice
+versa.
 
-Weighting functionality is now available for both ratio of means and mean of ratios.
-Validation required data to be unique of identifier and period. Now the grouping is also part of the unique requirements.
+Individual ratio calculators can now output additional columns. In addition,
+filtering now outputs marker columns to reflect how responses are used in
+ratio calculations.
+
+To remove confusion, the behaviour of observation count columns has changed.
+Instead of null and zero being used to differentiate reasons for ratio
+defaulting, the columns always reflect the actual number. A per ratio marker
+column is used to indicate whether ratios are defaulted.
+
+Weighting functionality is now available for all ratio calculator types. In
+order to weight current ratios, back data for weighting now needs to contain
+unweighted ratios for corresponding previous periods.
+
+Input validation previously required that a single identifier appear once in
+each period. This requirement has been changed to allow an identifier to
+appear once per grouping and period combination. This permits imputing
+multiple independent variables at once by using the grouping column to
+reflect both imputation grouping and variable.
+
+### General
+
+The API documentation for other modules has been either added or edited
+(mostly reformatted). In addition the period calculation functions which
+were previously part of the imputation engine have been moved into a utility
+module and all categories of method are now subpackages with imports into
+the top level package so that one can import the statistical methods library
+and then reference individual parts without having to import them
+separately if required. This also allows easier examination of the
+documentation from within Python (e.g. via the `help()` function in the
+repl).
 
 ## Notes
 
-Testing has been adjusted. Unit test are separate and run against the engine. Ratio calculators are all run as scenarios, using generic code to allow new tests to be easily added.
\ No newline at end of file
+### Imputation
+
+The new ratio calculator API and the corresponding separation of forward and
+backward ratio calculation from construction ratio calculation do not allow
+the implicit disabling of usage of either type of ratio during imputation.
+This is to ensure that the output is fully imputed.
+
+Although the API is incompatible and there are new output columns, the only
+existing output columns that have changed in terms of output values are the
+observation counts. This means that existing data can be used as back data
+as the observation count columns are not used for this purpose. In addition,
+although periods containing unweighted ratios may be required for weighting,
+it is still the case that the only target variable values used from back
+data are those from the period preceding the first period to be
+imputed with respect to the specified periodicity.
diff --git a/poetry.lock b/poetry.lock
index 7cd8077d..a03bc5ca 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand.
+# This file is automatically @generated by Poetry and should not be changed by hand.
 
 [[package]]
 name = "black"
@@ -81,63 +81,72 @@ files = [
 
 [[package]]
 name = "coverage"
-version = "7.2.6"
+version = "7.2.7"
 description = "Code coverage measurement for Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "coverage-7.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:496b86f1fc9c81a1cd53d8842ef712e950a4611bba0c42d33366a7b91ba969ec"},
-    {file = "coverage-7.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fbe6e8c0a9a7193ba10ee52977d4d5e7652957c1f56ccefed0701db8801a2a3b"},
-    {file = "coverage-7.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d06b721c2550c01a60e5d3093f417168658fb454e5dfd9a23570e9bffe39a1"},
-    {file = "coverage-7.2.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:77a04b84d01f0e12c66f16e69e92616442dc675bbe51b90bfb074b1e5d1c7fbd"},
-    {file = "coverage-7.2.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35db06450272473eab4449e9c2ad9bc6a0a68dab8e81a0eae6b50d9c2838767e"},
-    {file = "coverage-7.2.6-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6727a0d929ff0028b1ed8b3e7f8701670b1d7032f219110b55476bb60c390bfb"},
-    {file = "coverage-7.2.6-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aac1d5fdc5378f6bac2c0c7ebe7635a6809f5b4376f6cf5d43243c1917a67087"},
-    {file = "coverage-7.2.6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1c9e4a5eb1bbc3675ee57bc31f8eea4cd7fb0cbcbe4912cf1cb2bf3b754f4a80"},
-    {file = "coverage-7.2.6-cp310-cp310-win32.whl", hash = "sha256:71f739f97f5f80627f1fee2331e63261355fd1e9a9cce0016394b6707ac3f4ec"},
-    {file = "coverage-7.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:fde5c7a9d9864d3e07992f66767a9817f24324f354caa3d8129735a3dc74f126"},
-    {file = "coverage-7.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bc7b667f8654376e9353dd93e55e12ce2a59fb6d8e29fce40de682273425e044"},
-    {file = "coverage-7.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:697f4742aa3f26c107ddcb2b1784a74fe40180014edbd9adaa574eac0529914c"},
-    {file = "coverage-7.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:541280dde49ce74a4262c5e395b48ea1207e78454788887118c421cb4ffbfcac"},
-    {file = "coverage-7.2.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e7f1a8328eeec34c54f1d5968a708b50fc38d31e62ca8b0560e84a968fbf9a9"},
-    {file = "coverage-7.2.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4bbd58eb5a2371bf160590f4262109f66b6043b0b991930693134cb617bc0169"},
-    {file = "coverage-7.2.6-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ae82c5f168d2a39a5d69a12a69d4dc23837a43cf2ca99be60dfe59996ea6b113"},
-    {file = "coverage-7.2.6-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:f5440cdaf3099e7ab17a5a7065aed59aff8c8b079597b61c1f8be6f32fe60636"},
-    {file = "coverage-7.2.6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a6f03f87fea579d55e0b690d28f5042ec1368650466520fbc400e7aeaf09e995"},
-    {file = "coverage-7.2.6-cp311-cp311-win32.whl", hash = "sha256:dc4d5187ef4d53e0d4c8eaf530233685667844c5fb0b855fea71ae659017854b"},
-    {file = "coverage-7.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:c93d52c3dc7b9c65e39473704988602300e3cc1bad08b5ab5b03ca98bbbc68c1"},
-    {file = "coverage-7.2.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:42c692b55a647a832025a4c048007034fe77b162b566ad537ce65ad824b12a84"},
-    {file = "coverage-7.2.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7786b2fa7809bf835f830779ad285215a04da76293164bb6745796873f0942d"},
-    {file = "coverage-7.2.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25bad4196104761bc26b1dae9b57383826542ec689ff0042f7f4f4dd7a815cba"},
-    {file = "coverage-7.2.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2692306d3d4cb32d2cceed1e47cebd6b1d2565c993d6d2eda8e6e6adf53301e6"},
-    {file = "coverage-7.2.6-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:392154d09bd4473b9d11351ab5d63391f3d5d24d752f27b3be7498b0ee2b5226"},
-    {file = "coverage-7.2.6-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:fa079995432037b5e2ef5ddbb270bcd2ded9f52b8e191a5de11fe59a00ea30d8"},
-    {file = "coverage-7.2.6-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d712cefff15c712329113b01088ba71bbcef0f7ea58478ca0bbec63a824844cb"},
-    {file = "coverage-7.2.6-cp37-cp37m-win32.whl", hash = "sha256:004948e296149644d208964300cb3d98affc5211e9e490e9979af4030b0d6473"},
-    {file = "coverage-7.2.6-cp37-cp37m-win_amd64.whl", hash = "sha256:c1d7a31603c3483ac49c1726723b0934f88f2c011c660e6471e7bd735c2fa110"},
-    {file = "coverage-7.2.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3436927d1794fa6763b89b60c896f9e3bd53212001026ebc9080d23f0c2733c1"},
-    {file = "coverage-7.2.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44c9b9f1a245f3d0d202b1a8fa666a80b5ecbe4ad5d0859c0fb16a52d9763224"},
-    {file = "coverage-7.2.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e3783a286d5a93a2921396d50ce45a909aa8f13eee964465012f110f0cbb611"},
-    {file = "coverage-7.2.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3cff6980fe7100242170092bb40d2b1cdad79502cd532fd26b12a2b8a5f9aee0"},
-    {file = "coverage-7.2.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c534431153caffc7c495c3eddf7e6a6033e7f81d78385b4e41611b51e8870446"},
-    {file = "coverage-7.2.6-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:3062fd5c62df988cea9f2972c593f77fed1182bfddc5a3b12b1e606cb7aba99e"},
-    {file = "coverage-7.2.6-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6284a2005e4f8061c58c814b1600ad0074ccb0289fe61ea709655c5969877b70"},
-    {file = "coverage-7.2.6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:97729e6828643f168a2a3f07848e1b1b94a366b13a9f5aba5484c2215724edc8"},
-    {file = "coverage-7.2.6-cp38-cp38-win32.whl", hash = "sha256:dc11b42fa61ff1e788dd095726a0aed6aad9c03d5c5984b54cb9e1e67b276aa5"},
-    {file = "coverage-7.2.6-cp38-cp38-win_amd64.whl", hash = "sha256:cbcc874f454ee51f158afd604a315f30c0e31dff1d5d5bf499fc529229d964dd"},
-    {file = "coverage-7.2.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d3cacc6a665221108ecdf90517a8028d07a2783df3417d12dcfef1c517e67478"},
-    {file = "coverage-7.2.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:272ab31228a9df857ab5df5d67936d8861464dc89c5d3fab35132626e9369379"},
-    {file = "coverage-7.2.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9a8723ccec4e564d4b9a79923246f7b9a8de4ec55fa03ec4ec804459dade3c4f"},
-    {file = "coverage-7.2.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5906f6a84b47f995cd1bf0aca1c72d591c55ee955f98074e93660d64dfc66eb9"},
-    {file = "coverage-7.2.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:52c139b7ab3f0b15f9aad0a3fedef5a1f8c0b2bdc291d88639ca2c97d3682416"},
-    {file = "coverage-7.2.6-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a5ffd45c6b93c23a8507e2f436983015c6457aa832496b6a095505ca2f63e8f1"},
-    {file = "coverage-7.2.6-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:4f3c7c19581d471af0e9cb49d928172cd8492cd78a2b7a4e82345d33662929bb"},
-    {file = "coverage-7.2.6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e8c0e79820cdd67978e1120983786422d279e07a381dbf89d03bbb23ec670a6"},
-    {file = "coverage-7.2.6-cp39-cp39-win32.whl", hash = "sha256:13cde6bb0e58fb67d09e2f373de3899d1d1e866c5a9ff05d93615f2f54fbd2bb"},
-    {file = "coverage-7.2.6-cp39-cp39-win_amd64.whl", hash = "sha256:6b9f64526286255735847aed0221b189486e0b9ed943446936e41b7e44b08783"},
-    {file = "coverage-7.2.6-pp37.pp38.pp39-none-any.whl", hash = "sha256:6babcbf1e66e46052442f10833cfc4a0d3554d8276aa37af8531a83ed3c1a01d"},
-    {file = "coverage-7.2.6.tar.gz", hash = "sha256:2025f913f2edb0272ef15d00b1f335ff8908c921c8eb2013536fcaf61f5a683d"},
+    {file = "coverage-7.2.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d39b5b4f2a66ccae8b7263ac3c8170994b65266797fb96cbbfd3fb5b23921db8"},
+    {file = "coverage-7.2.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6d040ef7c9859bb11dfeb056ff5b3872436e3b5e401817d87a31e1750b9ae2fb"},
+    {file = "coverage-7.2.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba90a9563ba44a72fda2e85302c3abc71c5589cea608ca16c22b9804262aaeb6"},
+    {file = "coverage-7.2.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7d9405291c6928619403db1d10bd07888888ec1abcbd9748fdaa971d7d661b2"},
+    {file = "coverage-7.2.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31563e97dae5598556600466ad9beea39fb04e0229e61c12eaa206e0aa202063"},
+    {file = "coverage-7.2.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:ebba1cd308ef115925421d3e6a586e655ca5a77b5bf41e02eb0e4562a111f2d1"},
+    {file = "coverage-7.2.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:cb017fd1b2603ef59e374ba2063f593abe0fc45f2ad9abdde5b4d83bd922a353"},
+    {file = "coverage-7.2.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62a5c7dad11015c66fbb9d881bc4caa5b12f16292f857842d9d1871595f4495"},
+    {file = "coverage-7.2.7-cp310-cp310-win32.whl", hash = "sha256:ee57190f24fba796e36bb6d3aa8a8783c643d8fa9760c89f7a98ab5455fbf818"},
+    {file = "coverage-7.2.7-cp310-cp310-win_amd64.whl", hash = "sha256:f75f7168ab25dd93110c8a8117a22450c19976afbc44234cbf71481094c1b850"},
+    {file = "coverage-7.2.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:06a9a2be0b5b576c3f18f1a241f0473575c4a26021b52b2a85263a00f034d51f"},
+    {file = "coverage-7.2.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5baa06420f837184130752b7c5ea0808762083bf3487b5038d68b012e5937dbe"},
+    {file = "coverage-7.2.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdec9e8cbf13a5bf63290fc6013d216a4c7232efb51548594ca3631a7f13c3a3"},
+    {file = "coverage-7.2.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:52edc1a60c0d34afa421c9c37078817b2e67a392cab17d97283b64c5833f427f"},
+    {file = "coverage-7.2.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63426706118b7f5cf6bb6c895dc215d8a418d5952544042c8a2d9fe87fcf09cb"},
+    {file = "coverage-7.2.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:afb17f84d56068a7c29f5fa37bfd38d5aba69e3304af08ee94da8ed5b0865833"},
+    {file = "coverage-7.2.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:48c19d2159d433ccc99e729ceae7d5293fbffa0bdb94952d3579983d1c8c9d97"},
+    {file = "coverage-7.2.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0e1f928eaf5469c11e886fe0885ad2bf1ec606434e79842a879277895a50942a"},
+    {file = "coverage-7.2.7-cp311-cp311-win32.whl", hash = "sha256:33d6d3ea29d5b3a1a632b3c4e4f4ecae24ef170b0b9ee493883f2df10039959a"},
+    {file = "coverage-7.2.7-cp311-cp311-win_amd64.whl", hash = "sha256:5b7540161790b2f28143191f5f8ec02fb132660ff175b7747b95dcb77ac26562"},
+    {file = "coverage-7.2.7-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f2f67fe12b22cd130d34d0ef79206061bfb5eda52feb6ce0dba0644e20a03cf4"},
+    {file = "coverage-7.2.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a342242fe22407f3c17f4b499276a02b01e80f861f1682ad1d95b04018e0c0d4"},
+    {file = "coverage-7.2.7-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:171717c7cb6b453aebac9a2ef603699da237f341b38eebfee9be75d27dc38e01"},
+    {file = "coverage-7.2.7-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49969a9f7ffa086d973d91cec8d2e31080436ef0fb4a359cae927e742abfaaa6"},
+    {file = "coverage-7.2.7-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b46517c02ccd08092f4fa99f24c3b83d8f92f739b4657b0f146246a0ca6a831d"},
+    {file = "coverage-7.2.7-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:a3d33a6b3eae87ceaefa91ffdc130b5e8536182cd6dfdbfc1aa56b46ff8c86de"},
+    {file = "coverage-7.2.7-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:976b9c42fb2a43ebf304fa7d4a310e5f16cc99992f33eced91ef6f908bd8f33d"},
+    {file = "coverage-7.2.7-cp312-cp312-win32.whl", hash = "sha256:8de8bb0e5ad103888d65abef8bca41ab93721647590a3f740100cd65c3b00511"},
+    {file = "coverage-7.2.7-cp312-cp312-win_amd64.whl", hash = "sha256:9e31cb64d7de6b6f09702bb27c02d1904b3aebfca610c12772452c4e6c21a0d3"},
+    {file = "coverage-7.2.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:58c2ccc2f00ecb51253cbe5d8d7122a34590fac9646a960d1430d5b15321d95f"},
+    {file = "coverage-7.2.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d22656368f0e6189e24722214ed8d66b8022db19d182927b9a248a2a8a2f67eb"},
+    {file = "coverage-7.2.7-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a895fcc7b15c3fc72beb43cdcbdf0ddb7d2ebc959edac9cef390b0d14f39f8a9"},
+    {file = "coverage-7.2.7-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e84606b74eb7de6ff581a7915e2dab7a28a0517fbe1c9239eb227e1354064dcd"},
+    {file = "coverage-7.2.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:0a5f9e1dbd7fbe30196578ca36f3fba75376fb99888c395c5880b355e2875f8a"},
+    {file = "coverage-7.2.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:419bfd2caae268623dd469eff96d510a920c90928b60f2073d79f8fe2bbc5959"},
+    {file = "coverage-7.2.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2aee274c46590717f38ae5e4650988d1af340fe06167546cc32fe2f58ed05b02"},
+    {file = "coverage-7.2.7-cp37-cp37m-win32.whl", hash = "sha256:61b9a528fb348373c433e8966535074b802c7a5d7f23c4f421e6c6e2f1697a6f"},
+    {file = "coverage-7.2.7-cp37-cp37m-win_amd64.whl", hash = "sha256:b1c546aca0ca4d028901d825015dc8e4d56aac4b541877690eb76490f1dc8ed0"},
+    {file = "coverage-7.2.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:54b896376ab563bd38453cecb813c295cf347cf5906e8b41d340b0321a5433e5"},
+    {file = "coverage-7.2.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3d376df58cc111dc8e21e3b6e24606b5bb5dee6024f46a5abca99124b2229ef5"},
+    {file = "coverage-7.2.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e330fc79bd7207e46c7d7fd2bb4af2963f5f635703925543a70b99574b0fea9"},
+    {file = "coverage-7.2.7-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e9d683426464e4a252bf70c3498756055016f99ddaec3774bf368e76bbe02b6"},
+    {file = "coverage-7.2.7-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d13c64ee2d33eccf7437961b6ea7ad8673e2be040b4f7fd4fd4d4d28d9ccb1e"},
+    {file = "coverage-7.2.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b7aa5f8a41217360e600da646004f878250a0d6738bcdc11a0a39928d7dc2050"},
+    {file = "coverage-7.2.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8fa03bce9bfbeeef9f3b160a8bed39a221d82308b4152b27d82d8daa7041fee5"},
+    {file = "coverage-7.2.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:245167dd26180ab4c91d5e1496a30be4cd721a5cf2abf52974f965f10f11419f"},
+    {file = "coverage-7.2.7-cp38-cp38-win32.whl", hash = "sha256:d2c2db7fd82e9b72937969bceac4d6ca89660db0a0967614ce2481e81a0b771e"},
+    {file = "coverage-7.2.7-cp38-cp38-win_amd64.whl", hash = "sha256:2e07b54284e381531c87f785f613b833569c14ecacdcb85d56b25c4622c16c3c"},
+    {file = "coverage-7.2.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:537891ae8ce59ef63d0123f7ac9e2ae0fc8b72c7ccbe5296fec45fd68967b6c9"},
+    {file = "coverage-7.2.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:06fb182e69f33f6cd1d39a6c597294cff3143554b64b9825d1dc69d18cc2fff2"},
+    {file = "coverage-7.2.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:201e7389591af40950a6480bd9edfa8ed04346ff80002cec1a66cac4549c1ad7"},
+    {file = "coverage-7.2.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f6951407391b639504e3b3be51b7ba5f3528adbf1a8ac3302b687ecababf929e"},
+    {file = "coverage-7.2.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f48351d66575f535669306aa7d6d6f71bc43372473b54a832222803eb956fd1"},
+    {file = "coverage-7.2.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b29019c76039dc3c0fd815c41392a044ce555d9bcdd38b0fb60fb4cd8e475ba9"},
+    {file = "coverage-7.2.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:81c13a1fc7468c40f13420732805a4c38a105d89848b7c10af65a90beff25250"},
+    {file = "coverage-7.2.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:975d70ab7e3c80a3fe86001d8751f6778905ec723f5b110aed1e450da9d4b7f2"},
+    {file = "coverage-7.2.7-cp39-cp39-win32.whl", hash = "sha256:7ee7d9d4822c8acc74a5e26c50604dff824710bc8de424904c0982e25c39c6cb"},
+    {file = "coverage-7.2.7-cp39-cp39-win_amd64.whl", hash = "sha256:eb393e5ebc85245347950143969b241d08b52b88a3dc39479822e073a1a8eb27"},
+    {file = "coverage-7.2.7-pp37.pp38.pp39-none-any.whl", hash = "sha256:b7b4c971f05e6ae490fef852c218b0e79d4e52f79ef0c8475566584a8fb3e01d"},
+    {file = "coverage-7.2.7.tar.gz", hash = "sha256:924d94291ca674905fe9481f12294eb11f2d3d3fd1adb20314ba89e94f44ed59"},
 ]
 
 [package.dependencies]
@@ -500,14 +509,14 @@ files = [
 
 [[package]]
 name = "typing-extensions"
-version = "4.6.1"
+version = "4.6.2"
 description = "Backported and Experimental Type Hints for Python 3.7+"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "typing_extensions-4.6.1-py3-none-any.whl", hash = "sha256:6bac751f4789b135c43228e72de18637e9a6c29d12777023a703fd1a6858469f"},
-    {file = "typing_extensions-4.6.1.tar.gz", hash = "sha256:558bc0c4145f01e6405f4a5fdbd82050bd221b119f4bf72a961a1cfd471349d6"},
+    {file = "typing_extensions-4.6.2-py3-none-any.whl", hash = "sha256:3a8b36f13dd5fdc5d1b16fe317f5668545de77fa0b8e02006381fd49d731ab98"},
+    {file = "typing_extensions-4.6.2.tar.gz", hash = "sha256:06006244c70ac8ee83fa8282cb188f697b8db25bc8b4df07be1873c43897060c"},
 ]
 
 [[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 0f443253..b3c2cab8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0-rc13"
+version = "12.0.0"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
diff --git a/statistical_methods_library/__init__.py b/statistical_methods_library/__init__.py
index b3bdbebe..23e235e1 100644
--- a/statistical_methods_library/__init__.py
+++ b/statistical_methods_library/__init__.py
@@ -1 +1,7 @@
+"""
+Library containing statistical methods used by the ONS.
+
+For Copyright information, please see LICENCE.
+"""
+
 from . import estimation, imputation, outliering, utilities  # noqa: F401
diff --git a/statistical_methods_library/estimation/__init__.py b/statistical_methods_library/estimation/__init__.py
index ccefa182..5a6ce0d9 100644
--- a/statistical_methods_library/estimation/__init__.py
+++ b/statistical_methods_library/estimation/__init__.py
@@ -1 +1,7 @@
+"""
+Methods to perform estimation.
+
+For Copyright information, please see LICENCE.
+"""
+
 from . import ht_ratio  # noqa: F401
diff --git a/statistical_methods_library/imputation/__init__.py b/statistical_methods_library/imputation/__init__.py
index 018312b1..d3421377 100644
--- a/statistical_methods_library/imputation/__init__.py
+++ b/statistical_methods_library/imputation/__init__.py
@@ -1,2 +1,8 @@
+"""
+Methods to perform ratio based imputation.
+
+For Copyright information, please see LICENCE.
+"""
+
 from .engine import Marker, impute  # noqa: F401
 from .ratio_calculators import mean_of_ratios, ratio_of_means  # noqa: F401
diff --git a/statistical_methods_library/outliering/__init__.py b/statistical_methods_library/outliering/__init__.py
index cf1d3526..3a4c61de 100644
--- a/statistical_methods_library/outliering/__init__.py
+++ b/statistical_methods_library/outliering/__init__.py
@@ -1 +1,7 @@
+"""
+Methods to perform outliering.
+
+For Copyright information, please see LICENCE.
+"""
+
 from . import winsorisation  # noqa: F401
diff --git a/statistical_methods_library/py.typed b/statistical_methods_library/py.typed
deleted file mode 100644
index e69de29b..00000000
diff --git a/statistical_methods_library/utilities/__init__.py b/statistical_methods_library/utilities/__init__.py
index e69de29b..5a99518d 100644
--- a/statistical_methods_library/utilities/__init__.py
+++ b/statistical_methods_library/utilities/__init__.py
@@ -0,0 +1,7 @@
+"""
+Utilities used by the statistical methods in this library.
+
+For Copyright information, please see LICENCE.
+"""
+
+from . import exceptions, periods, validation  # noqa: F401
diff --git a/statistical_methods_library/utilities/exceptions.py b/statistical_methods_library/utilities/exceptions.py
index f86363aa..e22e3a64 100644
--- a/statistical_methods_library/utilities/exceptions.py
+++ b/statistical_methods_library/utilities/exceptions.py
@@ -1,6 +1,13 @@
+"""
+Exception classes used by this library.
+
+For Copyright information, please see LICENCE.
+"""
+
+
 class SMLError(Exception):
     """
-    Error raised by the SML.
+    Base class for errors raised by statistical methods.
     """
 
     pass
diff --git a/statistical_methods_library/utilities/periods.py b/statistical_methods_library/utilities/periods.py
index 45136a7e..a23adf35 100644
--- a/statistical_methods_library/utilities/periods.py
+++ b/statistical_methods_library/utilities/periods.py
@@ -1,14 +1,16 @@
 """
-Functions to work with periods. Periods are in "yyyymm" format i.e. 4 digit
-year and 2 digit month. The terms year and month here do not necessarily have
-to be actual years and months although the period calculations assume 12
-periods in a year. In particular, because these functions are intended to work
-with data where the periods are used to identify sample periods rather than to
-act as calendar dates (e.g. accounting periods in economic survey data) no
-calendar related arithmetic is performed (e.g. leap years etc) with all
-calculations being strictly period based.
+Functions to work with periods.
 
-For Copyright information, please see LICENCE.
+Periods are in "yyyymm" format i.e. 4 digit year and 2 digit month. The terms
+year and month here do not necessarily have to be actual years and months
+although the period calculations assume 12 periods in a year. In particular,
+because these functions are intended to work with data where the periods are
+used to identify sample periods rather than to act as calendar dates (e.g.
+accounting periods in economic survey data) no calendar related arithmetic is
+performed (e.g. leap years etc) with all calculations being strictly period
+based.
+
+for Copyright information, please see LICENCE.
 """
 
 from pyspark.sql import Column
@@ -21,7 +23,7 @@ def calculate_previous_period(period: Column, relative: int):
 
     Args:
         period - The column containing the period.
-        relative: The mount of periods to subtract.
+        relative: The amount of periods to subtract.
 
     Returns:
     A column containing the previous period.
@@ -45,7 +47,7 @@ def calculate_next_period(period: Column, relative: int) -> Column:
 
     Args:
         period - The column containing the period.
-        relative: The mount of periods to add.
+        relative: The amount of periods to add.
 
     Returns:
     A column containing the next period.
diff --git a/statistical_methods_library/utilities/validation.py b/statistical_methods_library/utilities/validation.py
index 3396246d..837df18f 100644
--- a/statistical_methods_library/utilities/validation.py
+++ b/statistical_methods_library/utilities/validation.py
@@ -1,4 +1,6 @@
 """
+Data frame validation and aliasing functions.
+
 For Copyright information, please see LICENCE.
 """
 

From 2bf387c9c36925c91adf21938c78e2dcf1056be3 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 30 May 2023 16:30:37 +0100
Subject: [PATCH 395/531] Clarify period column documentation for estimatino
 and winsorisation as imputation docs imply more restrictions than apply to
 these methods

---
 statistical_methods_library/estimation/ht_ratio.py      | 5 ++++-
 statistical_methods_library/outliering/winsorisation.py | 6 ++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/statistical_methods_library/estimation/ht_ratio.py b/statistical_methods_library/estimation/ht_ratio.py
index 9667ad95..fc977a62 100644
--- a/statistical_methods_library/estimation/ht_ratio.py
+++ b/statistical_methods_library/estimation/ht_ratio.py
@@ -37,7 +37,10 @@ def estimate(
         input_df: The input data frame.
         unique_identifier_col: The name of the column containing the unique
           identifier for a contributor.
-        period_col: The name of the column containing the period.
+        period_col: The name of the column identifying the period. Values in
+          this column are merely for grouping purposes and thus do not need
+          to conform to the conventions or data type documented for periods
+          in the `utilities.periods` module.
         strata_col: The name of the column containing the stratum.
         sample_marker_col: The name of the column containing a boolean marker
           where True means to include the contributor in the sample otherwise
diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index ec431e94..4f44dc9c 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -48,8 +48,10 @@ def outlier(
     Args:
         input_df: The input data frame.
         reference_col: The name of the column to reference a unique contributor.
-        period_col: The name of the column containing the period information for
-          a contributor.
+        period_col: The name of the column identifying the period. Values in
+          this column are merely for grouping purposes and thus do not need
+          to conform to the conventions or data type documented for periods
+          in the `utilities.periods` module.
         grouping_col: The name of the column containing the grouping information
           for a contributor.
         target_col: The name of the column containing the target variable.

From b19d022c20e6bc796d416dcf787a34eabdbd0a91 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 6 Jun 2023 11:40:21 +0100
Subject: [PATCH 396/531] Do we need aux?

---
 statistical_methods_library/imputation/engine.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 0f689860..2368550f 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -231,7 +231,6 @@ def impute(
         "ref": reference_col,
         "period": period_col,
         "grouping": grouping_col,
-        "aux": auxiliary_col,
         "output": output_col,
         "marker": marker_col,
     }
@@ -310,7 +309,7 @@ def impute(
         ).localCheckpoint(eager=False)
         back_data_period_df = (
             validated_back_data_df.select(
-                "ref", "period", "grouping", "output", "aux", "marker"
+                "ref", "period", "grouping", "output", "marker"
             )
             .join(prior_period_df, [col("period") == col("prior_period")])
             .drop("prior_period")

From 0560e7127a253c3ae91fd9bf7501746b3f0c9015 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 6 Jun 2023 11:55:47 +0100
Subject: [PATCH 397/531] Dependency bump

---
 poetry.lock | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index a03bc5ca..e9817c3f 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -509,14 +509,14 @@ files = [
 
 [[package]]
 name = "typing-extensions"
-version = "4.6.2"
+version = "4.6.3"
 description = "Backported and Experimental Type Hints for Python 3.7+"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "typing_extensions-4.6.2-py3-none-any.whl", hash = "sha256:3a8b36f13dd5fdc5d1b16fe317f5668545de77fa0b8e02006381fd49d731ab98"},
-    {file = "typing_extensions-4.6.2.tar.gz", hash = "sha256:06006244c70ac8ee83fa8282cb188f697b8db25bc8b4df07be1873c43897060c"},
+    {file = "typing_extensions-4.6.3-py3-none-any.whl", hash = "sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26"},
+    {file = "typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5"},
 ]
 
 [[package]]

From 85a1fb0c2d964ade135536a18ccdedb3d757d05e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 6 Jun 2023 11:56:19 +0100
Subject: [PATCH 398/531] Drop auxiliary value column from output data as it is
 not needed for back data tests any more

---
 .../engine/unit/back_data_no_output.csv       |  10 +-
 .../methodology_scenarios/01_C_output.csv     |  10 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  18 +-
 .../03_R_R_FI_output.csv                      |  26 +-
 .../04_R_R_FI_FI_output.csv                   |  34 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  42 +--
 .../06_BI_BI_R_output.csv                     |  26 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  58 ++--
 .../methodology_scenarios/08_R_R_R_output.csv |  26 +-
 .../09_R_NS_C_output.csv                      |  24 +-
 .../10_C_FI_NS_R_output.csv                   |  32 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  50 +--
 .../12_C_FI_FI_FI_FI_output.csv               |  42 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  56 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  56 ++--
 .../17_NS_R_FI_NS_output.csv                  |  30 +-
 .../18_NS_BI_R_NS_output.csv                  |  30 +-
 .../19_link_columns_output.csv                |  50 +--
 .../20_mixed_data_output.csv                  |  96 +++---
 .../21_class_change_R_C_FI_output.csv         |  32 +-
 .../22_class_change_C_BI_R_output.csv         |  32 +-
 .../23_class_change_C_C_FI_output.csv         |  32 +-
 .../24_class_change_R_BI_R_output.csv         |  32 +-
 .../25_class_change_C_FI_FI_output.csv        |  44 +--
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv |  84 ++---
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |  84 ++---
 .../28_link_columns_filtered_output.csv       |  66 ++--
 .../29_mixed_data_filtered_output.csv         | 128 ++++----
 ...30_class_change_C_C_FI_filtered_output.csv |  56 ++--
 ...I_R-R_FI_FI-C_FI_FI_no_response_output.csv |  44 +--
 .../32_C_FI_FI_no_response_output.csv         |  32 +-
 .../33_partial_link_columns_output.csv        |  50 +--
 .../34_default_link_output.csv                |  42 +--
 .../35_TB_10_R_R_FI_output.csv                |  74 ++---
 .../36_TB_10_BI_BI_R_output.csv               |  74 ++---
 .../37_TB_10_C_FI_FI_output.csv               |  74 ++---
 .../38_T_10_R_R_FI_output.csv                 |  74 ++---
 .../39_B_10_R_R_FI_output.csv                 |  74 ++---
 .../40_TB_10_R_R_FI_no_trim_output.csv        |  62 ++--
 .../41_TB_10_R_R_FI_filtered_output.csv       |  74 ++---
 .../42_TB_10_R_R_FI-BI_R_R_output.csv         | 146 ++++-----
 .../43_TB_10_BI_BI_R_boundary_output.csv      | 128 ++++----
 .../44_TB_5_BI_BI_R_boundary_output.csv       | 128 ++++----
 ...45_TB_10_R_R_FI_partial_no_trim_output.csv |  70 ++---
 .../46_TB_10_BI_BI_R_filtered_output.csv      | 128 ++++----
 .../methodology_scenarios/47_TB_50_output.csv |  74 ++---
 ...BI_BI_R-R_R_FI_filtered_default_output.csv |  44 +--
 ...BI_R_R_50_weight_previous_month_output.csv |  54 ++--
 .../50_R_R_FI_50_weight_output.csv            |  50 +--
 .../51_R_R_FI_80_weight_output.csv            |  50 +--
 .../52_BI_BI_R_50_weight_output.csv           |  50 +--
 .../53_C_FI_FI_50_weight_output.csv           |  50 +--
 .../54_R_R_FI-BI_R_R_50_weight_output.csv     |  98 +++---
 ..._BI_R_NS_C_FI_FI_zeros_excluded_output.csv |  70 ++---
 ..._BI_R_NS_C_FI_FI_zeros_included_output.csv |  70 ++---
 ...FI_FI_R_FI_alternating_filtered_output.csv |  58 ++--
 .../58_TB_10_partial_default_output.csv       | 146 ++++-----
 .../59_class_change_50_weight_output.csv      |  62 ++--
 ..._R_FI_FI_R_FI_50_weight_default_output.csv |  98 +++---
 ..._R_FI-BI_R_R_50_weight_filtered_output.csv | 146 ++++-----
 .../62_mixed_data_50_weight_output.csv        |  86 +++---
 ...3_TB_10_R_R_FI-BI_R_R_50_weight_output.csv | 290 +++++++++---------
 .../64_TB_10_C_FI_FI_50_weight_output.csv     | 146 ++++-----
 ...B_10_BI_BI_R_50_weight_filtered_output.csv | 254 +++++++--------
 .../66_partial_links_50_weight_output.csv     |  98 +++---
 ...7_TB_10_muti_variable_50_weight_output.csv | 290 +++++++++---------
 .../methodology_scenarios/01_C_output.csv     |  10 +-
 .../methodology_scenarios/02_C_FI_output.csv  |  18 +-
 .../03_R_R_FI_output.csv                      |  26 +-
 .../04_R_R_FI_FI_output.csv                   |  34 +-
 .../05_R_R_FI_FI_FI_year_span_output.csv      |  42 +--
 .../06_BI_BI_R_output.csv                     |  26 +-
 .../07_BI_BI_R_FI_FI_R_FI_output.csv          |  58 ++--
 .../methodology_scenarios/08_R_R_R_output.csv |  26 +-
 .../09_R_NS_C_output.csv                      |  24 +-
 .../10_C_FI_NS_R_output.csv                   |  32 +-
 .../11_R_R_FI-BI_R_R_output.csv               |  50 +--
 .../12_C_FI_FI_FI_FI_output.csv               |  42 +--
 .../13_R_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../14_C_FI_FI_NS_BI_BI_R_output.csv          |  56 ++--
 .../15_BI_BI_R_NS_R_FI_FI_output.csv          |  56 ++--
 .../16_BI_BI_R_NS_C_FI_FI_output.csv          |  56 ++--
 .../17_NS_R_FI_NS_output.csv                  |  30 +-
 .../18_NS_BI_R_NS_output.csv                  |  30 +-
 .../19_link_columns_output.csv                |  50 +--
 .../20_mixed_data_output.csv                  |  96 +++---
 .../21_class_change_R_C_FI_output.csv         |  32 +-
 .../22_class_change_C_BI_R_output.csv         |  32 +-
 .../23_class_change_C_C_FI_output.csv         |  32 +-
 .../24_class_change_R_BI_R_output.csv         |  32 +-
 .../25_class_change_C_FI_FI_output.csv        |  44 +--
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv |  84 ++---
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |  84 ++---
 .../28_link_columns_filtered_output.csv       |  66 ++--
 .../29_mixed_data_filtered_output.csv         | 128 ++++----
 ...30_class_change_C_C_FI_filtered_output.csv |  56 ++--
 .../31_no_response_output.csv                 |  62 ++--
 .../32_divide_by_zero_output.csv              |  34 +-
 .../33_multi_variable_C_BI_R_output.csv       |  32 +-
 ..._multi_variable_C_BI_R_filtered_output.csv |  36 +--
 102 files changed, 3274 insertions(+), 3274 deletions(-)

diff --git a/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv b/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
index c8e23433..3ac29d77 100644
--- a/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
+++ b/tests/fixture_data/imputation/engine/unit/back_data_no_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,marker
-111,202901,1,1,R
-111,202902,1,1,R
-111,202903,1,1,R
-111,202904,1,1,R
\ No newline at end of file
+identifier,date,group,marker
+111,202901,1,R
+111,202902,1,R
+111,202903,1,R
+111,202904,1,R
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
index b46f3d86..e03cdd5f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,100,1,3892,R,,,1,1,147.8876404,0,0,3,true,true,false
-10002,202001,100,75,3873,R,,,1,1,147.8876404,0,0,3,true,true,false
-10003,202001,100,13,5397,R,,,1,1,147.8876404,0,0,3,true,true,false
-10004,202001,100,71,10500.022472,C,,,1,1,147.8876404,0,0,3,true,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,100,3892,R,,,1,1,147.8876404,0,0,3,true,true,false
+10002,202001,100,3873,R,,,1,1,147.8876404,0,0,3,true,true,false
+10003,202001,100,5397,R,,,1,1,147.8876404,0,0,3,true,true,false
+10004,202001,100,10500.022472,C,,,1,1,147.8876404,0,0,3,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
index 596cabe6..c50f7808 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-20001,202001,100,35,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,false,false
-20001,202002,100,35,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,false,true,false
-20002,202001,100,72,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,false,false
-20002,202002,100,72,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,false,true,false
-20003,202001,100,77,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,true,false,false
-20003,202002,100,77,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,false,true,false
-20004,202001,100,30,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,true,false,false
-20004,202002,100,30,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+20001,202001,100,2536,R,,0.306169262,1,3.027097983,93.98369565,0,3,3,true,false,false
+20001,202002,100,8283,R,3.266167192,,1.255768523,1,66.5326087,3,0,3,false,true,false
+20002,202001,100,9113,R,,3.068350168,1,3.027097983,93.98369565,0,3,3,true,false,false
+20002,202002,100,2970,R,0.325908043,,1.255768523,1,66.5326087,3,0,3,false,true,false
+20003,202001,100,5644,R,,5.70677452,1,3.027097983,93.98369565,0,3,3,true,false,false
+20003,202002,100,989,R,0.175230333,,1.255768523,1,66.5326087,3,0,3,false,true,false
+20004,202001,100,2819.51087,C,,,1,3.027097983,93.98369565,0,3,3,true,false,false
+20004,202002,100,3540.653001,FIC,,,1.255768523,1,66.5326087,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
index 50e58056..484ad42b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,false,false
-30001,202002,100,51,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,false,false,false
-30001,202003,100,51,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,false,true,false
-30002,202001,100,72,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,true,false,false
-30002,202002,100,72,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,false,false,false
-30002,202003,100,72,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,false,true,false
-30003,202001,100,7,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,true,false,false
-30003,202002,100,7,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,false,false,false
-30003,202003,100,7,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,false,true,false
-30004,202001,100,81,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,true,false,false
-30004,202002,100,81,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,false,false,false
-30004,202003,100,81,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,8444,R,,1.129481006,1,1.655006,120.199052,0,4,4,true,false,false
+30001,202002,100,7476,R,0.885362387,3.732401398,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30001,202003,100,2003,R,0.267924024,,1.526947,1,103.015385,3,0,3,false,true,false
+30002,202001,100,9343,R,,1.195062676,1,1.655006,120.199052,0,4,4,true,false,false
+30002,202002,100,7818,R,0.836776196,1.596487645,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30002,202003,100,4897,R,0.626375032,,1.526947,1,103.015385,3,0,3,false,true,false
+30003,202001,100,7511,R,,4.265190233,1,1.655006,120.199052,0,4,4,true,false,false
+30003,202002,100,1761,R,0.234456131,0.271256932,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30003,202003,100,6492,R,3.686541738,,1.526947,1,103.015385,3,0,3,false,true,false
+30004,202001,100,64,R,,0.030288689,1,1.655006,120.199052,0,4,4,true,false,false
+30004,202002,100,2113,R,33.015625,,8.743054929,1.866715,90.843602,4,3,4,false,false,false
+30004,202003,100,3226.438865,FIR,,,1.526947,1,103.015385,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
index b550328e..5297e843 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-40001,202001,100,35,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,false,false
-40001,202002,100,35,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
-40001,202003,100,35,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
-40001,202004,100,35,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,false,true,false
-40002,202001,100,63,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,true,false,false
-40002,202002,100,63,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
-40002,202003,100,63,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
-40002,202004,100,63,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,false,true,false
-40003,202001,100,16,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,true,false,false
-40003,202002,100,16,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
-40003,202003,100,16,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
-40003,202004,100,16,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,false,true,false
-40004,202001,100,78,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,true,false,false
-40004,202002,100,78,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
-40004,202003,100,78,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
-40004,202004,100,78,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+40001,202001,100,9491,R,,1.984319465,1,2.053506032,128.0208333,0,4,4,true,false,false
+40001,202002,100,4783,R,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40001,202003,100,7902,R,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40001,202004,100,4911,R,0.621488231,,0.645360538,1,73.71052632,3,0,3,false,true,false
+40002,202001,100,2095,R,,4.739819005,1,2.053506032,128.0208333,0,4,4,true,false,false
+40002,202002,100,442,R,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40002,202003,100,3136,R,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40002,202004,100,2115,R,0.67442602,,0.645360538,1,73.71052632,3,0,3,false,true,false
+40003,202001,100,7863,R,,0.968230513,1,2.053506032,128.0208333,0,4,4,true,false,false
+40003,202002,100,8121,R,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40003,202003,100,2151,R,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40003,202004,100,1377,R,0.640167364,,0.645360538,1,73.71052632,3,0,3,false,true,false
+40004,202001,100,5131,R,,0.521655144,1,2.053506032,128.0208333,0,4,4,true,false,false
+40004,202002,100,9836,R,1.916975248,,0.916179196,1.507228985,120.7395833,4,3,4,false,false,false
+40004,202003,100,29547.319983,FIR,,,3.003997558,1.551291583,115.692982,3,3,3,false,false,false
+40004,202004,100,19068.674333,FIR,,,0.645360538,1,73.71052632,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index aad1ac09..314370ae 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-50001,202010,100,59,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,false,false
-50001,202011,100,59,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
-50001,202012,100,59,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
-50001,202101,100,59,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
-50001,202102,100,59,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,false,true,false
-50002,202010,100,36,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,true,false,false
-50002,202011,100,36,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
-50002,202012,100,36,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
-50002,202101,100,36,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
-50002,202102,100,36,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,false,true,false
-50003,202010,100,76,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,true,false,false
-50003,202011,100,76,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
-50003,202012,100,76,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
-50003,202101,100,76,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
-50003,202102,100,76,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,false,true,false
-50004,202010,100,30,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,true,false,false
-50004,202011,100,30,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
-50004,202012,100,30,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
-50004,202101,100,30,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
-50004,202102,100,30,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+50001,202010,100,6362,R,,0.744790447,1,1.103126475,70.34328358,0,4,4,true,false,false
+50001,202011,100,8542,R,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50001,202012,100,5623,R,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50001,202101,100,7769,R,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50001,202102,100,4687,R,0.603295147,,0.49999873,1,49.9122807,3,0,3,false,true,false
+50002,202010,100,4851,R,,0.545423881,1,1.103126475,70.34328358,0,4,4,true,false,false
+50002,202011,100,8894,R,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50002,202012,100,3372,R,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50002,202101,100,3522,R,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50002,202102,100,2327,R,0.660704145,,0.49999873,1,49.9122807,3,0,3,false,true,false
+50003,202010,100,2238,R,,2.910273082,1,1.103126475,70.34328358,0,4,4,true,false,false
+50003,202011,100,769,R,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50003,202012,100,7722,R,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50003,202101,100,6445,R,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50003,202102,100,1521,R,0.235996897,,0.49999873,1,49.9122807,3,0,3,false,true,false
+50004,202010,100,688,R,,0.21201849,1,1.103126475,70.34328358,0,4,4,true,false,false
+50004,202011,100,3245,R,4.716569767,,2.05906902,1.418769101,106.7164179,4,3,4,false,false,false
+50004,202012,100,11983.807967,FIR,,,3.693007078,0.959774209,97.76023392,3,3,3,false,false,false
+50004,202101,100,13025.437073,FIR,,,1.086919709,2.469481356,103.7192982,3,3,3,false,false,false
+50004,202102,100,6512.701992,FIR,,,0.49999873,1,49.9122807,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
index 5571fa51..50534420 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-60001,202001,100,15,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,false,false
-60001,202002,100,15,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
-60001,202003,100,15,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,false,true,false
-60002,202001,100,71,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,true,false,false
-60002,202002,100,71,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
-60002,202003,100,71,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,false,true,false
-60003,202001,100,26,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,true,false,false
-60003,202002,100,26,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
-60003,202003,100,26,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,false,true,false
-60004,202001,100,3,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,true,false,false
-60004,202002,100,3,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
-60004,202003,100,3,401,R,,,7.391291354,1,100.913043,3,0,4,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,5077,R,,0.648403576,1,7.141605449,117.9107143,0,3,3,true,false,false
+60001,202002,100,7830,R,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60001,202003,100,1046,R,0.133588761,,7.391291354,1,100.913043,3,0,4,false,true,false
+60002,202001,100,1588,R,,1.309150866,1,7.141605449,117.9107143,0,3,3,true,false,false
+60002,202002,100,1213,R,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60002,202003,100,3807,R,3.138499588,,7.391291354,1,100.913043,3,0,4,false,true,false
+60003,202001,100,6541,R,,19.4672619,1,7.141605449,117.9107143,0,3,3,true,false,false
+60003,202002,100,336,R,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60003,202003,100,6351,R,18.90178571,,7.391291354,1,100.913043,3,0,4,false,true,false
+60004,202001,100,7500.429481,BI,,,1,7.141605449,117.9107143,0,3,3,true,false,false
+60004,202002,100,1050.244169,BI,,,0.785823852,2.619062766,83.74107143,3,3,3,false,false,false
+60004,202003,100,401,R,,,7.391291354,1,100.913043,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index acec7fe8..8cd6db26 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-70001,202001,100,39,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,false,false
-70001,202002,100,39,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
-70001,202003,100,39,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
-70001,202004,100,39,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
-70001,202005,100,39,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
-70001,202006,100,39,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
-70001,202007,100,39,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,false,true,false
-70002,202001,100,94,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,true,false,false
-70002,202002,100,94,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
-70002,202003,100,94,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
-70002,202004,100,94,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
-70002,202005,100,94,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
-70002,202006,100,94,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
-70002,202007,100,94,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,false,true,false
-70003,202001,100,42,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,true,false,false
-70003,202002,100,42,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
-70003,202003,100,42,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
-70003,202004,100,42,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
-70003,202005,100,42,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
-70003,202006,100,42,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
-70003,202007,100,42,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,false,true,false
-70004,202001,100,6,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,true,false,false
-70004,202002,100,6,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
-70004,202003,100,6,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
-70004,202004,100,6,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
-70004,202005,100,6,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
-70004,202006,100,6,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
-70004,202007,100,6,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+70001,202001,100,5951,R,,3.280595369,1,47.92201545,107.48,0,3,3,true,false,false
+70001,202002,100,1814,R,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70001,202003,100,734,R,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70001,202004,100,96,R,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70001,202005,100,9086,R,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70001,202006,100,3949,R,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70001,202007,100,49,R,0.012408205,,1.593348776,1,70.24,3,0,3,false,true,false
+70002,202001,100,6705,R,,139.6875,1,47.92201545,107.48,0,3,3,true,false,false
+70002,202002,100,48,R,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70002,202003,100,5361,R,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70002,202004,100,8767,R,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70002,202005,100,9214,R,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70002,202006,100,7467,R,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70002,202007,100,3475,R,0.46538101,,1.593348776,1,70.24,3,0,3,false,true,false
+70003,202001,100,6153,R,,0.797950979,1,47.92201545,107.48,0,3,3,true,false,false
+70003,202002,100,7711,R,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70003,202003,100,5403,R,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70003,202004,100,7445,R,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70003,202005,100,7092,R,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70003,202006,100,2038,R,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70003,202007,100,8768,R,4.302257115,,1.593348776,1,70.24,3,0,3,false,true,false
+70004,202001,100,392488.392089,BI,,,1,47.92201545,107.48,0,3,3,true,false,false
+70004,202002,100,8190.147856,BI,,,0.521730457,1.30250443,54.70285714,3,3,3,false,false,false
+70004,202003,100,6288,R,,,37.59760599,2.994350985,98.26519337,3,3,4,false,false,false
+70004,202004,100,6589.944736,FIR,,,1.048019201,0.670608989,93.18857143,3,3,3,false,false,false
+70004,202005,100,212304.747245,FIR,,,32.21646854,2.338226887,145.0971429,3,3,3,false,false,false
+70004,202006,100,5875,R,,,0.510795988,27.65768328,106.7900552,3,3,4,false,false,false
+70004,202007,100,9360.924061,FIR,,,1.593348776,1,70.24,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
index b1d4610f..23751789 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-80001,202001,100,91,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,false,false
-80001,202002,100,91,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
-80001,202003,100,91,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,false,true,false
-80002,202001,100,85,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,true,false,false
-80002,202002,100,85,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
-80002,202003,100,85,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,false,true,false
-80003,202001,100,41,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,true,false,false
-80003,202002,100,41,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
-80003,202003,100,41,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,false,true,false
-80004,202001,100,70,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,true,false,false
-80004,202002,100,70,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
-80004,202003,100,70,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+80001,202001,100,4042,R,,1.440998217,1,1.856581839,69.14982578,0,4,4,true,false,false
+80001,202002,100,2805,R,0.693963384,4.355590062,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80001,202003,100,644,R,0.229590018,,1.59233398,1,71.90940767,4,0,4,false,true,false
+80002,202001,100,7138,R,,3.623350254,1,1.856581839,69.14982578,0,4,4,true,false,false
+80002,202002,100,1970,R,0.275987672,0.717407138,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80002,202003,100,2746,R,1.393908629,,1.59233398,1,71.90940767,4,0,4,false,true,false
+80003,202001,100,2846,R,,0.801238739,1,1.856581839,69.14982578,0,4,4,true,false,false
+80003,202002,100,3552,R,1.248067463,0.394009983,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80003,202003,100,9015,R,2.538006757,,1.59233398,1,71.90940767,4,0,4,false,true,false
+80004,202001,100,5820,R,,1.560740145,1,1.856581839,69.14982578,0,4,4,true,false,false
+80004,202002,100,3729,R,0.640721649,0.452933317,0.714685042,1.479985125,42.00696864,4,4,4,false,false,false
+80004,202003,100,8233,R,2.207830518,,1.59233398,1,71.90940767,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
index 6f5673fb..c08fe85f 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-90001,202001,100,66,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,false,false
-90001,202002,100,66,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
-90001,202003,100,66,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,false,true,false
-90002,202001,100,27,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,true,false,false
-90002,202002,100,27,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
-90002,202003,100,27,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,false,true,false
-90003,202001,100,14,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,true,false,false
-90003,202002,100,14,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
-90003,202003,100,14,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,false,true,false
-90004,202001,100,73,7728,R,,,1,0.528905137,71.77777778,0,3,4,true,false,false
-90004,202003,100,73,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+90001,202001,100,2417,R,,0.304868819,1,0.528905137,71.77777778,0,3,4,true,false,false
+90001,202002,100,7928,R,3.280099297,1.083208089,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
+90001,202003,100,7319,R,0.923183653,,2.293928258,1,169.3831776,3,0,3,false,true,false
+90002,202001,100,1706,R,,1.151924375,1,0.528905137,71.77777778,0,3,4,true,false,false
+90002,202002,100,1481,R,0.868112544,0.176519666,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
+90002,202003,100,8390,R,5.665091155,,2.293928258,1,169.3831776,3,0,3,false,true,false
+90003,202001,100,1069,R,,0.129922217,1,0.528905137,71.77777778,0,3,4,true,false,false
+90003,202002,100,8228,R,7.696913003,3.407039337,3.948374948,1.555589031,164.8317757,3,3,3,false,false,false
+90003,202003,100,2415,R,0.293509966,,2.293928258,1,169.3831776,3,0,3,false,true,false
+90004,202001,100,7728,R,,,1,0.528905137,71.77777778,0,3,4,true,false,false
+90004,202003,100,12364.971963,C,,,2.293928258,1,169.3831776,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
index 9a716bbe..71762b08 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-100001,202001,100,26,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,false,false
-100001,202002,100,26,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
-100001,202003,100,26,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
-100001,202004,100,26,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,false,true,false
-100002,202001,100,19,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,true,false,false
-100002,202002,100,19,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
-100002,202003,100,19,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
-100002,202004,100,19,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,false,true,false
-100003,202001,100,46,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,true,false,false
-100003,202002,100,46,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
-100003,202003,100,46,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
-100003,202004,100,46,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,false,true,false
-100004,202001,100,86,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,true,false,false
-100004,202002,100,86,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
-100004,202004,100,86,9352,R,,,6.74787815,1,119.1751412,3,0,4,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+100001,202001,100,3074,R,,0.322594186,1,1.691693133,179.3296703,0,3,3,true,false,false
+100001,202002,100,9529,R,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100001,202003,100,615,R,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
+100001,202004,100,3540,R,5.756097561,,6.74787815,1,119.1751412,3,0,4,false,true,false
+100002,202001,100,8084,R,,3.337737407,1,1.691693133,179.3296703,0,3,3,true,false,false
+100002,202002,100,2422,R,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100002,202003,100,3058,R,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
+100002,202004,100,5608,R,1.833878352,,6.74787815,1,119.1751412,3,0,4,false,true,false
+100003,202001,100,5161,R,,1.414747807,1,1.691693133,179.3296703,0,3,3,true,false,false
+100003,202002,100,3648,R,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100003,202003,100,205,R,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,3,3,3,false,false,false
+100003,202004,100,2594,R,12.65365854,,6.74787815,1,119.1751412,3,0,4,false,true,false
+100004,202001,100,15422.351648,C,,,1,1.691693133,179.3296703,0,3,3,true,false,false
+100004,202002,100,21109.671762,FIC,,,1.368771264,11.36048394,171.4175824,3,3,3,false,false,false
+100004,202004,100,9352,R,,,6.74787815,1,119.1751412,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index f4918ae6..82cd73d0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,false,false
-110001,202002,100,89,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
-110001,202003,100,89,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,false,true,false
-110002,202001,100,83,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,true,false,false
-110002,202002,100,83,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
-110002,202003,100,83,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,false,true,false
-110003,202001,100,4,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,true,false,false
-110003,202002,100,4,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
-110003,202003,100,4,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,false,true,false
-110004,202001,100,76,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,true,false,false
-110004,202002,100,76,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
-110004,202003,100,76,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,false,true,false
-110005,202001,200,27,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,true,false,false
-110005,202002,200,27,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
-110005,202003,200,27,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,false,true,false
-110006,202001,200,42,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,true,false,false
-110006,202002,200,42,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
-110006,202003,200,42,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,false,true,false
-110007,202001,200,19,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,true,false,false
-110007,202002,200,19,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
-110007,202003,200,19,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,false,true,false
-110008,202001,200,43,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,true,false,false
-110008,202002,200,43,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
-110008,202003,200,43,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,9244,R,,1.036787797,1,2.656680299,101.710317,0,4,4,true,false,false
+110001,202002,100,8916,R,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110001,202003,100,6194,R,0.694706146,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110002,202001,100,4826,R,,0.817550398,1,2.656680299,101.710317,0,4,4,true,false,false
+110002,202002,100,5903,R,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110002,202003,100,4743,R,0.803489751,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110003,202001,100,7586,R,,7.466535433,1,2.656680299,101.710317,0,4,4,true,false,false
+110003,202002,100,1016,R,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110003,202003,100,1429,R,1.406496063,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110004,202001,100,3975,R,,1.305847569,1,2.656680299,101.710317,0,4,4,true,false,false
+110004,202002,100,3044,R,0.765786164,,0.771850199,1.13167173,74.91666667,4,3,4,false,false,false
+110004,202003,100,2947.294109,FIR,,,0.968230653,1,70.26136364,3,0,3,false,true,false
+110005,202001,200,5217,R,,0.743586089,1,2.290844366,182.25,0,3,3,true,false,false
+110005,202002,200,7016,R,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110005,202003,200,9940,R,1.416761688,,1.259780318,1,182.2366412,4,0,4,false,true,false
+110006,202001,200,5325,R,,0.68736285,1,2.290844366,182.25,0,3,3,true,false,false
+110006,202002,200,7747,R,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110006,202003,200,6685,R,0.862914677,,1.259780318,1,182.2366412,4,0,4,false,true,false
+110007,202001,200,5496,R,,5.441584158,1,2.290844366,182.25,0,3,3,true,false,false
+110007,202002,200,1010,R,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110007,202003,200,1235,R,1.222772277,,1.259780318,1,182.2366412,4,0,4,false,true,false
+110008,202001,200,8964.074003,BI,,,1,2.290844366,182.25,0,3,3,true,false,false
+110008,202002,200,3913,R,,0.650756694,0.994479964,0.833317149,150.2748092,3,4,4,false,false,false
+110008,202003,200,6013,R,1.53667263,,1.259780318,1,182.2366412,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 72834ed2..e284dc81 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-120001,202001,100,50,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,false,false
-120001,202002,100,50,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
-120001,202003,100,50,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
-120001,202004,100,50,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
-120001,202005,100,50,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,false,true,false
-120002,202001,100,78,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,true,false,false
-120002,202002,100,78,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
-120002,202003,100,78,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
-120002,202004,100,78,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
-120002,202005,100,78,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,false,true,false
-120003,202001,100,94,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,true,false,false
-120003,202002,100,94,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
-120003,202003,100,94,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
-120003,202004,100,94,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
-120003,202005,100,94,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,false,true,false
-120004,202001,100,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,true,false,false
-120004,202002,100,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
-120004,202003,100,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
-120004,202004,100,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
-120004,202005,100,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+120001,202001,100,5240,R,,2.104417671,1,1.589860068,77.38738739,0,3,3,true,false,false
+120001,202002,100,2490,R,0.47519084,0.736250739,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120001,202003,100,3382,R,1.358232932,0.75575419,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120001,202004,100,4475,R,1.323181549,3.400455927,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120001,202005,100,1316,R,0.294078212,,5.357333441,1,32.73423423,3,0,3,false,true,false
+120002,202001,100,7410,R,,2.05719045,1,1.589860068,77.38738739,0,3,3,true,false,false
+120002,202002,100,3602,R,0.486099865,0.724456959,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120002,202003,100,4972,R,1.380344253,0.562570717,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120002,202004,100,8838,R,1.777554304,5.757654723,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120002,202005,100,1535,R,0.173681828,,5.357333441,1,32.73423423,3,0,3,false,true,false
+120003,202001,100,4530,R,,0.607972084,1,1.589860068,77.38738739,0,3,3,true,false,false
+120003,202002,100,7451,R,1.644812362,0.98220406,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120003,202003,100,7586,R,1.018118373,26.80565371,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120003,202004,100,283,R,0.037305563,0.064085145,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120003,202005,100,4416,R,15.60424028,,5.357333441,1,32.73423423,3,0,3,false,true,false
+120004,202001,100,7738.738739,C,,,1,1.589860068,77.38738739,0,3,3,true,false,false
+120004,202002,100,6722.650254,FIC,,,0.868701022,0.814303919,61.0045045,3,3,3,false,false,false
+120004,202003,100,8418.316783,FIC,,,1.252231853,9.374659539,71.8018018,3,3,3,false,false,false
+120004,202004,100,8805.675574,FIC,,,1.046013805,3.074065265,61.24324324,3,3,3,false,false,false
+120004,202005,100,47174.940224,FIC,,,5.357333441,1,32.73423423,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index 2d0c0639..fc7b9213 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-130001,202001,100,20,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,false,false
-130001,202002,100,20,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
-130001,202003,100,20,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
-130001,202004,100,20,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
-130001,202005,100,20,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
-130001,202006,100,20,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
-130001,202007,100,20,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,false,true,false
-130002,202001,100,69,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,true,false,false
-130002,202002,100,69,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
-130002,202003,100,69,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
-130002,202004,100,69,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
-130002,202005,100,69,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
-130002,202006,100,69,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
-130002,202007,100,69,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,false,true,false
-130003,202001,100,39,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,true,false,false
-130003,202002,100,39,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
-130003,202003,100,39,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
-130003,202004,100,39,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
-130003,202005,100,39,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
-130003,202006,100,39,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
-130003,202007,100,39,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,false,true,false
-130004,202001,100,37,2571,R,,,1,0.885479533,102.7515152,0,3,4,true,false,false
-130004,202002,100,37,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
-130004,202003,100,37,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
-130004,202005,100,37,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
-130004,202006,100,37,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
-130004,202007,100,37,6621,R,,,0.913312467,1,158.7757576,3,0,4,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+130001,202001,100,6583,R,,1.751263634,1,0.885479533,102.7515152,0,3,4,true,false,false
+130001,202002,100,3759,R,0.571016254,0.455305233,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130001,202003,100,8256,R,2.196328811,1.224380839,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130001,202004,100,6743,R,0.816739341,0.99001615,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
+130001,202005,100,6811,R,1.010084532,0.688257882,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130001,202006,100,9896,R,1.452943767,3.015234613,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130001,202007,100,3282,R,0.331649151,,0.913312467,1,158.7757576,3,0,4,false,true,false
+130002,202001,100,687,R,,0.076443752,1,0.885479533,102.7515152,0,3,4,true,false,false
+130002,202002,100,8987,R,13.08151383,24.22371968,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130002,202003,100,371,R,0.041281852,0.109601182,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130002,202004,100,3385,R,9.123989218,0.512412958,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
+130002,202005,100,6606,R,1.95155096,1.119471276,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130002,202006,100,5901,R,0.893278837,0.600061013,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130002,202007,100,9834,R,1.666497204,,0.913312467,1,158.7757576,3,0,4,false,true,false
+130003,202001,100,7113,R,,0.828731213,1,0.885479533,102.7515152,0,3,4,true,false,false
+130003,202002,100,8583,R,1.206663855,1.673425619,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130003,202003,100,5129,R,0.597576605,2.534090909,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130003,202004,100,2024,R,0.394618834,0.214816387,3.445115798,0.572415165,94.9375,3,3,3,false,false,false
+130003,202005,100,9422,R,4.65513834,1.081745121,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130003,202006,100,8710,R,0.92443218,1.348088531,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130003,202007,100,6461,R,0.741791045,,0.913312467,1,158.7757576,3,0,4,false,true,false
+130004,202001,100,2571,R,,,1,0.885479533,102.7515152,0,3,4,true,false,false
+130004,202002,100,12734.329204,FIR,,,4.953064646,8.784150176,166.6328125,3,3,3,false,false,false
+130004,202003,100,12034.736006,FIR,,,0.945062422,1.289357643,107.46875,3,3,3,false,false,false
+130004,202005,100,10550.615627,BI,,,2.538924611,0.963158093,178.4296875,3,3,3,false,false,false
+130004,202006,100,10954.188835,BI,,,1.090218262,1.654461386,191.4609375,3,3,3,false,false,false
+130004,202007,100,6621,R,,,0.913312467,1,158.7757576,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index 85b42e81..b574a359 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-140001,202001,100,27,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,false,false
-140001,202002,100,27,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
-140001,202003,100,27,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
-140001,202004,100,27,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
-140001,202005,100,27,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
-140001,202006,100,27,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
-140001,202007,100,27,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,false,true,false
-140002,202001,100,83,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,true,false,false
-140002,202002,100,83,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
-140002,202003,100,83,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
-140002,202004,100,83,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
-140002,202005,100,83,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
-140002,202006,100,83,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
-140002,202007,100,83,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,false,true,false
-140003,202001,100,89,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,true,false,false
-140003,202002,100,89,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
-140003,202003,100,89,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
-140003,202004,100,89,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
-140003,202005,100,89,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
-140003,202006,100,89,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
-140003,202007,100,89,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,false,true,false
-140004,202001,100,28,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,true,false,false
-140004,202002,100,28,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
-140004,202003,100,28,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
-140004,202005,100,28,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
-140004,202006,100,28,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
-140004,202007,100,28,7243,R,,,0.520242185,1,91.63876652,3,0,4,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+140001,202001,100,3582,R,,0.790205162,1,0.534118956,47.13567839,0,3,3,true,false,false
+140001,202002,100,4533,R,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140001,202003,100,4471,R,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140001,202004,100,3040,R,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
+140001,202005,100,8519,R,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140001,202006,100,8690,R,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140001,202007,100,9979,R,1.148331415,,0.520242185,1,91.63876652,3,0,4,false,true,false
+140002,202001,100,5359,R,,0.755746721,1,0.534118956,47.13567839,0,3,3,true,false,false
+140002,202002,100,7091,R,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140002,202003,100,7098,R,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140002,202004,100,7408,R,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
+140002,202005,100,1937,R,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140002,202006,100,6711,R,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140002,202007,100,1052,R,0.156757562,,0.520242185,1,91.63876652,3,0,4,false,true,false
+140003,202001,100,439,R,,0.056404985,1,0.534118956,47.13567839,0,3,3,true,false,false
+140003,202002,100,7783,R,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140003,202003,100,897,R,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140003,202004,100,8477,R,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,3,3,3,false,false,false
+140003,202005,100,2207,R,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140003,202006,100,9889,R,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140003,202007,100,2528,R,0.255637577,,0.520242185,1,91.63876652,3,0,4,false,true,false
+140004,202001,100,1319.798995,C,,,1,0.534118956,47.13567839,0,3,3,true,false,false
+140004,202002,100,8938.390671,FIC,,,6.772539383,3.563193687,97.52261307,3,3,3,false,false,false
+140004,202003,100,6264.503515,FIC,,,0.700853626,0.84489759,62.64321608,3,3,3,false,false,false
+140004,202005,100,13403.572478,BI,,,1.108042751,0.497376695,63.63316583,3,3,3,false,false,false
+140004,202006,100,26948.533427,BI,,,2.988483968,3.720631427,127.0854271,3,3,3,false,false,false
+140004,202007,100,7243,R,,,0.520242185,1,91.63876652,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index 6db51ee1..f35c9a06 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-150001,202001,100,15,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,false,false
-150001,202002,100,15,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
-150001,202003,100,15,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
-150001,202004,100,15,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
-150001,202005,100,15,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
-150001,202006,100,15,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
-150001,202007,100,15,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,false,true,false
-150002,202001,100,5,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,true,false,false
-150002,202002,100,5,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
-150002,202003,100,5,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
-150002,202004,100,5,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
-150002,202005,100,5,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
-150002,202006,100,5,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
-150002,202007,100,5,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,false,true,false
-150003,202001,100,79,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,true,false,false
-150003,202002,100,79,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
-150003,202003,100,79,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
-150003,202004,100,79,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
-150003,202005,100,79,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
-150003,202006,100,79,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
-150003,202007,100,79,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,false,true,false
-150004,202001,100,69,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,true,false,false
-150004,202002,100,69,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
-150004,202003,100,69,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
-150004,202005,100,69,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
-150004,202006,100,69,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
-150004,202007,100,69,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+150001,202001,100,5891,R,,1.285963763,1,0.917399451,181.0909091,0,3,3,true,false,false
+150001,202002,100,4581,R,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150001,202003,100,4741,R,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150001,202004,100,8092,R,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
+150001,202005,100,2727,R,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150001,202006,100,2363,R,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150001,202007,100,9549,R,4.041049513,,2.111448113,1,152.5353535,3,0,3,false,true,false
+150002,202001,100,8611,R,,0.917723543,1,0.917399451,181.0909091,0,3,3,true,false,false
+150002,202002,100,9383,R,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150002,202003,100,1064,R,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150002,202004,100,7419,R,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
+150002,202005,100,9967,R,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150002,202006,100,1393,R,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150002,202007,100,2593,R,1.861450108,,2.111448113,1,152.5353535,3,0,3,false,true,false
+150003,202001,100,3426,R,,0.548511047,1,0.917399451,181.0909091,0,3,3,true,false,false
+150003,202002,100,6246,R,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150003,202003,100,8402,R,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150003,202004,100,3891,R,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3,3,3,false,false,false
+150003,202005,100,5463,R,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150003,202006,100,6852,R,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150003,202007,100,2959,R,0.431844717,,2.111448113,1,152.5353535,3,0,3,false,true,false
+150004,202001,100,13547.818191,BI,,,1,0.917399451,181.0909091,0,3,3,true,false,false
+150004,202002,100,14767.632765,BI,,,1.230132332,3.509418433,204.1414141,3,3,3,false,false,false
+150004,202003,100,4208,R,,,0.831168119,0.962881641,109.6130952,3,3,4,false,false,false
+150004,202005,100,2818,R,,,1.028150423,3.035462652,124.85119,3,3,4,false,false,false
+150004,202006,100,2123.39785,FIR,,,0.753512367,1.033441075,107.1515152,3,3,3,false,false,false
+150004,202007,100,4483.444383,FIR,,,2.111448113,1,152.5353535,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index 898de9e1..117d08b4 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,false,true,false
-160004,202001,100,33,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,true,false,false
-160004,202002,100,33,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
-160004,202003,100,33,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
-160004,202005,100,33,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
-160004,202006,100,33,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
-160004,202007,100,33,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,2086,R,,0.502166586,1,0.352085676,29.78238342,0,3,3,true,false,false
+160001,202002,100,4154,R,1.991371045,2.580124224,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160001,202003,100,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160001,202004,100,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
+160001,202005,100,6317,R,1.754722222,1.107662634,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160001,202006,100,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160001,202007,100,1666,R,0.292126951,,1.523164371,1,71.77202073,3,0,3,false,true,false
+160002,202001,100,430,R,,0.044472024,1,0.352085676,29.78238342,0,3,3,true,false,false
+160002,202002,100,9669,R,22.48604651,5.531464531,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160002,202003,100,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160002,202004,100,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
+160002,202005,100,7871,R,3.307142857,0.893822394,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160002,202006,100,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160002,202007,100,2678,R,0.304110834,,1.523164371,1,71.77202073,3,0,3,false,true,false
+160003,202001,100,3232,R,,0.509618417,1,0.352085676,29.78238342,0,3,3,true,false,false
+160003,202002,100,6342,R,1.962252475,2.12248996,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160003,202003,100,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160003,202004,100,860,R,0.287817938,0.093204725,1.295132949,0.321823769,35.44041451,3,3,3,false,false,false
+160003,202005,100,9227,R,10.72906977,3.855829503,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160003,202006,100,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160003,202007,100,9508,R,3.973255328,,1.523164371,1,71.77202073,3,0,3,false,true,false
+160004,202001,100,1356.031558,BI,,,1,0.352085676,29.78238342,0,3,3,true,false,false
+160004,202002,100,3851.424956,BI,,,8.813223344,3.411359571,104.4818653,3,3,3,false,false,false
+160004,202003,100,1129,R,,,0.346502312,1.552031536,33.07522124,3,3,4,false,false,false
+160004,202005,100,4003.601036,C,,,5.263644949,1.952438177,121.3212435,3,3,3,false,false,false
+160004,202006,100,3043.991285,FIC,,,0.760313342,2.321042298,87.57512953,3,3,3,false,false,false
+160004,202007,100,4636.49907,FIC,,,1.523164371,1,71.77202073,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
index c9376319..fade1dd3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-170001,202001,100,69,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,false,false
-170001,202002,100,69,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
-170001,202003,100,69,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
-170001,202004,100,69,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,false,true,false
-170002,202001,100,62,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,true,false,false
-170002,202002,100,62,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
-170002,202003,100,62,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
-170002,202004,100,62,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,false,true,false
-170003,202001,100,81,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,true,false,false
-170003,202002,100,81,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
-170003,202003,100,81,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
-170003,202004,100,81,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,false,true,false
-170004,202002,100,9,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
-170004,202003,100,9,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+170001,202001,100,6480,R,,0.653753027,1,0.341906136,41.93396226,0,3,3,true,false,false
+170001,202002,100,9912,R,1.52962963,16.43781095,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170001,202003,100,603,R,0.060835351,0.084691011,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+170001,202004,100,7120,R,11.80762852,,4.51938598,1,109.0330189,3,0,3,false,true,false
+170002,202001,100,449,R,,0.121614301,1,0.341906136,41.93396226,0,3,3,true,false,false
+170002,202002,100,3692,R,8.222717149,0.439471491,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170002,202003,100,8401,R,2.275460455,1.245515196,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+170002,202004,100,6745,R,0.802880609,,4.51938598,1,109.0330189,3,0,3,false,true,false
+170003,202001,100,1961,R,,0.250351079,1,0.341906136,41.93396226,0,3,3,true,false,false
+170003,202002,100,7833,R,3.994390617,0.802479254,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170003,202003,100,9761,R,1.246138134,1.055243243,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
+170003,202004,100,9250,R,0.947648806,,4.51938598,1,109.0330189,3,0,3,false,true,false
+170004,202002,100,3913,R,,,4.582245799,5.893253897,114.7058824,3,3,4,false,false,false
+170004,202003,100,4672.688002,FIR,,,1.194144647,0.795149817,88.51415094,3,3,3,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
index 4d2792e5..e67a7d49 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-180001,202001,100,91,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,false,false
-180001,202002,100,91,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
-180001,202003,100,91,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
-180001,202004,100,91,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,false,true,false
-180002,202001,100,26,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,true,false,false
-180002,202002,100,26,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
-180002,202003,100,26,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
-180002,202004,100,26,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,false,true,false
-180003,202001,100,19,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,true,false,false
-180003,202002,100,19,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
-180003,202003,100,19,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
-180003,202004,100,19,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,false,true,false
-180004,202002,100,26,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
-180004,202003,100,26,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+180001,202001,100,9188,R,,1.340726689,1,0.769734514,123.4632353,0,3,3,true,false,false
+180001,202002,100,6853,R,0.745864171,2.834160463,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180001,202003,100,2418,R,0.352838173,0.260251857,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+180001,202004,100,9291,R,3.842431762,,2.151700748,1,175.5441176,3,0,3,false,true,false
+180002,202001,100,3829,R,,0.504612546,1,0.769734514,123.4632353,0,3,3,true,false,false
+180002,202002,100,7588,R,1.981718464,1.034492161,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180002,202003,100,7335,R,0.966657881,0.871657754,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+180002,202004,100,8415,R,1.147239264,,2.151700748,1,175.5441176,3,0,3,false,true,false
+180003,202001,100,3774,R,,0.463864307,1,0.769734514,123.4632353,0,3,3,true,false,false
+180003,202002,100,8136,R,2.155802862,1.933000713,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180003,202003,100,4209,R,0.517330383,0.682392996,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
+180003,202004,100,6168,R,1.465431219,,2.151700748,1,175.5441176,3,0,3,false,true,false
+180004,202002,100,11794.761234,BI,,,1.627795166,1.933884446,166.0073529,3,3,3,false,false,false
+180004,202003,100,6099,R,,,0.612275479,0.604767536,123.8333333,3,3,4,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index 3ca20b6b..61be6656 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,9261,R,1,0.9214,50.3694,0,0,0,false,false,false
-190001,202002,100,95,4996,R,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190001,202003,100,95,1480,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190001,202004,100,95,4350,R,1.113,1,110.5473,0,0,0,false,false,false
-190002,202001,100,17,2433,R,1,0.9214,50.3694,0,0,0,false,false,false
-190002,202002,100,17,4324,R,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190002,202003,100,17,6598,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190002,202004,100,17,700,R,1.113,1,110.5473,0,0,0,false,false,false
-190003,202001,100,64,7888,R,1,0.9214,50.3694,0,0,0,false,false,false
-190003,202002,100,64,4218,R,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190003,202003,100,64,7591,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190003,202004,100,64,4077,R,1.113,1,110.5473,0,0,0,false,false,false
-190004,202001,100,51,2247,R,1,0.9214,50.3694,0,0,0,false,false,false
-190004,202002,100,51,1914.6687,FIR,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190004,202003,100,51,1854.356636,FIR,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190004,202004,100,51,8608,R,1.113,1,110.5473,0,0,0,false,false,false
-190005,202001,100,34,6271.13538,BI,1,0.9214,50.3694,0,0,0,false,false,false
-190005,202002,100,34,6806.0944,BI,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190005,202003,100,34,4456,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190005,202004,100,34,5134,R,1.113,1,110.5473,0,0,0,false,false,false
-190006,202001,100,8,402.9552,C,1,0.9214,50.3694,0,0,0,true,false,false
-190006,202002,100,8,343.3581259,FIC,0.8521,1.5274,121.4187,0,0,0,false,false,false
-190006,202003,100,8,332.542345,FIC,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190006,202004,100,8,370.1196299,FIC,1.113,1,110.5473,0,0,0,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,9261,R,1,0.9214,50.3694,0,0,0,false,false,false
+190001,202002,100,4996,R,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190001,202003,100,1480,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190001,202004,100,4350,R,1.113,1,110.5473,0,0,0,false,false,false
+190002,202001,100,2433,R,1,0.9214,50.3694,0,0,0,false,false,false
+190002,202002,100,4324,R,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190002,202003,100,6598,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190002,202004,100,700,R,1.113,1,110.5473,0,0,0,false,false,false
+190003,202001,100,7888,R,1,0.9214,50.3694,0,0,0,false,false,false
+190003,202002,100,4218,R,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190003,202003,100,7591,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190003,202004,100,4077,R,1.113,1,110.5473,0,0,0,false,false,false
+190004,202001,100,2247,R,1,0.9214,50.3694,0,0,0,false,false,false
+190004,202002,100,1914.6687,FIR,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190004,202003,100,1854.356636,FIR,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190004,202004,100,8608,R,1.113,1,110.5473,0,0,0,false,false,false
+190005,202001,100,6271.13538,BI,1,0.9214,50.3694,0,0,0,false,false,false
+190005,202002,100,6806.0944,BI,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190005,202003,100,4456,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190005,202004,100,5134,R,1.113,1,110.5473,0,0,0,false,false,false
+190006,202001,100,402.9552,C,1,0.9214,50.3694,0,0,0,true,false,false
+190006,202002,100,343.3581259,FIC,0.8521,1.5274,121.4187,0,0,0,false,false,false
+190006,202003,100,332.542345,FIC,0.9685,1.8795,89.3761,0,0,0,false,false,false
+190006,202004,100,370.1196299,FIC,1.113,1,110.5473,0,0,0,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
index f4125f92..8c1e5e0b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-200001,202001,100,56,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,false,false
-200001,202002,100,56,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200001,202003,100,56,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200001,202004,100,56,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200002,202001,100,75,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,true,false,false
-200002,202002,100,75,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200002,202003,100,75,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200002,202004,100,75,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200003,202001,100,10,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,true,false,false
-200003,202002,100,10,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200003,202003,100,10,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200003,202004,100,10,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200004,202001,100,86,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,true,false,false
-200004,202002,100,86,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200004,202003,100,86,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200004,202004,100,86,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200005,202001,100,6,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,true,false,false
-200005,202002,100,6,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200005,202003,100,6,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200005,202004,100,6,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200006,202001,100,41,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,true,false,false
-200006,202002,100,41,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
-200006,202003,100,41,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
-200006,202004,100,41,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,false,true,false
-200007,202001,200,4,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,true,false,false
-200007,202002,200,4,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200007,202003,200,4,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
-200007,202004,200,4,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,false,true,false
-200008,202001,200,4,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,true,false,false
-200008,202002,200,4,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200008,202003,200,4,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
-200008,202004,200,4,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,false,true,false
-200009,202001,200,45,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,true,false,false
-200009,202002,200,45,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200009,202003,200,45,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
-200009,202004,200,45,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,false,true,false
-200010,202001,200,85,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,true,false,false
-200010,202002,200,85,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200010,202003,200,85,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
-200010,202004,200,85,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,false,true,false
-200011,202001,200,79,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,true,false,false
-200011,202002,200,79,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200011,202004,200,79,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,false,true,false
-200012,202001,200,87,5495,R,,,1,2.163456777,132.3214286,0,3,4,true,false,false
-200012,202002,200,87,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
-200012,202003,200,87,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
-200012,202004,200,87,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+200001,202001,100,7788,R,,1.262441238,1,0.597514698,71.63436123,0,4,4,true,false,false
+200001,202002,100,6169,R,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200001,202003,100,6156,R,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200001,202004,100,1577,R,0.25617284,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200002,202001,100,6533,R,,0.806244601,1,0.597514698,71.63436123,0,4,4,true,false,false
+200002,202002,100,8103,R,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200002,202003,100,5860,R,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200002,202004,100,2575,R,0.439419795,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200003,202001,100,56,R,,0.011249498,1,0.597514698,71.63436123,0,4,4,true,false,false
+200003,202002,100,4978,R,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200003,202003,100,8777,R,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200003,202004,100,906,R,0.103224336,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200004,202001,100,1884,R,,0.310123457,1,0.597514698,71.63436123,0,4,4,true,false,false
+200004,202002,100,6075,R,3.224522293,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200004,202003,100,7055.585041,FIR,,,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200004,202004,100,1947.413826,FIR,,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200005,202001,100,429.8061674,C,,,1,0.597514698,71.63436123,0,4,4,true,false,false
+200005,202002,100,10116.542659,FIC,,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200005,202003,100,11749.485934,FIC,,,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200005,202004,100,3242.978608,FIC,,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200006,202001,100,5222.283092,BI,,,1,0.597514698,71.63436123,0,4,4,true,false,false
+200006,202002,100,8740.007744,BI,,,23.53745347,0.984013482,111.5638767,4,3,4,false,false,false
+200006,202003,100,8882,R,,3.276281815,1.161413175,4.785815599,163.0494505,3,4,4,false,false,false
+200006,202004,100,2711,R,0.305224049,,0.276010255,1,42.68681319,4,0,4,false,true,false
+200007,202001,200,2439,R,,0.252093023,1,2.163456777,132.3214286,0,3,4,true,false,false
+200007,202002,200,9675,R,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200007,202003,200,7003,R,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200007,202004,200,595,R,0.084963587,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200008,202001,200,1849,R,,0.287290242,1,2.163456777,132.3214286,0,3,4,true,false,false
+200008,202002,200,6436,R,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200008,202003,200,9709,R,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200008,202004,200,2727,R,0.280873416,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200009,202001,200,8742,R,,5.950987066,1,2.163456777,132.3214286,0,3,4,true,false,false
+200009,202002,200,1469,R,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200009,202003,200,8602,R,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200009,202004,200,1945,R,0.226110207,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200010,202001,200,14038.671027,BI,,,1,2.163456777,132.3214286,0,3,4,true,false,false
+200010,202002,200,6489,R,,3.613028953,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200010,202003,200,1796,R,0.276776083,,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200010,202004,200,354.3790633,FIR,,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200011,202001,200,4166.817753,BI,,,1,2.163456777,132.3214286,0,3,4,true,false,false
+200011,202002,200,1926,R,,,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200011,202004,200,7850.811321,C,,,0.197315737,1,99.37735849,3,0,3,false,true,false
+200012,202001,200,5495,R,,,1,2.163456777,132.3214286,0,3,4,true,false,false
+200012,202002,200,13949.294611,FIR,,,2.53854315,1.457061014,119.7926267,3,4,5,false,false,false
+200012,202003,200,29170.870177,FIR,,,2.091207548,6.584230902,196.4492754,4,3,4,false,false,false
+200012,202004,200,5755.871742,FIR,,,0.197315737,1,99.37735849,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
index bb7a557d..50245b99 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-210001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
-210001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-210001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
-210002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
-210002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-210002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
-210003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
-210003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-210003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,false,true,false
-210004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
-210004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-210004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,false,true,false
-210005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
-210005,202002,2,18,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-210005,202003,2,18,900.6274342,FIC,,,1.174002242,1,50,2,0,2,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+210001,202001,1,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
+210001,202002,1,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+210001,202003,1,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+210002,202001,1,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
+210002,202002,1,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+210002,202003,1,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+210003,202001,2,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+210003,202002,2,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+210003,202003,2,314,R,1.176029963,,1.174002242,1,50,2,0,2,false,true,false
+210004,202001,2,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+210004,202002,2,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+210004,202003,2,736,R,1.171974522,,1.174002242,1,50,2,0,2,false,true,false
+210005,202001,1,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+210005,202002,2,767.1428572,C,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+210005,202003,2,900.6274342,FIC,,,1.174002242,1,50,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
index 3e9171b7..d6dd54e7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-220001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,false,false
-220001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-220001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
-220002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,false,false
-220002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-220002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
-220003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
-220003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-220003,202003,2,12,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,false,true,false
-220004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
-220004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-220004,202003,2,9,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,false,true,false
-220005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,true,false,false
-220005,202002,2,18,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-220005,202003,2,18,100,R,,,1.174002242,1,29.48717949,2,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+220001,202001,1,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,false,false
+220001,202002,1,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+220001,202003,1,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+220002,202001,1,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,false,false
+220002,202002,1,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+220002,202003,1,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+220003,202001,2,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+220003,202002,2,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+220003,202003,2,314,R,1.176029963,,1.174002242,1,29.48717949,2,0,3,false,true,false
+220004,202001,2,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+220004,202002,2,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+220004,202003,2,736,R,1.171974522,,1.174002242,1,29.48717949,2,0,3,false,true,false
+220005,202001,1,278.4,C,,,1,1.087985595,15.46666667,0,2,2,true,false,false
+220005,202002,2,85.17896705,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+220005,202003,2,100,R,,,1.174002242,1,29.48717949,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
index 1e9d4baa..36931eb2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-230001,202001,1,10,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,false,false
-230001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-230001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
-230002,202001,1,50,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,false,false
-230002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-230002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
-230003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
-230003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-230003,202003,2,12,314,R,1.176029963,,1.174002242,1,50,2,0,2,false,true,false
-230004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
-230004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-230004,202003,2,9,736,R,1.171974522,,1.174002242,1,50,2,0,2,false,true,false
-230005,202001,1,18,278.4,C,,,1,1.087985595,15.46666667,0,2,2,true,false,false
-230005,202002,2,18,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-230005,202003,2,18,900.627434,FIC,,,1.174002242,1,50,2,0,2,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+230001,202001,1,547,R,,1.511049724,1,1.087985595,15.46666667,0,2,2,true,false,false
+230001,202002,1,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+230001,202003,1,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+230002,202001,1,381,R,,0.664921466,1,1.087985595,15.46666667,0,2,2,true,false,false
+230002,202002,1,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+230002,202003,1,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+230003,202001,2,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+230003,202002,2,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+230003,202003,2,314,R,1.176029963,,1.174002242,1,50,2,0,2,false,true,false
+230004,202001,2,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+230004,202002,2,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+230004,202003,2,736,R,1.171974522,,1.174002242,1,50,2,0,2,false,true,false
+230005,202001,1,278.4,C,,,1,1.087985595,15.46666667,0,2,2,true,false,false
+230005,202002,2,767.1428571,C,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+230005,202003,2,900.627434,FIC,,,1.174002242,1,50,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 27285e21..8ce1cbb1 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-240001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
-240001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-240001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
-240002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
-240002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-240002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
-240003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
-240003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-240003,202003,2,12,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,false,true,false
-240004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
-240004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-240004,202003,2,9,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,false,true,false
-240005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
-240005,202002,2,18,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
-240005,202003,2,18,150,R,,,1.174002242,1,30.76923077,2,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+240001,202001,1,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
+240001,202002,1,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+240001,202003,1,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+240002,202001,1,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
+240002,202002,1,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+240002,202003,1,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+240003,202001,2,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+240003,202002,2,267,R,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+240003,202003,2,314,R,1.176029963,,1.174002242,1,30.76923077,2,0,3,false,true,false
+240004,202001,2,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+240004,202002,2,628,R,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+240004,202003,2,736,R,1.171974522,,1.174002242,1,30.76923077,2,0,3,false,true,false
+240005,202001,1,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+240005,202002,2,127.7684506,BI,,,0.70468356,0.85178967,42.61904762,2,2,2,false,false,false
+240005,202003,2,150,R,,,1.174002242,1,30.76923077,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 54f49f94..370b6811 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-250001,202001,1,10,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
-250001,202002,1,10,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-250001,202003,1,10,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
-250002,202001,1,50,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
-250002,202002,1,50,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-250002,202003,1,50,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
-250003,202001,2,12,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
-250003,202002,2,12,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
-250003,202003,2,12,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,false,true,false
-250004,202001,2,9,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
-250004,202002,2,9,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
-250004,202003,2,9,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,false,true,false
-250005,202001,1,18,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
-250005,202002,2,18,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
-250005,202003,2,18,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,false,true,false
-250006,202001,1,22,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,true,false,false
-250006,202002,1,22,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
-250006,202003,1,22,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,false,true,false
-250007,202001,2,52,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,true,false,false
-250007,202002,2,52,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
-250007,202003,2,52,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+250001,202001,1,547,R,,1.511049724,1,1.087985595,13.17948718,0,2,3,true,false,false
+250001,202002,1,362,R,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+250001,202003,1,895,R,2.472375691,,1.42292432,1,18.48333333,2,0,2,false,true,false
+250002,202001,1,381,R,,0.664921466,1,1.087985595,13.17948718,0,2,3,true,false,false
+250002,202002,1,573,R,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+250002,202003,1,214,R,0.373472949,,1.42292432,1,18.48333333,2,0,2,false,true,false
+250003,202001,2,961,R,,3.599250936,1,2.241504449,72.19047619,0,2,2,true,false,false
+250003,202002,2,267,R,0.277835588,0.850318471,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250003,202003,2,314,R,1.176029963,,1.040732678,1,33.07692308,3,0,3,false,true,false
+250004,202001,2,555,R,,0.883757962,1,2.241504449,72.19047619,0,2,2,true,false,false
+250004,202002,2,628,R,1.131531532,0.85326087,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250004,202003,2,736,R,1.171974522,,1.040732678,1,33.07692308,3,0,3,false,true,false
+250005,202001,1,100,R,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+250005,202002,2,310,R,,1.291666667,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250005,202003,2,240,R,0.774193548,,1.040732678,1,33.07692308,3,0,3,false,true,false
+250006,202001,1,289.9487179,C,,,1,1.087985595,13.17948718,0,2,3,true,false,false
+250006,202002,1,313.9751153,FIC,,,1.082864299,1.541019684,15.58333333,2,2,2,false,false,false
+250006,202003,1,446.7628274,FIC,,,1.42292432,1,18.48333333,2,0,2,false,true,false
+250007,202001,2,3753.904762,C,,,1,2.241504449,72.19047619,0,2,2,true,false,false
+250007,202002,2,2645.314971,FIC,,,0.70468356,0.998415336,30.8974359,2,3,3,false,false,false
+250007,202003,2,2753.065733,FIC,,,1.040732678,1,33.07692308,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 9bc654b3..a266bde6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-140001,202001,100,27,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,true,,true,true,false,false
-140001,202002,100,27,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,true,true,true,false,false,false
-140001,202003,100,27,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,true,true,true,false,false,false
-140001,202004,100,27,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,true,true,true,false,false,false
-140001,202005,100,27,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,true,true,true,false,false,false
-140001,202006,100,27,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,true,true,true,false,false,false
-140001,202007,100,27,1.148331415,,0.520242185,1,91.63876652,9979,R,3,0,4,true,true,,false,true,false
-140002,202001,100,83,,0.755746721,1,0.534118956,47.13567839,5359,R,0,3,3,true,,true,true,false,false
-140002,202002,100,83,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,true,true,true,false,false,false
-140002,202003,100,83,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,true,true,true,false,false,false
-140002,202004,100,83,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,true,true,true,false,false,false
-140002,202005,100,83,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,true,true,true,false,false,false
-140002,202006,100,83,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,true,true,true,false,false,false
-140002,202007,100,83,0.156757562,,0.520242185,1,91.63876652,1052,R,3,0,4,true,true,,false,true,false
-140003,202001,100,89,,0.056404985,1,0.534118956,47.13567839,439,R,0,3,3,true,,true,true,false,false
-140003,202002,100,89,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,true,true,true,false,false,false
-140003,202003,100,89,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,true,true,true,false,false,false
-140003,202004,100,89,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,true,true,true,false,false,false
-140003,202005,100,89,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,true,true,true,false,false,false
-140003,202006,100,89,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,true,true,true,false,false,false
-140003,202007,100,89,0.255637577,,0.520242185,1,91.63876652,2528,R,3,0,4,true,true,,false,true,false
-140004,202001,100,28,,,1,0.534118956,47.13567839,1319.798995,C,0,3,3,,,,true,false,false
-140004,202002,100,28,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,,,,false,false,false
-140004,202003,100,28,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,,,,false,false,false
-140004,202005,100,28,,,1.108042751,0.497376695,63.63316583,13403.572478,BI,3,3,3,,,,false,false,false
-140004,202006,100,28,,,2.988483968,3.720631427,127.0854271,26948.533427,BI,3,3,3,,,,false,false,false
-140004,202007,100,28,,,0.520242185,1,91.63876652,7243,R,3,0,4,true,,,false,true,false
-140005,202001,100,85,,,1,0.534118956,47.13567839,150000,R,0,3,3,false,,false,true,false,false
-140005,202002,100,85,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,false,false,false,false,false,false
-140005,202003,100,85,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,false,false,false,false,false,false
-140005,202004,100,85,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,false,false,false,false,false,false
-140005,202005,100,85,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,false,false,false,false,false,false
-140005,202006,100,85,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,false,false,false,false,false,false
-140005,202007,100,85,,,0.520242185,1,91.63876652,160000,R,3,0,4,false,false,,false,true,false
-140006,202001,100,71,,,1,0.534118956,47.13567839,3346.633166,C,0,3,3,,,,true,false,false
-140006,202002,100,71,,,6.772539383,3.563193687,97.52261307,22665.204916,FIC,3,3,3,,,,false,false,false
-140006,202003,100,71,,,0.700853626,0.84489759,62.64321608,15884.991057,FIC,3,3,3,,,,false,false,false
-140006,202004,100,71,,,3.724667279,2.674093602,95.10050251,59166.306423,FIC,3,3,3,,,,false,false,false
-140006,202005,100,71,,,1.108042751,0.497376695,63.63316583,65558.796938,FIC,3,3,3,,,,false,false,false
-140006,202006,100,71,,,2.988483968,3.720631427,127.0854271,195921.413606,FIC,3,3,3,,,,false,false,false
-140006,202007,100,71,,,0.520242185,1,91.63876652,101926.584286,FIC,3,0,4,,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+140001,202001,100,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,true,,true,true,false,false
+140001,202002,100,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,true,true,true,false,false,false
+140001,202003,100,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,true,true,true,false,false,false
+140001,202004,100,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,true,true,true,false,false,false
+140001,202005,100,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,true,true,true,false,false,false
+140001,202006,100,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,true,true,true,false,false,false
+140001,202007,100,1.148331415,,0.520242185,1,91.63876652,9979,R,3,0,4,true,true,,false,true,false
+140002,202001,100,,0.755746721,1,0.534118956,47.13567839,5359,R,0,3,3,true,,true,true,false,false
+140002,202002,100,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,true,true,true,false,false,false
+140002,202003,100,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,true,true,true,false,false,false
+140002,202004,100,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,true,true,true,false,false,false
+140002,202005,100,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,true,true,true,false,false,false
+140002,202006,100,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,true,true,true,false,false,false
+140002,202007,100,0.156757562,,0.520242185,1,91.63876652,1052,R,3,0,4,true,true,,false,true,false
+140003,202001,100,,0.056404985,1,0.534118956,47.13567839,439,R,0,3,3,true,,true,true,false,false
+140003,202002,100,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,true,true,true,false,false,false
+140003,202003,100,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,true,true,true,false,false,false
+140003,202004,100,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,true,true,true,false,false,false
+140003,202005,100,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,true,true,true,false,false,false
+140003,202006,100,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,true,true,true,false,false,false
+140003,202007,100,0.255637577,,0.520242185,1,91.63876652,2528,R,3,0,4,true,true,,false,true,false
+140004,202001,100,,,1,0.534118956,47.13567839,1319.798995,C,0,3,3,,,,true,false,false
+140004,202002,100,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,,,,false,false,false
+140004,202003,100,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,,,,false,false,false
+140004,202005,100,,,1.108042751,0.497376695,63.63316583,13403.572478,BI,3,3,3,,,,false,false,false
+140004,202006,100,,,2.988483968,3.720631427,127.0854271,26948.533427,BI,3,3,3,,,,false,false,false
+140004,202007,100,,,0.520242185,1,91.63876652,7243,R,3,0,4,true,,,false,true,false
+140005,202001,100,,,1,0.534118956,47.13567839,150000,R,0,3,3,false,,false,true,false,false
+140005,202002,100,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,false,false,false,false,false,false
+140005,202003,100,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,false,false,false,false,false,false
+140005,202004,100,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,false,false,false,false,false,false
+140005,202005,100,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,false,false,false,false,false,false
+140005,202006,100,,,2.988483968,3.720631427,127.0854271,110000,R,3,3,3,false,false,false,false,false,false
+140005,202007,100,,,0.520242185,1,91.63876652,160000,R,3,0,4,false,false,,false,true,false
+140006,202001,100,,,1,0.534118956,47.13567839,3346.633166,C,0,3,3,,,,true,false,false
+140006,202002,100,,,6.772539383,3.563193687,97.52261307,22665.204916,FIC,3,3,3,,,,false,false,false
+140006,202003,100,,,0.700853626,0.84489759,62.64321608,15884.991057,FIC,3,3,3,,,,false,false,false
+140006,202004,100,,,3.724667279,2.674093602,95.10050251,59166.306423,FIC,3,3,3,,,,false,false,false
+140006,202005,100,,,1.108042751,0.497376695,63.63316583,65558.796938,FIC,3,3,3,,,,false,false,false
+140006,202006,100,,,2.988483968,3.720631427,127.0854271,195921.413606,FIC,3,3,3,,,,false,false,false
+140006,202007,100,,,0.520242185,1,91.63876652,101926.584286,FIC,3,0,4,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index e0dbfc45..b3eafd05 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-150001,202001,100,15,,1.285963763,1,0.917399451,181.0909091,5891,R,0,3,3,true,,true,true,false,false
-150001,202002,100,15,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,true,true,true,false,false,false
-150001,202003,100,15,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,true,true,true,false,false,false
-150001,202004,100,15,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,true,true,true,false,false,false
-150001,202005,100,15,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,2727,R,3,3,4,true,true,true,false,false,false
-150001,202006,100,15,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,true,true,true,false,false,false
-150001,202007,100,15,4.041049513,,2.111448113,1,152.5353535,9549,R,3,0,3,true,true,,false,true,false
-150002,202001,100,5,,0.917723543,1,0.917399451,181.0909091,8611,R,0,3,3,true,,true,true,false,false
-150002,202002,100,5,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,true,true,true,false,false,false
-150002,202003,100,5,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,true,true,true,false,false,false
-150002,202004,100,5,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,true,true,true,false,false,false
-150002,202005,100,5,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,9967,R,3,3,4,true,true,true,false,false,false
-150002,202006,100,5,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,true,true,true,false,false,false
-150002,202007,100,5,1.861450108,,2.111448113,1,152.5353535,2593,R,3,0,3,true,true,,false,true,false
-150003,202001,100,79,,0.548511047,1,0.917399451,181.0909091,3426,R,0,3,3,true,,true,true,false,false
-150003,202002,100,79,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,true,true,true,false,false,false
-150003,202003,100,79,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,true,true,true,false,false,false
-150003,202004,100,79,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,true,true,true,false,false,false
-150003,202005,100,79,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,5463,R,3,3,4,true,true,true,false,false,false
-150003,202006,100,79,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,true,true,true,false,false,false
-150003,202007,100,79,0.431844717,,2.111448113,1,152.5353535,2959,R,3,0,3,true,true,,false,true,false
-150004,202001,100,69,,,1,0.917399451,181.0909091,13547.818191,BI,0,3,3,,,,true,false,false
-150004,202002,100,69,,,1.230132332,3.509418433,204.1414141,14767.632765,BI,3,3,3,,,,false,false,false
-150004,202003,100,69,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,true,,,false,false,false
-150004,202005,100,69,,,1.028150423,3.035462652,124.85119,2818,R,3,3,4,true,,,false,false,false
-150004,202006,100,69,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,,,,false,false,false
-150004,202007,100,69,,,2.111448113,1,152.5353535,4483.444383,FIR,3,0,3,,,,false,true,false
-150005,202001,100,85,,,1,0.917399451,181.0909091,150000,R,0,3,3,false,,false,true,false,false
-150005,202002,100,85,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,false,false,false,false,false,false
-150005,202003,100,85,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,false,false,false,false,false,false
-150005,202004,100,85,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,false,false,,false,false,false
-150006,202005,100,85,,,1.028150423,3.035462652,124.85119,105000,R,3,3,4,false,,false,false,false,false
-150006,202006,100,85,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,false,false,false,false,false,false
-150006,202007,100,85,,,2.111448113,1,152.5353535,160000,R,3,0,3,false,false,,false,true,false
-150007,202001,100,71,,,1,0.917399451,181.0909091,12857.454545,C,0,3,3,,,,true,false,false
-150007,202002,100,71,,,1.230132332,3.509418433,204.1414141,15816.370544,FIC,3,3,3,,,,false,false,false
-150007,202003,100,71,,,0.831168119,0.962881641,109.6130952,13146.062949,FIC,3,3,4,,,,false,false,false
-150007,202004,100,71,,,3.047553764,1.474655266,195.979798,40063.333624,FIC,3,3,3,,,,false,false,false
-150007,202005,100,71,,,1.028150423,3.035462652,124.85119,41191.133429,FIC,3,3,4,,,,false,false,false
-150007,202006,100,71,,,0.753512367,1.033441075,107.1515152,31038.028445,FIC,3,3,3,,,,false,false,false
-150007,202007,100,71,,,2.111448113,1,152.5353535,65535.18658,FIC,3,0,3,,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+150001,202001,100,,1.285963763,1,0.917399451,181.0909091,5891,R,0,3,3,true,,true,true,false,false
+150001,202002,100,0.777626888,0.966251846,1.230132332,3.509418433,204.1414141,4581,R,3,3,3,true,true,true,false,false,false
+150001,202003,100,1.034926872,0.585887296,0.831168119,0.962881641,109.6130952,4741,R,3,3,4,true,true,true,false,false,false
+150001,202004,100,1.706812909,2.967363403,3.047553764,1.474655266,195.979798,8092,R,3,3,3,true,true,true,false,false,false
+150001,202005,100,0.336999506,1.154041473,1.028150423,3.035462652,124.85119,2727,R,3,3,4,true,true,true,false,false,false
+150001,202006,100,0.866519985,0.247460467,0.753512367,1.033441075,107.1515152,2363,R,3,3,3,true,true,true,false,false,false
+150001,202007,100,4.041049513,,2.111448113,1,152.5353535,9549,R,3,0,3,true,true,,false,true,false
+150002,202001,100,,0.917723543,1,0.917399451,181.0909091,8611,R,0,3,3,true,,true,true,false,false
+150002,202002,100,1.08965277,8.818609023,1.230132332,3.509418433,204.1414141,9383,R,3,3,3,true,true,true,false,false,false
+150002,202003,100,0.113396568,0.143415555,0.831168119,0.962881641,109.6130952,1064,R,3,3,4,true,true,true,false,false,false
+150002,202004,100,6.972744361,0.744356376,3.047553764,1.474655266,195.979798,7419,R,3,3,3,true,true,true,false,false,false
+150002,202005,100,1.343442512,7.155061019,1.028150423,3.035462652,124.85119,9967,R,3,3,4,true,true,true,false,false,false
+150002,202006,100,0.139761212,0.53721558,0.753512367,1.033441075,107.1515152,1393,R,3,3,3,true,true,true,false,false,false
+150002,202007,100,1.861450108,,2.111448113,1,152.5353535,2593,R,3,0,3,true,true,,false,true,false
+150003,202001,100,,0.548511047,1,0.917399451,181.0909091,3426,R,0,3,3,true,,true,true,false,false
+150003,202002,100,1.823117338,0.74339443,1.230132332,3.509418433,204.1414141,6246,R,3,3,3,true,true,true,false,false,false
+150003,202003,100,1.345180916,2.159342071,0.831168119,0.962881641,109.6130952,8402,R,3,3,4,true,true,true,false,false,false
+150003,202004,100,0.463104023,0.712246019,3.047553764,1.474655266,195.979798,3891,R,3,3,3,true,true,true,false,false,false
+150003,202005,100,1.404009252,0.797285464,1.028150423,3.035462652,124.85119,5463,R,3,3,4,true,true,true,false,false,false
+150003,202006,100,1.254255903,2.315647178,0.753512367,1.033441075,107.1515152,6852,R,3,3,3,true,true,true,false,false,false
+150003,202007,100,0.431844717,,2.111448113,1,152.5353535,2959,R,3,0,3,true,true,,false,true,false
+150004,202001,100,,,1,0.917399451,181.0909091,13547.818191,BI,0,3,3,,,,true,false,false
+150004,202002,100,,,1.230132332,3.509418433,204.1414141,14767.632765,BI,3,3,3,,,,false,false,false
+150004,202003,100,,,0.831168119,0.962881641,109.6130952,4208,R,3,3,4,true,,,false,false,false
+150004,202005,100,,,1.028150423,3.035462652,124.85119,2818,R,3,3,4,true,,,false,false,false
+150004,202006,100,,,0.753512367,1.033441075,107.1515152,2123.39785,FIR,3,3,3,,,,false,false,false
+150004,202007,100,,,2.111448113,1,152.5353535,4483.444383,FIR,3,0,3,,,,false,true,false
+150005,202001,100,,,1,0.917399451,181.0909091,150000,R,0,3,3,false,,false,true,false,false
+150005,202002,100,,,1.230132332,3.509418433,204.1414141,180000,R,3,3,3,false,false,false,false,false,false
+150005,202003,100,,,0.831168119,0.962881641,109.6130952,120000,R,3,3,4,false,false,false,false,false,false
+150005,202004,100,,,3.047553764,1.474655266,195.979798,115000,R,3,3,3,false,false,,false,false,false
+150006,202005,100,,,1.028150423,3.035462652,124.85119,105000,R,3,3,4,false,,false,false,false,false
+150006,202006,100,,,0.753512367,1.033441075,107.1515152,110000,R,3,3,3,false,false,false,false,false,false
+150006,202007,100,,,2.111448113,1,152.5353535,160000,R,3,0,3,false,false,,false,true,false
+150007,202001,100,,,1,0.917399451,181.0909091,12857.454545,C,0,3,3,,,,true,false,false
+150007,202002,100,,,1.230132332,3.509418433,204.1414141,15816.370544,FIC,3,3,3,,,,false,false,false
+150007,202003,100,,,0.831168119,0.962881641,109.6130952,13146.062949,FIC,3,3,4,,,,false,false,false
+150007,202004,100,,,3.047553764,1.474655266,195.979798,40063.333624,FIC,3,3,3,,,,false,false,false
+150007,202005,100,,,1.028150423,3.035462652,124.85119,41191.133429,FIC,3,3,4,,,,false,false,false
+150007,202006,100,,,0.753512367,1.033441075,107.1515152,31038.028445,FIC,3,3,3,,,,false,false,false
+150007,202007,100,,,2.111448113,1,152.5353535,65535.18658,FIC,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
index 4998c04c..cd3c217b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,1,0.9214,50.3694,9261,R,0,0,0,false,false,false
-190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
-190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
-190001,202004,100,95,1.113,1,110.5473,4350,R,0,0,0,false,false,false
-190002,202001,100,17,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
-190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
-190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
-190002,202004,100,17,1.113,1,110.5473,700,R,0,0,0,false,false,false
-190003,202001,100,64,1,0.9214,50.3694,7888,R,0,0,0,false,false,false
-190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
-190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
-190003,202004,100,64,1.113,1,110.5473,4077,R,0,0,0,false,false,false
-190004,202001,100,51,1,0.9214,50.3694,2247,R,0,0,0,false,false,false
-190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
-190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
-190004,202004,100,51,1.113,1,110.5473,8608,R,0,0,0,false,false,false
-190005,202001,100,34,1,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false
-190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
-190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
-190005,202004,100,34,1.113,1,110.5473,5134,R,0,0,0,false,false,false
-190006,202001,100,8,1,0.9214,50.3694,402.9552,C,0,0,0,false,false,false
-190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
-190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
-190006,202004,100,8,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,false,false
-190007,202001,100,85,1,0.9214,50.3694,150000,R,0,0,0,false,false,false
-190007,202002,100,85,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false
-190007,202003,100,85,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false
-190007,202004,100,85,1.113,1,110.5473,180000,R,0,0,0,false,false,false
-190008,202001,100,71,1,0.9214,50.3694,3576.2274,C,0,0,0,false,false,false
-190008,202002,100,71,0.8521,1.5274,121.4187,3047.303368,FIC,0,0,0,false,false,false
-190008,202003,100,71,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false
-190008,202004,100,71,1.113,1,110.5473,3284.811716,FIC,0,0,0,false,false,false
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,1,0.9214,50.3694,9261,R,0,0,0,false,false,false
+190001,202002,100,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
+190001,202003,100,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
+190001,202004,100,1.113,1,110.5473,4350,R,0,0,0,false,false,false
+190002,202001,100,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190002,202002,100,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
+190002,202003,100,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
+190002,202004,100,1.113,1,110.5473,700,R,0,0,0,false,false,false
+190003,202001,100,1,0.9214,50.3694,7888,R,0,0,0,false,false,false
+190003,202002,100,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
+190003,202003,100,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
+190003,202004,100,1.113,1,110.5473,4077,R,0,0,0,false,false,false
+190004,202001,100,1,0.9214,50.3694,2247,R,0,0,0,false,false,false
+190004,202002,100,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
+190004,202003,100,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
+190004,202004,100,1.113,1,110.5473,8608,R,0,0,0,false,false,false
+190005,202001,100,1,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false
+190005,202002,100,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
+190005,202003,100,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
+190005,202004,100,1.113,1,110.5473,5134,R,0,0,0,false,false,false
+190006,202001,100,1,0.9214,50.3694,402.9552,C,0,0,0,false,false,false
+190006,202002,100,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
+190006,202003,100,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
+190006,202004,100,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,false,false
+190007,202001,100,1,0.9214,50.3694,150000,R,0,0,0,false,false,false
+190007,202002,100,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false
+190007,202003,100,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false
+190007,202004,100,1.113,1,110.5473,180000,R,0,0,0,false,false,false
+190008,202001,100,1,0.9214,50.3694,3576.2274,C,0,0,0,false,false,false
+190008,202002,100,0.8521,1.5274,121.4187,3047.303368,FIC,0,0,0,false,false,false
+190008,202003,100,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false
+190008,202004,100,1.113,1,110.5473,3284.811716,FIC,0,0,0,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
index 1497f7cb..e62f3474 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-200001,202001,100,56,,1.262441238,1,0.597514698,71.63436123,7788,R,0,4,4,true,,true,true,false,false
-200001,202002,100,56,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,true,true,true,false,false,false
-200001,202003,100,56,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,true,true,true,false,false,false
-200001,202004,100,56,0.25617284,,0.276010255,1,42.68681319,1577,R,4,0,4,true,true,,false,true,false
-200002,202001,100,75,,0.806244601,1,0.597514698,71.63436123,6533,R,0,4,4,true,,true,true,false,false
-200002,202002,100,75,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,true,true,true,false,false,false
-200002,202003,100,75,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,true,true,true,false,false,false
-200002,202004,100,75,0.439419795,,0.276010255,1,42.68681319,2575,R,4,0,4,true,true,,false,true,false
-200003,202001,100,10,,0.011249498,1,0.597514698,71.63436123,56,R,0,4,4,true,,true,true,false,false
-200003,202002,100,10,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,true,true,true,false,false,false
-200003,202003,100,10,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,true,true,true,false,false,false
-200003,202004,100,10,0.103224336,,0.276010255,1,42.68681319,906,R,4,0,4,true,true,,false,true,false
-200004,202001,100,86,,0.310123457,1,0.597514698,71.63436123,1884,R,0,4,4,true,,true,true,false,false
-200004,202002,100,86,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,true,true,,false,false,false
-200004,202003,100,86,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,,,,false,false,false
-200004,202004,100,86,,,0.276010255,1,42.68681319,1947.413826,FIR,4,0,4,,,,false,true,false
-200005,202001,100,6,,,1,0.597514698,71.63436123,429.8061674,C,0,4,4,,,,true,false,false
-200005,202002,100,6,,,23.53745347,0.984013482,111.5638767,10116.542659,FIC,4,3,4,,,,false,false,false
-200005,202003,100,6,,,1.161413175,4.785815599,163.0494505,11749.485934,FIC,3,4,4,,,,false,false,false
-200005,202004,100,6,,,0.276010255,1,42.68681319,3242.978608,FIC,4,0,4,,,,false,true,false
-200006,202001,100,41,,,1,0.597514698,71.63436123,5222.283092,BI,0,4,4,,,,true,false,false
-200006,202002,100,41,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,,,,false,false,false
-200006,202003,100,41,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,true,,true,false,false,false
-200006,202004,100,41,0.305224049,,0.276010255,1,42.68681319,2711,R,4,0,4,true,true,,false,true,false
-200007,202001,200,4,,0.252093023,1,2.163456777,132.3214286,2439,R,0,3,4,true,,true,true,false,false
-200007,202002,200,4,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,true,true,true,false,false,false
-200007,202003,200,4,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,true,true,true,false,false,false
-200007,202004,200,4,0.084963587,,0.197315737,1,99.37735849,595,R,3,0,3,true,true,,false,true,false
-200008,202001,200,4,,0.287290242,1,2.163456777,132.3214286,1849,R,0,3,4,true,,true,true,false,false
-200008,202002,200,4,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,true,true,true,false,false,false
-200008,202003,200,4,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,true,true,true,false,false,false
-200008,202004,200,4,0.280873416,,0.197315737,1,99.37735849,2727,R,3,0,3,true,true,,false,true,false
-200009,202001,200,45,,5.950987066,1,2.163456777,132.3214286,8742,R,0,3,4,true,,true,true,false,false
-200009,202002,200,45,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,true,true,true,false,false,false
-200009,202003,200,45,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,true,true,true,false,false,false
-200009,202004,200,45,0.226110207,,0.197315737,1,99.37735849,1945,R,3,0,3,true,true,,false,true,false
-200010,202001,200,85,,,1,2.163456777,132.3214286,14038.671027,BI,0,3,4,,,,true,false,false
-200010,202002,200,85,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,true,,true,false,false,false
-200010,202003,200,85,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,true,true,,false,false,false
-200010,202004,200,85,,,0.197315737,1,99.37735849,354.3790633,FIR,3,0,3,,,,false,true,false
-200011,202001,200,79,,,1,2.163456777,132.3214286,4166.817753,BI,0,3,4,,,,true,false,false
-200011,202002,200,79,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,true,,,false,false,false
-200011,202004,200,79,,,0.197315737,1,99.37735849,7850.811321,C,3,0,3,,,,false,true,false
-200012,202001,200,87,,,1,2.163456777,132.3214286,5495,R,0,3,4,true,,,true,false,false
-200012,202002,200,87,,,2.53854315,1.457061014,119.7926267,13949.294611,FIR,3,4,5,,,,false,false,false
-200012,202003,200,87,,,2.091207548,6.584230902,196.4492754,29170.870177,FIR,4,3,4,,,,false,false,false
-200012,202004,200,87,,,0.197315737,1,99.37735849,5755.871742,FIR,3,0,3,,,,false,true,false
-200013,202001,100,85,,,1,0.597514698,71.63436123,150000,R,0,4,4,false,,false,true,false,false
-200013,202002,100,85,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,false,false,false,false,false,false
-200013,202003,100,85,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,false,false,false,false,false,false
-200013,202004,100,85,,,0.276010255,1,42.68681319,105000,R,4,0,4,false,false,,false,true,false
-200014,202001,200,96,,,1,2.163456777,132.3214286,150000,R,0,3,4,false,,false,true,false,false
-200014,202002,200,96,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,false,false,false,false,false,false
-200014,202003,200,96,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,false,false,false,false,false,false
-200014,202004,200,96,,,0.197315737,1,99.37735849,105000,R,3,0,3,false,false,,false,true,false
-200015,202001,100,71,,,1,0.597514698,71.63436123,5086.039648,C,0,4,4,,,,true,false,false
-200015,202002,100,71,,,23.53745347,0.984013482,111.5638767,119712.421581,FIC,4,3,4,,,,false,false,false
-200015,202003,100,71,,,1.161413175,4.785815599,163.0494505,139035.583689,FIC,3,4,4,,,,false,false,false
-200015,202004,100,71,,,0.276010255,1,42.68681319,38375.246898,FIC,4,0,4,,,,false,true,false
-200016,202001,200,48,,,1,2.163456777,132.3214286,6351.428571,C,0,3,4,,,,true,false,false
-200016,202002,200,48,,,2.53854315,1.457061014,119.7926267,16123.375493,FIC,3,4,5,,,,false,false,false
-200016,202003,200,48,,,2.091207548,6.584230902,196.4492754,33717.324528,FIC,4,3,4,,,,false,false,false
-200016,202004,200,48,,,0.197315737,1,99.37735849,6652.958732,FIC,3,0,3,,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+200001,202001,100,,1.262441238,1,0.597514698,71.63436123,7788,R,0,4,4,true,,true,true,false,false
+200001,202002,100,0.792116076,1.002111761,23.53745347,0.984013482,111.5638767,6169,R,4,3,4,true,true,true,false,false,false
+200001,202003,100,0.997892689,3.903614458,1.161413175,4.785815599,163.0494505,6156,R,3,4,4,true,true,true,false,false,false
+200001,202004,100,0.25617284,,0.276010255,1,42.68681319,1577,R,4,0,4,true,true,,false,true,false
+200002,202001,100,,0.806244601,1,0.597514698,71.63436123,6533,R,0,4,4,true,,true,true,false,false
+200002,202002,100,1.240318384,1.382764505,23.53745347,0.984013482,111.5638767,8103,R,4,3,4,true,true,true,false,false,false
+200002,202003,100,0.723188942,2.275728155,1.161413175,4.785815599,163.0494505,5860,R,3,4,4,true,true,true,false,false,false
+200002,202004,100,0.439419795,,0.276010255,1,42.68681319,2575,R,4,0,4,true,true,,false,true,false
+200003,202001,100,,0.011249498,1,0.597514698,71.63436123,56,R,0,4,4,true,,true,true,false,false
+200003,202002,100,88.89285714,0.567164179,23.53745347,0.984013482,111.5638767,4978,R,4,3,4,true,true,true,false,false,false
+200003,202003,100,1.763157895,9.687637969,1.161413175,4.785815599,163.0494505,8777,R,3,4,4,true,true,true,false,false,false
+200003,202004,100,0.103224336,,0.276010255,1,42.68681319,906,R,4,0,4,true,true,,false,true,false
+200004,202001,100,,0.310123457,1,0.597514698,71.63436123,1884,R,0,4,4,true,,true,true,false,false
+200004,202002,100,3.224522293,,23.53745347,0.984013482,111.5638767,6075,R,4,3,4,true,true,,false,false,false
+200004,202003,100,,,1.161413175,4.785815599,163.0494505,7055.585041,FIR,3,4,4,,,,false,false,false
+200004,202004,100,,,0.276010255,1,42.68681319,1947.413826,FIR,4,0,4,,,,false,true,false
+200005,202001,100,,,1,0.597514698,71.63436123,429.8061674,C,0,4,4,,,,true,false,false
+200005,202002,100,,,23.53745347,0.984013482,111.5638767,10116.542659,FIC,4,3,4,,,,false,false,false
+200005,202003,100,,,1.161413175,4.785815599,163.0494505,11749.485934,FIC,3,4,4,,,,false,false,false
+200005,202004,100,,,0.276010255,1,42.68681319,3242.978608,FIC,4,0,4,,,,false,true,false
+200006,202001,100,,,1,0.597514698,71.63436123,5222.283092,BI,0,4,4,,,,true,false,false
+200006,202002,100,,,23.53745347,0.984013482,111.5638767,8740.007744,BI,4,3,4,,,,false,false,false
+200006,202003,100,,3.276281815,1.161413175,4.785815599,163.0494505,8882,R,3,4,4,true,,true,false,false,false
+200006,202004,100,0.305224049,,0.276010255,1,42.68681319,2711,R,4,0,4,true,true,,false,true,false
+200007,202001,200,,0.252093023,1,2.163456777,132.3214286,2439,R,0,3,4,true,,true,true,false,false
+200007,202002,200,3.966789668,1.381550764,2.53854315,1.457061014,119.7926267,9675,R,3,4,5,true,true,true,false,false,false
+200007,202003,200,0.723824289,11.7697479,2.091207548,6.584230902,196.4492754,7003,R,4,3,4,true,true,true,false,false,false
+200007,202004,200,0.084963587,,0.197315737,1,99.37735849,595,R,3,0,3,true,true,,false,true,false
+200008,202001,200,,0.287290242,1,2.163456777,132.3214286,1849,R,0,3,4,true,,true,true,false,false
+200008,202002,200,3.480800433,0.662890102,2.53854315,1.457061014,119.7926267,6436,R,3,4,5,true,true,true,false,false,false
+200008,202003,200,1.508545681,3.560322699,2.091207548,6.584230902,196.4492754,9709,R,4,3,4,true,true,true,false,false,false
+200008,202004,200,0.280873416,,0.197315737,1,99.37735849,2727,R,3,0,3,true,true,,false,true,false
+200009,202001,200,,5.950987066,1,2.163456777,132.3214286,8742,R,0,3,4,true,,true,true,false,false
+200009,202002,200,0.16803935,0.170774239,2.53854315,1.457061014,119.7926267,1469,R,3,4,5,true,true,true,false,false,false
+200009,202003,200,5.855684139,4.422622108,2.091207548,6.584230902,196.4492754,8602,R,4,3,4,true,true,true,false,false,false
+200009,202004,200,0.226110207,,0.197315737,1,99.37735849,1945,R,3,0,3,true,true,,false,true,false
+200010,202001,200,,,1,2.163456777,132.3214286,14038.671027,BI,0,3,4,,,,true,false,false
+200010,202002,200,,3.613028953,2.53854315,1.457061014,119.7926267,6489,R,3,4,5,true,,true,false,false,false
+200010,202003,200,0.276776083,,2.091207548,6.584230902,196.4492754,1796,R,4,3,4,true,true,,false,false,false
+200010,202004,200,,,0.197315737,1,99.37735849,354.3790633,FIR,3,0,3,,,,false,true,false
+200011,202001,200,,,1,2.163456777,132.3214286,4166.817753,BI,0,3,4,,,,true,false,false
+200011,202002,200,,,2.53854315,1.457061014,119.7926267,1926,R,3,4,5,true,,,false,false,false
+200011,202004,200,,,0.197315737,1,99.37735849,7850.811321,C,3,0,3,,,,false,true,false
+200012,202001,200,,,1,2.163456777,132.3214286,5495,R,0,3,4,true,,,true,false,false
+200012,202002,200,,,2.53854315,1.457061014,119.7926267,13949.294611,FIR,3,4,5,,,,false,false,false
+200012,202003,200,,,2.091207548,6.584230902,196.4492754,29170.870177,FIR,4,3,4,,,,false,false,false
+200012,202004,200,,,0.197315737,1,99.37735849,5755.871742,FIR,3,0,3,,,,false,true,false
+200013,202001,100,,,1,0.597514698,71.63436123,150000,R,0,4,4,false,,false,true,false,false
+200013,202002,100,,,23.53745347,0.984013482,111.5638767,180000,R,4,3,4,false,false,false,false,false,false
+200013,202003,100,,,1.161413175,4.785815599,163.0494505,120000,R,3,4,4,false,false,false,false,false,false
+200013,202004,100,,,0.276010255,1,42.68681319,105000,R,4,0,4,false,false,,false,true,false
+200014,202001,200,,,1,2.163456777,132.3214286,150000,R,0,3,4,false,,false,true,false,false
+200014,202002,200,,,2.53854315,1.457061014,119.7926267,180000,R,3,4,5,false,false,false,false,false,false
+200014,202003,200,,,2.091207548,6.584230902,196.4492754,120000,R,4,3,4,false,false,false,false,false,false
+200014,202004,200,,,0.197315737,1,99.37735849,105000,R,3,0,3,false,false,,false,true,false
+200015,202001,100,,,1,0.597514698,71.63436123,5086.039648,C,0,4,4,,,,true,false,false
+200015,202002,100,,,23.53745347,0.984013482,111.5638767,119712.421581,FIC,4,3,4,,,,false,false,false
+200015,202003,100,,,1.161413175,4.785815599,163.0494505,139035.583689,FIC,3,4,4,,,,false,false,false
+200015,202004,100,,,0.276010255,1,42.68681319,38375.246898,FIC,4,0,4,,,,false,true,false
+200016,202001,200,,,1,2.163456777,132.3214286,6351.428571,C,0,3,4,,,,true,false,false
+200016,202002,200,,,2.53854315,1.457061014,119.7926267,16123.375493,FIC,3,4,5,,,,false,false,false
+200016,202003,200,,,2.091207548,6.584230902,196.4492754,33717.324528,FIC,4,3,4,,,,false,false,false
+200016,202004,200,,,0.197315737,1,99.37735849,6652.958732,FIC,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index ca5e822c..7a4caeaa 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-230001,202001,1,10,,1.511049724,1,1.087985595,15.46666667,547,R,0,2,2,true,,true,true,false,false
-230001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,true,true,true,false,false,false
-230001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,895,R,2,0,2,true,true,,false,true,false
-230002,202001,1,50,,0.664921466,1,1.087985595,15.46666667,381,R,0,2,2,true,,true,true,false,false
-230002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,true,true,true,false,false,false
-230002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,214,R,2,0,2,true,true,,false,true,false
-230003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,961,R,0,2,2,true,,true,true,false,false
-230003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,true,true,true,false,false,false
-230003,202003,2,12,1.176029963,,1.174002242,1,50,314,R,2,0,2,true,true,,false,true,false
-230004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,555,R,0,2,2,true,,true,true,false,false
-230004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,true,true,true,false,false,false
-230004,202003,2,9,1.171974522,,1.174002242,1,50,736,R,2,0,2,true,true,,false,true,false
-230005,202001,1,18,,,1,1.087985595,15.46666667,278.4,C,0,2,2,,,,true,false,false
-230005,202002,2,18,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,,,,false,false,false
-230005,202003,2,18,,,1.174002242,1,50,900.627434,FIC,2,0,2,,,,false,true,false
-230006,202001,1,85,,,1,1.087985595,15.46666667,150000,R,0,2,2,false,,false,true,false,false
-230006,202002,1,85,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,false,false,false,false,false,false
-230006,202003,1,85,,,1.42292432,1,18.48333333,120000,R,2,0,2,false,false,,false,true,false
-230007,202001,1,71,,,1,1.087985595,15.46666667,1098.133333,C,0,2,2,,,,true,false,false
-230007,202002,1,71,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,,,,false,false,false
-230007,202003,1,71,,,1.42292432,1,18.48333333,1692.041117,FIC,2,0,2,,,,false,true,false
-230008,202001,2,85,,,1,2.241504449,72.19047619,150000,R,0,2,2,false,,false,true,false,false
-230008,202002,2,85,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,false,false,false,false,false,false
-230008,202003,2,85,,,1.174002242,1,50,120000,R,2,0,2,false,false,,false,true,false
-230009,202001,2,71,,,1,2.241504449,72.19047619,5125.52381,C,0,2,2,,,,true,false,false
-230009,202002,2,71,,,0.70468356,0.85178967,42.61904762,3611.872364,FIC,2,2,2,,,,false,false,false
-230009,202003,2,71,,,1.174002242,1,50,4240.346255,FIC,2,0,2,,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+230001,202001,1,,1.511049724,1,1.087985595,15.46666667,547,R,0,2,2,true,,true,true,false,false
+230001,202002,1,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,362,R,2,2,2,true,true,true,false,false,false
+230001,202003,1,2.472375691,,1.42292432,1,18.48333333,895,R,2,0,2,true,true,,false,true,false
+230002,202001,1,,0.664921466,1,1.087985595,15.46666667,381,R,0,2,2,true,,true,true,false,false
+230002,202002,1,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,573,R,2,2,2,true,true,true,false,false,false
+230002,202003,1,0.373472949,,1.42292432,1,18.48333333,214,R,2,0,2,true,true,,false,true,false
+230003,202001,2,,3.599250936,1,2.241504449,72.19047619,961,R,0,2,2,true,,true,true,false,false
+230003,202002,2,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,267,R,2,2,2,true,true,true,false,false,false
+230003,202003,2,1.176029963,,1.174002242,1,50,314,R,2,0,2,true,true,,false,true,false
+230004,202001,2,,0.883757962,1,2.241504449,72.19047619,555,R,0,2,2,true,,true,true,false,false
+230004,202002,2,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,628,R,2,2,2,true,true,true,false,false,false
+230004,202003,2,1.171974522,,1.174002242,1,50,736,R,2,0,2,true,true,,false,true,false
+230005,202001,1,,,1,1.087985595,15.46666667,278.4,C,0,2,2,,,,true,false,false
+230005,202002,2,,,0.70468356,0.85178967,42.61904762,767.1428571,C,2,2,2,,,,false,false,false
+230005,202003,2,,,1.174002242,1,50,900.627434,FIC,2,0,2,,,,false,true,false
+230006,202001,1,,,1,1.087985595,15.46666667,150000,R,0,2,2,false,,false,true,false,false
+230006,202002,1,,,1.082864299,1.541019684,15.58333333,180000,R,2,2,2,false,false,false,false,false,false
+230006,202003,1,,,1.42292432,1,18.48333333,120000,R,2,0,2,false,false,,false,true,false
+230007,202001,1,,,1,1.087985595,15.46666667,1098.133333,C,0,2,2,,,,true,false,false
+230007,202002,1,,,1.082864299,1.541019684,15.58333333,1189.129382,FIC,2,2,2,,,,false,false,false
+230007,202003,1,,,1.42292432,1,18.48333333,1692.041117,FIC,2,0,2,,,,false,true,false
+230008,202001,2,,,1,2.241504449,72.19047619,150000,R,0,2,2,false,,false,true,false,false
+230008,202002,2,,,0.70468356,0.85178967,42.61904762,180000,R,2,2,2,false,false,false,false,false,false
+230008,202003,2,,,1.174002242,1,50,120000,R,2,0,2,false,false,,false,true,false
+230009,202001,2,,,1,2.241504449,72.19047619,5125.52381,C,0,2,2,,,,true,false,false
+230009,202002,2,,,0.70468356,0.85178967,42.61904762,3611.872364,FIC,2,2,2,,,,false,false,false
+230009,202003,2,,,1.174002242,1,50,4240.346255,FIC,2,0,2,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
index 53d7fd04..f302246a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/31_BI_BI_R-R_FI_FI-C_FI_FI_no_response_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,false,true,false
-110005,202001,200,27,,,1,1,126.785714,9940,BI,0,0,1,true,true,false
-110005,202002,200,27,,,1,1,1,9940,BI,0,0,0,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,9940,R,0,0,1,true,true,false
-110006,202001,200,42,,,1,1,126.785714,5325,R,0,0,1,true,true,false
-110006,202002,200,42,,,1,1,1,5325,FIR,0,0,0,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,5325,FIR,0,0,1,true,true,false
-110007,202001,200,19,,,1,1,126.785714,2408.928571,C,0,0,1,true,true,false
-110007,202002,200,19,,,1,1,1,2408.928571,FIC,0,0,0,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,2408.928571,FIC,0,0,1,true,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
+110001,202002,100,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
+110001,202003,100,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
+110002,202001,100,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
+110002,202002,100,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
+110002,202003,100,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
+110003,202001,100,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
+110003,202002,100,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
+110003,202003,100,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
+110004,202001,100,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
+110004,202002,100,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
+110004,202003,100,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,false,true,false
+110005,202001,200,,,1,1,126.785714,9940,BI,0,0,1,true,true,false
+110005,202002,200,,,1,1,1,9940,BI,0,0,0,true,true,true
+110005,202003,200,,,1,1,368.1481481,9940,R,0,0,1,true,true,false
+110006,202001,200,,,1,1,126.785714,5325,R,0,0,1,true,true,false
+110006,202002,200,,,1,1,1,5325,FIR,0,0,0,true,true,true
+110006,202003,200,,,1,1,368.1481481,5325,FIR,0,0,1,true,true,false
+110007,202001,200,,,1,1,126.785714,2408.928571,C,0,0,1,true,true,false
+110007,202002,200,,,1,1,1,2408.928571,FIC,0,0,0,true,true,true
+110007,202003,200,,,1,1,368.1481481,2408.928571,FIC,0,0,1,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
index c96a4f46..d5be1ddf 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/32_C_FI_FI_no_response_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,false,true,false
-110005,202001,200,27,,,1,1,1,27,C,0,0,0,true,true,true
-110005,202002,200,27,,,1,1,1,27,FIC,0,0,0,true,true,true
-110005,202003,200,27,,,1,1,1,27,FIC,0,0,0,true,true,true
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,false,false
+110001,202002,100,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
+110001,202003,100,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
+110002,202001,100,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,false,false
+110002,202002,100,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
+110002,202003,100,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
+110003,202001,100,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,false,false
+110003,202002,100,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
+110003,202003,100,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
+110004,202001,100,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,false,false
+110004,202002,100,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
+110004,202003,100,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,false,true,false
+110005,202001,200,,,1,1,1,27,C,0,0,0,true,true,true
+110005,202002,200,,,1,1,1,27,FIC,0,0,0,true,true,true
+110005,202003,200,,,1,1,1,27,FIC,0,0,0,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index e6e0f7de..b20374f5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,1,0.9214,96.16299559,9261,R,0,0,4,true,false,false
-190001,202002,100,95,0.8521,1.5274,76.92045455,4996,R,0,0,3,false,false,false
-190001,202003,100,95,0.9685,1.8795,95.83333333,1480,R,0,0,4,false,false,false
-190001,202004,100,95,1.113,1,87.62068966,4350,R,0,0,5,false,true,false
-190002,202001,100,17,1,0.9214,96.16299559,2433,R,0,0,4,true,false,false
-190002,202002,100,17,0.8521,1.5274,76.92045455,4324,R,0,0,3,false,false,false
-190002,202003,100,17,0.9685,1.8795,95.83333333,6598,R,0,0,4,false,false,false
-190002,202004,100,17,1.113,1,87.62068966,700,R,0,0,5,false,true,false
-190003,202001,100,64,1,0.9214,96.16299559,7888,R,0,0,4,true,false,false
-190003,202002,100,64,0.8521,1.5274,76.92045455,4218,R,0,0,3,false,false,false
-190003,202003,100,64,0.9685,1.8795,95.83333333,7591,R,0,0,4,false,false,false
-190003,202004,100,64,1.113,1,87.62068966,4077,R,0,0,5,false,true,false
-190004,202001,100,51,1,0.9214,96.16299559,2247,R,0,0,4,true,false,false
-190004,202002,100,51,0.8521,1.5274,76.92045455,1914.6687,FIR,0,0,3,false,false,false
-190004,202003,100,51,0.9685,1.8795,95.83333333,1854.356636,FIR,0,0,4,false,false,false
-190004,202004,100,51,1.113,1,87.62068966,8608,R,0,0,5,false,true,false
-190005,202001,100,34,1,0.9214,96.16299559,6271.13538,BI,0,0,4,true,false,false
-190005,202002,100,34,0.8521,1.5274,76.92045455,6806.0944,BI,0,0,3,false,false,false
-190005,202003,100,34,0.9685,1.8795,95.83333333,4456,R,0,0,4,false,false,false
-190005,202004,100,34,1.113,1,87.62068966,5134,R,0,0,5,false,true,false
-190006,202001,100,8,1,0.9214,96.16299559,769.3039647,C,0,0,4,true,false,false
-190006,202002,100,8,0.8521,1.5274,76.92045455,655.523909,FIC,0,0,3,false,false,false
-190006,202003,100,8,0.9685,1.8795,95.83333333,634.874906,FIC,0,0,4,false,false,false
-190006,202004,100,8,1.113,1,87.62068966,706.6157695,FIC,0,0,5,false,true,false
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,1,0.9214,96.16299559,9261,R,0,0,4,true,false,false
+190001,202002,100,0.8521,1.5274,76.92045455,4996,R,0,0,3,false,false,false
+190001,202003,100,0.9685,1.8795,95.83333333,1480,R,0,0,4,false,false,false
+190001,202004,100,1.113,1,87.62068966,4350,R,0,0,5,false,true,false
+190002,202001,100,1,0.9214,96.16299559,2433,R,0,0,4,true,false,false
+190002,202002,100,0.8521,1.5274,76.92045455,4324,R,0,0,3,false,false,false
+190002,202003,100,0.9685,1.8795,95.83333333,6598,R,0,0,4,false,false,false
+190002,202004,100,1.113,1,87.62068966,700,R,0,0,5,false,true,false
+190003,202001,100,1,0.9214,96.16299559,7888,R,0,0,4,true,false,false
+190003,202002,100,0.8521,1.5274,76.92045455,4218,R,0,0,3,false,false,false
+190003,202003,100,0.9685,1.8795,95.83333333,7591,R,0,0,4,false,false,false
+190003,202004,100,1.113,1,87.62068966,4077,R,0,0,5,false,true,false
+190004,202001,100,1,0.9214,96.16299559,2247,R,0,0,4,true,false,false
+190004,202002,100,0.8521,1.5274,76.92045455,1914.6687,FIR,0,0,3,false,false,false
+190004,202003,100,0.9685,1.8795,95.83333333,1854.356636,FIR,0,0,4,false,false,false
+190004,202004,100,1.113,1,87.62068966,8608,R,0,0,5,false,true,false
+190005,202001,100,1,0.9214,96.16299559,6271.13538,BI,0,0,4,true,false,false
+190005,202002,100,0.8521,1.5274,76.92045455,6806.0944,BI,0,0,3,false,false,false
+190005,202003,100,0.9685,1.8795,95.83333333,4456,R,0,0,4,false,false,false
+190005,202004,100,1.113,1,87.62068966,5134,R,0,0,5,false,true,false
+190006,202001,100,1,0.9214,96.16299559,769.3039647,C,0,0,4,true,false,false
+190006,202002,100,0.8521,1.5274,76.92045455,655.523909,FIC,0,0,3,false,false,false
+190006,202003,100,0.9685,1.8795,95.83333333,634.874906,FIC,0,0,4,false,false,false
+190006,202004,100,1.113,1,87.62068966,706.6157695,FIC,0,0,5,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
index 8145b9cb..f243ff0e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/34_default_link_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-120001,202001,100,0,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,false,true
-120001,202002,100,0,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,false,false,true
-120001,202003,100,0,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,false,false,true
-120001,202004,100,0,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,false,false,true
-120001,202005,100,0,0.294078212,,5.357333441,1,1,1316,R,3,0,3,false,true,true
-120002,202001,100,0,,2.05719045,1,1.589860068,1,7410,R,0,3,3,true,false,true
-120002,202002,100,0,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,false,false,true
-120002,202003,100,0,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,false,false,true
-120002,202004,100,0,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,false,false,true
-120002,202005,100,0,0.173681828,,5.357333441,1,1,1535,R,3,0,3,false,true,true
-120003,202001,100,0,,0.607972084,1,1.589860068,1,4530,R,0,3,3,true,false,true
-120003,202002,100,0,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,false,false,true
-120003,202003,100,0,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,false,false,true
-120003,202004,100,0,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,false,false,true
-120003,202005,100,0,15.60424028,,5.357333441,1,1,4416,R,3,0,3,false,true,true
-120004,202001,100,3,,,1,1.589860068,1,3,C,0,3,3,true,false,true
-120004,202002,100,3,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,false,false,true
-120004,202003,100,3,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,false,false,true
-120004,202004,100,3,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,false,false,true
-120004,202005,100,3,,,5.357333441,1,1,18.287842,FIC,3,0,3,false,true,true
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+120001,202001,100,,2.104417671,1,1.589860068,1,5240,R,0,3,3,true,false,true
+120001,202002,100,0.47519084,0.736250739,0.868701022,0.814303919,1,2490,R,3,3,3,false,false,true
+120001,202003,100,1.358232932,0.75575419,1.252231853,9.374659539,1,3382,R,3,3,3,false,false,true
+120001,202004,100,1.323181549,3.400455927,1.046013805,3.074065265,1,4475,R,3,3,3,false,false,true
+120001,202005,100,0.294078212,,5.357333441,1,1,1316,R,3,0,3,false,true,true
+120002,202001,100,,2.05719045,1,1.589860068,1,7410,R,0,3,3,true,false,true
+120002,202002,100,0.486099865,0.724456959,0.868701022,0.814303919,1,3602,R,3,3,3,false,false,true
+120002,202003,100,1.380344253,0.562570717,1.252231853,9.374659539,1,4972,R,3,3,3,false,false,true
+120002,202004,100,1.777554304,5.757654723,1.046013805,3.074065265,1,8838,R,3,3,3,false,false,true
+120002,202005,100,0.173681828,,5.357333441,1,1,1535,R,3,0,3,false,true,true
+120003,202001,100,,0.607972084,1,1.589860068,1,4530,R,0,3,3,true,false,true
+120003,202002,100,1.644812362,0.98220406,0.868701022,0.814303919,1,7451,R,3,3,3,false,false,true
+120003,202003,100,1.018118373,26.80565371,1.252231853,9.374659539,1,7586,R,3,3,3,false,false,true
+120003,202004,100,0.037305563,0.064085145,1.046013805,3.074065265,1,283,R,3,3,3,false,false,true
+120003,202005,100,15.60424028,,5.357333441,1,1,4416,R,3,0,3,false,true,true
+120004,202001,100,,,1,1.589860068,1,3,C,0,3,3,true,false,true
+120004,202002,100,,,0.868701022,0.814303919,1,2.606103066,FIC,3,3,3,false,false,true
+120004,202003,100,,,1.252231853,9.374659539,1,3.263445271,FIC,3,3,3,false,false,true
+120004,202004,100,,,1.046013805,3.074065265,1,3.413608806,FIC,3,3,3,false,false,true
+120004,202005,100,,,5.357333441,1,1,18.287842,FIC,3,0,3,false,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
index 85f86898..9d48dd16 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/35_TB_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,true,false,false
-30008,202002,100,162,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,false,true,false
-30009,202001,100,26,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,false,true,false
-30012,202001,100,275,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,false,false
-30012,202002,100,275,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.598904,96.75644,8444,R,0,10,12,,true,true,false,false
+30001,202002,100,0.885362387,3.732401398,6.802452,2.995542,76.385246,7476,R,10,9,12,true,true,false,false,false
+30001,202003,100,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,false,true,false
+30002,202001,100,,1.195062676,1,1.598904,96.75644,9343,R,0,10,12,,true,true,false,false
+30002,202002,100,0.836776196,1.596487645,6.802452,2.995542,76.385246,7818,R,10,9,12,true,true,false,false,false
+30002,202003,100,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,false,true,false
+30003,202001,100,,4.265190233,1,1.598904,96.75644,7511,R,0,10,12,,true,true,false,false
+30003,202002,100,0.234456131,0.271256932,6.802452,2.995542,76.385246,1761,R,10,9,12,true,true,false,false,false
+30003,202003,100,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,false,true,false
+30004,202001,100,,0.030288689,1,1.598904,96.75644,64,R,0,10,12,,true,true,false,false
+30004,202002,100,33.015625,11.42162162,6.802452,2.995542,76.385246,2113,R,10,9,12,true,true,false,false,false
+30004,202003,100,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,false,true,false
+30005,202001,100,,0.940914,1,1.598904,96.75644,844,R,0,10,12,,true,true,false,false
+30005,202002,100,1.062796,3.203571,6.802452,2.995542,76.385246,897,R,10,9,12,true,true,false,false,false
+30005,202003,100,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,false,true,false
+30006,202001,100,,0.996269,1,1.598904,96.75644,1869,R,0,10,12,,true,true,false,false
+30006,202002,100,1.003745,1.368344,6.802452,2.995542,76.385246,1876,R,10,9,12,true,true,false,false,false
+30006,202003,100,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,false,true,false
+30007,202001,100,,4.47564,1,1.598904,96.75644,12769,R,0,10,12,,true,true,false,false
+30007,202002,100,0.223432,0.248281,6.802452,2.995542,76.385246,2853,R,10,9,12,true,true,false,false,false
+30007,202003,100,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,false,true,false
+30008,202001,100,,0.023496,1,1.598904,96.75644,141,R,0,10,12,,false,true,false,false
+30008,202002,100,42.560284,13.859122,6.802452,2.995542,76.385246,6001,R,10,9,12,false,false,false,false,false
+30008,202003,100,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,false,true,false
+30009,202001,100,,1.589547,1,1.598904,96.75644,6417,R,0,10,12,,true,true,false,false
+30009,202002,100,0.62911,3.053707,6.802452,2.995542,76.385246,4037,R,10,9,12,true,true,false,false,false
+30009,202003,100,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,false,true,false
+30010,202001,100,,1.332612,1,1.598904,96.75644,28963,R,0,10,12,,true,true,false,false
+30010,202002,100,0.750406,2.064204,6.802452,2.995542,76.385246,21734,R,10,9,12,true,true,false,false,false
+30010,202003,100,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,false,true,false
+30011,202001,100,,5.248035,1,1.598904,96.75644,6009,R,0,10,12,,false,true,false,false
+30011,202002,100,0.190548,0.226106,6.802452,2.995542,76.385246,1145,R,10,9,12,false,false,false,false,false
+30011,202003,100,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,false,true,false
+30012,202001,100,,0.034034,1,1.598904,96.75644,256,R,0,10,12,,true,true,false,false
+30012,202002,100,29.382813,,6.802452,2.995542,76.385246,7522,R,10,9,12,true,,false,false,false
+30012,202003,100,,,1.172329,1,76.108808,8818.262299,FIR,9,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
index 040ac5d0..0c69a0cb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/36_TB_10_BI_BI_R_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,false,false,false
-30012,202003,100,275,,,1.172329,1,60.40866511,7522,R,9,0,12,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.772778,142.2694301,8444,R,0,9,11,,true,true,false,false
+30001,202002,100,0.885362387,3.732401398,4.293523,2.995542,99.67357513,7476,R,9,9,11,true,true,false,false,false
+30001,202003,100,0.267924024,,1.172329,1,60.40866511,2003,R,9,0,12,true,,false,true,false
+30002,202001,100,,1.195062676,1,1.772778,142.2694301,9343,R,0,9,11,,true,true,false,false
+30002,202002,100,0.836776196,1.596487645,4.293523,2.995542,99.67357513,7818,R,9,9,11,true,true,false,false,false
+30002,202003,100,0.626375032,,1.172329,1,60.40866511,4897,R,9,0,12,true,,false,true,false
+30003,202001,100,,4.265190233,1,1.772778,142.2694301,7511,R,0,9,11,,true,true,false,false
+30003,202002,100,0.234456131,0.271256932,4.293523,2.995542,99.67357513,1761,R,9,9,11,true,true,false,false,false
+30003,202003,100,3.686541738,,1.172329,1,60.40866511,6492,R,9,0,12,true,,false,true,false
+30004,202001,100,,0.030288689,1,1.772778,142.2694301,64,R,0,9,11,,true,true,false,false
+30004,202002,100,33.015625,11.42162162,4.293523,2.995542,99.67357513,2113,R,9,9,11,true,true,false,false,false
+30004,202003,100,0.087553242,,1.172329,1,60.40866511,185,R,9,0,12,true,,false,true,false
+30005,202001,100,,0.940914,1,1.772778,142.2694301,844,R,0,9,11,,true,true,false,false
+30005,202002,100,1.062796,3.203571,4.293523,2.995542,99.67357513,897,R,9,9,11,true,true,false,false,false
+30005,202003,100,0.312152,,1.172329,1,60.40866511,280,R,9,0,12,true,,false,true,false
+30006,202001,100,,0.996269,1,1.772778,142.2694301,1869,R,0,9,11,,true,true,false,false
+30006,202002,100,1.003745,1.368344,4.293523,2.995542,99.67357513,1876,R,9,9,11,true,true,false,false,false
+30006,202003,100,0.73081,,1.172329,1,60.40866511,1371,R,9,0,12,true,,false,true,false
+30007,202001,100,,4.47564,1,1.772778,142.2694301,12769,R,0,9,11,,true,true,false,false
+30007,202002,100,0.223432,0.248281,4.293523,2.995542,99.67357513,2853,R,9,9,11,true,true,false,false,false
+30007,202003,100,4.02769,,1.172329,1,60.40866511,11491,R,9,0,12,true,,false,true,false
+30008,202001,100,,0.023496,1,1.772778,142.2694301,141,R,0,9,11,,false,true,false,false
+30008,202002,100,42.560284,13.859122,4.293523,2.995542,99.67357513,6001,R,9,9,11,false,false,false,false,false
+30008,202003,100,0.072155,,1.172329,1,60.40866511,433,R,9,0,12,false,,false,true,false
+30009,202001,100,,1.589547,1,1.772778,142.2694301,6417,R,0,9,11,,true,true,false,false
+30009,202002,100,0.62911,3.053707,4.293523,2.995542,99.67357513,4037,R,9,9,11,true,true,false,false,false
+30009,202003,100,0.327471,,1.172329,1,60.40866511,1322,R,9,0,12,true,,false,true,false
+30010,202001,100,,1.332612,1,1.772778,142.2694301,28963,R,0,9,11,,true,true,false,false
+30010,202002,100,0.750406,2.064204,4.293523,2.995542,99.67357513,21734,R,9,9,11,true,true,false,false,false
+30010,202003,100,0.484448,,1.172329,1,60.40866511,10529,R,9,0,12,true,,false,true,false
+30011,202001,100,,5.248035,1,1.772778,142.2694301,6009,R,0,9,11,,false,true,false,false
+30011,202002,100,0.190548,0.226106,4.293523,2.995542,99.67357513,1145,R,9,9,11,false,false,false,false,false
+30011,202003,100,4.422707,,1.172329,1,60.40866511,5064,R,9,0,12,false,,false,true,false
+30012,202001,100,,,1,1.772778,142.2694301,39945.062477,BI,0,9,11,,,true,false,false
+30012,202002,100,,,4.293523,2.995542,99.67357513,22532.464163,BI,9,9,11,,,false,false,false
+30012,202003,100,,,1.172329,1,60.40866511,7522,R,9,0,12,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
index d3b65d74..6933f649 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/37_TB_10_C_FI_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,true,false,false
-30008,202002,100,162,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,false,false,false
-30008,202003,100,162,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,false,true,false
-30009,202001,100,26,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,true,false,false
-30011,202002,100,5,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,false,false,false
-30011,202003,100,5,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.772778,142.26943,8444,R,0,9,11,,true,true,false,false
+30001,202002,100,0.885362387,3.732401398,4.293523,2.995542,99.673575,7476,R,9,9,11,true,true,false,false,false
+30001,202003,100,0.267924024,,1.172329,1,76.108808,2003,R,9,0,11,true,,false,true,false
+30002,202001,100,,1.195062676,1,1.772778,142.26943,9343,R,0,9,11,,true,true,false,false
+30002,202002,100,0.836776196,1.596487645,4.293523,2.995542,99.673575,7818,R,9,9,11,true,true,false,false,false
+30002,202003,100,0.626375032,,1.172329,1,76.108808,4897,R,9,0,11,true,,false,true,false
+30003,202001,100,,4.265190233,1,1.772778,142.26943,7511,R,0,9,11,,true,true,false,false
+30003,202002,100,0.234456131,0.271256932,4.293523,2.995542,99.673575,1761,R,9,9,11,true,true,false,false,false
+30003,202003,100,3.686541738,,1.172329,1,76.108808,6492,R,9,0,11,true,,false,true,false
+30004,202001,100,,0.030288689,1,1.772778,142.26943,64,R,0,9,11,,true,true,false,false
+30004,202002,100,33.015625,11.42162162,4.293523,2.995542,99.673575,2113,R,9,9,11,true,true,false,false,false
+30004,202003,100,0.087553242,,1.172329,1,76.108808,185,R,9,0,11,true,,false,true,false
+30005,202001,100,,0.940914,1,1.772778,142.26943,844,R,0,9,11,,true,true,false,false
+30005,202002,100,1.062796,3.203571,4.293523,2.995542,99.673575,897,R,9,9,11,true,true,false,false,false
+30005,202003,100,0.312152,,1.172329,1,76.108808,280,R,9,0,11,true,,false,true,false
+30006,202001,100,,0.996269,1,1.772778,142.26943,1869,R,0,9,11,,true,true,false,false
+30006,202002,100,1.003745,1.368344,4.293523,2.995542,99.673575,1876,R,9,9,11,true,true,false,false,false
+30006,202003,100,0.73081,,1.172329,1,76.108808,1371,R,9,0,11,true,,false,true,false
+30007,202001,100,,4.47564,1,1.772778,142.26943,12769,R,0,9,11,,true,true,false,false
+30007,202002,100,0.223432,0.248281,4.293523,2.995542,99.673575,2853,R,9,9,11,true,true,false,false,false
+30007,202003,100,4.02769,,1.172329,1,76.108808,11491,R,9,0,11,true,,false,true,false
+30008,202001,100,,0.023496,1,1.772778,142.26943,141,R,0,9,11,,false,true,false,false
+30008,202002,100,42.560284,13.859122,4.293523,2.995542,99.673575,6001,R,9,9,11,false,false,false,false,false
+30008,202003,100,0.072155,,1.172329,1,76.108808,433,R,9,0,11,false,,false,true,false
+30009,202001,100,,1.589547,1,1.772778,142.26943,6417,R,0,9,11,,true,true,false,false
+30009,202002,100,0.62911,3.053707,4.293523,2.995542,99.673575,4037,R,9,9,11,true,true,false,false,false
+30009,202003,100,0.327471,,1.172329,1,76.108808,1322,R,9,0,11,true,,false,true,false
+30010,202001,100,,1.332612,1,1.772778,142.26943,28963,R,0,9,11,,true,true,false,false
+30010,202002,100,0.750406,2.064204,4.293523,2.995542,99.673575,21734,R,9,9,11,true,true,false,false,false
+30010,202003,100,0.484448,,1.172329,1,76.108808,10529,R,9,0,11,true,,false,true,false
+30011,202001,100,,5.248035,1,1.772778,142.26943,6009,R,0,9,11,,false,true,false,false
+30011,202002,100,0.190548,0.226106,4.293523,2.995542,99.673575,1145,R,9,9,11,false,false,false,false,false
+30011,202003,100,4.422707,,1.172329,1,76.108808,5064,R,9,0,11,false,,false,true,false
+30012,202001,100,,,1,1.772778,142.26943,39124.093264,C,0,9,11,,,true,false,false
+30012,202002,100,,,4.293523,2.995542,99.673575,167980.202353,FIC,9,9,11,,,false,false,false
+30012,202003,100,,,1.172329,1,76.108808,196928.14217,FIC,9,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
index 870926e0..6658c178 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/38_T_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,false,false,false
-30008,202003,100,162,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,true,false,false
-30011,202002,100,5,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,false,true,false
-30012,202001,100,275,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,true,false,false
-30012,202002,100,275,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,false,false,false
-30012,202003,100,275,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.455685,96.75644,8444,R,0,11,12,,true,true,false,false
+30001,202002,100,0.885362387,3.732401398,6.20137,2.718598,76.385246,7476,R,11,10,12,true,true,false,false,false
+30001,202003,100,0.267924024,,1.062312,1,76.108808,2003,R,10,0,11,true,,false,true,false
+30002,202001,100,,1.195062676,1,1.455685,96.75644,9343,R,0,11,12,,true,true,false,false
+30002,202002,100,0.836776196,1.596487645,6.20137,2.718598,76.385246,7818,R,11,10,12,true,true,false,false,false
+30002,202003,100,0.626375032,,1.062312,1,76.108808,4897,R,10,0,11,true,,false,true,false
+30003,202001,100,,4.265190233,1,1.455685,96.75644,7511,R,0,11,12,,true,true,false,false
+30003,202002,100,0.234456131,0.271256932,6.20137,2.718598,76.385246,1761,R,11,10,12,true,true,false,false,false
+30003,202003,100,3.686541738,,1.062312,1,76.108808,6492,R,10,0,11,true,,false,true,false
+30004,202001,100,,0.030288689,1,1.455685,96.75644,64,R,0,11,12,,true,true,false,false
+30004,202002,100,33.015625,11.42162162,6.20137,2.718598,76.385246,2113,R,11,10,12,true,true,false,false,false
+30004,202003,100,0.087553242,,1.062312,1,76.108808,185,R,10,0,11,true,,false,true,false
+30005,202001,100,,0.940914,1,1.455685,96.75644,844,R,0,11,12,,true,true,false,false
+30005,202002,100,1.062796,3.203571,6.20137,2.718598,76.385246,897,R,11,10,12,true,true,false,false,false
+30005,202003,100,0.312152,,1.062312,1,76.108808,280,R,10,0,11,true,,false,true,false
+30006,202001,100,,0.996269,1,1.455685,96.75644,1869,R,0,11,12,,true,true,false,false
+30006,202002,100,1.003745,1.368344,6.20137,2.718598,76.385246,1876,R,11,10,12,true,true,false,false,false
+30006,202003,100,0.73081,,1.062312,1,76.108808,1371,R,10,0,11,true,,false,true,false
+30007,202001,100,,4.47564,1,1.455685,96.75644,12769,R,0,11,12,,true,true,false,false
+30007,202002,100,0.223432,0.248281,6.20137,2.718598,76.385246,2853,R,11,10,12,true,true,false,false,false
+30007,202003,100,4.02769,,1.062312,1,76.108808,11491,R,10,0,11,true,,false,true,false
+30008,202001,100,,0.023496,1,1.455685,96.75644,141,R,0,11,12,,true,true,false,false
+30008,202002,100,42.560284,13.859122,6.20137,2.718598,76.385246,6001,R,11,10,12,false,false,false,false,false
+30008,202003,100,0.072155,,1.062312,1,76.108808,433,R,10,0,11,true,,false,true,false
+30009,202001,100,,1.589547,1,1.455685,96.75644,6417,R,0,11,12,,true,true,false,false
+30009,202002,100,0.62911,3.053707,6.20137,2.718598,76.385246,4037,R,11,10,12,true,true,false,false,false
+30009,202003,100,0.327471,,1.062312,1,76.108808,1322,R,10,0,11,true,,false,true,false
+30010,202001,100,,1.332612,1,1.455685,96.75644,28963,R,0,11,12,,true,true,false,false
+30010,202002,100,0.750406,2.064204,6.20137,2.718598,76.385246,21734,R,11,10,12,true,true,false,false,false
+30010,202003,100,0.484448,,1.062312,1,76.108808,10529,R,10,0,11,true,,false,true,false
+30011,202001,100,,5.248035,1,1.455685,96.75644,6009,R,0,11,12,,false,true,false,false
+30011,202002,100,0.190548,0.226106,6.20137,2.718598,76.385246,1145,R,11,10,12,true,true,false,false,false
+30011,202003,100,4.422707,,1.062312,1,76.108808,5064,R,10,0,11,false,,false,true,false
+30012,202001,100,,0.034034,1,1.455685,96.75644,256,R,0,11,12,,true,true,false,false
+30012,202002,100,29.382813,,6.20137,2.718598,76.385246,7522,R,11,10,12,true,,false,false,false
+30012,202003,100,,,1.062312,1,76.108808,7990.71079,FIR,10,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
index 4771e1e5..5a5d6344 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/39_B_10_R_R_FI_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,true,false,false
-30008,202002,100,162,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,false,true,false
-30009,202001,100,26,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,false,false,false
-30011,202003,100,5,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,true,false,false
-30012,202002,100,275,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,false,false,false
-30012,202003,100,275,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.930643,96.75644028,8444,R,0,11,12,,true,true,false,false
+30001,202002,100,0.885362387,3.732401398,10.053164,4.0819,76.3852459,7476,R,11,10,12,true,true,false,false,false
+30001,202003,100,0.267924024,,1.497367,1,76.10880829,2003,R,10,0,11,true,,false,true,false
+30002,202001,100,,1.195062676,1,1.930643,96.75644028,9343,R,0,11,12,,true,true,false,false
+30002,202002,100,0.836776196,1.596487645,10.053164,4.0819,76.3852459,7818,R,11,10,12,true,true,false,false,false
+30002,202003,100,0.626375032,,1.497367,1,76.10880829,4897,R,10,0,11,true,,false,true,false
+30003,202001,100,,4.265190233,1,1.930643,96.75644028,7511,R,0,11,12,,true,true,false,false
+30003,202002,100,0.234456131,0.271256932,10.053164,4.0819,76.3852459,1761,R,11,10,12,true,true,false,false,false
+30003,202003,100,3.686541738,,1.497367,1,76.10880829,6492,R,10,0,11,true,,false,true,false
+30004,202001,100,,0.030288689,1,1.930643,96.75644028,64,R,0,11,12,,true,true,false,false
+30004,202002,100,33.015625,11.42162162,10.053164,4.0819,76.3852459,2113,R,11,10,12,true,true,false,false,false
+30004,202003,100,0.087553242,,1.497367,1,76.10880829,185,R,10,0,11,true,,false,true,false
+30005,202001,100,,0.940914,1,1.930643,96.75644028,844,R,0,11,12,,true,true,false,false
+30005,202002,100,1.062796,3.203571,10.053164,4.0819,76.3852459,897,R,11,10,12,true,true,false,false,false
+30005,202003,100,0.312152,,1.497367,1,76.10880829,280,R,10,0,11,true,,false,true,false
+30006,202001,100,,0.996269,1,1.930643,96.75644028,1869,R,0,11,12,,true,true,false,false
+30006,202002,100,1.003745,1.368344,10.053164,4.0819,76.3852459,1876,R,11,10,12,true,true,false,false,false
+30006,202003,100,0.73081,,1.497367,1,76.10880829,1371,R,10,0,11,true,,false,true,false
+30007,202001,100,,4.47564,1,1.930643,96.75644028,12769,R,0,11,12,,true,true,false,false
+30007,202002,100,0.223432,0.248281,10.053164,4.0819,76.3852459,2853,R,11,10,12,true,true,false,false,false
+30007,202003,100,4.02769,,1.497367,1,76.10880829,11491,R,10,0,11,true,,false,true,false
+30008,202001,100,,0.023496,1,1.930643,96.75644028,141,R,0,11,12,,false,true,false,false
+30008,202002,100,42.560284,13.859122,10.053164,4.0819,76.3852459,6001,R,11,10,12,true,true,false,false,false
+30008,202003,100,0.072155,,1.497367,1,76.10880829,433,R,10,0,11,false,,false,true,false
+30009,202001,100,,1.589547,1,1.930643,96.75644028,6417,R,0,11,12,,true,true,false,false
+30009,202002,100,0.62911,3.053707,10.053164,4.0819,76.3852459,4037,R,11,10,12,true,true,false,false,false
+30009,202003,100,0.327471,,1.497367,1,76.10880829,1322,R,10,0,11,true,,false,true,false
+30010,202001,100,,1.332612,1,1.930643,96.75644028,28963,R,0,11,12,,true,true,false,false
+30010,202002,100,0.750406,2.064204,10.053164,4.0819,76.3852459,21734,R,11,10,12,true,true,false,false,false
+30010,202003,100,0.484448,,1.497367,1,76.10880829,10529,R,10,0,11,true,,false,true,false
+30011,202001,100,,5.248035,1,1.930643,96.75644028,6009,R,0,11,12,,true,true,false,false
+30011,202002,100,0.190548,0.226106,10.053164,4.0819,76.3852459,1145,R,11,10,12,false,false,false,false,false
+30011,202003,100,4.422707,,1.497367,1,76.10880829,5064,R,10,0,11,true,,false,true,false
+30012,202001,100,,0.034034,1,1.930643,96.75644028,256,R,0,11,12,,true,true,false,false
+30012,202002,100,29.382813,,10.053164,4.0819,76.3852459,7522,R,11,10,12,true,,false,false,false
+30012,202003,100,,,1.497367,1,76.10880829,11263.196593,FIR,10,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
index fdc96e37..38cf5a56 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/40_TB_10_R_R_FI_no_trim_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,false,true,false
-30005,202001,100,5,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,true,false,false
-30010,202002,100,144,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,false,false,false
-30010,202003,100,144,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.59785,133.0400697,8444,R,0,10,10,,true,true,false,false
+30001,202002,100,0.885362387,3.732401398,8.120199,4.306088,98.54703833,7476,R,10,9,10,true,true,false,false,false
+30001,202003,100,0.267924024,,1.126519,1,66.21860465,2003,R,9,0,9,true,,false,true,false
+30002,202001,100,,1.195062676,1,1.59785,133.0400697,9343,R,0,10,10,,true,true,false,false
+30002,202002,100,0.836776196,1.596487645,8.120199,4.306088,98.54703833,7818,R,10,9,10,true,true,false,false,false
+30002,202003,100,0.626375032,,1.126519,1,66.21860465,4897,R,9,0,9,true,,false,true,false
+30003,202001,100,,4.265190233,1,1.59785,133.0400697,7511,R,0,10,10,,true,true,false,false
+30003,202002,100,0.234456131,0.271256932,8.120199,4.306088,98.54703833,1761,R,10,9,10,true,true,false,false,false
+30003,202003,100,3.686541738,,1.126519,1,66.21860465,6492,R,9,0,9,true,,false,true,false
+30004,202001,100,,0.030288689,1,1.59785,133.0400697,64,R,0,10,10,,true,true,false,false
+30004,202002,100,33.015625,11.42162162,8.120199,4.306088,98.54703833,2113,R,10,9,10,true,true,false,false,false
+30004,202003,100,0.087553242,,1.126519,1,66.21860465,185,R,9,0,9,true,,false,true,false
+30005,202001,100,,0.940914,1,1.59785,133.0400697,844,R,0,10,10,,true,true,false,false
+30005,202002,100,1.062796,3.203571,8.120199,4.306088,98.54703833,897,R,10,9,10,true,true,false,false,false
+30005,202003,100,0.312152,,1.126519,1,66.21860465,280,R,9,0,9,true,,false,true,false
+30006,202001,100,,0.996269,1,1.59785,133.0400697,1869,R,0,10,10,,true,true,false,false
+30006,202002,100,1.003745,1.368344,8.120199,4.306088,98.54703833,1876,R,10,9,10,true,true,false,false,false
+30006,202003,100,0.73081,,1.126519,1,66.21860465,1371,R,9,0,9,true,,false,true,false
+30007,202001,100,,4.47564,1,1.59785,133.0400697,12769,R,0,10,10,,true,true,false,false
+30007,202002,100,0.223432,0.248281,8.120199,4.306088,98.54703833,2853,R,10,9,10,true,true,false,false,false
+30007,202003,100,4.02769,,1.126519,1,66.21860465,11491,R,9,0,9,true,,false,true,false
+30008,202001,100,,0.023496,1,1.59785,133.0400697,141,R,0,10,10,,true,true,false,false
+30008,202002,100,42.560284,13.859122,8.120199,4.306088,98.54703833,6001,R,10,9,10,true,true,false,false,false
+30008,202003,100,0.072155,,1.126519,1,66.21860465,433,R,9,0,9,true,,false,true,false
+30009,202001,100,,1.589547,1,1.59785,133.0400697,6417,R,0,10,10,,true,true,false,false
+30009,202002,100,0.62911,3.053707,8.120199,4.306088,98.54703833,4037,R,10,9,10,true,true,false,false,false
+30009,202003,100,0.327471,,1.126519,1,66.21860465,1322,R,9,0,9,true,,false,true,false
+30010,202001,100,,1.332612,1,1.59785,133.0400697,28963,R,0,10,10,,true,true,false,false
+30010,202002,100,0.750406,,8.120199,4.306088,98.54703833,21734,R,10,9,10,true,,false,false,false
+30010,202003,100,,,1.126519,1,66.21860465,24483.765327,FIR,9,0,9,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
index 6622a6e0..81f9afc0 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/41_TB_10_R_R_FI_filtered_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.773194,96.75644,8444,R,0,9,12,,true,true,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,3.889877,2.962348,81.65588616,7476,R,9,10,11,true,true,true,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.495827,1,76.108808,2003,R,10,0,11,true,,true,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.773194,96.75644,9343,R,0,9,12,,true,true,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,3.889877,2.962348,81.65588616,7818,R,9,10,11,true,true,true,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.495827,1,76.108808,4897,R,10,0,11,true,,true,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.773194,96.75644,7511,R,0,9,12,,true,true,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,3.889877,2.962348,81.65588616,1761,R,9,10,11,true,true,true,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.495827,1,76.108808,6492,R,10,0,11,true,,true,true,,false,true,false
-30004,202001,100,81,,,1,1.773194,96.75644,64,R,0,9,12,,,true,,false,true,false,false
-30004,202002,100,81,,,3.889877,2.962348,81.65588616,2113,R,9,10,11,,,false,true,true,false,false,false
-30004,202003,100,81,,,1.495827,1,76.108808,185,R,10,0,11,,,true,false,,false,true,false
-30005,202001,100,5,,0.940914,1,1.773194,96.75644,844,R,0,9,12,,true,true,,true,true,false,false
-30005,202002,100,5,1.062796,3.203571,3.889877,2.962348,81.65588616,897,R,9,10,11,true,true,true,true,true,false,false,false
-30005,202003,100,5,0.312152,,1.495827,1,76.108808,280,R,10,0,11,true,,true,true,,false,true,false
-30006,202001,100,14,,0.996269,1,1.773194,96.75644,1869,R,0,9,12,,true,true,,true,true,false,false
-30006,202002,100,14,1.003745,1.368344,3.889877,2.962348,81.65588616,1876,R,9,10,11,true,true,true,true,true,false,false,false
-30006,202003,100,14,0.73081,,1.495827,1,76.108808,1371,R,10,0,11,true,,true,true,,false,true,false
-30007,202001,100,12,,4.47564,1,1.773194,96.75644,12769,R,0,9,12,,true,true,,true,true,false,false
-30007,202002,100,12,0.223432,0.248281,3.889877,2.962348,81.65588616,2853,R,9,10,11,true,true,true,true,true,false,false,false
-30007,202003,100,12,4.02769,,1.495827,1,76.108808,11491,R,10,0,11,true,,true,true,,false,true,false
-30008,202001,100,162,,0.023496,1,1.773194,96.75644,141,R,0,9,12,,false,true,,true,true,false,false
-30008,202002,100,162,42.560284,13.859122,3.889877,2.962348,81.65588616,6001,R,9,10,11,false,true,true,true,true,false,false,false
-30008,202003,100,162,0.072155,,1.495827,1,76.108808,433,R,10,0,11,true,,true,true,,false,true,false
-30009,202001,100,26,,1.589547,1,1.773194,96.75644,6417,R,0,9,12,,true,true,,true,true,false,false
-30009,202002,100,26,0.62911,3.053707,3.889877,2.962348,81.65588616,4037,R,9,10,11,true,true,true,true,true,false,false,false
-30009,202003,100,26,0.327471,,1.495827,1,76.108808,1322,R,10,0,11,true,,true,true,,false,true,false
-30010,202001,100,144,,1.332612,1,1.773194,96.75644,28963,R,0,9,12,,true,true,,true,true,false,false
-30010,202002,100,144,0.750406,2.064204,3.889877,2.962348,81.65588616,21734,R,9,10,11,true,true,true,true,true,false,false,false
-30010,202003,100,144,0.484448,,1.495827,1,76.108808,10529,R,10,0,11,true,,true,true,,false,true,false
-30011,202001,100,5,,5.248035,1,1.773194,96.75644,6009,R,0,9,12,,false,true,,true,true,false,false
-30011,202002,100,5,0.190548,0.226106,3.889877,2.962348,81.65588616,1145,R,9,10,11,false,true,true,true,true,false,false,false
-30011,202003,100,5,4.422707,,1.495827,1,76.108808,5064,R,10,0,11,true,,true,true,,false,true,false
-30012,202001,100,275,,0.034034,1,1.773194,96.75644,256,R,0,9,12,,true,true,,true,true,false,false
-30012,202002,100,275,29.382813,,3.889877,2.962348,81.65588616,7522,R,9,10,11,true,,true,true,,false,false,false
-30012,202003,100,275,,,1.495827,1,76.108808,11251.613766,FIR,10,0,11,,,,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.773194,96.75644,8444,R,0,9,12,,true,true,,true,true,false,false
+30001,202002,100,0.885362387,3.732401398,3.889877,2.962348,81.65588616,7476,R,9,10,11,true,true,true,true,true,false,false,false
+30001,202003,100,0.267924024,,1.495827,1,76.108808,2003,R,10,0,11,true,,true,true,,false,true,false
+30002,202001,100,,1.195062676,1,1.773194,96.75644,9343,R,0,9,12,,true,true,,true,true,false,false
+30002,202002,100,0.836776196,1.596487645,3.889877,2.962348,81.65588616,7818,R,9,10,11,true,true,true,true,true,false,false,false
+30002,202003,100,0.626375032,,1.495827,1,76.108808,4897,R,10,0,11,true,,true,true,,false,true,false
+30003,202001,100,,4.265190233,1,1.773194,96.75644,7511,R,0,9,12,,true,true,,true,true,false,false
+30003,202002,100,0.234456131,0.271256932,3.889877,2.962348,81.65588616,1761,R,9,10,11,true,true,true,true,true,false,false,false
+30003,202003,100,3.686541738,,1.495827,1,76.108808,6492,R,10,0,11,true,,true,true,,false,true,false
+30004,202001,100,,,1,1.773194,96.75644,64,R,0,9,12,,,true,,false,true,false,false
+30004,202002,100,,,3.889877,2.962348,81.65588616,2113,R,9,10,11,,,false,true,true,false,false,false
+30004,202003,100,,,1.495827,1,76.108808,185,R,10,0,11,,,true,false,,false,true,false
+30005,202001,100,,0.940914,1,1.773194,96.75644,844,R,0,9,12,,true,true,,true,true,false,false
+30005,202002,100,1.062796,3.203571,3.889877,2.962348,81.65588616,897,R,9,10,11,true,true,true,true,true,false,false,false
+30005,202003,100,0.312152,,1.495827,1,76.108808,280,R,10,0,11,true,,true,true,,false,true,false
+30006,202001,100,,0.996269,1,1.773194,96.75644,1869,R,0,9,12,,true,true,,true,true,false,false
+30006,202002,100,1.003745,1.368344,3.889877,2.962348,81.65588616,1876,R,9,10,11,true,true,true,true,true,false,false,false
+30006,202003,100,0.73081,,1.495827,1,76.108808,1371,R,10,0,11,true,,true,true,,false,true,false
+30007,202001,100,,4.47564,1,1.773194,96.75644,12769,R,0,9,12,,true,true,,true,true,false,false
+30007,202002,100,0.223432,0.248281,3.889877,2.962348,81.65588616,2853,R,9,10,11,true,true,true,true,true,false,false,false
+30007,202003,100,4.02769,,1.495827,1,76.108808,11491,R,10,0,11,true,,true,true,,false,true,false
+30008,202001,100,,0.023496,1,1.773194,96.75644,141,R,0,9,12,,false,true,,true,true,false,false
+30008,202002,100,42.560284,13.859122,3.889877,2.962348,81.65588616,6001,R,9,10,11,false,true,true,true,true,false,false,false
+30008,202003,100,0.072155,,1.495827,1,76.108808,433,R,10,0,11,true,,true,true,,false,true,false
+30009,202001,100,,1.589547,1,1.773194,96.75644,6417,R,0,9,12,,true,true,,true,true,false,false
+30009,202002,100,0.62911,3.053707,3.889877,2.962348,81.65588616,4037,R,9,10,11,true,true,true,true,true,false,false,false
+30009,202003,100,0.327471,,1.495827,1,76.108808,1322,R,10,0,11,true,,true,true,,false,true,false
+30010,202001,100,,1.332612,1,1.773194,96.75644,28963,R,0,9,12,,true,true,,true,true,false,false
+30010,202002,100,0.750406,2.064204,3.889877,2.962348,81.65588616,21734,R,9,10,11,true,true,true,true,true,false,false,false
+30010,202003,100,0.484448,,1.495827,1,76.108808,10529,R,10,0,11,true,,true,true,,false,true,false
+30011,202001,100,,5.248035,1,1.773194,96.75644,6009,R,0,9,12,,false,true,,true,true,false,false
+30011,202002,100,0.190548,0.226106,3.889877,2.962348,81.65588616,1145,R,9,10,11,false,true,true,true,true,false,false,false
+30011,202003,100,4.422707,,1.495827,1,76.108808,5064,R,10,0,11,true,,true,true,,false,true,false
+30012,202001,100,,0.034034,1,1.773194,96.75644,256,R,0,9,12,,true,true,,true,true,false,false
+30012,202002,100,29.382813,,3.889877,2.962348,81.65588616,7522,R,9,10,11,true,,true,true,,false,false,false
+30012,202003,100,,,1.495827,1,76.108808,11251.613766,FIR,10,0,11,,,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
index 555dedfb..8d4322f5 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/42_TB_10_R_R_FI-BI_R_R_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,false,false
-80001,202002,100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,false,false,false
-80001,202003,100,89,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,false,true,false
-80002,202001,100,83,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,true,false,false
-80002,202002,100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,false,false,false
-80002,202003,100,83,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,false,true,false
-80003,202001,100,4,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,true,false,false
-80003,202002,100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,false,false,false
-80003,202003,100,4,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,false,true,false
-80004,202001,100,76,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,true,false,false
-80004,202002,100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,false,false,false
-80004,202003,100,76,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,false,true,false
-80005,202001,100,18,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,true,false,false
-80005,202002,100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,false,false,false
-80005,202003,100,18,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,false,true,false
-80006,202001,100,94,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,true,false,false
-80006,202002,100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,false,false,false
-80006,202003,100,94,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,false,true,false
-80007,202001,100,8,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,true,false,false
-80007,202002,100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,false,false,false
-80007,202003,100,8,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,false,true,false
-80008,202001,100,304,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,true,false,false
-80008,202002,100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,false,false,false
-80008,202003,100,304,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,false,true,false
-80009,202001,100,45,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,true,false,false
-80009,202002,100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,false,false,false
-80009,202003,100,45,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,false,true,false
-80010,202001,100,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,true,false,false
-80010,202002,100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,false,false,false
-80010,202003,100,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,false,true,false
-80011,202001,100,19,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,true,false,false
-80011,202002,100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,false,false,false
-80011,202003,100,19,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,false,true,false
-80012,202001,100,304,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,true,false,false
-80012,202002,100,304,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,false,false,false
-80012,202003,100,304,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,false,true,false
-80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,false,false
-80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,false,false,false
-80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,false,true,false
-80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,false,false
-80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,false,false,false
-80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,false,true,false
-80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,false,false
-80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,false,false,false
-80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,false,true,false
-80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,false,false
-80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,false,false,false
-80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,false,true,false
-80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,false,false
-80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,false,false,false
-80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,false,true,false
-80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,false,false
-80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,false,false,false
-80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,false,true,false
-80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,false,false
-80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,false,false,false
-80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,false,true,false
-80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,false,false
-80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,false,false,false
-80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,false,true,false
-80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,false,false
-80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,false,false,false
-80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,false,true,false
-80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,false,false
-80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,false,false,false
-80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,false,true,false
-80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,false,false
-80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,false,false,false
-80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,false,true,false
-80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,true,false,false
-80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,false,false,false
-80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,100,,1.03678779721848,1,2.076231,107.088287,9244,R,0,10,12,,true,true,false,false
+80001,202002,100,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,8916,R,10,9,12,true,true,false,false,false
+80001,202003,100,0.694706146253926,,0.947092,1,69.128571,6194,R,9,0,11,true,,false,true,false
+80002,202001,100,,0.81755039810266,1,2.076231,107.088287,4826,R,0,10,12,,true,true,false,false
+80002,202002,100,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,5903,R,10,9,12,true,true,false,false,false
+80002,202003,100,0.803489750974081,,0.947092,1,69.128571,4743,R,9,0,11,true,,false,true,false
+80003,202001,100,,7.46653543307087,1,2.076231,107.088287,7586,R,0,10,12,,true,true,false,false
+80003,202002,100,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1016,R,10,9,12,true,true,false,false,false
+80003,202003,100,1.40649606299213,,0.947092,1,69.128571,1429,R,9,0,11,true,,false,true,false
+80004,202001,100,,1.30584756898817,1,2.076231,107.088287,3975,R,0,10,12,,true,true,false,false
+80004,202002,100,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,3044,R,10,9,12,true,true,false,false,false
+80004,202003,100,1.20663600525624,,0.947092,1,69.128571,3673,R,9,0,11,true,,false,true,false
+80005,202001,100,,0.62191605254726,1,2.076231,107.088287,1941,R,0,10,12,,false,true,false,false
+80005,202002,100,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,3121,R,10,9,12,false,false,false,false,false
+80005,202003,100,0.387055430951618,,0.947092,1,69.128571,1208,R,9,0,11,false,,false,true,false
+80006,202001,100,,0.762987012987013,1,2.076231,107.088287,5405,R,0,10,12,,true,true,false,false
+80006,202002,100,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,7084,R,10,9,12,true,true,false,false,false
+80006,202003,100,0.702992659514399,,0.947092,1,69.128571,4980,R,9,0,11,true,,false,true,false
+80007,202001,100,,5.33286467486819,1,2.076231,107.088287,15172,R,0,10,12,,true,true,false,false
+80007,202002,100,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,2845,R,10,9,12,true,true,false,false,false
+80007,202003,100,1.23057996485062,,0.947092,1,69.128571,3501,R,9,0,11,true,,false,true,false
+80008,202001,100,,1.12953080601566,1,2.076231,107.088287,16298,R,0,10,12,,true,true,false,false
+80008,202002,100,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,14429,R,10,9,12,true,true,false,false,false
+80008,202003,100,0.990713147134244,,0.947092,1,69.128571,14295,R,9,0,11,true,,false,true,false
+80009,202001,100,,0.740636891648308,1,2.076231,107.088287,3698,R,0,10,12,,true,true,false,false
+80009,202002,100,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,4993,R,10,9,12,true,true,false,false,false
+80009,202003,100,0.843581013418786,,0.947092,1,69.128571,4212,R,9,0,11,true,,false,true,false
+80010,202001,100,,0.76056338028169,1,2.076231,107.088287,7722,R,0,10,12,,true,true,false,false
+80010,202002,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,10153,R,10,9,12,true,true,false,false,false
+80010,202003,100,0.644637053087757,,0.947092,1,69.128571,6545,R,9,0,11,true,,false,true,false
+80011,202001,100,,8.36614281775572,1,2.076231,107.088287,30344,R,0,10,12,,false,true,false,false
+80011,202002,100,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,3627,R,10,9,12,false,false,false,false,false
+80011,202003,100,2.0093741384064,,0.947092,1,69.128571,7288,R,9,0,11,false,,false,true,false
+80012,202001,100,,1.40900838592548,1,2.076231,107.088287,16298,R,0,10,12,,true,true,false,false
+80012,202002,100,0.709718983924408,,0.88456,1.133882,67.043706,11567,R,10,9,12,true,,false,false,false
+80012,202003,100,,,0.947092,1,69.128571,10955.018052,FIR,9,0,11,,,false,true,false
+80013,202001,200,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,false,false
+80013,202002,200,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,false,false,false
+80013,202003,200,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,false,true,false
+80014,202001,200,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,false,false
+80014,202002,200,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,false,false,false
+80014,202003,200,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,false,true,false
+80015,202001,200,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,false,false
+80015,202002,200,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,false,false,false
+80015,202003,200,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,false,true,false
+80016,202001,200,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,false,false
+80016,202002,200,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,false,false,false
+80016,202003,200,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,false,true,false
+80017,202001,200,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,false,false
+80017,202002,200,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,false,false,false
+80017,202003,200,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,false,true,false
+80018,202001,200,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,false,false
+80018,202002,200,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,false,false,false
+80018,202003,200,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,false,true,false
+80019,202001,200,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,false,false
+80019,202002,200,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,false,false,false
+80019,202003,200,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,false,true,false
+80020,202001,200,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,false,false
+80020,202002,200,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,false,false,false
+80020,202003,200,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,false,true,false
+80021,202001,200,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,false,false
+80021,202002,200,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,false,false,false
+80021,202003,200,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,false,true,false
+80022,202001,200,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,false,false
+80022,202002,200,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,false,false,false
+80022,202003,200,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,false,true,false
+80023,202001,200,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,false,false
+80023,202002,200,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,false,false,false
+80023,202003,200,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,false,true,false
+80024,202001,200,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,true,false,false
+80024,202002,200,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,false,false,false
+80024,202003,200,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
index ad1513f9..74040d73 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/43_TB_10_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,false,false
-90001,202002,100,89,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,false,false,false
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,false,true,false
-90002,202001,100,83,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,true,false,false
-90002,202002,100,83,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,false,false,false
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,false,true,false
-90003,202001,100,4,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,true,false,false
-90003,202002,100,4,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,false,false,false
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,false,true,false
-90004,202001,100,76,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,true,false,false
-90004,202002,100,76,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,false,false,false
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,false,true,false
-90005,202001,100,18,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,true,false,false
-90005,202002,100,18,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,false,false,false
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,false,true,false
-90006,202001,100,94,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,true,false,false
-90006,202002,100,94,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,false,false,false
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,false,true,false
-90007,202001,100,8,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,true,false,false
-90007,202002,100,8,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,false,false,false
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,false,true,false
-90008,202001,100,304,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,false,false
-90008,202002,100,304,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,false,false,false
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,false,true,false
-90009,202001,100,45,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,true,false,false
-90009,202002,100,45,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,false,false,false
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,false,true,false
-90010,202001,100,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,true,false,false
-90010,202002,100,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,false,false,false
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,false,true,false
-90011,202001,100,19,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,true,false,false
-90011,202002,100,19,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,false,false,false
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,false,true,false
-90012,202001,100,304,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,false,false
-90012,202002,100,304,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,false,false,false
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,false,true,false
-90013,202001,100,54,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,true,false,false
-90013,202002,100,54,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,false,false,false
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,false,true,false
-90014,202001,100,47,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,true,false,false
-90014,202002,100,42,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,false,false,false
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,false,true,false
-90015,202001,100,57,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,true,false,false
-90015,202002,100,57,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,false,false,false
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,false,true,false
-90016,202001,100,163,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,true,false,false
-90016,202002,100,163,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,false,false,false
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,false,true,false
-90017,202001,100,149,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,true,false,false
-90017,202002,100,149,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,false,false,false
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,false,true,false
-90018,202001,100,126,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,true,false,false
-90018,202002,100,126,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,false,false,false
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,false,true,false
-90019,202001,100,6,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,true,false,false
-90019,202002,100,6,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,false,false,false
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,false,true,false
-90020,202001,100,22,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,true,false,false
-90020,202002,100,22,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,false,false,false
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,false,true,false
-90021,202001,100,155,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,true,false,false
-90021,202002,100,155,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,false,false,false
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+90001,202001,100,,1.03678779721848,1,1.835688,132.8421946,9244,R,0,18,20,,true,true,false,false
+90001,202002,100,0.964517524881004,1.43945753955441,0.906354,1.082843,113.3255814,8916,R,18,18,20,true,true,false,false,false
+90001,202003,100,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,false,true,false
+90002,202001,100,,0.81755039810266,1,1.835688,132.8421946,4826,R,0,18,20,,true,true,false,false
+90002,202002,100,1.22316618317447,1.24457094665823,0.906354,1.082843,113.3255814,5903,R,18,18,20,true,true,false,false,false
+90002,202003,100,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,false,true,false
+90003,202001,100,,7.46653543307087,1,1.835688,132.8421946,7586,R,0,18,20,,true,true,false,false
+90003,202002,100,0.133930925388874,0.710986703988803,0.906354,1.082843,113.3255814,1016,R,18,18,20,true,true,false,false,false
+90003,202003,100,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,false,true,false
+90004,202001,100,,1.30584756898817,1,1.835688,132.8421946,3975,R,0,18,20,,true,true,false,false
+90004,202002,100,0.765786163522013,0.828750340321263,0.906354,1.082843,113.3255814,3044,R,18,18,20,true,true,false,false,false
+90004,202003,100,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,false,true,false
+90005,202001,100,,0.62191605254726,1,1.835688,132.8421946,1941,R,0,18,20,,true,true,false,false
+90005,202002,100,1.60793405461103,2.58360927152318,0.906354,1.082843,113.3255814,3121,R,18,18,20,true,true,false,false,false
+90005,202003,100,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,false,true,false
+90006,202001,100,,0.762987012987013,1,1.835688,132.8421946,5405,R,0,18,20,,true,true,false,false
+90006,202002,100,1.31063829787234,1.42248995983936,0.906354,1.082843,113.3255814,7084,R,18,18,20,true,true,false,false,false
+90006,202003,100,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,false,true,false
+90007,202001,100,,5.33286467486819,1,1.835688,132.8421946,15172,R,0,18,20,,true,true,false,false
+90007,202002,100,0.18751647772212,0.812624964295915,0.906354,1.082843,113.3255814,2845,R,18,18,20,true,true,false,false,false
+90007,202003,100,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,false,true,false
+90008,202001,100,,1.12953080601566,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,false,false
+90008,202002,100,0.885323352558596,1.00937390696048,0.906354,1.082843,113.3255814,14429,R,18,18,20,true,true,false,false,false
+90008,202003,100,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,false,true,false
+90009,202001,100,,0.740636891648308,1,1.835688,132.8421946,3698,R,0,18,20,,true,true,false,false
+90009,202002,100,1.35018929150892,1.18542260208927,0.906354,1.082843,113.3255814,4993,R,18,18,20,true,true,false,false,false
+90009,202003,100,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,false,true,false
+90010,202001,100,,0.76056338028169,1,1.835688,132.8421946,7722,R,0,18,20,,true,true,false,false
+90010,202002,100,1.31481481481481,1.55126050420168,0.906354,1.082843,113.3255814,10153,R,18,18,20,true,true,false,false,false
+90010,202003,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,false,true,false
+90011,202001,100,,8.36614281775572,1,1.835688,132.8421946,30344,R,0,18,20,,false,true,false,false
+90011,202002,100,0.119529396256262,0.497667398463227,0.906354,1.082843,113.3255814,3627,R,18,18,20,false,true,false,false,false
+90011,202003,100,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,false,true,false
+90012,202001,100,,1.40900838592548,1,1.835688,132.8421946,16298,R,0,18,20,,true,true,false,false
+90012,202002,100,0.709718983924408,0.857831504004746,0.906354,1.082843,113.3255814,11567,R,18,18,20,true,true,false,false,false
+90012,202003,100,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,false,true,false
+90013,202001,100,,1.10678653656397,1,1.835688,132.8421946,20190,R,0,18,20,,true,true,false,false
+90013,202002,100,0.903516592372462,0.63283147158815,0.906354,1.082843,113.3255814,18242,R,18,18,20,true,true,false,false,false
+90013,202003,100,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,false,true,false
+90014,202001,100,,0.845909451945989,1,1.835688,132.8421946,4260,R,0,18,20,,true,true,false,false
+90014,202002,100,1.18215962441315,0.776681061073411,0.906354,1.082843,113.3255814,5036,R,18,18,20,true,true,false,false,false
+90014,202003,100,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,false,true,false
+90015,202001,100,,3.88684582743989,1,1.835688,132.8421946,19236,R,0,18,20,,true,true,false,false
+90015,202002,100,0.257278020378457,1.39644469525959,0.906354,1.082843,113.3255814,4949,R,18,18,20,true,true,false,false,false
+90015,202003,100,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,false,true,false
+90016,202001,100,,0.906723456038941,1,1.835688,132.8421946,14902,R,0,18,20,,true,true,false,false
+90016,202002,100,1.10287209770501,0.666653145661786,0.906354,1.082843,113.3255814,16435,R,18,18,20,true,true,false,false,false
+90016,202003,100,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,false,true,false
+90017,202001,100,,0.702286449569435,1,1.835688,132.8421946,35476,R,0,18,20,,true,true,false,false
+90017,202002,100,1.42392039688804,0.944611702227126,0.906354,1.082843,113.3255814,50515,R,18,18,20,true,true,false,false,false
+90017,202003,100,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,false,true,false
+90018,202001,100,,0.543196798493409,1,1.835688,132.8421946,13845,R,0,18,20,,false,true,false,false
+90018,202002,100,1.8409534127844,0.929913532051516,0.906354,1.082843,113.3255814,25488,R,18,18,20,false,true,false,false,false
+90018,202003,100,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,false,true,false
+90019,202001,100,,2.53225806451613,1,1.835688,132.8421946,1099,R,0,18,20,,true,true,false,false
+90019,202002,100,0.394904458598726,3.5,0.906354,1.082843,113.3255814,434,R,18,18,20,true,false,false,false,false
+90019,202003,100,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,false,true,false
+90020,202001,100,,1.67735470941884,1,1.835688,132.8421946,3348,R,0,18,20,,true,true,false,false
+90020,202002,100,0.596176821983274,0.395169273411206,0.906354,1.082843,113.3255814,1996,R,18,18,20,true,false,false,false,false
+90020,202003,100,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,false,true,false
+90021,202001,100,,,1,1.835688,132.8421946,41834.463793,BI,0,18,20,,,true,false,false
+90021,202002,100,,,0.906354,1.082843,113.3255814,22789.522255,BI,18,18,20,,,false,false,false
+90021,202003,100,,,1.072437,1,126.259645,21046,R,18,0,21,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
index 560b8c9a..5f09c922 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/44_TB_5_BI_BI_R_boundary_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-100001,202001,100,89,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,false,false
-100001,202002,100,89,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,false,false,false
-100001,202003,100,89,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,false,true,false
-100002,202001,100,83,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,true,false,false
-100002,202002,100,83,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,false,false,false
-100002,202003,100,83,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,false,true,false
-100003,202001,100,4,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,true,false,false
-100003,202002,100,4,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,false,false,false
-100003,202003,100,4,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,false,true,false
-100004,202001,100,76,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,true,false,false
-100004,202002,100,76,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,false,false,false
-100004,202003,100,76,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,false,true,false
-100005,202001,100,18,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,true,false,false
-100005,202002,100,18,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,false,false,false
-100005,202003,100,18,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,false,true,false
-100006,202001,100,94,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,true,false,false
-100006,202002,100,94,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,false,false,false
-100006,202003,100,94,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,false,true,false
-100007,202001,100,8,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,true,false,false
-100007,202002,100,8,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,false,false,false
-100007,202003,100,8,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,false,true,false
-100008,202001,100,304,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,false,false
-100008,202002,100,304,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,false,false,false
-100008,202003,100,304,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,false,true,false
-100009,202001,100,45,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,true,false,false
-100009,202002,100,45,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,false,false,false
-100009,202003,100,45,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,false,true,false
-100010,202001,100,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,true,false,false
-100010,202002,100,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,false,false,false
-100010,202003,100,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,false,true,false
-100011,202001,100,19,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,true,false,false
-100011,202002,100,19,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,false,false,false
-100011,202003,100,19,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,false,true,false
-100012,202001,100,304,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,false,false
-100012,202002,100,304,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,false,false,false
-100012,202003,100,304,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,false,true,false
-100013,202001,100,54,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,true,false,false
-100013,202002,100,54,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,false,false,false
-100013,202003,100,54,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,false,true,false
-100014,202001,100,47,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,true,false,false
-100014,202002,100,42,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,false,false,false
-100014,202003,100,42,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,false,true,false
-100015,202001,100,57,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,true,false,false
-100015,202002,100,57,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,false,false,false
-100015,202003,100,57,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,false,true,false
-100016,202001,100,163,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,true,false,false
-100016,202002,100,163,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,false,false,false
-100016,202003,100,163,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,false,true,false
-100017,202001,100,149,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,true,false,false
-100017,202002,100,149,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,false,false,false
-100017,202003,100,149,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,false,true,false
-100018,202001,100,126,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,true,false,false
-100018,202002,100,126,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,false,false,false
-100018,202003,100,126,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,false,true,false
-100019,202001,100,6,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,true,false,false
-100019,202002,100,6,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,false,false,false
-100019,202003,100,6,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,false,true,false
-100020,202001,100,22,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,true,false,false
-100020,202002,100,22,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,false,false,false
-100020,202003,100,22,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,false,true,false
-100021,202001,100,155,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,true,false,false
-100021,202002,100,155,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,false,false,false
-100021,202003,100,155,,,1.106007,1,126.259645,21046,R,20,0,21,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+100001,202001,100,,1.03678779721848,1,2.097587,132.8421946,9244,R,0,20,20,,true,true,false,false
+100001,202002,100,0.964517524881004,1.43945753955441,0.913742,1.169318,113.3255814,8916,R,20,20,20,true,true,false,false,false
+100001,202003,100,0.694706146253926,,1.106007,1,126.259645,6194,R,20,0,21,true,,false,true,false
+100002,202001,100,,0.81755039810266,1,2.097587,132.8421946,4826,R,0,20,20,,true,true,false,false
+100002,202002,100,1.22316618317447,1.24457094665823,0.913742,1.169318,113.3255814,5903,R,20,20,20,true,true,false,false,false
+100002,202003,100,0.803489750974081,,1.106007,1,126.259645,4743,R,20,0,21,true,,false,true,false
+100003,202001,100,,7.46653543307087,1,2.097587,132.8421946,7586,R,0,20,20,,true,true,false,false
+100003,202002,100,0.133930925388874,0.710986703988803,0.913742,1.169318,113.3255814,1016,R,20,20,20,true,true,false,false,false
+100003,202003,100,1.40649606299213,,1.106007,1,126.259645,1429,R,20,0,21,true,,false,true,false
+100004,202001,100,,1.30584756898817,1,2.097587,132.8421946,3975,R,0,20,20,,true,true,false,false
+100004,202002,100,0.765786163522013,0.828750340321263,0.913742,1.169318,113.3255814,3044,R,20,20,20,true,true,false,false,false
+100004,202003,100,1.20663600525624,,1.106007,1,126.259645,3673,R,20,0,21,true,,false,true,false
+100005,202001,100,,0.62191605254726,1,2.097587,132.8421946,1941,R,0,20,20,,true,true,false,false
+100005,202002,100,1.60793405461103,2.58360927152318,0.913742,1.169318,113.3255814,3121,R,20,20,20,true,true,false,false,false
+100005,202003,100,0.387055430951618,,1.106007,1,126.259645,1208,R,20,0,21,true,,false,true,false
+100006,202001,100,,0.762987012987013,1,2.097587,132.8421946,5405,R,0,20,20,,true,true,false,false
+100006,202002,100,1.31063829787234,1.42248995983936,0.913742,1.169318,113.3255814,7084,R,20,20,20,true,true,false,false,false
+100006,202003,100,0.702992659514399,,1.106007,1,126.259645,4980,R,20,0,21,true,,false,true,false
+100007,202001,100,,5.33286467486819,1,2.097587,132.8421946,15172,R,0,20,20,,true,true,false,false
+100007,202002,100,0.18751647772212,0.812624964295915,0.913742,1.169318,113.3255814,2845,R,20,20,20,true,true,false,false,false
+100007,202003,100,1.23057996485062,,1.106007,1,126.259645,3501,R,20,0,21,true,,false,true,false
+100008,202001,100,,1.12953080601566,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,false,false
+100008,202002,100,0.885323352558596,1.00937390696048,0.913742,1.169318,113.3255814,14429,R,20,20,20,true,true,false,false,false
+100008,202003,100,0.990713147134244,,1.106007,1,126.259645,14295,R,20,0,21,true,,false,true,false
+100009,202001,100,,0.740636891648308,1,2.097587,132.8421946,3698,R,0,20,20,,true,true,false,false
+100009,202002,100,1.35018929150892,1.18542260208927,0.913742,1.169318,113.3255814,4993,R,20,20,20,true,true,false,false,false
+100009,202003,100,0.843581013418786,,1.106007,1,126.259645,4212,R,20,0,21,true,,false,true,false
+100010,202001,100,,0.76056338028169,1,2.097587,132.8421946,7722,R,0,20,20,,true,true,false,false
+100010,202002,100,1.31481481481481,1.55126050420168,0.913742,1.169318,113.3255814,10153,R,20,20,20,true,true,false,false,false
+100010,202003,100,0.644637053087757,,1.106007,1,126.259645,6545,R,20,0,21,true,,false,true,false
+100011,202001,100,,8.36614281775572,1,2.097587,132.8421946,30344,R,0,20,20,,true,true,false,false
+100011,202002,100,0.119529396256262,0.497667398463227,0.913742,1.169318,113.3255814,3627,R,20,20,20,true,true,false,false,false
+100011,202003,100,2.0093741384064,,1.106007,1,126.259645,7288,R,20,0,21,true,,false,true,false
+100012,202001,100,,1.40900838592548,1,2.097587,132.8421946,16298,R,0,20,20,,true,true,false,false
+100012,202002,100,0.709718983924408,0.857831504004746,0.913742,1.169318,113.3255814,11567,R,20,20,20,true,true,false,false,false
+100012,202003,100,1.1657300942336,,1.106007,1,126.259645,13484,R,20,0,21,true,,false,true,false
+100013,202001,100,,1.10678653656397,1,2.097587,132.8421946,20190,R,0,20,20,,true,true,false,false
+100013,202002,100,0.903516592372462,0.63283147158815,0.913742,1.169318,113.3255814,18242,R,20,20,20,true,true,false,false,false
+100013,202003,100,1.58019953952418,,1.106007,1,126.259645,28826,R,20,0,21,true,,false,true,false
+100014,202001,100,,0.845909451945989,1,2.097587,132.8421946,4260,R,0,20,20,,true,true,false,false
+100014,202002,100,1.18215962441315,0.776681061073411,0.913742,1.169318,113.3255814,5036,R,20,20,20,true,true,false,false,false
+100014,202003,100,1.28752978554408,,1.106007,1,126.259645,6484,R,20,0,21,true,,false,true,false
+100015,202001,100,,3.88684582743989,1,2.097587,132.8421946,19236,R,0,20,20,,true,true,false,false
+100015,202002,100,0.257278020378457,1.39644469525959,0.913742,1.169318,113.3255814,4949,R,20,20,20,true,true,false,false,false
+100015,202003,100,0.716104263487573,,1.106007,1,126.259645,3544,R,20,0,21,true,,false,true,false
+100016,202001,100,,0.906723456038941,1,2.097587,132.8421946,14902,R,0,20,20,,true,true,false,false
+100016,202002,100,1.10287209770501,0.666653145661786,0.913742,1.169318,113.3255814,16435,R,20,20,20,true,true,false,false,false
+100016,202003,100,1.500030422878,,1.106007,1,126.259645,24653,R,20,0,21,true,,false,true,false
+100017,202001,100,,0.702286449569435,1,2.097587,132.8421946,35476,R,0,20,20,,true,true,false,false
+100017,202002,100,1.42392039688804,0.944611702227126,0.913742,1.169318,113.3255814,50515,R,20,20,20,true,true,false,false,false
+100017,202003,100,1.05863604869841,,1.106007,1,126.259645,53477,R,20,0,21,true,,false,true,false
+100018,202001,100,,0.543196798493409,1,2.097587,132.8421946,13845,R,0,20,20,,true,true,false,false
+100018,202002,100,1.8409534127844,0.929913532051516,0.913742,1.169318,113.3255814,25488,R,20,20,20,true,true,false,false,false
+100018,202003,100,1.07536880100439,,1.106007,1,126.259645,27409,R,20,0,21,true,,false,true,false
+100019,202001,100,,2.53225806451613,1,2.097587,132.8421946,1099,R,0,20,20,,true,true,false,false
+100019,202002,100,0.394904458598726,3.5,0.913742,1.169318,113.3255814,434,R,20,20,20,true,true,false,false,false
+100019,202003,100,0.285714285714286,,1.106007,1,126.259645,124,R,20,0,21,true,,false,true,false
+100020,202001,100,,1.67735470941884,1,2.097587,132.8421946,3348,R,0,20,20,,true,true,false,false
+100020,202002,100,0.596176821983274,0.395169273411206,0.913742,1.169318,113.3255814,1996,R,20,20,20,true,true,false,false,false
+100020,202003,100,2.53056112224449,,1.106007,1,126.259645,5051,R,20,0,21,true,,false,true,false
+100021,202001,100,,,1,2.097587,132.8421946,51620.467146,BI,0,20,20,,,true,false,false
+100021,202002,100,,,0.913742,1.169318,113.3255814,24609.456656,BI,20,20,20,,,false,false,false
+100021,202003,100,,,1.106007,1,126.259645,21046,R,20,0,21,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
index f760bbc7..f609680d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/45_TB_10_R_R_FI_partial_no_trim_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,false,false
-30001,202002,100,51,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,false,false,false
-30001,202003,100,51,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,true,false,false
-30002,202002,100,72,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,false,false,false
-30002,202003,100,72,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,false,false,false
-30003,202003,100,7,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,false,false,false
-30004,202003,100,81,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,false,false,false
-30008,202003,100,162,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,true,false,false
-30010,202002,100,144,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,false,false,false
-30011,202001,100,5,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,true,false,false
-30011,202002,100,5,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,false,false,false
-30012,202001,100,275,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,true,false,false
-30012,202002,100,275,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,false,false,false
-30012,202003,100,275,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,,1.1294810058855,1,1.598904,96.75644028,8444,R,0,10,12,,true,true,false,false
+30001,202002,100,0.885362387494079,3.73240139790315,6.802452,4.306088,76.3852459,7476,R,10,9,12,true,true,false,false,false
+30001,202003,100,0.267924023542001,,1.126519,1,66.21860465,2003,R,9,0,9,true,,false,true,false
+30002,202001,100,,1.19506267587618,1,1.598904,96.75644028,9343,R,0,10,12,,true,true,false,false
+30002,202002,100,0.836776196082629,1.59648764549724,6.802452,4.306088,76.3852459,7818,R,10,9,12,true,true,false,false,false
+30002,202003,100,0.626375031977488,,1.126519,1,66.21860465,4897,R,9,0,9,true,,false,true,false
+30003,202001,100,,4.26519023282226,1,1.598904,96.75644028,7511,R,0,10,12,,true,true,false,false
+30003,202002,100,0.234456131007855,0.271256931608133,6.802452,4.306088,76.3852459,1761,R,10,9,12,true,true,false,false,false
+30003,202003,100,3.68654173764906,,1.126519,1,66.21860465,6492,R,9,0,9,true,,false,true,false
+30004,202001,100,,0.0302886890676763,1,1.598904,96.75644028,64,R,0,10,12,,true,true,false,false
+30004,202002,100,33.015625,11.4216216216216,6.802452,4.306088,76.3852459,2113,R,10,9,12,true,true,false,false,false
+30004,202003,100,0.0875532418362518,,1.126519,1,66.21860465,185,R,9,0,9,true,,false,true,false
+30005,202001,100,,0.940914158305463,1,1.598904,96.75644028,844,R,0,10,12,,true,true,false,false
+30005,202002,100,1.06279620853081,3.20357142857143,6.802452,4.306088,76.3852459,897,R,10,9,12,true,true,false,false,false
+30005,202003,100,0.312151616499443,,1.126519,1,66.21860465,280,R,9,0,9,true,,false,true,false
+30006,202001,100,,0.996268656716418,1,1.598904,96.75644028,1869,R,0,10,12,,true,true,false,false
+30006,202002,100,1.00374531835206,1.36834427425237,6.802452,4.306088,76.3852459,1876,R,10,9,12,true,true,false,false,false
+30006,202003,100,0.730810234541578,,1.126519,1,66.21860465,1371,R,9,0,9,true,,false,true,false
+30007,202001,100,,4.47563967753242,1,1.598904,96.75644028,12769,R,0,10,12,,true,true,false,false
+30007,202002,100,0.223431748766544,0.248281263597598,6.802452,4.306088,76.3852459,2853,R,10,9,12,true,true,false,false,false
+30007,202003,100,4.02769015071854,,1.126519,1,66.21860465,11491,R,9,0,9,true,,false,true,false
+30008,202001,100,,0.0234960839860023,1,1.598904,96.75644028,141,R,0,10,12,,false,true,false,false
+30008,202002,100,42.5602836879433,13.8591224018476,6.802452,4.306088,76.3852459,6001,R,10,9,12,false,true,false,false,false
+30008,202003,100,0.0721546408931845,,1.126519,1,66.21860465,433,R,9,0,9,true,,false,true,false
+30009,202001,100,,1.58954669308893,1,1.598904,96.75644028,6417,R,0,10,12,,true,true,false,false
+30009,202002,100,0.629110176094748,3.05370650529501,6.802452,4.306088,76.3852459,4037,R,10,9,12,true,true,false,false,false
+30009,202003,100,0.327470894228387,,1.126519,1,66.21860465,1322,R,9,0,9,true,,false,true,false
+30010,202001,100,,1.33261249654919,1,1.598904,96.75644028,28963,R,0,10,12,,true,true,false,false
+30010,202002,100,0.750405690018299,,6.802452,4.306088,76.3852459,21734,R,10,9,12,true,,false,false,false
+30011,202001,100,,5.24803493449782,1,1.598904,96.75644028,6009,R,0,10,12,,false,true,false,false
+30011,202002,100,0.190547512065235,,6.802452,4.306088,76.3852459,1145,R,10,9,12,false,,false,false,false
+30012,202001,100,,0.0340335017282638,1,1.598904,96.75644028,256,R,0,10,12,,true,true,false,false
+30012,202002,100,29.3828125,,6.802452,4.306088,76.3852459,7522,R,10,9,12,true,,false,false,false
+30012,202003,100,,,1.126519,1,66.21860465,8473.676396,FIR,9,0,9,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
index ed5c1c1a..7ca3bf35 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/46_TB_10_BI_BI_R_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,true,true,,true,true,false,false
-90001,202002,100,89,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,8916,R,17,18,20,true,true,true,true,true,false,false,false
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,,false,true,false
-90002,202001,100,83,,0.81755039810266,1,1.504462,128.8429705,4826,R,0,17,19,,true,true,,true,true,false,false
-90002,202002,100,83,1.22316618317447,1.24457094665823,0.95179,1.082843,113.3255814,5903,R,17,18,20,true,true,true,true,true,false,false,false
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,true,,false,true,false
-90003,202001,100,4,,,1,1.504462,128.8429705,7586,R,0,17,19,,,false,,true,true,false,false
-90003,202002,100,4,,0.710986703988803,0.95179,1.082843,113.3255814,1016,R,17,18,20,,true,true,false,true,false,false,false
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,true,,false,true,false
-90004,202001,100,76,,1.30584756898817,1,1.504462,128.8429705,3975,R,0,17,19,,true,true,,true,true,false,false
-90004,202002,100,76,0.765786163522013,0.828750340321263,0.95179,1.082843,113.3255814,3044,R,17,18,20,true,true,true,true,true,false,false,false
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,true,,false,true,false
-90005,202001,100,18,,0.62191605254726,1,1.504462,128.8429705,1941,R,0,17,19,,true,true,,true,true,false,false
-90005,202002,100,18,1.60793405461103,2.58360927152318,0.95179,1.082843,113.3255814,3121,R,17,18,20,true,true,true,true,true,false,false,false
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,true,,false,true,false
-90006,202001,100,94,,0.762987012987013,1,1.504462,128.8429705,5405,R,0,17,19,,true,true,,true,true,false,false
-90006,202002,100,94,1.31063829787234,1.42248995983936,0.95179,1.082843,113.3255814,7084,R,17,18,20,true,true,true,true,true,false,false,false
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,true,,false,true,false
-90007,202001,100,8,,5.33286467486819,1,1.504462,128.8429705,15172,R,0,17,19,,true,true,,true,true,false,false
-90007,202002,100,8,0.18751647772212,0.812624964295915,0.95179,1.082843,113.3255814,2845,R,17,18,20,true,true,true,true,true,false,false,false
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,true,,false,true,false
-90008,202001,100,304,,1.12953080601566,1,1.504462,128.8429705,16298,R,0,17,19,,true,true,,true,true,false,false
-90008,202002,100,304,0.885323352558596,1.00937390696048,0.95179,1.082843,113.3255814,14429,R,17,18,20,true,true,true,true,true,false,false,false
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,true,,false,true,false
-90009,202001,100,45,,0.740636891648308,1,1.504462,128.8429705,3698,R,0,17,19,,true,true,,true,true,false,false
-90009,202002,100,45,1.35018929150892,1.18542260208927,0.95179,1.082843,113.3255814,4993,R,17,18,20,true,true,true,true,true,false,false,false
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,true,,false,true,false
-90010,202001,100,100,,0.76056338028169,1,1.504462,128.8429705,7722,R,0,17,19,,true,true,,true,true,false,false
-90010,202002,100,100,1.31481481481481,1.55126050420168,0.95179,1.082843,113.3255814,10153,R,17,18,20,true,true,true,true,true,false,false,false
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,true,,false,true,false
-90011,202001,100,19,,8.36614281775572,1,1.504462,128.8429705,30344,R,0,17,19,,false,true,,true,true,false,false
-90011,202002,100,19,0.119529396256262,0.497667398463227,0.95179,1.082843,113.3255814,3627,R,17,18,20,false,true,true,true,true,false,false,false
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,true,,false,true,false
-90012,202001,100,304,,1.40900838592548,1,1.504462,128.8429705,16298,R,0,17,19,,true,true,,true,true,false,false
-90012,202002,100,304,0.709718983924408,0.857831504004746,0.95179,1.082843,113.3255814,11567,R,17,18,20,true,true,true,true,true,false,false,false
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,true,,false,true,false
-90013,202001,100,54,,1.10678653656397,1,1.504462,128.8429705,20190,R,0,17,19,,true,true,,true,true,false,false
-90013,202002,100,54,0.903516592372462,0.63283147158815,0.95179,1.082843,113.3255814,18242,R,17,18,20,true,true,true,true,true,false,false,false
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,true,,false,true,false
-90014,202001,100,47,,0.845909451945989,1,1.504462,128.8429705,4260,R,0,17,19,,true,true,,true,true,false,false
-90014,202002,100,42,1.18215962441315,0.776681061073411,0.95179,1.082843,113.3255814,5036,R,17,18,20,true,true,true,true,true,false,false,false
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,true,,false,true,false
-90015,202001,100,57,,3.88684582743989,1,1.504462,128.8429705,19236,R,0,17,19,,true,true,,true,true,false,false
-90015,202002,100,57,0.257278020378457,1.39644469525959,0.95179,1.082843,113.3255814,4949,R,17,18,20,true,true,true,true,true,false,false,false
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,true,,false,true,false
-90016,202001,100,163,,0.906723456038941,1,1.504462,128.8429705,14902,R,0,17,19,,true,true,,true,true,false,false
-90016,202002,100,163,1.10287209770501,0.666653145661786,0.95179,1.082843,113.3255814,16435,R,17,18,20,true,true,true,true,true,false,false,false
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,true,,false,true,false
-90017,202001,100,149,,0.702286449569435,1,1.504462,128.8429705,35476,R,0,17,19,,true,true,,true,true,false,false
-90017,202002,100,149,1.42392039688804,0.944611702227126,0.95179,1.082843,113.3255814,50515,R,17,18,20,true,true,true,true,true,false,false,false
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,true,,false,true,false
-90018,202001,100,126,,0.543196798493409,1,1.504462,128.8429705,13845,R,0,17,19,,false,true,,true,true,false,false
-90018,202002,100,126,1.8409534127844,0.929913532051516,0.95179,1.082843,113.3255814,25488,R,17,18,20,false,true,true,true,true,false,false,false
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,true,,false,true,false
-90019,202001,100,6,,2.53225806451613,1,1.504462,128.8429705,1099,R,0,17,19,,true,true,,true,true,false,false
-90019,202002,100,6,0.394904458598726,3.5,0.95179,1.082843,113.3255814,434,R,17,18,20,true,false,true,true,true,false,false,false
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,true,,false,true,false
-90020,202001,100,22,,1.67735470941884,1,1.504462,128.8429705,3348,R,0,17,19,,true,true,,true,true,false,false
-90020,202002,100,22,0.596176821983274,0.395169273411206,0.95179,1.082843,113.3255814,1996,R,17,18,20,true,false,true,true,true,false,false,false
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,true,,false,true,false
-90021,202001,100,155,,,1,1.504462,128.8429705,34285.974874,BI,0,17,19,,,,,,true,false,false
-90021,202002,100,155,,,0.95179,1.082843,113.3255814,22789.522255,BI,17,18,20,,,,,,false,false,false
-90021,202003,100,155,,,1.072437,1,126.259645,21046,R,18,0,21,,,true,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+90001,202001,100,,1.03678779721848,1,1.504462,128.8429705,9244,R,0,17,19,,true,true,,true,true,false,false
+90001,202002,100,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,8916,R,17,18,20,true,true,true,true,true,false,false,false
+90001,202003,100,0.694706146253926,,1.072437,1,126.259645,6194,R,18,0,21,true,,true,true,,false,true,false
+90002,202001,100,,0.81755039810266,1,1.504462,128.8429705,4826,R,0,17,19,,true,true,,true,true,false,false
+90002,202002,100,1.22316618317447,1.24457094665823,0.95179,1.082843,113.3255814,5903,R,17,18,20,true,true,true,true,true,false,false,false
+90002,202003,100,0.803489750974081,,1.072437,1,126.259645,4743,R,18,0,21,true,,true,true,,false,true,false
+90003,202001,100,,,1,1.504462,128.8429705,7586,R,0,17,19,,,false,,true,true,false,false
+90003,202002,100,,0.710986703988803,0.95179,1.082843,113.3255814,1016,R,17,18,20,,true,true,false,true,false,false,false
+90003,202003,100,1.40649606299213,,1.072437,1,126.259645,1429,R,18,0,21,true,,true,true,,false,true,false
+90004,202001,100,,1.30584756898817,1,1.504462,128.8429705,3975,R,0,17,19,,true,true,,true,true,false,false
+90004,202002,100,0.765786163522013,0.828750340321263,0.95179,1.082843,113.3255814,3044,R,17,18,20,true,true,true,true,true,false,false,false
+90004,202003,100,1.20663600525624,,1.072437,1,126.259645,3673,R,18,0,21,true,,true,true,,false,true,false
+90005,202001,100,,0.62191605254726,1,1.504462,128.8429705,1941,R,0,17,19,,true,true,,true,true,false,false
+90005,202002,100,1.60793405461103,2.58360927152318,0.95179,1.082843,113.3255814,3121,R,17,18,20,true,true,true,true,true,false,false,false
+90005,202003,100,0.387055430951618,,1.072437,1,126.259645,1208,R,18,0,21,true,,true,true,,false,true,false
+90006,202001,100,,0.762987012987013,1,1.504462,128.8429705,5405,R,0,17,19,,true,true,,true,true,false,false
+90006,202002,100,1.31063829787234,1.42248995983936,0.95179,1.082843,113.3255814,7084,R,17,18,20,true,true,true,true,true,false,false,false
+90006,202003,100,0.702992659514399,,1.072437,1,126.259645,4980,R,18,0,21,true,,true,true,,false,true,false
+90007,202001,100,,5.33286467486819,1,1.504462,128.8429705,15172,R,0,17,19,,true,true,,true,true,false,false
+90007,202002,100,0.18751647772212,0.812624964295915,0.95179,1.082843,113.3255814,2845,R,17,18,20,true,true,true,true,true,false,false,false
+90007,202003,100,1.23057996485062,,1.072437,1,126.259645,3501,R,18,0,21,true,,true,true,,false,true,false
+90008,202001,100,,1.12953080601566,1,1.504462,128.8429705,16298,R,0,17,19,,true,true,,true,true,false,false
+90008,202002,100,0.885323352558596,1.00937390696048,0.95179,1.082843,113.3255814,14429,R,17,18,20,true,true,true,true,true,false,false,false
+90008,202003,100,0.990713147134244,,1.072437,1,126.259645,14295,R,18,0,21,true,,true,true,,false,true,false
+90009,202001,100,,0.740636891648308,1,1.504462,128.8429705,3698,R,0,17,19,,true,true,,true,true,false,false
+90009,202002,100,1.35018929150892,1.18542260208927,0.95179,1.082843,113.3255814,4993,R,17,18,20,true,true,true,true,true,false,false,false
+90009,202003,100,0.843581013418786,,1.072437,1,126.259645,4212,R,18,0,21,true,,true,true,,false,true,false
+90010,202001,100,,0.76056338028169,1,1.504462,128.8429705,7722,R,0,17,19,,true,true,,true,true,false,false
+90010,202002,100,1.31481481481481,1.55126050420168,0.95179,1.082843,113.3255814,10153,R,17,18,20,true,true,true,true,true,false,false,false
+90010,202003,100,0.644637053087757,,1.072437,1,126.259645,6545,R,18,0,21,true,,true,true,,false,true,false
+90011,202001,100,,8.36614281775572,1,1.504462,128.8429705,30344,R,0,17,19,,false,true,,true,true,false,false
+90011,202002,100,0.119529396256262,0.497667398463227,0.95179,1.082843,113.3255814,3627,R,17,18,20,false,true,true,true,true,false,false,false
+90011,202003,100,2.0093741384064,,1.072437,1,126.259645,7288,R,18,0,21,true,,true,true,,false,true,false
+90012,202001,100,,1.40900838592548,1,1.504462,128.8429705,16298,R,0,17,19,,true,true,,true,true,false,false
+90012,202002,100,0.709718983924408,0.857831504004746,0.95179,1.082843,113.3255814,11567,R,17,18,20,true,true,true,true,true,false,false,false
+90012,202003,100,1.1657300942336,,1.072437,1,126.259645,13484,R,18,0,21,true,,true,true,,false,true,false
+90013,202001,100,,1.10678653656397,1,1.504462,128.8429705,20190,R,0,17,19,,true,true,,true,true,false,false
+90013,202002,100,0.903516592372462,0.63283147158815,0.95179,1.082843,113.3255814,18242,R,17,18,20,true,true,true,true,true,false,false,false
+90013,202003,100,1.58019953952418,,1.072437,1,126.259645,28826,R,18,0,21,true,,true,true,,false,true,false
+90014,202001,100,,0.845909451945989,1,1.504462,128.8429705,4260,R,0,17,19,,true,true,,true,true,false,false
+90014,202002,100,1.18215962441315,0.776681061073411,0.95179,1.082843,113.3255814,5036,R,17,18,20,true,true,true,true,true,false,false,false
+90014,202003,100,1.28752978554408,,1.072437,1,126.259645,6484,R,18,0,21,true,,true,true,,false,true,false
+90015,202001,100,,3.88684582743989,1,1.504462,128.8429705,19236,R,0,17,19,,true,true,,true,true,false,false
+90015,202002,100,0.257278020378457,1.39644469525959,0.95179,1.082843,113.3255814,4949,R,17,18,20,true,true,true,true,true,false,false,false
+90015,202003,100,0.716104263487573,,1.072437,1,126.259645,3544,R,18,0,21,true,,true,true,,false,true,false
+90016,202001,100,,0.906723456038941,1,1.504462,128.8429705,14902,R,0,17,19,,true,true,,true,true,false,false
+90016,202002,100,1.10287209770501,0.666653145661786,0.95179,1.082843,113.3255814,16435,R,17,18,20,true,true,true,true,true,false,false,false
+90016,202003,100,1.500030422878,,1.072437,1,126.259645,24653,R,18,0,21,true,,true,true,,false,true,false
+90017,202001,100,,0.702286449569435,1,1.504462,128.8429705,35476,R,0,17,19,,true,true,,true,true,false,false
+90017,202002,100,1.42392039688804,0.944611702227126,0.95179,1.082843,113.3255814,50515,R,17,18,20,true,true,true,true,true,false,false,false
+90017,202003,100,1.05863604869841,,1.072437,1,126.259645,53477,R,18,0,21,true,,true,true,,false,true,false
+90018,202001,100,,0.543196798493409,1,1.504462,128.8429705,13845,R,0,17,19,,false,true,,true,true,false,false
+90018,202002,100,1.8409534127844,0.929913532051516,0.95179,1.082843,113.3255814,25488,R,17,18,20,false,true,true,true,true,false,false,false
+90018,202003,100,1.07536880100439,,1.072437,1,126.259645,27409,R,18,0,21,true,,true,true,,false,true,false
+90019,202001,100,,2.53225806451613,1,1.504462,128.8429705,1099,R,0,17,19,,true,true,,true,true,false,false
+90019,202002,100,0.394904458598726,3.5,0.95179,1.082843,113.3255814,434,R,17,18,20,true,false,true,true,true,false,false,false
+90019,202003,100,0.285714285714286,,1.072437,1,126.259645,124,R,18,0,21,false,,true,true,,false,true,false
+90020,202001,100,,1.67735470941884,1,1.504462,128.8429705,3348,R,0,17,19,,true,true,,true,true,false,false
+90020,202002,100,0.596176821983274,0.395169273411206,0.95179,1.082843,113.3255814,1996,R,17,18,20,true,false,true,true,true,false,false,false
+90020,202003,100,2.53056112224449,,1.072437,1,126.259645,5051,R,18,0,21,false,,true,true,,false,true,false
+90021,202001,100,,,1,1.504462,128.8429705,34285.974874,BI,0,17,19,,,,,,true,false,false
+90021,202002,100,,,0.95179,1.082843,113.3255814,22789.522255,BI,17,18,20,,,,,,false,false,false
+90021,202003,100,,,1.072437,1,126.259645,21046,R,18,0,21,,,true,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
index 1f7c7504..12fb1f4c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/47_TB_50_output.csv
@@ -1,37 +1,37 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,false,false
-30001,202002,100,51,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,false,false,false
-30001,202003,100,51,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,false,true,false
-30002,202001,100,72,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,true,false,false
-30002,202002,100,72,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,false,false,false
-30002,202003,100,72,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,false,true,false
-30003,202001,100,7,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,true,false,false
-30003,202002,100,7,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,false,false,false
-30003,202003,100,7,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,false,true,false
-30004,202001,100,81,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,true,false,false
-30004,202002,100,81,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,false,false,false
-30004,202003,100,81,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,false,false,false
-30005,202003,100,5,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,false,false,false
-30006,202003,100,14,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,false,false,false
-30007,202003,100,12,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,false,false,false
-30008,202003,100,162,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,false,false,false
-30009,202003,100,26,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,true,false,false
-30010,202002,100,144,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,false,false,false
-30010,202003,100,144,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,false,true,false
-30011,202001,100,5,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,true,false,false
-30011,202002,100,5,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,false,false,false
-30011,202003,100,5,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,false,true,false
-30012,202001,100,275,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,true,false,false
-30012,202002,100,275,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,false,false,false
-30012,202003,100,275,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,,1.1294810058855,1,1.162271841,96.75644,8444,R,0,2,12,,true,true,false,false
+30001,202002,100,0.885362387494079,3.73240139790315,0.861069292,2.064204,76.385246,7476,R,2,1,12,true,false,false,false,false
+30001,202003,100,0.267924023542001,,0.484448,1,76.108808,2003,R,1,0,11,false,,false,true,false
+30002,202001,100,,1.19506267587618,1,1.162271841,96.75644,9343,R,0,2,12,,true,true,false,false
+30002,202002,100,0.836776196082629,1.59648764549724,0.861069292,2.064204,76.385246,7818,R,2,1,12,true,false,false,false,false
+30002,202003,100,0.626375031977488,,0.484448,1,76.108808,4897,R,1,0,11,false,,false,true,false
+30003,202001,100,,4.26519023282226,1,1.162271841,96.75644,7511,R,0,2,12,,false,true,false,false
+30003,202002,100,0.234456131007855,0.271256931608133,0.861069292,2.064204,76.385246,1761,R,2,1,12,false,false,false,false,false
+30003,202003,100,3.68654173764906,,0.484448,1,76.108808,6492,R,1,0,11,false,,false,true,false
+30004,202001,100,,0.0302886890676763,1,1.162271841,96.75644,64,R,0,2,12,,false,true,false,false
+30004,202002,100,33.015625,11.4216216216216,0.861069292,2.064204,76.385246,2113,R,2,1,12,false,false,false,false,false
+30004,202003,100,0.0875532418362518,,0.484448,1,76.108808,185,R,1,0,11,false,,false,true,false
+30005,202001,100,,0.940914158305463,1,1.162271841,96.75644,844,R,0,2,12,,false,true,false,false
+30005,202002,100,1.06279620853081,3.20357142857143,0.861069292,2.064204,76.385246,897,R,2,1,12,false,false,false,false,false
+30005,202003,100,0.312151616499443,,0.484448,1,76.108808,280,R,1,0,11,false,,false,true,false
+30006,202001,100,,0.996268656716418,1,1.162271841,96.75644,1869,R,0,2,12,,false,true,false,false
+30006,202002,100,1.00374531835206,1.36834427425237,0.861069292,2.064204,76.385246,1876,R,2,1,12,false,false,false,false,false
+30006,202003,100,0.730810234541578,,0.484448,1,76.108808,1371,R,1,0,11,false,,false,true,false
+30007,202001,100,,4.47563967753242,1,1.162271841,96.75644,12769,R,0,2,12,,false,true,false,false
+30007,202002,100,0.223431748766544,0.248281263597598,0.861069292,2.064204,76.385246,2853,R,2,1,12,false,false,false,false,false
+30007,202003,100,4.02769015071854,,0.484448,1,76.108808,11491,R,1,0,11,false,,false,true,false
+30008,202001,100,,0.0234960839860023,1,1.162271841,96.75644,141,R,0,2,12,,false,true,false,false
+30008,202002,100,42.5602836879433,13.8591224018476,0.861069292,2.064204,76.385246,6001,R,2,1,12,false,false,false,false,false
+30008,202003,100,0.0721546408931845,,0.484448,1,76.108808,433,R,1,0,11,false,,false,true,false
+30009,202001,100,,1.58954669308893,1,1.162271841,96.75644,6417,R,0,2,12,,false,true,false,false
+30009,202002,100,0.629110176094748,3.05370650529501,0.861069292,2.064204,76.385246,4037,R,2,1,12,false,false,false,false,false
+30009,202003,100,0.327470894228387,,0.484448,1,76.108808,1322,R,1,0,11,false,,false,true,false
+30010,202001,100,,1.33261249654919,1,1.162271841,96.75644,28963,R,0,2,12,,false,true,false,false
+30010,202002,100,0.750405690018299,2.06420362807484,0.861069292,2.064204,76.385246,21734,R,2,1,12,false,true,false,false,false
+30010,202003,100,0.484448329805834,,0.484448,1,76.108808,10529,R,1,0,11,true,,false,true,false
+30011,202001,100,,5.24803493449782,1,1.162271841,96.75644,6009,R,0,2,12,,false,true,false,false
+30011,202002,100,0.190547512065235,0.226105845181675,0.861069292,2.064204,76.385246,1145,R,2,1,12,false,false,false,false,false
+30011,202003,100,4.42270742358079,,0.484448,1,76.108808,5064,R,1,0,11,false,,false,true,false
+30012,202001,100,,0.0340335017282638,1,1.162271841,96.75644,256,R,0,2,12,,false,true,false,false
+30012,202002,100,29.3828125,,0.861069292,2.064204,76.385246,7522,R,2,1,12,false,,false,false,false
+30012,202003,100,,,0.484448,1,76.108808,3644.020337,FIR,1,0,11,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
index d8341802..1d5b5e7d 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/48_BI_BI_R-R_R_FI_filtered_default_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,false,true,false
-110005,202001,200,27,,,1,1,1,280,BI,0,0,0,,,,true,true,true
-110005,202002,200,27,,,1,1,1,280,BI,0,0,0,,,,true,true,true
-110005,202003,200,27,,,1,1,1,280,R,0,0,0,false,,,true,true,true
-110006,202001,200,42,,,1,1,1,1869,R,0,0,0,false,,false,true,true,true
-110006,202002,200,42,,,1,1,1,1876,R,0,0,0,false,false,false,true,true,true
-110006,202003,200,42,,,1,1,1,1371,R,0,0,0,false,false,,true,true,true
-110007,202001,200,19,,,1,1,1,12769,R,0,0,0,false,,false,true,true,true
-110007,202002,200,19,,,1,1,1,2853,R,0,0,0,false,false,,true,true,true
-110007,202003,200,19,,,1,1,1,2853,FIR,0,0,0,,,,true,true,true
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,,1.036787797,1,2.656680299,101.710317,9244,R,0,4,4,true,,true,true,false,false
+110001,202002,100,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,true,true,true,false,false,false
+110001,202003,100,0.694706146,,0.968230653,1,70.26136364,6194,R,3,0,3,true,true,,false,true,false
+110002,202001,100,,0.817550398,1,2.656680299,101.710317,4826,R,0,4,4,true,,true,true,false,false
+110002,202002,100,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,true,true,true,false,false,false
+110002,202003,100,0.803489751,,0.968230653,1,70.26136364,4743,R,3,0,3,true,true,,false,true,false
+110003,202001,100,,7.466535433,1,2.656680299,101.710317,7586,R,0,4,4,true,,true,true,false,false
+110003,202002,100,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,1.406496063,,0.968230653,1,70.26136364,1429,R,3,0,3,true,true,,false,true,false
+110004,202001,100,,1.305847569,1,2.656680299,101.710317,3975,R,0,4,4,true,,true,true,false,false
+110004,202002,100,0.765786164,,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,true,true,,false,false,false
+110004,202003,100,,,0.968230653,1,70.26136364,2947.294109,FIR,3,0,3,,,,false,true,false
+110005,202001,200,,,1,1,1,280,BI,0,0,0,,,,true,true,true
+110005,202002,200,,,1,1,1,280,BI,0,0,0,,,,true,true,true
+110005,202003,200,,,1,1,1,280,R,0,0,0,false,,,true,true,true
+110006,202001,200,,,1,1,1,1869,R,0,0,0,false,,false,true,true,true
+110006,202002,200,,,1,1,1,1876,R,0,0,0,false,false,false,true,true,true
+110006,202003,200,,,1,1,1,1371,R,0,0,0,false,false,,true,true,true
+110007,202001,200,,,1,1,1,12769,R,0,0,0,false,,false,true,true,true
+110007,202002,200,,,1,1,1,2853,R,0,0,0,false,false,,true,true,true
+110007,202003,200,,,1,1,1,2853,FIR,0,0,0,,,,true,true,true
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
index c8c5e413..c9587294 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/49_R_R_FI-BI_R_R_50_weight_previous_month_output.csv
@@ -1,27 +1,27 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,201912,100,89,,,,,,1,1.5274,50.3694,0,BI,,,,,,
-110001,202001,100,89,,1.036787797,1,2.09204015,76.03985875,1,2.65668,101.710317,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.09204015,76.03985875,1,2.65668,101.710317,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.09204015,76.03985875,1,2.65668,101.710317,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.09204015,76.03985875,1,2.65668,101.710317,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,2648.403058,FIR,3,0,3,false,true,false
-110005,201912,200,27,,,,,,1,2.994350985,107.48,0,BI,,,,,,
-110005,202001,200,27,,0.743586089,1,2.642597676,144.865,1,2.290844,182.25,5217,R,0,3,3,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,false,false,false
-110005,202003,200,27,1.416761688,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,false,true,false
-110006,202001,200,42,,0.68736285,1,2.642597676,144.865,1,2.290844,182.25,5325,R,0,3,3,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,false,false,false
-110006,202003,200,42,0.862914677,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,false,true,false
-110007,202001,200,19,,5.441584158,1,2.642597676,144.865,1,2.290844,182.25,5496,R,0,3,3,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,false,false,false
-110007,202003,200,19,1.222772277,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,false,true,false
-110008,202001,200,43,,,1,2.642597676,144.865,1,2.290844,182.25,10340.484733,BI,0,3,3,true,false,false
-110008,202002,200,43,,0.650756694,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,false,false,false
-110008,202003,200,43,1.53667263,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,201912,100,,,,,,1,1.5274,50.3694,0,BI,,,,,,
+110001,202001,100,,1.036787797,1,2.09204015,76.03985875,1,2.65668,101.710317,9244,R,0,4,4,true,false,false
+110001,202002,100,0.964517525,1.43945754,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,8916,R,4,3,4,false,false,false
+110001,202003,100,0.694706146,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,6194,R,3,0,3,false,true,false
+110002,202001,100,,0.817550398,1,2.09204015,76.03985875,1,2.65668,101.710317,4826,R,0,4,4,true,false,false
+110002,202002,100,1.223166183,1.244570947,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,5903,R,4,3,4,false,false,false
+110002,202003,100,0.803489751,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,4743,R,3,0,3,false,true,false
+110003,202001,100,,7.466535433,1,2.09204015,76.03985875,1,2.65668,101.710317,7586,R,0,4,4,true,false,false
+110003,202002,100,0.133930925,0.710986704,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,1016,R,4,3,4,false,false,false
+110003,202003,100,1.406496063,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,1429,R,3,0,3,false,true,false
+110004,202001,100,,1.305847569,1,2.09204015,76.03985875,1,2.65668,101.710317,3975,R,0,4,4,true,false,false
+110004,202002,100,0.765786164,,0.885925,1.894176015,88.31349209,0.771850199,1.13167173,74.91666667,3044,R,4,3,4,false,false,false
+110004,202003,100,,,0.870040426,1.065836,72.58901516,0.968230653,1,70.26136364,2648.403058,FIR,3,0,3,false,true,false
+110005,201912,200,,,,,,1,2.994350985,107.48,0,BI,,,,,,
+110005,202001,200,,0.743586089,1,2.642597676,144.865,1,2.290844,182.25,5217,R,0,3,3,true,false,false
+110005,202002,200,1.344834196,0.70583501,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7016,R,3,4,4,false,false,false
+110005,202003,200,1.416761688,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,9940,R,4,0,4,false,true,false
+110006,202001,200,,0.68736285,1,2.642597676,144.865,1,2.290844,182.25,5325,R,0,3,3,true,false,false
+110006,202002,200,1.454835681,1.158863126,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,7747,R,3,4,4,false,false,false
+110006,202003,200,0.862914677,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,6685,R,4,0,4,false,true,false
+110007,202001,200,,5.441584158,1,2.642597676,144.865,1,2.290844,182.25,5496,R,0,3,3,true,false,false
+110007,202002,200,0.183770015,0.817813765,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,1010,R,3,4,4,false,false,false
+110007,202003,200,1.222772277,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,1235,R,4,0,4,false,true,false
+110008,202001,200,,,1,2.642597676,144.865,1,2.290844,182.25,10340.484733,BI,0,3,3,true,false,false
+110008,202002,200,,0.650756694,0.99724,1.562080758,166.2624046,0.994479964,0.833317149,150.2748092,3913,R,3,4,4,false,false,false
+110008,202003,200,1.53667263,,1.127130141,0.916659,166.2557252,1.259780318,1,182.2366412,6013,R,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
index 7eb3315b..5b857b28 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/50_R_R_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.591203,85.284226,1,1.655006,120.199052,8444,R,0,4,4,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,7476,R,4,3,4,false,false,false
-30001,202003,100,51,0.267924024,,1.319973,1,96.195742,1.526947,1,103.015385,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,1.591203,85.284226,1,1.655006,120.199052,9343,R,0,4,4,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,7818,R,4,3,4,false,false,false
-30002,202003,100,72,0.626375032,,1.319973,1,96.195742,1.526947,1,103.015385,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,1.591203,85.284226,1,1.655006,120.199052,7511,R,0,4,4,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,1761,R,4,3,4,false,false,false
-30003,202003,100,7,3.686541738,,1.319973,1,96.195742,1.526947,1,103.015385,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,0.030288689,1,1.591203,85.284226,1,1.655006,120.199052,64,R,0,4,4,true,false,false
-30004,202002,100,81,33.015625,,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,2113,R,4,3,4,false,false,false
-30004,202003,100,81,,,1.319973,1,96.195742,1.526947,1,103.015385,2789.103933,FIR,3,0,3,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.591203,85.284226,1,1.655006,120.199052,8444,R,0,4,4,true,false,false
+30001,202002,100,0.885362387,3.732401398,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,7476,R,4,3,4,false,false,false
+30001,202003,100,0.267924024,,1.319973,1,96.195742,1.526947,1,103.015385,2003,R,3,0,3,false,true,false
+30002,202001,100,,1.195062676,1,1.591203,85.284226,1,1.655006,120.199052,9343,R,0,4,4,true,false,false
+30002,202002,100,0.836776196,1.596487645,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,7818,R,4,3,4,false,false,false
+30002,202003,100,0.626375032,,1.319973,1,96.195742,1.526947,1,103.015385,4897,R,3,0,3,false,true,false
+30003,202001,100,,4.265190233,1,1.591203,85.284226,1,1.655006,120.199052,7511,R,0,4,4,true,false,false
+30003,202002,100,0.234456131,0.271256932,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,1761,R,4,3,4,false,false,false
+30003,202003,100,3.686541738,,1.319973,1,96.195742,1.526947,1,103.015385,6492,R,3,0,3,false,true,false
+30004,202001,100,,0.030288689,1,1.591203,85.284226,1,1.655006,120.199052,64,R,0,4,4,true,false,false
+30004,202002,100,33.015625,,4.855777465,1.873108,106.131151,8.743054929,1.866715,90.843602,2113,R,4,3,4,false,false,false
+30004,202003,100,,,1.319973,1,96.195742,1.526947,1,103.015385,2789.103933,FIR,3,0,3,false,true,false
+30001,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30001,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30001,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+30002,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30002,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30002,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+30003,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30003,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30003,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+30004,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30004,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30004,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
index 9604a43f..90d228ed 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/51_R_R_FI_80_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,7476,R,4,3,4,false,false,false
-30001,202003,100,51,0.267924024,,1.4441576,1,100.287528,1.526947,1,103.015385,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,1.6294848,106.233122,1,1.655006,120.199052,9343,R,0,4,4,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,7818,R,4,3,4,false,false,false
-30002,202003,100,72,0.626375032,,1.4441576,1,100.287528,1.526947,1,103.015385,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,1.6294848,106.233122,1,1.655006,120.199052,7511,R,0,4,4,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,1761,R,4,3,4,false,false,false
-30003,202003,100,7,3.686541738,,1.4441576,1,100.287528,1.526947,1,103.015385,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,0.030288689,1,1.6294848,106.233122,1,1.655006,120.199052,64,R,0,4,4,true,false,false
-30004,202002,100,81,33.015625,,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,2113,R,4,3,4,false,false,false
-30004,202003,100,81,,,1.4441576,1,100.287528,1.526947,1,103.015385,3051.504892,FIR,3,0,3,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.6294848,106.2331217,1,1.655006,120.1990521,8444,R,0,4,4,true,false,false
+30001,202002,100,0.885362387,3.732401398,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,7476,R,4,3,4,false,false,false
+30001,202003,100,0.267924024,,1.4441576,1,100.287528,1.526947,1,103.015385,2003,R,3,0,3,false,true,false
+30002,202001,100,,1.195062676,1,1.6294848,106.233122,1,1.655006,120.199052,9343,R,0,4,4,true,false,false
+30002,202002,100,0.836776196,1.596487645,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,7818,R,4,3,4,false,false,false
+30002,202003,100,0.626375032,,1.4441576,1,100.287528,1.526947,1,103.015385,4897,R,3,0,3,false,true,false
+30003,202001,100,,4.265190233,1,1.6294848,106.233122,1,1.655006,120.199052,7511,R,0,4,4,true,false,false
+30003,202002,100,0.234456131,0.271256932,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,1761,R,4,3,4,false,false,false
+30003,202003,100,3.686541738,,1.4441576,1,100.287528,1.526947,1,103.015385,6492,R,3,0,3,false,true,false
+30004,202001,100,,0.030288689,1,1.6294848,106.233122,1,1.655006,120.199052,64,R,0,4,4,true,false,false
+30004,202002,100,33.015625,,7.188143943,1.869272,96.958622,8.743054929,1.866715,90.843602,2113,R,4,3,4,false,false,false
+30004,202003,100,,,1.4441576,1,100.287528,1.526947,1,103.015385,3051.504892,FIR,3,0,3,false,true,false
+30001,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30001,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30001,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+30002,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30002,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30002,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+30003,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30003,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30003,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+30004,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30004,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30004,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
index 4728286c..5cb09224 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/52_BI_BI_R_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-60001,202001,100,15,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,false,false
-60001,202002,100,15,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,false,false,false
-60001,202003,100,15,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.913043,1046,R,3,0,4,false,true,false
-60002,202001,100,71,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,true,false,false
-60002,202002,100,71,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,false,false,false
-60002,202003,100,71,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.913043,3807,R,3,0,4,false,true,false
-60003,202001,100,26,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,true,false,false
-60003,202002,100,26,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,false,false,false
-60003,202003,100,26,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.913043,6351,R,3,0,4,false,true,false
-60004,202001,100,3,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,true,false,false
-60004,202002,100,3,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,false,false,false
-60004,202003,100,3,,,4.252145677,1,95.14457175,7.391291354,1,100.913043,401,R,3,0,4,false,true,false
-60001,201901,100,15,,,,,,1,1.5274,50.3694,0,R,,,,,,
-60001,201902,100,15,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-60001,201903,100,15,,,,,,1.113,1,89.3761,0,R,,,,,,
-60002,201901,100,71,,,,,,1,1.5274,50.3694,0,R,,,,,,
-60002,201902,100,71,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-60002,201903,100,71,,,,,,1.113,1,89.3761,0,R,,,,,,
-60003,201901,100,26,,,,,,1,1.5274,50.3694,0,R,,,,,,
-60003,201902,100,26,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-60003,201903,100,26,,,,,,1.113,1,89.3761,0,R,,,,,,
-60004,201901,100,3,,,,,,1,1.5274,50.3694,0,R,,,,,,
-60004,201902,100,3,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-60004,201903,100,3,,,,,,1.113,1,89.3761,0,R,,,,,,
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,,0.648403576,1,4.334502725,84.14005715,1,7.141605449,117.9107143,5077,R,0,3,3,true,false,false
+60001,202002,100,1.54224936,7.485659656,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,false,false,false
+60001,202003,100,0.133588761,,4.252145677,1,95.14457175,7.391291354,1,100.913043,1046,R,3,0,4,false,true,false
+60002,202001,100,,1.309150866,1,4.334502725,84.14005715,1,7.141605449,117.9107143,1588,R,0,3,3,true,false,false
+60002,202002,100,0.763853904,0.318623588,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,false,false,false
+60002,202003,100,3.138499588,,4.252145677,1,95.14457175,7.391291354,1,100.913043,3807,R,3,0,4,false,true,false
+60003,202001,100,,19.4672619,1,4.334502725,84.14005715,1,7.141605449,117.9107143,6541,R,0,3,3,true,false,false
+60003,202002,100,0.051368292,0.052905054,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,336,R,3,3,3,false,false,false
+60003,202003,100,18.90178571,,4.252145677,1,95.14457175,7.391291354,1,100.913043,6351,R,3,0,4,false,true,false
+60004,202001,100,,,1,4.334502725,84.14005715,1,7.141605449,117.9107143,3909.556029,BI,0,3,3,true,false,false
+60004,202002,100,,,0.877161926,2.249281383,102.5798857,0.785823852,2.619062766,83.74107143,901.9618346,BI,3,3,3,false,false,false
+60004,202003,100,,,4.252145677,1,95.14457175,7.391291354,1,100.913043,401,R,3,0,4,false,true,false
+60001,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+60001,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+60001,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+60002,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+60002,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+60002,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+60003,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+60003,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+60003,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+60004,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+60004,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+60004,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
index 94a57c48..687f2bba 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/53_C_FI_FI_50_weight_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.861989,122.4847,1,2.196577972,194.6,8444,R,0,3,3,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,7476,R,3,3,3,false,false,false
-30001,202003,100,51,0.267924024,,1.319973,1,96.195742,1.526946931,1,103.015385,2003,R,3,0,3,false,true,false
-30002,202001,100,72,,1.195062676,1,1.861989,122.4847,1,2.196577972,194.6,9343,R,0,3,3,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,7818,R,3,3,3,false,false,false
-30002,202003,100,72,0.626375032,,1.319973,1,96.195742,1.526947,1,103.015385,4897,R,3,0,3,false,true,false
-30003,202001,100,7,,4.265190233,1,1.861989,122.4847,1,2.196577972,194.6,7511,R,0,3,3,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,1761,R,3,3,3,false,false,false
-30003,202003,100,7,3.686541738,,1.319973,1,96.195742,1.526947,1,103.015385,6492,R,3,0,3,false,true,false
-30004,202001,100,81,,,1,1.861989,122.4847,1,2.196577972,194.6,9921.2607,C,0,3,3,true,false,false
-30004,202002,100,81,,,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,8039.684869,FIC,3,3,3,false,false,false
-30004,202003,100,81,,,1.319973,1,96.195742,1.526947,1,103.015385,10612.170698,FIC,3,0,3,false,true,false
-30001,201901,100,51,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30001,201902,100,51,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30001,201903,100,51,,,,,,1.113,1,89.3761,0,R,,,,,,
-30002,201901,100,72,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30002,201902,100,72,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30002,201903,100,72,,,,,,1.113,1,89.3761,0,R,,,,,,
-30003,201901,100,7,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30003,201902,100,7,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30003,201903,100,7,,,,,,1.113,1,89.3761,0,R,,,,,,
-30004,201901,100,81,,,,,,1,1.5274,50.3694,0,R,,,,,,
-30004,201902,100,81,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
-30004,201903,100,81,,,,,,1.113,1,89.3761,0,R,,,,,,
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,unweighted_forward,unweighted_backward,unweighted_construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.861989,122.4847,1,2.196577972,194.6,8444,R,0,3,3,true,false,false
+30001,202002,100,0.885362387,3.732401398,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,7476,R,3,3,3,false,false,false
+30001,202003,100,0.267924024,,1.319973,1,96.195742,1.526946931,1,103.015385,2003,R,3,0,3,false,true,false
+30002,202001,100,,1.195062676,1,1.861989,122.4847,1,2.196577972,194.6,9343,R,0,3,3,true,false,false
+30002,202002,100,0.836776196,1.596487645,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,7818,R,3,3,3,false,false,false
+30002,202003,100,0.626375032,,1.319973,1,96.195742,1.526947,1,103.015385,4897,R,3,0,3,false,true,false
+30003,202001,100,,4.265190233,1,1.861989,122.4847,1,2.196577972,194.6,7511,R,0,3,3,true,false,false
+30003,202002,100,0.234456131,0.271256932,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,1761,R,3,3,3,false,false,false
+30003,202003,100,3.686541738,,1.319973,1,96.195742,1.526947,1,103.015385,6492,R,3,0,3,false,true,false
+30004,202001,100,,,1,1.861989,122.4847,1,2.196577972,194.6,9921.2607,C,0,3,3,true,false,false
+30004,202002,100,,,0.810349,1.873108,126.305504,0.652198238,1.866715325,131.192308,8039.684869,FIC,3,3,3,false,false,false
+30004,202003,100,,,1.319973,1,96.195742,1.526947,1,103.015385,10612.170698,FIC,3,0,3,false,true,false
+30001,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30001,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30001,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+30002,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30002,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30002,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+30003,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30003,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30003,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
+30004,201901,100,,,,,,1,1.5274,50.3694,0,R,,,,,,
+30004,201902,100,,,,,,0.9685,1.8795,121.4187,0,R,,,,,,
+30004,201903,100,,,,,,1.113,1,89.3761,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
index 2c45f402..8b605b33 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/54_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,10340.484733,BI,0,3,3,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,0,R,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,0,R,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,0,R,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,0,R,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,0,R,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,0,R,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,0,R,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,0,R,,,,,,
-110005,201901,200,27,,,1,2.994350985,107.48,,,,0,R,,,,,,
-110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
-110006,201901,200,42,,,1,2.994350985,107.48,,,,0,R,,,,,,
-110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
-110007,201901,200,19,,,1,2.994350985,107.48,,,,0,R,,,,,,
-110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
-110008,201901,200,43,,,1,2.994350985,107.48,,,,0,R,,,,,,
-110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,,1.036787797,1,2.656680299,101.710317,1,2.09204015,76.03985875,9244,R,0,4,4,true,false,false
+110001,202002,100,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,false,false,false
+110001,202003,100,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,false,true,false
+110002,202001,100,,0.817550398,1,2.656680299,101.710317,1,2.09204015,76.03985875,4826,R,0,4,4,true,false,false
+110002,202002,100,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,false,false,false
+110002,202003,100,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,false,true,false
+110003,202001,100,,7.466535433,1,2.656680299,101.710317,1,2.09204015,76.03985875,7586,R,0,4,4,true,false,false
+110003,202002,100,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,false,false,false
+110003,202003,100,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,false,true,false
+110004,202001,100,,1.305847569,1,2.656680299,101.710317,1,2.09204015,76.03985875,3975,R,0,4,4,true,false,false
+110004,202002,100,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,false,false,false
+110004,202003,100,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,false,true,false
+110005,202001,200,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,false,false
+110005,202002,200,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,false,false,false
+110005,202003,200,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,false,true,false
+110006,202001,200,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,false,false
+110006,202002,200,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,false,false,false
+110006,202003,200,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,false,true,false
+110007,202001,200,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,false,false
+110007,202002,200,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,false,false,false
+110007,202003,200,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,false,true,false
+110008,202001,200,,,1,2.290844366,182.25,1,2.642597676,144.865,10340.484733,BI,0,3,3,true,false,false
+110008,202002,200,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,false,false,false
+110008,202003,200,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,false,true,false
+110001,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110001,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110001,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
+110002,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110002,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110002,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
+110003,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110003,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110003,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
+110004,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+110004,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+110004,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
+110005,201901,200,,,1,2.994350985,107.48,,,,0,R,,,,,,
+110005,201902,200,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
+110005,201903,200,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
+110006,201901,200,,,1,2.994350985,107.48,,,,0,R,,,,,,
+110006,201902,200,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
+110006,201903,200,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
+110007,201901,200,,,1,2.994350985,107.48,,,,0,R,,,,,,
+110007,201902,200,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
+110007,201903,200,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
+110008,201901,200,,,1,2.994350985,107.48,,,,0,R,,,,,,
+110008,201902,200,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,
+110008,201903,200,,,0.952585628,1,98.26519337,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
index 4c97e19b..0d0b1bf2 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/55_BI_BI_R_NS_C_FI_FI_zeros_excluded_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,false,true,false
-160004,202001,100,42,0,R,,,1,0.352085676,24.45957447,0,3,4,true,false,false
-160004,202002,100,42,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
-160004,202003,100,42,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
-160004,202004,100,42,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
-160004,202005,100,42,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
-160004,202006,100,42,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
-160004,202007,100,42,0,R,,,1.523164371,1,58.94468085,3,0,4,false,true,false
-160005,202001,100,33,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,true,false,false
-160005,202002,100,33,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
-160005,202003,100,33,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
-160005,202005,100,33,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
-160005,202006,100,33,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
-160005,202007,100,33,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,2086,R,,0.502166586,1,0.352085676,24.45957447,0,3,4,true,false,false
+160001,202002,100,4154,R,1.991371045,2.580124224,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160001,202003,100,1610,R,0.387578238,0.447222222,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160001,202004,100,3600,R,2.236024845,0.569890771,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160001,202005,100,6317,R,1.754722222,1.107662634,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160001,202006,100,5703,R,0.902801963,3.423169268,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160001,202007,100,1666,R,0.292126951,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160002,202001,100,430,R,,0.044472024,1,0.352085676,24.45957447,0,3,4,true,false,false
+160002,202002,100,9669,R,22.48604651,5.531464531,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160002,202003,100,1748,R,0.180783949,0.734453782,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160002,202004,100,2380,R,1.361556064,0.30237581,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160002,202005,100,7871,R,3.307142857,0.893822394,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160002,202006,100,8806,R,1.118790497,3.288274832,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160002,202007,100,2678,R,0.304110834,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160003,202001,100,3232,R,,0.509618417,1,0.352085676,24.45957447,0,3,4,true,false,false
+160003,202002,100,6342,R,1.962252475,2.12248996,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160003,202003,100,2988,R,0.471144749,3.474418605,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160003,202004,100,860,R,0.287817938,0.093204725,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160003,202005,100,9227,R,10.72906977,3.855829503,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160003,202006,100,2393,R,0.259347567,0.251682793,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160003,202007,100,9508,R,3.973255328,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160004,202001,100,0,R,,,1,0.352085676,24.45957447,0,3,4,true,false,false
+160004,202002,100,0,R,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160004,202003,100,0,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160004,202004,100,0,R,,,1.295132949,0.321823769,29.10638298,3,3,4,false,false,false
+160004,202005,100,0,R,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160004,202006,100,0,R,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160004,202007,100,0,R,,,1.523164371,1,58.94468085,3,0,4,false,true,false
+160005,202001,100,1356.031558,BI,,,1,0.352085676,24.45957447,0,3,4,true,false,false
+160005,202002,100,3851.424956,BI,,,8.813223343,3.411359572,85.80851064,3,3,4,false,false,false
+160005,202003,100,1129,R,,,0.346502312,1.552031536,27.891791,3,3,5,false,false,false
+160005,202005,100,3288.06383,C,,,5.26364495,1.952438177,99.63829787,3,3,4,false,false,false
+160005,202006,100,2499.9588,FIC,,,0.760313342,2.321042298,71.92340426,3,3,4,false,false,false
+160005,202007,100,3807.848173,FIC,,,1.523164371,1,58.94468085,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
index 69c70eb9..f798cca9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/56_BI_BI_R_NS_C_FI_FI_zeros_included_output.csv
@@ -1,35 +1,35 @@
-identifier,date,group,other,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,true,false,false
-160001,202002,100,76,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
-160001,202003,100,76,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
-160001,202004,100,76,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
-160001,202005,100,76,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
-160001,202006,100,76,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
-160001,202007,100,76,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,false,true,false
-160002,202001,100,32,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,true,false,false
-160002,202002,100,32,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
-160002,202003,100,32,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
-160002,202004,100,32,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
-160002,202005,100,32,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
-160002,202006,100,32,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
-160002,202007,100,32,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,false,true,false
-160003,202001,100,85,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,true,false,false
-160003,202002,100,85,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
-160003,202003,100,85,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
-160003,202004,100,85,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
-160003,202005,100,85,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
-160003,202006,100,85,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
-160003,202007,100,85,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,false,true,false
-160004,202001,100,42,0,R,,1,1,0.514064257,24.45957447,0,4,4,true,false,false
-160004,202002,100,42,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
-160004,202003,100,42,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
-160004,202004,100,42,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
-160004,202005,100,42,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
-160004,202006,100,42,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
-160004,202007,100,42,0,R,1,,1.392373278,1,58.94468085,4,0,4,false,true,false
-160005,202001,100,33,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,true,false,false
-160005,202002,100,33,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
-160005,202003,100,33,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
-160005,202005,100,33,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
-160005,202006,100,33,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
-160005,202007,100,33,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,false,true,false
+identifier,date,group,output,marker,growth_forward,growth_backward,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,2086,R,,0.502166586,1,0.514064257,24.45957447,0,4,4,true,false,false
+160001,202002,100,4154,R,1.991371045,2.580124224,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160001,202003,100,1610,R,0.387578238,0.447222222,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160001,202004,100,3600,R,2.236024845,0.569890771,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160001,202005,100,6317,R,1.754722222,1.107662634,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160001,202006,100,5703,R,0.902801963,3.423169268,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160001,202007,100,1666,R,0.292126951,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160002,202001,100,430,R,,0.044472024,1,0.514064257,24.45957447,0,4,4,true,false,false
+160002,202002,100,9669,R,22.48604651,5.531464531,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160002,202003,100,1748,R,0.180783949,0.734453782,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160002,202004,100,2380,R,1.361556064,0.30237581,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160002,202005,100,7871,R,3.307142857,0.893822394,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160002,202006,100,8806,R,1.118790497,3.288274832,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160002,202007,100,2678,R,0.304110834,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160003,202001,100,3232,R,,0.509618417,1,0.514064257,24.45957447,0,4,4,true,false,false
+160003,202002,100,6342,R,1.962252475,2.12248996,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160003,202003,100,2988,R,0.471144749,3.474418605,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160003,202004,100,860,R,0.287817938,0.093204725,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160003,202005,100,9227,R,10.72906977,3.855829503,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160003,202006,100,2393,R,0.259347567,0.251682793,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160003,202007,100,9508,R,3.973255328,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160004,202001,100,0,R,,1,1,0.514064257,24.45957447,0,4,4,true,false,false
+160004,202002,100,0,R,1,1,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160004,202003,100,0,R,1,1,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160004,202004,100,0,R,1,1,1.221349712,0.491367827,29.10638298,4,4,4,false,false,false
+160004,202005,100,0,R,1,1,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160004,202006,100,0,R,1,1,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160004,202007,100,0,R,1,,1.392373278,1,58.94468085,4,0,4,false,true,false
+160005,202001,100,1630.004567,BI,,,1,0.514064257,24.45957447,0,4,4,true,false,false
+160005,202002,100,3170.818717,BI,,,6.859917508,2.808519679,85.80851064,4,4,4,false,false,false
+160005,202003,100,1129,R,,,0.509876734,1.414023652,27.891791,4,4,5,false,false,false
+160005,202005,100,3288.06383,C,,,4.197733712,1.714328633,99.63829787,4,4,4,false,false,false
+160005,202006,100,2696.985057,FIC,,,0.820235007,1.990781723,71.92340426,4,4,4,false,false,false
+160005,202007,100,3755.209925,FIC,,,1.392373278,1,58.94468085,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
index 496473ac..66df0d78 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/57_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-70001,202001,100,39,,3.280595369,1,47.92201545,107.48,5951,R,0,3,3,true,,true,true,false,false
-70001,202002,100,39,0.304822719,,0.521730457,0.718061822,54.70285714,1814,R,3,2,3,true,true,false,false,false,false
-70001,202003,100,39,,,56.19409367,0.668609812,120.084507,734,R,2,2,3,false,true,true,false,false,false
-70001,202004,100,39,,,1.506633706,1.000630631,93.18857143,96,R,2,2,3,true,false,false,false,false,false
-70001,202005,100,39,,,1.001786141,2.356922504,119.8970588,9086,R,2,2,2,false,true,true,false,false,false
-70001,202006,100,39,,80.59183673,0.548881634,27.65768328,106.7900552,3949,R,2,3,4,true,false,true,false,false,false
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,49,R,3,0,3,true,true,,false,true,false
-70002,202001,100,94,,139.6875,1,47.92201545,107.48,6705,R,0,3,3,true,,true,true,false,false
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,0.718061822,54.70285714,48,R,3,2,3,true,true,true,false,false,false
-70002,202003,100,94,111.6875,0.611497662,56.19409367,0.668609812,120.084507,5361,R,2,2,3,true,true,true,false,false,false
-70002,202004,100,94,1.63532923,0.951486868,1.506633706,1.000630631,93.18857143,8767,R,2,2,3,true,true,true,false,false,false
-70002,202005,100,94,1.050986654,1.23396277,1.001786141,2.356922504,119.8970588,9214,R,2,2,2,true,true,true,false,false,false
-70002,202006,100,94,0.810397222,2.148776978,0.548881634,27.65768328,106.7900552,7467,R,2,3,4,true,true,true,false,false,false
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,3475,R,3,0,3,true,true,,false,true,false
-70003,202001,100,42,,0.797950979,1,47.92201545,107.48,6153,R,0,3,3,true,,true,true,false,false
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,0.718061822,54.70285714,7711,R,3,2,3,true,true,true,false,false,false
-70003,202003,100,42,0.70068733,0.725721961,56.19409367,0.668609812,120.084507,5403,R,2,2,3,true,true,true,false,false,false
-70003,202004,100,42,1.377938182,1.049774394,1.506633706,1.000630631,93.18857143,7445,R,2,2,3,true,true,true,false,false,false
-70003,202005,100,42,0.952585628,3.479882237,1.001786141,2.356922504,119.8970588,7092,R,2,2,2,true,true,true,false,false,false
-70003,202006,100,42,0.287366046,0.232436131,0.548881634,27.65768328,106.7900552,2038,R,2,3,4,true,true,true,false,false,false
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,8768,R,3,0,3,true,true,,false,true,false
-70004,202001,100,6,,,1,47.92201545,107.48,216376.17766,BI,0,3,3,,,,true,false,false
-70004,202002,100,6,,,0.521730457,0.718061822,54.70285714,4515.172737,BI,3,2,3,,,,false,false,false
-70004,202003,100,6,,,56.19409367,0.668609812,120.084507,6288,R,2,2,3,true,,,false,false,false
-70004,202004,100,6,,,1.506633706,1.000630631,93.18857143,9473.712744,FIR,2,2,3,,,,false,false,false
-70004,202005,100,6,,,1.001786141,2.356922504,119.8970588,9490.634133,FIR,2,2,2,,,,false,false,false
-70004,202006,100,6,,,0.548881634,27.65768328,106.7900552,5875,R,2,3,4,true,,,false,false,false
-70004,202007,100,6,,,1.593348776,1,70.24,9360.924061,FIR,3,0,3,,,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+70001,202001,100,,3.280595369,1,47.92201545,107.48,5951,R,0,3,3,true,,true,true,false,false
+70001,202002,100,0.304822719,,0.521730457,0.718061822,54.70285714,1814,R,3,2,3,true,true,false,false,false,false
+70001,202003,100,,,56.19409367,0.668609812,120.084507,734,R,2,2,3,false,true,true,false,false,false
+70001,202004,100,,,1.506633706,1.000630631,93.18857143,96,R,2,2,3,true,false,false,false,false,false
+70001,202005,100,,,1.001786141,2.356922504,119.8970588,9086,R,2,2,2,false,true,true,false,false,false
+70001,202006,100,,80.59183673,0.548881634,27.65768328,106.7900552,3949,R,2,3,4,true,false,true,false,false,false
+70001,202007,100,0.012408205,,1.593348776,1,70.24,49,R,3,0,3,true,true,,false,true,false
+70002,202001,100,,139.6875,1,47.92201545,107.48,6705,R,0,3,3,true,,true,true,false,false
+70002,202002,100,0.007158837,0.008953553,0.521730457,0.718061822,54.70285714,48,R,3,2,3,true,true,true,false,false,false
+70002,202003,100,111.6875,0.611497662,56.19409367,0.668609812,120.084507,5361,R,2,2,3,true,true,true,false,false,false
+70002,202004,100,1.63532923,0.951486868,1.506633706,1.000630631,93.18857143,8767,R,2,2,3,true,true,true,false,false,false
+70002,202005,100,1.050986654,1.23396277,1.001786141,2.356922504,119.8970588,9214,R,2,2,2,true,true,true,false,false,false
+70002,202006,100,0.810397222,2.148776978,0.548881634,27.65768328,106.7900552,7467,R,2,3,4,true,true,true,false,false,false
+70002,202007,100,0.46538101,,1.593348776,1,70.24,3475,R,3,0,3,true,true,,false,true,false
+70003,202001,100,,0.797950979,1,47.92201545,107.48,6153,R,0,3,3,true,,true,true,false,false
+70003,202002,100,1.253209816,1.427170091,0.521730457,0.718061822,54.70285714,7711,R,3,2,3,true,true,true,false,false,false
+70003,202003,100,0.70068733,0.725721961,56.19409367,0.668609812,120.084507,5403,R,2,2,3,true,true,true,false,false,false
+70003,202004,100,1.377938182,1.049774394,1.506633706,1.000630631,93.18857143,7445,R,2,2,3,true,true,true,false,false,false
+70003,202005,100,0.952585628,3.479882237,1.001786141,2.356922504,119.8970588,7092,R,2,2,2,true,true,true,false,false,false
+70003,202006,100,0.287366046,0.232436131,0.548881634,27.65768328,106.7900552,2038,R,2,3,4,true,true,true,false,false,false
+70003,202007,100,4.302257115,,1.593348776,1,70.24,8768,R,3,0,3,true,true,,false,true,false
+70004,202001,100,,,1,47.92201545,107.48,216376.17766,BI,0,3,3,,,,true,false,false
+70004,202002,100,,,0.521730457,0.718061822,54.70285714,4515.172737,BI,3,2,3,,,,false,false,false
+70004,202003,100,,,56.19409367,0.668609812,120.084507,6288,R,2,2,3,true,,,false,false,false
+70004,202004,100,,,1.506633706,1.000630631,93.18857143,9473.712744,FIR,2,2,3,,,,false,false,false
+70004,202005,100,,,1.001786141,2.356922504,119.8970588,9490.634133,FIR,2,2,2,,,,false,false,false
+70004,202006,100,,,0.548881634,27.65768328,106.7900552,5875,R,2,3,4,true,,,false,false,false
+70004,202007,100,,,1.593348776,1,70.24,9360.924061,FIR,3,0,3,,,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_output.csv
index 3208283d..2f328680 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/58_TB_10_partial_default_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-80001,202001,100,89,,,1,1,107.0882867,9244,R,0,0,12,,,true,true,false
-80001,202002,100,89,,,1,1,1,9244,FIR,0,0,0,,,true,true,true
-80001,202003,100,89,,,1,1,1,9244,FIR,0,0,0,,,true,true,true
-80002,202001,100,83,,,1,1,107.0882867,4826,R,0,0,12,,,true,true,false
-80002,202002,100,83,,,1,1,1,4826,FIR,0,0,0,,,true,true,true
-80002,202003,100,83,,,1,1,1,4826,FIR,0,0,0,,,true,true,true
-80003,202001,100,4,,,1,1,107.0882867,7586,R,0,0,12,,,true,true,false
-80003,202002,100,4,,,1,1,1,7586,FIR,0,0,0,,,true,true,true
-80003,202003,100,4,,,1,1,1,7586,FIR,0,0,0,,,true,true,true
-80004,202001,100,76,,,1,1,107.0882867,3975,R,0,0,12,,,true,true,false
-80004,202002,100,76,,,1,1,1,3975,FIR,0,0,0,,,true,true,true
-80004,202003,100,76,,,1,1,1,3975,FIR,0,0,0,,,true,true,true
-80005,202001,100,18,,,1,1,107.0882867,1941,R,0,0,12,,,true,true,false
-80005,202002,100,18,,,1,1,1,1941,FIR,0,0,0,,,true,true,true
-80005,202003,100,18,,,1,1,1,1941,FIR,0,0,0,,,true,true,true
-80006,202001,100,94,,,1,1,107.0882867,5405,R,0,0,12,,,true,true,false
-80006,202002,100,94,,,1,1,1,5405,FIR,0,0,0,,,true,true,true
-80006,202003,100,94,,,1,1,1,5405,FIR,0,0,0,,,true,true,true
-80007,202001,100,8,,,1,1,107.0882867,15172,R,0,0,12,,,true,true,false
-80007,202002,100,8,,,1,1,1,15172,FIR,0,0,0,,,true,true,true
-80007,202003,100,8,,,1,1,1,15172,FIR,0,0,0,,,true,true,true
-80008,202001,100,304,,,1,1,107.0882867,16298,R,0,0,12,,,true,true,false
-80008,202002,100,304,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
-80008,202003,100,304,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
-80009,202001,100,45,,,1,1,107.0882867,3698,R,0,0,12,,,true,true,false
-80009,202002,100,45,,,1,1,1,3698,FIR,0,0,0,,,true,true,true
-80009,202003,100,45,,,1,1,1,3698,FIR,0,0,0,,,true,true,true
-80010,202001,100,100,,,1,1,107.0882867,7722,R,0,0,12,,,true,true,false
-80010,202002,100,100,,,1,1,1,7722,FIR,0,0,0,,,true,true,true
-80010,202003,100,100,,,1,1,1,7722,FIR,0,0,0,,,true,true,true
-80011,202001,100,19,,,1,1,107.0882867,30344,R,0,0,12,,,true,true,false
-80011,202002,100,19,,,1,1,1,30344,FIR,0,0,0,,,true,true,true
-80011,202003,100,19,,,1,1,1,30344,FIR,0,0,0,,,true,true,true
-80012,202001,100,304,,,1,1,107.0882867,16298,R,0,0,12,,,true,true,false
-80012,202002,100,304,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
-80012,202003,100,304,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
-80013,202001,200,54,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,false,false
-80013,202002,200,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,false,false,false
-80013,202003,200,54,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,false,true,false
-80014,202001,200,47,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,false,false
-80014,202002,200,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,false,false,false
-80014,202003,200,42,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,false,true,false
-80015,202001,200,57,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,false,false
-80015,202002,200,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,false,false,false
-80015,202003,200,57,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,false,true,false
-80016,202001,200,163,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,false,false
-80016,202002,200,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,false,false,false
-80016,202003,200,163,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,false,true,false
-80017,202001,200,149,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,false,false
-80017,202002,200,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,false,false,false
-80017,202003,200,149,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,false,true,false
-80018,202001,200,126,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,false,false
-80018,202002,200,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,false,false,false
-80018,202003,200,126,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,false,true,false
-80019,202001,200,6,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,false,false
-80019,202002,200,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,false,false,false
-80019,202003,200,6,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,false,true,false
-80020,202001,200,22,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,false,false
-80020,202002,200,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,false,false,false
-80020,202003,200,22,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,false,true,false
-80021,202001,200,108,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,false,false
-80021,202002,200,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,false,false,false
-80021,202003,200,108,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,false,true,false
-80022,202001,200,67,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,false,false
-80022,202002,200,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,false,false,false
-80022,202003,200,67,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,false,true,false
-80023,202001,200,18,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,false,false
-80023,202002,200,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,false,false,false
-80023,202003,200,18,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,false,true,false
-80024,202001,200,155,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,true,false,false
-80024,202002,200,155,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,false,false,false
-80024,202003,200,155,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,false,true,false
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,100,,,1,1,107.0882867,9244,R,0,0,12,,,true,true,false
+80001,202002,100,,,1,1,1,9244,FIR,0,0,0,,,true,true,true
+80001,202003,100,,,1,1,1,9244,FIR,0,0,0,,,true,true,true
+80002,202001,100,,,1,1,107.0882867,4826,R,0,0,12,,,true,true,false
+80002,202002,100,,,1,1,1,4826,FIR,0,0,0,,,true,true,true
+80002,202003,100,,,1,1,1,4826,FIR,0,0,0,,,true,true,true
+80003,202001,100,,,1,1,107.0882867,7586,R,0,0,12,,,true,true,false
+80003,202002,100,,,1,1,1,7586,FIR,0,0,0,,,true,true,true
+80003,202003,100,,,1,1,1,7586,FIR,0,0,0,,,true,true,true
+80004,202001,100,,,1,1,107.0882867,3975,R,0,0,12,,,true,true,false
+80004,202002,100,,,1,1,1,3975,FIR,0,0,0,,,true,true,true
+80004,202003,100,,,1,1,1,3975,FIR,0,0,0,,,true,true,true
+80005,202001,100,,,1,1,107.0882867,1941,R,0,0,12,,,true,true,false
+80005,202002,100,,,1,1,1,1941,FIR,0,0,0,,,true,true,true
+80005,202003,100,,,1,1,1,1941,FIR,0,0,0,,,true,true,true
+80006,202001,100,,,1,1,107.0882867,5405,R,0,0,12,,,true,true,false
+80006,202002,100,,,1,1,1,5405,FIR,0,0,0,,,true,true,true
+80006,202003,100,,,1,1,1,5405,FIR,0,0,0,,,true,true,true
+80007,202001,100,,,1,1,107.0882867,15172,R,0,0,12,,,true,true,false
+80007,202002,100,,,1,1,1,15172,FIR,0,0,0,,,true,true,true
+80007,202003,100,,,1,1,1,15172,FIR,0,0,0,,,true,true,true
+80008,202001,100,,,1,1,107.0882867,16298,R,0,0,12,,,true,true,false
+80008,202002,100,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
+80008,202003,100,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
+80009,202001,100,,,1,1,107.0882867,3698,R,0,0,12,,,true,true,false
+80009,202002,100,,,1,1,1,3698,FIR,0,0,0,,,true,true,true
+80009,202003,100,,,1,1,1,3698,FIR,0,0,0,,,true,true,true
+80010,202001,100,,,1,1,107.0882867,7722,R,0,0,12,,,true,true,false
+80010,202002,100,,,1,1,1,7722,FIR,0,0,0,,,true,true,true
+80010,202003,100,,,1,1,1,7722,FIR,0,0,0,,,true,true,true
+80011,202001,100,,,1,1,107.0882867,30344,R,0,0,12,,,true,true,false
+80011,202002,100,,,1,1,1,30344,FIR,0,0,0,,,true,true,true
+80011,202003,100,,,1,1,1,30344,FIR,0,0,0,,,true,true,true
+80012,202001,100,,,1,1,107.0882867,16298,R,0,0,12,,,true,true,false
+80012,202002,100,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
+80012,202003,100,,,1,1,1,16298,FIR,0,0,0,,,true,true,true
+80013,202001,200,,1.10678653656397,1,1.314057,186.686659,20190,R,0,9,11,,true,true,false,false
+80013,202002,200,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,18242,R,9,10,12,true,true,false,false,false
+80013,202003,200,1.58019953952418,,1.246482,1,254.993795,28826,R,10,0,12,true,,false,true,false
+80014,202001,200,,0.845909451945989,1,1.314057,186.686659,4260,R,0,9,11,,true,true,false,false
+80014,202002,200,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,5036,R,9,10,12,true,true,false,false,false
+80014,202003,200,1.28752978554408,,1.246482,1,254.993795,6484,R,10,0,12,true,,false,true,false
+80015,202001,200,,3.88684582743989,1,1.314057,186.686659,19236,R,0,9,11,,false,true,false,false
+80015,202002,200,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,4949,R,9,10,12,false,true,false,false,false
+80015,202003,200,0.716104263487573,,1.246482,1,254.993795,3544,R,10,0,12,true,,false,true,false
+80016,202001,200,,0.906723456038941,1,1.314057,186.686659,14902,R,0,9,11,,true,true,false,false
+80016,202002,200,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,16435,R,9,10,12,true,true,false,false,false
+80016,202003,200,1.500030422878,,1.246482,1,254.993795,24653,R,10,0,12,true,,false,true,false
+80017,202001,200,,0.702286449569435,1,1.314057,186.686659,35476,R,0,9,11,,true,true,false,false
+80017,202002,200,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,50515,R,9,10,12,true,true,false,false,false
+80017,202003,200,1.05863604869841,,1.246482,1,254.993795,53477,R,10,0,12,true,,false,true,false
+80018,202001,200,,0.543196798493409,1,1.314057,186.686659,13845,R,0,9,11,,true,true,false,false
+80018,202002,200,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,25488,R,9,10,12,true,true,false,false,false
+80018,202003,200,1.07536880100439,,1.246482,1,254.993795,27409,R,10,0,12,true,,false,true,false
+80019,202001,200,,2.53225806451613,1,1.314057,186.686659,1099,R,0,9,11,,true,true,false,false
+80019,202002,200,0.394904458598726,3.5,0.998934,0.857991,196.966908,434,R,9,10,12,true,false,false,false,false
+80019,202003,200,0.285714285714286,,1.246482,1,254.993795,124,R,10,0,12,false,,false,true,false
+80020,202001,200,,1.67735470941884,1,1.314057,186.686659,3348,R,0,9,11,,true,true,false,false
+80020,202002,200,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,1996,R,9,10,12,true,false,false,false,false
+80020,202003,200,2.53056112224449,,1.246482,1,254.993795,5051,R,10,0,12,false,,false,true,false
+80021,202001,200,,0.855039803324748,1,1.314057,186.686659,29215,R,0,9,11,,true,true,false,false
+80021,202002,200,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,34168,R,9,10,12,true,true,false,false,false
+80021,202003,200,1.80367595410911,,1.246482,1,254.993795,61628,R,10,0,12,true,,false,true,false
+80022,202001,200,,0.502951593860685,1,1.314057,186.686659,6390,R,0,9,11,,false,true,false,false
+80022,202002,200,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,12705,R,9,10,12,false,true,false,false,false
+80022,202003,200,0.941833923652106,,1.246482,1,254.993795,11966,R,10,0,12,true,,false,true,false
+80023,202001,200,,2.65695981362842,1,1.314057,186.686659,4562,R,0,9,11,,true,true,false,false
+80023,202002,200,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,1717,R,9,10,12,true,true,false,false,false
+80023,202003,200,1.38089691322073,,1.246482,1,254.993795,2371,R,10,0,12,true,,false,true,false
+80024,202001,200,,,1,1.314057,186.686659,24680.622922,BI,0,9,11,,,true,false,false
+80024,202002,200,,0.892426114225981,0.998934,0.857991,196.966908,18782,R,9,10,12,,true,false,false,false
+80024,202003,200,1.1205409434565,,1.246482,1,254.993795,21046,R,10,0,12,true,,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
index bf82ec9b..fa51e099 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/59_class_change_50_weight_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-210001,202001,1,10,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.444903,547,R,0,2,3,true,false,false
-210001,202002,1,10,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,false,false,false
-210001,202003,1,10,2.472375691,,1.42292432,1,18.48333333,1.195578,1,44.372349,895,R,2,0,2,false,true,false
-210002,202001,1,50,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.444903,381,R,0,2,3,true,false,false
-210002,202002,1,50,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,false,false,false
-210002,202003,1,50,0.373472949,,1.42292432,1,18.48333333,1.195578,1,44.372349,214,R,2,0,2,false,true,false
-210003,202001,2,12,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,true,false,false
-210003,202002,2,12,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,false,false,false
-210003,202003,2,12,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,false,true,false
-210004,202001,2,9,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,true,false,false
-210004,202002,2,9,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,false,false,false
-210004,202003,2,9,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,false,true,false
-210005,202001,1,18,,,1,1.087985595,13.17948718,1,1.872332947,57.444903,100,R,0,2,3,true,false,false
-210005,202002,2,18,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.04471,C,2,2,2,false,false,false
-210005,202003,2,18,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577394,FIC,2,0,2,false,true,false
-210001,201901,1,10,,,1,2.656680299,101.7103175,,,,0,R,,,,,,
-210001,201902,1,10,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,
-210001,201903,1,10,,,0.968230653,1,70.26136364,,,,0,R,,,,,,
-210002,201901,1,50,,,1,2.656680299,101.7103175,,,,0,R,,,,,,
-210002,201902,1,50,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,
-210002,201903,1,50,,,0.968230653,1,70.26136364,,,,0,R,,,,,,
-210003,201901,2,12,,,1,0.68736285,182.25,,,,0,R,,,,,,
-210003,201902,2,12,,,0.994479964,1.158863126,150.2748092,,,,0,R,,,,,,
-210003,201903,2,12,,,1.259780318,1,182.2366412,,,,0,R,,,,,,
-210004,201901,2,9,,,1,0.68736285,182.25,,,,0,R,,,,,,
-210004,201902,2,9,,,0.994479964,1.158863126,150.2748092,,,,0,R,,,,,,
-210004,201903,2,9,,,1.259780318,1,182.2366412,,,,0,R,,,,,,
-210005,201901,1,18,,,1,2.656680299,101.7103175,,,,0,R,,,,,,
-210005,201902,2,18,,,0.994479964,1.158863126,150.2748092,,,,0,R,,,,,,
-210005,201903,2,18,,,1.259780318,1,182.2366412,,,,0,R,,,,,,
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+210001,202001,1,,1.511049724,1,1.087985595,13.17948718,1,1.872332947,57.444903,547,R,0,2,3,true,false,false
+210001,202002,1,0.66179159,0.404469274,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,362,R,2,2,2,false,false,false
+210001,202003,1,2.472375691,,1.42292432,1,18.48333333,1.195578,1,44.372349,895,R,2,0,2,false,true,false
+210002,202001,1,,0.664921466,1,1.087985595,13.17948718,1,1.872332947,57.444903,381,R,0,2,3,true,false,false
+210002,202002,1,1.503937008,2.677570093,1.082864299,1.541019684,15.58333333,0.927357249,1.336345707,45.25,573,R,2,2,2,false,false,false
+210002,202003,1,0.373472949,,1.42292432,1,18.48333333,1.195578,1,44.372349,214,R,2,0,2,false,true,false
+210003,202001,2,,3.599250936,1,2.241504449,72.19047619,1,1.46443365,127.2202381,961,R,0,2,2,true,false,false
+210003,202002,2,0.277835588,0.850318471,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,267,R,2,2,2,false,false,false
+210003,202003,2,1.176029963,,1.174002242,1,50,1.21689128,1,116.1183206,314,R,2,0,2,false,true,false
+210004,202001,2,,0.883757962,1,2.241504449,72.19047619,1,1.46443365,127.2202381,555,R,0,2,2,true,false,false
+210004,202002,2,1.131531532,0.85326087,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,628,R,2,2,2,false,false,false
+210004,202003,2,1.171974522,,1.174002242,1,50,1.21689128,1,116.1183206,736,R,2,0,2,false,true,false
+210005,202001,1,,,1,1.087985595,13.17948718,1,1.872332947,57.444903,100,R,0,2,3,true,false,false
+210005,202002,2,,,0.70468356,0.85178967,42.61904762,0.849581762,1.005326398,96.44692841,1736.04471,C,2,2,2,false,false,false
+210005,202003,2,,,1.174002242,1,50,1.21689128,1,116.1183206,2112.577394,FIC,2,0,2,false,true,false
+210001,201901,1,,,1,2.656680299,101.7103175,,,,0,R,,,,,,
+210001,201902,1,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,
+210001,201903,1,,,0.968230653,1,70.26136364,,,,0,R,,,,,,
+210002,201901,1,,,1,2.656680299,101.7103175,,,,0,R,,,,,,
+210002,201902,1,,,0.771850199,1.13167173,74.91666667,,,,0,R,,,,,,
+210002,201903,1,,,0.968230653,1,70.26136364,,,,0,R,,,,,,
+210003,201901,2,,,1,0.68736285,182.25,,,,0,R,,,,,,
+210003,201902,2,,,0.994479964,1.158863126,150.2748092,,,,0,R,,,,,,
+210003,201903,2,,,1.259780318,1,182.2366412,,,,0,R,,,,,,
+210004,201901,2,,,1,0.68736285,182.25,,,,0,R,,,,,,
+210004,201902,2,,,0.994479964,1.158863126,150.2748092,,,,0,R,,,,,,
+210004,201903,2,,,1.259780318,1,182.2366412,,,,0,R,,,,,,
+210005,201901,1,,,1,2.656680299,101.7103175,,,,0,R,,,,,,
+210005,201902,2,,,0.994479964,1.158863126,150.2748092,,,,0,R,,,,,,
+210005,201903,2,,,1.259780318,1,182.2366412,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv
index 6dcd14cf..690d3884 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/60_BI_BI_R_FI_FI_R_FI_50_weight_default_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-70001,202001,100,39,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,true,false,false
-70001,202002,100,39,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,false,false,false
-70001,202003,100,39,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,734,R,3,3,4,false,false,false
-70001,202004,100,39,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,96,R,3,3,3,false,false,false
-70001,202005,100,39,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,false,false,false
-70001,202006,100,39,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,false,false,false
-70001,202007,100,39,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,false,true,false
-70002,202001,100,94,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,true,false,false
-70002,202002,100,94,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,false,false,false
-70002,202003,100,94,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,5361,R,3,3,4,false,false,false
-70002,202004,100,94,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,8767,R,3,3,3,false,false,false
-70002,202005,100,94,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,false,false,false
-70002,202006,100,94,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,false,false,false
-70002,202007,100,94,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,false,true,false
-70003,202001,100,42,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,true,false,false
-70003,202002,100,42,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,false,false,false
-70003,202003,100,42,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,5403,R,3,3,4,false,false,false
-70003,202004,100,42,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,7445,R,3,3,3,false,false,false
-70003,202005,100,42,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,false,false,false
-70003,202006,100,42,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,false,false,false
-70003,202007,100,42,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,false,true,false
-70004,202001,100,6,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.057503,BI,0,3,3,true,false,false
-70004,202002,100,6,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.14785584,BI,3,3,3,false,false,false
-70004,202003,100,6,,,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,6288,R,3,3,4,false,false,false
-70004,202004,100,6,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,7768.645424,FIR,3,3,3,false,false,false
-70004,202005,100,6,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.380507,FIR,3,3,3,false,false,false
-70004,202006,100,6,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,false,false,false
-70004,202007,100,6,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924061,FIR,3,0,3,false,true,false
-70001,201901,100,39,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
-70001,201903,100,39,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
-70001,201904,100,39,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
-70001,201905,100,39,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
-70001,201906,100,39,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
-70002,201901,100,94,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
-70002,201903,100,94,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
-70002,201904,100,94,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
-70002,201905,100,94,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
-70002,201906,100,94,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
-70003,201901,100,42,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
-70003,201903,100,42,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
-70003,201904,100,42,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
-70003,201905,100,42,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
-70003,201906,100,42,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
-70004,201901,100,6,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
-70004,201903,100,6,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
-70004,201904,100,6,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
-70004,201905,100,6,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
-70004,201906,100,6,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+70001,202001,100,,3.280595369,1,47.92201545,107.48,1,24.71653259,104.5951588,5951,R,0,3,3,true,false,false
+70001,202002,100,0.304822719,2.471389646,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,1814,R,3,3,3,false,false,false
+70001,202003,100,0.40463065,7.645833333,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,734,R,3,3,4,false,false,false
+70001,202004,100,0.130790191,0.010565705,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,96,R,3,3,3,false,false,false
+70001,202005,100,94.64583333,2.300835655,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9086,R,3,3,3,false,false,false
+70001,202006,100,0.434624697,80.59183673,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,3949,R,3,3,4,false,false,false
+70001,202007,100,0.012408205,,1.593348776,1,70.24,1.593348776,1,70.24,49,R,3,0,3,false,true,false
+70002,202001,100,,139.6875,1,47.92201545,107.48,1,24.71653259,104.5951588,6705,R,0,3,3,true,false,false
+70002,202002,100,0.007158837,0.008953553,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,48,R,3,3,3,false,false,false
+70002,202003,100,111.6875,0.611497662,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,5361,R,3,3,4,false,false,false
+70002,202004,100,1.63532923,0.951486868,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,8767,R,3,3,3,false,false,false
+70002,202005,100,1.050986654,1.23396277,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,9214,R,3,3,3,false,false,false
+70002,202006,100,0.810397222,2.148776978,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,7467,R,3,3,4,false,false,false
+70002,202007,100,0.46538101,,1.593348776,1,70.24,1.593348776,1,70.24,3475,R,3,0,3,false,true,false
+70003,202001,100,,0.797950979,1,47.92201545,107.48,1,24.71653259,104.5951588,6153,R,0,3,3,true,false,false
+70003,202002,100,1.253209816,1.427170091,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,7711,R,3,3,3,false,false,false
+70003,202003,100,0.70068733,0.725721961,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,5403,R,3,3,4,false,false,false
+70003,202004,100,1.377938182,1.049774394,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,7445,R,3,3,3,false,false,false
+70003,202005,100,0.952585628,3.479882237,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,7092,R,3,3,3,false,false,false
+70003,202006,100,0.287366046,0.232436131,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,2038,R,3,3,4,false,false,false
+70003,202007,100,4.302257115,,1.593348776,1,70.24,1.593348776,1,70.24,8768,R,3,0,3,false,true,false
+70004,202001,100,,,1,47.92201545,107.48,1,24.71653259,104.5951588,202432.057503,BI,0,3,3,true,false,false
+70004,202002,100,,,0.521730457,1.30250443,54.70285714,0.521730457,1.30250443,54.70285714,8190.14785584,BI,3,3,3,false,false,false
+70004,202003,100,,,37.59760599,2.994350985,98.26519337,19.34023514,1.997175,84.26327851,6288,R,3,3,4,false,false,false
+70004,202004,100,,,1.048019201,0.670608989,93.18857143,1.235471761,0.667765228,97.449445,7768.645424,FIR,3,3,3,false,false,false
+70004,202005,100,,,32.21646854,2.338226887,145.0971429,16.46057605,2.50789849,110.0069048,127876.380507,FIR,3,3,3,false,false,false
+70004,202006,100,,,0.510795988,27.65768328,106.7900552,0.842399115,14.03107628,144.5133482,5875,R,3,3,4,false,false,false
+70004,202007,100,,,1.593348776,1,70.24,1.593348776,1,70.24,9360.924061,FIR,3,0,3,false,true,false
+70001,201901,100,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70001,201903,100,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70001,201904,100,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70001,201905,100,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70001,201906,100,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+70002,201901,100,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70002,201903,100,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70002,201904,100,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70002,201905,100,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70002,201906,100,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+70003,201901,100,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70003,201903,100,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70003,201904,100,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70003,201905,100,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70003,201906,100,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
+70004,201901,100,,,1,1.511049724,101.7103175,,,,0,R,,,,,,
+70004,201903,100,,,1.082864299,1,70.26136364,,,,0,R,,,,,,
+70004,201904,100,,,1.42292432,0.664921466,101.7103175,,,,0,R,,,,,,
+70004,201905,100,,,0.70468356,2.677570093,74.91666667,,,,0,R,,,,,,
+70004,201906,100,,,1.174002242,0.404469274,182.2366412,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
index ad637cda..4bef9da7 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/61_R_R_FI-BI_R_R_50_weight_filtered_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,1,2.09204015,76.03985875,9244,R,0,4,4,true,,true,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,1,2.09204015,76.03985875,4826,R,0,4,4,true,,true,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,true,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,true,,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,1,2.09204015,76.03985875,7586,R,0,4,4,true,,true,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,true,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,true,,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,1,2.09204015,76.03985875,3975,R,0,4,4,true,,true,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,true,,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,false,true,false
-110005,202001,200,27,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,,true,true,false,false
-110005,202002,200,27,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,true,false,false,false
-110005,202003,200,27,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,true,,false,true,false
-110006,202001,200,42,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,,true,true,false,false
-110006,202002,200,42,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,true,false,false,false
-110006,202003,200,42,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,true,,false,true,false
-110007,202001,200,19,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,,true,true,false,false
-110007,202002,200,19,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,true,false,false,false
-110007,202003,200,19,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,true,,false,true,false
-110008,202001,200,43,,,1,2.290844366,182.25,1,2.642597676,144.865,10340.484733,BI,0,3,3,,,,true,false,false
-110008,202002,200,43,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,true,,true,false,false,false
-110008,202003,200,43,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,true,,false,true,false
-110009,202001,100,85,,,1,2.656680299,101.710317,1,2.09204015,76.03985875,150000,R,0,4,4,false,,false,true,false,false
-110009,202002,100,85,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,false,false,false,false,false,false
-110009,202003,100,85,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,120000,R,3,0,3,false,false,,false,true,false
-110010,202001,100,71,,,1,2.656680299,101.710317,1,2.09204015,76.03985875,5398.82997,C,0,4,4,,,,true,false,false
-110010,202002,100,71,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.927407,FIC,4,3,4,,,,false,false,false
-110010,202003,100,71,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4888.735263,FIC,3,0,3,,,,false,true,false
-110011,202001,200,85,,,1,2.290844366,182.25,1,2.642597676,144.865,150000,R,0,3,3,false,,false,true,false,false
-110011,202002,200,85,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,false,false,false,false,false,false
-110011,202003,200,85,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,120000,R,4,0,4,false,false,,false,true,false
-110012,202001,200,71,,,1,2.290844366,182.25,1,2.642597676,144.865,10285.415,C,0,3,3,,,,true,false,false
-110012,202002,200,71,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.651655,FIC,3,4,4,,,,false,false,false
-110012,202003,200,71,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,13496.155388,FIC,4,0,4,,,,false,true,false
-110001,201901,100,89,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
-110001,201902,100,89,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
-110001,201903,100,89,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
-110002,201901,100,83,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
-110002,201902,100,83,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
-110002,201903,100,83,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
-110003,201901,100,4,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
-110003,201902,100,4,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
-110003,201903,100,4,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
-110004,201901,100,76,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
-110004,201902,100,76,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
-110004,201903,100,76,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
-110005,201901,200,27,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
-110005,201902,200,27,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
-110005,201903,200,27,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
-110006,201901,200,42,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
-110006,201902,200,42,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
-110006,201903,200,42,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
-110007,201901,200,19,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
-110007,201902,200,19,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
-110007,201903,200,19,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
-110008,201901,200,43,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
-110008,201902,200,43,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
-110008,201903,200,43,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
-110009,201901,100,85,,,1,1,1,,,,0,R,,,,,,,,,
-110009,201902,100,85,,,1,1,1,,,,0,R,,,,,,,,,
-110009,201903,100,85,,,1,1,1,,,,0,R,,,,,,,,,
-110010,201901,100,71,,,1,1,1,,,,0,R,,,,,,,,,
-110010,201902,100,71,,,1,1,1,,,,0,R,,,,,,,,,
-110010,201903,100,71,,,1,1,1,,,,0,R,,,,,,,,,
-110011,201901,200,85,,,1,1,1,,,,0,R,,,,,,,,,
-110011,201902,200,85,,,1,1,1,,,,0,R,,,,,,,,,
-110011,201903,200,85,,,1,1,1,,,,0,R,,,,,,,,,
-110012,201901,200,71,,,1,1,1,,,,0,R,,,,,,,,,
-110012,201902,200,71,,,1,1,1,,,,0,R,,,,,,,,,
-110012,201903,200,71,,,1,1,1,,,,0,R,,,,,,,,,
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+110001,202001,100,,1.036787797,1,2.656680299,101.710317,1,2.09204015,76.03985875,9244,R,0,4,4,true,,true,true,false,false
+110001,202002,100,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,8916,R,4,3,4,true,true,true,false,false,false
+110001,202003,100,0.694706146,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,6194,R,3,0,3,true,true,,false,true,false
+110002,202001,100,,0.817550398,1,2.656680299,101.710317,1,2.09204015,76.03985875,4826,R,0,4,4,true,,true,true,false,false
+110002,202002,100,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,5903,R,4,3,4,true,true,true,false,false,false
+110002,202003,100,0.803489751,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4743,R,3,0,3,true,true,,false,true,false
+110003,202001,100,,7.466535433,1,2.656680299,101.710317,1,2.09204015,76.03985875,7586,R,0,4,4,true,,true,true,false,false
+110003,202002,100,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,1016,R,4,3,4,true,true,true,false,false,false
+110003,202003,100,1.406496063,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,1429,R,3,0,3,true,true,,false,true,false
+110004,202001,100,,1.305847569,1,2.656680299,101.710317,1,2.09204015,76.03985875,3975,R,0,4,4,true,,true,true,false,false
+110004,202002,100,0.765786164,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,3044,R,4,3,4,true,true,,false,false,false
+110004,202003,100,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,3167.633054,FIR,3,0,3,,,,false,true,false
+110005,202001,200,,0.743586089,1,2.290844366,182.25,1,2.642597676,144.865,5217,R,0,3,3,true,,true,true,false,false
+110005,202002,200,1.344834196,0.70583501,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7016,R,3,4,4,true,true,true,false,false,false
+110005,202003,200,1.416761688,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,9940,R,4,0,4,true,true,,false,true,false
+110006,202001,200,,0.68736285,1,2.290844366,182.25,1,2.642597676,144.865,5325,R,0,3,3,true,,true,true,false,false
+110006,202002,200,1.454835681,1.158863126,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,7747,R,3,4,4,true,true,true,false,false,false
+110006,202003,200,0.862914677,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6685,R,4,0,4,true,true,,false,true,false
+110007,202001,200,,5.441584158,1,2.290844366,182.25,1,2.642597676,144.865,5496,R,0,3,3,true,,true,true,false,false
+110007,202002,200,0.183770015,0.817813765,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,1010,R,3,4,4,true,true,true,false,false,false
+110007,202003,200,1.222772277,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,1235,R,4,0,4,true,true,,false,true,false
+110008,202001,200,,,1,2.290844366,182.25,1,2.642597676,144.865,10340.484733,BI,0,3,3,,,,true,false,false
+110008,202002,200,,0.650756694,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,3913,R,3,4,4,true,,true,false,false,false
+110008,202003,200,1.53667263,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,6013,R,4,0,4,true,true,,false,true,false
+110009,202001,100,,,1,2.656680299,101.710317,1,2.09204015,76.03985875,150000,R,0,4,4,false,,false,true,false,false
+110009,202002,100,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,180000,R,4,3,4,false,false,false,false,false,false
+110009,202003,100,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,120000,R,3,0,3,false,false,,false,true,false
+110010,202001,100,,,1,2.656680299,101.710317,1,2.09204015,76.03985875,5398.82997,C,0,4,4,,,,true,false,false
+110010,202002,100,,,0.771850199,1.13167173,74.91666667,0.8701751,1.505585865,98.16768334,4697.927407,FIC,4,3,4,,,,false,false,false
+110010,202003,100,,,0.968230653,1,70.26136364,1.040615327,1,79.81873182,4888.735263,FIC,3,0,3,,,,false,true,false
+110011,202001,200,,,1,2.290844366,182.25,1,2.642597676,144.865,150000,R,0,3,3,false,,false,true,false,false
+110011,202002,200,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,180000,R,3,4,4,false,false,false,false,false,false
+110011,202003,200,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,120000,R,4,0,4,false,false,,false,true,false
+110012,202001,200,,,1,2.290844366,182.25,1,2.642597676,144.865,10285.415,C,0,3,3,,,,true,false,false
+110012,202002,200,,,0.994479964,0.833317149,150.2748092,1.186209073,0.751963069,102.4888332,12200.651655,FIC,3,4,4,,,,false,false,false
+110012,202003,200,,,1.259780318,1,182.2366412,1.106182973,1,140.2509173,13496.155388,FIC,4,0,4,,,,false,true,false
+110001,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
+110001,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
+110001,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
+110002,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
+110002,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
+110002,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
+110003,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
+110003,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
+110003,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
+110004,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,,,,
+110004,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,,,,
+110004,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,,,,
+110005,201901,200,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
+110005,201902,200,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
+110005,201903,200,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
+110006,201901,200,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
+110006,201902,200,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
+110006,201903,200,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
+110007,201901,200,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
+110007,201902,200,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
+110007,201903,200,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
+110008,201901,200,,,1,2.994350985,107.48,,,,0,R,,,,,,,,,
+110008,201902,200,,,1.377938182,0.670608989,54.70285714,,,,0,R,,,,,,,,,
+110008,201903,200,,,0.952585628,1,98.26519337,,,,0,R,,,,,,,,,
+110009,201901,100,,,1,1,1,,,,0,R,,,,,,,,,
+110009,201902,100,,,1,1,1,,,,0,R,,,,,,,,,
+110009,201903,100,,,1,1,1,,,,0,R,,,,,,,,,
+110010,201901,100,,,1,1,1,,,,0,R,,,,,,,,,
+110010,201902,100,,,1,1,1,,,,0,R,,,,,,,,,
+110010,201903,100,,,1,1,1,,,,0,R,,,,,,,,,
+110011,201901,200,,,1,1,1,,,,0,R,,,,,,,,,
+110011,201902,200,,,1,1,1,,,,0,R,,,,,,,,,
+110011,201903,200,,,1,1,1,,,,0,R,,,,,,,,,
+110012,201901,200,,,1,1,1,,,,0,R,,,,,,,,,
+110012,201902,200,,,1,1,1,,,,0,R,,,,,,,,,
+110012,201903,200,,,1,1,1,,,,0,R,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
index 93b9b0eb..9e7bc10a 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/62_mixed_data_50_weight_output.csv
@@ -1,43 +1,43 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,,1.036787797,1,2.656680299,101.710317,1,2.374360225,88.87508813,9244,R,0,4,4,true,false,false
-110001,202002,100,89,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,false,false,false
-110001,202003,100,89,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,false,true,false
-110002,202001,100,83,,0.817550398,1,2.656680299,101.710317,1,2.374360225,88.87508813,4826,R,0,4,4,true,false,false
-110002,202002,100,83,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,false,false,false
-110002,202003,100,83,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,false,true,false
-110003,202001,100,4,,7.466535433,1,2.656680299,101.710317,1,2.374360225,88.87508813,7586,R,0,4,4,true,false,false
-110003,202002,100,4,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,false,false,false
-110003,202003,100,4,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,false,true,false
-110004,202001,100,76,,1.305847569,1,2.656680299,101.710317,1,2.374360225,88.87508813,3975,R,0,4,4,true,false,false
-110004,202002,100,76,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,false,false,false
-110004,202003,100,76,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463084,FIR,3,0,3,false,true,false
-110005,202001,200,27,,,1,1,126.785714,1,1.821298838,135.825357,15858.516846,BI,0,0,1,true,true,false
-110005,202002,200,27,,,1,1,1,1.093105,0.875981535,51.7444166,8707.25611,BI,0,0,0,true,true,true
-110005,202003,200,27,,,1,1,368.1481481,1.053092,1,254.1995327,9940,R,0,0,1,true,true,false
-110006,202001,200,42,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,true,false
-110006,202002,200,42,,,1,1,1,1.093105,0.875981535,51.7444166,5820.781463,FIR,0,0,0,true,true,true
-110006,202003,200,42,,,1,1,368.1481481,1.053092,1,254.1995327,6129.815482,FIR,0,0,1,true,true,false
-110007,202001,200,19,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,true,true,false
-110007,202002,200,19,,,1,1,1,1.093105,0.875981535,51.7444166,2820.954873,FIC,0,0,0,true,true,true
-110007,202003,200,19,,,1,1,368.1481481,1.053092,1,254.1995327,2970.723599,FIC,0,0,1,true,true,false
-110001,201901,100,89,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
-110001,201902,100,89,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
-110001,201903,100,89,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
-110002,201901,100,83,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
-110002,201902,100,83,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
-110002,201903,100,83,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
-110003,201901,100,4,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
-110003,201902,100,4,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
-110003,201903,100,4,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
-110004,201901,100,76,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
-110004,201902,100,76,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
-110004,201903,100,76,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
-110005,201901,200,27,,,1,2.642597676,144.865,,,,0,R,,,,,,
-110005,201902,200,27,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,
-110005,201903,200,27,,,1.106182973,1,140.2509173,,,,0,R,,,,,,
-110006,201901,200,42,,,1,2.642597676,144.865,,,,0,R,,,,,,
-110006,201902,200,42,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,
-110006,201903,200,42,,,1.106182973,1,140.2509173,,,,0,R,,,,,,
-110007,201901,200,19,,,1,2.642597676,144.865,,,,0,R,,,,,,
-110007,201902,200,19,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,
-110007,201903,200,19,,,1.106182973,1,140.2509173,,,,0,R,,,,,,
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,,1.036787797,1,2.656680299,101.710317,1,2.374360225,88.87508813,9244,R,0,4,4,true,false,false
+110001,202002,100,0.964517525,1.43945754,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,8916,R,4,3,4,false,false,false
+110001,202003,100,0.694706146,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,6194,R,3,0,3,false,true,false
+110002,202001,100,,0.817550398,1,2.656680299,101.710317,1,2.374360225,88.87508813,4826,R,0,4,4,true,false,false
+110002,202002,100,1.223166183,1.244570947,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,5903,R,4,3,4,false,false,false
+110002,202003,100,0.803489751,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,4743,R,3,0,3,false,true,false
+110003,202001,100,,7.466535433,1,2.656680299,101.710317,1,2.374360225,88.87508813,7586,R,0,4,4,true,false,false
+110003,202002,100,0.133930925,0.710986704,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,1016,R,4,3,4,false,false,false
+110003,202003,100,1.406496063,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,1429,R,3,0,3,false,true,false
+110004,202001,100,,1.305847569,1,2.656680299,101.710317,1,2.374360225,88.87508813,3975,R,0,4,4,true,false,false
+110004,202002,100,0.765786164,,0.771850199,1.13167173,74.91666667,0.82101265,1.318628798,86.54217501,3044,R,4,3,4,false,false,false
+110004,202003,100,,,0.968230653,1,70.26136364,1.00442299,1,75.04004773,3057.463084,FIR,3,0,3,false,true,false
+110005,202001,200,,,1,1,126.785714,1,1.821298838,135.825357,15858.516846,BI,0,0,1,true,true,false
+110005,202002,200,,,1,1,1,1.093105,0.875981535,51.7444166,8707.25611,BI,0,0,0,true,true,true
+110005,202003,200,,,1,1,368.1481481,1.053092,1,254.1995327,9940,R,0,0,1,true,true,false
+110006,202001,200,,,1,1,126.7857143,1,1.821298838,135.8253572,5325,R,0,0,1,true,true,false
+110006,202002,200,,,1,1,1,1.093105,0.875981535,51.7444166,5820.781463,FIR,0,0,0,true,true,true
+110006,202003,200,,,1,1,368.1481481,1.053092,1,254.1995327,6129.815482,FIR,0,0,1,true,true,false
+110007,202001,200,,,1,1,126.7857143,1,1.821298838,135.8253572,2580.681786,C,0,0,1,true,true,false
+110007,202002,200,,,1,1,1,1.093105,0.875981535,51.7444166,2820.954873,FIC,0,0,0,true,true,true
+110007,202003,200,,,1,1,368.1481481,1.053092,1,254.1995327,2970.723599,FIC,0,0,1,true,true,false
+110001,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
+110001,201902,100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
+110001,201903,100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
+110002,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
+110002,201902,100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
+110002,201903,100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
+110003,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
+110003,201902,100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
+110003,201903,100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
+110004,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,
+110004,201902,100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,
+110004,201903,100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,
+110005,201901,200,,,1,2.642597676,144.865,,,,0,R,,,,,,
+110005,201902,200,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,
+110005,201903,200,,,1.106182973,1,140.2509173,,,,0,R,,,,,,
+110006,201901,200,,,1,2.642597676,144.865,,,,0,R,,,,,,
+110006,201902,200,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,
+110006,201903,200,,,1.106182973,1,140.2509173,,,,0,R,,,,,,
+110007,201901,200,,,1,2.642597676,144.865,,,,0,R,,,,,,
+110007,201902,200,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,
+110007,201903,200,,,1.106182973,1,140.2509173,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
index 996f17e1..44a7cd46 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/63_TB_10_R_R_FI-BI_R_R_50_weight_output.csv
@@ -1,145 +1,145 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-80001,202001,100,89,,1.036787797,1,2.076231,107.088287,1,2.359415,125.976643,9244,R,0,10,12,,true,true,false,false
-80001,202002,100,89,0.964517525,1.43945754,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,8916,R,10,9,12,true,true,false,false,false
-80001,202003,100,89,0.694706146,,0.947092,1,69.128571,1.026638,1,104.689744,6194,R,9,0,11,true,,false,true,false
-80002,202001,100,83,,0.817550398,1,2.076231,107.088287,1,2.359415,125.976643,4826,R,0,10,12,,true,true,false,false
-80002,202002,100,83,1.223166183,1.244570947,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,5903,R,10,9,12,true,true,false,false,false
-80002,202003,100,83,0.803489751,,0.947092,1,69.128571,1.026638,1,104.689744,4743,R,9,0,11,true,,false,true,false
-80003,202001,100,4,,7.466535433,1,2.076231,107.088287,1,2.359415,125.976643,7586,R,0,10,12,,true,true,false,false
-80003,202002,100,4,0.133930925,0.710986704,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,1016,R,10,9,12,true,true,false,false,false
-80003,202003,100,4,1.406496063,,0.947092,1,69.128571,1.026638,1,104.689744,1429,R,9,0,11,true,,false,true,false
-80004,202001,100,76,,1.305847569,1,2.076231,107.088287,1,2.359415,125.976643,3975,R,0,10,12,,true,true,false,false
-80004,202002,100,76,0.765786164,0.82875034,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3044,R,10,9,12,true,true,false,false,false
-80004,202003,100,76,1.206636005,,0.947092,1,69.128571,1.026638,1,104.689744,3673,R,9,0,11,true,,false,true,false
-80005,202001,100,18,,0.621916,1,2.076231,107.088287,1,2.359415,125.976643,1941,R,0,10,12,,false,true,false,false
-80005,202002,100,18,1.607934,2.583609,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3121,R,10,9,12,false,false,false,false,false
-80005,202003,100,18,0.387055,,0.947092,1,69.128571,1.026638,1,104.689744,1208,R,9,0,11,false,,false,true,false
-80006,202001,100,94,,0.762987,1,2.076231,107.088287,1,2.359415,125.976643,5405,R,0,10,12,,true,true,false,false
-80006,202002,100,94,1.310638,1.42249,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,7084,R,10,9,12,true,true,false,false,false
-80006,202003,100,94,0.702993,,0.947092,1,69.128571,1.026638,1,104.689744,4980,R,9,0,11,true,,false,true,false
-80007,202001,100,8,,5.332865,1,2.076231,107.088287,1,2.359415,125.976643,15172,R,0,10,12,,true,true,false,false
-80007,202002,100,8,0.187516,0.812625,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,2845,R,10,9,12,true,true,false,false,false
-80007,202003,100,8,1.23058,,0.947092,1,69.128571,1.026638,1,104.689744,3501,R,9,0,11,true,,false,true,false
-80008,202001,100,304,,1.129530598,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
-80008,202002,100,304,0.885323,1.009374,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,14429,R,10,9,12,true,true,false,false,false
-80008,202003,100,304,0.990713,,0.947092,1,69.128571,1.026638,1,104.689744,14295,R,9,0,11,true,,false,true,false
-80009,202001,100,45,,0.740637,1,2.076231,107.088287,1,2.359415,125.976643,3698,R,0,10,12,,true,true,false,false
-80009,202002,100,45,1.350189,1.185423,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,4993,R,10,9,12,true,true,false,false,false
-80009,202003,100,45,0.843581,,0.947092,1,69.128571,1.026638,1,104.689744,4212,R,9,0,11,true,,false,true,false
-80010,202001,100,100,,0.760563,1,2.076231,107.088287,1,2.359415,125.976643,7722,R,0,10,12,,true,true,false,false
-80010,202002,100,100,1.314815,1.551261,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,10153,R,10,9,12,true,true,false,false,false
-80010,202003,100,100,0.644637,,0.947092,1,69.128571,1.026638,1,104.689744,6545,R,9,0,11,true,,false,true,false
-80011,202001,100,19,,8.366143,1,2.076231,107.088287,1,2.359415,125.976643,30344,R,0,10,12,,false,true,false,false
-80011,202002,100,19,0.119529,0.497667,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3627,R,10,9,12,false,false,false,false,false
-80011,202003,100,19,2.009374,,0.947092,1,69.128571,1.026638,1,104.689744,7288,R,9,0,11,false,,false,true,false
-80012,202001,100,304,,1.409008,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
-80012,202002,100,304,0.709719,,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,11567,R,10,9,12,true,,false,false,false
-80012,202003,100,304,,,0.947092,1,69.128571,1.026638,1,104.689744,11875.118407,FIR,9,0,11,,,false,true,false
-80013,202001,200,54,,1.106787,1,1.314057,186.686659,1,1.703049,131.363259,20190,R,0,9,11,,true,true,false,false
-80013,202002,200,54,0.903517,0.632831,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18242,R,9,10,12,true,true,false,false,false
-80013,202003,200,54,1.5802,,1.246482,1,254.993795,1.143548,1,167.406264,28826,R,10,0,12,true,,false,true,false
-80014,202001,200,47,,0.845909,1,1.314057,186.686659,1,1.703049,131.363259,4260,R,0,9,11,,true,true,false,false
-80014,202002,200,42,1.18216,0.776681,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,5036,R,9,10,12,true,true,false,false,false
-80014,202003,200,42,1.28753,,1.246482,1,254.993795,1.143548,1,167.406264,6484,R,10,0,12,true,,false,true,false
-80015,202001,200,57,,3.886845827,1,1.314057,186.686659,1,1.703049,131.363259,19236,R,0,9,11,,false,true,false,false
-80015,202002,200,57,0.25727802,1.396445,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,4949,R,9,10,12,false,true,false,false,false
-80015,202003,200,57,0.716104,,1.246482,1,254.993795,1.143548,1,167.406264,3544,R,10,0,12,true,,false,true,false
-80016,202001,200,163,,0.906723,1,1.314057,186.686659,1,1.703049,131.363259,14902,R,0,9,11,,true,true,false,false
-80016,202002,200,163,1.102872,0.666653,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,16435,R,9,10,12,true,true,false,false,false
-80016,202003,200,163,1.50003,,1.246482,1,254.993795,1.143548,1,167.406264,24653,R,10,0,12,true,,false,true,false
-80017,202001,200,149,,0.702286,1,1.314057,186.686659,1,1.703049,131.363259,35476,R,0,9,11,,true,true,false,false
-80017,202002,200,149,1.42392,0.944612,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,50515,R,9,10,12,true,true,false,false,false
-80017,202003,200,149,1.058635817,,1.246482,1,254.993795,1.143548,1,167.406264,53477,R,10,0,12,true,,false,true,false
-80018,202001,200,126,,0.543197,1,1.314057,186.686659,1,1.703049,131.363259,13845,R,0,9,11,,true,true,false,false
-80018,202002,200,126,1.840953,0.929914,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,25488,R,9,10,12,true,true,false,false,false
-80018,202003,200,126,1.075369,,1.246482,1,254.993795,1.143548,1,167.406264,27409,R,10,0,12,true,,false,true,false
-80019,202001,200,6,,2.532258,1,1.314057,186.686659,1,1.703049,131.363259,1099,R,0,9,11,,true,true,false,false
-80019,202002,200,6,0.394904,3.5,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,434,R,9,10,12,true,false,false,false,false
-80019,202003,200,6,0.285714,,1.246482,1,254.993795,1.143548,1,167.406264,124,R,10,0,12,false,,false,true,false
-80020,202001,200,22,,1.677355,1,1.314057,186.686659,1,1.703049,131.363259,3348,R,0,9,11,,true,true,false,false
-80020,202002,200,22,0.596177,0.395169,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1996,R,9,10,12,true,false,false,false,false
-80020,202003,200,22,2.530561,,1.246482,1,254.993795,1.143548,1,167.406264,5051,R,10,0,12,false,,false,true,false
-80021,202001,200,108,,0.85504,1,1.314057,186.686659,1,1.703049,131.363259,29215,R,0,9,11,,true,true,false,false
-80021,202002,200,108,1.169536,0.554423,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,34168,R,9,10,12,true,true,false,false,false
-80021,202003,200,108,1.803676,,1.246482,1,254.993795,1.143548,1,167.406264,61628,R,10,0,12,true,,false,true,false
-80022,202001,200,67,,0.502952,1,1.314057,186.686659,1,1.703049,131.363259,6390,R,0,9,11,,false,true,false,false
-80022,202002,200,67,1.988263,1.061758,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,12705,R,9,10,12,false,true,false,false,false
-80022,202003,200,67,0.941834,,1.246482,1,254.993795,1.143548,1,167.406264,11966,R,10,0,12,true,,false,true,false
-80023,202001,200,18,,2.65696,1,1.314057,186.686659,1,1.703049,131.363259,4562,R,0,9,11,,true,true,false,false
-80023,202002,200,18,0.37637,0.724167,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1717,R,9,10,12,true,true,false,false,false
-80023,202003,200,18,1.380897,,1.246482,1,254.993795,1.143548,1,167.406264,2371,R,10,0,12,true,,false,true,false
-80024,202001,200,155,,,1,1.314057,186.686659,1,1.703049,131.363259,31986.659101,BI,0,9,11,,,true,false,false
-80024,202002,200,155,,0.892426,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18782,R,9,10,12,,true,false,false,false
-80024,202003,200,155,1.120541,,1.246482,1,254.993795,1.143548,1,167.406264,21046,R,10,0,12,true,,false,true,false
-80001,201901,100,89,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80001,201902,100,89,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80001,201903,100,89,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80002,201901,100,83,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80002,201902,100,83,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80002,201903,100,83,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80003,201901,100,4,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80003,201902,100,4,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80003,201903,100,4,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80004,201901,100,76,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80004,201902,100,76,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80004,201903,100,76,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80005,201901,100,18,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80005,201902,100,18,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80005,201903,100,18,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80006,201901,100,94,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80006,201902,100,94,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80006,201903,100,94,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80007,201901,100,8,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80007,201902,100,8,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80007,201903,100,8,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80008,201901,100,304,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80008,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80008,201903,100,304,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80009,201901,100,45,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80009,201902,100,45,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80009,201903,100,45,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80010,201901,100,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80010,201902,100,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80010,201903,100,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80011,201901,100,19,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80011,201902,100,19,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80011,201903,100,19,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80012,201901,100,304,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80012,201902,100,304,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80012,201903,100,304,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80013,201901,200,54,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80013,201902,200,54,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80013,201903,200,54,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80014,201901,200,47,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80014,201902,200,42,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80014,201903,200,42,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80015,201901,200,57,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80015,201902,200,57,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80015,201903,200,57,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80016,201901,200,163,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80016,201902,200,163,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80016,201903,200,163,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80017,201901,200,149,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80017,201902,200,149,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80017,201903,200,149,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80018,201901,200,126,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80018,201902,200,126,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80018,201903,200,126,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80019,201901,200,6,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80019,201902,200,6,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80019,201903,200,6,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80020,201901,200,22,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80020,201902,200,22,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80020,201903,200,22,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80021,201901,200,108,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80021,201902,200,108,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80021,201903,200,108,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80022,201901,200,67,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80022,201902,200,67,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80022,201903,200,67,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80023,201901,200,18,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80023,201902,200,18,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80023,201903,200,18,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80024,201901,200,155,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80024,201902,200,155,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80024,201903,200,155,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,100,,1.036787797,1,2.076231,107.088287,1,2.359415,125.976643,9244,R,0,10,12,,true,true,false,false
+80001,202002,100,0.964517525,1.43945754,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,8916,R,10,9,12,true,true,false,false,false
+80001,202003,100,0.694706146,,0.947092,1,69.128571,1.026638,1,104.689744,6194,R,9,0,11,true,,false,true,false
+80002,202001,100,,0.817550398,1,2.076231,107.088287,1,2.359415,125.976643,4826,R,0,10,12,,true,true,false,false
+80002,202002,100,1.223166183,1.244570947,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,5903,R,10,9,12,true,true,false,false,false
+80002,202003,100,0.803489751,,0.947092,1,69.128571,1.026638,1,104.689744,4743,R,9,0,11,true,,false,true,false
+80003,202001,100,,7.466535433,1,2.076231,107.088287,1,2.359415,125.976643,7586,R,0,10,12,,true,true,false,false
+80003,202002,100,0.133930925,0.710986704,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,1016,R,10,9,12,true,true,false,false,false
+80003,202003,100,1.406496063,,0.947092,1,69.128571,1.026638,1,104.689744,1429,R,9,0,11,true,,false,true,false
+80004,202001,100,,1.305847569,1,2.076231,107.088287,1,2.359415,125.976643,3975,R,0,10,12,,true,true,false,false
+80004,202002,100,0.765786164,0.82875034,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3044,R,10,9,12,true,true,false,false,false
+80004,202003,100,1.206636005,,0.947092,1,69.128571,1.026638,1,104.689744,3673,R,9,0,11,true,,false,true,false
+80005,202001,100,,0.621916,1,2.076231,107.088287,1,2.359415,125.976643,1941,R,0,10,12,,false,true,false,false
+80005,202002,100,1.607934,2.583609,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3121,R,10,9,12,false,false,false,false,false
+80005,202003,100,0.387055,,0.947092,1,69.128571,1.026638,1,104.689744,1208,R,9,0,11,false,,false,true,false
+80006,202001,100,,0.762987,1,2.076231,107.088287,1,2.359415,125.976643,5405,R,0,10,12,,true,true,false,false
+80006,202002,100,1.310638,1.42249,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,7084,R,10,9,12,true,true,false,false,false
+80006,202003,100,0.702993,,0.947092,1,69.128571,1.026638,1,104.689744,4980,R,9,0,11,true,,false,true,false
+80007,202001,100,,5.332865,1,2.076231,107.088287,1,2.359415,125.976643,15172,R,0,10,12,,true,true,false,false
+80007,202002,100,0.187516,0.812625,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,2845,R,10,9,12,true,true,false,false,false
+80007,202003,100,1.23058,,0.947092,1,69.128571,1.026638,1,104.689744,3501,R,9,0,11,true,,false,true,false
+80008,202001,100,,1.129530598,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
+80008,202002,100,0.885323,1.009374,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,14429,R,10,9,12,true,true,false,false,false
+80008,202003,100,0.990713,,0.947092,1,69.128571,1.026638,1,104.689744,14295,R,9,0,11,true,,false,true,false
+80009,202001,100,,0.740637,1,2.076231,107.088287,1,2.359415,125.976643,3698,R,0,10,12,,true,true,false,false
+80009,202002,100,1.350189,1.185423,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,4993,R,10,9,12,true,true,false,false,false
+80009,202003,100,0.843581,,0.947092,1,69.128571,1.026638,1,104.689744,4212,R,9,0,11,true,,false,true,false
+80010,202001,100,,0.760563,1,2.076231,107.088287,1,2.359415,125.976643,7722,R,0,10,12,,true,true,false,false
+80010,202002,100,1.314815,1.551261,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,10153,R,10,9,12,true,true,false,false,false
+80010,202003,100,0.644637,,0.947092,1,69.128571,1.026638,1,104.689744,6545,R,9,0,11,true,,false,true,false
+80011,202001,100,,8.366143,1,2.076231,107.088287,1,2.359415,125.976643,30344,R,0,10,12,,false,true,false,false
+80011,202002,100,0.119529,0.497667,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3627,R,10,9,12,false,false,false,false,false
+80011,202003,100,2.009374,,0.947092,1,69.128571,1.026638,1,104.689744,7288,R,9,0,11,false,,false,true,false
+80012,202001,100,,1.409008,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
+80012,202002,100,0.709719,,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,11567,R,10,9,12,true,,false,false,false
+80012,202003,100,,,0.947092,1,69.128571,1.026638,1,104.689744,11875.118407,FIR,9,0,11,,,false,true,false
+80013,202001,200,,1.106787,1,1.314057,186.686659,1,1.703049,131.363259,20190,R,0,9,11,,true,true,false,false
+80013,202002,200,0.903517,0.632831,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18242,R,9,10,12,true,true,false,false,false
+80013,202003,200,1.5802,,1.246482,1,254.993795,1.143548,1,167.406264,28826,R,10,0,12,true,,false,true,false
+80014,202001,200,,0.845909,1,1.314057,186.686659,1,1.703049,131.363259,4260,R,0,9,11,,true,true,false,false
+80014,202002,200,1.18216,0.776681,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,5036,R,9,10,12,true,true,false,false,false
+80014,202003,200,1.28753,,1.246482,1,254.993795,1.143548,1,167.406264,6484,R,10,0,12,true,,false,true,false
+80015,202001,200,,3.886845827,1,1.314057,186.686659,1,1.703049,131.363259,19236,R,0,9,11,,false,true,false,false
+80015,202002,200,0.25727802,1.396445,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,4949,R,9,10,12,false,true,false,false,false
+80015,202003,200,0.716104,,1.246482,1,254.993795,1.143548,1,167.406264,3544,R,10,0,12,true,,false,true,false
+80016,202001,200,,0.906723,1,1.314057,186.686659,1,1.703049,131.363259,14902,R,0,9,11,,true,true,false,false
+80016,202002,200,1.102872,0.666653,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,16435,R,9,10,12,true,true,false,false,false
+80016,202003,200,1.50003,,1.246482,1,254.993795,1.143548,1,167.406264,24653,R,10,0,12,true,,false,true,false
+80017,202001,200,,0.702286,1,1.314057,186.686659,1,1.703049,131.363259,35476,R,0,9,11,,true,true,false,false
+80017,202002,200,1.42392,0.944612,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,50515,R,9,10,12,true,true,false,false,false
+80017,202003,200,1.058635817,,1.246482,1,254.993795,1.143548,1,167.406264,53477,R,10,0,12,true,,false,true,false
+80018,202001,200,,0.543197,1,1.314057,186.686659,1,1.703049,131.363259,13845,R,0,9,11,,true,true,false,false
+80018,202002,200,1.840953,0.929914,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,25488,R,9,10,12,true,true,false,false,false
+80018,202003,200,1.075369,,1.246482,1,254.993795,1.143548,1,167.406264,27409,R,10,0,12,true,,false,true,false
+80019,202001,200,,2.532258,1,1.314057,186.686659,1,1.703049,131.363259,1099,R,0,9,11,,true,true,false,false
+80019,202002,200,0.394904,3.5,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,434,R,9,10,12,true,false,false,false,false
+80019,202003,200,0.285714,,1.246482,1,254.993795,1.143548,1,167.406264,124,R,10,0,12,false,,false,true,false
+80020,202001,200,,1.677355,1,1.314057,186.686659,1,1.703049,131.363259,3348,R,0,9,11,,true,true,false,false
+80020,202002,200,0.596177,0.395169,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1996,R,9,10,12,true,false,false,false,false
+80020,202003,200,2.530561,,1.246482,1,254.993795,1.143548,1,167.406264,5051,R,10,0,12,false,,false,true,false
+80021,202001,200,,0.85504,1,1.314057,186.686659,1,1.703049,131.363259,29215,R,0,9,11,,true,true,false,false
+80021,202002,200,1.169536,0.554423,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,34168,R,9,10,12,true,true,false,false,false
+80021,202003,200,1.803676,,1.246482,1,254.993795,1.143548,1,167.406264,61628,R,10,0,12,true,,false,true,false
+80022,202001,200,,0.502952,1,1.314057,186.686659,1,1.703049,131.363259,6390,R,0,9,11,,false,true,false,false
+80022,202002,200,1.988263,1.061758,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,12705,R,9,10,12,false,true,false,false,false
+80022,202003,200,0.941834,,1.246482,1,254.993795,1.143548,1,167.406264,11966,R,10,0,12,true,,false,true,false
+80023,202001,200,,2.65696,1,1.314057,186.686659,1,1.703049,131.363259,4562,R,0,9,11,,true,true,false,false
+80023,202002,200,0.37637,0.724167,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1717,R,9,10,12,true,true,false,false,false
+80023,202003,200,1.380897,,1.246482,1,254.993795,1.143548,1,167.406264,2371,R,10,0,12,true,,false,true,false
+80024,202001,200,,,1,1.314057,186.686659,1,1.703049,131.363259,31986.659101,BI,0,9,11,,,true,false,false
+80024,202002,200,,0.892426,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18782,R,9,10,12,,true,false,false,false
+80024,202003,200,1.120541,,1.246482,1,254.993795,1.143548,1,167.406264,21046,R,10,0,12,true,,false,true,false
+80001,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80001,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80001,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80002,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80002,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80002,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80003,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80003,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80003,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80004,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80004,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80004,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80005,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80005,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80005,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80006,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80006,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80006,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80007,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80007,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80007,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80008,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80008,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80008,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80009,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80009,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80009,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80010,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80010,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80010,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80011,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80011,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80011,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80012,201901,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80012,201902,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80012,201903,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80013,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80013,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80013,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80014,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80014,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80014,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80015,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80015,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80015,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80016,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80016,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80016,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80017,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80017,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80017,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80018,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80018,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80018,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80019,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80019,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80019,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80020,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80020,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80020,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80021,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80021,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80021,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80022,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80022,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80022,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80023,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80023,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80023,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80024,201901,200,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80024,201902,200,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80024,201903,200,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
index 480070a1..f61ea1eb 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/64_TB_10_C_FI_FI_50_weight_output.csv
@@ -1,73 +1,73 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-30001,202001,100,51,,1.129481006,1,1.772778,142.26943,1,1.932409,109.154645,8444,R,0,9,11,,true,true,false,false
-30001,202002,100,51,0.885362387,3.732401398,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,7476,R,9,9,11,true,true,false,false,false
-30001,202003,100,51,0.267924024,,1.172329,1,76.108808,1.606472,1,80.46377,2003,R,9,0,11,true,,false,true,false
-30002,202001,100,72,,1.195062676,1,1.772778,142.26943,1,1.932409,109.154645,9343,R,0,9,11,,true,true,false,false
-30002,202002,100,72,0.836776196,1.596487645,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,7818,R,9,9,11,true,true,false,false,false
-30002,202003,100,72,0.626375032,,1.172329,1,76.108808,1.606472,1,80.46377,4897,R,9,0,11,true,,false,true,false
-30003,202001,100,7,,4.265190233,1,1.772778,142.26943,1,1.932409,109.154645,7511,R,0,9,11,,true,true,false,false
-30003,202002,100,7,0.234456131,0.271256932,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,1761,R,9,9,11,true,true,false,false,false
-30003,202003,100,7,3.686541738,,1.172329,1,76.108808,1.606472,1,80.46377,6492,R,9,0,11,true,,false,true,false
-30004,202001,100,81,,0.030288689,1,1.772778,142.26943,1,1.932409,109.154645,64,R,0,9,11,,true,true,false,false
-30004,202002,100,81,33.015625,11.42162162,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,2113,R,9,9,11,true,true,false,false,false
-30004,202003,100,81,0.087553242,,1.172329,1,76.108808,1.606472,1,80.46377,185,R,9,0,11,true,,false,true,false
-30005,202001,100,5,,0.940914158305463,1,1.772778,142.26943,1,1.932409,109.154645,844,R,0,9,11,,true,true,false,false
-30005,202002,100,5,1.06279620853081,3.20357142857143,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,897,R,9,9,11,true,true,false,false,false
-30005,202003,100,5,0.312151616499443,,1.172329,1,76.108808,1.606472,1,80.46377,280,R,9,0,11,true,,false,true,false
-30006,202001,100,14,,0.996268656716418,1,1.772778,142.26943,1,1.932409,109.154645,1869,R,0,9,11,,true,true,false,false
-30006,202002,100,14,1.00374531835206,1.36834427425237,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,1876,R,9,9,11,true,true,false,false,false
-30006,202003,100,14,0.730810234541578,,1.172329,1,76.108808,1.606472,1,80.46377,1371,R,9,0,11,true,,false,true,false
-30007,202001,100,12,,4.47563967753242,1,1.772778,142.26943,1,1.932409,109.154645,12769,R,0,9,11,,true,true,false,false
-30007,202002,100,12,0.223431748766544,0.248281263597598,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,2853,R,9,9,11,true,true,false,false,false
-30007,202003,100,12,4.02769015071854,,1.172329,1,76.108808,1.606472,1,80.46377,11491,R,9,0,11,true,,false,true,false
-30008,202001,100,162,,0.0234960839860023,1,1.772778,142.26943,1,1.932409,109.154645,141,R,0,9,11,,false,true,false,false
-30008,202002,100,162,42.5602836879433,13.8591224018476,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,6001,R,9,9,11,false,false,false,false,false
-30008,202003,100,162,0.0721546408931845,,1.172329,1,76.108808,1.606472,1,80.46377,433,R,9,0,11,false,,false,true,false
-30009,202001,100,26,,1.58954669308893,1,1.772778,142.26943,1,1.932409,109.154645,6417,R,0,9,11,,true,true,false,false
-30009,202002,100,26,0.629110176094748,3.05370650529501,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,4037,R,9,9,11,true,true,false,false,false
-30009,202003,100,26,0.327470894228387,,1.172329,1,76.108808,1.606472,1,80.46377,1322,R,9,0,11,true,,false,true,false
-30010,202001,100,144,,1.33261249654919,1,1.772778,142.26943,1,1.932409,109.154645,28963,R,0,9,11,,true,true,false,false
-30010,202002,100,144,0.750405690018299,2.06420362807484,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,21734,R,9,9,11,true,true,false,false,false
-30010,202003,100,144,0.484448329805834,,1.172329,1,76.108808,1.606472,1,80.46377,10529,R,9,0,11,true,,false,true,false
-30011,202001,100,5,,5.24803493449782,1,1.772778,142.26943,1,1.932409,109.154645,6009,R,0,9,11,,false,true,false,false
-30011,202002,100,5,0.190547512065235,0.226105845181675,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,1145,R,9,9,11,false,false,false,false,false
-30011,202003,100,5,4.42270742358079,,1.172329,1,76.108808,1.606472,1,80.46377,5064,R,9,0,11,false,,false,true,false
-30012,202001,100,275,,,1,1.772778,142.26943,1,1.932409,109.154645,30017.527245,C,0,9,11,,,true,false,false
-30012,202002,100,275,,,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,77500.725796,FIC,9,9,11,,,false,false,false
-30012,202003,100,275,,,1.172329,1,76.108808,1.606472,1,80.46377,124502.764316,FIC,9,0,11,,,false,true,false
-30001,201901,100,51,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30001,201902,100,51,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30001,201903,100,51,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30002,201901,100,72,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30002,201902,100,72,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30002,201903,100,72,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30003,201901,100,7,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30003,201902,100,7,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30003,201903,100,7,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30004,201901,100,81,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30004,201902,100,81,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30004,201903,100,81,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30005,201901,100,5,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30005,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30005,201903,100,5,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30006,201901,100,14,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30006,201902,100,14,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30006,201903,100,14,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30007,201901,100,12,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30007,201902,100,12,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30007,201903,100,12,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30008,201901,100,162,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30008,201902,100,162,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30008,201903,100,162,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30009,201901,100,26,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30009,201902,100,26,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30009,201903,100,26,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30010,201901,100,144,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30010,201902,100,144,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30010,201903,100,144,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30011,201901,100,5,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30011,201902,100,5,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30011,201903,100,5,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
-30012,201901,100,275,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-30012,201902,100,275,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
-30012,201903,100,275,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.772778,142.26943,1,1.932409,109.154645,8444,R,0,9,11,,true,true,false,false
+30001,202002,100,0.885362387,3.732401398,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,7476,R,9,9,11,true,true,false,false,false
+30001,202003,100,0.267924024,,1.172329,1,76.108808,1.606472,1,80.46377,2003,R,9,0,11,true,,false,true,false
+30002,202001,100,,1.195062676,1,1.772778,142.26943,1,1.932409,109.154645,9343,R,0,9,11,,true,true,false,false
+30002,202002,100,0.836776196,1.596487645,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,7818,R,9,9,11,true,true,false,false,false
+30002,202003,100,0.626375032,,1.172329,1,76.108808,1.606472,1,80.46377,4897,R,9,0,11,true,,false,true,false
+30003,202001,100,,4.265190233,1,1.772778,142.26943,1,1.932409,109.154645,7511,R,0,9,11,,true,true,false,false
+30003,202002,100,0.234456131,0.271256932,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,1761,R,9,9,11,true,true,false,false,false
+30003,202003,100,3.686541738,,1.172329,1,76.108808,1.606472,1,80.46377,6492,R,9,0,11,true,,false,true,false
+30004,202001,100,,0.030288689,1,1.772778,142.26943,1,1.932409,109.154645,64,R,0,9,11,,true,true,false,false
+30004,202002,100,33.015625,11.42162162,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,2113,R,9,9,11,true,true,false,false,false
+30004,202003,100,0.087553242,,1.172329,1,76.108808,1.606472,1,80.46377,185,R,9,0,11,true,,false,true,false
+30005,202001,100,,0.940914158305463,1,1.772778,142.26943,1,1.932409,109.154645,844,R,0,9,11,,true,true,false,false
+30005,202002,100,1.06279620853081,3.20357142857143,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,897,R,9,9,11,true,true,false,false,false
+30005,202003,100,0.312151616499443,,1.172329,1,76.108808,1.606472,1,80.46377,280,R,9,0,11,true,,false,true,false
+30006,202001,100,,0.996268656716418,1,1.772778,142.26943,1,1.932409,109.154645,1869,R,0,9,11,,true,true,false,false
+30006,202002,100,1.00374531835206,1.36834427425237,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,1876,R,9,9,11,true,true,false,false,false
+30006,202003,100,0.730810234541578,,1.172329,1,76.108808,1.606472,1,80.46377,1371,R,9,0,11,true,,false,true,false
+30007,202001,100,,4.47563967753242,1,1.772778,142.26943,1,1.932409,109.154645,12769,R,0,9,11,,true,true,false,false
+30007,202002,100,0.223431748766544,0.248281263597598,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,2853,R,9,9,11,true,true,false,false,false
+30007,202003,100,4.02769015071854,,1.172329,1,76.108808,1.606472,1,80.46377,11491,R,9,0,11,true,,false,true,false
+30008,202001,100,,0.0234960839860023,1,1.772778,142.26943,1,1.932409,109.154645,141,R,0,9,11,,false,true,false,false
+30008,202002,100,42.5602836879433,13.8591224018476,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,6001,R,9,9,11,false,false,false,false,false
+30008,202003,100,0.0721546408931845,,1.172329,1,76.108808,1.606472,1,80.46377,433,R,9,0,11,false,,false,true,false
+30009,202001,100,,1.58954669308893,1,1.772778,142.26943,1,1.932409,109.154645,6417,R,0,9,11,,true,true,false,false
+30009,202002,100,0.629110176094748,3.05370650529501,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,4037,R,9,9,11,true,true,false,false,false
+30009,202003,100,0.327470894228387,,1.172329,1,76.108808,1.606472,1,80.46377,1322,R,9,0,11,true,,false,true,false
+30010,202001,100,,1.33261249654919,1,1.772778,142.26943,1,1.932409,109.154645,28963,R,0,9,11,,true,true,false,false
+30010,202002,100,0.750405690018299,2.06420362807484,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,21734,R,9,9,11,true,true,false,false,false
+30010,202003,100,0.484448329805834,,1.172329,1,76.108808,1.606472,1,80.46377,10529,R,9,0,11,true,,false,true,false
+30011,202001,100,,5.24803493449782,1,1.772778,142.26943,1,1.932409,109.154645,6009,R,0,9,11,,false,true,false,false
+30011,202002,100,0.190547512065235,0.226105845181675,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,1145,R,9,9,11,false,false,false,false,false
+30011,202003,100,4.42270742358079,,1.172329,1,76.108808,1.606472,1,80.46377,5064,R,9,0,11,false,,false,true,false
+30012,202001,100,,,1,1.772778,142.26943,1,1.932409,109.154645,30017.527245,C,0,9,11,,,true,false,false
+30012,202002,100,,,4.293523,2.995542,99.673575,2.581849,2.250564,111.420629,77500.725796,FIC,9,9,11,,,false,false,false
+30012,202003,100,,,1.172329,1,76.108808,1.606472,1,80.46377,124502.764316,FIC,9,0,11,,,false,true,false
+30001,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30001,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30001,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30002,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30002,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30002,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30003,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30003,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30003,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30004,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30004,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30004,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30005,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30005,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30005,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30006,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30006,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30006,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30007,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30007,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30007,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30008,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30008,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30008,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30009,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30009,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30009,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30010,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30010,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30010,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30011,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30011,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30011,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
+30012,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+30012,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,
+30012,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
index 72943bb4..b3e2223b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/65_TB_10_BI_BI_R_50_weight_filtered_output.csv
@@ -1,127 +1,127 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
-90001,202001,100,89,,1.03678779721848,1,1.504462,128.8429705,1,1.798251,102.4414146,9244,R,0,17,19,,true,true,,true,true,false,false
-90001,202002,100,89,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,8916,R,17,18,20,true,true,true,true,true,false,false,false
-90001,202003,100,89,0.694706146253926,,1.072437,1,126.259645,1.556526,1,105.5391887,6194,R,18,0,21,true,,true,true,,false,true,false
-90002,202001,100,83,,0.81755039810266,1,1.504462,128.8429705,1,1.798251,102.4414146,4826,R,0,17,19,,true,true,,true,true,false,false
-90002,202002,100,83,1.22316618317447,1.24457094665823,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,5903,R,17,18,20,true,true,true,true,true,false,false,false
-90002,202003,100,83,0.803489750974081,,1.072437,1,126.259645,1.556526,1,105.5391887,4743,R,18,0,21,true,,true,true,,false,true,false
-90003,202001,100,4,,,1,1.504462,128.8429705,1,1.798251,102.4414146,7586,R,0,17,19,,,false,,true,true,false,false
-90003,202002,100,4,,0.710986703988803,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,1016,R,17,18,20,,true,true,false,true,false,false,false
-90003,202003,100,4,1.40649606299213,,1.072437,1,126.259645,1.556526,1,105.5391887,1429,R,18,0,21,true,,true,true,,false,true,false
-90004,202001,100,76,,1.30584756898817,1,1.504462,128.8429705,1,1.798251,102.4414146,3975,R,0,17,19,,true,true,,true,true,false,false
-90004,202002,100,76,0.765786163522013,0.828750340321263,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,3044,R,17,18,20,true,true,true,true,true,false,false,false
-90004,202003,100,76,1.20663600525624,,1.072437,1,126.259645,1.556526,1,105.5391887,3673,R,18,0,21,true,,true,true,,false,true,false
-90005,202001,100,18,,0.62191605254726,1,1.504462,128.8429705,1,1.798251,102.4414146,1941,R,0,17,19,,true,true,,true,true,false,false
-90005,202002,100,18,1.60793405461103,2.58360927152318,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,3121,R,17,18,20,true,true,true,true,true,false,false,false
-90005,202003,100,18,0.387055430951618,,1.072437,1,126.259645,1.556526,1,105.5391887,1208,R,18,0,21,true,,true,true,,false,true,false
-90006,202001,100,94,,0.762987012987013,1,1.504462,128.8429705,1,1.798251,102.4414146,5405,R,0,17,19,,true,true,,true,true,false,false
-90006,202002,100,94,1.31063829787234,1.42248995983936,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,7084,R,17,18,20,true,true,true,true,true,false,false,false
-90006,202003,100,94,0.702992659514399,,1.072437,1,126.259645,1.556526,1,105.5391887,4980,R,18,0,21,true,,true,true,,false,true,false
-90007,202001,100,8,,5.33286467486819,1,1.504462,128.8429705,1,1.798251,102.4414146,15172,R,0,17,19,,true,true,,true,true,false,false
-90007,202002,100,8,0.18751647772212,0.812624964295915,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,2845,R,17,18,20,true,true,true,true,true,false,false,false
-90007,202003,100,8,1.23057996485062,,1.072437,1,126.259645,1.556526,1,105.5391887,3501,R,18,0,21,true,,true,true,,false,true,false
-90008,202001,100,304,,1.12953080601566,1,1.504462,128.8429705,1,1.798251,102.4414146,16298,R,0,17,19,,true,true,,true,true,false,false
-90008,202002,100,304,0.885323352558596,1.00937390696048,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,14429,R,17,18,20,true,true,true,true,true,false,false,false
-90008,202003,100,304,0.990713147134244,,1.072437,1,126.259645,1.556526,1,105.5391887,14295,R,18,0,21,true,,true,true,,false,true,false
-90009,202001,100,45,,0.740636891648308,1,1.504462,128.8429705,1,1.798251,102.4414146,3698,R,0,17,19,,true,true,,true,true,false,false
-90009,202002,100,45,1.35018929150892,1.18542260208927,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,4993,R,17,18,20,true,true,true,true,true,false,false,false
-90009,202003,100,45,0.843581013418786,,1.072437,1,126.259645,1.556526,1,105.5391887,4212,R,18,0,21,true,,true,true,,false,true,false
-90010,202001,100,100,,0.76056338028169,1,1.504462,128.8429705,1,1.798251,102.4414146,7722,R,0,17,19,,true,true,,true,true,false,false
-90010,202002,100,100,1.31481481481481,1.55126050420168,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,10153,R,17,18,20,true,true,true,true,true,false,false,false
-90010,202003,100,100,0.644637053087757,,1.072437,1,126.259645,1.556526,1,105.5391887,6545,R,18,0,21,true,,true,true,,false,true,false
-90011,202001,100,19,,8.36614281775572,1,1.504462,128.8429705,1,1.798251,102.4414146,30344,R,0,17,19,,false,true,,true,true,false,false
-90011,202002,100,19,0.119529396256262,0.497667398463227,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,3627,R,17,18,20,false,true,true,true,true,false,false,false
-90011,202003,100,19,2.0093741384064,,1.072437,1,126.259645,1.556526,1,105.5391887,7288,R,18,0,21,true,,true,true,,false,true,false
-90012,202001,100,304,,1.40900838592548,1,1.504462,128.8429705,1,1.798251,102.4414146,16298,R,0,17,19,,true,true,,true,true,false,false
-90012,202002,100,304,0.709718983924408,0.857831504004746,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,11567,R,17,18,20,true,true,true,true,true,false,false,false
-90012,202003,100,304,1.1657300942336,,1.072437,1,126.259645,1.556526,1,105.5391887,13484,R,18,0,21,true,,true,true,,false,true,false
-90013,202001,100,54,,1.10678653656397,1,1.504462,128.8429705,1,1.798251,102.4414146,20190,R,0,17,19,,true,true,,true,true,false,false
-90013,202002,100,54,0.903516592372462,0.63283147158815,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,18242,R,17,18,20,true,true,true,true,true,false,false,false
-90013,202003,100,54,1.58019953952418,,1.072437,1,126.259645,1.556526,1,105.5391887,28826,R,18,0,21,true,,true,true,,false,true,false
-90014,202001,100,47,,0.845909451945989,1,1.504462,128.8429705,1,1.798251,102.4414146,4260,R,0,17,19,,true,true,,true,true,false,false
-90014,202002,100,42,1.18215962441315,0.776681061073411,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,5036,R,17,18,20,true,true,true,true,true,false,false,false
-90014,202003,100,42,1.28752978554408,,1.072437,1,126.259645,1.556526,1,105.5391887,6484,R,18,0,21,true,,true,true,,false,true,false
-90015,202001,100,57,,3.88684582743989,1,1.504462,128.8429705,1,1.798251,102.4414146,19236,R,0,17,19,,true,true,,true,true,false,false
-90015,202002,100,57,0.257278020378457,1.39644469525959,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,4949,R,17,18,20,true,true,true,true,true,false,false,false
-90015,202003,100,57,0.716104263487573,,1.072437,1,126.259645,1.556526,1,105.5391887,3544,R,18,0,21,true,,true,true,,false,true,false
-90016,202001,100,163,,0.906723456038941,1,1.504462,128.8429705,1,1.798251,102.4414146,14902,R,0,17,19,,true,true,,true,true,false,false
-90016,202002,100,163,1.10287209770501,0.666653145661786,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,16435,R,17,18,20,true,true,true,true,true,false,false,false
-90016,202003,100,163,1.500030422878,,1.072437,1,126.259645,1.556526,1,105.5391887,24653,R,18,0,21,true,,true,true,,false,true,false
-90017,202001,100,149,,0.702286449569435,1,1.504462,128.8429705,1,1.798251,102.4414146,35476,R,0,17,19,,true,true,,true,true,false,false
-90017,202002,100,149,1.42392039688804,0.944611702227126,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,50515,R,17,18,20,true,true,true,true,true,false,false,false
-90017,202003,100,149,1.05863604869841,,1.072437,1,126.259645,1.556526,1,105.5391887,53477,R,18,0,21,true,,true,true,,false,true,false
-90018,202001,100,126,,0.543196798493409,1,1.504462,128.8429705,1,1.798251,102.4414146,13845,R,0,17,19,,false,true,,true,true,false,false
-90018,202002,100,126,1.8409534127844,0.929913532051516,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,25488,R,17,18,20,false,true,true,true,true,false,false,false
-90018,202003,100,126,1.07536880100439,,1.072437,1,126.259645,1.556526,1,105.5391887,27409,R,18,0,21,true,,true,true,,false,true,false
-90019,202001,100,6,,2.53225806451613,1,1.504462,128.8429705,1,1.798251,102.4414146,1099,R,0,17,19,,true,true,,true,true,false,false
-90019,202002,100,6,0.394904458598726,3.5,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,434,R,17,18,20,true,false,true,true,true,false,false,false
-90019,202003,100,6,0.285714285714286,,1.072437,1,126.259645,1.556526,1,105.5391887,124,R,18,0,21,false,,true,true,,false,true,false
-90020,202001,100,22,,1.67735470941884,1,1.504462,128.8429705,1,1.798251,102.4414146,3348,R,0,17,19,,true,true,,true,true,false,false
-90020,202002,100,22,0.596176821983274,0.395169273411206,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,1996,R,17,18,20,true,false,true,true,true,false,false,false
-90020,202003,100,22,2.53056112224449,,1.072437,1,126.259645,1.556526,1,105.5391887,5051,R,18,0,21,false,,true,true,,false,true,false
-90021,202001,100,155,,,1,1.504462,128.8429705,1,1.798251,102.4414146,48980.840128,BI,0,17,19,,,,,,true,false,false
-90021,202002,100,155,,,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,27238.042605,BI,17,18,20,,,,,,false,false,false
-90021,202003,100,155,,,1.072437,1,126.259645,1.556526,1,105.5391887,21046,R,18,0,21,,,true,,,false,true,false
-90001,201901,100,89,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90001,201902,100,89,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90001,201903,100,89,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90002,201901,100,83,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90002,201902,100,83,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90002,201903,100,83,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90003,201901,100,4,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90003,201902,100,4,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90003,201903,100,4,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90004,201901,100,76,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90004,201902,100,76,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90004,201903,100,76,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90005,201901,100,18,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90005,201902,100,18,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90005,201903,100,18,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90006,201901,100,94,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90006,201902,100,94,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90006,201903,100,94,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90007,201901,100,8,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90007,201902,100,8,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90007,201903,100,8,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90008,201901,100,304,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90008,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90008,201903,100,304,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90009,201901,100,45,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90009,201902,100,45,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90009,201903,100,45,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90010,201901,100,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90010,201902,100,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90010,201903,100,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90011,201901,100,19,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90011,201902,100,19,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90011,201903,100,19,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90012,201901,100,304,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90012,201902,100,304,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90012,201903,100,304,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90013,201901,100,54,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90013,201902,100,54,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90013,201903,100,54,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90014,201901,100,47,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90014,201902,100,42,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90014,201903,100,42,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90015,201901,100,57,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90015,201902,100,57,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90015,201903,100,57,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90016,201901,100,163,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90016,201902,100,163,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90016,201903,100,163,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90017,201901,100,149,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90017,201902,100,149,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90017,201903,100,149,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90018,201901,100,126,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90018,201902,100,126,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90018,201903,100,126,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90019,201901,100,6,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90019,201902,100,6,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90019,201903,100,6,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90020,201901,100,22,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90020,201902,100,22,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90020,201903,100,22,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
-90021,201901,100,155,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
-90021,201902,100,155,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
-90021,201903,100,155,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+90001,202001,100,,1.03678779721848,1,1.504462,128.8429705,1,1.798251,102.4414146,9244,R,0,17,19,,true,true,,true,true,false,false
+90001,202002,100,0.964517524881004,1.43945753955441,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,8916,R,17,18,20,true,true,true,true,true,false,false,false
+90001,202003,100,0.694706146253926,,1.072437,1,126.259645,1.556526,1,105.5391887,6194,R,18,0,21,true,,true,true,,false,true,false
+90002,202001,100,,0.81755039810266,1,1.504462,128.8429705,1,1.798251,102.4414146,4826,R,0,17,19,,true,true,,true,true,false,false
+90002,202002,100,1.22316618317447,1.24457094665823,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,5903,R,17,18,20,true,true,true,true,true,false,false,false
+90002,202003,100,0.803489750974081,,1.072437,1,126.259645,1.556526,1,105.5391887,4743,R,18,0,21,true,,true,true,,false,true,false
+90003,202001,100,,,1,1.504462,128.8429705,1,1.798251,102.4414146,7586,R,0,17,19,,,false,,true,true,false,false
+90003,202002,100,,0.710986703988803,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,1016,R,17,18,20,,true,true,false,true,false,false,false
+90003,202003,100,1.40649606299213,,1.072437,1,126.259645,1.556526,1,105.5391887,1429,R,18,0,21,true,,true,true,,false,true,false
+90004,202001,100,,1.30584756898817,1,1.504462,128.8429705,1,1.798251,102.4414146,3975,R,0,17,19,,true,true,,true,true,false,false
+90004,202002,100,0.765786163522013,0.828750340321263,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,3044,R,17,18,20,true,true,true,true,true,false,false,false
+90004,202003,100,1.20663600525624,,1.072437,1,126.259645,1.556526,1,105.5391887,3673,R,18,0,21,true,,true,true,,false,true,false
+90005,202001,100,,0.62191605254726,1,1.504462,128.8429705,1,1.798251,102.4414146,1941,R,0,17,19,,true,true,,true,true,false,false
+90005,202002,100,1.60793405461103,2.58360927152318,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,3121,R,17,18,20,true,true,true,true,true,false,false,false
+90005,202003,100,0.387055430951618,,1.072437,1,126.259645,1.556526,1,105.5391887,1208,R,18,0,21,true,,true,true,,false,true,false
+90006,202001,100,,0.762987012987013,1,1.504462,128.8429705,1,1.798251,102.4414146,5405,R,0,17,19,,true,true,,true,true,false,false
+90006,202002,100,1.31063829787234,1.42248995983936,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,7084,R,17,18,20,true,true,true,true,true,false,false,false
+90006,202003,100,0.702992659514399,,1.072437,1,126.259645,1.556526,1,105.5391887,4980,R,18,0,21,true,,true,true,,false,true,false
+90007,202001,100,,5.33286467486819,1,1.504462,128.8429705,1,1.798251,102.4414146,15172,R,0,17,19,,true,true,,true,true,false,false
+90007,202002,100,0.18751647772212,0.812624964295915,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,2845,R,17,18,20,true,true,true,true,true,false,false,false
+90007,202003,100,1.23057996485062,,1.072437,1,126.259645,1.556526,1,105.5391887,3501,R,18,0,21,true,,true,true,,false,true,false
+90008,202001,100,,1.12953080601566,1,1.504462,128.8429705,1,1.798251,102.4414146,16298,R,0,17,19,,true,true,,true,true,false,false
+90008,202002,100,0.885323352558596,1.00937390696048,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,14429,R,17,18,20,true,true,true,true,true,false,false,false
+90008,202003,100,0.990713147134244,,1.072437,1,126.259645,1.556526,1,105.5391887,14295,R,18,0,21,true,,true,true,,false,true,false
+90009,202001,100,,0.740636891648308,1,1.504462,128.8429705,1,1.798251,102.4414146,3698,R,0,17,19,,true,true,,true,true,false,false
+90009,202002,100,1.35018929150892,1.18542260208927,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,4993,R,17,18,20,true,true,true,true,true,false,false,false
+90009,202003,100,0.843581013418786,,1.072437,1,126.259645,1.556526,1,105.5391887,4212,R,18,0,21,true,,true,true,,false,true,false
+90010,202001,100,,0.76056338028169,1,1.504462,128.8429705,1,1.798251,102.4414146,7722,R,0,17,19,,true,true,,true,true,false,false
+90010,202002,100,1.31481481481481,1.55126050420168,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,10153,R,17,18,20,true,true,true,true,true,false,false,false
+90010,202003,100,0.644637053087757,,1.072437,1,126.259645,1.556526,1,105.5391887,6545,R,18,0,21,true,,true,true,,false,true,false
+90011,202001,100,,8.36614281775572,1,1.504462,128.8429705,1,1.798251,102.4414146,30344,R,0,17,19,,false,true,,true,true,false,false
+90011,202002,100,0.119529396256262,0.497667398463227,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,3627,R,17,18,20,false,true,true,true,true,false,false,false
+90011,202003,100,2.0093741384064,,1.072437,1,126.259645,1.556526,1,105.5391887,7288,R,18,0,21,true,,true,true,,false,true,false
+90012,202001,100,,1.40900838592548,1,1.504462,128.8429705,1,1.798251,102.4414146,16298,R,0,17,19,,true,true,,true,true,false,false
+90012,202002,100,0.709718983924408,0.857831504004746,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,11567,R,17,18,20,true,true,true,true,true,false,false,false
+90012,202003,100,1.1657300942336,,1.072437,1,126.259645,1.556526,1,105.5391887,13484,R,18,0,21,true,,true,true,,false,true,false
+90013,202001,100,,1.10678653656397,1,1.504462,128.8429705,1,1.798251,102.4414146,20190,R,0,17,19,,true,true,,true,true,false,false
+90013,202002,100,0.903516592372462,0.63283147158815,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,18242,R,17,18,20,true,true,true,true,true,false,false,false
+90013,202003,100,1.58019953952418,,1.072437,1,126.259645,1.556526,1,105.5391887,28826,R,18,0,21,true,,true,true,,false,true,false
+90014,202001,100,,0.845909451945989,1,1.504462,128.8429705,1,1.798251,102.4414146,4260,R,0,17,19,,true,true,,true,true,false,false
+90014,202002,100,1.18215962441315,0.776681061073411,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,5036,R,17,18,20,true,true,true,true,true,false,false,false
+90014,202003,100,1.28752978554408,,1.072437,1,126.259645,1.556526,1,105.5391887,6484,R,18,0,21,true,,true,true,,false,true,false
+90015,202001,100,,3.88684582743989,1,1.504462,128.8429705,1,1.798251,102.4414146,19236,R,0,17,19,,true,true,,true,true,false,false
+90015,202002,100,0.257278020378457,1.39644469525959,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,4949,R,17,18,20,true,true,true,true,true,false,false,false
+90015,202003,100,0.716104263487573,,1.072437,1,126.259645,1.556526,1,105.5391887,3544,R,18,0,21,true,,true,true,,false,true,false
+90016,202001,100,,0.906723456038941,1,1.504462,128.8429705,1,1.798251,102.4414146,14902,R,0,17,19,,true,true,,true,true,false,false
+90016,202002,100,1.10287209770501,0.666653145661786,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,16435,R,17,18,20,true,true,true,true,true,false,false,false
+90016,202003,100,1.500030422878,,1.072437,1,126.259645,1.556526,1,105.5391887,24653,R,18,0,21,true,,true,true,,false,true,false
+90017,202001,100,,0.702286449569435,1,1.504462,128.8429705,1,1.798251,102.4414146,35476,R,0,17,19,,true,true,,true,true,false,false
+90017,202002,100,1.42392039688804,0.944611702227126,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,50515,R,17,18,20,true,true,true,true,true,false,false,false
+90017,202003,100,1.05863604869841,,1.072437,1,126.259645,1.556526,1,105.5391887,53477,R,18,0,21,true,,true,true,,false,true,false
+90018,202001,100,,0.543196798493409,1,1.504462,128.8429705,1,1.798251,102.4414146,13845,R,0,17,19,,false,true,,true,true,false,false
+90018,202002,100,1.8409534127844,0.929913532051516,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,25488,R,17,18,20,false,true,true,true,true,false,false,false
+90018,202003,100,1.07536880100439,,1.072437,1,126.259645,1.556526,1,105.5391887,27409,R,18,0,21,true,,true,true,,false,true,false
+90019,202001,100,,2.53225806451613,1,1.504462,128.8429705,1,1.798251,102.4414146,1099,R,0,17,19,,true,true,,true,true,false,false
+90019,202002,100,0.394904458598726,3.5,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,434,R,17,18,20,true,false,true,true,true,false,false,false
+90019,202003,100,0.285714285714286,,1.072437,1,126.259645,1.556526,1,105.5391887,124,R,18,0,21,false,,true,true,,false,true,false
+90020,202001,100,,1.67735470941884,1,1.504462,128.8429705,1,1.798251,102.4414146,3348,R,0,17,19,,true,true,,true,true,false,false
+90020,202002,100,0.596176821983274,0.395169273411206,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,1996,R,17,18,20,true,false,true,true,true,false,false,false
+90020,202003,100,2.53056112224449,,1.072437,1,126.259645,1.556526,1,105.5391887,5051,R,18,0,21,false,,true,true,,false,true,false
+90021,202001,100,,,1,1.504462,128.8429705,1,1.798251,102.4414146,48980.840128,BI,0,17,19,,,,,,true,false,false
+90021,202002,100,,,0.95179,1.082843,113.3255814,0.910983,1.294215,118.2466324,27238.042605,BI,17,18,20,,,,,,false,false,false
+90021,202003,100,,,1.072437,1,126.259645,1.556526,1,105.5391887,21046,R,18,0,21,,,true,,,false,true,false
+90001,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90001,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90001,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90002,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90002,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90002,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90003,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90003,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90003,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90004,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90004,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90004,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90005,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90005,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90005,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90006,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90006,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90006,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90007,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90007,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90007,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90008,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90008,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90008,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90009,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90009,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90009,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90010,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90010,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90010,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90011,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90011,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90011,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90012,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90012,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90012,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90013,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90013,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90013,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90014,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90014,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90014,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90015,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90015,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90015,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90016,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90016,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90016,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90017,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90017,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90017,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90018,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90018,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90018,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90019,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90019,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90019,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90020,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90020,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90020,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
+90021,201901,100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,,,,
+90021,201902,100,,,0.8701751,1.505585865,123.1676833,,,,0,R,,,,,,,,,,,
+90021,201903,100,,,2.040615327,1,84.81873182,,,,0,R,,,,,,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
index f523f87f..2c33384c 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/66_partial_links_50_weight_output.csv
@@ -1,49 +1,49 @@
-identifier,date,group,other,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,96.16299559,1,0.9214,73.2661978,9261,R,0,0,4,false,false,false
-190001,202002,100,95,76.92045455,0.8521,1.5274,99.16957728,4996,R,0,0,3,false,false,false
-190001,202003,100,95,95.83333333,0.9685,1.8795,92.60471667,1480,R,0,0,4,false,false,false
-190001,202004,100,95,87.62068966,1.113,1,81.24249483,4350,R,0,0,5,false,false,false
-190002,202001,100,17,96.16299559,1,0.9214,73.2661978,2433,R,0,0,4,false,false,false
-190002,202002,100,17,76.92045455,0.8521,1.5274,99.16957728,4324,R,0,0,3,false,false,false
-190002,202003,100,17,95.83333333,0.9685,1.8795,92.60471667,6598,R,0,0,4,false,false,false
-190002,202004,100,17,87.62068966,1.113,1,81.24249483,700,R,0,0,5,false,false,false
-190003,202001,100,64,96.16299559,1,0.9214,73.2661978,7888,R,0,0,4,false,false,false
-190003,202002,100,64,76.92045455,0.8521,1.5274,99.16957728,4218,R,0,0,3,false,false,false
-190003,202003,100,64,95.83333333,0.9685,1.8795,92.60471667,7591,R,0,0,4,false,false,false
-190003,202004,100,64,87.62068966,1.113,1,81.24249483,4077,R,0,0,5,false,false,false
-190004,202001,100,51,96.16299559,1,0.9214,73.2661978,2247,R,0,0,4,false,false,false
-190004,202002,100,51,76.92045455,0.8521,1.5274,99.16957728,1914.6687,FIR,0,0,3,false,false,false
-190004,202003,100,51,95.83333333,0.9685,1.8795,92.60471667,1854.356636,FIR,0,0,4,false,false,false
-190004,202004,100,51,87.62068966,1.113,1,81.24249483,8608,R,0,0,5,false,false,false
-190005,202001,100,34,96.16299559,1,0.9214,73.2661978,6271.13538,BI,0,0,4,false,false,false
-190005,202002,100,34,76.92045455,0.8521,1.5274,99.16957728,6806.0944,BI,0,0,3,false,false,false
-190005,202003,100,34,95.83333333,0.9685,1.8795,92.60471667,4456,R,0,0,4,false,false,false
-190005,202004,100,34,87.62068966,1.113,1,81.24249483,5134,R,0,0,5,false,false,false
-190006,202001,100,8,96.16299559,1,0.9214,73.2661978,586.1295824,C,0,0,4,false,false,false
-190006,202002,100,8,76.92045455,0.8521,1.5274,99.16957728,499.4410171,FIC,0,0,3,false,false,false
-190006,202003,100,8,95.83333333,0.9685,1.8795,92.60471667,483.7086251,FIC,0,0,4,false,false,false
-190006,202004,100,8,87.62068966,1.113,1,81.24249483,538.3676997,FIC,0,0,5,false,false,false
-190001,201901,100,95,50.3694,,,,0,R,,,,,,
-190001,201902,100,95,121.4187,,,,0,R,,,,,,
-190001,201903,100,95,89.3761,,,,0,R,,,,,,
-190001,201904,100,95,74.8643,,,,0,R,,,,,,
-190002,201901,100,17,50.3694,,,,0,R,,,,,,
-190002,201902,100,17,121.4187,,,,0,R,,,,,,
-190002,201903,100,17,89.3761,,,,0,R,,,,,,
-190002,201904,100,17,74.8643,,,,0,R,,,,,,
-190003,201901,100,64,50.3694,,,,0,R,,,,,,
-190003,201902,100,64,121.4187,,,,0,R,,,,,,
-190003,201903,100,64,89.3761,,,,0,R,,,,,,
-190003,201904,100,64,74.8643,,,,0,R,,,,,,
-190004,201901,100,51,50.3694,,,,0,R,,,,,,
-190004,201902,100,51,121.4187,,,,0,R,,,,,,
-190004,201903,100,51,89.3761,,,,0,R,,,,,,
-190004,201904,100,51,74.8643,,,,0,R,,,,,,
-190005,201901,100,34,50.3694,,,,0,R,,,,,,
-190005,201902,100,34,121.4187,,,,0,R,,,,,,
-190005,201903,100,34,89.3761,,,,0,R,,,,,,
-190005,201904,100,34,74.8643,,,,0,R,,,,,,
-190006,201901,100,8,50.3694,,,,0,R,,,,,,
-190006,201902,100,8,121.4187,,,,0,R,,,,,,
-190006,201903,100,8,89.3761,,,,0,R,,,,,,
-190006,201904,100,8,74.8643,,,,0,R,,,,,,
+identifier,date,group,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,96.16299559,1,0.9214,73.2661978,9261,R,0,0,4,false,false,false
+190001,202002,100,76.92045455,0.8521,1.5274,99.16957728,4996,R,0,0,3,false,false,false
+190001,202003,100,95.83333333,0.9685,1.8795,92.60471667,1480,R,0,0,4,false,false,false
+190001,202004,100,87.62068966,1.113,1,81.24249483,4350,R,0,0,5,false,false,false
+190002,202001,100,96.16299559,1,0.9214,73.2661978,2433,R,0,0,4,false,false,false
+190002,202002,100,76.92045455,0.8521,1.5274,99.16957728,4324,R,0,0,3,false,false,false
+190002,202003,100,95.83333333,0.9685,1.8795,92.60471667,6598,R,0,0,4,false,false,false
+190002,202004,100,87.62068966,1.113,1,81.24249483,700,R,0,0,5,false,false,false
+190003,202001,100,96.16299559,1,0.9214,73.2661978,7888,R,0,0,4,false,false,false
+190003,202002,100,76.92045455,0.8521,1.5274,99.16957728,4218,R,0,0,3,false,false,false
+190003,202003,100,95.83333333,0.9685,1.8795,92.60471667,7591,R,0,0,4,false,false,false
+190003,202004,100,87.62068966,1.113,1,81.24249483,4077,R,0,0,5,false,false,false
+190004,202001,100,96.16299559,1,0.9214,73.2661978,2247,R,0,0,4,false,false,false
+190004,202002,100,76.92045455,0.8521,1.5274,99.16957728,1914.6687,FIR,0,0,3,false,false,false
+190004,202003,100,95.83333333,0.9685,1.8795,92.60471667,1854.356636,FIR,0,0,4,false,false,false
+190004,202004,100,87.62068966,1.113,1,81.24249483,8608,R,0,0,5,false,false,false
+190005,202001,100,96.16299559,1,0.9214,73.2661978,6271.13538,BI,0,0,4,false,false,false
+190005,202002,100,76.92045455,0.8521,1.5274,99.16957728,6806.0944,BI,0,0,3,false,false,false
+190005,202003,100,95.83333333,0.9685,1.8795,92.60471667,4456,R,0,0,4,false,false,false
+190005,202004,100,87.62068966,1.113,1,81.24249483,5134,R,0,0,5,false,false,false
+190006,202001,100,96.16299559,1,0.9214,73.2661978,586.1295824,C,0,0,4,false,false,false
+190006,202002,100,76.92045455,0.8521,1.5274,99.16957728,499.4410171,FIC,0,0,3,false,false,false
+190006,202003,100,95.83333333,0.9685,1.8795,92.60471667,483.7086251,FIC,0,0,4,false,false,false
+190006,202004,100,87.62068966,1.113,1,81.24249483,538.3676997,FIC,0,0,5,false,false,false
+190001,201901,100,50.3694,,,,0,R,,,,,,
+190001,201902,100,121.4187,,,,0,R,,,,,,
+190001,201903,100,89.3761,,,,0,R,,,,,,
+190001,201904,100,74.8643,,,,0,R,,,,,,
+190002,201901,100,50.3694,,,,0,R,,,,,,
+190002,201902,100,121.4187,,,,0,R,,,,,,
+190002,201903,100,89.3761,,,,0,R,,,,,,
+190002,201904,100,74.8643,,,,0,R,,,,,,
+190003,201901,100,50.3694,,,,0,R,,,,,,
+190003,201902,100,121.4187,,,,0,R,,,,,,
+190003,201903,100,89.3761,,,,0,R,,,,,,
+190003,201904,100,74.8643,,,,0,R,,,,,,
+190004,201901,100,50.3694,,,,0,R,,,,,,
+190004,201902,100,121.4187,,,,0,R,,,,,,
+190004,201903,100,89.3761,,,,0,R,,,,,,
+190004,201904,100,74.8643,,,,0,R,,,,,,
+190005,201901,100,50.3694,,,,0,R,,,,,,
+190005,201902,100,121.4187,,,,0,R,,,,,,
+190005,201903,100,89.3761,,,,0,R,,,,,,
+190005,201904,100,74.8643,,,,0,R,,,,,,
+190006,201901,100,50.3694,,,,0,R,,,,,,
+190006,201902,100,121.4187,,,,0,R,,,,,,
+190006,201903,100,89.3761,,,,0,R,,,,,,
+190006,201904,100,74.8643,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_10_muti_variable_50_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_10_muti_variable_50_weight_output.csv
index a5023af9..83bf79d9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_10_muti_variable_50_weight_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/67_TB_10_muti_variable_50_weight_output.csv
@@ -1,145 +1,145 @@
-identifier,date,group,other,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
-80001,202001,51100,89,,1.03678779721848,1,2.076231,107.088287,1,2.359415,125.976643,9244,R,0,10,12,,true,true,false,false
-80001,202002,51100,89,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,8916,R,10,9,12,true,true,false,false,false
-80001,202003,51100,89,0.694706146253926,,0.947092,1,69.128571,1.026638,1,104.689744,6194,R,9,0,11,true,,false,true,false
-80002,202001,51100,83,,0.81755039810266,1,2.076231,107.088287,1,2.359415,125.976643,4826,R,0,10,12,,true,true,false,false
-80002,202002,51100,83,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,5903,R,10,9,12,true,true,false,false,false
-80002,202003,51100,83,0.803489750974081,,0.947092,1,69.128571,1.026638,1,104.689744,4743,R,9,0,11,true,,false,true,false
-80003,202001,51100,4,,7.46653543307087,1,2.076231,107.088287,1,2.359415,125.976643,7586,R,0,10,12,,true,true,false,false
-80003,202002,51100,4,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,1016,R,10,9,12,true,true,false,false,false
-80003,202003,51100,4,1.40649606299213,,0.947092,1,69.128571,1.026638,1,104.689744,1429,R,9,0,11,true,,false,true,false
-80004,202001,51100,76,,1.30584756898817,1,2.076231,107.088287,1,2.359415,125.976643,3975,R,0,10,12,,true,true,false,false
-80004,202002,51100,76,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3044,R,10,9,12,true,true,false,false,false
-80004,202003,51100,76,1.20663600525624,,0.947092,1,69.128571,1.026638,1,104.689744,3673,R,9,0,11,true,,false,true,false
-80005,202001,51100,18,,0.62191605254726,1,2.076231,107.088287,1,2.359415,125.976643,1941,R,0,10,12,,false,true,false,false
-80005,202002,51100,18,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3121,R,10,9,12,false,false,false,false,false
-80005,202003,51100,18,0.387055430951618,,0.947092,1,69.128571,1.026638,1,104.689744,1208,R,9,0,11,false,,false,true,false
-80006,202001,51100,94,,0.762987012987013,1,2.076231,107.088287,1,2.359415,125.976643,5405,R,0,10,12,,true,true,false,false
-80006,202002,51100,94,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,7084,R,10,9,12,true,true,false,false,false
-80006,202003,51100,94,0.702992659514399,,0.947092,1,69.128571,1.026638,1,104.689744,4980,R,9,0,11,true,,false,true,false
-80007,202001,51100,8,,5.33286467486819,1,2.076231,107.088287,1,2.359415,125.976643,15172,R,0,10,12,,true,true,false,false
-80007,202002,51100,8,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,2845,R,10,9,12,true,true,false,false,false
-80007,202003,51100,8,1.23057996485062,,0.947092,1,69.128571,1.026638,1,104.689744,3501,R,9,0,11,true,,false,true,false
-80008,202001,51100,304,,1.12953080601566,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
-80008,202002,51100,304,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,14429,R,10,9,12,true,true,false,false,false
-80008,202003,51100,304,0.990713147134244,,0.947092,1,69.128571,1.026638,1,104.689744,14295,R,9,0,11,true,,false,true,false
-80009,202001,51100,45,,0.740636891648308,1,2.076231,107.088287,1,2.359415,125.976643,3698,R,0,10,12,,true,true,false,false
-80009,202002,51100,45,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,4993,R,10,9,12,true,true,false,false,false
-80009,202003,51100,45,0.843581013418786,,0.947092,1,69.128571,1.026638,1,104.689744,4212,R,9,0,11,true,,false,true,false
-80010,202001,51100,100,,0.76056338028169,1,2.076231,107.088287,1,2.359415,125.976643,7722,R,0,10,12,,true,true,false,false
-80010,202002,51100,100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,10153,R,10,9,12,true,true,false,false,false
-80010,202003,51100,100,0.644637053087757,,0.947092,1,69.128571,1.026638,1,104.689744,6545,R,9,0,11,true,,false,true,false
-80011,202001,51100,19,,8.36614281775572,1,2.076231,107.088287,1,2.359415,125.976643,30344,R,0,10,12,,false,true,false,false
-80011,202002,51100,19,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3627,R,10,9,12,false,false,false,false,false
-80011,202003,51100,19,2.0093741384064,,0.947092,1,69.128571,1.026638,1,104.689744,7288,R,9,0,11,false,,false,true,false
-80012,202001,51100,304,,1.40900838592548,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
-80012,202002,51100,304,0.709718983924408,,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,11567,R,10,9,12,true,,false,false,false
-80012,202003,51100,304,,,0.947092,1,69.128571,1.026638,1,104.689744,11875.118407,FIR,9,0,11,,,false,true,false
-80001,202001,52100,54,,1.10678653656397,1,1.314057,186.686659,1,1.703049,131.363259,20190,R,0,9,11,,true,true,false,false
-80001,202002,52100,54,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18242,R,9,10,12,true,true,false,false,false
-80001,202003,52100,54,1.58019953952418,,1.246482,1,254.993795,1.143548,1,167.406264,28826,R,10,0,12,true,,false,true,false
-80002,202001,52100,47,,0.845909451945989,1,1.314057,186.686659,1,1.703049,131.363259,4260,R,0,9,11,,true,true,false,false
-80002,202002,52100,42,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,5036,R,9,10,12,true,true,false,false,false
-80002,202003,52100,42,1.28752978554408,,1.246482,1,254.993795,1.143548,1,167.406264,6484,R,10,0,12,true,,false,true,false
-80003,202001,52100,57,,3.88684582743989,1,1.314057,186.686659,1,1.703049,131.363259,19236,R,0,9,11,,false,true,false,false
-80003,202002,52100,57,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,4949,R,9,10,12,false,true,false,false,false
-80003,202003,52100,57,0.716104263487573,,1.246482,1,254.993795,1.143548,1,167.406264,3544,R,10,0,12,true,,false,true,false
-80004,202001,52100,163,,0.906723456038941,1,1.314057,186.686659,1,1.703049,131.363259,14902,R,0,9,11,,true,true,false,false
-80004,202002,52100,163,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,16435,R,9,10,12,true,true,false,false,false
-80004,202003,52100,163,1.500030422878,,1.246482,1,254.993795,1.143548,1,167.406264,24653,R,10,0,12,true,,false,true,false
-80005,202001,52100,149,,0.702286449569435,1,1.314057,186.686659,1,1.703049,131.363259,35476,R,0,9,11,,true,true,false,false
-80005,202002,52100,149,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,50515,R,9,10,12,true,true,false,false,false
-80005,202003,52100,149,1.05863604869841,,1.246482,1,254.993795,1.143548,1,167.406264,53477,R,10,0,12,true,,false,true,false
-80006,202001,52100,126,,0.543196798493409,1,1.314057,186.686659,1,1.703049,131.363259,13845,R,0,9,11,,true,true,false,false
-80006,202002,52100,126,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,25488,R,9,10,12,true,true,false,false,false
-80006,202003,52100,126,1.07536880100439,,1.246482,1,254.993795,1.143548,1,167.406264,27409,R,10,0,12,true,,false,true,false
-80007,202001,52100,6,,2.53225806451613,1,1.314057,186.686659,1,1.703049,131.363259,1099,R,0,9,11,,true,true,false,false
-80007,202002,52100,6,0.394904458598726,3.5,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,434,R,9,10,12,true,false,false,false,false
-80007,202003,52100,6,0.285714285714286,,1.246482,1,254.993795,1.143548,1,167.406264,124,R,10,0,12,false,,false,true,false
-80008,202001,52100,22,,1.67735470941884,1,1.314057,186.686659,1,1.703049,131.363259,3348,R,0,9,11,,true,true,false,false
-80008,202002,52100,22,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1996,R,9,10,12,true,false,false,false,false
-80008,202003,52100,22,2.53056112224449,,1.246482,1,254.993795,1.143548,1,167.406264,5051,R,10,0,12,false,,false,true,false
-80009,202001,52100,108,,0.855039803324748,1,1.314057,186.686659,1,1.703049,131.363259,29215,R,0,9,11,,true,true,false,false
-80009,202002,52100,108,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,34168,R,9,10,12,true,true,false,false,false
-80009,202003,52100,108,1.80367595410911,,1.246482,1,254.993795,1.143548,1,167.406264,61628,R,10,0,12,true,,false,true,false
-80010,202001,52100,67,,0.502951593860685,1,1.314057,186.686659,1,1.703049,131.363259,6390,R,0,9,11,,false,true,false,false
-80010,202002,52100,67,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,12705,R,9,10,12,false,true,false,false,false
-80010,202003,52100,67,0.941833923652106,,1.246482,1,254.993795,1.143548,1,167.406264,11966,R,10,0,12,true,,false,true,false
-80011,202001,52100,18,,2.65695981362842,1,1.314057,186.686659,1,1.703049,131.363259,4562,R,0,9,11,,true,true,false,false
-80011,202002,52100,18,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1717,R,9,10,12,true,true,false,false,false
-80011,202003,52100,18,1.38089691322073,,1.246482,1,254.993795,1.143548,1,167.406264,2371,R,10,0,12,true,,false,true,false
-80012,202001,52100,155,,,1,1.314057,186.686659,1,1.703049,131.363259,31986.659101,BI,0,9,11,,,true,false,false
-80012,202002,52100,155,,0.892426114225981,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18782,R,9,10,12,,true,false,false,false
-80012,202003,52100,155,1.1205409434565,,1.246482,1,254.993795,1.143548,1,167.406264,21046,R,10,0,12,true,,false,true,false
-80001,201901,51100,89,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80001,201902,51100,89,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80001,201903,51100,89,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80002,201901,51100,83,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80002,201902,51100,83,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80002,201903,51100,83,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80003,201901,51100,4,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80003,201902,51100,4,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80003,201903,51100,4,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80004,201901,51100,76,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80004,201902,51100,76,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80004,201903,51100,76,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80005,201901,51100,18,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80005,201902,51100,18,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80005,201903,51100,18,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80006,201901,51100,94,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80006,201902,51100,94,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80006,201903,51100,94,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80007,201901,51100,8,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80007,201902,51100,8,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80007,201903,51100,8,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80008,201901,51100,304,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80008,201902,51100,304,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80008,201903,51100,304,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80009,201901,51100,45,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80009,201902,51100,45,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80009,201903,51100,45,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80010,201901,51100,100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80010,201902,51100,100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80010,201903,51100,100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80011,201901,51100,19,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80011,201902,51100,19,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80011,201903,51100,19,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80012,201901,51100,304,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
-80012,201902,51100,304,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
-80012,201903,51100,304,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
-80001,201901,52100,54,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80001,201902,52100,54,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80001,201903,52100,54,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80002,201901,52100,47,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80002,201902,52100,42,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80002,201903,52100,42,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80003,201901,52100,57,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80003,201902,52100,57,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80003,201903,52100,57,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80004,201901,52100,163,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80004,201902,52100,163,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80004,201903,52100,163,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80005,201901,52100,149,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80005,201902,52100,149,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80005,201903,52100,149,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80006,201901,52100,126,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80006,201902,52100,126,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80006,201903,52100,126,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80007,201901,52100,6,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80007,201902,52100,6,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80007,201903,52100,6,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80008,201901,52100,22,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80008,201902,52100,22,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80008,201903,52100,22,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80009,201901,52100,108,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80009,201902,52100,108,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80009,201903,52100,108,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80010,201901,52100,67,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80010,201902,52100,67,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80010,201903,52100,67,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80011,201901,52100,18,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80011,201902,52100,18,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80011,201903,52100,18,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
-80012,201901,52100,155,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
-80012,201902,52100,155,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
-80012,201903,52100,155,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,trim_inclusion_forward,trim_inclusion_backward,default_forward,default_backward,default_construction
+80001,202001,51100,,1.03678779721848,1,2.076231,107.088287,1,2.359415,125.976643,9244,R,0,10,12,,true,true,false,false
+80001,202002,51100,0.964517524881004,1.43945753955441,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,8916,R,10,9,12,true,true,false,false,false
+80001,202003,51100,0.694706146253926,,0.947092,1,69.128571,1.026638,1,104.689744,6194,R,9,0,11,true,,false,true,false
+80002,202001,51100,,0.81755039810266,1,2.076231,107.088287,1,2.359415,125.976643,4826,R,0,10,12,,true,true,false,false
+80002,202002,51100,1.22316618317447,1.24457094665823,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,5903,R,10,9,12,true,true,false,false,false
+80002,202003,51100,0.803489750974081,,0.947092,1,69.128571,1.026638,1,104.689744,4743,R,9,0,11,true,,false,true,false
+80003,202001,51100,,7.46653543307087,1,2.076231,107.088287,1,2.359415,125.976643,7586,R,0,10,12,,true,true,false,false
+80003,202002,51100,0.133930925388874,0.710986703988803,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,1016,R,10,9,12,true,true,false,false,false
+80003,202003,51100,1.40649606299213,,0.947092,1,69.128571,1.026638,1,104.689744,1429,R,9,0,11,true,,false,true,false
+80004,202001,51100,,1.30584756898817,1,2.076231,107.088287,1,2.359415,125.976643,3975,R,0,10,12,,true,true,false,false
+80004,202002,51100,0.765786163522013,0.828750340321263,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3044,R,10,9,12,true,true,false,false,false
+80004,202003,51100,1.20663600525624,,0.947092,1,69.128571,1.026638,1,104.689744,3673,R,9,0,11,true,,false,true,false
+80005,202001,51100,,0.62191605254726,1,2.076231,107.088287,1,2.359415,125.976643,1941,R,0,10,12,,false,true,false,false
+80005,202002,51100,1.60793405461103,2.58360927152318,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3121,R,10,9,12,false,false,false,false,false
+80005,202003,51100,0.387055430951618,,0.947092,1,69.128571,1.026638,1,104.689744,1208,R,9,0,11,false,,false,true,false
+80006,202001,51100,,0.762987012987013,1,2.076231,107.088287,1,2.359415,125.976643,5405,R,0,10,12,,true,true,false,false
+80006,202002,51100,1.31063829787234,1.42248995983936,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,7084,R,10,9,12,true,true,false,false,false
+80006,202003,51100,0.702992659514399,,0.947092,1,69.128571,1.026638,1,104.689744,4980,R,9,0,11,true,,false,true,false
+80007,202001,51100,,5.33286467486819,1,2.076231,107.088287,1,2.359415,125.976643,15172,R,0,10,12,,true,true,false,false
+80007,202002,51100,0.18751647772212,0.812624964295915,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,2845,R,10,9,12,true,true,false,false,false
+80007,202003,51100,1.23057996485062,,0.947092,1,69.128571,1.026638,1,104.689744,3501,R,9,0,11,true,,false,true,false
+80008,202001,51100,,1.12953080601566,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
+80008,202002,51100,0.885323352558596,1.00937390696048,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,14429,R,10,9,12,true,true,false,false,false
+80008,202003,51100,0.990713147134244,,0.947092,1,69.128571,1.026638,1,104.689744,14295,R,9,0,11,true,,false,true,false
+80009,202001,51100,,0.740636891648308,1,2.076231,107.088287,1,2.359415,125.976643,3698,R,0,10,12,,true,true,false,false
+80009,202002,51100,1.35018929150892,1.18542260208927,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,4993,R,10,9,12,true,true,false,false,false
+80009,202003,51100,0.843581013418786,,0.947092,1,69.128571,1.026638,1,104.689744,4212,R,9,0,11,true,,false,true,false
+80010,202001,51100,,0.76056338028169,1,2.076231,107.088287,1,2.359415,125.976643,7722,R,0,10,12,,true,true,false,false
+80010,202002,51100,1.31481481481481,1.55126050420168,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,10153,R,10,9,12,true,true,false,false,false
+80010,202003,51100,0.644637053087757,,0.947092,1,69.128571,1.026638,1,104.689744,6545,R,9,0,11,true,,false,true,false
+80011,202001,51100,,8.36614281775572,1,2.076231,107.088287,1,2.359415,125.976643,30344,R,0,10,12,,false,true,false,false
+80011,202002,51100,0.119529396256262,0.497667398463227,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,3627,R,10,9,12,false,false,false,false,false
+80011,202003,51100,2.0093741384064,,0.947092,1,69.128571,1.026638,1,104.689744,7288,R,9,0,11,false,,false,true,false
+80012,202001,51100,,1.40900838592548,1,2.076231,107.088287,1,2.359415,125.976643,16298,R,0,10,12,,true,true,false,false
+80012,202002,51100,0.709718983924408,,0.88456,1.133882,67.043706,1.035385,0.942922,84.76627,11567,R,10,9,12,true,,false,false,false
+80012,202003,51100,,,0.947092,1,69.128571,1.026638,1,104.689744,11875.118407,FIR,9,0,11,,,false,true,false
+80001,202001,52100,,1.10678653656397,1,1.314057,186.686659,1,1.703049,131.363259,20190,R,0,9,11,,true,true,false,false
+80001,202002,52100,0.903516592372462,0.63283147158815,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18242,R,9,10,12,true,true,false,false,false
+80001,202003,52100,1.58019953952418,,1.246482,1,254.993795,1.143548,1,167.406264,28826,R,10,0,12,true,,false,true,false
+80002,202001,52100,,0.845909451945989,1,1.314057,186.686659,1,1.703049,131.363259,4260,R,0,9,11,,true,true,false,false
+80002,202002,52100,1.18215962441315,0.776681061073411,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,5036,R,9,10,12,true,true,false,false,false
+80002,202003,52100,1.28752978554408,,1.246482,1,254.993795,1.143548,1,167.406264,6484,R,10,0,12,true,,false,true,false
+80003,202001,52100,,3.88684582743989,1,1.314057,186.686659,1,1.703049,131.363259,19236,R,0,9,11,,false,true,false,false
+80003,202002,52100,0.257278020378457,1.39644469525959,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,4949,R,9,10,12,false,true,false,false,false
+80003,202003,52100,0.716104263487573,,1.246482,1,254.993795,1.143548,1,167.406264,3544,R,10,0,12,true,,false,true,false
+80004,202001,52100,,0.906723456038941,1,1.314057,186.686659,1,1.703049,131.363259,14902,R,0,9,11,,true,true,false,false
+80004,202002,52100,1.10287209770501,0.666653145661786,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,16435,R,9,10,12,true,true,false,false,false
+80004,202003,52100,1.500030422878,,1.246482,1,254.993795,1.143548,1,167.406264,24653,R,10,0,12,true,,false,true,false
+80005,202001,52100,,0.702286449569435,1,1.314057,186.686659,1,1.703049,131.363259,35476,R,0,9,11,,true,true,false,false
+80005,202002,52100,1.42392039688804,0.944611702227126,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,50515,R,9,10,12,true,true,false,false,false
+80005,202003,52100,1.05863604869841,,1.246482,1,254.993795,1.143548,1,167.406264,53477,R,10,0,12,true,,false,true,false
+80006,202001,52100,,0.543196798493409,1,1.314057,186.686659,1,1.703049,131.363259,13845,R,0,9,11,,true,true,false,false
+80006,202002,52100,1.8409534127844,0.929913532051516,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,25488,R,9,10,12,true,true,false,false,false
+80006,202003,52100,1.07536880100439,,1.246482,1,254.993795,1.143548,1,167.406264,27409,R,10,0,12,true,,false,true,false
+80007,202001,52100,,2.53225806451613,1,1.314057,186.686659,1,1.703049,131.363259,1099,R,0,9,11,,true,true,false,false
+80007,202002,52100,0.394904458598726,3.5,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,434,R,9,10,12,true,false,false,false,false
+80007,202003,52100,0.285714285714286,,1.246482,1,254.993795,1.143548,1,167.406264,124,R,10,0,12,false,,false,true,false
+80008,202001,52100,,1.67735470941884,1,1.314057,186.686659,1,1.703049,131.363259,3348,R,0,9,11,,true,true,false,false
+80008,202002,52100,0.596176821983274,0.395169273411206,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1996,R,9,10,12,true,false,false,false,false
+80008,202003,52100,2.53056112224449,,1.246482,1,254.993795,1.143548,1,167.406264,5051,R,10,0,12,false,,false,true,false
+80009,202001,52100,,0.855039803324748,1,1.314057,186.686659,1,1.703049,131.363259,29215,R,0,9,11,,true,true,false,false
+80009,202002,52100,1.16953619715899,0.554423314078016,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,34168,R,9,10,12,true,true,false,false,false
+80009,202003,52100,1.80367595410911,,1.246482,1,254.993795,1.143548,1,167.406264,61628,R,10,0,12,true,,false,true,false
+80010,202001,52100,,0.502951593860685,1,1.314057,186.686659,1,1.703049,131.363259,6390,R,0,9,11,,false,true,false,false
+80010,202002,52100,1.98826291079812,1.06175831522648,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,12705,R,9,10,12,false,true,false,false,false
+80010,202003,52100,0.941833923652106,,1.246482,1,254.993795,1.143548,1,167.406264,11966,R,10,0,12,true,,false,true,false
+80011,202001,52100,,2.65695981362842,1,1.314057,186.686659,1,1.703049,131.363259,4562,R,0,9,11,,true,true,false,false
+80011,202002,52100,0.376370013152126,0.724167018135808,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,1717,R,9,10,12,true,true,false,false,false
+80011,202003,52100,1.38089691322073,,1.246482,1,254.993795,1.143548,1,167.406264,2371,R,10,0,12,true,,false,true,false
+80012,202001,52100,,,1,1.314057,186.686659,1,1.703049,131.363259,31986.659101,BI,0,9,11,,,true,false,false
+80012,202002,52100,,0.892426114225981,0.998934,0.857991,196.966908,0.934555,1.181789,147.567295,18782,R,9,10,12,,true,false,false,false
+80012,202003,52100,1.1205409434565,,1.246482,1,254.993795,1.143548,1,167.406264,21046,R,10,0,12,true,,false,true,false
+80001,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80001,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80001,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80002,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80002,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80002,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80003,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80003,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80003,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80004,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80004,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80004,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80005,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80005,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80005,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80006,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80006,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80006,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80007,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80007,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80007,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80008,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80008,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80008,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80009,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80009,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80009,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80010,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80010,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80010,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80011,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80011,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80011,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80012,201901,51100,,,1,2.642597676,144.865,,,,0,R,,,,,,,,
+80012,201902,51100,,,1.186209073,0.751963069,102.4888332,,,,0,R,,,,,,,,
+80012,201903,51100,,,1.106182973,1,140.2509173,,,,0,R,,,,,,,,
+80001,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80001,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80001,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80002,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80002,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80002,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80003,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80003,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80003,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80004,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80004,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80004,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80005,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80005,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80005,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80006,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80006,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80006,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80007,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80007,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80007,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80008,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80008,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80008,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80009,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80009,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80009,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80010,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80010,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80010,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80011,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80011,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80011,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
+80012,201901,52100,,,1,2.09204015,76.03985875,,,,0,R,,,,,,,,
+80012,201902,52100,,,0.8701751,1.505585865,98.16768334,,,,0,R,,,,,,,,
+80012,201903,52100,,,1.040615327,1,79.81873182,,,,0,R,,,,,,,,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
index 37c2647e..5fea49d6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/01_C_output.csv
@@ -1,5 +1,5 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,100,1,3892,R,1,1,147.88764,0,0,3,true,true,false
-10002,202001,100,75,3873,R,1,1,147.88764,0,0,3,true,true,false
-10003,202001,100,13,5397,R,1,1,147.88764,0,0,3,true,true,false
-10004,202001,100,71,10500.022472,C,1,1,147.88764,0,0,3,true,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,100,3892,R,1,1,147.88764,0,0,3,true,true,false
+10002,202001,100,3873,R,1,1,147.88764,0,0,3,true,true,false
+10003,202001,100,5397,R,1,1,147.88764,0,0,3,true,true,false
+10004,202001,100,10500.022472,C,1,1,147.88764,0,0,3,true,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
index 49fe2104..c47f91c6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/02_C_FI_output.csv
@@ -1,9 +1,9 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction
-20001,202001,100,35,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false
-20001,202002,100,35,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false
-20002,202001,100,72,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false
-20002,202002,100,72,2970,R,0.707916498,1,66.5326087,0,3,3,false,true,false
-20003,202001,100,77,5644,R,1,1.412595981,93.98369565,3,0,3,true,false,false
-20003,202002,100,77,989,R,0.707916498,1,66.5326087,0,3,3,false,true,false
-20004,202001,100,30,2819.51087,C,1,1.412595981,93.98369565,3,0,3,true,false,false
-20004,202002,100,30,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction
+20001,202001,100,2536,R,1,1.412595981,93.98369565,3,0,3,true,false,false
+20001,202002,100,8283,R,0.707916498,1,66.5326087,0,3,3,false,true,false
+20002,202001,100,9113,R,1,1.412595981,93.98369565,3,0,3,true,false,false
+20002,202002,100,2970,R,0.707916498,1,66.5326087,0,3,3,false,true,false
+20003,202001,100,5644,R,1,1.412595981,93.98369565,3,0,3,true,false,false
+20003,202002,100,989,R,0.707916498,1,66.5326087,0,3,3,false,true,false
+20004,202001,100,2819.51087,C,1,1.412595981,93.98369565,3,0,3,true,false,false
+20004,202002,100,1995.978261,FIC,0.707916498,1,66.5326087,0,3,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
index e7524725..679440d5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/03_R_R_FI_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,51,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false
-30001,202002,100,51,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
-30001,202003,100,51,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false
-30002,202001,100,72,9343,R,1,1.323142738,120.1990521,4,0,4,true,false,false
-30002,202002,100,72,7818,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
-30002,202003,100,72,4897,R,0.785224274,1,103.0153846,0,3,3,false,true,false
-30003,202001,100,7,7511,R,1,1.323142738,120.1990521,4,0,4,true,false,false
-30003,202002,100,7,1761,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
-30003,202003,100,7,6492,R,0.785224274,1,103.0153846,0,3,3,false,true,false
-30004,202001,100,81,64,R,1,1.323142738,120.1990521,4,0,4,true,false,false
-30004,202002,100,81,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
-30004,202003,100,81,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_backward,count_forward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,8444,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30001,202002,100,7476,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30001,202003,100,2003,R,0.785224274,1,103.0153846,0,3,3,false,true,false
+30002,202001,100,9343,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30002,202002,100,7818,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30002,202003,100,4897,R,0.785224274,1,103.0153846,0,3,3,false,true,false
+30003,202001,100,7511,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30003,202002,100,1761,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30003,202003,100,6492,R,0.785224274,1,103.0153846,0,3,3,false,true,false
+30004,202001,100,64,R,1,1.323142738,120.1990521,4,0,4,true,false,false
+30004,202002,100,2113,R,0.755776358,1.273521505,90.8436019,3,4,4,false,false,false
+30004,202003,100,1659.178892,FIR,0.785224274,1,103.0153846,0,3,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
index b60954ab..3c9ca4ff 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/04_R_R_FI_FI_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-40001,202001,100,35,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false
-40001,202002,100,35,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
-40001,202003,100,35,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
-40001,202004,100,35,4911,R,0.637121844,1,73.71052632,3,0,3,false,true,false
-40002,202001,100,63,2095,R,1,1.060305409,128.0208333,0,4,4,true,false,false
-40002,202002,100,63,442,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
-40002,202003,100,63,3136,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
-40002,202004,100,63,2115,R,0.637121844,1,73.71052632,3,0,3,false,true,false
-40003,202001,100,16,7863,R,1,1.060305409,128.0208333,0,4,4,true,false,false
-40003,202002,100,16,8121,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
-40003,202003,100,16,2151,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
-40003,202004,100,16,1377,R,0.637121844,1,73.71052632,3,0,3,false,true,false
-40004,202001,100,78,5131,R,1,1.060305409,128.0208333,0,4,4,true,false,false
-40004,202002,100,78,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
-40004,202003,100,78,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
-40004,202004,100,78,6193.009741,FIR,0.637121844,1,73.71052632,3,0,3,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+40001,202001,100,9491,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40001,202002,100,4783,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40001,202003,100,7902,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40001,202004,100,4911,R,0.637121844,1,73.71052632,3,0,3,false,true,false
+40002,202001,100,2095,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40002,202002,100,442,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40002,202003,100,3136,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40002,202004,100,2115,R,0.637121844,1,73.71052632,3,0,3,false,true,false
+40003,202001,100,7863,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40003,202002,100,8121,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40003,202003,100,2151,R,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40003,202004,100,1377,R,0.637121844,1,73.71052632,3,0,3,false,true,false
+40004,202001,100,5131,R,1,1.060305409,128.0208333,0,4,4,true,false,false
+40004,202002,100,9836,R,0.943124492,1.011903859,120.7395833,4,3,4,false,false,false
+40004,202003,100,9720.291024,FIR,0.988236176,1.569558491,115.692982,3,3,3,false,false,false
+40004,202004,100,6193.009741,FIR,0.637121844,1,73.71052632,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
index 71fc0e73..3644e6f2 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/05_R_R_FI_FI_FI_year_span_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-50001,202010,100,59,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false
-50001,202011,100,59,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
-50001,202012,100,59,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
-50001,202101,100,59,7769,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
-50001,202102,100,59,4687,R,0.481224628,1,49.9122807,3,0,3,false,true,false
-50002,202010,100,36,4851,R,1,0.659160839,70.34328358,0,4,4,true,false,false
-50002,202011,100,36,8894,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
-50002,202012,100,36,3372,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
-50002,202101,100,36,3522,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
-50002,202102,100,36,2327,R,0.481224628,1,49.9122807,3,0,3,false,true,false
-50003,202010,100,76,2238,R,1,0.659160839,70.34328358,0,4,4,true,false,false
-50003,202011,100,76,769,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
-50003,202012,100,76,7722,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
-50003,202101,100,76,6445,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
-50003,202102,100,76,1521,R,0.481224628,1,49.9122807,3,0,3,false,true,false
-50004,202010,100,30,688,R,1,0.659160839,70.34328358,0,4,4,true,false,false
-50004,202011,100,30,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
-50004,202012,100,30,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
-50004,202101,100,30,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
-50004,202102,100,30,1521.344411,FIR,0.481224628,1,49.9122807,3,0,3,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+50001,202010,100,6362,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50001,202011,100,8542,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50001,202012,100,5623,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50001,202101,100,7769,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50001,202102,100,4687,R,0.481224628,1,49.9122807,3,0,3,false,true,false
+50002,202010,100,4851,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50002,202011,100,8894,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50002,202012,100,3372,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50002,202101,100,3522,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50002,202102,100,2327,R,0.481224628,1,49.9122807,3,0,3,false,true,false
+50003,202010,100,2238,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50003,202011,100,769,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50003,202012,100,7722,R,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50003,202101,100,6445,R,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50003,202102,100,1521,R,0.481224628,1,49.9122807,3,0,3,false,true,false
+50004,202010,100,688,R,1,0.659160839,70.34328358,0,4,4,true,false,false
+50004,202011,100,3245,R,1.517080416,1.089011186,106.7164179,4,3,4,false,false,false
+50004,202012,100,2979.767372,FIR,0.918264213,0.942546234,97.76023392,3,3,3,false,false,false
+50004,202101,100,3161.401813,FIR,1.060955913,2.078031634,103.7192982,3,3,3,false,false,false
+50004,202102,100,1521.344411,FIR,0.481224628,1,49.9122807,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
index d47bfb64..b649fbd4 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/06_BI_BI_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-60001,202001,100,15,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false
-60001,202002,100,15,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
-60001,202003,100,15,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false
-60002,202001,100,71,1588,R,1,1.408039237,117.9107143,0,3,3,true,false,false
-60002,202002,100,71,1213,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
-60002,202003,100,71,3807,R,1.194583644,1,100.913043,3,0,4,false,true,false
-60003,202001,100,26,6541,R,1,1.408039237,117.9107143,0,3,3,true,false,false
-60003,202002,100,26,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
-60003,202003,100,26,6351,R,1.194583644,1,100.913043,3,0,4,false,true,false
-60004,202001,100,3,472.653159,BI,1,1.408039237,117.9107143,0,3,3,true,false,false
-60004,202002,100,3,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
-60004,202003,100,3,401,R,1.194583644,1,100.913043,3,0,4,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,5077,R,1,1.408039237,117.9107143,0,3,3,true,false,false
+60001,202002,100,7830,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60001,202003,100,1046,R,1.194583644,1,100.913043,3,0,4,false,true,false
+60002,202001,100,1588,R,1,1.408039237,117.9107143,0,3,3,true,false,false
+60002,202002,100,1213,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60002,202003,100,3807,R,1.194583644,1,100.913043,3,0,4,false,true,false
+60003,202001,100,6541,R,1,1.408039237,117.9107143,0,3,3,true,false,false
+60003,202002,100,336,R,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60003,202003,100,6351,R,1.194583644,1,100.913043,3,0,4,false,true,false
+60004,202001,100,472.653159,BI,1,1.408039237,117.9107143,0,3,3,true,false,false
+60004,202002,100,335.6818101,BI,0.710207481,0.837111746,83.74107143,3,3,3,false,false,false
+60004,202003,100,401,R,1.194583644,1,100.913043,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
index 8c3a3aab..e4365c1b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/07_BI_BI_R_FI_FI_R_FI_output.csv
@@ -1,29 +1,29 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-70001,202001,100,39,5951,R,1,1.964796824,107.48,0,3,3,true,false,false
-70001,202002,100,39,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
-70001,202003,100,39,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
-70001,202004,100,39,96,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
-70001,202005,100,39,9086,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
-70001,202006,100,39,3949,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
-70001,202007,100,39,49,R,0.913631634,1,70.24,3,0,3,false,true,false
-70002,202001,100,94,6705,R,1,1.964796824,107.48,0,3,3,true,false,false
-70002,202002,100,94,48,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
-70002,202003,100,94,5361,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
-70002,202004,100,94,8767,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
-70002,202005,100,94,9214,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
-70002,202006,100,94,7467,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
-70002,202007,100,94,3475,R,0.913631634,1,70.24,3,0,3,false,true,false
-70003,202001,100,42,6153,R,1,1.964796824,107.48,0,3,3,true,false,false
-70003,202002,100,42,7711,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
-70003,202003,100,42,5403,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
-70003,202004,100,42,7445,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
-70003,202005,100,42,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
-70003,202006,100,42,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
-70003,202007,100,42,8768,R,0.913631634,1,70.24,3,0,3,false,true,false
-70004,202001,100,6,10286.222995,BI,1,1.964796824,107.48,0,3,3,true,false,false
-70004,202002,100,6,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
-70004,202003,100,6,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
-70004,202004,100,6,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
-70004,202005,100,6,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
-70004,202006,100,6,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
-70004,202007,100,6,5367.585848,FIR,0.913631634,1,70.24,3,0,3,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+70001,202001,100,5951,R,1,1.964796824,107.48,0,3,3,true,false,false
+70001,202002,100,1814,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70001,202003,100,734,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70001,202004,100,96,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70001,202005,100,9086,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70001,202006,100,3949,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70001,202007,100,49,R,0.913631634,1,70.24,3,0,3,false,true,false
+70002,202001,100,6705,R,1,1.964796824,107.48,0,3,3,true,false,false
+70002,202002,100,48,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70002,202003,100,5361,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70002,202004,100,8767,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70002,202005,100,9214,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70002,202006,100,7467,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70002,202007,100,3475,R,0.913631634,1,70.24,3,0,3,false,true,false
+70003,202001,100,6153,R,1,1.964796824,107.48,0,3,3,true,false,false
+70003,202002,100,7711,R,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70003,202003,100,5403,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70003,202004,100,7445,R,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70003,202005,100,7092,R,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70003,202006,100,2038,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70003,202007,100,8768,R,0.913631634,1,70.24,3,0,3,false,true,false
+70004,202001,100,10286.222995,BI,1,1.964796824,107.48,0,3,3,true,false,false
+70004,202002,100,5235.260393,BI,0.508958477,0.832579579,54.70285714,3,3,3,false,false,false
+70004,202003,100,6288,R,1.201086389,0.705052735,98.26519337,3,3,4,false,false,false
+70004,202004,100,8918.481823,FIR,1.418333623,0.642249527,93.18857143,3,3,3,false,false,false
+70004,202005,100,13886.319012,FIR,1.557027226,1.887319756,145.0971429,3,3,3,false,false,false
+70004,202006,100,5875,R,0.529851921,1.09453303,106.7900552,3,3,4,false,false,false
+70004,202007,100,5367.585848,FIR,0.913631634,1,70.24,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
index 39912e13..fb15bc11 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/08_R_R_R_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-80001,202001,100,91,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false
-80001,202002,100,91,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
-80001,202003,100,91,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false
-80002,202001,100,85,7138,R,1,1.646151294,69.14982578,0,4,4,true,false,false
-80002,202002,100,85,1970,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
-80002,202003,100,85,2746,R,1.711844725,1,71.90940767,4,0,4,false,true,false
-80003,202001,100,41,2846,R,1,1.646151294,69.14982578,0,4,4,true,false,false
-80003,202002,100,41,3552,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
-80003,202003,100,41,9015,R,1.711844725,1,71.90940767,4,0,4,false,true,false
-80004,202001,100,70,5820,R,1,1.646151294,69.14982578,0,4,4,true,false,false
-80004,202002,100,70,3729,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
-80004,202003,100,70,8233,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+80001,202001,100,4042,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80001,202002,100,2805,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80001,202003,100,644,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+80002,202001,100,7138,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80002,202002,100,1970,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80002,202003,100,2746,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+80003,202001,100,2846,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80003,202002,100,3552,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80003,202003,100,9015,R,1.711844725,1,71.90940767,4,0,4,false,true,false
+80004,202001,100,5820,R,1,1.646151294,69.14982578,0,4,4,true,false,false
+80004,202002,100,3729,R,0.607477577,0.584165132,42.00696864,4,4,4,false,false,false
+80004,202003,100,8233,R,1.711844725,1,71.90940767,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
index 1f6b4f10..0a6eb3e5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/09_R_NS_C_output.csv
@@ -1,12 +1,12 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-90001,202001,100,66,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false
-90001,202002,100,66,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
-90001,202003,100,66,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false
-90002,202001,100,27,1706,R,1,0.294381131,71.77777778,0,3,4,true,false,false
-90002,202002,100,27,1481,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
-90002,202003,100,27,8390,R,1.027612406,1,169.3831776,3,0,3,false,true,false
-90003,202001,100,14,1069,R,1,0.294381131,71.77777778,0,3,4,true,false,false
-90003,202002,100,14,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
-90003,202003,100,14,2415,R,1.027612406,1,169.3831776,3,0,3,false,true,false
-90004,202001,100,73,7728,R,1,0.294381131,71.77777778,0,3,4,true,false,false
-90004,202003,100,73,12364.971963,C,1.027612406,1,169.3831776,3,0,3,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+90001,202001,100,2417,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90001,202002,100,7928,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
+90001,202003,100,7319,R,1.027612406,1,169.3831776,3,0,3,false,true,false
+90002,202001,100,1706,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90002,202002,100,1481,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
+90002,202003,100,8390,R,1.027612406,1,169.3831776,3,0,3,false,true,false
+90003,202001,100,1069,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90003,202002,100,8228,R,3.396956857,0.973129552,164.8317757,3,3,3,false,false,false
+90003,202003,100,2415,R,1.027612406,1,169.3831776,3,0,3,false,true,false
+90004,202001,100,7728,R,1,0.294381131,71.77777778,0,3,4,true,false,false
+90004,202003,100,12364.971963,C,1.027612406,1,169.3831776,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
index 2a308b81..faea9048 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/10_C_FI_NS_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-100001,202001,100,26,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false
-100001,202002,100,26,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
-100001,202003,100,26,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
-100001,202004,100,26,3540,R,3.027849407,1,119.1751412,3,0,4,false,true,false
-100002,202001,100,19,8084,R,1,1.046156805,179.3296703,0,3,3,true,false,false
-100002,202002,100,19,2422,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
-100002,202003,100,19,3058,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
-100002,202004,100,19,5608,R,3.027849407,1,119.1751412,3,0,4,false,true,false
-100003,202001,100,46,5161,R,1,1.046156805,179.3296703,0,3,3,true,false,false
-100003,202002,100,46,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
-100003,202003,100,46,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
-100003,202004,100,46,2594,R,3.027849407,1,119.1751412,3,0,4,false,true,false
-100004,202001,100,86,15422.351648,C,1,1.046156805,179.3296703,0,3,3,true,false,false
-100004,202002,100,86,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
-100004,202004,100,86,9352,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+100001,202001,100,3074,R,1,1.046156805,179.3296703,0,3,3,true,false,false
+100001,202002,100,9529,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100001,202003,100,615,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
+100001,202004,100,3540,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+100002,202001,100,8084,R,1,1.046156805,179.3296703,0,3,3,true,false,false
+100002,202002,100,2422,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100002,202003,100,3058,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
+100002,202004,100,5608,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+100003,202001,100,5161,R,1,1.046156805,179.3296703,0,3,3,true,false,false
+100003,202002,100,3648,R,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100003,202003,100,205,R,0.24860568,0.330267416,42.61538462,3,3,3,false,false,false
+100003,202004,100,2594,R,3.027849407,1,119.1751412,3,0,4,false,true,false
+100004,202001,100,15422.351648,C,1,1.046156805,179.3296703,0,3,3,true,false,false
+100004,202002,100,14741.912088,FIC,0.95587965,4.022434244,171.4175824,3,3,3,false,false,false
+100004,202004,100,9352,R,3.027849407,1,119.1751412,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
index 7229f4fa..43dabef5 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/11_R_R_FI-BI_R_R_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-110001,202001,100,89,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false
-110001,202002,100,89,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
-110001,202003,100,89,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false
-110002,202001,100,83,4826,R,1,1.357646062,101.710317,0,4,4,true,false,false
-110002,202002,100,83,5903,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
-110002,202003,100,83,4743,R,0.780928323,1,70.26136364,3,0,3,false,true,false
-110003,202001,100,4,7586,R,1,1.357646062,101.710317,0,4,4,true,false,false
-110003,202002,100,4,1016,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
-110003,202003,100,4,1429,R,0.780928323,1,70.26136364,3,0,3,false,true,false
-110004,202001,100,76,3975,R,1,1.357646062,101.710317,0,4,4,true,false,false
-110004,202002,100,76,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
-110004,202003,100,76,2377.145816,FIR,0.780928323,1,70.26136364,3,0,3,false,true,false
-110005,202001,200,27,5217,R,1,1.016800862,182.25,0,3,3,true,false,false
-110005,202002,200,27,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
-110005,202003,200,27,9940,R,1.212689221,1,182.2366412,4,0,4,false,true,false
-110006,202001,200,42,5325,R,1,1.016800862,182.25,0,3,3,true,false,false
-110006,202002,200,42,7747,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
-110006,202003,200,42,6685,R,1.212689221,1,182.2366412,4,0,4,false,true,false
-110007,202001,200,19,5496,R,1,1.016800862,182.25,0,3,3,true,false,false
-110007,202002,200,19,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
-110007,202003,200,19,1235,R,1.212689221,1,182.2366412,4,0,4,false,true,false
-110008,202001,200,43,3978.741774,BI,1,1.016800862,182.25,0,3,3,true,false,false
-110008,202002,200,43,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
-110008,202003,200,43,6013,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,9244,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110001,202002,100,8916,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110001,202003,100,6194,R,0.780928323,1,70.26136364,3,0,3,false,true,false
+110002,202001,100,4826,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110002,202002,100,5903,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110002,202003,100,4743,R,0.780928323,1,70.26136364,3,0,3,false,true,false
+110003,202001,100,7586,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110003,202002,100,1016,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110003,202003,100,1429,R,0.780928323,1,70.26136364,3,0,3,false,true,false
+110004,202001,100,3975,R,1,1.357646062,101.710317,0,4,4,true,false,false
+110004,202002,100,3044,R,0.736568999,1.280527252,74.91666667,4,3,4,false,false,false
+110004,202003,100,2377.145816,FIR,0.780928323,1,70.26136364,3,0,3,false,true,false
+110005,202001,200,5217,R,1,1.016800862,182.25,0,3,3,true,false,false
+110005,202002,200,7016,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110005,202003,200,9940,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+110006,202001,200,5325,R,1,1.016800862,182.25,0,3,3,true,false,false
+110006,202002,200,7747,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110006,202003,200,6685,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+110007,202001,200,5496,R,1,1.016800862,182.25,0,3,3,true,false,false
+110007,202002,200,1010,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110007,202003,200,1235,R,1.212689221,1,182.2366412,4,0,4,false,true,false
+110008,202001,200,3978.741774,BI,1,1.016800862,182.25,0,3,3,true,false,false
+110008,202002,200,3913,R,0.983476743,0.82461358,150.2748092,3,4,4,false,false,false
+110008,202003,200,6013,R,1.212689221,1,182.2366412,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
index 142c8ded..2f2be5b4 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/12_C_FI_FI_FI_FI_output.csv
@@ -1,21 +1,21 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-120001,202001,100,50,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false
-120001,202002,100,50,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
-120001,202003,100,50,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
-120001,202004,100,50,4475,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
-120001,202005,100,50,1316,R,0.53449544,1,32.73423423,3,0,3,false,true,false
-120002,202001,100,78,7410,R,1,1.268552019,77.38738739,0,3,3,true,false,false
-120002,202002,100,78,3602,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
-120002,202003,100,78,4972,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
-120002,202004,100,78,8838,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
-120002,202005,100,78,1535,R,0.53449544,1,32.73423423,3,0,3,false,true,false
-120003,202001,100,94,4530,R,1,1.268552019,77.38738739,0,3,3,true,false,false
-120003,202002,100,94,7451,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
-120003,202003,100,94,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
-120003,202004,100,94,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
-120003,202005,100,94,4416,R,0.53449544,1,32.73423423,3,0,3,false,true,false
-120004,202001,100,100,7738.738739,C,1,1.268552019,77.38738739,0,3,3,true,false,false
-120004,202002,100,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
-120004,202003,100,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
-120004,202004,100,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
-120004,202005,100,100,3273.423424,FIC,0.53449544,1,32.73423423,3,0,3,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+120001,202001,100,5240,R,1,1.268552019,77.38738739,0,3,3,true,false,false
+120001,202002,100,2490,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120001,202003,100,3382,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120001,202004,100,4475,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120001,202005,100,1316,R,0.53449544,1,32.73423423,3,0,3,false,true,false
+120002,202001,100,7410,R,1,1.268552019,77.38738739,0,3,3,true,false,false
+120002,202002,100,3602,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120002,202003,100,4972,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120002,202004,100,8838,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120002,202005,100,1535,R,0.53449544,1,32.73423423,3,0,3,false,true,false
+120003,202001,100,4530,R,1,1.268552019,77.38738739,0,3,3,true,false,false
+120003,202002,100,7451,R,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120003,202003,100,7586,R,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120003,202004,100,283,R,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120003,202005,100,4416,R,0.53449544,1,32.73423423,3,0,3,false,true,false
+120004,202001,100,7738.738739,C,1,1.268552019,77.38738739,0,3,3,true,false,false
+120004,202002,100,6100.450451,FIC,0.788300349,0.849623589,61.0045045,3,3,3,false,false,false
+120004,202003,100,7180.180181,FIC,1.176991804,1.172403648,71.8018018,3,3,3,false,false,false
+120004,202004,100,6124.324325,FIC,0.852948557,1.870923352,61.24324324,3,3,3,false,false,false
+120004,202005,100,3273.423424,FIC,0.53449544,1,32.73423423,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
index cad00886..8b5fb6b3 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/13_R_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-130001,202001,100,20,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false
-130001,202002,100,20,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
-130001,202003,100,20,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
-130001,202004,100,20,6743,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
-130001,202005,100,20,6811,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
-130001,202006,100,20,9896,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
-130001,202007,100,20,3282,R,0.798832987,1,158.7757576,3,0,4,false,true,false
-130002,202001,100,69,687,R,1,0.6743401,102.7515152,0,3,4,true,false,false
-130002,202002,100,69,8987,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
-130002,202003,100,69,371,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
-130002,202004,100,69,3385,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
-130002,202005,100,69,6606,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
-130002,202006,100,69,5901,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
-130002,202007,100,69,9834,R,0.798832987,1,158.7757576,3,0,4,false,true,false
-130003,202001,100,39,7113,R,1,0.6743401,102.7515152,0,3,4,true,false,false
-130003,202002,100,39,8583,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
-130003,202003,100,39,5129,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
-130003,202004,100,39,2024,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
-130003,202005,100,39,9422,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
-130003,202006,100,39,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
-130003,202007,100,39,6461,R,0.798832987,1,158.7757576,3,0,4,false,true,false
-130004,202001,100,37,2571,R,1,0.6743401,102.7515152,0,3,4,true,false,false
-130004,202002,100,37,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
-130004,202003,100,37,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
-130004,202005,100,37,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
-130004,202006,100,37,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
-130004,202007,100,37,6621,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+130001,202001,100,6583,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130001,202002,100,3759,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130001,202003,100,8256,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130001,202004,100,6743,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
+130001,202005,100,6811,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130001,202006,100,9896,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130001,202007,100,3282,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+130002,202001,100,687,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130002,202002,100,8987,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130002,202003,100,371,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130002,202004,100,3385,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
+130002,202005,100,6606,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130002,202006,100,5901,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130002,202007,100,9834,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+130003,202001,100,7113,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130003,202002,100,8583,R,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130003,202003,100,5129,R,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130003,202004,100,2024,R,0.883396336,0.532072332,94.9375,3,3,3,false,false,false
+130003,202005,100,9422,R,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130003,202006,100,8710,R,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130003,202007,100,6461,R,0.798832987,1,158.7757576,3,0,4,false,true,false
+130004,202001,100,2571,R,1,0.6743401,102.7515152,0,3,4,true,false,false
+130004,202002,100,3812.616214,FIR,1.482931238,1.550523408,166.6328125,3,3,3,false,false,false
+130004,202003,100,2458.922061,FIR,0.644943504,1.131994733,107.46875,3,3,3,false,false,false
+130004,202005,100,7724.218164,BI,1.879443713,0.931937814,178.4296875,3,3,3,false,false,false
+130004,202006,100,8288.340757,BI,1.07303297,1.251826122,191.4609375,3,3,3,false,false,false
+130004,202007,100,6621,R,0.798832987,1,158.7757576,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
index c4fffd80..1c15eb7e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/14_C_FI_FI_NS_BI_BI_R_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false
-140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
-140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
-140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
-140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
-140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
-140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
-140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false
-140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
-140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
-140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
-140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
-140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
-140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
-140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false
-140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
-140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
-140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
-140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
-140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
-140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
-140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false
-140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
-140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
-140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
-140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
-140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+140001,202001,100,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false
+140001,202002,100,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140001,202003,100,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140001,202004,100,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
+140001,202005,100,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140001,202006,100,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140001,202007,100,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+140002,202001,100,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false
+140002,202002,100,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140002,202003,100,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140002,202004,100,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
+140002,202005,100,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140002,202006,100,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140002,202007,100,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+140003,202001,100,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false
+140003,202002,100,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140003,202003,100,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140003,202004,100,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false
+140003,202005,100,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140003,202006,100,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140003,202007,100,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
+140004,202001,100,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false
+140004,202002,100,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false
+140004,202003,100,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false
+140004,202005,100,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false
+140004,202006,100,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false
+140004,202007,100,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
index d05857f5..7f0640cc 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/15_BI_BI_R_NS_R_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false
-150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
-150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
-150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
-150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
-150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
-150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false
-150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false
-150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
-150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
-150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
-150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
-150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
-150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false
-150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false
-150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
-150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
-150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
-150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
-150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
-150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false
-150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false
-150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
-150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
-150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
-150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
-150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+150001,202001,100,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false
+150001,202002,100,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150001,202003,100,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150001,202004,100,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
+150001,202005,100,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150001,202006,100,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150001,202007,100,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false
+150002,202001,100,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false
+150002,202002,100,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150002,202003,100,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150002,202004,100,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
+150002,202005,100,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150002,202006,100,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150002,202007,100,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false
+150003,202001,100,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false
+150003,202002,100,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150003,202003,100,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150003,202004,100,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false
+150003,202005,100,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150003,202006,100,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150003,202007,100,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false
+150004,202001,100,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false
+150004,202002,100,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false
+150004,202003,100,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false
+150004,202005,100,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false
+150004,202006,100,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false
+150004,202007,100,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
index e5d1b61a..374eb64d 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/16_BI_BI_R_NS_C_FI_FI_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-160001,202001,100,76,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false
-160001,202002,100,76,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
-160001,202003,100,76,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
-160001,202004,100,76,3600,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
-160001,202005,100,76,6317,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
-160001,202006,100,76,5703,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
-160001,202007,100,76,1666,R,0.819547983,1,71.77202073,3,0,3,false,true,false
-160002,202001,100,32,430,R,1,0.285048351,29.78238342,0,3,3,true,false,false
-160002,202002,100,32,9669,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
-160002,202003,100,32,1748,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
-160002,202004,100,32,2380,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
-160002,202005,100,32,7871,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
-160002,202006,100,32,8806,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
-160002,202007,100,32,2678,R,0.819547983,1,71.77202073,3,0,3,false,true,false
-160003,202001,100,85,3232,R,1,0.285048351,29.78238342,0,3,3,true,false,false
-160003,202002,100,85,6342,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
-160003,202003,100,85,2988,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
-160003,202004,100,85,860,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
-160003,202005,100,85,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
-160003,202006,100,85,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
-160003,202007,100,85,9508,R,0.819547983,1,71.77202073,3,0,3,false,true,false
-160004,202001,100,33,1022.611409,BI,1,0.285048351,29.78238342,0,3,3,true,false,false
-160004,202002,100,33,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
-160004,202003,100,33,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
-160004,202005,100,33,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
-160004,202006,100,33,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
-160004,202007,100,33,2368.476683,FIC,0.819547983,1,71.77202073,3,0,3,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+160001,202001,100,2086,R,1,0.285048351,29.78238342,0,3,3,true,false,false
+160001,202002,100,4154,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160001,202003,100,1610,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160001,202004,100,3600,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
+160001,202005,100,6317,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160001,202006,100,5703,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160001,202007,100,1666,R,0.819547983,1,71.77202073,3,0,3,false,true,false
+160002,202001,100,430,R,1,0.285048351,29.78238342,0,3,3,true,false,false
+160002,202002,100,9669,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160002,202003,100,1748,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160002,202004,100,2380,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
+160002,202005,100,7871,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160002,202006,100,8806,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160002,202007,100,2678,R,0.819547983,1,71.77202073,3,0,3,false,true,false
+160003,202001,100,3232,R,1,0.285048351,29.78238342,0,3,3,true,false,false
+160003,202002,100,6342,R,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160003,202003,100,2988,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160003,202004,100,860,R,1.077844311,0.292120436,35.44041451,3,3,3,false,false,false
+160003,202005,100,9227,R,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160003,202006,100,2393,R,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160003,202007,100,9508,R,0.819547983,1,71.77202073,3,0,3,false,true,false
+160004,202001,100,1022.611409,BI,1,0.285048351,29.78238342,0,3,3,true,false,false
+160004,202002,100,3587.501576,BI,3.508176757,3.177592184,104.4818653,3,3,3,false,false,false
+160004,202003,100,1129,R,0.314703695,0.927777778,33.07522124,3,3,4,false,false,false
+160004,202005,100,4003.601036,C,3.423245614,1.385339013,121.3212435,3,3,3,false,false,false
+160004,202006,100,2889.979274,FIC,0.721844971,1.220184811,87.57512953,3,3,3,false,false,false
+160004,202007,100,2368.476683,FIC,0.819547983,1,71.77202073,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
index 5fe2932e..eaf80f21 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/17_NS_R_FI_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-170001,202001,100,69,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false
-170001,202002,100,69,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
-170001,202003,100,69,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
-170001,202004,100,69,7120,R,1.231814548,1,109.0330189,3,0,3,false,true,false
-170002,202001,100,62,449,R,1,0.41470355,41.93396226,0,3,3,true,false,false
-170002,202002,100,62,3692,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
-170002,202003,100,62,8401,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
-170002,202004,100,62,6745,R,1.231814548,1,109.0330189,3,0,3,false,true,false
-170003,202001,100,81,1961,R,1,0.41470355,41.93396226,0,3,3,true,false,false
-170003,202002,100,81,7833,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
-170003,202003,100,81,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
-170003,202004,100,81,9250,R,1.231814548,1,109.0330189,3,0,3,false,true,false
-170004,202002,100,9,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
-170004,202003,100,9,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+170001,202001,100,6480,R,1,0.41470355,41.93396226,0,3,3,true,false,false
+170001,202002,100,9912,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170001,202003,100,603,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+170001,202004,100,7120,R,1.231814548,1,109.0330189,3,0,3,false,true,false
+170002,202001,100,449,R,1,0.41470355,41.93396226,0,3,3,true,false,false
+170002,202002,100,3692,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170002,202003,100,8401,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+170002,202004,100,6745,R,1.231814548,1,109.0330189,3,0,3,false,true,false
+170003,202001,100,1961,R,1,0.41470355,41.93396226,0,3,3,true,false,false
+170003,202002,100,7833,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170003,202003,100,9761,R,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
+170003,202004,100,9250,R,1.231814548,1,109.0330189,3,0,3,false,true,false
+170004,202002,100,3913,R,2.41136108,1.142392752,114.7058824,3,3,4,false,false,false
+170004,202003,100,3425.266828,FIR,0.875355693,0.811810513,88.51415094,3,3,3,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
index e0438275..7f6935ce 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/18_NS_BI_R_NS_output.csv
@@ -1,15 +1,15 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-180001,202001,100,91,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false
-180001,202002,100,91,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
-180001,202003,100,91,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
-180001,202004,100,91,9291,R,1.709926945,1,175.5441176,3,0,3,false,true,false
-180002,202001,100,26,3829,R,1,0.743721487,123.4632353,0,3,3,true,false,false
-180002,202002,100,26,7588,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
-180002,202003,100,26,7335,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
-180002,202004,100,26,8415,R,1.709926945,1,175.5441176,3,0,3,false,true,false
-180003,202001,100,19,3774,R,1,0.743721487,123.4632353,0,3,3,true,false,false
-180003,202002,100,19,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
-180003,202003,100,19,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
-180003,202004,100,19,6168,R,1.709926945,1,175.5441176,3,0,3,false,true,false
-180004,202002,100,26,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
-180004,202003,100,26,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+180001,202001,100,9188,R,1,0.743721487,123.4632353,0,3,3,true,false,false
+180001,202002,100,6853,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180001,202003,100,2418,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+180001,202004,100,9291,R,1.709926945,1,175.5441176,3,0,3,false,true,false
+180002,202001,100,3829,R,1,0.743721487,123.4632353,0,3,3,true,false,false
+180002,202002,100,7588,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180002,202003,100,7335,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+180002,202004,100,8415,R,1.709926945,1,175.5441176,3,0,3,false,true,false
+180003,202001,100,3774,R,1,0.743721487,123.4632353,0,3,3,true,false,false
+180003,202002,100,8136,R,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180003,202003,100,4209,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
+180003,202004,100,6168,R,1.709926945,1,175.5441176,3,0,3,false,true,false
+180004,202002,100,9862.277826,BI,1.344589363,1.617031944,166.0073529,3,3,3,false,false,false
+180004,202003,100,6099,R,0.618416973,0.584820307,123.8333333,3,3,4,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
index 964ccb69..3c8dccd0 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
-190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
-190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
-190001,202004,100,95,1.113,1,110.5473,4350,R,0,0,0,false,true,false
-190002,202001,100,17,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
-190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
-190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
-190002,202004,100,17,1.113,1,110.5473,700,R,0,0,0,false,true,false
-190003,202001,100,64,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
-190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
-190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
-190003,202004,100,64,1.113,1,110.5473,4077,R,0,0,0,false,true,false
-190004,202001,100,51,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
-190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
-190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
-190004,202004,100,51,1.113,1,110.5473,8608,R,0,0,0,false,true,false
-190005,202001,100,34,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
-190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
-190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
-190005,202004,100,34,1.113,1,110.5473,5134,R,0,0,0,false,true,false
-190006,202001,100,8,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
-190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
-190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
-190006,202004,100,8,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
\ No newline at end of file
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
+190001,202002,100,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
+190001,202003,100,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
+190001,202004,100,1.113,1,110.5473,4350,R,0,0,0,false,true,false
+190002,202001,100,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190002,202002,100,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
+190002,202003,100,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
+190002,202004,100,1.113,1,110.5473,700,R,0,0,0,false,true,false
+190003,202001,100,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
+190003,202002,100,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
+190003,202003,100,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
+190003,202004,100,1.113,1,110.5473,4077,R,0,0,0,false,true,false
+190004,202001,100,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
+190004,202002,100,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
+190004,202003,100,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
+190004,202004,100,1.113,1,110.5473,8608,R,0,0,0,false,true,false
+190005,202001,100,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
+190005,202002,100,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
+190005,202003,100,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
+190005,202004,100,1.113,1,110.5473,5134,R,0,0,0,false,true,false
+190006,202001,100,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
+190006,202002,100,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
+190006,202003,100,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
+190006,202004,100,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
index 6ef80126..6ad6ce33 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/20_mixed_data_output.csv
@@ -1,48 +1,48 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false
-200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false
-200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false
-200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false
-200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false
-200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false
-200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false
-200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false
-200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false
-200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false
-200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false
-200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
-200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
-200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false
-200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false
-200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
-200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false
-200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false
-200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
-200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false
-200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false
-200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
-200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false
-200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false
-200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
-200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false
-200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false
-200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false
-200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false
-200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
-200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
-200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+200001,202001,100,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200001,202002,100,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200001,202003,100,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200001,202004,100,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200002,202001,100,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200002,202002,100,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200002,202003,100,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200002,202004,100,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200003,202001,100,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200003,202002,100,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200003,202003,100,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200003,202004,100,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200004,202001,100,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false
+200004,202002,100,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200004,202003,100,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200004,202004,100,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false
+200005,202001,100,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false
+200005,202002,100,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200005,202003,100,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200005,202004,100,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false
+200006,202001,100,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false
+200006,202002,100,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false
+200006,202003,100,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false
+200006,202004,100,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false
+200007,202001,200,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200007,202002,200,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200007,202003,200,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200007,202004,200,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false
+200008,202001,200,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200008,202002,200,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200008,202003,200,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200008,202004,200,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false
+200009,202001,200,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200009,202002,200,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200009,202003,200,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200009,202004,200,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false
+200010,202001,200,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false
+200010,202002,200,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200010,202003,200,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200010,202004,200,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false
+200011,202001,200,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false
+200011,202002,200,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200011,202004,200,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false
+200012,202001,200,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false
+200012,202002,200,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false
+200012,202003,200,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false
+200012,202004,200,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
index 06c408bb..b63e05f8 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/21_class_change_R_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,13.17948717,381,R,0,2,3,true,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
-10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
-10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false
-10005,202001,1,18,1,0.992513369,13.17948717,100,R,0,2,3,true,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false
-10005,202003,2,18,1.173184358,1,50,900.0000004,FIC,2,0,2,false,true,false
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,1,0.992513369,13.17948717,547,R,0,2,3,true,false,false
+10001,202002,1,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,1,0.992513369,13.17948717,381,R,0,2,3,true,false,false
+10002,202002,1,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,1.173184358,1,50,314,R,2,0,2,false,true,false
+10004,202001,2,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,1.173184358,1,50,736,R,2,0,2,false,true,false
+10005,202001,1,1,0.992513369,13.17948717,100,R,0,2,3,true,false,false
+10005,202002,2,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false
+10005,202003,2,1.173184358,1,50,900.0000004,FIC,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
index cb4a0209..ee37bff4 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/22_class_change_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
-10003,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
-10004,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false
-10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
+10001,202002,1,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
+10002,202002,1,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false
+10004,202001,2,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false
+10005,202001,1,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
+10005,202002,2,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false
+10005,202003,2,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
index e5653547..e1109a44 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/23_class_change_C_C_FI_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
-10003,202003,2,12,1.173184358,1,50,314,R,2,0,2,false,true,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
-10004,202003,2,9,1.173184358,1,50,736,R,2,0,2,false,true,false
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false
-10005,202003,2,18,1.173184358,1,50,900,FIC,2,0,2,false,true,false
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
+10001,202002,1,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
+10002,202002,1,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,1.173184358,1,50,314,R,2,0,2,false,true,false
+10004,202001,2,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,1.173184358,1,50,736,R,2,0,2,false,true,false
+10005,202001,1,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
+10005,202002,2,0.590369393,0.852380952,42.61904762,767.1428572,C,2,2,2,false,false,false
+10005,202003,2,1.173184358,1,50,900,FIC,2,0,2,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
index 6b5489da..749988a6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/24_class_change_R_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10003,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
-10003,202003,2,12,1.173184358,1,30.76923077,314,R,2,0,3,false,true,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10004,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
-10004,202003,2,9,1.173184358,1,30.76923077,736,R,2,0,3,false,true,false
-10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false
-10005,202003,2,18,1.173184358,1,30.76923077,150,R,2,0,3,false,true,false
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false
+10001,202002,1,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false
+10002,202002,1,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10003,202003,2,1.173184358,1,30.76923077,314,R,2,0,3,false,true,false
+10004,202001,2,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10004,202003,2,1.173184358,1,30.76923077,736,R,2,0,3,false,true,false
+10005,202001,1,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false
+10005,202002,2,0.590369393,0.852380952,42.61904762,127.8571428,BI,2,2,2,false,false,false
+10005,202003,2,1.173184358,1,30.76923077,150,R,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
index 5cc9e504..e406d5f1 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/25_class_change_C_FI_FI_output.csv
@@ -1,22 +1,22 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false
-10001,202002,1,10,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false
-10002,202002,1,50,1.007543103,0.843101894,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10003,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10003,202002,2,12,0.590369393,0.934108527131783,30.8974359,267,R,2,3,3,false,false,false
-10003,202003,2,12,1.070539419,1,33.07692308,314,R,3,0,3,false,true,false
-10004,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10004,202002,2,9,0.590369393,0.934108527131783,30.8974359,628,R,2,3,3,false,false,false
-10004,202003,2,9,1.070539419,1,33.07692308,736,R,3,0,3,false,true,false
-10005,202001,1,18,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false
-10005,202002,2,18,0.590369393,0.934108527131783,30.8974359,310,R,2,3,3,false,false,false
-10005,202003,2,18,1.070539419,1,33.07692308,240,R,3,0,3,false,true,false
-10006,202001,1,22,1,0.992513369,13.17948718,289.948718,C,0,2,3,true,false,false
-10006,202002,1,22,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false
-10006,202003,1,22,1.186096257,1,18.48333333,346.5012157,FIC,2,0,2,false,true,false
-10007,202001,2,52,1,1.693854749,72.19047619,3753.904762,C,0,2,2,true,false,false
-10007,202002,2,52,0.590369393,0.934108527131783,30.8974359,2216.190476,FIC,2,3,3,false,false,false
-10007,202003,2,52,1.070539419,1,33.07692308,2372.519265,FIC,3,0,3,false,true,false
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,1,0.992513369,13.17948718,547,R,0,2,3,true,false,false
+10001,202002,1,1.007543103,0.843101894,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,1,0.992513369,13.17948718,381,R,0,2,3,true,false,false
+10002,202002,1,1.007543103,0.843101894,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10003,202001,2,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10003,202002,2,0.590369393,0.934108527131783,30.8974359,267,R,2,3,3,false,false,false
+10003,202003,2,1.070539419,1,33.07692308,314,R,3,0,3,false,true,false
+10004,202001,2,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10004,202002,2,0.590369393,0.934108527131783,30.8974359,628,R,2,3,3,false,false,false
+10004,202003,2,1.070539419,1,33.07692308,736,R,3,0,3,false,true,false
+10005,202001,1,1,0.992513369,13.17948718,100,R,0,2,3,true,false,false
+10005,202002,2,0.590369393,0.934108527131783,30.8974359,310,R,2,3,3,false,false,false
+10005,202003,2,1.070539419,1,33.07692308,240,R,3,0,3,false,true,false
+10006,202001,1,1,0.992513369,13.17948718,289.948718,C,0,2,3,true,false,false
+10006,202002,1,1.007543103,0.843101894,15.58333333,292.135831,FIC,2,2,2,false,false,false
+10006,202003,1,1.186096257,1,18.48333333,346.5012157,FIC,2,0,2,false,true,false
+10007,202001,2,1,1.693854749,72.19047619,3753.904762,C,0,2,2,true,false,false
+10007,202002,2,0.590369393,0.934108527131783,30.8974359,2216.190476,FIC,2,3,3,false,false,false
+10007,202003,2,1.070539419,1,33.07692308,2372.519265,FIC,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 0ce8d727..12afeabf 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-140001,202001,100,27,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
-140001,202002,100,27,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
-140001,202003,100,27,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
-140001,202004,100,27,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
-140001,202005,100,27,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
-140001,202006,100,27,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
-140001,202007,100,27,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140002,202001,100,83,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
-140002,202002,100,83,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
-140002,202003,100,83,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
-140002,202004,100,83,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
-140002,202005,100,83,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
-140002,202006,100,83,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
-140002,202007,100,83,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140003,202001,100,89,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
-140003,202002,100,89,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
-140003,202003,100,89,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
-140003,202004,100,89,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
-140003,202005,100,89,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
-140003,202006,100,89,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
-140003,202007,100,89,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140004,202001,100,28,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
-140004,202002,100,28,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
-140004,202003,100,28,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
-140004,202005,100,28,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
-140004,202006,100,28,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
-140004,202007,100,28,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140005,202001,100,85,150000,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140005,202002,100,85,180000,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140005,202003,100,85,120000,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140005,202004,100,85,115000,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140005,202005,100,85,105000,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140005,202006,100,85,110000,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140005,202007,100,85,160000,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
-140006,202001,100,71,3346.63316582915,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
-140006,202002,100,71,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
-140006,202003,100,71,4447.66834170854,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
-140006,202004,100,71,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,
-140006,202005,100,71,4517.95477386935,FIC,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
-140006,202006,100,71,9023.06532663316,FIC,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
-140006,202007,100,71,4837.63316582914,FIC,0.536140767,1,91.6387665198238,3,0,4,false,true,false,
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
+140001,202001,100,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
+140001,202002,100,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
+140001,202003,100,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
+140001,202004,100,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
+140001,202005,100,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
+140001,202006,100,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
+140001,202007,100,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140002,202001,100,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
+140002,202002,100,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
+140002,202003,100,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
+140002,202004,100,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
+140002,202005,100,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
+140002,202006,100,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
+140002,202007,100,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140003,202001,100,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
+140003,202002,100,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
+140003,202003,100,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
+140003,202004,100,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
+140003,202005,100,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
+140003,202006,100,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
+140003,202007,100,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140004,202001,100,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
+140004,202002,100,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
+140004,202003,100,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
+140004,202005,100,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
+140004,202006,100,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
+140004,202007,100,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
+140005,202001,100,150000,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
+140005,202002,100,180000,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
+140005,202003,100,120000,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
+140005,202004,100,115000,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
+140005,202005,100,105000,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
+140005,202006,100,110000,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
+140005,202007,100,160000,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
+140006,202001,100,3346.63316582915,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
+140006,202002,100,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
+140006,202003,100,4447.66834170854,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
+140006,202004,100,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,
+140006,202005,100,4517.95477386935,FIC,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
+140006,202006,100,9023.06532663316,FIC,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
+140006,202007,100,4837.63316582914,FIC,0.536140767,1,91.6387665198238,3,0,4,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index cc8ca7bd..7c921b74 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-150001,202001,100,15,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
-150001,202002,100,15,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
-150001,202003,100,15,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150001,202004,100,15,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
-150001,202005,100,15,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150001,202006,100,15,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
-150001,202007,100,15,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
-150002,202001,100,5,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
-150002,202002,100,5,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
-150002,202003,100,5,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150002,202004,100,5,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
-150002,202005,100,5,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150002,202006,100,5,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
-150002,202007,100,5,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
-150003,202001,100,79,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
-150003,202002,100,79,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
-150003,202003,100,79,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150003,202004,100,79,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
-150003,202005,100,79,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150003,202006,100,79,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
-150003,202007,100,79,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
-150004,202001,100,69,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,
-150004,202002,100,69,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
-150004,202003,100,69,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150004,202005,100,69,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150004,202006,100,69,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
-150004,202007,100,69,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,
-150005,202001,100,85,150000,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150005,202002,100,85,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150005,202003,100,85,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150005,202004,100,85,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150006,202005,100,85,105000,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150006,202006,100,85,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150006,202007,100,85,125000,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
-150007,202001,100,71,12857.4545454545,C,1,0.887085601,181.0909091,0,3,3,true,false,false,
-150007,202002,100,71,14494.0404040404,FIC,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
-150007,202003,100,71,10188.8585858586,FIC,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,
-150007,202004,100,71,13914.5656565657,FIC,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,
-150007,202005,100,71,13021.6868686869,FIC,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,
-150007,202006,100,71,7607.75757575758,FIC,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
-150007,202007,100,71,10830.0101010101,FIC,1.423548265,1,152.5353535,3,0,3,false,true,false,
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
+150001,202001,100,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
+150001,202002,100,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
+150001,202003,100,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150001,202004,100,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
+150001,202005,100,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150001,202006,100,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
+150001,202007,100,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
+150002,202001,100,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
+150002,202002,100,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
+150002,202003,100,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150002,202004,100,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
+150002,202005,100,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150002,202006,100,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
+150002,202007,100,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
+150003,202001,100,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
+150003,202002,100,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
+150003,202003,100,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150003,202004,100,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
+150003,202005,100,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150003,202006,100,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
+150003,202007,100,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
+150004,202001,100,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,
+150004,202002,100,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
+150004,202003,100,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
+150004,202005,100,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
+150004,202006,100,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
+150004,202007,100,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,
+150005,202001,100,150000,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
+150005,202002,100,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
+150005,202003,100,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
+150005,202004,100,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
+150006,202005,100,105000,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
+150006,202006,100,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
+150006,202007,100,125000,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
+150007,202001,100,12857.4545454545,C,1,0.887085601,181.0909091,0,3,3,true,false,false,
+150007,202002,100,14494.0404040404,FIC,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
+150007,202003,100,10188.8585858586,FIC,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,
+150007,202004,100,13914.5656565657,FIC,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,
+150007,202005,100,13021.6868686869,FIC,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,
+150007,202006,100,7607.75757575758,FIC,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
+150007,202007,100,10830.0101010101,FIC,1.423548265,1,152.5353535,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
index 3992370f..15f5df4e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,95,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
-190001,202002,100,95,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
-190001,202003,100,95,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
-190001,202004,100,95,1.113,1,110.5473,4350,R,0,0,0,false,true,false
-190002,202001,100,17,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
-190002,202002,100,17,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
-190002,202003,100,17,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
-190002,202004,100,17,1.113,1,110.5473,700,R,0,0,0,false,true,false
-190003,202001,100,64,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
-190003,202002,100,64,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
-190003,202003,100,64,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
-190003,202004,100,64,1.113,1,110.5473,4077,R,0,0,0,false,true,false
-190004,202001,100,51,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
-190004,202002,100,51,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
-190004,202003,100,51,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
-190004,202004,100,51,1.113,1,110.5473,8608,R,0,0,0,false,true,false
-190005,202001,100,34,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
-190005,202002,100,34,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
-190005,202003,100,34,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
-190005,202004,100,34,1.113,1,110.5473,5134,R,0,0,0,false,true,false
-190006,202001,100,8,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
-190006,202002,100,8,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
-190006,202003,100,8,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
-190006,202004,100,8,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
-190007,202001,100,85,1,0.9214,50.3694,150000,R,0,0,0,true,false,false
-190007,202002,100,85,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false
-190007,202003,100,85,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false
-190007,202004,100,85,1.113,1,110.5473,180000,R,0,0,0,false,true,false
-190008,202001,100,71,1,0.9214,50.3694,3576.2274,C,0,0,0,true,false,false
-190008,202002,100,71,0.8521,1.5274,121.4187,3047.30336754,FIC,0,0,0,false,false,false
-190008,202003,100,71,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false
-190008,202004,100,71,1.113,1,110.5473,3284.81171565775,FIC,0,0,0,false,true,false
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+190001,202001,100,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
+190001,202002,100,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
+190001,202003,100,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
+190001,202004,100,1.113,1,110.5473,4350,R,0,0,0,false,true,false
+190002,202001,100,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190002,202002,100,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
+190002,202003,100,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
+190002,202004,100,1.113,1,110.5473,700,R,0,0,0,false,true,false
+190003,202001,100,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
+190003,202002,100,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
+190003,202003,100,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
+190003,202004,100,1.113,1,110.5473,4077,R,0,0,0,false,true,false
+190004,202001,100,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
+190004,202002,100,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
+190004,202003,100,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
+190004,202004,100,1.113,1,110.5473,8608,R,0,0,0,false,true,false
+190005,202001,100,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
+190005,202002,100,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
+190005,202003,100,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
+190005,202004,100,1.113,1,110.5473,5134,R,0,0,0,false,true,false
+190006,202001,100,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
+190006,202002,100,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
+190006,202003,100,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
+190006,202004,100,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
+190007,202001,100,1,0.9214,50.3694,150000,R,0,0,0,true,false,false
+190007,202002,100,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false
+190007,202003,100,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false
+190007,202004,100,1.113,1,110.5473,180000,R,0,0,0,false,true,false
+190008,202001,100,1,0.9214,50.3694,3576.2274,C,0,0,0,true,false,false
+190008,202002,100,0.8521,1.5274,121.4187,3047.30336754,FIC,0,0,0,false,false,false
+190008,202003,100,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false
+190008,202004,100,1.113,1,110.5473,3284.81171565775,FIC,0,0,0,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
index 49bf3b36..a4213739 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-200001,202001,100,56,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200001,202002,100,56,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200001,202003,100,56,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200001,202004,100,56,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200002,202001,100,75,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200002,202002,100,75,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200002,202003,100,75,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200002,202004,100,75,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200003,202001,100,10,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200003,202002,100,10,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200003,202003,100,10,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200003,202004,100,10,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200004,202001,100,86,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200004,202002,100,86,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200004,202003,100,86,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
-200004,202004,100,86,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,
-200005,202001,100,6,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
-200005,202002,100,6,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
-200005,202003,100,6,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
-200005,202004,100,6,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
-200006,202001,100,41,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,
-200006,202002,100,41,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
-200006,202003,100,41,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200006,202004,100,41,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200007,202001,200,4,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200007,202002,200,4,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200007,202003,200,4,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200007,202004,200,4,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
-200008,202001,200,4,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200008,202002,200,4,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200008,202003,200,4,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200008,202004,200,4,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
-200009,202001,200,45,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200009,202002,200,45,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200009,202003,200,45,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200009,202004,200,45,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
-200010,202001,200,85,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200010,202002,200,85,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200010,202003,200,85,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200010,202004,200,85,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200011,202001,200,79,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200011,202002,200,79,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200011,202004,200,79,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200012,202001,200,87,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200012,202002,200,87,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
-200012,202003,200,87,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
-200012,202004,200,87,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200013,202001,100,85,150000,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200013,202002,100,85,180000,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200013,202003,100,85,120000,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200013,202004,100,85,105000,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200014,202001,200,85,150000,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200014,202002,200,85,180000,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200014,202003,200,85,120000,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200014,202004,200,85,105000,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
-200015,202001,100,71,5086.03964757709,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
-200015,202002,100,71,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
-200015,202003,100,71,8555.95250872475,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
-200015,202004,100,71,2239.972874146,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
-200016,202001,200,71,9394.82142857143,C,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200016,202002,200,71,12675.438275,FIC,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
-200016,202003,200,71,14276.91768,FIC,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
-200016,202004,200,71,2970.550898,FIC,0.208066683,1,99.37735849,3,0,3,false,true,false,
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
+200001,202001,100,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200001,202002,100,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200001,202003,100,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200001,202004,100,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200002,202001,100,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200002,202002,100,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200002,202003,100,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200002,202004,100,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200003,202001,100,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200003,202002,100,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200003,202003,100,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200003,202004,100,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200004,202001,100,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
+200004,202002,100,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
+200004,202003,100,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
+200004,202004,100,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,
+200005,202001,100,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
+200005,202002,100,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
+200005,202003,100,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
+200005,202004,100,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
+200006,202001,100,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,
+200006,202002,100,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
+200006,202003,100,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
+200006,202004,100,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
+200007,202001,200,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200007,202002,200,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200007,202003,200,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200007,202004,200,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
+200008,202001,200,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200008,202002,200,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200008,202003,200,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200008,202004,200,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
+200009,202001,200,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200009,202002,200,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200009,202003,200,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200009,202004,200,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
+200010,202001,200,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
+200010,202002,200,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200010,202003,200,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
+200010,202004,200,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
+200011,202001,200,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
+200011,202002,200,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
+200011,202004,200,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,
+200012,202001,200,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
+200012,202002,200,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
+200012,202003,200,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
+200012,202004,200,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
+200013,202001,100,150000,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
+200013,202002,100,180000,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
+200013,202003,100,120000,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
+200013,202004,100,105000,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
+200014,202001,200,150000,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
+200014,202002,200,180000,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
+200014,202003,200,120000,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
+200014,202004,200,105000,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
+200015,202001,100,5086.03964757709,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
+200015,202002,100,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
+200015,202003,100,8555.95250872475,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
+200015,202004,100,2239.972874146,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
+200016,202001,200,9394.82142857143,C,1,0.741183163,132.3214286,0,3,4,true,false,false,
+200016,202002,200,12675.438275,FIC,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
+200016,202003,200,14276.91768,FIC,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
+200016,202004,200,2970.550898,FIC,0.208066683,1,99.37735849,3,0,3,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 98532b7b..42b103c9 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,other,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-10001,202001,1,10,547,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
-10001,202002,1,10,362,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
-10001,202003,1,10,895,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
-10002,202001,1,50,381,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
-10002,202002,1,50,573,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
-10002,202003,1,50,214,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
-10003,202001,2,12,961,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
-10003,202002,2,12,267,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
-10003,202003,2,12,314,1.173184358,1,50,R,2,0,2,false,true,false,true
-10004,202001,2,9,555,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
-10004,202002,2,9,628,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
-10004,202003,2,9,736,1.173184358,1,50,R,2,0,2,false,true,false,true
-10005,202001,1,18,278.4,1,0.992513369,15.46666667,C,0,2,2,true,false,false,
-10005,202002,2,18,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2,false,false,false,
-10005,202003,2,18,900,1.173184358,1,50,FIC,2,0,2,false,true,false,
-10006,202001,1,85,150000,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
-10006,202002,1,85,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
-10006,202003,1,85,120000,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
-10007,202001,1,71,1098.133333,1,0.992513369,15.46666667,C,0,2,2,true,false,false,
-10007,202002,1,71,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2,false,false,false,
-10007,202003,1,71,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,true,false,
-10008,202001,2,85,150000,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
-10008,202002,2,85,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
-10008,202003,2,85,120000,1.173184358,1,50,R,2,0,2,false,true,false,false
-10009,202001,2,71,5125.52381,1,1.693854749,72.19047619,C,0,2,2,true,false,false,
-10009,202002,2,71,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2,false,false,false,
-10009,202003,2,71,3550,1.173184358,1,50,FIC,2,0,2,false,true,false,
+identifier,date,group,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
+10001,202001,1,547,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
+10001,202002,1,362,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
+10001,202003,1,895,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
+10002,202001,1,381,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
+10002,202002,1,573,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
+10002,202003,1,214,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
+10003,202001,2,961,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
+10003,202002,2,267,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
+10003,202003,2,314,1.173184358,1,50,R,2,0,2,false,true,false,true
+10004,202001,2,555,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
+10004,202002,2,628,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
+10004,202003,2,736,1.173184358,1,50,R,2,0,2,false,true,false,true
+10005,202001,1,278.4,1,0.992513369,15.46666667,C,0,2,2,true,false,false,
+10005,202002,2,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2,false,false,false,
+10005,202003,2,900,1.173184358,1,50,FIC,2,0,2,false,true,false,
+10006,202001,1,150000,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
+10006,202002,1,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
+10006,202003,1,120000,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
+10007,202001,1,1098.133333,1,0.992513369,15.46666667,C,0,2,2,true,false,false,
+10007,202002,1,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2,false,false,false,
+10007,202003,1,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,true,false,
+10008,202001,2,150000,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
+10008,202002,2,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
+10008,202003,2,120000,1.173184358,1,50,R,2,0,2,false,true,false,false
+10009,202001,2,5125.52381,1,1.693854749,72.19047619,C,0,2,2,true,false,false,
+10009,202002,2,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2,false,false,false,
+10009,202003,2,3550,1.173184358,1,50,FIC,2,0,2,false,true,false,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
index c676f335..a94c0592 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/31_no_response_output.csv
@@ -1,31 +1,31 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-50001,202001,100,59,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false
-50001,202002,100,59,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false
-50001,202003,100,59,8542,FIR,1,1,1,0,0,0,true,true,true
-50001,202004,100,59,7769,R,1,1.161985911,538.03125,0,4,4,true,false,false
-50001,202005,100,59,4687,R,0.860595632,1,463.0273438,4,0,4,false,true,false
-50002,202001,100,36,4851,R,1,1.083783427,573.9125874,0,5,5,true,false,false
-50002,202002,100,36,8894,R,0.922693571,1,529.5454545,5,0,5,false,true,false
-50002,202003,100,36,8894,FIR,1,1,1,0,0,0,true,true,true
-50002,202004,100,36,3522,R,1,1.161985911,538.03125,0,4,4,true,false,false
-50002,202005,100,36,2327,R,0.860595632,1,463.0273438,4,0,4,false,true,false
-50003,202001,100,76,2238,R,1,1.083783427,573.9125874,0,5,5,true,false,false
-50003,202002,100,76,769,R,0.922693571,1,529.5454545,5,0,5,false,true,false
-50003,202003,100,76,769,FIR,1,1,1,0,0,0,true,true,true
-50003,202004,100,76,6445,R,1,1.161985911,538.03125,0,4,4,true,false,false
-50003,202005,100,76,1521,R,0.860595632,1,463.0273438,4,0,4,false,true,false
-50004,202001,100,30,688,R,1,1.083783427,573.9125874,0,5,5,true,false,false
-50004,202002,100,30,3245,R,0.922693571,1,529.5454545,5,0,5,false,true,false
-50004,202003,100,30,3245,FIR,1,1,1,0,0,0,true,true,true
-50004,202004,100,30,3245,FIR,1,1.161985911,538.03125,0,4,4,true,false,false
-50004,202005,100,30,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,true,false
-50005,202001,100,85,150000,R,1,1.083783427,573.9125874,0,5,5,true,false,false
-50005,202002,100,85,130000,R,0.922693571,1,529.5454545,5,0,5,false,true,false
-50005,202003,100,85,130000,FIR,1,1,1,0,0,0,true,true,true
-50005,202004,100,85,120000,R,1,1.161985911,538.03125,0,4,4,true,false,false
-50005,202005,100,85,110000,R,0.860595632,1,463.0273438,4,0,4,false,true,false
-50006,202001,100,71,40747.793706,C,1,1.083783427,573.9125874,0,5,5,true,false,false
-50006,202002,100,71,37597.727272,FIC,0.922693571,1,529.5454545,5,0,5,false,true,false
-50006,202003,100,71,37597.727272,FIC,1,1,1,0,0,0,true,true,true
-50006,202004,100,71,37597.727272,FIC,1,1.161985911,538.03125,0,4,4,true,false,false
-50006,202005,100,71,32356.439872,FIC,0.860595632,1,463.0273438,4,0,4,false,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+50001,202001,100,6362,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50001,202002,100,8542,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50001,202003,100,8542,FIR,1,1,1,0,0,0,true,true,true
+50001,202004,100,7769,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50001,202005,100,4687,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50002,202001,100,4851,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50002,202002,100,8894,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50002,202003,100,8894,FIR,1,1,1,0,0,0,true,true,true
+50002,202004,100,3522,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50002,202005,100,2327,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50003,202001,100,2238,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50003,202002,100,769,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50003,202003,100,769,FIR,1,1,1,0,0,0,true,true,true
+50003,202004,100,6445,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50003,202005,100,1521,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50004,202001,100,688,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50004,202002,100,3245,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50004,202003,100,3245,FIR,1,1,1,0,0,0,true,true,true
+50004,202004,100,3245,FIR,1,1.161985911,538.03125,0,4,4,true,false,false
+50004,202005,100,2792.632827,FIR,0.860595632,1,463.0273438,4,0,4,false,true,false
+50005,202001,100,150000,R,1,1.083783427,573.9125874,0,5,5,true,false,false
+50005,202002,100,130000,R,0.922693571,1,529.5454545,5,0,5,false,true,false
+50005,202003,100,130000,FIR,1,1,1,0,0,0,true,true,true
+50005,202004,100,120000,R,1,1.161985911,538.03125,0,4,4,true,false,false
+50005,202005,100,110000,R,0.860595632,1,463.0273438,4,0,4,false,true,false
+50006,202001,100,40747.793706,C,1,1.083783427,573.9125874,0,5,5,true,false,false
+50006,202002,100,37597.727272,FIC,0.922693571,1,529.5454545,5,0,5,false,true,false
+50006,202003,100,37597.727272,FIC,1,1,1,0,0,0,true,true,true
+50006,202004,100,37597.727272,FIC,1,1.161985911,538.03125,0,4,4,true,false,false
+50006,202005,100,32356.439872,FIC,0.860595632,1,463.0273438,4,0,4,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
index 9752700f..070fe42c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/32_divide_by_zero_output.csv
@@ -1,17 +1,17 @@
-identifier,date,group,other,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-1,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
-1,202002,1,1,20,R,2,1,20,2,1,2,false,true,false
-1,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false
-1,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false
-2,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
-2,202002,1,1,20,R,2,1,20,2,1,2,false,true,false
-2,202003,1,1,0,R,0,0,10,1,1,2,false,false,false
-2,202004,1,1,30,R,1,1,30,1,0,1,true,true,false
-3,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
-3,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false
-3,202003,1,1,20,R,0,0,10,1,1,2,false,false,false
-3,202004,1,1,20,FIR,1,1,30,1,0,1,true,true,false
-4,202001,1,1,10,R,1,0.5,10,0,2,4,true,false,false
-4,202002,1,1,20,FIR,2,1,20,2,1,2,false,true,false
-4,202003,1,1,0,FIR,0,0,10,1,1,2,false,false,false
-4,202004,1,1,0,FIR,1,1,30,1,0,1,true,true,false
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+1,202001,1,10,R,1,0.5,10,0,2,4,true,false,false
+1,202002,1,20,R,2,1,20,2,1,2,false,true,false
+1,202003,1,0,FIR,0,0,10,1,1,2,false,false,false
+1,202004,1,0,FIR,1,1,30,1,0,1,true,true,false
+2,202001,1,10,R,1,0.5,10,0,2,4,true,false,false
+2,202002,1,20,R,2,1,20,2,1,2,false,true,false
+2,202003,1,0,R,0,0,10,1,1,2,false,false,false
+2,202004,1,30,R,1,1,30,1,0,1,true,true,false
+3,202001,1,10,R,1,0.5,10,0,2,4,true,false,false
+3,202002,1,20,FIR,2,1,20,2,1,2,false,true,false
+3,202003,1,20,R,0,0,10,1,1,2,false,false,false
+3,202004,1,20,FIR,1,1,30,1,0,1,true,true,false
+4,202001,1,10,R,1,0.5,10,0,2,4,true,false,false
+4,202002,1,20,FIR,2,1,20,2,1,2,false,true,false
+4,202003,1,0,FIR,0,0,10,1,1,2,false,false,false
+4,202004,1,0,FIR,1,1,30,1,0,1,true,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
index ad46ad72..bb162f8d 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/33_multi_variable_C_BI_R_output.csv
@@ -1,16 +1,16 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
-10001,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
-10001,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
-10001,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false
-10002,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
-10002,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
-10002,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false
-10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+10001,202001,1,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false
+10001,202002,1,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false
+10001,202003,1,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false
+10002,202001,1,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false
+10002,202002,1,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false
+10002,202003,1,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false
+10001,202001,2,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false
+10001,202002,2,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false
+10001,202003,2,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false
+10002,202001,2,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false
+10002,202002,2,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false
+10002,202003,2,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false
+10005,202001,1,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false
+10005,202002,2,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false
+10005,202003,2,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_output.csv
index 7bc72170..99e3763d 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/34_multi_variable_C_BI_R_filtered_output.csv
@@ -1,18 +1,18 @@
-identifier,date,group,other,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next
-10001,202001,1,10,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true,,true
-10001,202002,1,10,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true,true,true
-10001,202003,1,10,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true,true,
-10002,202001,1,50,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,true,,true
-10002,202002,1,50,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true,true,true
-10002,202003,1,50,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true,true,
-10001,202001,2,12,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true,,true
-10001,202002,2,12,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true,true,true
-10001,202003,2,12,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false,true,true,
-10002,202001,2,9,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true,,true
-10002,202002,2,9,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true,true,true
-10002,202003,2,9,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false,true,true,
-10005,202001,1,18,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,,,
-10005,202002,2,18,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,,,
-10005,202003,2,18,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false,true,,
-10003,202001,1,16,1,0.992513369,15.46666667,0,R,0,2,2,true,false,false,false,,false
-10003,202002,1,16,1.007543103,0.843101893,15.58333333,0,R,2,2,2,false,false,false,false,false,
+identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next
+10001,202001,1,1,0.992513369,15.46666667,547,R,0,2,2,true,false,false,true,,true
+10001,202002,1,1.007543103,0.843101893,15.58333333,362,R,2,2,2,false,false,false,true,true,true
+10001,202003,1,1.186096257,1,18.48333333,895,R,2,0,2,false,true,false,true,true,
+10002,202001,1,1,0.992513369,15.46666667,381,R,0,2,2,true,false,false,true,,true
+10002,202002,1,1.007543103,0.843101893,15.58333333,573,R,2,2,2,false,false,false,true,true,true
+10002,202003,1,1.186096257,1,18.48333333,214,R,2,0,2,false,true,false,true,true,
+10001,202001,2,1,1.693854749,72.19047619,961,R,0,2,2,true,false,false,true,,true
+10001,202002,2,0.590369393,0.852380952,42.61904762,267,R,2,2,2,false,false,false,true,true,true
+10001,202003,2,1.173184358,1,29.48717949,314,R,2,0,3,false,true,false,true,true,
+10002,202001,2,1,1.693854749,72.19047619,555,R,0,2,2,true,false,false,true,,true
+10002,202002,2,0.590369393,0.852380952,42.61904762,628,R,2,2,2,false,false,false,true,true,true
+10002,202003,2,1.173184358,1,29.48717949,736,R,2,0,3,false,true,false,true,true,
+10005,202001,1,1,0.992513369,15.46666667,278.4000001,C,0,2,2,true,false,false,,,
+10005,202002,2,0.590369393,0.852380952,42.61904762,85.2380952,BI,2,2,2,false,false,false,,,
+10005,202003,2,1.173184358,1,29.48717949,100,R,2,0,3,false,true,false,true,,
+10003,202001,1,1,0.992513369,15.46666667,0,R,0,2,2,true,false,false,false,,false
+10003,202002,1,1.007543103,0.843101893,15.58333333,0,R,2,2,2,false,false,false,false,false,

From 38b969dfee7509d806b80d3f8507a4de78e19529 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 6 Jun 2023 11:57:44 +0100
Subject: [PATCH 399/531] 12.0.1-rc1 pyproject change

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index b3c2cab8..8f3770b7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.0"
+version = "12.0.1-rc1"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 41baf9a5f9b654c8d66aecf8ba6334ed0e76aabb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 9 Jun 2023 11:34:25 +0100
Subject: [PATCH 400/531] Clarify filter expression documentation

---
 statistical_methods_library/imputation/engine.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 2368550f..24f26d74 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -128,10 +128,11 @@ def impute(
           value was included in link calculations based on filtering for the
           next period.
         back_data_df: The back data data frame.
-        link_filter: An inclusive filter statement that specifies conditions
-          under which a responce can be used for ratio calculation. The link
-          inclusion marker columns will only be present in the output if this
-          is provided.
+        link_filter: An inclusive filter that specifies whether a responce
+          can be used for ratio calculation. The link inclusion marker
+          columns will only be present in the output if this is provided.
+          This filter is either a boolen column expression or a spark
+          sql string which yields a boolean result.
         periodicity: The periodicity of the data as used by the calculation
           functions in the `utilities.periods` module.
         unweighted_forward_link_col: The name of the column containing the

From b65ce529da278543227f40383835a72f785b31cd Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 12 Jun 2023 10:50:27 +0100
Subject: [PATCH 401/531] Support multiple versions of python

---
 .github/workflows/ci-checks.yaml   | 2 +-
 .github/workflows/release-code.yml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index fb2b059a..5e1a0540 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -8,7 +8,7 @@ jobs:
     strategy:
       max-parallel: 4
       matrix:
-        python-version: [3.7]
+        python-version: [3.7, 3.8, 3.9, 3.10]
         java-version: ['8']
       fail-fast: false 
     steps:
diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index 1f4d900e..e820d096 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -12,7 +12,7 @@ jobs:
     strategy:
       max-parallel: 4
       matrix:
-        python-version: [3.7]
+        python-version: [3.7, 3.8, 3.9, 3.10]
       fail-fast: false 
     steps:
       - uses: actions/checkout@v2

From 8c62d4488cab6d748ce0c257daefb3965b7bfb62 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 12 Jun 2023 10:54:13 +0100
Subject: [PATCH 402/531] Attempt to fix python version

---
 .github/workflows/ci-checks.yaml   | 2 +-
 .github/workflows/release-code.yml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 5e1a0540..dfe230d4 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -8,7 +8,7 @@ jobs:
     strategy:
       max-parallel: 4
       matrix:
-        python-version: [3.7, 3.8, 3.9, 3.10]
+        python-version: ['3.7', '3.8', '3.9', '3.10']
         java-version: ['8']
       fail-fast: false 
     steps:
diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index e820d096..f0211e81 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -12,7 +12,7 @@ jobs:
     strategy:
       max-parallel: 4
       matrix:
-        python-version: [3.7, 3.8, 3.9, 3.10]
+        python-version: ['3.7', '3.8', '3.9', '3.10']
       fail-fast: false 
     steps:
       - uses: actions/checkout@v2

From 1e10d0bd7d069b944edddb527de57dc41bb76ee0 Mon Sep 17 00:00:00 2001
From: Michael Candlin <29595780+kingmushroom@users.noreply.github.com>
Date: Mon, 12 Jun 2023 11:03:09 +0100
Subject: [PATCH 403/531] separate build and release

---
 .github/workflows/release-code.yml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index f0211e81..d9527cd4 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -6,8 +6,8 @@ on:
      - "*"
 
 jobs:
-  build-and-release:
-    name: Build and release artifact
+  build:
+    name: Build artifact
     runs-on: ubuntu-latest
     strategy:
       max-parallel: 4
@@ -26,11 +26,15 @@ jobs:
           poetry-version: 1.3.2
       - name: build
         run: poetry build
+  release:
+    name: release artifact
+    runs-on: ubuntu-latest
+    steps:
       - name: Create GitHub release
         uses: softprops/action-gh-release@v1
         with:
           files: |
             dist/*.whl
             dist/*.tar.gz
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+    env:
+      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

From 5db96d8b766ea6047e7d12b1a87967d403b20f1b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 12 Jun 2023 11:05:10 +0100
Subject: [PATCH 404/531] Actually add pyproject files

---
 poetry.lock    | 46 ++++++++++++++++++++++++----------------------
 pyproject.toml |  6 +++---
 2 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index e9817c3f..bc8a37ac 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -270,22 +270,22 @@ files = [
 
 [[package]]
 name = "platformdirs"
-version = "3.5.1"
+version = "3.5.3"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-3.5.1-py3-none-any.whl", hash = "sha256:e2378146f1964972c03c085bb5662ae80b2b8c06226c54b2ff4aa9483e8a13a5"},
-    {file = "platformdirs-3.5.1.tar.gz", hash = "sha256:412dae91f52a6f84830f39a8078cecd0e866cb72294a5c66808e74d5e88d251f"},
+    {file = "platformdirs-3.5.3-py3-none-any.whl", hash = "sha256:0ade98a4895e87dc51d47151f7d2ec290365a585151d97b4d8d6312ed6132fed"},
+    {file = "platformdirs-3.5.3.tar.gz", hash = "sha256:e48fabd87db8f3a7df7150a4a5ea22c546ee8bc39bc2473244730d4b56d2cc4e"},
 ]
 
 [package.dependencies]
-typing-extensions = {version = ">=4.5", markers = "python_version < \"3.8\""}
+typing-extensions = {version = ">=4.6.3", markers = "python_version < \"3.8\""}
 
 [package.extras]
-docs = ["furo (>=2023.3.27)", "proselint (>=0.13)", "sphinx (>=6.2.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"]
-test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"]
+docs = ["furo (>=2023.5.20)", "proselint (>=0.13)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"]
+test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)"]
 
 [[package]]
 name = "pluggy"
@@ -308,14 +308,14 @@ testing = ["pytest", "pytest-benchmark"]
 
 [[package]]
 name = "py4j"
-version = "0.10.9"
+version = "0.10.9.7"
 description = "Enables Python programs to dynamically access arbitrary Java objects"
 category = "main"
 optional = false
 python-versions = "*"
 files = [
-    {file = "py4j-0.10.9-py2.py3-none-any.whl", hash = "sha256:859ba728a7bb43e9c2bf058832759fb97a598bb28cc12f34f5fc4abdec08ede6"},
-    {file = "py4j-0.10.9.tar.gz", hash = "sha256:36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f"},
+    {file = "py4j-0.10.9.7-py2.py3-none-any.whl", hash = "sha256:85defdfd2b2376eb3abf5ca6474b51ab7e0de341c75a02f46dc9b5976f5a5c1b"},
+    {file = "py4j-0.10.9.7.tar.gz", hash = "sha256:0b6e5315bb3ada5cf62ac651d107bb2ebc02def3dee9d9548e3baac644ea8dbb"},
 ]
 
 [[package]]
@@ -344,33 +344,35 @@ files = [
 
 [[package]]
 name = "pyspark"
-version = "3.1.1"
+version = "3.4.0"
 description = "Apache Spark Python API"
 category = "main"
 optional = false
-python-versions = ">=3.6"
+python-versions = ">=3.7"
 files = [
-    {file = "pyspark-3.1.1.tar.gz", hash = "sha256:104abc146d4ffb72d4c683d25d7af5a6bf955d94590a76f542ee23185670aa7e"},
+    {file = "pyspark-3.4.0.tar.gz", hash = "sha256:167a23e11854adb37f8602de6fcc3a4f96fd5f1e323b9bb83325f38408c5aafd"},
 ]
 
 [package.dependencies]
-py4j = "0.10.9"
+py4j = "0.10.9.7"
 
 [package.extras]
-ml = ["numpy (>=1.7)"]
-mllib = ["numpy (>=1.7)"]
-sql = ["pandas (>=0.23.2)", "pyarrow (>=1.0.0)"]
+connect = ["googleapis-common-protos (>=1.56.4)", "grpcio (>=1.48.1)", "grpcio-status (>=1.48.1)", "numpy (>=1.15)", "pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
+ml = ["numpy (>=1.15)"]
+mllib = ["numpy (>=1.15)"]
+pandas-on-spark = ["numpy (>=1.15)", "pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
+sql = ["numpy (>=1.15)", "pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
 
 [[package]]
 name = "pytest"
-version = "7.3.1"
+version = "7.3.2"
 description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pytest-7.3.1-py3-none-any.whl", hash = "sha256:3799fa815351fea3a5e96ac7e503a96fa51cc9942c3753cda7651b93c1cfa362"},
-    {file = "pytest-7.3.1.tar.gz", hash = "sha256:434afafd78b1d78ed0addf160ad2b77a30d35d4bdf8af234fe621919d9ed15e3"},
+    {file = "pytest-7.3.2-py3-none-any.whl", hash = "sha256:cdcbd012c9312258922f8cd3f1b62a6580fdced17db6014896053d47cddf9295"},
+    {file = "pytest-7.3.2.tar.gz", hash = "sha256:ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b"},
 ]
 
 [package.dependencies]
@@ -383,7 +385,7 @@ pluggy = ">=0.12,<2.0"
 tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
 
 [package.extras]
-testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
+testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
 
 [[package]]
 name = "pytest-cov"
@@ -537,5 +539,5 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 
 [metadata]
 lock-version = "2.0"
-python-versions = "^3.7"
-content-hash = "35d41c7be7bbb79dff8dadeca6f27dc83f2486e8c500f79f9c722cfd8eb9f404"
+python-versions = ">=3.7"
+content-hash = "72eae6f74530d9426de8a03dd3ed79fe5ca868faeaa8d84f14f6514cf50d591f"
diff --git a/pyproject.toml b/pyproject.toml
index 8f3770b7..203e7839 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,13 +1,13 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.1-rc1"
+version = "12.0.1-rc2"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
 
 [tool.poetry.dependencies]
-python = "^3.7"
-pyspark = "3.1.1"
+python = ">=3.7"
+pyspark = "^3.3"
 
 [tool.poetry.group.dev.dependencies]
 toml = "^0.10.2"

From 624615343126629c20426f2277104aed408ebaad Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 12 Jun 2023 11:27:54 +0100
Subject: [PATCH 405/531] Allow release to contain files

---
 .github/workflows/release-code.yml | 42 ++++++++++++++++++++++--------
 1 file changed, 31 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index d9527cd4..29c0cc5b 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -6,6 +6,21 @@ on:
      - "*"
 
 jobs:
+  create-release:
+    name: Create github release
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      - name: Create GitHub release
+        uses: softprops/action-gh-release@v1
+        with:
+          draft: true
+          files: |
+            *.whl
+            *.tar.gz
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
   build:
     name: Build artifact
     runs-on: ubuntu-latest
@@ -15,7 +30,7 @@ jobs:
         python-version: ['3.7', '3.8', '3.9', '3.10']
       fail-fast: false 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up Python ${{ matrix.python-version }}
         uses: actions/setup-python@v1
         with:
@@ -26,15 +41,20 @@ jobs:
           poetry-version: 1.3.2
       - name: build
         run: poetry build
-  release:
-    name: release artifact
+      - name: upload-wheel
+        run: |-
+          gh release upload "${GITHUB_REF##*/}" dist/*.whl dist/*.tar.gz
+        env:
+          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+  mark-release-as-released:
+    name: Set release as not draft
     runs-on: ubuntu-latest
+    needs: [build, create-release]
+    strategy:
+      fail-fast: false
     steps:
-      - name: Create GitHub release
-        uses: softprops/action-gh-release@v1
-        with:
-          files: |
-            dist/*.whl
-            dist/*.tar.gz
-    env:
-      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - uses: actions/checkout@v3
+      - name: Mark as not-draft
+        run: gh release edit "${GITHUB_REF##*/}" --draft=false --latest
+        env:
+          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

From 13fc257790390aaa7994e436619e25f368529f50 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 12 Jun 2023 11:30:57 +0100
Subject: [PATCH 406/531] Hopefully fix workflow

---
 .github/workflows/release-code.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index 29c0cc5b..e160a31e 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -14,10 +14,10 @@ jobs:
       - name: Create GitHub release
         uses: softprops/action-gh-release@v1
         with:
-          draft: true
           files: |
             *.whl
             *.tar.gz
+          draft: true
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 

From 11e5e9180ab4a0feac3c703f5fc449c1b9f82fb3 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 12 Jun 2023 11:34:26 +0100
Subject: [PATCH 407/531] Add missing steps key

---
 .github/workflows/release-code.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index e160a31e..b25b65e9 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -11,6 +11,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       fail-fast: false
+    steps:
       - name: Create GitHub release
         uses: softprops/action-gh-release@v1
         with:

From 000f17d79fce50690515ad8cb8a412689cc44cd3 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 12 Jun 2023 11:52:08 +0100
Subject: [PATCH 408/531] Uncomplicate release process as we only do pure
 python

---
 .github/workflows/release-code.yml | 43 +++++++-----------------------
 1 file changed, 9 insertions(+), 34 deletions(-)

diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index b25b65e9..deae2d31 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -6,29 +6,13 @@ on:
      - "*"
 
 jobs:
-  create-release:
-    name: Create github release
-    runs-on: ubuntu-latest
-    strategy:
-      fail-fast: false
-    steps:
-      - name: Create GitHub release
-        uses: softprops/action-gh-release@v1
-        with:
-          files: |
-            *.whl
-            *.tar.gz
-          draft: true
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
   build:
-    name: Build artifact
+    name: Build and release artifact
     runs-on: ubuntu-latest
     strategy:
       max-parallel: 4
       matrix:
-        python-version: ['3.7', '3.8', '3.9', '3.10']
+        python-version: [3.10]
       fail-fast: false 
     steps:
       - uses: actions/checkout@v3
@@ -42,20 +26,11 @@ jobs:
           poetry-version: 1.3.2
       - name: build
         run: poetry build
-      - name: upload-wheel
-        run: |-
-          gh release upload "${GITHUB_REF##*/}" dist/*.whl dist/*.tar.gz
-        env:
-          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
-  mark-release-as-released:
-    name: Set release as not draft
-    runs-on: ubuntu-latest
-    needs: [build, create-release]
-    strategy:
-      fail-fast: false
-    steps:
-      - uses: actions/checkout@v3
-      - name: Mark as not-draft
-        run: gh release edit "${GITHUB_REF##*/}" --draft=false --latest
+      - name: Create GitHub release
+        uses: softprops/action-gh-release@v1
+        with:
+          files: |
+            dist/*.whl
+            dist/*.tar.gz
         env:
-          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

From 96ed4c61e1624660e9be163ca386c7c6d116bb62 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 12 Jun 2023 11:54:43 +0100
Subject: [PATCH 409/531] Fix python version

---
 .github/workflows/release-code.yml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index deae2d31..5a345475 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -11,15 +11,13 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       max-parallel: 4
-      matrix:
-        python-version: [3.10]
       fail-fast: false 
     steps:
       - uses: actions/checkout@v3
       - name: Set up Python ${{ matrix.python-version }}
         uses: actions/setup-python@v1
         with:
-          python-version: ${{ matrix.python-version }}
+          python-version: '3.10'
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:

From 71bcfc269709f1fef12f2fcb3a2c0086eb482bee Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 12 Jun 2023 12:10:49 +0100
Subject: [PATCH 410/531] correct dependencies

---
 poetry.lock    | 17 ++++++++---------
 pyproject.toml |  4 ++--
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index bc8a37ac..c1d66682 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -308,14 +308,14 @@ testing = ["pytest", "pytest-benchmark"]
 
 [[package]]
 name = "py4j"
-version = "0.10.9.7"
+version = "0.10.9.5"
 description = "Enables Python programs to dynamically access arbitrary Java objects"
 category = "main"
 optional = false
 python-versions = "*"
 files = [
-    {file = "py4j-0.10.9.7-py2.py3-none-any.whl", hash = "sha256:85defdfd2b2376eb3abf5ca6474b51ab7e0de341c75a02f46dc9b5976f5a5c1b"},
-    {file = "py4j-0.10.9.7.tar.gz", hash = "sha256:0b6e5315bb3ada5cf62ac651d107bb2ebc02def3dee9d9548e3baac644ea8dbb"},
+    {file = "py4j-0.10.9.5-py2.py3-none-any.whl", hash = "sha256:52d171a6a2b031d8a5d1de6efe451cf4f5baff1a2819aabc3741c8406539ba04"},
+    {file = "py4j-0.10.9.5.tar.gz", hash = "sha256:276a4a3c5a2154df1860ef3303a927460e02e97b047dc0a47c1c3fb8cce34db6"},
 ]
 
 [[package]]
@@ -344,24 +344,23 @@ files = [
 
 [[package]]
 name = "pyspark"
-version = "3.4.0"
+version = "3.3.0"
 description = "Apache Spark Python API"
 category = "main"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pyspark-3.4.0.tar.gz", hash = "sha256:167a23e11854adb37f8602de6fcc3a4f96fd5f1e323b9bb83325f38408c5aafd"},
+    {file = "pyspark-3.3.0.tar.gz", hash = "sha256:7ebe8e9505647b4d124d5a82fca60dfd3891021cf8ad6c5ec88777eeece92cf7"},
 ]
 
 [package.dependencies]
-py4j = "0.10.9.7"
+py4j = "0.10.9.5"
 
 [package.extras]
-connect = ["googleapis-common-protos (>=1.56.4)", "grpcio (>=1.48.1)", "grpcio-status (>=1.48.1)", "numpy (>=1.15)", "pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
 ml = ["numpy (>=1.15)"]
 mllib = ["numpy (>=1.15)"]
 pandas-on-spark = ["numpy (>=1.15)", "pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
-sql = ["numpy (>=1.15)", "pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
+sql = ["pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
 
 [[package]]
 name = "pytest"
@@ -540,4 +539,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = ">=3.7"
-content-hash = "72eae6f74530d9426de8a03dd3ed79fe5ca868faeaa8d84f14f6514cf50d591f"
+content-hash = "e4a1d02fa9bb6ecd6e8c6c4ee80f68df0822c16422615ca7dfc76b084ab1a672"
diff --git a/pyproject.toml b/pyproject.toml
index 203e7839..d2f6f36b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,13 +1,13 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.1-rc2"
+version = "12.0.1-rc3"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
 
 [tool.poetry.dependencies]
 python = ">=3.7"
-pyspark = "^3.3"
+pyspark = "3.3.0"
 
 [tool.poetry.group.dev.dependencies]
 toml = "^0.10.2"

From a766697ad19a92103d49e9571197b8909591a878 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 13 Jun 2023 15:32:59 +0100
Subject: [PATCH 411/531] Hopefully fix misuse of columns with dotted names

---
 .../imputation/engine.py                      | 50 +++++++++----------
 .../imputation/ratio_calculators.py           | 40 +++++++--------
 2 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 24f26d74..79616a24 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -384,41 +384,41 @@ def calculate_ratios():
 
         # Put the values from the current and previous periods for a
         # contributor on the same row.
-        ratio_calculation_df = ratio_filter_df.alias("current")
         ratio_calculation_df = (
-            ratio_calculation_df.join(
-                ratio_filter_df.select(
-                    "ref", "period", "output", "grouping", "match"
-                ).alias("previous"),
+            ratio_filter_df.join(
+                ratio_filter_df.selectExpr(
+                    "ref AS join_ref", "period AS join_period", "output AS previous_output", "grouping AS join_grouping", "match AS link_inclusion_previous"
+                ),
                 [
-                    col("current.ref") == col("previous.ref"),
-                    col("current.previous_period") == col("previous.period"),
-                    col("current.grouping") == col("previous.grouping"),
+                    col("ref") == col("join_ref"),
+                    col("previous_period") == col("join_period"),
+                    col("grouping") == col("join_grouping"),
                 ],
                 "leftouter",
             )
+            .drop("join_period", "join_ref", "join_grouping")
             .join(
-                ratio_filter_df.select(
-                    "ref", "period", "output", "grouping", "match"
-                ).alias("next"),
+                ratio_filter_df.selectExpr(
+                    "ref AS join_ref", "period AS join_period", "output AS next_output", "grouping AS join_grouping", "match AS link_inclusion_next"
+                ),
                 [
-                    col("current.ref") == col("next.ref"),
-                    col("current.next_period") == col("next.period"),
-                    col("current.grouping") == col("next.grouping"),
+                    col("ref") == col("join_ref"),
+                    col("next_period") == col("join_period"),
+                    col("grouping") == col("join_grouping"),
                 ],
                 "leftouter",
             )
-            .select(
-                col("current.ref").alias("ref"),
-                col("current.grouping").alias("grouping"),
-                col("current.period").alias("period"),
-                col("current.aux").alias("aux"),
-                col("current.output"),
-                col("current.match").alias("link_inclusion_current"),
-                col("next.output"),
-                col("next.match").alias("link_inclusion_next"),
-                col("previous.output"),
-                col("previous.match").alias("link_inclusion_previous"),
+            .selectExpr(
+                "ref",
+                "grouping",
+                "period",
+                "aux",
+                "output",
+                "match AS link_inclusion_current",
+                "next_output",
+                "link_inclusion_next"
+                "previous_output",
+                "link_inclusion_previous",
             )
         )
 
diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 71ea8661..c51ee040 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -7,15 +7,15 @@
     grouping: Aliased from the `grouping_col` engine argument.
     period: Aliased from the `period_col` engine argument.
     aux: Aliased from the `auxiliary_col` engine argument.
-    current.output: Aliased version of the `target_col` engine argument for
+    output: Aliased version of the `target_col` engine argument for
       the data in the current period.
     link_inclusion_current: See the `link_inclusion_current_col` argument for
       the semantics of this column.
-    next.output: Aliased version of the `target_col` engine argument for
+    next_output: Aliased version of the `target_col` engine argument for
       the data in the next period.
     link_inclusion_next: See the `link_inclusion_next_col` argument for the
       semantics of this column.
-    previous.output: Aliased version of the `target_col` engine argument for
+    previous_output: Aliased version of the `target_col` engine argument for
       the data in the previous period.
     link_inclusion_previous: See the `link_inclusion_previous_col` argument for the
       semantics of this column.
@@ -133,18 +133,18 @@ def mean_of_ratios(
         "link_inclusion_current",
         when(
             col("link_inclusion_previous")
-            & (lit(include_zeros) | (col("previous.output") != lit(0))),
-            col("previous.output"),
+            & (lit(include_zeros) | (col("previous_output") != lit(0))),
+            col("previous_output"),
         ).alias("previous_output"),
         when(
             col("link_inclusion_current")
-            & (lit(include_zeros) | (col("current.output") != lit(0))),
-            col("current.output"),
+            & (lit(include_zeros) | (col("output") != lit(0))),
+            col("output"),
         ).alias("current_output"),
         when(
             col("link_inclusion_next")
-            & (lit(include_zeros) | (col("next.output") != lit(0))),
-            col("next.output"),
+            & (lit(include_zeros) | (col("next_output") != lit(0))),
+            col("next_output"),
         ).alias("next_output"),
     ).selectExpr(
         "period",
@@ -403,26 +403,26 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
                 """
                     sum(
                         CASE
-                            WHEN previous.output IS NOT NULL
-                            THEN current.output
+                            WHEN previous_output IS NOT NULL
+                            THEN output
                         END
-                    )/sum(previous.output) AS forward
+                    )/sum(previous_output) AS forward
                 """
             ),
             expr(
                 """
                     sum(
                         CASE
-                            WHEN next.output IS NOT NULL
-                            THEN current.output
+                            WHEN next_output IS NOT NULL
+                            THEN output
                         END
-                    )/sum(next.output) AS backward
+                    )/sum(next_output) AS backward
                 """
             ),
-            expr("count(previous.output) AS count_forward"),
-            expr("count(next.output) AS count_backward"),
-            expr("coalesce(sum(previous.output), 0) = 0 AS default_forward"),
-            expr("coalesce(sum(next.output), 0) = 0 AS default_backward"),
+            expr("count(previous_output) AS count_forward"),
+            expr("count(next_output) AS count_backward"),
+            expr("coalesce(sum(previous_output), 0) = 0 AS default_forward"),
+            expr("coalesce(sum(next_output), 0) = 0 AS default_backward"),
         )
     )
     return [
@@ -461,7 +461,7 @@ def ratio_of_means_construction(
                 df.filter(col("link_inclusion_current"))
                 .groupBy("period", "grouping")
                 .agg(
-                    expr("sum(current.output)/sum(aux) AS construction"),
+                    expr("sum(output)/sum(aux) AS construction"),
                     expr("count(aux) AS count_construction"),
                     expr("coalesce(sum(aux), 0) = 0 AS default_construction"),
                 )

From c0fecdee048619133b6b7ce330352d460e1009c0 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 13 Jun 2023 15:33:25 +0100
Subject: [PATCH 412/531] New major version to reflect pyspark upgrade being
 potentially breaking for other code

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index d2f6f36b..83ff8e5b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "12.0.1-rc3"
+version = "13.0.0-rc1"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From f6ccfcd658236fd46d668d290417961a6d9990d4 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 13 Jun 2023 15:34:36 +0100
Subject: [PATCH 413/531] Reformat with Black

---
 statistical_methods_library/imputation/engine.py | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 79616a24..dab964cc 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -387,7 +387,11 @@ def calculate_ratios():
         ratio_calculation_df = (
             ratio_filter_df.join(
                 ratio_filter_df.selectExpr(
-                    "ref AS join_ref", "period AS join_period", "output AS previous_output", "grouping AS join_grouping", "match AS link_inclusion_previous"
+                    "ref AS join_ref",
+                    "period AS join_period",
+                    "output AS previous_output",
+                    "grouping AS join_grouping",
+                    "match AS link_inclusion_previous",
                 ),
                 [
                     col("ref") == col("join_ref"),
@@ -399,7 +403,11 @@ def calculate_ratios():
             .drop("join_period", "join_ref", "join_grouping")
             .join(
                 ratio_filter_df.selectExpr(
-                    "ref AS join_ref", "period AS join_period", "output AS next_output", "grouping AS join_grouping", "match AS link_inclusion_next"
+                    "ref AS join_ref",
+                    "period AS join_period",
+                    "output AS next_output",
+                    "grouping AS join_grouping",
+                    "match AS link_inclusion_next",
                 ),
                 [
                     col("ref") == col("join_ref"),
@@ -416,8 +424,7 @@ def calculate_ratios():
                 "output",
                 "match AS link_inclusion_current",
                 "next_output",
-                "link_inclusion_next"
-                "previous_output",
+                "link_inclusion_next" "previous_output",
                 "link_inclusion_previous",
             )
         )

From 2cf854ba3460da60d2431b5ffab41808696a509e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 13 Jun 2023 15:38:27 +0100
Subject: [PATCH 414/531] Fix typo

---
 statistical_methods_library/imputation/engine.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index dab964cc..cb952a76 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -424,7 +424,8 @@ def calculate_ratios():
                 "output",
                 "match AS link_inclusion_current",
                 "next_output",
-                "link_inclusion_next" "previous_output",
+                "link_inclusion_next",
+                "previous_output",
                 "link_inclusion_previous",
             )
         )

From 7a89f362e855eac3fa45370728f25258d5e3356e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 13 Jun 2023 15:38:46 +0100
Subject: [PATCH 415/531] New rc

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 83ff8e5b..cedbaea2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "13.0.0-rc1"
+version = "13.0.0-rc2"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 34c7254564a2300e548e440246ca3fc4a6d8355b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 13 Jun 2023 17:15:55 +0100
Subject: [PATCH 416/531] Rewrite joins

---
 .../imputation/engine.py                      | 32 +++++++------------
 1 file changed, 11 insertions(+), 21 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index cb952a76..daf22b4c 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -299,7 +299,7 @@ def impute(
     )
     prior_period_df = prepared_df.selectExpr(
         "min(previous_period) AS prior_period"
-    ).localCheckpoint(eager=True)
+    ).localCheckpoint(eager=False)
 
     if back_data_df:
         validated_back_data_df = validate_dataframe(
@@ -369,9 +369,8 @@ def calculate_ratios():
             )
         else:
             ratio_filter_df = prepared_df.withColumn("match", lit(True))
-        ratio_filter_df = ratio_filter_df.filter(
-            ~ratio_filter_df.output.isNull()
-        ).select(
+
+        ratio_filter_df = ratio_filter_df.filter("output IS NOT NULL").select(
             "ref",
             "period",
             "grouping",
@@ -387,33 +386,24 @@ def calculate_ratios():
         ratio_calculation_df = (
             ratio_filter_df.join(
                 ratio_filter_df.selectExpr(
-                    "ref AS join_ref",
-                    "period AS join_period",
+                    "ref",
+                    "period AS previous_period",
                     "output AS previous_output",
-                    "grouping AS join_grouping",
+                    "grouping",
                     "match AS link_inclusion_previous",
                 ),
-                [
-                    col("ref") == col("join_ref"),
-                    col("previous_period") == col("join_period"),
-                    col("grouping") == col("join_grouping"),
-                ],
+                ["ref", "grouping", "previous_period"],
                 "leftouter",
             )
-            .drop("join_period", "join_ref", "join_grouping")
             .join(
                 ratio_filter_df.selectExpr(
-                    "ref AS join_ref",
-                    "period AS join_period",
+                    "ref",
+                    "period AS next_period",
                     "output AS next_output",
-                    "grouping AS join_grouping",
+                    "grouping",
                     "match AS link_inclusion_next",
                 ),
-                [
-                    col("ref") == col("join_ref"),
-                    col("next_period") == col("join_period"),
-                    col("grouping") == col("join_grouping"),
-                ],
+                ["ref", "next_period", "grouping"],
                 "leftouter",
             )
             .selectExpr(

From c87374f5be2e2e0dde7022174e100d0cf5fc86f8 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 13 Jun 2023 17:16:12 +0100
Subject: [PATCH 417/531] Pyproject rc bump

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index cedbaea2..2c77d038 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "13.0.0-rc2"
+version = "13.0.0-rc3"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 594da7ba618fa11e41f41ed3cd7521c36ddc57e2 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 14 Jun 2023 15:20:07 +0100
Subject: [PATCH 418/531] Loosen pyspark dependency a little bit

---
 poetry.lock    | 6 +++---
 pyproject.toml | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index c1d66682..35b4b540 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -344,13 +344,13 @@ files = [
 
 [[package]]
 name = "pyspark"
-version = "3.3.0"
+version = "3.3.2"
 description = "Apache Spark Python API"
 category = "main"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pyspark-3.3.0.tar.gz", hash = "sha256:7ebe8e9505647b4d124d5a82fca60dfd3891021cf8ad6c5ec88777eeece92cf7"},
+    {file = "pyspark-3.3.2.tar.gz", hash = "sha256:0dfd5db4300c1f6cc9c16d8dbdfb82d881b4b172984da71344ede1a9d4893da8"},
 ]
 
 [package.dependencies]
@@ -539,4 +539,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = ">=3.7"
-content-hash = "e4a1d02fa9bb6ecd6e8c6c4ee80f68df0822c16422615ca7dfc76b084ab1a672"
+content-hash = "8dfac67a0d91fad137505078082de9f0d7a84260265bbbf4c89798a5b0a4a967"
diff --git a/pyproject.toml b/pyproject.toml
index 2c77d038..705bce88 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,13 +1,13 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "13.0.0-rc3"
+version = "13.0.0-rc4"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
 
 [tool.poetry.dependencies]
 python = ">=3.7"
-pyspark = "3.3.0"
+pyspark = ">3.3.0 <3.4.0"
 
 [tool.poetry.group.dev.dependencies]
 toml = "^0.10.2"

From 27bc4b28eb337e2b1e5c3c5344b5061c2b847d99 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 14 Jun 2023 16:47:26 +0100
Subject: [PATCH 419/531] Loosen pyspark dependency to support glue 3 and 4

---
 pyproject.toml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index 705bce88..c8843bd6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,13 +1,13 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "13.0.0-rc4"
+version = "13.0.0-rc5"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
 
 [tool.poetry.dependencies]
 python = ">=3.7"
-pyspark = ">3.3.0 <3.4.0"
+pyspark = ">=3.1.1 <3.4.0"
 
 [tool.poetry.group.dev.dependencies]
 toml = "^0.10.2"

From 3e407f9bfbc4bb5b49d900720edf1aa4e7f8694c Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 19 Jun 2023 13:25:33 +0100
Subject: [PATCH 420/531] poetry updates

---
 poetry.lock | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/poetry.lock b/poetry.lock
index 35b4b540..cd060427 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -539,4 +539,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = ">=3.7"
-content-hash = "8dfac67a0d91fad137505078082de9f0d7a84260265bbbf4c89798a5b0a4a967"
+content-hash = "d6aa65a1cfc41899e6779db84d3c7968db6e998e1ea2332515e5f3783e0f4a04"

From bb44b1379e4d5556763667bbe59b5c10d48ad372 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 19 Jun 2023 13:26:35 +0100
Subject: [PATCH 421/531] Another poetry lock update

---
 poetry.lock | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index cd060427..a30785b9 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -270,14 +270,14 @@ files = [
 
 [[package]]
 name = "platformdirs"
-version = "3.5.3"
+version = "3.6.0"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-3.5.3-py3-none-any.whl", hash = "sha256:0ade98a4895e87dc51d47151f7d2ec290365a585151d97b4d8d6312ed6132fed"},
-    {file = "platformdirs-3.5.3.tar.gz", hash = "sha256:e48fabd87db8f3a7df7150a4a5ea22c546ee8bc39bc2473244730d4b56d2cc4e"},
+    {file = "platformdirs-3.6.0-py3-none-any.whl", hash = "sha256:ffa199e3fbab8365778c4a10e1fbf1b9cd50707de826eb304b50e57ec0cc8d38"},
+    {file = "platformdirs-3.6.0.tar.gz", hash = "sha256:57e28820ca8094678b807ff529196506d7a21e17156cb1cddb3e74cebce54640"},
 ]
 
 [package.dependencies]
@@ -289,14 +289,14 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-
 
 [[package]]
 name = "pluggy"
-version = "1.0.0"
+version = "1.1.0"
 description = "plugin and hook calling mechanisms for python"
 category = "dev"
 optional = false
-python-versions = ">=3.6"
+python-versions = ">=3.7"
 files = [
-    {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
-    {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
+    {file = "pluggy-1.1.0-py3-none-any.whl", hash = "sha256:d81d19a3a88d82ed06998353ce5d5c02587ef07ee2d808ae63904ab0ccef0087"},
+    {file = "pluggy-1.1.0.tar.gz", hash = "sha256:c500b592c5512df35622e4faf2135aa0b7e989c7d31344194b4afb9d5e47b1bf"},
 ]
 
 [package.dependencies]

From c78c7c94fe5d16bd7d6b0c0940351ef301edf98b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 19 Jun 2023 13:47:57 +0100
Subject: [PATCH 422/531] Hopefully fix weighting bug

---
 statistical_methods_library/imputation/engine.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index daf22b4c..3681560d 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -482,7 +482,11 @@ def calculate_weighted_link(link_name):
                 return
 
             weighting_df = (
-                prepared_df.select(
+                prepared_df.join(
+                    prior_period_df,
+                    (col("prior_period") < col("period"))
+                )
+                .select(
                     "period",
                     "grouping",
                     *(

From 14c7256c123d3019abab22f987d3d1171078f659 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 19 Jun 2023 14:55:17 +0100
Subject: [PATCH 423/531] There is no other separate documentation so move
 release notes into a top level dir

---
 {docs/release-notes => release-notes}/10.0.0.md | 0
 {docs/release-notes => release-notes}/11.0.0.md | 0
 {docs/release-notes => release-notes}/11.0.1.md | 0
 {docs/release-notes => release-notes}/11.0.2.md | 0
 {docs/release-notes => release-notes}/12.0.0.md | 0
 {docs/release-notes => release-notes}/9.0.0.md  | 0
 {docs/release-notes => release-notes}/9.0.1.md  | 0
 {docs/release-notes => release-notes}/9.1.0.md  | 0
 {docs/release-notes => release-notes}/9.1.1.md  | 0
 9 files changed, 0 insertions(+), 0 deletions(-)
 rename {docs/release-notes => release-notes}/10.0.0.md (100%)
 rename {docs/release-notes => release-notes}/11.0.0.md (100%)
 rename {docs/release-notes => release-notes}/11.0.1.md (100%)
 rename {docs/release-notes => release-notes}/11.0.2.md (100%)
 rename {docs/release-notes => release-notes}/12.0.0.md (100%)
 rename {docs/release-notes => release-notes}/9.0.0.md (100%)
 rename {docs/release-notes => release-notes}/9.0.1.md (100%)
 rename {docs/release-notes => release-notes}/9.1.0.md (100%)
 rename {docs/release-notes => release-notes}/9.1.1.md (100%)

diff --git a/docs/release-notes/10.0.0.md b/release-notes/10.0.0.md
similarity index 100%
rename from docs/release-notes/10.0.0.md
rename to release-notes/10.0.0.md
diff --git a/docs/release-notes/11.0.0.md b/release-notes/11.0.0.md
similarity index 100%
rename from docs/release-notes/11.0.0.md
rename to release-notes/11.0.0.md
diff --git a/docs/release-notes/11.0.1.md b/release-notes/11.0.1.md
similarity index 100%
rename from docs/release-notes/11.0.1.md
rename to release-notes/11.0.1.md
diff --git a/docs/release-notes/11.0.2.md b/release-notes/11.0.2.md
similarity index 100%
rename from docs/release-notes/11.0.2.md
rename to release-notes/11.0.2.md
diff --git a/docs/release-notes/12.0.0.md b/release-notes/12.0.0.md
similarity index 100%
rename from docs/release-notes/12.0.0.md
rename to release-notes/12.0.0.md
diff --git a/docs/release-notes/9.0.0.md b/release-notes/9.0.0.md
similarity index 100%
rename from docs/release-notes/9.0.0.md
rename to release-notes/9.0.0.md
diff --git a/docs/release-notes/9.0.1.md b/release-notes/9.0.1.md
similarity index 100%
rename from docs/release-notes/9.0.1.md
rename to release-notes/9.0.1.md
diff --git a/docs/release-notes/9.1.0.md b/release-notes/9.1.0.md
similarity index 100%
rename from docs/release-notes/9.1.0.md
rename to release-notes/9.1.0.md
diff --git a/docs/release-notes/9.1.1.md b/release-notes/9.1.1.md
similarity index 100%
rename from docs/release-notes/9.1.1.md
rename to release-notes/9.1.1.md

From ad6959f919b87c776afda9369357e48ed54ae5e6 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 19 Jun 2023 15:18:01 +0100
Subject: [PATCH 424/531] Add 13.0.0 release notes

---
 release-notes/13.0.0.md | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 release-notes/13.0.0.md

diff --git a/release-notes/13.0.0.md b/release-notes/13.0.0.md
new file mode 100644
index 00000000..5a5ddf2c
--- /dev/null
+++ b/release-notes/13.0.0.md
@@ -0,0 +1,29 @@
+# Statistical Methods Library 13.0.0
+
+Release date: 2023-06-19
+
+## Synopsis
+
+This release loosens several dependency constraints as well as removing the
+need to provide the auxiliary variable in imputation back data.
+
+## Changes
+
+### Dependencies
+
+The supported versions of Pyspark now include every version from 3.1.1 up to
+the 3.3 series. Python versions from 3.7 up to and including 3.10 are now
+also supported.
+
+### Imputation
+
+The auxiliary variable is no longer required in back data as the previous
+erroneous use of this variable to calculate unused construction links for
+the back data periods no longer occurs.
+
+## Notes
+
+Although Python 3.7, 3.8, 3.9 and 3.10 are tested these tests are conducted
+against the latest version of Pyspark 3.3. It is recommended to update the
+installed versions of Pyspark and Python where possible as the aim is to
+drop support for older versions of Pyspark as soon as possible.

From 0d37edfb9466c10da12dbb56076052fc7d43cb3f Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 19 Jun 2023 15:18:49 +0100
Subject: [PATCH 425/531] Reformat with Black

---
 pyproject.toml                                   | 2 +-
 statistical_methods_library/imputation/engine.py | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index c8843bd6..23ce7402 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "13.0.0-rc5"
+version = "13.0.0"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 3681560d..aa8bb1ed 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -482,10 +482,7 @@ def calculate_weighted_link(link_name):
                 return
 
             weighting_df = (
-                prepared_df.join(
-                    prior_period_df,
-                    (col("prior_period") < col("period"))
-                )
+                prepared_df.join(prior_period_df, (col("prior_period") < col("period")))
                 .select(
                     "period",
                     "grouping",

From eed9f79a113c1ecba33a536dd5d47dc29ee35c2d Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 19 Jun 2023 15:40:23 +0100
Subject: [PATCH 426/531] Correct release notes wording

---
 release-notes/13.0.0.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/release-notes/13.0.0.md b/release-notes/13.0.0.md
index 5a5ddf2c..9a5992b2 100644
--- a/release-notes/13.0.0.md
+++ b/release-notes/13.0.0.md
@@ -4,7 +4,7 @@ Release date: 2023-06-19
 
 ## Synopsis
 
-This release loosens several dependency constraints as well as removing the
+This release loosens a couple of dependency constraints as well as removing the
 need to provide the auxiliary variable in imputation back data.
 
 ## Changes

From 9f923a2ee54db375d04089c592b52ce68e2afd23 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 20 Jun 2023 13:09:53 +0100
Subject: [PATCH 427/531] Removed passed in links from null exception. Removed
 filling null links when passed in. Updated test data to no longer pass in
 null links.

---
 .../imputation/engine.py                      |  7 ++--
 .../19_link_columns_input.csv                 |  4 +--
 .../19_link_columns_output.csv                |  4 +--
 .../28_link_columns_filtered_input.csv        |  2 +-
 .../28_link_columns_filtered_output.csv       |  2 +-
 .../33_partial_link_columns_input.csv         | 24 +++++++-------
 .../33_partial_link_columns_output.csv        | 24 +++++++-------
 .../19_link_columns_input.csv                 | 24 +++++++-------
 .../19_link_columns_output.csv                | 24 +++++++-------
 .../28_link_columns_filtered_input.csv        | 32 +++++++++----------
 .../28_link_columns_filtered_output.csv       | 32 +++++++++----------
 11 files changed, 88 insertions(+), 91 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index aa8bb1ed..2ac019f8 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -173,8 +173,7 @@ def impute(
     `construction_link_col`. This also means that the corresponding unweighted
     columns will not be present in the output even if the arguments for
     weighting are specified. In addition the corresponding count columns will
-    be set to `0` in this case and any NULL values defaulted with the
-    corresponding default markers set accordingly.
+    be set to `0` in this case.
 
     If `link_filter` is provided then the inclusion marker columns will be
     present in the output otherwise they will not be.
@@ -288,7 +287,7 @@ def impute(
             input_params,
             type_mapping,
             ["ref", "period", "grouping"],
-            ["target", "forward", "backward", "construction"],
+            ["target"],
         )
         .withColumnRenamed("target", "output")
         .withColumn("marker", when(~col("output").isNull(), Marker.RESPONSE.value))
@@ -337,7 +336,6 @@ def calculate_ratios():
             prepared_df = (
                 prepared_df.withColumn("default_forward", expr("forward IS NULL"))
                 .withColumn("default_backward", expr("backward IS NULL"))
-                .fillna(1.0, ["forward", "backward"])
                 .withColumn("count_forward", lit(0).cast("long"))
                 .withColumn("count_backward", lit(0).cast("long"))
             )
@@ -350,7 +348,6 @@ def calculate_ratios():
                 prepared_df.withColumn(
                     "default_construction", expr("construction IS NULL")
                 )
-                .fillna(1.0, ["construction"])
                 .withColumn("count_construction", lit(0).cast("long"))
             )
 
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
index 5c607b5f..669b20b6 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_input.csv
@@ -19,7 +19,7 @@ identifier,date,group,question,other,forward,backward,construction
 190005,202002,100,,34,0.8521,1.5274,121.4187
 190005,202003,100,4456,34,0.9685,1.8795,89.3761
 190005,202004,100,5134,34,1.113,1,110.5473
-190006,202001,100,,8,,0.9214,50.3694
+190006,202001,100,,8,1,0.9214,50.3694
 190006,202002,100,,8,0.8521,1.5274,121.4187
 190006,202003,100,,8,0.9685,1.8795,89.3761
-190006,202004,100,,8,1.113,,110.5473
+190006,202004,100,,8,1.113,1,110.5473
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
index 61be6656..2bcb1ef9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/19_link_columns_output.csv
@@ -19,7 +19,7 @@ identifier,date,group,output,marker,forward,backward,construction,count_forward,
 190005,202002,100,6806.0944,BI,0.8521,1.5274,121.4187,0,0,0,false,false,false
 190005,202003,100,4456,R,0.9685,1.8795,89.3761,0,0,0,false,false,false
 190005,202004,100,5134,R,1.113,1,110.5473,0,0,0,false,false,false
-190006,202001,100,402.9552,C,1,0.9214,50.3694,0,0,0,true,false,false
+190006,202001,100,402.9552,C,1,0.9214,50.3694,0,0,0,false,false,false
 190006,202002,100,343.3581259,FIC,0.8521,1.5274,121.4187,0,0,0,false,false,false
 190006,202003,100,332.542345,FIC,0.9685,1.8795,89.3761,0,0,0,false,false,false
-190006,202004,100,370.1196299,FIC,1.113,1,110.5473,0,0,0,false,true,false
+190006,202004,100,370.1196299,FIC,1.113,1,110.5473,0,0,0,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
index a14f243f..32e6955b 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_input.csv
@@ -3,7 +3,7 @@ identifier,date,group,question,other,forward,backward,construction
 190001,202002,100,4996,95,0.8521,1.5274,121.4187
 190001,202003,100,1480,95,0.9685,1.8795,89.3761
 190001,202004,100,4350,95,1.113,1,110.5473
-190002,202001,100,2433,17,,0.9214,50.3694
+190002,202001,100,2433,17,1,0.9214,50.3694
 190002,202002,100,4324,17,0.8521,1.5274,121.4187
 190002,202003,100,6598,17,0.9685,1.8795,89.3761
 190002,202004,100,700,17,1.113,1,110.5473
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
index cd3c217b..a5e136a9 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -3,7 +3,7 @@ identifier,date,group,forward,backward,construction,output,marker,count_forward,
 190001,202002,100,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
 190001,202003,100,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
 190001,202004,100,1.113,1,110.5473,4350,R,0,0,0,false,false,false
-190002,202001,100,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190002,202001,100,1,0.9214,50.3694,2433,R,0,0,0,false,false,false
 190002,202002,100,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
 190002,202003,100,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
 190002,202004,100,1.113,1,110.5473,700,R,0,0,0,false,false,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv
index f0d55fe9..22811bab 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_input.csv
@@ -1,25 +1,25 @@
 identifier,date,group,question,other,forward,backward
-190001,202001,100,9261,95,,0.9214
+190001,202001,100,9261,95,1,0.9214
 190001,202002,100,4996,95,0.8521,1.5274
 190001,202003,100,1480,95,0.9685,1.8795
-190001,202004,100,4350,95,1.113,
-190002,202001,100,2433,17,,0.9214
+190001,202004,100,4350,95,1.113,1
+190002,202001,100,2433,17,1,0.9214
 190002,202002,100,4324,17,0.8521,1.5274
 190002,202003,100,6598,17,0.9685,1.8795
-190002,202004,100,700,17,1.113,
-190003,202001,100,7888,64,,0.9214
+190002,202004,100,700,17,1.113,1
+190003,202001,100,7888,64,1,0.9214
 190003,202002,100,4218,64,0.8521,1.5274
 190003,202003,100,7591,64,0.9685,1.8795
-190003,202004,100,4077,64,1.113,
-190004,202001,100,2247,51,,0.9214
+190003,202004,100,4077,64,1.113,1
+190004,202001,100,2247,51,1,0.9214
 190004,202002,100,,51,0.8521,1.5274
 190004,202003,100,,51,0.9685,1.8795
-190004,202004,100,8608,51,1.113,
-190005,202001,100,,34,,0.9214
+190004,202004,100,8608,51,1.113,1
+190005,202001,100,,34,1,0.9214
 190005,202002,100,,34,0.8521,1.5274
 190005,202003,100,4456,34,0.9685,1.8795
-190005,202004,100,5134,34,1.113,
-190006,202001,100,,8,,0.9214
+190005,202004,100,5134,34,1.113,1
+190006,202001,100,,8,1,0.9214
 190006,202002,100,,8,0.8521,1.5274
 190006,202003,100,,8,0.9685,1.8795
-190006,202004,100,,8,1.113,
+190006,202004,100,,8,1.113,1
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
index b20374f5..9b5e2c7e 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/33_partial_link_columns_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,1,0.9214,96.16299559,9261,R,0,0,4,true,false,false
+190001,202001,100,1,0.9214,96.16299559,9261,R,0,0,4,false,false,false
 190001,202002,100,0.8521,1.5274,76.92045455,4996,R,0,0,3,false,false,false
 190001,202003,100,0.9685,1.8795,95.83333333,1480,R,0,0,4,false,false,false
-190001,202004,100,1.113,1,87.62068966,4350,R,0,0,5,false,true,false
-190002,202001,100,1,0.9214,96.16299559,2433,R,0,0,4,true,false,false
+190001,202004,100,1.113,1,87.62068966,4350,R,0,0,5,false,false,false
+190002,202001,100,1,0.9214,96.16299559,2433,R,0,0,4,false,false,false
 190002,202002,100,0.8521,1.5274,76.92045455,4324,R,0,0,3,false,false,false
 190002,202003,100,0.9685,1.8795,95.83333333,6598,R,0,0,4,false,false,false
-190002,202004,100,1.113,1,87.62068966,700,R,0,0,5,false,true,false
-190003,202001,100,1,0.9214,96.16299559,7888,R,0,0,4,true,false,false
+190002,202004,100,1.113,1,87.62068966,700,R,0,0,5,false,false,false
+190003,202001,100,1,0.9214,96.16299559,7888,R,0,0,4,false,false,false
 190003,202002,100,0.8521,1.5274,76.92045455,4218,R,0,0,3,false,false,false
 190003,202003,100,0.9685,1.8795,95.83333333,7591,R,0,0,4,false,false,false
-190003,202004,100,1.113,1,87.62068966,4077,R,0,0,5,false,true,false
-190004,202001,100,1,0.9214,96.16299559,2247,R,0,0,4,true,false,false
+190003,202004,100,1.113,1,87.62068966,4077,R,0,0,5,false,false,false
+190004,202001,100,1,0.9214,96.16299559,2247,R,0,0,4,false,false,false
 190004,202002,100,0.8521,1.5274,76.92045455,1914.6687,FIR,0,0,3,false,false,false
 190004,202003,100,0.9685,1.8795,95.83333333,1854.356636,FIR,0,0,4,false,false,false
-190004,202004,100,1.113,1,87.62068966,8608,R,0,0,5,false,true,false
-190005,202001,100,1,0.9214,96.16299559,6271.13538,BI,0,0,4,true,false,false
+190004,202004,100,1.113,1,87.62068966,8608,R,0,0,5,false,false,false
+190005,202001,100,1,0.9214,96.16299559,6271.13538,BI,0,0,4,false,false,false
 190005,202002,100,0.8521,1.5274,76.92045455,6806.0944,BI,0,0,3,false,false,false
 190005,202003,100,0.9685,1.8795,95.83333333,4456,R,0,0,4,false,false,false
-190005,202004,100,1.113,1,87.62068966,5134,R,0,0,5,false,true,false
-190006,202001,100,1,0.9214,96.16299559,769.3039647,C,0,0,4,true,false,false
+190005,202004,100,1.113,1,87.62068966,5134,R,0,0,5,false,false,false
+190006,202001,100,1,0.9214,96.16299559,769.3039647,C,0,0,4,false,false,false
 190006,202002,100,0.8521,1.5274,76.92045455,655.523909,FIC,0,0,3,false,false,false
 190006,202003,100,0.9685,1.8795,95.83333333,634.874906,FIC,0,0,4,false,false,false
-190006,202004,100,1.113,1,87.62068966,706.6157695,FIC,0,0,5,false,true,false
+190006,202004,100,1.113,1,87.62068966,706.6157695,FIC,0,0,5,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_input.csv
index 404a6331..669b20b6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_input.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_input.csv
@@ -1,25 +1,25 @@
 identifier,date,group,question,other,forward,backward,construction
-190001,202001,100,9261,95,,0.9214,50.3694
+190001,202001,100,9261,95,1,0.9214,50.3694
 190001,202002,100,4996,95,0.8521,1.5274,121.4187
 190001,202003,100,1480,95,0.9685,1.8795,89.3761
-190001,202004,100,4350,95,1.113,,110.5473
-190002,202001,100,2433,17,,0.9214,50.3694
+190001,202004,100,4350,95,1.113,1,110.5473
+190002,202001,100,2433,17,1,0.9214,50.3694
 190002,202002,100,4324,17,0.8521,1.5274,121.4187
 190002,202003,100,6598,17,0.9685,1.8795,89.3761
-190002,202004,100,700,17,1.113,,110.5473
-190003,202001,100,7888,64,,0.9214,50.3694
+190002,202004,100,700,17,1.113,1,110.5473
+190003,202001,100,7888,64,1,0.9214,50.3694
 190003,202002,100,4218,64,0.8521,1.5274,121.4187
 190003,202003,100,7591,64,0.9685,1.8795,89.3761
-190003,202004,100,4077,64,1.113,,110.5473
-190004,202001,100,2247,51,,0.9214,50.3694
+190003,202004,100,4077,64,1.113,1,110.5473
+190004,202001,100,2247,51,1,0.9214,50.3694
 190004,202002,100,,51,0.8521,1.5274,121.4187
 190004,202003,100,,51,0.9685,1.8795,89.3761
-190004,202004,100,8608,51,1.113,,110.5473
-190005,202001,100,,34,,0.9214,50.3694
+190004,202004,100,8608,51,1.113,1,110.5473
+190005,202001,100,,34,1,0.9214,50.3694
 190005,202002,100,,34,0.8521,1.5274,121.4187
 190005,202003,100,4456,34,0.9685,1.8795,89.3761
-190005,202004,100,5134,34,1.113,,110.5473
-190006,202001,100,,8,,0.9214,50.3694
+190005,202004,100,5134,34,1.113,1,110.5473
+190006,202001,100,,8,1,0.9214,50.3694
 190006,202002,100,,8,0.8521,1.5274,121.4187
 190006,202003,100,,8,0.9685,1.8795,89.3761
-190006,202004,100,,8,1.113,,110.5473
+190006,202004,100,,8,1.113,1,110.5473
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
index 3c8dccd0..241e487e 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/19_link_columns_output.csv
@@ -1,25 +1,25 @@
 identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
+190001,202001,100,1,0.9214,50.3694,9261,R,0,0,0,false,false,false
 190001,202002,100,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
 190001,202003,100,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
-190001,202004,100,1.113,1,110.5473,4350,R,0,0,0,false,true,false
-190002,202001,100,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190001,202004,100,1.113,1,110.5473,4350,R,0,0,0,false,false,false
+190002,202001,100,1,0.9214,50.3694,2433,R,0,0,0,false,false,false
 190002,202002,100,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
 190002,202003,100,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
-190002,202004,100,1.113,1,110.5473,700,R,0,0,0,false,true,false
-190003,202001,100,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
+190002,202004,100,1.113,1,110.5473,700,R,0,0,0,false,false,false
+190003,202001,100,1,0.9214,50.3694,7888,R,0,0,0,false,false,false
 190003,202002,100,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
 190003,202003,100,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
-190003,202004,100,1.113,1,110.5473,4077,R,0,0,0,false,true,false
-190004,202001,100,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
+190003,202004,100,1.113,1,110.5473,4077,R,0,0,0,false,false,false
+190004,202001,100,1,0.9214,50.3694,2247,R,0,0,0,false,false,false
 190004,202002,100,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
 190004,202003,100,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
-190004,202004,100,1.113,1,110.5473,8608,R,0,0,0,false,true,false
-190005,202001,100,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
+190004,202004,100,1.113,1,110.5473,8608,R,0,0,0,false,false,false
+190005,202001,100,1,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false
 190005,202002,100,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
 190005,202003,100,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
-190005,202004,100,1.113,1,110.5473,5134,R,0,0,0,false,true,false
-190006,202001,100,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
+190005,202004,100,1.113,1,110.5473,5134,R,0,0,0,false,false,false
+190006,202001,100,1,0.9214,50.3694,402.9552,C,0,0,0,false,false,false
 190006,202002,100,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
 190006,202003,100,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
-190006,202004,100,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
+190006,202004,100,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,false,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_input.csv
index 3df4819f..8e1b07ec 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_input.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_input.csv
@@ -1,33 +1,33 @@
 identifier,date,group,question,other,forward,backward,construction
-190001,202001,100,9261,95,,0.9214,50.3694
+190001,202001,100,9261,95,1,0.9214,50.3694
 190001,202002,100,4996,95,0.8521,1.5274,121.4187
 190001,202003,100,1480,95,0.9685,1.8795,89.3761
-190001,202004,100,4350,95,1.113,,110.5473
-190002,202001,100,2433,17,,0.9214,50.3694
+190001,202004,100,4350,95,1.113,1,110.5473
+190002,202001,100,2433,17,1,0.9214,50.3694
 190002,202002,100,4324,17,0.8521,1.5274,121.4187
 190002,202003,100,6598,17,0.9685,1.8795,89.3761
-190002,202004,100,700,17,1.113,,110.5473
-190003,202001,100,7888,64,,0.9214,50.3694
+190002,202004,100,700,17,1.113,1,110.5473
+190003,202001,100,7888,64,1,0.9214,50.3694
 190003,202002,100,4218,64,0.8521,1.5274,121.4187
 190003,202003,100,7591,64,0.9685,1.8795,89.3761
-190003,202004,100,4077,64,1.113,,110.5473
-190004,202001,100,2247,51,,0.9214,50.3694
+190003,202004,100,4077,64,1.113,1,110.5473
+190004,202001,100,2247,51,1,0.9214,50.3694
 190004,202002,100,,51,0.8521,1.5274,121.4187
 190004,202003,100,,51,0.9685,1.8795,89.3761
-190004,202004,100,8608,51,1.113,,110.5473
-190005,202001,100,,34,,0.9214,50.3694
+190004,202004,100,8608,51,1.113,1,110.5473
+190005,202001,100,,34,1,0.9214,50.3694
 190005,202002,100,,34,0.8521,1.5274,121.4187
 190005,202003,100,4456,34,0.9685,1.8795,89.3761
-190005,202004,100,5134,34,1.113,,110.5473
-190006,202001,100,,8,,0.9214,50.3694
+190005,202004,100,5134,34,1.113,1,110.5473
+190006,202001,100,,8,1,0.9214,50.3694
 190006,202002,100,,8,0.8521,1.5274,121.4187
 190006,202003,100,,8,0.9685,1.8795,89.3761
-190006,202004,100,,8,1.113,,110.5473
-190007,202001,100,150000,85,,0.9214,50.3694
+190006,202004,100,,8,1.113,1,110.5473
+190007,202001,100,150000,85,1,0.9214,50.3694
 190007,202002,100,120000,85,0.8521,1.5274,121.4187
 190007,202003,100,110000,85,0.9685,1.8795,89.3761
-190007,202004,100,180000,85,1.113,,110.5473
-190008,202001,100,,71,,0.9214,50.3694
+190007,202004,100,180000,85,1.113,1,110.5473
+190008,202001,100,,71,1,0.9214,50.3694
 190008,202002,100,,71,0.8521,1.5274,121.4187
 190008,202003,100,,71,0.9685,1.8795,89.3761
-190008,202004,100,,71,1.113,,110.5473
\ No newline at end of file
+190008,202004,100,,71,1.113,1,110.5473
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
index 15f5df4e..8815642d 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/28_link_columns_filtered_output.csv
@@ -1,33 +1,33 @@
 identifier,date,group,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-190001,202001,100,1,0.9214,50.3694,9261,R,0,0,0,true,false,false
+190001,202001,100,1,0.9214,50.3694,9261,R,0,0,0,false,false,false
 190001,202002,100,0.8521,1.5274,121.4187,4996,R,0,0,0,false,false,false
 190001,202003,100,0.9685,1.8795,89.3761,1480,R,0,0,0,false,false,false
-190001,202004,100,1.113,1,110.5473,4350,R,0,0,0,false,true,false
-190002,202001,100,1,0.9214,50.3694,2433,R,0,0,0,true,false,false
+190001,202004,100,1.113,1,110.5473,4350,R,0,0,0,false,false,false
+190002,202001,100,1,0.9214,50.3694,2433,R,0,0,0,false,false,false
 190002,202002,100,0.8521,1.5274,121.4187,4324,R,0,0,0,false,false,false
 190002,202003,100,0.9685,1.8795,89.3761,6598,R,0,0,0,false,false,false
-190002,202004,100,1.113,1,110.5473,700,R,0,0,0,false,true,false
-190003,202001,100,1,0.9214,50.3694,7888,R,0,0,0,true,false,false
+190002,202004,100,1.113,1,110.5473,700,R,0,0,0,false,false,false
+190003,202001,100,1,0.9214,50.3694,7888,R,0,0,0,false,false,false
 190003,202002,100,0.8521,1.5274,121.4187,4218,R,0,0,0,false,false,false
 190003,202003,100,0.9685,1.8795,89.3761,7591,R,0,0,0,false,false,false
-190003,202004,100,1.113,1,110.5473,4077,R,0,0,0,false,true,false
-190004,202001,100,1,0.9214,50.3694,2247,R,0,0,0,true,false,false
+190003,202004,100,1.113,1,110.5473,4077,R,0,0,0,false,false,false
+190004,202001,100,1,0.9214,50.3694,2247,R,0,0,0,false,false,false
 190004,202002,100,0.8521,1.5274,121.4187,1914.6687,FIR,0,0,0,false,false,false
 190004,202003,100,0.9685,1.8795,89.3761,1854.356636,FIR,0,0,0,false,false,false
-190004,202004,100,1.113,1,110.5473,8608,R,0,0,0,false,true,false
-190005,202001,100,1,0.9214,50.3694,6271.13538,BI,0,0,0,true,false,false
+190004,202004,100,1.113,1,110.5473,8608,R,0,0,0,false,false,false
+190005,202001,100,1,0.9214,50.3694,6271.13538,BI,0,0,0,false,false,false
 190005,202002,100,0.8521,1.5274,121.4187,6806.0944,BI,0,0,0,false,false,false
 190005,202003,100,0.9685,1.8795,89.3761,4456,R,0,0,0,false,false,false
-190005,202004,100,1.113,1,110.5473,5134,R,0,0,0,false,true,false
-190006,202001,100,1,0.9214,50.3694,402.9552,C,0,0,0,true,false,false
+190005,202004,100,1.113,1,110.5473,5134,R,0,0,0,false,false,false
+190006,202001,100,1,0.9214,50.3694,402.9552,C,0,0,0,false,false,false
 190006,202002,100,0.8521,1.5274,121.4187,343.3581259,FIC,0,0,0,false,false,false
 190006,202003,100,0.9685,1.8795,89.3761,332.542345,FIC,0,0,0,false,false,false
-190006,202004,100,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,true,false
-190007,202001,100,1,0.9214,50.3694,150000,R,0,0,0,true,false,false
+190006,202004,100,1.113,1,110.5473,370.1196299,FIC,0,0,0,false,false,false
+190007,202001,100,1,0.9214,50.3694,150000,R,0,0,0,false,false,false
 190007,202002,100,0.8521,1.5274,121.4187,120000,R,0,0,0,false,false,false
 190007,202003,100,0.9685,1.8795,89.3761,110000,R,0,0,0,false,false,false
-190007,202004,100,1.113,1,110.5473,180000,R,0,0,0,false,true,false
-190008,202001,100,1,0.9214,50.3694,3576.2274,C,0,0,0,true,false,false
+190007,202004,100,1.113,1,110.5473,180000,R,0,0,0,false,false,false
+190008,202001,100,1,0.9214,50.3694,3576.2274,C,0,0,0,false,false,false
 190008,202002,100,0.8521,1.5274,121.4187,3047.30336754,FIC,0,0,0,false,false,false
 190008,202003,100,0.9685,1.8795,89.3761,2951.313312,FIC,0,0,0,false,false,false
-190008,202004,100,1.113,1,110.5473,3284.81171565775,FIC,0,0,0,false,true,false
+190008,202004,100,1.113,1,110.5473,3284.81171565775,FIC,0,0,0,false,false,false

From 4c63c85610ccb24d64e5e7b91d27dd4cc8d7c17d Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 20 Jun 2023 13:11:21 +0100
Subject: [PATCH 428/531] Increment Version

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 23ce7402..5910bcf2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "13.0.0"
+version = "13.1.0"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From e5d629cbce947c59b908fd3ea87e00e7b6f343b4 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 20 Jun 2023 14:55:04 +0100
Subject: [PATCH 429/531] Black.

---
 statistical_methods_library/imputation/engine.py | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 2ac019f8..636554f8 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -344,12 +344,9 @@ def calculate_ratios():
             ratio_calculators.append(forward_backward_ratio_calculator)
 
         if "construction" in prepared_df.columns:
-            prepared_df = (
-                prepared_df.withColumn(
-                    "default_construction", expr("construction IS NULL")
-                )
-                .withColumn("count_construction", lit(0).cast("long"))
-            )
+            prepared_df = prepared_df.withColumn(
+                "default_construction", expr("construction IS NULL")
+            ).withColumn("count_construction", lit(0).cast("long"))
 
         else:
             ratio_calculators.append(construction_ratio_calculator)

From 9f3def9efff384e79a1a53ed5849cb1532fe8584 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 20 Jun 2023 16:12:10 +0100
Subject: [PATCH 430/531] Add basic release notes

---
 release-notes/13.1.0.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 release-notes/13.1.0.md

diff --git a/release-notes/13.1.0.md b/release-notes/13.1.0.md
new file mode 100644
index 00000000..22101c38
--- /dev/null
+++ b/release-notes/13.1.0.md
@@ -0,0 +1,17 @@
+# Statistical Methods Library 13.1.0
+
+Release date: 2023-06-20
+
+## Synopsis
+
+This release removes the ability to pass null values in link columns to
+imputation.
+
+## Changes
+
+Imputation no longer accepts null values in passed in link columns.
+
+## Notes
+
+This change only impacts input validation and means that values will never be
+defaulted in this case.

From a24111be3f5f54ad66516678a535e4af0a83d45e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 23 Jun 2023 13:50:33 +0100
Subject: [PATCH 431/531] Fix back data handling bug

---
 pyproject.toml                                   |  2 +-
 statistical_methods_library/imputation/engine.py | 13 +++++++++++--
 tests/imputation/test_scenarios.py               | 10 ++--------
 3 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index 5910bcf2..05d7fc02 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "13.1.0"
+version = "13.1.2"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 636554f8..53986b34 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -270,8 +270,16 @@ def impute(
     }
 
     if link_filter:
+        if back_data_df:
+            filtered_refs = input_df.unionByName(
+                back_data_df,
+                allowMissingColumns=True
+            )
+        else:
+            filtered_refs = input_df
+
         filtered_refs = (
-            input_df.unionByName(back_data_df, allowMissingColumns=True).select(
+            filtered_refs.select(
                 col(reference_col).alias("ref"),
                 col(period_col).alias("period"),
                 col(grouping_col).alias("grouping"),
@@ -279,7 +287,8 @@ def impute(
                     expr(link_filter) if isinstance(link_filter, str) else link_filter
                 ).alias("match"),
             )
-        ).localCheckpoint(eager=False)
+            .localCheckpoint(eager=False)
+        )
 
     prepared_df = (
         validate_dataframe(
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 62fccbca..691b316d 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -101,8 +101,8 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     back_data_df = scenario_expected_output.filter(
         col(fields["period_col"]) < starting_period
     )
-
-    imputation_kwargs["back_data_df"] = back_data_df
+    if back_data_df.count() > 0:
+        imputation_kwargs["back_data_df"] = back_data_df
 
     scenario_input = scenario_input.filter(col(fields["period_col"]) >= starting_period)
 
@@ -110,12 +110,6 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
         col(fields["period_col"]) >= starting_period
     )
 
-    # We need to drop our auxiliary column from our output now
-    # we've potentially set up our back data as this must not come out of
-    # imputation.
-    scenario_expected_output = scenario_expected_output.drop(
-        fields["auxiliary_col"],
-    )
     scenario_actual_output = imputation.impute(
         input_df=scenario_input, **imputation_kwargs
     )

From 9212896a69f18b4a8ac87a87ce678749b318307d Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 23 Jun 2023 13:58:14 +0100
Subject: [PATCH 432/531] Fix incorrect version in pyproject file

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 05d7fc02..ec5d4fd2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "13.1.2"
+version = "13.1.1"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From 6dccf1d1c7d8d9edc9cfee440a17928486adbe3d Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 23 Jun 2023 14:08:22 +0100
Subject: [PATCH 433/531] Add release notes

---
 release-notes/13.1.1.md | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 release-notes/13.1.1.md

diff --git a/release-notes/13.1.1.md b/release-notes/13.1.1.md
new file mode 100644
index 00000000..44d688de
--- /dev/null
+++ b/release-notes/13.1.1.md
@@ -0,0 +1,18 @@
+# Statistical Methods Library 13.1.1
+
+Release date: 2023-06-23
+
+## Synopsis
+
+This release fixes a crash when passing a link filter and not passing back
+data to imputation.
+
+## Changes
+
+Imputation can now handle passing a link filter without back data.
+Previously it would incorrectly attempt to use back data in this case and
+crash due to the data frame being None.
+
+## Notes
+
+This change has no impact on existing outputs.

From 87560b9219d093c379f5503c266eb39da7b3e9ef Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 23 Jun 2023 14:13:43 +0100
Subject: [PATCH 434/531] update pr template as internal tickets have no place
 being referenced in public PRs for transparency reasons

---
 .github/pull_request_template.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index f2a983e5..5abfd380 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -9,5 +9,5 @@ Briefly describe the purpose of the pr.
 
 ## Description
 
-Add a more detailed description of the pr including background and ticket
-references if necessary. 
+Add a more detailed description of the pr if necessary (can reference release
+notes if included).

From ce1ae9d5c9c081723b5fe0650a8d668cdd47a232 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 23 Jun 2023 14:13:08 +0100
Subject: [PATCH 435/531] Black

---
 .../imputation/engine.py                      | 24 +++++++------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 53986b34..999363de 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -271,24 +271,18 @@ def impute(
 
     if link_filter:
         if back_data_df:
-            filtered_refs = input_df.unionByName(
-                back_data_df,
-                allowMissingColumns=True
-            )
+            filtered_refs = input_df.unionByName(back_data_df, allowMissingColumns=True)
         else:
             filtered_refs = input_df
 
-        filtered_refs = (
-            filtered_refs.select(
-                col(reference_col).alias("ref"),
-                col(period_col).alias("period"),
-                col(grouping_col).alias("grouping"),
-                (
-                    expr(link_filter) if isinstance(link_filter, str) else link_filter
-                ).alias("match"),
-            )
-            .localCheckpoint(eager=False)
-        )
+        filtered_refs = filtered_refs.select(
+            col(reference_col).alias("ref"),
+            col(period_col).alias("period"),
+            col(grouping_col).alias("grouping"),
+            (expr(link_filter) if isinstance(link_filter, str) else link_filter).alias(
+                "match"
+            ),
+        ).localCheckpoint(eager=False)
 
     prepared_df = (
         validate_dataframe(

From 2d5fed05df133c451d6c2ced656cb4698f6adc32 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 23 Jun 2023 14:17:36 +0100
Subject: [PATCH 436/531] Remove isort config

---
 .isort.cfg | 3 ---
 1 file changed, 3 deletions(-)
 delete mode 100644 .isort.cfg

diff --git a/.isort.cfg b/.isort.cfg
deleted file mode 100644
index 8f10eb65..00000000
--- a/.isort.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-[settings]
-line_length=90
-known_third_party=boto3,moto,pandas,numpy

From c51c1aad6d3101b7dbccecd567a8ab77437c414c Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Fri, 23 Jun 2023 14:19:18 +0100
Subject: [PATCH 437/531] Ran poetry update

---
 poetry.lock | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index a30785b9..01212db1 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand.
 
 [[package]]
 name = "black"
@@ -270,14 +270,14 @@ files = [
 
 [[package]]
 name = "platformdirs"
-version = "3.6.0"
+version = "3.8.0"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-3.6.0-py3-none-any.whl", hash = "sha256:ffa199e3fbab8365778c4a10e1fbf1b9cd50707de826eb304b50e57ec0cc8d38"},
-    {file = "platformdirs-3.6.0.tar.gz", hash = "sha256:57e28820ca8094678b807ff529196506d7a21e17156cb1cddb3e74cebce54640"},
+    {file = "platformdirs-3.8.0-py3-none-any.whl", hash = "sha256:ca9ed98ce73076ba72e092b23d3c93ea6c4e186b3f1c3dad6edd98ff6ffcca2e"},
+    {file = "platformdirs-3.8.0.tar.gz", hash = "sha256:b0cabcb11063d21a0b261d557acb0a9d2126350e63b70cdf7db6347baea456dc"},
 ]
 
 [package.dependencies]
@@ -289,14 +289,14 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-
 
 [[package]]
 name = "pluggy"
-version = "1.1.0"
+version = "1.2.0"
 description = "plugin and hook calling mechanisms for python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pluggy-1.1.0-py3-none-any.whl", hash = "sha256:d81d19a3a88d82ed06998353ce5d5c02587ef07ee2d808ae63904ab0ccef0087"},
-    {file = "pluggy-1.1.0.tar.gz", hash = "sha256:c500b592c5512df35622e4faf2135aa0b7e989c7d31344194b4afb9d5e47b1bf"},
+    {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"},
+    {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"},
 ]
 
 [package.dependencies]
@@ -364,14 +364,14 @@ sql = ["pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
 
 [[package]]
 name = "pytest"
-version = "7.3.2"
+version = "7.4.0"
 description = "pytest: simple powerful testing with Python"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pytest-7.3.2-py3-none-any.whl", hash = "sha256:cdcbd012c9312258922f8cd3f1b62a6580fdced17db6014896053d47cddf9295"},
-    {file = "pytest-7.3.2.tar.gz", hash = "sha256:ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b"},
+    {file = "pytest-7.4.0-py3-none-any.whl", hash = "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32"},
+    {file = "pytest-7.4.0.tar.gz", hash = "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a"},
 ]
 
 [package.dependencies]

From df6b393a5a000acb9ede21b9055d6fca8ef09fb9 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 23 Jun 2023 14:19:31 +0100
Subject: [PATCH 438/531] We no longer use portray

---
 .gitignore | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 03afd6bc..c9759bb4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -121,8 +121,6 @@ venv.bak/
 .devcontainer/
 # Editor backup files
 *~
-# portray generated docs
-site/
+
 # asdf tool versions
 .tool-versions
-

From ee40db4357a5ec281cf6fcdbe6507be228ff897c Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 23 Jun 2023 14:30:42 +0100
Subject: [PATCH 439/531] Move flake8 config to pyproject.toml

---
 .flake8        | 3 ---
 pyproject.toml | 5 +++++
 2 files changed, 5 insertions(+), 3 deletions(-)
 delete mode 100644 .flake8

diff --git a/.flake8 b/.flake8
deleted file mode 100644
index e6825b1e..00000000
--- a/.flake8
+++ /dev/null
@@ -1,3 +0,0 @@
-[flake8]
-max-line-length = 90 
-exclude = .venv
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index ec5d4fd2..4c3373b9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -31,3 +31,8 @@ addopts = [
 [build-system]
 requires = ["poetry-core>=1.0.0"]
 build-backend = "poetry.core.masonry.api"
+
+
+[tool.flake8]
+max-line-length = 90 
+exclude = ".venv"

From 918bbd518d80e3211a9d6de7c85d1356272b6bbb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 23 Jun 2023 14:32:46 +0100
Subject: [PATCH 440/531] Add flake8 plugin to make flake8 support
 pyproject.toml

---
 poetry.lock    | 22 ++++++++++++++++++++--
 pyproject.toml |  1 +
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 01212db1..7c84cca4 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand.
+# This file is automatically @generated by Poetry and should not be changed by hand.
 
 [[package]]
 name = "black"
@@ -188,6 +188,24 @@ mccabe = ">=0.7.0,<0.8.0"
 pycodestyle = ">=2.9.0,<2.10.0"
 pyflakes = ">=2.5.0,<2.6.0"
 
+[[package]]
+name = "flake8-pyproject"
+version = "1.2.3"
+description = "Flake8 plug-in loading the configuration from pyproject.toml"
+category = "dev"
+optional = false
+python-versions = ">= 3.6"
+files = [
+    {file = "flake8_pyproject-1.2.3-py3-none-any.whl", hash = "sha256:6249fe53545205af5e76837644dc80b4c10037e73a0e5db87ff562d75fb5bd4a"},
+]
+
+[package.dependencies]
+Flake8 = ">=5"
+TOMLi = {version = "*", markers = "python_version < \"3.11\""}
+
+[package.extras]
+dev = ["pyTest", "pyTest-cov"]
+
 [[package]]
 name = "importlib-metadata"
 version = "4.2.0"
@@ -539,4 +557,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = ">=3.7"
-content-hash = "d6aa65a1cfc41899e6779db84d3c7968db6e998e1ea2332515e5f3783e0f4a04"
+content-hash = "a3265aae0cbe4b6166ebe35b22755bb8e0f8e834d6fb6e6cc834e3338aaf9922"
diff --git a/pyproject.toml b/pyproject.toml
index 4c3373b9..c1d8f213 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -18,6 +18,7 @@ coverage = "^7.2"
 pytest-cov = "^4.1.0"
 pytest-dependency = "^0.5.1"
 pytest-tap = "^3.3"
+flake8-pyproject = "^1.2.3"
 
 [tool.pytest.ini_options]
 junit_suite_name = "statistical_methods_library"

From 846616041365a30940bb6d9b12f65ad361e0b343 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 18 Jul 2023 12:13:09 +0100
Subject: [PATCH 441/531] New Tests

---
 .../68_BI_BI_R_FI_FI_R_FI_filtered_input.csv  | 37 +++++++++++++++++++
 .../68_BI_BI_R_FI_FI_R_FI_filtered_output.csv | 37 +++++++++++++++++++
 .../69_BI_BI_R_80_weight_input.csv            | 13 +++++++
 .../69_BI_BI_R_80_weight_output.csv           | 25 +++++++++++++
 .../70_C_FI_FI_65_weight_input.csv            | 13 +++++++
 .../70_C_FI_FI_65_weight_output.csv           | 25 +++++++++++++
 tests/imputation/default.toml                 |  3 ++
 tests/imputation/mean_of_ratios.toml          | 11 ++++++
 8 files changed, 164 insertions(+)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_80_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_80_weight_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_C_FI_FI_65_weight_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_C_FI_FI_65_weight_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_input.csv
new file mode 100644
index 00000000..d6411301
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_input.csv
@@ -0,0 +1,37 @@
+identifier,date,group,question,other,filter_col
+70001,202001,100,5951,39,N
+70001,202002,100,1814,39,N
+70001,202003,100,734,39,N
+70001,202004,100,96,39,N
+70001,202005,100,9086,39,Y
+70001,202006,100,3949,39,N
+70001,202007,100,49,39,N
+70002,202001,100,6705,94,N
+70002,202002,100,48,94,Y
+70002,202003,100,5361,94,N
+70002,202004,100,8767,94,N
+70002,202005,100,9214,94,N
+70002,202006,100,7467,94,N
+70002,202007,100,3475,94,N
+70003,202001,100,6153,42,N
+70003,202002,100,7711,42,N
+70003,202003,100,5403,42,N
+70003,202004,100,7445,42,N
+70003,202005,100,7092,42,N
+70003,202006,100,2038,42,N
+70003,202007,100,8768,42,N
+70004,202001,100,,6,
+70004,202002,100,,6,
+70004,202003,100,6288,6,N
+70004,202004,100,,6,
+70004,202005,100,,6,
+70004,202006,100,5875,6,N
+70004,202007,100,,6,
+70005,202001,100,150000,85,Y
+70005,202002,100,180000,85,Y
+70005,202003,100,120000,85,Y
+70005,202004,100,130000,85,Y
+70005,202005,100,110000,85,Y
+70005,202006,100,105000,85,Y
+70005,202007,100,170000,85,Y
+70005,202008,100,2000,85,N
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_output.csv
new file mode 100644
index 00000000..af467162
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_output.csv
@@ -0,0 +1,37 @@
+identifier,date,group,filter_col,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+70001,202001,100,N,,3.280595369,1,2.039273174,107.48,5951,R,0,2,3,true,,true,true,false,false
+70001,202002,100,N,0.304822719,2.471389646,0.779016268,1.949279868,117.5925926,1814,R,2,2,2,true,true,true,false,false,false
+70001,202003,100,N,0.40463065,7.645833333,0.55265899,2.994350985,98.26519337,734,R,2,3,4,true,true,true,false,false,false
+70001,202004,100,N,0.130790191,,1.048019201,1.000630631,93.18857143,96,R,3,2,3,true,true,false,false,false,false
+70001,202005,100,Y,,,1.001786141,2.356922504,119.8970588,9086,R,2,2,2,false,true,true,false,false,false
+70001,202006,100,N,,80.59183673,0.548881634,27.65768328,106.7900552,3949,R,2,3,4,true,false,true,false,false,false
+70001,202007,100,N,0.012408205,,1.593348776,1,70.24,49,R,3,0,3,true,true,,false,true,false
+70002,202001,100,N,,,1,2.039273174,107.48,6705,R,0,2,3,true,,false,true,false,false
+70002,202002,100,Y,,,0.779016268,1.949279868,117.5925926,48,R,2,2,2,false,true,true,false,false,false
+70002,202003,100,N,,0.611497662,0.55265899,2.994350985,98.26519337,5361,R,2,3,4,true,false,true,false,false,false
+70002,202004,100,N,1.63532923,0.951486868,1.048019201,1.000630631,93.18857143,8767,R,3,2,3,true,true,true,false,false,false
+70002,202005,100,N,1.050986654,1.23396277,1.001786141,2.356922504,119.8970588,9214,R,2,2,2,true,true,true,false,false,false
+70002,202006,100,N,0.810397222,2.148776978,0.548881634,27.65768328,106.7900552,7467,R,2,3,4,true,true,true,false,false,false
+70002,202007,100,N,0.46538101,,1.593348776,1,70.24,3475,R,3,0,3,true,true,,false,true,false
+70003,202001,100,N,,0.797950979,1,2.039273174,107.48,6153,R,0,2,3,true,,true,true,false,false
+70003,202002,100,N,1.253209816,1.427170091,0.779016268,1.949279868,117.5925926,7711,R,2,2,2,true,true,true,false,false,false
+70003,202003,100,N,0.70068733,0.725721961,0.55265899,2.994350985,98.26519337,5403,R,2,3,4,true,true,true,false,false,false
+70003,202004,100,N,1.377938182,1.049774394,1.048019201,1.000630631,93.18857143,7445,R,3,2,3,true,true,true,false,false,false
+70003,202005,100,N,0.952585628,3.479882237,1.001786141,2.356922504,119.8970588,7092,R,2,2,2,true,true,true,false,false,false
+70003,202006,100,N,0.287366046,0.232436131,0.548881634,27.65768328,106.7900552,2038,R,2,3,4,true,true,true,false,false,false
+70003,202007,100,N,4.302257115,,1.593348776,1,70.24,8768,R,3,0,3,true,true,,false,true,false
+70004,202001,100,,,,1,2.039273174,107.48,24995.51774,BI,0,2,3,,,,true,false,false
+70004,202002,100,,,,0.779016268,1.949279868,117.5925926,12257.07181,BI,2,2,2,,,,false,false,false
+70004,202003,100,N,,,0.55265899,2.994350985,98.26519337,6288,R,2,3,4,true,,,false,false,false
+70004,202004,100,,,,1.048019201,1.000630631,93.18857143,6589.944736,FIR,3,2,3,,,,false,false,false
+70004,202005,100,,,,1.001786141,2.356922504,119.8970588,6601.715307,FIR,2,2,2,,,,false,false,false
+70004,202006,100,N,,,0.548881634,27.65768328,106.7900552,5875,R,2,3,4,true,,,false,false,false
+70004,202007,100,,,,1.593348776,1,70.24,9360.924061,FIR,3,0,3,,,,false,true,false
+70005,202001,100,Y,,,1,2.039273174,107.48,150000,R,0,2,3,false,,false,true,false,false
+70005,202002,100,Y,,,0.779016268,1.949279868,117.5925926,180000,R,2,2,2,false,false,false,false,false,false
+70005,202003,100,Y,,,0.55265899,2.994350985,98.26519337,120000,R,2,3,4,false,false,false,false,false,false
+70005,202004,100,Y,,,1.048019201,1.000630631,93.18857143,130000,R,3,2,3,false,false,false,false,false,false
+70005,202005,100,Y,,,1.001786141,2.356922504,119.8970588,110000,R,2,2,2,false,false,false,false,false,false
+70005,202006,100,Y,,,0.548881634,27.65768328,106.7900552,105000,R,2,3,4,false,false,false,false,false,false
+70005,202007,100,Y,,,1.593348776,1,70.24,170000,R,3,0,3,false,false,true,false,true,false
+70005,202008,100,N,,,1,1,23.52941176,2000,R,0,0,1,true,false,,true,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_80_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_80_weight_input.csv
new file mode 100644
index 00000000..dd22608a
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_80_weight_input.csv
@@ -0,0 +1,13 @@
+identifier,date,group,question,other
+60001,202001,100,5077,15
+60001,202002,100,7830,15
+60001,202003,100,1046,15
+60002,202001,100,1588,71
+60002,202002,100,1213,71
+60002,202003,100,3807,71
+60003,202001,100,6541,26
+60003,202002,100,336,26
+60003,202003,100,6351,26
+60004,202001,100,,3
+60004,202002,100,,3
+60004,202003,100,401,3
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_80_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_80_weight_output.csv
new file mode 100644
index 00000000..5440155d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/69_BI_BI_R_80_weight_output.csv
@@ -0,0 +1,25 @@
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,,0.648403576,1,7.141605449,117.9107143,1,6.018764359,104.4024514,5077,R,0,3,3,true,false,false
+60001,202002,100,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,0.822359082,2.471150213,91.27659714,7830,R,3,3,3,false,false,false
+60001,202003,100,0.133588761,,7.391291354,1,100.913043,6.135633083,1,98.6056548,1046,R,3,0,4,false,true,false
+60002,202001,100,,1.309150866,1,7.141605449,117.9107143,1,6.018764359,104.4024514,1588,R,0,3,3,true,false,false
+60002,202002,100,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,0.822359082,2.471150213,91.27659714,1213,R,3,3,3,false,false,false
+60002,202003,100,3.138499588,,7.391291354,1,100.913043,6.135633083,1,98.6056548,3807,R,3,0,4,false,true,false
+60003,202001,100,,19.4672619,1,7.141605449,117.9107143,1,6.018764359,104.4024514,6541,R,0,3,3,true,false,false
+60003,202002,100,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,0.822359082,2.471150213,91.27659714,336,R,3,3,3,false,false,false
+60003,202003,100,18.90178571,,7.391291354,1,100.913043,6.135633083,1,98.6056548,6351,R,3,0,4,false,true,false
+60004,202001,100,,,1,7.141605449,117.9107143,1,6.018764359,104.4024514,5964.181602,BI,0,3,3,true,false,false
+60004,202002,100,,,0.785823852,2.619062766,83.74107143,0.822359082,2.471150213,91.27659714,990.9312353,BI,3,3,3,false,false,false
+60004,202003,100,,,7.391291354,1,100.913043,6.135633083,1,98.6056548,401,R,3,0,4,false,true,false
+60001,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+60001,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+60001,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
+60002,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+60002,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+60002,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
+60003,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+60003,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+60003,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
+60004,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+60004,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+60004,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_C_FI_FI_65_weight_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_C_FI_FI_65_weight_input.csv
new file mode 100644
index 00000000..9004a1cc
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_C_FI_FI_65_weight_input.csv
@@ -0,0 +1,13 @@
+identifier,date,group,question,other
+30001,202001,100,8444,51
+30001,202002,100,7476,51
+30001,202003,100,2003,51
+30002,202001,100,9343,72
+30002,202002,100,7818,72
+30002,202003,100,4897,72
+30003,202001,100,7511,7
+30003,202002,100,1761,7
+30003,202003,100,6492,7
+30004,202001,100,,81
+30004,202002,100,,81
+30004,202003,100,,81
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_C_FI_FI_65_weight_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_C_FI_FI_65_weight_output.csv
new file mode 100644
index 00000000..0ec0b19a
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/70_C_FI_FI_65_weight_output.csv
@@ -0,0 +1,25 @@
+identifier,date,group,growth_forward,growth_backward,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,2.196577972,194.6,1,1.962365682,144.11929,8444,R,0,3,3,true,false,false
+30001,202002,100,0.885362387,3.732401398,0.652198238,1.866715325,131.1923077,0.762903855,1.871189961,127.771545,7476,R,3,3,3,false,false,false
+30001,202003,100,0.267924024,,1.526946931,1,103.015385,1.382065505,1,98.241635,2003,R,3,0,3,false,true,false
+30002,202001,100,,1.195062676,1,2.196577972,194.6,1,1.962365682,144.11929,9343,R,0,3,3,true,false,false
+30002,202002,100,0.836776196,1.596487645,0.652198238,1.866715325,131.1923077,0.762903855,1.871189961,127.771545,7818,R,3,3,3,false,false,false
+30002,202003,100,0.626375032,,1.526947,1,103.015385,1.38206555,1,98.241635,4897,R,3,0,3,false,true,false
+30003,202001,100,,4.265190233,1,2.196577972,194.6,1,1.962365682,144.11929,7511,R,0,3,3,true,false,false
+30003,202002,100,0.234456131,0.271256932,0.652198238,1.866715325,131.1923077,0.762903855,1.871189961,127.771545,1761,R,3,3,3,false,false,false
+30003,202003,100,3.686541738,,1.526947,1,103.015385,1.38206555,1,98.241635,6492,R,3,0,3,false,true,false
+30004,202001,100,,,1,2.196577972,194.6,1,1.962365682,144.11929,11673.66249,C,0,3,3,true,false,false
+30004,202002,100,,,0.652198238,1.866715325,131.1923077,0.762903855,1.871189961,127.771545,8905.882114,FIC,3,3,3,false,false,false
+30004,202003,100,,,1.526947,1,103.015385,1.38206555,1,98.241635,12308.512463,FIC,3,0,3,false,true,false
+30001,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+30001,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+30001,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
+30002,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+30002,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+30002,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
+30003,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+30003,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+30003,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
+30004,201901,100,,,1,1.5274,50.3694,,,,0,R,,,,,,
+30004,201902,100,,,0.9685,1.8795,121.4187,,,,0,R,,,,,,
+30004,201903,100,,,1.113,1,89.3761,,,,0,R,,,,,,
diff --git a/tests/imputation/default.toml b/tests/imputation/default.toml
index f7c9887e..fc0108c8 100644
--- a/tests/imputation/default.toml
+++ b/tests/imputation/default.toml
@@ -24,6 +24,7 @@ link_inclusion_next_col = "link_inclusion_next"
 unweighted_construction_link_col = "unweighted_construction"
 unweighted_backward_link_col = "unweighted_backward"
 unweighted_forward_link_col = "unweighted_forward"
+filter_col = "filter_col"
 
 [field_types]
 reference_col = "string"
@@ -49,3 +50,5 @@ link_inclusion_next_col = "boolean"
 unweighted_construction_link_col = "decimal(15,6)"
 unweighted_backward_link_col = "decimal(15,6)"
 unweighted_forward_link_col = "decimal(15,6)"
+
+filter_col = "string"
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 1ff30f2f..cc83919b 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -184,3 +184,14 @@ weight_periodicity_multiplier = 12
 lower_trim = 10
 upper_trim = 10
 trim_threshold = 10
+
+[scenarios.68_BI_BI_R_FI_FI_R_FI_filtered]
+link_filter = "filter_col != 'Y'"
+
+[scenarios.69_BI_BI_R_80_weight]
+weight = "0.8"
+weight_periodicity_multiplier = 12
+
+[scenarios.70_C_FI_FI_65_weight]
+weight = "0.65"
+weight_periodicity_multiplier = 12

From 5df370ab50a18cf0466515d93816f939c92957e1 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 18 Jul 2023 12:16:21 +0100
Subject: [PATCH 442/531] Ignore libreoffice lock files

---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitignore b/.gitignore
index c9759bb4..5e7dc12d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -124,3 +124,5 @@ venv.bak/
 
 # asdf tool versions
 .tool-versions
+# libreoffice lock files (sometimes used when editing csvs)
+*.~lock.*

From d69db69d0233708a7d3226cef7896dc64c6ba511 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 18 Jul 2023 12:41:38 +0100
Subject: [PATCH 443/531] Corrections.

---
 statistical_methods_library/imputation/engine.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 999363de..0eb335cb 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -128,10 +128,10 @@ def impute(
           value was included in link calculations based on filtering for the
           next period.
         back_data_df: The back data data frame.
-        link_filter: An inclusive filter that specifies whether a responce
+        link_filter: An inclusive filter that specifies whether a response
           can be used for ratio calculation. The link inclusion marker
           columns will only be present in the output if this is provided.
-          This filter is either a boolen column expression or a spark
+          This filter is either a boolean column expression or a spark
           sql string which yields a boolean result.
         periodicity: The periodicity of the data as used by the calculation
           functions in the `utilities.periods` module.
@@ -158,9 +158,8 @@ def impute(
 
     Returns:
     A data frame containing the imputed variable and links. The exact columns
-    depend on the provided arguments.
-    the specified arguments. The data frame contains a row for each reference,
-    period and grouping combination in the input data.
+    depend on the provided arguments. The data frame contains a row for each
+    reference, period and grouping combination in the input data.
 
     Either both or neither of `weight` and `weight_periodicity_multiplier`
     must be specified.

From f9532a4eb2476644817ab9379a2b144379e96791 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 18 Jul 2023 12:42:39 +0100
Subject: [PATCH 444/531] Support excluding fields in equality checker

---
 tests/helpers.py                   | 11 ++++++++---
 tests/imputation/default.toml      |  4 +---
 tests/imputation/test_scenarios.py | 12 ++++++++----
 3 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/tests/helpers.py b/tests/helpers.py
index 006b2d72..ad98c242 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -11,13 +11,18 @@
 from pytest import fail
 
 
-def check_df_equality(expected, actual, keep_cols=None):
+def check_df_equality(expected, actual, keep_cols=None, exclude_cols=None):
     if keep_cols is None:
         keep_cols = []
     else:
         keep_cols = list(keep_cols)
+
+    if exclude_cols is None:
+        exclude_cols = set()
+    else:
+        exclude_cols = set(exclude_cols)
     msg = []
-    expected_cols = set(expected.columns)
+    expected_cols = set(expected.columns) - exclude_cols
     actual_cols = set(actual.columns)
     expected_col_check = expected_cols - actual_cols
     actual_col_check = actual_cols - expected_cols
@@ -30,7 +35,7 @@ def check_df_equality(expected, actual, keep_cols=None):
     if msg:
         fail("\n".join(msg))
 
-    col_list = sorted(expected.columns)
+    col_list = sorted(expected_cols)
     expected = (
         expected.select(col_list)
         .alias("expected")
diff --git a/tests/imputation/default.toml b/tests/imputation/default.toml
index fc0108c8..6cdd7bc5 100644
--- a/tests/imputation/default.toml
+++ b/tests/imputation/default.toml
@@ -1,6 +1,6 @@
 starting_period = "202001"
 back_data_starting_period = "202002"
-
+excluded_fields = ["filter_col"]
 [field_names]
 auxiliary_col = "other"
 backward_col = "backward"
@@ -46,9 +46,7 @@ default_construction_col = "boolean"
 link_inclusion_current_col = "boolean"
 link_inclusion_previous_col = "boolean"
 link_inclusion_next_col = "boolean"
-
 unweighted_construction_link_col = "decimal(15,6)"
 unweighted_backward_link_col = "decimal(15,6)"
 unweighted_forward_link_col = "decimal(15,6)"
-
 filter_col = "string"
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 691b316d..aa239661 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -60,6 +60,9 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     fields = default_config["field_names"]
     fields.update(test_config.get("field_names", {}))
     fields.update(scenario_config.pop("field_names", {}))
+    excluded_fields = default_config.get("excluded_fields", [])
+    excluded_fields.extend(test_config.get("excluded_fields", []))
+    excluded_fields.extend(scenario_config.pop("excluded_fields", []))
     imputation_kwargs = fields.copy()
     imputation_kwargs["forward_backward_ratio_calculator"] = getattr(
         imputation, ratio_calculator
@@ -120,13 +123,14 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
             )
 
     select_cols = sorted(set(fields.values()) & set(scenario_expected_output.columns))
-    sort_col_list = [
+    sort_cols = [
         fields["reference_col"],
         fields["period_col"],
         fields["grouping_col"],
     ]
     check_df_equality(
-        actual=scenario_actual_output.sort(sort_col_list).select(select_cols),
-        expected=scenario_expected_output.sort(sort_col_list).select(select_cols),
-        keep_cols=sort_col_list,
+        actual=scenario_actual_output.sort(sort_cols).select(select_cols),
+        expected=scenario_expected_output.sort(sort_cols).select(select_cols),
+        keep_cols=sort_cols,
+        exclude_cols=excluded_fields
     )

From b94dccfa54dded4a115a1af6a37ac44dc343602d Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 18 Jul 2023 13:15:42 +0100
Subject: [PATCH 445/531] Remove unnecessary select from scenario runner which
 was breaking after excluded columns

---
 tests/imputation/test_scenarios.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index aa239661..5f5f94ed 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -122,15 +122,14 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
                 field_name, col(field_name).cast("decimal(15, 6)")
             )
 
-    select_cols = sorted(set(fields.values()) & set(scenario_expected_output.columns))
     sort_cols = [
         fields["reference_col"],
         fields["period_col"],
         fields["grouping_col"],
     ]
     check_df_equality(
-        actual=scenario_actual_output.sort(sort_cols).select(select_cols),
-        expected=scenario_expected_output.sort(sort_cols).select(select_cols),
+        actual=scenario_actual_output.sort(sort_cols),
+        expected=scenario_expected_output.sort(sort_cols),
         keep_cols=sort_cols,
         exclude_cols=excluded_fields
     )

From ceaaf03e0076392d914d4cb3fbf3a542a25a5245 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 18 Jul 2023 13:23:46 +0100
Subject: [PATCH 446/531] Final Corrections

---
 .../68_BI_BI_R_FI_FI_R_FI_filtered_output.csv                 | 4 ++--
 tests/imputation/test_scenarios.py                            | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_output.csv
index af467162..a4d58290 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/68_BI_BI_R_FI_FI_R_FI_filtered_output.csv
@@ -20,8 +20,8 @@ identifier,date,group,filter_col,growth_forward,growth_backward,forward,backward
 70003,202005,100,N,0.952585628,3.479882237,1.001786141,2.356922504,119.8970588,7092,R,2,2,2,true,true,true,false,false,false
 70003,202006,100,N,0.287366046,0.232436131,0.548881634,27.65768328,106.7900552,2038,R,2,3,4,true,true,true,false,false,false
 70003,202007,100,N,4.302257115,,1.593348776,1,70.24,8768,R,3,0,3,true,true,,false,true,false
-70004,202001,100,,,,1,2.039273174,107.48,24995.51774,BI,0,2,3,,,,true,false,false
-70004,202002,100,,,,0.779016268,1.949279868,117.5925926,12257.07181,BI,2,2,2,,,,false,false,false
+70004,202001,100,,,,1,2.039273174,107.48,24995.517739,BI,0,2,3,,,,true,false,false
+70004,202002,100,,,,0.779016268,1.949279868,117.5925926,12257.071811,BI,2,2,2,,,,false,false,false
 70004,202003,100,N,,,0.55265899,2.994350985,98.26519337,6288,R,2,3,4,true,,,false,false,false
 70004,202004,100,,,,1.048019201,1.000630631,93.18857143,6589.944736,FIR,3,2,3,,,,false,false,false
 70004,202005,100,,,,1.001786141,2.356922504,119.8970588,6601.715307,FIR,2,2,2,,,,false,false,false
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 5f5f94ed..5dad95bb 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -131,5 +131,5 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
         actual=scenario_actual_output.sort(sort_cols),
         expected=scenario_expected_output.sort(sort_cols),
         keep_cols=sort_cols,
-        exclude_cols=excluded_fields
+        exclude_cols=excluded_fields,
     )

From f78b19cdc50474007d7ea87801a872bb891d96c7 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 18 Jul 2023 15:15:30 +0100
Subject: [PATCH 447/531] Switch to native tb mode by default

---
 pyproject.toml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index c1d8f213..02ac63a3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -26,7 +26,8 @@ addopts = [
     "--exitfirst",
     "--cov=statistical_methods_library",
     "--cov-fail-under=95",
-    "--import-mode=importlib"
+    "--import-mode=importlib",
+    "--tb=native"
 ]
 
 [build-system]

From e903b07f7a0288a71fc288bac79a137b03ffe113 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Tue, 18 Jul 2023 15:21:03 +0100
Subject: [PATCH 448/531] Fix equality check to actually print the extra column
 list

---
 tests/helpers.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/helpers.py b/tests/helpers.py
index ad98c242..77f403bc 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -27,10 +27,10 @@ def check_df_equality(expected, actual, keep_cols=None, exclude_cols=None):
     expected_col_check = expected_cols - actual_cols
     actual_col_check = actual_cols - expected_cols
     if expected_col_check:
-        msg.append("extra columns in expected: {', '.join(expected_col_check)}")
+        msg.append(f"extra columns in expected: {', '.join(expected_col_check)}")
 
     if actual_col_check:
-        msg.append("extra columns in actual: {', '.join(actual_col_check)}")
+        msg.append(f"extra columns in actual: {', '.join(actual_col_check)}")
 
     if msg:
         fail("\n".join(msg))

From b083498a947a98ef6b05f4ba49a9b8942a17f3f0 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 18 Jul 2023 15:34:09 +0100
Subject: [PATCH 449/531] Missing Columns For Comparison

---
 .../26_C_FI_FI_NS_BI_BI_R_filtered_output.csv |  84 ++++++------
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv |  84 ++++++------
 .../29_mixed_data_filtered_output.csv         | 128 +++++++++---------
 ...30_class_change_C_C_FI_filtered_output.csv |  56 ++++----
 4 files changed, 176 insertions(+), 176 deletions(-)

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
index 12afeabf..e2b8b8a6 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/26_C_FI_FI_NS_BI_BI_R_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-140001,202001,100,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
-140001,202002,100,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
-140001,202003,100,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
-140001,202004,100,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
-140001,202005,100,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
-140001,202006,100,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
-140001,202007,100,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140002,202001,100,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
-140002,202002,100,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
-140002,202003,100,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
-140002,202004,100,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
-140002,202005,100,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
-140002,202006,100,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
-140002,202007,100,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140003,202001,100,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true
-140003,202002,100,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true
-140003,202003,100,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true
-140003,202004,100,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true
-140003,202005,100,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true
-140003,202006,100,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true
-140003,202007,100,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140004,202001,100,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
-140004,202002,100,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
-140004,202003,100,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
-140004,202005,100,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
-140004,202006,100,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
-140004,202007,100,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true
-140005,202001,100,150000,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false
-140005,202002,100,180000,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false
-140005,202003,100,120000,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false
-140005,202004,100,115000,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false
-140005,202005,100,105000,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false
-140005,202006,100,110000,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false
-140005,202007,100,160000,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false
-140006,202001,100,3346.63316582915,C,1,0.483330757,47.13567839,0,3,3,true,false,false,
-140006,202002,100,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,
-140006,202003,100,4447.66834170854,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,
-140006,202004,100,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,
-140006,202005,100,4517.95477386935,FIC,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,
-140006,202006,100,9023.06532663316,FIC,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,
-140006,202007,100,4837.63316582914,FIC,0.536140767,1,91.6387665198238,3,0,4,false,true,false,
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next
+140001,202001,100,3582,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true,,true
+140001,202002,100,4533,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true,true,true
+140001,202003,100,4471,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true,true,true
+140001,202004,100,3040,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true,true,true
+140001,202005,100,8519,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true,true,true
+140001,202006,100,8690,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true,true,true
+140001,202007,100,9979,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true,true,
+140002,202001,100,5359,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true,,true
+140002,202002,100,7091,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true,true,true
+140002,202003,100,7098,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true,true,true
+140002,202004,100,7408,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true,true,true
+140002,202005,100,1937,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true,true,true
+140002,202006,100,6711,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true,true,true
+140002,202007,100,1052,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true,true,
+140003,202001,100,439,R,1,0.483330757,47.13567839,0,3,3,true,false,false,true,,true
+140003,202002,100,7783,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,true,true,true
+140003,202003,100,897,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,true,true,true
+140003,202004,100,8477,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,true,true,true
+140003,202005,100,2207,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,true,true,true
+140003,202006,100,9889,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,true,true,true
+140003,202007,100,2528,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true,true,
+140004,202001,100,1319.798995,C,1,0.483330757,47.13567839,0,3,3,true,false,false,,,
+140004,202002,100,2730.633166,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,,,
+140004,202003,100,1754.01005,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,,,
+140004,202005,100,6764.371192,BI,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,,,
+140004,202006,100,13509.511763,BI,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,,,
+140004,202007,100,7243,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,true,,
+140005,202001,100,150000,R,1,0.483330757,47.13567839,0,3,3,true,false,false,false,,false
+140005,202002,100,180000,R,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,false,false,false
+140005,202003,100,120000,R,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,false,false,false
+140005,202004,100,115000,R,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,false,false,false
+140005,202005,100,105000,R,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,false,false,false
+140005,202006,100,110000,R,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,false,false,false
+140005,202007,100,160000,R,0.536140767,1,91.6387665198238,3,0,4,false,true,false,false,false,
+140006,202001,100,3346.63316582915,C,1,0.483330757,47.13567839,0,3,3,true,false,false,,,
+140006,202002,100,6924.10552763819,FIC,2.068976546,1.556794481,97.52261307,3,3,3,false,false,false,,,
+140006,202003,100,4447.66834170854,FIC,0.642345545,0.658705416,62.64321608,3,3,3,false,false,false,,,
+140006,202004,100,6752.135679,FIC,1.518129312,1.494511569,95.10050251,3,3,3,false,false,false,,,
+140006,202005,100,4517.95477386935,FIC,0.669114927,0.500711744,63.63316583,3,3,3,false,false,false,,,
+140006,202006,100,9023.06532663316,FIC,1.997157072,1.865181798,127.0854271,3,3,3,false,false,false,,,
+140006,202007,100,4837.63316582914,FIC,0.536140767,1,91.6387665198238,3,0,4,false,true,false,,,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index 7c921b74..1bcd360c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -1,42 +1,42 @@
-identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-150001,202001,100,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
-150001,202002,100,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
-150001,202003,100,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150001,202004,100,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
-150001,202005,100,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150001,202006,100,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
-150001,202007,100,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
-150002,202001,100,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
-150002,202002,100,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
-150002,202003,100,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150002,202004,100,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
-150002,202005,100,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150002,202006,100,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
-150002,202007,100,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
-150003,202001,100,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true
-150003,202002,100,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true
-150003,202003,100,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150003,202004,100,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true
-150003,202005,100,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150003,202006,100,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true
-150003,202007,100,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true
-150004,202001,100,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,
-150004,202002,100,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
-150004,202003,100,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true
-150004,202005,100,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true
-150004,202006,100,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
-150004,202007,100,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,
-150005,202001,100,150000,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false
-150005,202002,100,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false
-150005,202003,100,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false
-150005,202004,100,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false
-150006,202005,100,105000,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false
-150006,202006,100,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false
-150006,202007,100,125000,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false
-150007,202001,100,12857.4545454545,C,1,0.887085601,181.0909091,0,3,3,true,false,false,
-150007,202002,100,14494.0404040404,FIC,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,
-150007,202003,100,10188.8585858586,FIC,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,
-150007,202004,100,13914.5656565657,FIC,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,
-150007,202005,100,13021.6868686869,FIC,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,
-150007,202006,100,7607.75757575758,FIC,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,
-150007,202007,100,10830.0101010101,FIC,1.423548265,1,152.5353535,3,0,3,false,true,false,
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next
+150001,202001,100,5891,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true,,true
+150001,202002,100,4581,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true,true,true
+150001,202003,100,4741,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true,true,true
+150001,202004,100,8092,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true,true,true
+150001,202005,100,2727,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true,true,true
+150001,202006,100,2363,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true,true,true
+150001,202007,100,9549,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true,true,
+150002,202001,100,8611,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true,,true
+150002,202002,100,9383,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true,true,true
+150002,202003,100,1064,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true,true,true
+150002,202004,100,7419,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true,true,true
+150002,202005,100,9967,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true,true,true
+150002,202006,100,1393,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true,true,true
+150002,202007,100,2593,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true,true,
+150003,202001,100,3426,R,1,0.887085601,181.0909091,0,3,3,true,false,false,true,,true
+150003,202002,100,6246,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,true,true,true
+150003,202003,100,8402,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true,true,true
+150003,202004,100,3891,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,true,true,true
+150003,202005,100,5463,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true,true,true
+150003,202006,100,6852,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,true,true,true
+150003,202007,100,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true,true,
+150004,202001,100,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,,,
+150004,202002,100,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,,,
+150004,202003,100,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true,,true
+150004,202005,100,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true,true,
+150004,202006,100,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,,,
+150004,202007,100,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,,,
+150005,202001,100,150000,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false,,false
+150005,202002,100,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false,false,false
+150005,202003,100,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false,false,false
+150005,202004,100,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false,false,false
+150006,202005,100,105000,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false,false,false
+150006,202006,100,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false,false,false
+150006,202007,100,125000,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false,false,
+150007,202001,100,12857.4545454545,C,1,0.887085601,181.0909091,0,3,3,true,false,false,,,
+150007,202002,100,14494.0404040404,FIC,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,,,
+150007,202003,100,10188.8585858586,FIC,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,,,
+150007,202004,100,13914.5656565657,FIC,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,,,
+150007,202005,100,13021.6868686869,FIC,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,,,
+150007,202006,100,7607.75757575758,FIC,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,,,
+150007,202007,100,10830.0101010101,FIC,1.423548265,1,152.5353535,3,0,3,false,true,false,,,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
index a4213739..3f0accee 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/29_mixed_data_filtered_output.csv
@@ -1,64 +1,64 @@
-identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-200001,202001,100,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200001,202002,100,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200001,202003,100,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200001,202004,100,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200002,202001,100,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200002,202002,100,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200002,202003,100,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200002,202004,100,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200003,202001,100,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200003,202002,100,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200003,202003,100,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200003,202004,100,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200004,202001,100,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true
-200004,202002,100,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true
-200004,202003,100,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
-200004,202004,100,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,
-200005,202001,100,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
-200005,202002,100,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
-200005,202003,100,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
-200005,202004,100,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
-200006,202001,100,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,
-200006,202002,100,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
-200006,202003,100,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true
-200006,202004,100,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true
-200007,202001,200,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200007,202002,200,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200007,202003,200,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200007,202004,200,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
-200008,202001,200,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200008,202002,200,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200008,202003,200,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200008,202004,200,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
-200009,202001,200,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200009,202002,200,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200009,202003,200,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200009,202004,200,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true
-200010,202001,200,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200010,202002,200,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200010,202003,200,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true
-200010,202004,200,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200011,202001,200,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200011,202002,200,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true
-200011,202004,200,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200012,202001,200,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true
-200012,202002,200,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
-200012,202003,200,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
-200012,202004,200,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,
-200013,202001,100,150000,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false
-200013,202002,100,180000,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false
-200013,202003,100,120000,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false
-200013,202004,100,105000,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false
-200014,202001,200,150000,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false
-200014,202002,200,180000,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false
-200014,202003,200,120000,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false
-200014,202004,200,105000,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false
-200015,202001,100,5086.03964757709,C,1,0.642092794,71.63436123,0,4,4,true,false,false,
-200015,202002,100,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,
-200015,202003,100,8555.95250872475,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,
-200015,202004,100,2239.972874146,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,
-200016,202001,200,9394.82142857143,C,1,0.741183163,132.3214286,0,3,4,true,false,false,
-200016,202002,200,12675.438275,FIC,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,
-200016,202003,200,14276.91768,FIC,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,
-200016,202004,200,2970.550898,FIC,0.208066683,1,99.37735849,3,0,3,false,true,false,
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next
+200001,202001,100,7788,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true,,true
+200001,202002,100,6169,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true,true,true
+200001,202003,100,6156,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true,true,true
+200001,202004,100,1577,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true,true,
+200002,202001,100,6533,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true,,true
+200002,202002,100,8103,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true,true,true
+200002,202003,100,5860,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true,true,true
+200002,202004,100,2575,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true,true,
+200003,202001,100,56,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true,,true
+200003,202002,100,4978,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true,true,true
+200003,202003,100,8777,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true,true,true
+200003,202004,100,906,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true,true,
+200004,202001,100,1884,R,1,0.642092794,71.63436123,0,4,4,true,false,false,true,,true
+200004,202002,100,6075,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,true,true,
+200004,202003,100,6561.946753,FIR,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,,,
+200004,202004,100,1717.936456,FIR,0.261802864,1,42.68681319,4,0,4,false,true,false,,,
+200005,202001,100,429.8061674,C,1,0.642092794,71.63436123,0,4,4,true,false,false,,,
+200005,202002,100,669.383259,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,,,
+200005,202003,100,723.038239,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,,,
+200005,202004,100,189.2934824,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,,,
+200006,202001,100,5279.856813,BI,1,0.642092794,71.63436123,0,4,4,true,false,false,,,
+200006,202002,100,8222.88751,BI,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,,,
+200006,202003,100,8882,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,true,,true
+200006,202004,100,2711,R,0.261802864,1,42.68681319,4,0,4,false,true,false,true,true,
+200007,202001,200,2439,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true,,true
+200007,202002,200,9675,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true,true,true
+200007,202003,200,7003,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true,true,true
+200007,202004,200,595,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true,true,
+200008,202001,200,1849,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true,,true
+200008,202002,200,6436,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true,true,true
+200008,202003,200,9709,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true,true,true
+200008,202004,200,2727,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true,true,
+200009,202001,200,8742,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true,,true
+200009,202002,200,1469,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true,true,true
+200009,202003,200,8602,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true,true,true
+200009,202004,200,1945,R,0.208066683,1,99.37735849,3,0,3,false,true,false,true,true,
+200010,202001,200,4809.537543,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,,,
+200010,202002,200,6489,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true,,true
+200010,202003,200,1796,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,true,true,
+200010,202004,200,373.6877618,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,,,
+200011,202001,200,1427.518771,BI,1,0.741183163,132.3214286,0,3,4,true,false,false,,,
+200011,202002,200,1926,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,true,,
+200011,202004,200,7850.811321,C,0.208066683,1,99.37735849,3,0,3,false,true,false,,,
+200012,202001,200,5495,R,1,0.741183163,132.3214286,0,3,4,true,false,false,true,,
+200012,202002,200,7413.821949,FIR,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,,,
+200012,202003,200,8350.521959,FIR,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,,,
+200012,202004,200,1737.465401,FIR,0.208066683,1,99.37735849,3,0,3,false,true,false,,,
+200013,202001,100,150000,R,1,0.642092794,71.63436123,0,4,4,true,false,false,false,,false
+200013,202002,100,180000,R,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,false,false,false
+200013,202003,100,120000,R,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,false,false,false
+200013,202004,100,105000,R,0.261802864,1,42.68681319,4,0,4,false,true,false,false,false,
+200014,202001,200,150000,R,1,0.741183163,132.3214286,0,3,4,true,false,false,false,,false
+200014,202002,200,180000,R,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,false,false,false
+200014,202003,200,120000,R,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,false,false,false
+200014,202004,200,105000,R,0.208066683,1,99.37735849,3,0,3,false,true,false,false,false,
+200015,202001,100,5086.03964757709,C,1,0.642092794,71.63436123,0,4,4,true,false,false,,,
+200015,202002,100,7921.035243,FIC,1.557407294,0.925792334,111.5638767,4,3,4,false,false,false,,,
+200015,202003,100,8555.95250872475,FIC,1.080155844,3.819667911,163.0494505,3,4,4,false,false,false,,,
+200015,202004,100,2239.972874146,FIC,0.261802864,1,42.68681319,4,0,4,false,true,false,,,
+200016,202001,200,9394.82142857143,C,1,0.741183163,132.3214286,0,3,4,true,false,false,,,
+200016,202002,200,12675.438275,FIC,1.349194167,0.88782737,119.7926267,3,4,5,false,false,false,,,
+200016,202003,200,14276.91768,FIC,1.126345091,4.806151509,196.4492754,4,3,4,false,false,false,,,
+200016,202004,200,2970.550898,FIC,0.208066683,1,99.37735849,3,0,3,false,true,false,,,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
index 42b103c9..f58b354c 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/30_class_change_C_C_FI_filtered_output.csv
@@ -1,28 +1,28 @@
-identifier,date,group,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current
-10001,202001,1,547,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
-10001,202002,1,362,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
-10001,202003,1,895,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
-10002,202001,1,381,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true
-10002,202002,1,573,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true
-10002,202003,1,214,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true
-10003,202001,2,961,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
-10003,202002,2,267,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
-10003,202003,2,314,1.173184358,1,50,R,2,0,2,false,true,false,true
-10004,202001,2,555,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true
-10004,202002,2,628,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true
-10004,202003,2,736,1.173184358,1,50,R,2,0,2,false,true,false,true
-10005,202001,1,278.4,1,0.992513369,15.46666667,C,0,2,2,true,false,false,
-10005,202002,2,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2,false,false,false,
-10005,202003,2,900,1.173184358,1,50,FIC,2,0,2,false,true,false,
-10006,202001,1,150000,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false
-10006,202002,1,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false
-10006,202003,1,120000,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false
-10007,202001,1,1098.133333,1,0.992513369,15.46666667,C,0,2,2,true,false,false,
-10007,202002,1,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2,false,false,false,
-10007,202003,1,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,true,false,
-10008,202001,2,150000,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false
-10008,202002,2,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false
-10008,202003,2,120000,1.173184358,1,50,R,2,0,2,false,true,false,false
-10009,202001,2,5125.52381,1,1.693854749,72.19047619,C,0,2,2,true,false,false,
-10009,202002,2,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2,false,false,false,
-10009,202003,2,3550,1.173184358,1,50,FIC,2,0,2,false,true,false,
+identifier,date,group,output,forward,backward,construction,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next
+10001,202001,1,547,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true,,true
+10001,202002,1,362,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true,true,true
+10001,202003,1,895,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true,true,
+10002,202001,1,381,1,0.992513369,15.46666667,R,0,2,2,true,false,false,true,,true
+10002,202002,1,573,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,true,true,true
+10002,202003,1,214,1.186096257,1,18.48333333,R,2,0,2,false,true,false,true,true,
+10003,202001,2,961,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true,,true
+10003,202002,2,267,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true,true,true
+10003,202003,2,314,1.173184358,1,50,R,2,0,2,false,true,false,true,true,
+10004,202001,2,555,1,1.693854749,72.19047619,R,0,2,2,true,false,false,true,,true
+10004,202002,2,628,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,true,true,true
+10004,202003,2,736,1.173184358,1,50,R,2,0,2,false,true,false,true,true,
+10005,202001,1,278.4,1,0.992513369,15.46666667,C,0,2,2,true,false,false,,,
+10005,202002,2,767.142857,0.590369393,0.852380952,42.61904762,C,2,2,2,false,false,false,,,
+10005,202003,2,900,1.173184358,1,50,FIC,2,0,2,false,true,false,,,
+10006,202001,1,150000,1,0.992513369,15.46666667,R,0,2,2,true,false,false,false,,false
+10006,202002,1,180000,1.007543103,0.843101893,15.58333333,R,2,2,2,false,false,false,false,false,false
+10006,202003,1,120000,1.186096257,1,18.48333333,R,2,0,2,false,true,false,false,false,
+10007,202001,1,1098.133333,1,0.992513369,15.46666667,C,0,2,2,true,false,false,,,
+10007,202002,1,1106.416666,1.007543103,0.843101893,15.58333333,FIC,2,2,2,false,false,false,,,
+10007,202003,1,1312.316666,1.186096257,1,18.48333333,FIC,2,0,2,false,true,false,,,
+10008,202001,2,150000,1,1.693854749,72.19047619,R,0,2,2,true,false,false,false,,false
+10008,202002,2,180000,0.590369393,0.852380952,42.61904762,R,2,2,2,false,false,false,false,false,false
+10008,202003,2,120000,1.173184358,1,50,R,2,0,2,false,true,false,false,false,
+10009,202001,2,5125.52381,1,1.693854749,72.19047619,C,0,2,2,true,false,false,,,
+10009,202002,2,3025.952381,0.590369393,0.852380952,42.61904762,FIC,2,2,2,false,false,false,,,
+10009,202003,2,3550,1.173184358,1,50,FIC,2,0,2,false,true,false,,,

From e82a91946efeb3cf92ebdc3bd88a364716a1ba59 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 18 Jul 2023 15:37:13 +0100
Subject: [PATCH 450/531] Missing Columns For Comparison

---
 .../27_BI_BI_R_NS_R_FI_FI_filtered_output.csv             | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
index 1bcd360c..32df379b 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/27_BI_BI_R_NS_R_FI_FI_filtered_output.csv
@@ -22,15 +22,15 @@ identifier,date,group,output,marker,forward,backward,construction,count_forward,
 150003,202007,100,2959,R,1.423548265,1,152.5353535,3,0,3,false,true,false,true,true,
 150004,202001,100,5310.130499,BI,1,0.887085601,181.0909091,0,3,3,true,false,false,,,
 150004,202002,100,5986.040684,BI,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,,,
-150004,202003,100,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true,,true
-150004,202005,100,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true,true,
+150004,202003,100,4208,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,true,,
+150004,202005,100,2818,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,true,,
 150004,202006,100,1646.38123,FIR,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,,,
 150004,202007,100,2343.703144,FIR,1.423548265,1,152.5353535,3,0,3,false,true,false,,,
 150005,202001,100,150000,R,1,0.887085601,181.0909091,0,3,3,true,false,false,false,,false
 150005,202002,100,180000,R,1.127286925,1.422538185,204.1414141,3,3,3,false,false,false,false,false,false
 150005,202003,100,120000,R,0.702968827,0.732244099,109.6130952,3,3,4,false,false,false,false,false,false
-150005,202004,100,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false,false,false
-150006,202005,100,105000,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false,false,false
+150005,202004,100,110000,R,1.365664813,1.068568596,195.979798,3,3,3,false,false,false,false,false,
+150006,202005,100,105000,R,0.935831358,1.71163273,124.85119,3,3,4,false,false,false,false,,false
 150006,202006,100,160000,R,0.584237484,0.702470035,107.1515152,3,3,3,false,false,false,false,false,false
 150006,202007,100,125000,R,1.423548265,1,152.5353535,3,0,3,false,true,false,false,false,
 150007,202001,100,12857.4545454545,C,1,0.887085601,181.0909091,0,3,3,true,false,false,,,

From 6091540f66d2ae84c5cc7b01c0a465a851136596 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 18 Jul 2023 16:37:29 +0100
Subject: [PATCH 451/531] Filtering on missing data

---
 tests/imputation/ratio_of_means.toml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/imputation/ratio_of_means.toml b/tests/imputation/ratio_of_means.toml
index 15659b63..600ceb1e 100644
--- a/tests/imputation/ratio_of_means.toml
+++ b/tests/imputation/ratio_of_means.toml
@@ -2,19 +2,19 @@
 starting_period = "202010"
 
 [scenarios.26_C_FI_FI_NS_BI_BI_R_filtered]
-link_filter = "question < 100000"
+link_filter = "identifier != '140005'"
 
 [scenarios.27_BI_BI_R_NS_R_FI_FI_filtered]
-link_filter = "question < 100000"
+link_filter = "identifier NOT IN ('150005', '150006')"
 
 [scenarios.28_link_columns_filtered]
-link_filter = "question < 100000"
+link_filter = "identifier != '190007'"
 
 [scenarios.29_mixed_data_filtered]
-link_filter = "question < 100000"
+link_filter = "identifier NOT IN ('200013', '200014')"
 
 [scenarios.30_class_change_C_C_FI_filtered]
-link_filter = "question < 100000"
+link_filter = "identifier NOT IN ('230006', '230008')"
 
 [scenarios.34_multi_variable_C_BI_R_filtered]
 link_filter = "identifier != '10003'"

From 4428fcd0e6a4552d34868ca117c4faf04f39a94a Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Tue, 18 Jul 2023 16:47:24 +0100
Subject: [PATCH 452/531] Mistake

---
 tests/imputation/ratio_of_means.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/imputation/ratio_of_means.toml b/tests/imputation/ratio_of_means.toml
index 600ceb1e..735fcf06 100644
--- a/tests/imputation/ratio_of_means.toml
+++ b/tests/imputation/ratio_of_means.toml
@@ -14,7 +14,7 @@ link_filter = "identifier != '190007'"
 link_filter = "identifier NOT IN ('200013', '200014')"
 
 [scenarios.30_class_change_C_C_FI_filtered]
-link_filter = "identifier NOT IN ('230006', '230008')"
+link_filter = "identifier NOT IN ('10006', '10008')"
 
 [scenarios.34_multi_variable_C_BI_R_filtered]
 link_filter = "identifier != '10003'"

From 4f1fa260dee61ef1802843800e362d67e83921cd Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 19 Jul 2023 10:43:20 +0100
Subject: [PATCH 453/531] New test to cover bug

---
 tests/imputation/ratio_of_means.toml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/imputation/ratio_of_means.toml b/tests/imputation/ratio_of_means.toml
index 735fcf06..608ea230 100644
--- a/tests/imputation/ratio_of_means.toml
+++ b/tests/imputation/ratio_of_means.toml
@@ -18,3 +18,6 @@ link_filter = "identifier NOT IN ('10006', '10008')"
 
 [scenarios.34_multi_variable_C_BI_R_filtered]
 link_filter = "identifier != '10003'"
+
+[scenarios.35_BI_BI_R_FI_FI_R_FI_alternating_filtered]
+link_filter = "NOT(identifier = '70001' AND date IN ('202003', '202005'))"

From 877500d690ccddf65c7c2e013b657a0567b3d19b Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 19 Jul 2023 10:54:22 +0100
Subject: [PATCH 454/531] New test to cover bug

---
 ..._FI_FI_R_FI_alternating_filtered_input.csv | 29 +++++++++++++++++++
 ...FI_FI_R_FI_alternating_filtered_output.csv | 29 +++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv
new file mode 100644
index 00000000..04eceefa
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_input.csv
@@ -0,0 +1,29 @@
+identifier,date,group,question,other
+70001,202001,100,5951,39
+70001,202002,100,1814,39
+70001,202003,100,734,39
+70001,202004,100,96,39
+70001,202005,100,9086,39
+70001,202006,100,3949,39
+70001,202007,100,49,39
+70002,202001,100,6705,94
+70002,202002,100,48,94
+70002,202003,100,5361,94
+70002,202004,100,8767,94
+70002,202005,100,9214,94
+70002,202006,100,7467,94
+70002,202007,100,3475,94
+70003,202001,100,6153,42
+70003,202002,100,7711,42
+70003,202003,100,5403,42
+70003,202004,100,7445,42
+70003,202005,100,7092,42
+70003,202006,100,2038,42
+70003,202007,100,8768,42
+70004,202001,100,,6
+70004,202002,100,,6
+70004,202003,100,6288,6
+70004,202004,100,,6
+70004,202005,100,,6
+70004,202006,100,5875,6
+70004,202007,100,,6
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
new file mode 100644
index 00000000..533a014d
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
@@ -0,0 +1,29 @@
+identifier,date,group,forward,backward,construction,count_forward,count_backward,count_construction,output,marker,default_forward,default_backward,default_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next
+70001,202001,100,1,1.964796824,107.48,0,3,3,5951,R,true,false,false,true,,true
+70001,202002,100,0.508958477,0.720828688,54.70285714,3,2,3,1814,R,false,false,false,true,true,false
+70001,202003,100,1.387292177,0.663952628,120.084507,2,2,3,734,R,false,false,false,false,true,true
+70001,202004,100,1.50613155,0.994235251,93.18857143,2,2,3,96,R,false,false,false,true,false,false
+70001,202005,100,1.005798174,1.715518148,119.8970588,2,2,2,9086,R,false,false,false,false,true,true
+70001,202006,100,0.582914265,1.09453303,106.7900552,2,3,4,3949,R,false,false,false,true,false,true
+70001,202007,100,0.913631634,1,70.24,3,0,3,49,R,false,true,false,true,true,
+70002,202001,100,1,1.964796824,107.48,0,3,3,6705,R,true,false,false,true,,true
+70002,202002,100,0.508958477,0.720828688,54.70285714,3,2,3,48,R,false,false,false,true,true,true
+70002,202003,100,1.387292177,0.663952628,120.084507,2,2,3,5361,R,false,false,false,true,true,true
+70002,202004,100,1.50613155,0.994235251,93.18857143,2,2,3,8767,R,false,false,false,true,true,true
+70002,202005,100,1.005798174,1.715518148,119.8970588,2,2,2,9214,R,false,false,false,true,true,true
+70002,202006,100,0.582914265,1.09453303,106.7900552,2,3,4,7467,R,false,false,false,true,true,true
+70002,202007,100,0.913631634,1,70.24,3,0,3,3475,R,false,true,false,true,true,
+70003,202001,100,1,1.964796824,107.48,0,3,3,6153,R,true,false,false,true,,true
+70003,202002,100,0.508958477,0.720828688,54.70285714,3,2,3,7711,R,false,false,false,true,true,true
+70003,202003,100,1.387292177,0.663952628,120.084507,2,2,3,5403,R,false,false,false,true,true,true
+70003,202004,100,1.50613155,0.994235251,93.18857143,2,2,3,7445,R,false,false,false,true,true,true
+70003,202005,100,1.005798174,1.715518148,119.8970588,2,2,2,7092,R,false,false,false,true,true,true
+70003,202006,100,0.582914265,1.09453303,106.7900552,2,3,4,2038,R,false,false,false,true,true,true
+70003,202007,100,0.913631634,1,70.24,3,0,3,8768,R,false,true,false,true,true,
+70004,202001,100,1,1.964796824,107.48,0,3,3,8905.580693,BI,true,false,false,,,
+70004,202002,100,0.508958477,0.720828688,54.70285714,3,2,3,4532.57079,BI,false,false,false,,,
+70004,202003,100,1.387292177,0.663952628,120.084507,2,2,3,6288,R,false,false,false,true,,
+70004,202004,100,1.50613155,0.994235251,93.18857143,2,2,3,9470.555186,FIR,false,false,false,,,
+70004,202005,100,1.005798174,1.715518148,119.8970588,2,2,2,9525.467113,FIR,false,false,false,,,
+70004,202006,100,0.582914265,1.09453303,106.7900552,2,3,4,5875,R,false,false,false,true,,
+70004,202007,100,0.913631634,1,70.24,3,0,3,5367.58585,FIR,false,true,false,,,

From 145167b2cd5f864189c53174bec18a4ea68f5b73 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 19 Jul 2023 11:42:47 +0100
Subject: [PATCH 455/531] update dependencies

---
 poetry.lock | 97 +++++++++++++++++++++++++++++++----------------------
 1 file changed, 57 insertions(+), 40 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 7c84cca4..e4078b33 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -53,14 +53,14 @@ uvloop = ["uvloop (>=0.15.2)"]
 
 [[package]]
 name = "click"
-version = "8.1.3"
+version = "8.1.6"
 description = "Composable command line interface toolkit"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
-    {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
+    {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"},
+    {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"},
 ]
 
 [package.dependencies]
@@ -157,14 +157,14 @@ toml = ["tomli"]
 
 [[package]]
 name = "exceptiongroup"
-version = "1.1.1"
+version = "1.1.2"
 description = "Backport of PEP 654 (exception groups)"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"},
-    {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"},
+    {file = "exceptiongroup-1.1.2-py3-none-any.whl", hash = "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"},
+    {file = "exceptiongroup-1.1.2.tar.gz", hash = "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5"},
 ]
 
 [package.extras]
@@ -288,14 +288,14 @@ files = [
 
 [[package]]
 name = "platformdirs"
-version = "3.8.0"
+version = "3.9.1"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-3.8.0-py3-none-any.whl", hash = "sha256:ca9ed98ce73076ba72e092b23d3c93ea6c4e186b3f1c3dad6edd98ff6ffcca2e"},
-    {file = "platformdirs-3.8.0.tar.gz", hash = "sha256:b0cabcb11063d21a0b261d557acb0a9d2126350e63b70cdf7db6347baea456dc"},
+    {file = "platformdirs-3.9.1-py3-none-any.whl", hash = "sha256:ad8291ae0ae5072f66c16945166cb11c63394c7a3ad1b1bc9828ca3162da8c2f"},
+    {file = "platformdirs-3.9.1.tar.gz", hash = "sha256:1b42b450ad933e981d56e59f1b97495428c9bd60698baab9f3eb3d00d5822421"},
 ]
 
 [package.dependencies]
@@ -439,14 +439,14 @@ pytest = ">=3.6.0"
 
 [[package]]
 name = "pytest-tap"
-version = "3.3"
+version = "3.4"
 description = "Test Anything Protocol (TAP) reporting plugin for pytest"
 category = "dev"
 optional = false
 python-versions = "*"
 files = [
-    {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"},
-    {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"},
+    {file = "pytest-tap-3.4.tar.gz", hash = "sha256:a7c2a4a3e8b4bf18522e46d74208f8579a191dd972c59182104ad9a4967318fb"},
+    {file = "pytest_tap-3.4-py3-none-any.whl", hash = "sha256:d97a2115c94415086f6faec395d243b3c18ea846ce1c1653a4b2588082be35d8"},
 ]
 
 [package.dependencies]
@@ -494,48 +494,65 @@ files = [
 
 [[package]]
 name = "typed-ast"
-version = "1.5.4"
+version = "1.5.5"
 description = "a fork of Python 2 and 3 ast modules with type comment support"
 category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
-    {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"},
-    {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"},
-    {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"},
-    {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c542eeda69212fa10a7ada75e668876fdec5f856cd3d06829e6aa64ad17c8dfe"},
-    {file = "typed_ast-1.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:a9916d2bb8865f973824fb47436fa45e1ebf2efd920f2b9f99342cb7fab93f72"},
-    {file = "typed_ast-1.5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:79b1e0869db7c830ba6a981d58711c88b6677506e648496b1f64ac7d15633aec"},
-    {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a94d55d142c9265f4ea46fab70977a1944ecae359ae867397757d836ea5a3f47"},
-    {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:183afdf0ec5b1b211724dfef3d2cad2d767cbefac291f24d69b00546c1837fb6"},
-    {file = "typed_ast-1.5.4-cp36-cp36m-win_amd64.whl", hash = "sha256:639c5f0b21776605dd6c9dbe592d5228f021404dafd377e2b7ac046b0349b1a1"},
-    {file = "typed_ast-1.5.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cf4afcfac006ece570e32d6fa90ab74a17245b83dfd6655a6f68568098345ff6"},
-    {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed855bbe3eb3715fca349c80174cfcfd699c2f9de574d40527b8429acae23a66"},
-    {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6778e1b2f81dfc7bc58e4b259363b83d2e509a65198e85d5700dfae4c6c8ff1c"},
-    {file = "typed_ast-1.5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:0261195c2062caf107831e92a76764c81227dae162c4f75192c0d489faf751a2"},
-    {file = "typed_ast-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2efae9db7a8c05ad5547d522e7dbe62c83d838d3906a3716d1478b6c1d61388d"},
-    {file = "typed_ast-1.5.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7d5d014b7daa8b0bf2eaef684295acae12b036d79f54178b92a2b6a56f92278f"},
-    {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:370788a63915e82fd6f212865a596a0fefcbb7d408bbbb13dea723d971ed8bdc"},
-    {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4e964b4ff86550a7a7d56345c7864b18f403f5bd7380edf44a3c1fb4ee7ac6c6"},
-    {file = "typed_ast-1.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:683407d92dc953c8a7347119596f0b0e6c55eb98ebebd9b23437501b28dcbb8e"},
-    {file = "typed_ast-1.5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4879da6c9b73443f97e731b617184a596ac1235fe91f98d279a7af36c796da35"},
-    {file = "typed_ast-1.5.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3e123d878ba170397916557d31c8f589951e353cc95fb7f24f6bb69adc1a8a97"},
-    {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebd9d7f80ccf7a82ac5f88c521115cc55d84e35bf8b446fcd7836eb6b98929a3"},
-    {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98f80dee3c03455e92796b58b98ff6ca0b2a6f652120c263efdba4d6c5e58f72"},
-    {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"},
-    {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"},
+    {file = "typed_ast-1.5.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4bc1efe0ce3ffb74784e06460f01a223ac1f6ab31c6bc0376a21184bf5aabe3b"},
+    {file = "typed_ast-1.5.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5f7a8c46a8b333f71abd61d7ab9255440d4a588f34a21f126bbfc95f6049e686"},
+    {file = "typed_ast-1.5.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:597fc66b4162f959ee6a96b978c0435bd63791e31e4f410622d19f1686d5e769"},
+    {file = "typed_ast-1.5.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d41b7a686ce653e06c2609075d397ebd5b969d821b9797d029fccd71fdec8e04"},
+    {file = "typed_ast-1.5.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:5fe83a9a44c4ce67c796a1b466c270c1272e176603d5e06f6afbc101a572859d"},
+    {file = "typed_ast-1.5.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d5c0c112a74c0e5db2c75882a0adf3133adedcdbfd8cf7c9d6ed77365ab90a1d"},
+    {file = "typed_ast-1.5.5-cp310-cp310-win_amd64.whl", hash = "sha256:e1a976ed4cc2d71bb073e1b2a250892a6e968ff02aa14c1f40eba4f365ffec02"},
+    {file = "typed_ast-1.5.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c631da9710271cb67b08bd3f3813b7af7f4c69c319b75475436fcab8c3d21bee"},
+    {file = "typed_ast-1.5.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b445c2abfecab89a932b20bd8261488d574591173d07827c1eda32c457358b18"},
+    {file = "typed_ast-1.5.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc95ffaaab2be3b25eb938779e43f513e0e538a84dd14a5d844b8f2932593d88"},
+    {file = "typed_ast-1.5.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61443214d9b4c660dcf4b5307f15c12cb30bdfe9588ce6158f4a005baeb167b2"},
+    {file = "typed_ast-1.5.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6eb936d107e4d474940469e8ec5b380c9b329b5f08b78282d46baeebd3692dc9"},
+    {file = "typed_ast-1.5.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e48bf27022897577d8479eaed64701ecaf0467182448bd95759883300ca818c8"},
+    {file = "typed_ast-1.5.5-cp311-cp311-win_amd64.whl", hash = "sha256:83509f9324011c9a39faaef0922c6f720f9623afe3fe220b6d0b15638247206b"},
+    {file = "typed_ast-1.5.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:44f214394fc1af23ca6d4e9e744804d890045d1643dd7e8229951e0ef39429b5"},
+    {file = "typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:118c1ce46ce58fda78503eae14b7664163aa735b620b64b5b725453696f2a35c"},
+    {file = "typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be4919b808efa61101456e87f2d4c75b228f4e52618621c77f1ddcaae15904fa"},
+    {file = "typed_ast-1.5.5-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fc2b8c4e1bc5cd96c1a823a885e6b158f8451cf6f5530e1829390b4d27d0807f"},
+    {file = "typed_ast-1.5.5-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:16f7313e0a08c7de57f2998c85e2a69a642e97cb32f87eb65fbfe88381a5e44d"},
+    {file = "typed_ast-1.5.5-cp36-cp36m-win_amd64.whl", hash = "sha256:2b946ef8c04f77230489f75b4b5a4a6f24c078be4aed241cfabe9cbf4156e7e5"},
+    {file = "typed_ast-1.5.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2188bc33d85951ea4ddad55d2b35598b2709d122c11c75cffd529fbc9965508e"},
+    {file = "typed_ast-1.5.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0635900d16ae133cab3b26c607586131269f88266954eb04ec31535c9a12ef1e"},
+    {file = "typed_ast-1.5.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:57bfc3cf35a0f2fdf0a88a3044aafaec1d2f24d8ae8cd87c4f58d615fb5b6311"},
+    {file = "typed_ast-1.5.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:fe58ef6a764de7b4b36edfc8592641f56e69b7163bba9f9c8089838ee596bfb2"},
+    {file = "typed_ast-1.5.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d09d930c2d1d621f717bb217bf1fe2584616febb5138d9b3e8cdd26506c3f6d4"},
+    {file = "typed_ast-1.5.5-cp37-cp37m-win_amd64.whl", hash = "sha256:d40c10326893ecab8a80a53039164a224984339b2c32a6baf55ecbd5b1df6431"},
+    {file = "typed_ast-1.5.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:fd946abf3c31fb50eee07451a6aedbfff912fcd13cf357363f5b4e834cc5e71a"},
+    {file = "typed_ast-1.5.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ed4a1a42df8a3dfb6b40c3d2de109e935949f2f66b19703eafade03173f8f437"},
+    {file = "typed_ast-1.5.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:045f9930a1550d9352464e5149710d56a2aed23a2ffe78946478f7b5416f1ede"},
+    {file = "typed_ast-1.5.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:381eed9c95484ceef5ced626355fdc0765ab51d8553fec08661dce654a935db4"},
+    {file = "typed_ast-1.5.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:bfd39a41c0ef6f31684daff53befddae608f9daf6957140228a08e51f312d7e6"},
+    {file = "typed_ast-1.5.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8c524eb3024edcc04e288db9541fe1f438f82d281e591c548903d5b77ad1ddd4"},
+    {file = "typed_ast-1.5.5-cp38-cp38-win_amd64.whl", hash = "sha256:7f58fabdde8dcbe764cef5e1a7fcb440f2463c1bbbec1cf2a86ca7bc1f95184b"},
+    {file = "typed_ast-1.5.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:042eb665ff6bf020dd2243307d11ed626306b82812aba21836096d229fdc6a10"},
+    {file = "typed_ast-1.5.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:622e4a006472b05cf6ef7f9f2636edc51bda670b7bbffa18d26b255269d3d814"},
+    {file = "typed_ast-1.5.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1efebbbf4604ad1283e963e8915daa240cb4bf5067053cf2f0baadc4d4fb51b8"},
+    {file = "typed_ast-1.5.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0aefdd66f1784c58f65b502b6cf8b121544680456d1cebbd300c2c813899274"},
+    {file = "typed_ast-1.5.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:48074261a842acf825af1968cd912f6f21357316080ebaca5f19abbb11690c8a"},
+    {file = "typed_ast-1.5.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:429ae404f69dc94b9361bb62291885894b7c6fb4640d561179548c849f8492ba"},
+    {file = "typed_ast-1.5.5-cp39-cp39-win_amd64.whl", hash = "sha256:335f22ccb244da2b5c296e6f96b06ee9bed46526db0de38d2f0e5a6597b81155"},
+    {file = "typed_ast-1.5.5.tar.gz", hash = "sha256:94282f7a354f36ef5dbce0ef3467ebf6a258e370ab33d5b40c249fa996e590dd"},
 ]
 
 [[package]]
 name = "typing-extensions"
-version = "4.6.3"
+version = "4.7.1"
 description = "Backported and Experimental Type Hints for Python 3.7+"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "typing_extensions-4.6.3-py3-none-any.whl", hash = "sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26"},
-    {file = "typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5"},
+    {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"},
+    {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"},
 ]
 
 [[package]]

From 6df23708d1b535950a19c1b986d69a98d91bdc5b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 19 Jul 2023 12:25:20 +0100
Subject: [PATCH 456/531] First shot at fixing link filter in ratio of means

---
 .../imputation/ratio_calculators.py                       | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index c51ee040..958babe1 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -397,6 +397,14 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
     """
     df = (
         df.filter(col("link_inclusion_current"))
+        .withColumn(
+            "previous_output",
+            expr("CASE WHEN link_inclusion_previous <=> TRUE then previous_output END")
+        )
+        .withColumn(
+            "next_output",
+            expr("CASE WHEN link_inclusion_next <=> TRUE then next_output END")
+        )
         .groupBy("period", "grouping")
         .agg(
             expr(

From 2cfcbcabeffcbda4ca248d12c144ead12221b043 Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 19 Jul 2023 12:47:12 +0100
Subject: [PATCH 457/531] Adjusted hand calculated output values to use links
 to more decimal places

---
 .../35_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
index 533a014d..6f219dd2 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/35_BI_BI_R_FI_FI_R_FI_alternating_filtered_output.csv
@@ -20,10 +20,10 @@ identifier,date,group,forward,backward,construction,count_forward,count_backward
 70003,202005,100,1.005798174,1.715518148,119.8970588,2,2,2,7092,R,false,false,false,true,true,true
 70003,202006,100,0.582914265,1.09453303,106.7900552,2,3,4,2038,R,false,false,false,true,true,true
 70003,202007,100,0.913631634,1,70.24,3,0,3,8768,R,false,true,false,true,true,
-70004,202001,100,1,1.964796824,107.48,0,3,3,8905.580693,BI,true,false,false,,,
-70004,202002,100,0.508958477,0.720828688,54.70285714,3,2,3,4532.57079,BI,false,false,false,,,
+70004,202001,100,1,1.964796824,107.48,0,3,3,8905.580698,BI,true,false,false,,,
+70004,202002,100,0.508958477,0.720828688,54.70285714,3,2,3,4532.570792,BI,false,false,false,,,
 70004,202003,100,1.387292177,0.663952628,120.084507,2,2,3,6288,R,false,false,false,true,,
-70004,202004,100,1.50613155,0.994235251,93.18857143,2,2,3,9470.555186,FIR,false,false,false,,,
+70004,202004,100,1.50613155,0.994235251,93.18857143,2,2,3,9470.555184,FIR,false,false,false,,,
 70004,202005,100,1.005798174,1.715518148,119.8970588,2,2,2,9525.467113,FIR,false,false,false,,,
 70004,202006,100,0.582914265,1.09453303,106.7900552,2,3,4,5875,R,false,false,false,true,,
-70004,202007,100,0.913631634,1,70.24,3,0,3,5367.58585,FIR,false,true,false,,,
+70004,202007,100,0.913631634,1,70.24,3,0,3,5367.585848,FIR,false,true,false,,,

From 3c6d1efb3c22753fa4939fe977882ace6fbf7f0f Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Wed, 19 Jul 2023 12:48:02 +0100
Subject: [PATCH 458/531] Black

---
 statistical_methods_library/imputation/ratio_calculators.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/ratio_calculators.py b/statistical_methods_library/imputation/ratio_calculators.py
index 958babe1..fcc8cfe5 100644
--- a/statistical_methods_library/imputation/ratio_calculators.py
+++ b/statistical_methods_library/imputation/ratio_calculators.py
@@ -399,11 +399,11 @@ def ratio_of_means(*, df: DataFrame, **_kw) -> List[RatioCalculationResult]:
         df.filter(col("link_inclusion_current"))
         .withColumn(
             "previous_output",
-            expr("CASE WHEN link_inclusion_previous <=> TRUE then previous_output END")
+            expr("CASE WHEN link_inclusion_previous <=> TRUE then previous_output END"),
         )
         .withColumn(
             "next_output",
-            expr("CASE WHEN link_inclusion_next <=> TRUE then next_output END")
+            expr("CASE WHEN link_inclusion_next <=> TRUE then next_output END"),
         )
         .groupBy("period", "grouping")
         .agg(

From 1b259f34d792b3818d8c83cc39105d8546eb4d70 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Wed, 19 Jul 2023 16:08:16 +0100
Subject: [PATCH 459/531] Add release notes and bump version

---
 pyproject.toml          |  2 +-
 release-notes/13.1.2.md | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 release-notes/13.1.2.md

diff --git a/pyproject.toml b/pyproject.toml
index 02ac63a3..9e7b59b9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "13.1.1"
+version = "13.1.2"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"
diff --git a/release-notes/13.1.2.md b/release-notes/13.1.2.md
new file mode 100644
index 00000000..8a9bc889
--- /dev/null
+++ b/release-notes/13.1.2.md
@@ -0,0 +1,23 @@
+# Statistical Methods Library 13.1.2
+
+Release date: 2023-07-19
+
+## Synopsis
+
+This release fixes handling of a particular case regarding link filtering in
+the Ratio of Means forward and backward ratio calculator.
+
+## Changes
+
+The Ratio of Means forward and backward ratio calculator now correctly
+filters out values when the link filter matches the current period but not
+the ones directly preceding and succeeding it. For several releases any
+non-null values in such prior and successive periods were not filtered out
+of ratio calculations even when they did not match the provided link filter.
+
+## Notes
+
+This bug appears to have been first introduced in the 12.0.0 release and
+thus any outputs generated using Ratio of Means imputation and a link filter
+with releases from 12.0.0 until 13.1.1 will potentially be different from
+those generated with this release.

From 40a1071b1030a786fa56ac0223a326b5410fd795 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 24 Oct 2023 22:06:16 +0000
Subject: [PATCH 460/531] Bump pytest from 7.4.0 to 7.4.3

Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.0 to 7.4.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.0...7.4.3)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 poetry.lock    | 39 +++++----------------------------------
 pyproject.toml |  2 +-
 2 files changed, 6 insertions(+), 35 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index e4078b33..19a651a2 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,10 +1,9 @@
-# This file is automatically @generated by Poetry and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
 
 [[package]]
 name = "black"
 version = "23.3.0"
 description = "The uncompromising code formatter."
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -55,7 +54,6 @@ uvloop = ["uvloop (>=0.15.2)"]
 name = "click"
 version = "8.1.6"
 description = "Composable command line interface toolkit"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -71,7 +69,6 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""}
 name = "colorama"
 version = "0.4.6"
 description = "Cross-platform colored terminal text."
-category = "dev"
 optional = false
 python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
 files = [
@@ -83,7 +80,6 @@ files = [
 name = "coverage"
 version = "7.2.7"
 description = "Code coverage measurement for Python"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -159,7 +155,6 @@ toml = ["tomli"]
 name = "exceptiongroup"
 version = "1.1.2"
 description = "Backport of PEP 654 (exception groups)"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -174,7 +169,6 @@ test = ["pytest (>=6)"]
 name = "flake8"
 version = "5.0.4"
 description = "the modular source code checker: pep8 pyflakes and co"
-category = "dev"
 optional = false
 python-versions = ">=3.6.1"
 files = [
@@ -192,7 +186,6 @@ pyflakes = ">=2.5.0,<2.6.0"
 name = "flake8-pyproject"
 version = "1.2.3"
 description = "Flake8 plug-in loading the configuration from pyproject.toml"
-category = "dev"
 optional = false
 python-versions = ">= 3.6"
 files = [
@@ -210,7 +203,6 @@ dev = ["pyTest", "pyTest-cov"]
 name = "importlib-metadata"
 version = "4.2.0"
 description = "Read metadata from Python packages"
-category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -230,7 +222,6 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517",
 name = "iniconfig"
 version = "2.0.0"
 description = "brain-dead simple config-ini parsing"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -242,7 +233,6 @@ files = [
 name = "mccabe"
 version = "0.7.0"
 description = "McCabe checker, plugin for flake8"
-category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -254,7 +244,6 @@ files = [
 name = "mypy-extensions"
 version = "1.0.0"
 description = "Type system extensions for programs checked with the mypy type checker."
-category = "dev"
 optional = false
 python-versions = ">=3.5"
 files = [
@@ -266,7 +255,6 @@ files = [
 name = "packaging"
 version = "23.1"
 description = "Core utilities for Python packages"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -278,7 +266,6 @@ files = [
 name = "pathspec"
 version = "0.11.1"
 description = "Utility library for gitignore style pattern matching of file paths."
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -290,7 +277,6 @@ files = [
 name = "platformdirs"
 version = "3.9.1"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -309,7 +295,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-
 name = "pluggy"
 version = "1.2.0"
 description = "plugin and hook calling mechanisms for python"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -328,7 +313,6 @@ testing = ["pytest", "pytest-benchmark"]
 name = "py4j"
 version = "0.10.9.5"
 description = "Enables Python programs to dynamically access arbitrary Java objects"
-category = "main"
 optional = false
 python-versions = "*"
 files = [
@@ -340,7 +324,6 @@ files = [
 name = "pycodestyle"
 version = "2.9.1"
 description = "Python style guide checker"
-category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -352,7 +335,6 @@ files = [
 name = "pyflakes"
 version = "2.5.0"
 description = "passive checker of Python programs"
-category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -364,7 +346,6 @@ files = [
 name = "pyspark"
 version = "3.3.2"
 description = "Apache Spark Python API"
-category = "main"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -382,14 +363,13 @@ sql = ["pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
 
 [[package]]
 name = "pytest"
-version = "7.4.0"
+version = "7.4.3"
 description = "pytest: simple powerful testing with Python"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pytest-7.4.0-py3-none-any.whl", hash = "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32"},
-    {file = "pytest-7.4.0.tar.gz", hash = "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a"},
+    {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"},
+    {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"},
 ]
 
 [package.dependencies]
@@ -408,7 +388,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no
 name = "pytest-cov"
 version = "4.1.0"
 description = "Pytest plugin for measuring coverage."
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -427,7 +406,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale
 name = "pytest-dependency"
 version = "0.5.1"
 description = "Manage dependencies of tests"
-category = "dev"
 optional = false
 python-versions = "*"
 files = [
@@ -441,7 +419,6 @@ pytest = ">=3.6.0"
 name = "pytest-tap"
 version = "3.4"
 description = "Test Anything Protocol (TAP) reporting plugin for pytest"
-category = "dev"
 optional = false
 python-versions = "*"
 files = [
@@ -457,7 +434,6 @@ pytest = ">=3.0"
 name = "tap-py"
 version = "3.1"
 description = "Test Anything Protocol (TAP) tools"
-category = "dev"
 optional = false
 python-versions = "*"
 files = [
@@ -472,7 +448,6 @@ yaml = ["PyYAML (>=5.1)", "more-itertools"]
 name = "toml"
 version = "0.10.2"
 description = "Python Library for Tom's Obvious, Minimal Language"
-category = "dev"
 optional = false
 python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
 files = [
@@ -484,7 +459,6 @@ files = [
 name = "tomli"
 version = "2.0.1"
 description = "A lil' TOML parser"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -496,7 +470,6 @@ files = [
 name = "typed-ast"
 version = "1.5.5"
 description = "a fork of Python 2 and 3 ast modules with type comment support"
-category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -547,7 +520,6 @@ files = [
 name = "typing-extensions"
 version = "4.7.1"
 description = "Backported and Experimental Type Hints for Python 3.7+"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -559,7 +531,6 @@ files = [
 name = "zipp"
 version = "3.15.0"
 description = "Backport of pathlib-compatible object wrapper for zip files"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -574,4 +545,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = ">=3.7"
-content-hash = "a3265aae0cbe4b6166ebe35b22755bb8e0f8e834d6fb6e6cc834e3338aaf9922"
+content-hash = "f05503f44a13e0ebf2b7d44f539007ae89bb7f5e8757064ca0273b7b42c0d57e"
diff --git a/pyproject.toml b/pyproject.toml
index 9e7b59b9..64305a9b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -11,7 +11,7 @@ pyspark = ">=3.1.1 <3.4.0"
 
 [tool.poetry.group.dev.dependencies]
 toml = "^0.10.2"
-pytest = "^7.3.1"
+pytest = "^7.4.3"
 black = "^23.1"
 flake8 = "^5.0.4"
 coverage = "^7.2"

From 07e0082d5722a0d5398b1f3526d50573d1703dc9 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 17 Nov 2023 17:19:45 +0000
Subject: [PATCH 461/531] Fix docstring

---
 statistical_methods_library/outliering/winsorisation.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index 4f44dc9c..e7bc6de3 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -69,7 +69,7 @@ def outlier(
 
     Returns:
     A new data frame containing the columns as described by the arguments
-    `reference_col`, `period_col`, `outlier_col` and `marker_col`.
+    `reference_col`, `period_col`, `grouping_col`, `outlier_col` and `marker_col`.
 
     The provided columns containing input values must be fully
     populated. In addition there must only be one l-value per stratum and

From dc46a24d7a91df80633fba238974173ad356fe77 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 17 Nov 2023 17:38:46 +0000
Subject: [PATCH 462/531] Remove some unnecessary tests for winsorisation now
 we are using the output without selecting

---
 tests/outliering/test_winsorisation.py | 57 +-------------------------
 1 file changed, 2 insertions(+), 55 deletions(-)

diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index 9763dff4..c5d0d8c0 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -239,57 +239,6 @@ def test_dataframe_column_missing(fxt_load_test_csv):
         winsorisation.outlier(bad_dataframe, *params)
 
 
-# --- Test if output contents are as expected, both new columns and data ---
-
-
-@pytest.mark.dependency()
-def test_dataframe_returned_as_expected(fxt_spark_session, fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "outliering",
-        "winsorisation",
-        "unit",
-        "basic_functionality",
-    )
-    # Make sure that no extra columns pass through.
-    test_dataframe = test_dataframe.withColumn("bonus_column", lit(0))
-    ret_val = winsorisation.outlier(test_dataframe, *params)
-    # perform action on the dataframe to trigger lazy evaluation...
-    ret_val.count()
-    # ...and then check
-    assert isinstance(ret_val, type(test_dataframe))
-    ret_cols = ret_val.columns
-    assert "bonus_column" not in ret_cols
-
-
-# --- Test expected columns are in the output ---
-@pytest.mark.dependency()
-def test_dataframe_expected_columns(fxt_spark_session, fxt_load_test_csv):
-    test_dataframe = fxt_load_test_csv(
-        dataframe_columns,
-        dataframe_types,
-        "outliering",
-        "winsorisation",
-        "unit",
-        "basic_functionality",
-    )
-    ret_val = winsorisation.outlier(
-        test_dataframe,
-        *default_params,
-    )
-    # perform action on the dataframe to trigger lazy evaluation
-    ret_val.count()
-    ret_cols = set(ret_val.columns)
-    expected_cols = {
-        reference_col,
-        period_col,
-        "outlier_weight",
-        "winsorisation_marker",
-    }
-    assert expected_cols == ret_cols
-
-
 @pytest.mark.dependency()
 def test_incorrect_column_types(fxt_load_test_csv):
     test_dataframe = fxt_load_test_csv(
@@ -317,8 +266,6 @@ def test_incorrect_column_types(fxt_load_test_csv):
         "test_dataframe_nulls_in_data",
         "test_dataframe_column_missing",
         "test_params_mismatched_calibration_cols",
-        "test_dataframe_returned_as_expected",
-        "test_dataframe_expected_columns",
         "test_incorrect_column_types",
     ]
 )
@@ -349,9 +296,9 @@ def test_calculations(fxt_load_test_csv, scenario_type, scenario):
     ret_val = winsorisation.outlier(test_dataframe, *params, **winsorisation_kwargs)
 
     assert isinstance(ret_val, type(test_dataframe))
-    sort_col_list = [reference_col, period_col]
+    sort_col_list = [reference_col, period_col, grouping_col]
     check_df_equality(
-        actual=ret_val.sort(sort_col_list).select(exp_val.columns),
+        actual=ret_val.sort(sort_col_list),
         expected=exp_val.sort(sort_col_list),
     )
 

From d054e75d9dc14b954446a56dd17a41dbc9e10622 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Fri, 17 Nov 2023 17:39:24 +0000
Subject: [PATCH 463/531] Add grouping col to output of winsorisation

---
 statistical_methods_library/outliering/winsorisation.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index e7bc6de3..ae6f9d0d 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -87,7 +87,7 @@ def outlier(
             "Both or neither of auxiliary_col and calibration_col must be specified."
         )
 
-    # --- Validate params ---
+    # Validate params
     input_params = {
         "reference": reference_col,
         "period": period_col,
@@ -220,6 +220,7 @@ def outlier(
         .select(
             col("reference").alias(reference_col),
             col("period").alias(period_col),
+            col("grouping").alias(grouping_col),
             col("outlier").alias(outlier_col),
             col("marker").alias(marker_col),
         )

From 833defef3aeef4d87ea5455a7d76d4e255e3f40b Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 20 Nov 2023 11:07:11 +0000
Subject: [PATCH 464/531] Update poetry lock

---
 poetry.lock | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 19a651a2..62b54d18 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -52,13 +52,13 @@ uvloop = ["uvloop (>=0.15.2)"]
 
 [[package]]
 name = "click"
-version = "8.1.6"
+version = "8.1.7"
 description = "Composable command line interface toolkit"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"},
-    {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"},
+    {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"},
+    {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"},
 ]
 
 [package.dependencies]
@@ -153,13 +153,13 @@ toml = ["tomli"]
 
 [[package]]
 name = "exceptiongroup"
-version = "1.1.2"
+version = "1.1.3"
 description = "Backport of PEP 654 (exception groups)"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "exceptiongroup-1.1.2-py3-none-any.whl", hash = "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"},
-    {file = "exceptiongroup-1.1.2.tar.gz", hash = "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5"},
+    {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"},
+    {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"},
 ]
 
 [package.extras]
@@ -253,43 +253,43 @@ files = [
 
 [[package]]
 name = "packaging"
-version = "23.1"
+version = "23.2"
 description = "Core utilities for Python packages"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"},
-    {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"},
+    {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},
+    {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},
 ]
 
 [[package]]
 name = "pathspec"
-version = "0.11.1"
+version = "0.11.2"
 description = "Utility library for gitignore style pattern matching of file paths."
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"},
-    {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"},
+    {file = "pathspec-0.11.2-py3-none-any.whl", hash = "sha256:1d6ed233af05e679efb96b1851550ea95bbb64b7c490b0f5aa52996c11e92a20"},
+    {file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"},
 ]
 
 [[package]]
 name = "platformdirs"
-version = "3.9.1"
+version = "4.0.0"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-3.9.1-py3-none-any.whl", hash = "sha256:ad8291ae0ae5072f66c16945166cb11c63394c7a3ad1b1bc9828ca3162da8c2f"},
-    {file = "platformdirs-3.9.1.tar.gz", hash = "sha256:1b42b450ad933e981d56e59f1b97495428c9bd60698baab9f3eb3d00d5822421"},
+    {file = "platformdirs-4.0.0-py3-none-any.whl", hash = "sha256:118c954d7e949b35437270383a3f2531e99dd93cf7ce4dc8340d3356d30f173b"},
+    {file = "platformdirs-4.0.0.tar.gz", hash = "sha256:cb633b2bcf10c51af60beb0ab06d2f1d69064b43abf4c185ca6b28865f3f9731"},
 ]
 
 [package.dependencies]
-typing-extensions = {version = ">=4.6.3", markers = "python_version < \"3.8\""}
+typing-extensions = {version = ">=4.7.1", markers = "python_version < \"3.8\""}
 
 [package.extras]
-docs = ["furo (>=2023.5.20)", "proselint (>=0.13)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"]
-test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)"]
+docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"]
+test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"]
 
 [[package]]
 name = "pluggy"
@@ -344,12 +344,12 @@ files = [
 
 [[package]]
 name = "pyspark"
-version = "3.3.2"
+version = "3.3.3"
 description = "Apache Spark Python API"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pyspark-3.3.2.tar.gz", hash = "sha256:0dfd5db4300c1f6cc9c16d8dbdfb82d881b4b172984da71344ede1a9d4893da8"},
+    {file = "pyspark-3.3.3.tar.gz", hash = "sha256:384d2ad7090cd1db5b2d2ac497bda409d86ab3a27272833e1a27efadf45e4d2f"},
 ]
 
 [package.dependencies]

From a918b194f630ed5fae52710a57627db3328c1831 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 20 Nov 2023 11:36:17 +0000
Subject: [PATCH 465/531] Fix methodology scenarios to account for new group
 col output

---
 .../expansion_ag_marker_test_1_output.csv     |  46 +--
 .../expansion_ag_marker_test_2_output.csv     |  46 +--
 .../expansion_fe_marker_test_1_output.csv     |  38 +--
 .../expansion_fe_marker_test_2_output.csv     |  46 +--
 .../expansion_output.csv                      | 262 +++++++++---------
 .../expansion_w_marker_test_output.csv        |  36 +--
 .../no_expansion_output.csv                   | 262 +++++++++---------
 .../methodology_scenarios/no_ratio_output.csv | 262 +++++++++---------
 .../ratio_ag_marker_test_1_output.csv         |  46 +--
 .../ratio_ag_marker_test_2_output.csv         |  46 +--
 .../ratio_fe_marker_test_1_output.csv         |  38 +--
 .../ratio_fe_marker_test_2_output.csv         |  46 +--
 .../methodology_scenarios/ratio_output.csv    | 262 +++++++++---------
 .../ratio_w_marker_test_output.csv            |  36 +--
 14 files changed, 736 insertions(+), 736 deletions(-)

diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_ag_marker_test_1_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_ag_marker_test_1_output.csv
index 4628eeeb..6a5d20ea 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_ag_marker_test_1_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_ag_marker_test_1_output.csv
@@ -1,23 +1,23 @@
-date,identifier,outlier_weight,winsorisation_marker
-202201,345671,1,W
-202201,345672,1,W
-202201,345673,1,W
-202201,345674,1,W
-202201,345675,1,W
-202201,345676,1,W
-202201,345677,0.914277778,W
-202201,345678,1,W
-202201,345679,1,W
-202201,345680,1,W
-202201,345681,1,W
-202201,345682,1,W
-202201,345683,1,W
-202201,345684,1,W
-202201,345685,1,W
-202201,345686,1,W
-202201,345687,1,W
-202201,345688,1,W
-202201,345689,1,W
-202201,345690,1,W
-202201,345691,1,W
-202201,345692,1,W
+date,identifier,outlier_weight,winsorisation_marker,group
+202201,345671,1,W,1
+202201,345672,1,W,1
+202201,345673,1,W,1
+202201,345674,1,W,1
+202201,345675,1,W,1
+202201,345676,1,W,1
+202201,345677,0.914277778,W,2
+202201,345678,1,W,2
+202201,345679,1,W,2
+202201,345680,1,W,2
+202201,345681,1,W,2
+202201,345682,1,W,2
+202201,345683,1,W,3
+202201,345684,1,W,3
+202201,345685,1,W,3
+202201,345686,1,W,3
+202201,345687,1,W,3
+202201,345688,1,W,4
+202201,345689,1,W,4
+202201,345690,1,W,4
+202201,345691,1,W,4
+202201,345692,1,W,4
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_ag_marker_test_2_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_ag_marker_test_2_output.csv
index b1f0f35f..e05beb61 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_ag_marker_test_2_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_ag_marker_test_2_output.csv
@@ -1,23 +1,23 @@
-date,identifier,outlier_weight,winsorisation_marker
-202201,345671,1,W
-202201,345672,1,W
-202201,345673,1,W
-202201,345674,1,W
-202201,345675,1,W
-202201,345676,1,W
-202201,345677,0.914277778,W
-202201,345678,1,W
-202201,345679,1,W
-202201,345680,1,W
-202201,345681,1,W
-202201,345682,1,W
-202201,345683,1,W
-202201,345684,1,W
-202201,345685,1,W
-202201,345686,1,W
-202201,345687,1,W
-202201,345688,1,NW_FE
-202201,345689,1,NW_FE
-202201,345690,1,NW_FE
-202201,345691,1,NW_FE
-202201,345692,1,NW_FE
+date,identifier,outlier_weight,winsorisation_marker,group
+202201,345671,1,W,1
+202201,345672,1,W,1
+202201,345673,1,W,1
+202201,345674,1,W,1
+202201,345675,1,W,1
+202201,345676,1,W,1
+202201,345677,0.914277778,W,2
+202201,345678,1,W,2
+202201,345679,1,W,2
+202201,345680,1,W,2
+202201,345681,1,W,2
+202201,345682,1,W,2
+202201,345683,1,W,3
+202201,345684,1,W,3
+202201,345685,1,W,3
+202201,345686,1,W,3
+202201,345687,1,W,3
+202201,345688,1,NW_FE,4
+202201,345689,1,NW_FE,4
+202201,345690,1,NW_FE,4
+202201,345691,1,NW_FE,4
+202201,345692,1,NW_FE,4
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_fe_marker_test_1_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_fe_marker_test_1_output.csv
index 6069fb3d..f4031aad 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_fe_marker_test_1_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_fe_marker_test_1_output.csv
@@ -1,19 +1,19 @@
-date,identifier,outlier_weight,winsorisation_marker
-202201,345671,1,W
-202201,345672,1,W
-202201,345673,1,W
-202201,345674,1,W
-202201,345675,1,W
-202201,345676,1,W
-202201,345677,0.914277778,W
-202201,345678,1,W
-202201,345679,1,W
-202201,345680,1,W
-202201,345681,1,W
-202201,345682,1,W
-202201,345683,1,W
-202201,345684,1,W
-202201,345685,1,W
-202201,345686,1,W
-202201,345687,1,W
-202201,345688,1,NW_FE
+date,identifier,outlier_weight,winsorisation_marker,group
+202201,345671,1,W,1
+202201,345672,1,W,1
+202201,345673,1,W,1
+202201,345674,1,W,1
+202201,345675,1,W,1
+202201,345676,1,W,1
+202201,345677,0.914277778,W,2
+202201,345678,1,W,2
+202201,345679,1,W,2
+202201,345680,1,W,2
+202201,345681,1,W,2
+202201,345682,1,W,2
+202201,345683,1,W,3
+202201,345684,1,W,3
+202201,345685,1,W,3
+202201,345686,1,W,3
+202201,345687,1,W,3
+202201,345688,1,NW_FE,3
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_fe_marker_test_2_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_fe_marker_test_2_output.csv
index b1f0f35f..e05beb61 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_fe_marker_test_2_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_fe_marker_test_2_output.csv
@@ -1,23 +1,23 @@
-date,identifier,outlier_weight,winsorisation_marker
-202201,345671,1,W
-202201,345672,1,W
-202201,345673,1,W
-202201,345674,1,W
-202201,345675,1,W
-202201,345676,1,W
-202201,345677,0.914277778,W
-202201,345678,1,W
-202201,345679,1,W
-202201,345680,1,W
-202201,345681,1,W
-202201,345682,1,W
-202201,345683,1,W
-202201,345684,1,W
-202201,345685,1,W
-202201,345686,1,W
-202201,345687,1,W
-202201,345688,1,NW_FE
-202201,345689,1,NW_FE
-202201,345690,1,NW_FE
-202201,345691,1,NW_FE
-202201,345692,1,NW_FE
+date,identifier,outlier_weight,winsorisation_marker,group
+202201,345671,1,W,1
+202201,345672,1,W,1
+202201,345673,1,W,1
+202201,345674,1,W,1
+202201,345675,1,W,1
+202201,345676,1,W,1
+202201,345677,0.914277778,W,2
+202201,345678,1,W,2
+202201,345679,1,W,2
+202201,345680,1,W,2
+202201,345681,1,W,2
+202201,345682,1,W,2
+202201,345683,1,W,3
+202201,345684,1,W,3
+202201,345685,1,W,3
+202201,345686,1,W,3
+202201,345687,1,W,3
+202201,345688,1,NW_FE,4
+202201,345689,1,NW_FE,4
+202201,345690,1,NW_FE,4
+202201,345691,1,NW_FE,4
+202201,345692,1,NW_FE,4
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_output.csv
index ef411fd2..cc7b486f 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_output.csv
@@ -1,131 +1,131 @@
-date,identifier,outlier_weight,winsorisation_marker
-1900,123456,1,"W"
-1900,234567,0.571914804,"W"
-1900,345678,1,"W"
-1900,456789,1,"W"
-1900,567890,1,"W"
-1900,678901,1,"W"
-1900,789012,1,"W"
-1900,890123,1,"W"
-1900,901234,1,"W"
-1900,123450,1,"W"
-1901,123456,1,"W"
-1901,234567,1,"W"
-1901,345678,1,"W"
-1901,456789,1,"W"
-1901,567890,1,"W"
-1901,678901,0.840329381,"W"
-1901,789012,1,"W"
-1901,890123,1,"W"
-1901,901234,1,"W"
-1901,123450,1,"W"
-1902,123456,1,"W"
-1902,234567,1,"W"
-1902,345678,1,"W"
-1902,456789,1,"W"
-1902,567890,1,"W"
-1902,678901,1,"W"
-1902,789012,1,"W"
-1902,890123,1,"W"
-1902,901234,1,"W"
-1902,123450,1,"W"
-1903,123456,1,"W"
-1903,234567,1,"W"
-1903,345678,1,"W"
-1903,456789,0.582106804,"W"
-1903,567890,1,"W"
-1903,678901,1,"W"
-1903,789012,1,"W"
-1903,890123,1,"W"
-1903,901234,1,"W"
-1903,123450,1,"W"
-1904,123456,1,"W"
-1904,234567,1,"W"
-1904,345678,1,"W"
-1904,456789,1,"W"
-1904,567890,1,"W"
-1904,678901,1,"W"
-1904,789012,1,"W"
-1904,890123,1,"W"
-1904,901234,1,"W"
-1904,123450,1,"W"
-1905,123456,1,"W"
-1905,234567,1,"W"
-1905,345678,1,"W"
-1905,456789,1,"W"
-1905,567890,1,"W"
-1905,678901,1,"W"
-1905,789012,1,"W"
-1905,890123,1,"W"
-1905,901234,1,"W"
-1905,123450,1,"W"
-1906,123456,1,"W"
-1906,234567,1,"W"
-1906,345678,1,"W"
-1906,456789,1,"W"
-1906,567890,1,"W"
-1906,678901,1,"W"
-1906,789012,1,"W"
-1906,890123,1,"W"
-1906,901234,1,"W"
-1906,123450,1,"W"
-1907,123456,1,"W"
-1907,234567,1,"W"
-1907,345678,1,"W"
-1907,456789,1,"W"
-1907,567890,1,"W"
-1907,678901,1,"W"
-1907,789012,1,"W"
-1907,890123,1,"W"
-1907,901234,1,"W"
-1907,123450,1,"W"
-1908,123456,1,"W"
-1908,234567,1,"W"
-1908,345678,1,"W"
-1908,456789,1,"W"
-1908,567890,1,"W"
-1908,678901,1,"W"
-1908,789012,1,"W"
-1908,890123,1,"W"
-1908,901234,1,"W"
-1908,123450,1,"W"
-1909,123456,1,"W"
-1909,234567,1,"W"
-1909,345678,1,"W"
-1909,456789,1,"W"
-1909,567890,1,"W"
-1909,678901,1,"W"
-1909,789012,1,"W"
-1909,890123,1,"W"
-1909,901234,1,"W"
-1909,123450,1,"W"
-1910,123456,1,"W"
-1910,234567,1,"W"
-1910,345678,1,"W"
-1910,456789,1,"W"
-1910,567890,1,"W"
-1910,678901,1,"W"
-1910,789012,1,"W"
-1910,890123,1,"W"
-1910,901234,1,"W"
-1910,123450,1,"W"
-1911,123456,1,"W"
-1911,234567,1,"W"
-1911,345678,1,"W"
-1911,456789,1,"W"
-1911,567890,1,"W"
-1911,678901,1,"W"
-1911,789012,1,"W"
-1911,890123,1,"W"
-1911,901234,1,"W"
-1911,123450,1,"W"
-1912,123456,1,"W"
-1912,234567,1,"W"
-1912,345678,1,"W"
-1912,456789,1,"W"
-1912,567890,1,"W"
-1912,678901,1,"W"
-1912,789012,1,"W"
-1912,890123,1,"W"
-1912,901234,1,"W"
-1912,123450,1,"W"
+date,identifier,outlier_weight,winsorisation_marker,group
+1900,123456,1,"W",1001
+1900,234567,0.571914804,"W",1001
+1900,345678,1,"W",1001
+1900,456789,1,"W",1001
+1900,567890,1,"W",1001
+1900,678901,1,"W",1002
+1900,789012,1,"W",1002
+1900,890123,1,"W",1002
+1900,901234,1,"W",1002
+1900,123450,1,"W",1002
+1901,123456,1,"W",1001
+1901,234567,1,"W",1001
+1901,345678,1,"W",1001
+1901,456789,1,"W",1001
+1901,567890,1,"W",1001
+1901,678901,0.840329381,"W",1002
+1901,789012,1,"W",1002
+1901,890123,1,"W",1002
+1901,901234,1,"W",1002
+1901,123450,1,"W",1002
+1902,123456,1,"W",1001
+1902,234567,1,"W",1001
+1902,345678,1,"W",1001
+1902,456789,1,"W",1001
+1902,567890,1,"W",1001
+1902,678901,1,"W",1002
+1902,789012,1,"W",1002
+1902,890123,1,"W",1002
+1902,901234,1,"W",1002
+1902,123450,1,"W",1002
+1903,123456,1,"W",1001
+1903,234567,1,"W",1001
+1903,345678,1,"W",1001
+1903,456789,0.582106804,"W",1001
+1903,567890,1,"W",1001
+1903,678901,1,"W",1002
+1903,789012,1,"W",1002
+1903,890123,1,"W",1002
+1903,901234,1,"W",1002
+1903,123450,1,"W",1002
+1904,123456,1,"W",1001
+1904,234567,1,"W",1001
+1904,345678,1,"W",1001
+1904,456789,1,"W",1001
+1904,567890,1,"W",1001
+1904,678901,1,"W",1002
+1904,789012,1,"W",1002
+1904,890123,1,"W",1002
+1904,901234,1,"W",1002
+1904,123450,1,"W",1002
+1905,123456,1,"W",1001
+1905,234567,1,"W",1001
+1905,345678,1,"W",1001
+1905,456789,1,"W",1001
+1905,567890,1,"W",1001
+1905,678901,1,"W",1002
+1905,789012,1,"W",1002
+1905,890123,1,"W",1002
+1905,901234,1,"W",1002
+1905,123450,1,"W",1002
+1906,123456,1,"W",1001
+1906,234567,1,"W",1001
+1906,345678,1,"W",1001
+1906,456789,1,"W",1001
+1906,567890,1,"W",1001
+1906,678901,1,"W",1002
+1906,789012,1,"W",1002
+1906,890123,1,"W",1002
+1906,901234,1,"W",1002
+1906,123450,1,"W",1002
+1907,123456,1,"W",1001
+1907,234567,1,"W",1001
+1907,345678,1,"W",1001
+1907,456789,1,"W",1001
+1907,567890,1,"W",1001
+1907,678901,1,"W",1002
+1907,789012,1,"W",1002
+1907,890123,1,"W",1002
+1907,901234,1,"W",1002
+1907,123450,1,"W",1002
+1908,123456,1,"W",1001
+1908,234567,1,"W",1001
+1908,345678,1,"W",1001
+1908,456789,1,"W",1001
+1908,567890,1,"W",1001
+1908,678901,1,"W",1002
+1908,789012,1,"W",1002
+1908,890123,1,"W",1002
+1908,901234,1,"W",1002
+1908,123450,1,"W",1002
+1909,123456,1,"W",1001
+1909,234567,1,"W",1001
+1909,345678,1,"W",1001
+1909,456789,1,"W",1001
+1909,567890,1,"W",1001
+1909,678901,1,"W",1002
+1909,789012,1,"W",1002
+1909,890123,1,"W",1002
+1909,901234,1,"W",1002
+1909,123450,1,"W",1002
+1910,123456,1,"W",1001
+1910,234567,1,"W",1001
+1910,345678,1,"W",1001
+1910,456789,1,"W",1001
+1910,567890,1,"W",1001
+1910,678901,1,"W",1002
+1910,789012,1,"W",1002
+1910,890123,1,"W",1002
+1910,901234,1,"W",1002
+1910,123450,1,"W",1002
+1911,123456,1,"W",1001
+1911,234567,1,"W",1001
+1911,345678,1,"W",1001
+1911,456789,1,"W",1001
+1911,567890,1,"W",1001
+1911,678901,1,"W",1002
+1911,789012,1,"W",1002
+1911,890123,1,"W",1002
+1911,901234,1,"W",1002
+1911,123450,1,"W",1002
+1912,123456,1,"W",1001
+1912,234567,1,"W",1001
+1912,345678,1,"W",1001
+1912,456789,1,"W",1001
+1912,567890,1,"W",1001
+1912,678901,1,"W",1002
+1912,789012,1,"W",1002
+1912,890123,1,"W",1002
+1912,901234,1,"W",1002
+1912,123450,1,"W",1002
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_w_marker_test_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_w_marker_test_output.csv
index 423f78b8..c5268d19 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_w_marker_test_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_w_marker_test_output.csv
@@ -1,18 +1,18 @@
-date,identifier,outlier_weight,winsorisation_marker
-202201,345671,1,W
-202201,345672,1,W
-202201,345673,1,W
-202201,345674,1,W
-202201,345675,1,W
-202201,345676,1,W
-202201,345677,0.914277778,W
-202201,345678,1,W
-202201,345679,1,W
-202201,345680,1,W
-202201,345681,1,W
-202201,345682,1,W
-202201,345683,1,W
-202201,345684,1,W
-202201,345685,1,W
-202201,345686,1,W
-202201,345687,1,W
+date,identifier,outlier_weight,winsorisation_marker,group
+202201,345671,1,W,1
+202201,345672,1,W,1
+202201,345673,1,W,1
+202201,345674,1,W,1
+202201,345675,1,W,1
+202201,345676,1,W,1
+202201,345677,0.914277778,W,2
+202201,345678,1,W,2
+202201,345679,1,W,2
+202201,345680,1,W,2
+202201,345681,1,W,2
+202201,345682,1,W,2
+202201,345683,1,W,3
+202201,345684,1,W,3
+202201,345685,1,W,3
+202201,345686,1,W,3
+202201,345687,1,W,3
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/no_expansion_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/no_expansion_output.csv
index 4d2be9ed..b93e9ed1 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/no_expansion_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/no_expansion_output.csv
@@ -1,131 +1,131 @@
-date,identifier,outlier_weight,winsorisation_marker
-1900,123456,1,"W"
-1900,234567,1,"W"
-1900,345678,1,"W"
-1900,456789,1,"W"
-1900,567890,1,"W"
-1900,678901,1,"W"
-1900,789012,1,"W"
-1900,890123,1,"W"
-1900,901234,1,"W"
-1900,123450,1,"W"
-1901,123456,1,"W"
-1901,234567,1,"W"
-1901,345678,1,"W"
-1901,456789,1,"W"
-1901,567890,1,"W"
-1901,678901,1,"W"
-1901,789012,1,"W"
-1901,890123,1,"W"
-1901,901234,1,"W"
-1901,123450,1,"W"
-1902,123456,1,"W"
-1902,234567,1,"W"
-1902,345678,1,"W"
-1902,456789,1,"W"
-1902,567890,1,"W"
-1902,678901,1,"W"
-1902,789012,1,"W"
-1902,890123,1,"W"
-1902,901234,1,"W"
-1902,123450,1,"W"
-1903,123456,1,"W"
-1903,234567,1,"W"
-1903,345678,1,"W"
-1903,456789,1,"W"
-1903,567890,1,"W"
-1903,678901,1,"W"
-1903,789012,1,"W"
-1903,890123,1,"W"
-1903,901234,1,"W"
-1903,123450,1,"W"
-1904,123456,1,"W"
-1904,234567,1,"W"
-1904,345678,1,"W"
-1904,456789,1,"W"
-1904,567890,1,"W"
-1904,678901,1,"W"
-1904,789012,1,"W"
-1904,890123,1,"W"
-1904,901234,1,"W"
-1904,123450,1,"W"
-1905,123456,1,"W"
-1905,234567,1,"W"
-1905,345678,1,"W"
-1905,456789,1,"W"
-1905,567890,1,"W"
-1905,678901,1,"W"
-1905,789012,1,"W"
-1905,890123,1,"W"
-1905,901234,1,"W"
-1905,123450,1,"W"
-1906,123456,1,"W"
-1906,234567,1,"W"
-1906,345678,1,"W"
-1906,456789,1,"W"
-1906,567890,1,"W"
-1906,678901,1,"W"
-1906,789012,1,"W"
-1906,890123,1,"W"
-1906,901234,1,"W"
-1906,123450,1,"W"
-1907,123456,1,"W"
-1907,234567,1,"W"
-1907,345678,1,"W"
-1907,456789,1,"W"
-1907,567890,1,"W"
-1907,678901,1,"W"
-1907,789012,1,"W"
-1907,890123,1,"W"
-1907,901234,1,"W"
-1907,123450,1,"W"
-1908,123456,1,"W"
-1908,234567,1,"W"
-1908,345678,1,"W"
-1908,456789,1,"W"
-1908,567890,1,"W"
-1908,678901,1,"W"
-1908,789012,1,"W"
-1908,890123,1,"W"
-1908,901234,1,"W"
-1908,123450,1,"W"
-1909,123456,1,"W"
-1909,234567,1,"W"
-1909,345678,1,"W"
-1909,456789,1,"W"
-1909,567890,1,"W"
-1909,678901,1,"W"
-1909,789012,1,"W"
-1909,890123,1,"W"
-1909,901234,1,"W"
-1909,123450,1,"W"
-1910,123456,1,"W"
-1910,234567,1,"W"
-1910,345678,1,"W"
-1910,456789,1,"W"
-1910,567890,1,"W"
-1910,678901,1,"W"
-1910,789012,1,"W"
-1910,890123,1,"W"
-1910,901234,1,"W"
-1910,123450,1,"W"
-1911,123456,1,"W"
-1911,234567,1,"W"
-1911,345678,1,"W"
-1911,456789,1,"W"
-1911,567890,1,"W"
-1911,678901,1,"W"
-1911,789012,1,"W"
-1911,890123,1,"W"
-1911,901234,1,"W"
-1911,123450,1,"W"
-1912,123456,1,"W"
-1912,234567,1,"W"
-1912,345678,1,"W"
-1912,456789,1,"W"
-1912,567890,1,"W"
-1912,678901,1,"W"
-1912,789012,1,"W"
-1912,890123,1,"W"
-1912,901234,1,"W"
-1912,123450,1,"W"
+date,identifier,outlier_weight,winsorisation_marker,group
+1900,123456,1,"W",1001
+1900,234567,1,"W",1001
+1900,345678,1,"W",1001
+1900,456789,1,"W",1001
+1900,567890,1,"W",1001
+1900,678901,1,"W",1002
+1900,789012,1,"W",1002
+1900,890123,1,"W",1002
+1900,901234,1,"W",1002
+1900,123450,1,"W",1002
+1901,123456,1,"W",1001
+1901,234567,1,"W",1001
+1901,345678,1,"W",1001
+1901,456789,1,"W",1001
+1901,567890,1,"W",1001
+1901,678901,1,"W",1002
+1901,789012,1,"W",1002
+1901,890123,1,"W",1002
+1901,901234,1,"W",1002
+1901,123450,1,"W",1002
+1902,123456,1,"W",1001
+1902,234567,1,"W",1001
+1902,345678,1,"W",1001
+1902,456789,1,"W",1001
+1902,567890,1,"W",1001
+1902,678901,1,"W",1002
+1902,789012,1,"W",1002
+1902,890123,1,"W",1002
+1902,901234,1,"W",1002
+1902,123450,1,"W",1002
+1903,123456,1,"W",1001
+1903,234567,1,"W",1001
+1903,345678,1,"W",1001
+1903,456789,1,"W",1001
+1903,567890,1,"W",1001
+1903,678901,1,"W",1002
+1903,789012,1,"W",1002
+1903,890123,1,"W",1002
+1903,901234,1,"W",1002
+1903,123450,1,"W",1002
+1904,123456,1,"W",1001
+1904,234567,1,"W",1001
+1904,345678,1,"W",1001
+1904,456789,1,"W",1001
+1904,567890,1,"W",1001
+1904,678901,1,"W",1002
+1904,789012,1,"W",1002
+1904,890123,1,"W",1002
+1904,901234,1,"W",1002
+1904,123450,1,"W",1002
+1905,123456,1,"W",1001
+1905,234567,1,"W",1001
+1905,345678,1,"W",1001
+1905,456789,1,"W",1001
+1905,567890,1,"W",1001
+1905,678901,1,"W",1002
+1905,789012,1,"W",1002
+1905,890123,1,"W",1002
+1905,901234,1,"W",1002
+1905,123450,1,"W",1002
+1906,123456,1,"W",1001
+1906,234567,1,"W",1001
+1906,345678,1,"W",1001
+1906,456789,1,"W",1001
+1906,567890,1,"W",1001
+1906,678901,1,"W",1002
+1906,789012,1,"W",1002
+1906,890123,1,"W",1002
+1906,901234,1,"W",1002
+1906,123450,1,"W",1002
+1907,123456,1,"W",1001
+1907,234567,1,"W",1001
+1907,345678,1,"W",1001
+1907,456789,1,"W",1001
+1907,567890,1,"W",1001
+1907,678901,1,"W",1002
+1907,789012,1,"W",1002
+1907,890123,1,"W",1002
+1907,901234,1,"W",1002
+1907,123450,1,"W",1002
+1908,123456,1,"W",1001
+1908,234567,1,"W",1001
+1908,345678,1,"W",1001
+1908,456789,1,"W",1001
+1908,567890,1,"W",1001
+1908,678901,1,"W",1002
+1908,789012,1,"W",1002
+1908,890123,1,"W",1002
+1908,901234,1,"W",1002
+1908,123450,1,"W",1002
+1909,123456,1,"W",1001
+1909,234567,1,"W",1001
+1909,345678,1,"W",1001
+1909,456789,1,"W",1001
+1909,567890,1,"W",1001
+1909,678901,1,"W",1002
+1909,789012,1,"W",1002
+1909,890123,1,"W",1002
+1909,901234,1,"W",1002
+1909,123450,1,"W",1002
+1910,123456,1,"W",1001
+1910,234567,1,"W",1001
+1910,345678,1,"W",1001
+1910,456789,1,"W",1001
+1910,567890,1,"W",1001
+1910,678901,1,"W",1002
+1910,789012,1,"W",1002
+1910,890123,1,"W",1002
+1910,901234,1,"W",1002
+1910,123450,1,"W",1002
+1911,123456,1,"W",1001
+1911,234567,1,"W",1001
+1911,345678,1,"W",1001
+1911,456789,1,"W",1001
+1911,567890,1,"W",1001
+1911,678901,1,"W",1002
+1911,789012,1,"W",1002
+1911,890123,1,"W",1002
+1911,901234,1,"W",1002
+1911,123450,1,"W",1002
+1912,123456,1,"W",1001
+1912,234567,1,"W",1001
+1912,345678,1,"W",1001
+1912,456789,1,"W",1001
+1912,567890,1,"W",1001
+1912,678901,1,"W",1002
+1912,789012,1,"W",1002
+1912,890123,1,"W",1002
+1912,901234,1,"W",1002
+1912,123450,1,"W",1002
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/no_ratio_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/no_ratio_output.csv
index 4d2be9ed..871960be 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/no_ratio_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/no_ratio_output.csv
@@ -1,131 +1,131 @@
-date,identifier,outlier_weight,winsorisation_marker
-1900,123456,1,"W"
-1900,234567,1,"W"
-1900,345678,1,"W"
-1900,456789,1,"W"
-1900,567890,1,"W"
-1900,678901,1,"W"
-1900,789012,1,"W"
-1900,890123,1,"W"
-1900,901234,1,"W"
-1900,123450,1,"W"
-1901,123456,1,"W"
-1901,234567,1,"W"
-1901,345678,1,"W"
-1901,456789,1,"W"
-1901,567890,1,"W"
-1901,678901,1,"W"
-1901,789012,1,"W"
-1901,890123,1,"W"
-1901,901234,1,"W"
-1901,123450,1,"W"
-1902,123456,1,"W"
-1902,234567,1,"W"
-1902,345678,1,"W"
-1902,456789,1,"W"
-1902,567890,1,"W"
-1902,678901,1,"W"
-1902,789012,1,"W"
-1902,890123,1,"W"
-1902,901234,1,"W"
-1902,123450,1,"W"
-1903,123456,1,"W"
-1903,234567,1,"W"
-1903,345678,1,"W"
-1903,456789,1,"W"
-1903,567890,1,"W"
-1903,678901,1,"W"
-1903,789012,1,"W"
-1903,890123,1,"W"
-1903,901234,1,"W"
-1903,123450,1,"W"
-1904,123456,1,"W"
-1904,234567,1,"W"
-1904,345678,1,"W"
-1904,456789,1,"W"
-1904,567890,1,"W"
-1904,678901,1,"W"
-1904,789012,1,"W"
-1904,890123,1,"W"
-1904,901234,1,"W"
-1904,123450,1,"W"
-1905,123456,1,"W"
-1905,234567,1,"W"
-1905,345678,1,"W"
-1905,456789,1,"W"
-1905,567890,1,"W"
-1905,678901,1,"W"
-1905,789012,1,"W"
-1905,890123,1,"W"
-1905,901234,1,"W"
-1905,123450,1,"W"
-1906,123456,1,"W"
-1906,234567,1,"W"
-1906,345678,1,"W"
-1906,456789,1,"W"
-1906,567890,1,"W"
-1906,678901,1,"W"
-1906,789012,1,"W"
-1906,890123,1,"W"
-1906,901234,1,"W"
-1906,123450,1,"W"
-1907,123456,1,"W"
-1907,234567,1,"W"
-1907,345678,1,"W"
-1907,456789,1,"W"
-1907,567890,1,"W"
-1907,678901,1,"W"
-1907,789012,1,"W"
-1907,890123,1,"W"
-1907,901234,1,"W"
-1907,123450,1,"W"
-1908,123456,1,"W"
-1908,234567,1,"W"
-1908,345678,1,"W"
-1908,456789,1,"W"
-1908,567890,1,"W"
-1908,678901,1,"W"
-1908,789012,1,"W"
-1908,890123,1,"W"
-1908,901234,1,"W"
-1908,123450,1,"W"
-1909,123456,1,"W"
-1909,234567,1,"W"
-1909,345678,1,"W"
-1909,456789,1,"W"
-1909,567890,1,"W"
-1909,678901,1,"W"
-1909,789012,1,"W"
-1909,890123,1,"W"
-1909,901234,1,"W"
-1909,123450,1,"W"
-1910,123456,1,"W"
-1910,234567,1,"W"
-1910,345678,1,"W"
-1910,456789,1,"W"
-1910,567890,1,"W"
-1910,678901,1,"W"
-1910,789012,1,"W"
-1910,890123,1,"W"
-1910,901234,1,"W"
-1910,123450,1,"W"
-1911,123456,1,"W"
-1911,234567,1,"W"
-1911,345678,1,"W"
-1911,456789,1,"W"
-1911,567890,1,"W"
-1911,678901,1,"W"
-1911,789012,1,"W"
-1911,890123,1,"W"
-1911,901234,1,"W"
-1911,123450,1,"W"
-1912,123456,1,"W"
-1912,234567,1,"W"
-1912,345678,1,"W"
-1912,456789,1,"W"
-1912,567890,1,"W"
-1912,678901,1,"W"
-1912,789012,1,"W"
-1912,890123,1,"W"
-1912,901234,1,"W"
-1912,123450,1,"W"
+date,identifier,outlier_weight,winsorisation_marker,group
+1900,123456,1,"W",1
+1900,234567,1,"W",1
+1900,345678,1,"W",1
+1900,456789,1,"W",1
+1900,567890,1,"W",1
+1900,678901,1,"W",1
+1900,789012,1,"W",1
+1900,890123,1,"W",1
+1900,901234,1,"W",1
+1900,123450,1,"W",1
+1901,123456,1,"W",1
+1901,234567,1,"W",1
+1901,345678,1,"W",1
+1901,456789,1,"W",1
+1901,567890,1,"W",1
+1901,678901,1,"W",1
+1901,789012,1,"W",1
+1901,890123,1,"W",1
+1901,901234,1,"W",1
+1901,123450,1,"W",1
+1902,123456,1,"W",1
+1902,234567,1,"W",1
+1902,345678,1,"W",1
+1902,456789,1,"W",1
+1902,567890,1,"W",1
+1902,678901,1,"W",1
+1902,789012,1,"W",1
+1902,890123,1,"W",1
+1902,901234,1,"W",1
+1902,123450,1,"W",1
+1903,123456,1,"W",1
+1903,234567,1,"W",1
+1903,345678,1,"W",1
+1903,456789,1,"W",1
+1903,567890,1,"W",1
+1903,678901,1,"W",1
+1903,789012,1,"W",1
+1903,890123,1,"W",1
+1903,901234,1,"W",1
+1903,123450,1,"W",1
+1904,123456,1,"W",1
+1904,234567,1,"W",1
+1904,345678,1,"W",1
+1904,456789,1,"W",1
+1904,567890,1,"W",1
+1904,678901,1,"W",1
+1904,789012,1,"W",1
+1904,890123,1,"W",1
+1904,901234,1,"W",1
+1904,123450,1,"W",1
+1905,123456,1,"W",1
+1905,234567,1,"W",1
+1905,345678,1,"W",1
+1905,456789,1,"W",1
+1905,567890,1,"W",1
+1905,678901,1,"W",1
+1905,789012,1,"W",1
+1905,890123,1,"W",1
+1905,901234,1,"W",1
+1905,123450,1,"W",1
+1906,123456,1,"W",1
+1906,234567,1,"W",1
+1906,345678,1,"W",1
+1906,456789,1,"W",1
+1906,567890,1,"W",1
+1906,678901,1,"W",1
+1906,789012,1,"W",1
+1906,890123,1,"W",1
+1906,901234,1,"W",1
+1906,123450,1,"W",1
+1907,123456,1,"W",1
+1907,234567,1,"W",1
+1907,345678,1,"W",1
+1907,456789,1,"W",1
+1907,567890,1,"W",1
+1907,678901,1,"W",1
+1907,789012,1,"W",1
+1907,890123,1,"W",1
+1907,901234,1,"W",1
+1907,123450,1,"W",1
+1908,123456,1,"W",1
+1908,234567,1,"W",1
+1908,345678,1,"W",1
+1908,456789,1,"W",1
+1908,567890,1,"W",1
+1908,678901,1,"W",1
+1908,789012,1,"W",1
+1908,890123,1,"W",1
+1908,901234,1,"W",1
+1908,123450,1,"W",1
+1909,123456,1,"W",1
+1909,234567,1,"W",1
+1909,345678,1,"W",1
+1909,456789,1,"W",1
+1909,567890,1,"W",1
+1909,678901,1,"W",1
+1909,789012,1,"W",1
+1909,890123,1,"W",1
+1909,901234,1,"W",1
+1909,123450,1,"W",1
+1910,123456,1,"W",1
+1910,234567,1,"W",1
+1910,345678,1,"W",1
+1910,456789,1,"W",1
+1910,567890,1,"W",1
+1910,678901,1,"W",1
+1910,789012,1,"W",1
+1910,890123,1,"W",1
+1910,901234,1,"W",1
+1910,123450,1,"W",1
+1911,123456,1,"W",1
+1911,234567,1,"W",1
+1911,345678,1,"W",1
+1911,456789,1,"W",1
+1911,567890,1,"W",1
+1911,678901,1,"W",1
+1911,789012,1,"W",1
+1911,890123,1,"W",1
+1911,901234,1,"W",1
+1911,123450,1,"W",1
+1912,123456,1,"W",1
+1912,234567,1,"W",1
+1912,345678,1,"W",1
+1912,456789,1,"W",1
+1912,567890,1,"W",1
+1912,678901,1,"W",1
+1912,789012,1,"W",1
+1912,890123,1,"W",1
+1912,901234,1,"W",1
+1912,123450,1,"W",1
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_ag_marker_test_1_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_ag_marker_test_1_output.csv
index bc4f3e9d..e569ca15 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_ag_marker_test_1_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_ag_marker_test_1_output.csv
@@ -1,23 +1,23 @@
-date,identifier,outlier_weight,winsorisation_marker
-202201,345671,1,W
-202201,345672,1,W
-202201,345673,1,W
-202201,345674,1,W
-202201,345675,1,W
-202201,345676,1,W
-202201,345677,0.808723136,W
-202201,345678,1,W
-202201,345679,1,W
-202201,345680,1,W
-202201,345681,1,W
-202201,345682,1,W
-202201,345683,1,W
-202201,345684,1,W
-202201,345685,1,W
-202201,345686,1,W
-202201,345687,1,W
-202201,345688,1,NW_AG
-202201,345689,1,NW_AG
-202201,345690,1,NW_AG
-202201,345691,1,NW_AG
-202201,345692,1,NW_AG
+date,identifier,outlier_weight,winsorisation_marker,group
+202201,345671,1,W,1
+202201,345672,1,W,1
+202201,345673,1,W,1
+202201,345674,1,W,1
+202201,345675,1,W,1
+202201,345676,1,W,1
+202201,345677,0.808723136,W,1
+202201,345678,1,W,1
+202201,345679,1,W,1
+202201,345680,1,W,1
+202201,345681,1,W,1
+202201,345682,1,W,1
+202201,345683,1,W,2
+202201,345684,1,W,2
+202201,345685,1,W,2
+202201,345686,1,W,2
+202201,345687,1,W,2
+202201,345688,1,NW_AG,3
+202201,345689,1,NW_AG,3
+202201,345690,1,NW_AG,3
+202201,345691,1,NW_AG,3
+202201,345692,1,NW_AG,3
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_ag_marker_test_2_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_ag_marker_test_2_output.csv
index bc4f3e9d..e569ca15 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_ag_marker_test_2_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_ag_marker_test_2_output.csv
@@ -1,23 +1,23 @@
-date,identifier,outlier_weight,winsorisation_marker
-202201,345671,1,W
-202201,345672,1,W
-202201,345673,1,W
-202201,345674,1,W
-202201,345675,1,W
-202201,345676,1,W
-202201,345677,0.808723136,W
-202201,345678,1,W
-202201,345679,1,W
-202201,345680,1,W
-202201,345681,1,W
-202201,345682,1,W
-202201,345683,1,W
-202201,345684,1,W
-202201,345685,1,W
-202201,345686,1,W
-202201,345687,1,W
-202201,345688,1,NW_AG
-202201,345689,1,NW_AG
-202201,345690,1,NW_AG
-202201,345691,1,NW_AG
-202201,345692,1,NW_AG
+date,identifier,outlier_weight,winsorisation_marker,group
+202201,345671,1,W,1
+202201,345672,1,W,1
+202201,345673,1,W,1
+202201,345674,1,W,1
+202201,345675,1,W,1
+202201,345676,1,W,1
+202201,345677,0.808723136,W,1
+202201,345678,1,W,1
+202201,345679,1,W,1
+202201,345680,1,W,1
+202201,345681,1,W,1
+202201,345682,1,W,1
+202201,345683,1,W,2
+202201,345684,1,W,2
+202201,345685,1,W,2
+202201,345686,1,W,2
+202201,345687,1,W,2
+202201,345688,1,NW_AG,3
+202201,345689,1,NW_AG,3
+202201,345690,1,NW_AG,3
+202201,345691,1,NW_AG,3
+202201,345692,1,NW_AG,3
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_fe_marker_test_1_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_fe_marker_test_1_output.csv
index 3b9ad128..e22f18a1 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_fe_marker_test_1_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_fe_marker_test_1_output.csv
@@ -1,19 +1,19 @@
-date,identifier,outlier_weight,winsorisation_marker
-202201,345671,1,W
-202201,345672,1,W
-202201,345673,1,W
-202201,345674,1,W
-202201,345675,1,W
-202201,345676,1,W
-202201,345677,0.808723136,W
-202201,345678,1,W
-202201,345679,1,W
-202201,345680,1,W
-202201,345681,1,W
-202201,345682,1,W
-202201,345683,1,W
-202201,345684,1,W
-202201,345685,1,W
-202201,345686,1,W
-202201,345687,1,W
-202201,345688,1,NW_FE
+date,identifier,outlier_weight,winsorisation_marker,group
+202201,345671,1,W,1
+202201,345672,1,W,1
+202201,345673,1,W,1
+202201,345674,1,W,1
+202201,345675,1,W,1
+202201,345676,1,W,1
+202201,345677,0.808723136,W,1
+202201,345678,1,W,1
+202201,345679,1,W,1
+202201,345680,1,W,1
+202201,345681,1,W,1
+202201,345682,1,W,1
+202201,345683,1,W,2
+202201,345684,1,W,2
+202201,345685,1,W,2
+202201,345686,1,W,2
+202201,345687,1,W,2
+202201,345688,1,NW_FE,2
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_fe_marker_test_2_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_fe_marker_test_2_output.csv
index dc508f74..36f297c6 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_fe_marker_test_2_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_fe_marker_test_2_output.csv
@@ -1,23 +1,23 @@
-date,identifier,outlier_weight,winsorisation_marker
-202201,345671,1,W
-202201,345672,1,W
-202201,345673,1,W
-202201,345674,1,W
-202201,345675,1,W
-202201,345676,1,W
-202201,345677,0.808723136,W
-202201,345678,1,W
-202201,345679,1,W
-202201,345680,1,W
-202201,345681,1,W
-202201,345682,1,W
-202201,345683,1,W
-202201,345684,1,W
-202201,345685,1,W
-202201,345686,1,W
-202201,345687,1,W
-202201,345688,1,NW_FE
-202201,345689,1,NW_FE
-202201,345690,1,NW_FE
-202201,345691,1,NW_FE
-202201,345692,1,NW_FE
+date,identifier,outlier_weight,winsorisation_marker,group
+202201,345671,1,W,1
+202201,345672,1,W,1
+202201,345673,1,W,1
+202201,345674,1,W,1
+202201,345675,1,W,1
+202201,345676,1,W,1
+202201,345677,0.808723136,W,1
+202201,345678,1,W,1
+202201,345679,1,W,1
+202201,345680,1,W,1
+202201,345681,1,W,1
+202201,345682,1,W,1
+202201,345683,1,W,2
+202201,345684,1,W,2
+202201,345685,1,W,2
+202201,345686,1,W,2
+202201,345687,1,W,2
+202201,345688,1,NW_FE,3
+202201,345689,1,NW_FE,3
+202201,345690,1,NW_FE,3
+202201,345691,1,NW_FE,3
+202201,345692,1,NW_FE,3
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_output.csv
index f898bb4b..e2b12520 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_output.csv
@@ -1,131 +1,131 @@
-date,identifier,outlier_weight,winsorisation_marker
-1900,123456,1,"W"
-1900,234567,0.433037166,"W"
-1900,345678,1,"W"
-1900,456789,1,"W"
-1900,567890,1,"W"
-1900,678901,1,"W"
-1900,789012,1,"W"
-1900,890123,1,"W"
-1900,901234,1,"W"
-1900,123450,1,"W"
-1901,123456,1,"W"
-1901,234567,1,"W"
-1901,345678,1,"W"
-1901,456789,1,"W"
-1901,567890,1,"W"
-1901,678901,0.65363467,"W"
-1901,789012,1,"W"
-1901,890123,1,"W"
-1901,901234,1,"W"
-1901,123450,1,"W"
-1902,123456,1,"W"
-1902,234567,1,"W"
-1902,345678,1,"W"
-1902,456789,1,"W"
-1902,567890,1,"W"
-1902,678901,1,"W"
-1902,789012,1,"W"
-1902,890123,1,"W"
-1902,901234,1,"W"
-1902,123450,1,"W"
-1903,123456,1,"W"
-1903,234567,1,"W"
-1903,345678,1,"W"
-1903,456789,0.40753249,"W"
-1903,567890,1,"W"
-1903,678901,1,"W"
-1903,789012,1,"W"
-1903,890123,0.905795178,"W"
-1903,901234,1,"W"
-1903,123450,1,"W"
-1904,123456,1,"W"
-1904,234567,1,"W"
-1904,345678,1,"W"
-1904,456789,1,"W"
-1904,567890,1,"W"
-1904,678901,1,"W"
-1904,789012,1,"W"
-1904,890123,1,"W"
-1904,901234,1,"W"
-1904,123450,1,"W"
-1905,123456,1,"W"
-1905,234567,1,"W"
-1905,345678,1,"W"
-1905,456789,1,"W"
-1905,567890,1,"W"
-1905,678901,1,"W"
-1905,789012,1,"W"
-1905,890123,1,"W"
-1905,901234,1,"W"
-1905,123450,1,"W"
-1906,123456,1,"W"
-1906,234567,1,"W"
-1906,345678,1,"W"
-1906,456789,1,"W"
-1906,567890,1,"W"
-1906,678901,1,"W"
-1906,789012,1,"W"
-1906,890123,1,"W"
-1906,901234,1,"W"
-1906,123450,1,"W"
-1907,123456,1,"W"
-1907,234567,1,"W"
-1907,345678,1,"W"
-1907,456789,1,"W"
-1907,567890,1,"W"
-1907,678901,1,"W"
-1907,789012,1,"W"
-1907,890123,1,"W"
-1907,901234,1,"W"
-1907,123450,1,"W"
-1908,123456,1,"W"
-1908,234567,1,"W"
-1908,345678,1,"W"
-1908,456789,1,"W"
-1908,567890,1,"W"
-1908,678901,1,"W"
-1908,789012,1,"W"
-1908,890123,1,"W"
-1908,901234,1,"W"
-1908,123450,1,"W"
-1909,123456,1,"W"
-1909,234567,1,"W"
-1909,345678,1,"W"
-1909,456789,1,"W"
-1909,567890,1,"W"
-1909,678901,1,"W"
-1909,789012,1,"W"
-1909,890123,1,"W"
-1909,901234,1,"W"
-1909,123450,1,"W"
-1910,123456,1,"W"
-1910,234567,1,"W"
-1910,345678,1,"W"
-1910,456789,1,"W"
-1910,567890,1,"W"
-1910,678901,1,"W"
-1910,789012,1,"W"
-1910,890123,1,"W"
-1910,901234,1,"W"
-1910,123450,1,"W"
-1911,123456,1,"W"
-1911,234567,1,"W"
-1911,345678,1,"W"
-1911,456789,1,"W"
-1911,567890,1,"W"
-1911,678901,1,"W"
-1911,789012,1,"W"
-1911,890123,1,"W"
-1911,901234,1,"W"
-1911,123450,1,"W"
-1912,123456,1,"W"
-1912,234567,1,"W"
-1912,345678,1,"W"
-1912,456789,1,"W"
-1912,567890,1,"W"
-1912,678901,1,"W"
-1912,789012,1,"W"
-1912,890123,1,"W"
-1912,901234,1,"W"
-1912,123450,1,"W"
+date,identifier,outlier_weight,winsorisation_marker,group
+1900,123456,1,"W",1
+1900,234567,0.433037166,"W",1
+1900,345678,1,"W",1
+1900,456789,1,"W",1
+1900,567890,1,"W",1
+1900,678901,1,"W",1
+1900,789012,1,"W",1
+1900,890123,1,"W",1
+1900,901234,1,"W",1
+1900,123450,1,"W",1
+1901,123456,1,"W",1
+1901,234567,1,"W",1
+1901,345678,1,"W",1
+1901,456789,1,"W",1
+1901,567890,1,"W",1
+1901,678901,0.65363467,"W",1
+1901,789012,1,"W",1
+1901,890123,1,"W",1
+1901,901234,1,"W",1
+1901,123450,1,"W",1
+1902,123456,1,"W",1
+1902,234567,1,"W",1
+1902,345678,1,"W",1
+1902,456789,1,"W",1
+1902,567890,1,"W",1
+1902,678901,1,"W",1
+1902,789012,1,"W",1
+1902,890123,1,"W",1
+1902,901234,1,"W",1
+1902,123450,1,"W",1
+1903,123456,1,"W",1
+1903,234567,1,"W",1
+1903,345678,1,"W",1
+1903,456789,0.40753249,"W",1
+1903,567890,1,"W",1
+1903,678901,1,"W",1
+1903,789012,1,"W",1
+1903,890123,0.905795178,"W",1
+1903,901234,1,"W",1
+1903,123450,1,"W",1
+1904,123456,1,"W",1
+1904,234567,1,"W",1
+1904,345678,1,"W",1
+1904,456789,1,"W",1
+1904,567890,1,"W",1
+1904,678901,1,"W",1
+1904,789012,1,"W",1
+1904,890123,1,"W",1
+1904,901234,1,"W",1
+1904,123450,1,"W",1
+1905,123456,1,"W",1
+1905,234567,1,"W",1
+1905,345678,1,"W",1
+1905,456789,1,"W",1
+1905,567890,1,"W",1
+1905,678901,1,"W",1
+1905,789012,1,"W",1
+1905,890123,1,"W",1
+1905,901234,1,"W",1
+1905,123450,1,"W",1
+1906,123456,1,"W",1
+1906,234567,1,"W",1
+1906,345678,1,"W",1
+1906,456789,1,"W",1
+1906,567890,1,"W",1
+1906,678901,1,"W",1
+1906,789012,1,"W",1
+1906,890123,1,"W",1
+1906,901234,1,"W",1
+1906,123450,1,"W",1
+1907,123456,1,"W",1
+1907,234567,1,"W",1
+1907,345678,1,"W",1
+1907,456789,1,"W",1
+1907,567890,1,"W",1
+1907,678901,1,"W",1
+1907,789012,1,"W",1
+1907,890123,1,"W",1
+1907,901234,1,"W",1
+1907,123450,1,"W",1
+1908,123456,1,"W",1
+1908,234567,1,"W",1
+1908,345678,1,"W",1
+1908,456789,1,"W",1
+1908,567890,1,"W",1
+1908,678901,1,"W",1
+1908,789012,1,"W",1
+1908,890123,1,"W",1
+1908,901234,1,"W",1
+1908,123450,1,"W",1
+1909,123456,1,"W",1
+1909,234567,1,"W",1
+1909,345678,1,"W",1
+1909,456789,1,"W",1
+1909,567890,1,"W",1
+1909,678901,1,"W",1
+1909,789012,1,"W",1
+1909,890123,1,"W",1
+1909,901234,1,"W",1
+1909,123450,1,"W",1
+1910,123456,1,"W",1
+1910,234567,1,"W",1
+1910,345678,1,"W",1
+1910,456789,1,"W",1
+1910,567890,1,"W",1
+1910,678901,1,"W",1
+1910,789012,1,"W",1
+1910,890123,1,"W",1
+1910,901234,1,"W",1
+1910,123450,1,"W",1
+1911,123456,1,"W",1
+1911,234567,1,"W",1
+1911,345678,1,"W",1
+1911,456789,1,"W",1
+1911,567890,1,"W",1
+1911,678901,1,"W",1
+1911,789012,1,"W",1
+1911,890123,1,"W",1
+1911,901234,1,"W",1
+1911,123450,1,"W",1
+1912,123456,1,"W",1
+1912,234567,1,"W",1
+1912,345678,1,"W",1
+1912,456789,1,"W",1
+1912,567890,1,"W",1
+1912,678901,1,"W",1
+1912,789012,1,"W",1
+1912,890123,1,"W",1
+1912,901234,1,"W",1
+1912,123450,1,"W",1
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_w_marker_test_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_w_marker_test_output.csv
index 53d83706..1612d023 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_w_marker_test_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/ratio_w_marker_test_output.csv
@@ -1,18 +1,18 @@
-date,identifier,outlier_weight,winsorisation_marker
-202201,345671,1,W
-202201,345672,1,W
-202201,345673,1,W
-202201,345674,1,W
-202201,345675,1,W
-202201,345676,1,W
-202201,345677,0.808723136,W
-202201,345678,1,W
-202201,345679,1,W
-202201,345680,1,W
-202201,345681,1,W
-202201,345682,1,W
-202201,345683,1,W
-202201,345684,1,W
-202201,345685,1,W
-202201,345686,1,W
-202201,345687,1,W
+date,identifier,outlier_weight,winsorisation_marker,group
+202201,345671,1,W,1
+202201,345672,1,W,1
+202201,345673,1,W,1
+202201,345674,1,W,1
+202201,345675,1,W,1
+202201,345676,1,W,1
+202201,345677,0.808723136,W,1
+202201,345678,1,W,1
+202201,345679,1,W,1
+202201,345680,1,W,1
+202201,345681,1,W,1
+202201,345682,1,W,1
+202201,345683,1,W,2
+202201,345684,1,W,2
+202201,345685,1,W,2
+202201,345686,1,W,2
+202201,345687,1,W,2

From 4fdc78b7c0f55ee610d052a21c2b77fd43f76bc2 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 20 Nov 2023 11:38:14 +0000
Subject: [PATCH 466/531] Remove unnecessary dev scenarios and fix the
 remaining one

---
 .../dev_scenarios/expansion_winsorisation_input.csv    | 10 ----------
 .../dev_scenarios/expansion_winsorisation_output.csv   | 10 ----------
 .../dev_scenarios/ratio_winsorisation_input.csv        | 10 ----------
 .../dev_scenarios/ratio_winsorisation_output.csv       | 10 ----------
 .../winsorisation/dev_scenarios/zero_return_output.csv | 10 +++++-----
 5 files changed, 5 insertions(+), 45 deletions(-)
 delete mode 100644 tests/fixture_data/outliering/winsorisation/dev_scenarios/expansion_winsorisation_input.csv
 delete mode 100644 tests/fixture_data/outliering/winsorisation/dev_scenarios/expansion_winsorisation_output.csv
 delete mode 100644 tests/fixture_data/outliering/winsorisation/dev_scenarios/ratio_winsorisation_input.csv
 delete mode 100644 tests/fixture_data/outliering/winsorisation/dev_scenarios/ratio_winsorisation_output.csv

diff --git a/tests/fixture_data/outliering/winsorisation/dev_scenarios/expansion_winsorisation_input.csv b/tests/fixture_data/outliering/winsorisation/dev_scenarios/expansion_winsorisation_input.csv
deleted file mode 100644
index d11b6b1b..00000000
--- a/tests/fixture_data/outliering/winsorisation/dev_scenarios/expansion_winsorisation_input.csv
+++ /dev/null
@@ -1,10 +0,0 @@
-identifier,date,group,question,design,L
-1,202001,1,10,1,5
-1,202002,1,10,2,5
-1,202003,1,15,3,5
-2,202001,1,20,1,5
-2,202002,1,20,2,5
-2,202003,1,25,3,5
-3,202001,2,30,1,10
-3,202002,2,30,2,10
-3,202003,2,35,3,10
diff --git a/tests/fixture_data/outliering/winsorisation/dev_scenarios/expansion_winsorisation_output.csv b/tests/fixture_data/outliering/winsorisation/dev_scenarios/expansion_winsorisation_output.csv
deleted file mode 100644
index 879d6ca3..00000000
--- a/tests/fixture_data/outliering/winsorisation/dev_scenarios/expansion_winsorisation_output.csv
+++ /dev/null
@@ -1,10 +0,0 @@
-identifier,date,outlier_weight,winsorisation_marker
-1,202001,1,"NW_FE"
-1,202002,1,"W"
-1,202003,1,"W"
-2,202001,1,"NW_FE"
-2,202002,1,"W"
-2,202003,0.933333,"W"
-3,202001,1,"NW_FE"
-3,202002,1,"W"
-3,202003,1,"W"
diff --git a/tests/fixture_data/outliering/winsorisation/dev_scenarios/ratio_winsorisation_input.csv b/tests/fixture_data/outliering/winsorisation/dev_scenarios/ratio_winsorisation_input.csv
deleted file mode 100644
index dad68c5d..00000000
--- a/tests/fixture_data/outliering/winsorisation/dev_scenarios/ratio_winsorisation_input.csv
+++ /dev/null
@@ -1,10 +0,0 @@
-identifier,date,group,question,design,L,calibration,other
-1,202001,1,10,1,5,2,8
-1,202002,1,10,2,5,4,8
-1,202003,1,15,3,5,6,8
-2,202001,1,20,1,5,2,8
-2,202002,1,20,2,5,4,8
-2,202003,1,25,3,5,6,8
-3,202001,2,30,1,10,2,8
-3,202002,2,30,2,10,4,8
-3,202003,2,35,3,10,6,8
diff --git a/tests/fixture_data/outliering/winsorisation/dev_scenarios/ratio_winsorisation_output.csv b/tests/fixture_data/outliering/winsorisation/dev_scenarios/ratio_winsorisation_output.csv
deleted file mode 100644
index b683c239..00000000
--- a/tests/fixture_data/outliering/winsorisation/dev_scenarios/ratio_winsorisation_output.csv
+++ /dev/null
@@ -1,10 +0,0 @@
-identifier,date,outlier_weight,winsorisation_marker
-1,202001,1,"NW_FE"
-1,202002,1,"W"
-1,202003,1,"W"
-2,202001,1,"NW_FE"
-2,202002,0.8125,"W"
-2,202003,0.822222,"W"
-3,202001,1,"NW_FE"
-3,202002,1,"W"
-3,202003,1,"W"
diff --git a/tests/fixture_data/outliering/winsorisation/dev_scenarios/zero_return_output.csv b/tests/fixture_data/outliering/winsorisation/dev_scenarios/zero_return_output.csv
index a9ea342b..5d8051db 100644
--- a/tests/fixture_data/outliering/winsorisation/dev_scenarios/zero_return_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/dev_scenarios/zero_return_output.csv
@@ -1,5 +1,5 @@
-identifier,date,outlier_weight,winsorisation_marker
-3,202001,1,"NW_FE"
-3,202002,1,"W"
-3,202003,1,"W"
-3,202004,1,"W"
+identifier,date,outlier_weight,winsorisation_marker,group
+3,202001,1,"NW_FE",2
+3,202002,1,"W",2
+3,202003,1,"W",2
+3,202004,1,"W",2

From 6e46a496b6ff3a8fd4185d4951cc73cb13f33a22 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 20 Nov 2023 11:39:25 +0000
Subject: [PATCH 467/531] new poetry lock file

---
 poetry.lock | 71 +++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 50 insertions(+), 21 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 19a651a2..dada4037 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,9 +1,10 @@
-# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
+# This file is automatically @generated by Poetry and should not be changed by hand.
 
 [[package]]
 name = "black"
 version = "23.3.0"
 description = "The uncompromising code formatter."
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -52,13 +53,14 @@ uvloop = ["uvloop (>=0.15.2)"]
 
 [[package]]
 name = "click"
-version = "8.1.6"
+version = "8.1.7"
 description = "Composable command line interface toolkit"
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"},
-    {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"},
+    {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"},
+    {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"},
 ]
 
 [package.dependencies]
@@ -69,6 +71,7 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""}
 name = "colorama"
 version = "0.4.6"
 description = "Cross-platform colored terminal text."
+category = "dev"
 optional = false
 python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
 files = [
@@ -80,6 +83,7 @@ files = [
 name = "coverage"
 version = "7.2.7"
 description = "Code coverage measurement for Python"
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -153,13 +157,14 @@ toml = ["tomli"]
 
 [[package]]
 name = "exceptiongroup"
-version = "1.1.2"
+version = "1.1.3"
 description = "Backport of PEP 654 (exception groups)"
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "exceptiongroup-1.1.2-py3-none-any.whl", hash = "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"},
-    {file = "exceptiongroup-1.1.2.tar.gz", hash = "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5"},
+    {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"},
+    {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"},
 ]
 
 [package.extras]
@@ -169,6 +174,7 @@ test = ["pytest (>=6)"]
 name = "flake8"
 version = "5.0.4"
 description = "the modular source code checker: pep8 pyflakes and co"
+category = "dev"
 optional = false
 python-versions = ">=3.6.1"
 files = [
@@ -186,6 +192,7 @@ pyflakes = ">=2.5.0,<2.6.0"
 name = "flake8-pyproject"
 version = "1.2.3"
 description = "Flake8 plug-in loading the configuration from pyproject.toml"
+category = "dev"
 optional = false
 python-versions = ">= 3.6"
 files = [
@@ -203,6 +210,7 @@ dev = ["pyTest", "pyTest-cov"]
 name = "importlib-metadata"
 version = "4.2.0"
 description = "Read metadata from Python packages"
+category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -222,6 +230,7 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517",
 name = "iniconfig"
 version = "2.0.0"
 description = "brain-dead simple config-ini parsing"
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -233,6 +242,7 @@ files = [
 name = "mccabe"
 version = "0.7.0"
 description = "McCabe checker, plugin for flake8"
+category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -244,6 +254,7 @@ files = [
 name = "mypy-extensions"
 version = "1.0.0"
 description = "Type system extensions for programs checked with the mypy type checker."
+category = "dev"
 optional = false
 python-versions = ">=3.5"
 files = [
@@ -253,48 +264,52 @@ files = [
 
 [[package]]
 name = "packaging"
-version = "23.1"
+version = "23.2"
 description = "Core utilities for Python packages"
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"},
-    {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"},
+    {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},
+    {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},
 ]
 
 [[package]]
 name = "pathspec"
-version = "0.11.1"
+version = "0.11.2"
 description = "Utility library for gitignore style pattern matching of file paths."
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"},
-    {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"},
+    {file = "pathspec-0.11.2-py3-none-any.whl", hash = "sha256:1d6ed233af05e679efb96b1851550ea95bbb64b7c490b0f5aa52996c11e92a20"},
+    {file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"},
 ]
 
 [[package]]
 name = "platformdirs"
-version = "3.9.1"
+version = "4.0.0"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "platformdirs-3.9.1-py3-none-any.whl", hash = "sha256:ad8291ae0ae5072f66c16945166cb11c63394c7a3ad1b1bc9828ca3162da8c2f"},
-    {file = "platformdirs-3.9.1.tar.gz", hash = "sha256:1b42b450ad933e981d56e59f1b97495428c9bd60698baab9f3eb3d00d5822421"},
+    {file = "platformdirs-4.0.0-py3-none-any.whl", hash = "sha256:118c954d7e949b35437270383a3f2531e99dd93cf7ce4dc8340d3356d30f173b"},
+    {file = "platformdirs-4.0.0.tar.gz", hash = "sha256:cb633b2bcf10c51af60beb0ab06d2f1d69064b43abf4c185ca6b28865f3f9731"},
 ]
 
 [package.dependencies]
-typing-extensions = {version = ">=4.6.3", markers = "python_version < \"3.8\""}
+typing-extensions = {version = ">=4.7.1", markers = "python_version < \"3.8\""}
 
 [package.extras]
-docs = ["furo (>=2023.5.20)", "proselint (>=0.13)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"]
-test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)"]
+docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"]
+test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"]
 
 [[package]]
 name = "pluggy"
 version = "1.2.0"
 description = "plugin and hook calling mechanisms for python"
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -313,6 +328,7 @@ testing = ["pytest", "pytest-benchmark"]
 name = "py4j"
 version = "0.10.9.5"
 description = "Enables Python programs to dynamically access arbitrary Java objects"
+category = "main"
 optional = false
 python-versions = "*"
 files = [
@@ -324,6 +340,7 @@ files = [
 name = "pycodestyle"
 version = "2.9.1"
 description = "Python style guide checker"
+category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -335,6 +352,7 @@ files = [
 name = "pyflakes"
 version = "2.5.0"
 description = "passive checker of Python programs"
+category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -344,12 +362,13 @@ files = [
 
 [[package]]
 name = "pyspark"
-version = "3.3.2"
+version = "3.3.3"
 description = "Apache Spark Python API"
+category = "main"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pyspark-3.3.2.tar.gz", hash = "sha256:0dfd5db4300c1f6cc9c16d8dbdfb82d881b4b172984da71344ede1a9d4893da8"},
+    {file = "pyspark-3.3.3.tar.gz", hash = "sha256:384d2ad7090cd1db5b2d2ac497bda409d86ab3a27272833e1a27efadf45e4d2f"},
 ]
 
 [package.dependencies]
@@ -365,6 +384,7 @@ sql = ["pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
 name = "pytest"
 version = "7.4.3"
 description = "pytest: simple powerful testing with Python"
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -388,6 +408,7 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no
 name = "pytest-cov"
 version = "4.1.0"
 description = "Pytest plugin for measuring coverage."
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -406,6 +427,7 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale
 name = "pytest-dependency"
 version = "0.5.1"
 description = "Manage dependencies of tests"
+category = "dev"
 optional = false
 python-versions = "*"
 files = [
@@ -419,6 +441,7 @@ pytest = ">=3.6.0"
 name = "pytest-tap"
 version = "3.4"
 description = "Test Anything Protocol (TAP) reporting plugin for pytest"
+category = "dev"
 optional = false
 python-versions = "*"
 files = [
@@ -434,6 +457,7 @@ pytest = ">=3.0"
 name = "tap-py"
 version = "3.1"
 description = "Test Anything Protocol (TAP) tools"
+category = "dev"
 optional = false
 python-versions = "*"
 files = [
@@ -448,6 +472,7 @@ yaml = ["PyYAML (>=5.1)", "more-itertools"]
 name = "toml"
 version = "0.10.2"
 description = "Python Library for Tom's Obvious, Minimal Language"
+category = "dev"
 optional = false
 python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
 files = [
@@ -459,6 +484,7 @@ files = [
 name = "tomli"
 version = "2.0.1"
 description = "A lil' TOML parser"
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -470,6 +496,7 @@ files = [
 name = "typed-ast"
 version = "1.5.5"
 description = "a fork of Python 2 and 3 ast modules with type comment support"
+category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -520,6 +547,7 @@ files = [
 name = "typing-extensions"
 version = "4.7.1"
 description = "Backported and Experimental Type Hints for Python 3.7+"
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -531,6 +559,7 @@ files = [
 name = "zipp"
 version = "3.15.0"
 description = "Backport of pathlib-compatible object wrapper for zip files"
+category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [

From 27defa66846fd52e8a91fc9c3e7f41e52104b1b6 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 20 Nov 2023 11:46:08 +0000
Subject: [PATCH 468/531] Fix unused import in winsorisation tests

---
 tests/outliering/test_winsorisation.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/outliering/test_winsorisation.py b/tests/outliering/test_winsorisation.py
index c5d0d8c0..07f39a04 100644
--- a/tests/outliering/test_winsorisation.py
+++ b/tests/outliering/test_winsorisation.py
@@ -3,7 +3,6 @@
 import pathlib
 
 import pytest
-from pyspark.sql.functions import lit
 from pyspark.sql.types import DecimalType, StringType
 
 from statistical_methods_library.outliering import winsorisation

From 199391985697a814fb6424840866eb31c04c8d3e Mon Sep 17 00:00:00 2001
From: Piwington <david@fides.me.uk>
Date: Mon, 20 Nov 2023 11:51:41 +0000
Subject: [PATCH 469/531] Same Id in different groups

---
 .../methodology_scenarios/expansion_input.csv          | 10 +++++-----
 .../methodology_scenarios/expansion_output.csv         | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_input.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_input.csv
index 0d624ecc..b4ca9ac3 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_input.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_input.csv
@@ -4,11 +4,11 @@ date,identifier,group,question,design,L
 1900,345678,1001,96,50,5007.270089
 1900,456789,1001,108,50,5007.270089
 1900,567890,1001,101,50,5007.270089
-1900,678901,1002,295,20,5007.270089
-1900,789012,1002,294,20,5007.270089
-1900,890123,1002,288,20,5007.270089
-1900,901234,1002,298,20,5007.270089
-1900,123450,1002,288,20,5007.270089
+1900,123456,1002,295,20,5007.270089
+1900,234567,1002,294,20,5007.270089
+1900,345678,1002,288,20,5007.270089
+1900,456789,1002,298,20,5007.270089
+1900,567890,1002,288,20,5007.270089
 1901,123456,1001,90,50,5007.270089
 1901,234567,1001,109,50,5007.270089
 1901,345678,1001,101,50,5007.270089
diff --git a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_output.csv b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_output.csv
index cc7b486f..19819c17 100644
--- a/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_output.csv
+++ b/tests/fixture_data/outliering/winsorisation/methodology_scenarios/expansion_output.csv
@@ -4,11 +4,11 @@ date,identifier,outlier_weight,winsorisation_marker,group
 1900,345678,1,"W",1001
 1900,456789,1,"W",1001
 1900,567890,1,"W",1001
-1900,678901,1,"W",1002
-1900,789012,1,"W",1002
-1900,890123,1,"W",1002
-1900,901234,1,"W",1002
-1900,123450,1,"W",1002
+1900,123456,1,"W",1002
+1900,234567,1,"W",1002
+1900,345678,1,"W",1002
+1900,456789,1,"W",1002
+1900,567890,1,"W",1002
 1901,123456,1,"W",1001
 1901,234567,1,"W",1001
 1901,345678,1,"W",1001

From fb467c1dab9d34a2dab48dcee88d21ea9ad85674 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 20 Nov 2023 12:12:45 +0000
Subject: [PATCH 470/531] Add grouping to unique columns passed to data frame
 aliasing and validation funciton

---
 statistical_methods_library/outliering/winsorisation.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/outliering/winsorisation.py b/statistical_methods_library/outliering/winsorisation.py
index ae6f9d0d..6166ec06 100644
--- a/statistical_methods_library/outliering/winsorisation.py
+++ b/statistical_methods_library/outliering/winsorisation.py
@@ -113,7 +113,7 @@ def outlier(
     }
 
     aliased_df = validation.validate_dataframe(
-        input_df, input_params, type_mapping, ["reference", "period"]
+        input_df, input_params, type_mapping, ["reference", "period", "grouping"]
     )
     validation.validate_one_value_per_group(
         input_df, [period_col, grouping_col], l_value_col

From b30c663cf97c5f6295e7c82e3d9f1bebd01ba343 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 20 Nov 2023 12:49:04 +0000
Subject: [PATCH 471/531] Add release notes for Winsorisation changes

---
 release-notes/13.2.0.md | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 release-notes/13.2.0.md

diff --git a/release-notes/13.2.0.md b/release-notes/13.2.0.md
new file mode 100644
index 00000000..8f72e386
--- /dev/null
+++ b/release-notes/13.2.0.md
@@ -0,0 +1,25 @@
+# Statistical Methods Library 13.2.0
+
+Release date: 2023-11-20
+
+## Synopsis
+
+This release alters the output of the Winsorisation method to support
+winsorising multiple independent variables for a single reference within
+a given period.
+
+## Changes
+
+The input validation for the Winsorisation method previously required that a single reference appear once in
+each period. This requirement has been changed to allow a reference to
+appear once per grouping and period combination. This permits winsorising
+multiple independent variables at once by using the grouping column to
+reflect both the grouping and variable. In addition, the grouping
+column will now be present in the Winsorisation output to distinguish these variables.
+
+## Notes
+
+With the exception of the additional column, there is no impact on existing
+usage in terms of numerical changes. This is because the grouping column was
+already used internally for grouping data. This release merely removes the input
+restriction constraining one reference to one group.

From 6b18f2957e356a719308e7bd6a85a031f4de7acb Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 30 Nov 2023 14:31:48 +0000
Subject: [PATCH 472/531] New lock file

---
 .github/workflows/ci-checks.yaml   |  6 ++---
 .github/workflows/release-code.yml |  2 +-
 poetry.lock                        | 37 ++++--------------------------
 3 files changed, 8 insertions(+), 37 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index dfe230d4..f53aeb21 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -24,7 +24,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.3.2
+          poetry-version: 1.7.1
       - name: Install dependencies
         run: poetry install
       - name: test
@@ -59,7 +59,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.3.2
+          poetry-version: 1.7.1
       - name: Install dependencies
         run: poetry install
       - name: run flake8
@@ -80,7 +80,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.3.2
+          poetry-version: 1.7.1
       - name: Install dependencies
         run: poetry install
       - name: run black
diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index 5a345475..4999dd64 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -21,7 +21,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.3.2
+          poetry-version: 1.7.1
       - name: build
         run: poetry build
       - name: Create GitHub release
diff --git a/poetry.lock b/poetry.lock
index dada4037..af67d1e6 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,10 +1,9 @@
-# This file is automatically @generated by Poetry and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
 
 [[package]]
 name = "black"
 version = "23.3.0"
 description = "The uncompromising code formatter."
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -55,7 +54,6 @@ uvloop = ["uvloop (>=0.15.2)"]
 name = "click"
 version = "8.1.7"
 description = "Composable command line interface toolkit"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -71,7 +69,6 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""}
 name = "colorama"
 version = "0.4.6"
 description = "Cross-platform colored terminal text."
-category = "dev"
 optional = false
 python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
 files = [
@@ -83,7 +80,6 @@ files = [
 name = "coverage"
 version = "7.2.7"
 description = "Code coverage measurement for Python"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -157,14 +153,13 @@ toml = ["tomli"]
 
 [[package]]
 name = "exceptiongroup"
-version = "1.1.3"
+version = "1.2.0"
 description = "Backport of PEP 654 (exception groups)"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"},
-    {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"},
+    {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"},
+    {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"},
 ]
 
 [package.extras]
@@ -174,7 +169,6 @@ test = ["pytest (>=6)"]
 name = "flake8"
 version = "5.0.4"
 description = "the modular source code checker: pep8 pyflakes and co"
-category = "dev"
 optional = false
 python-versions = ">=3.6.1"
 files = [
@@ -192,7 +186,6 @@ pyflakes = ">=2.5.0,<2.6.0"
 name = "flake8-pyproject"
 version = "1.2.3"
 description = "Flake8 plug-in loading the configuration from pyproject.toml"
-category = "dev"
 optional = false
 python-versions = ">= 3.6"
 files = [
@@ -210,7 +203,6 @@ dev = ["pyTest", "pyTest-cov"]
 name = "importlib-metadata"
 version = "4.2.0"
 description = "Read metadata from Python packages"
-category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -230,7 +222,6 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517",
 name = "iniconfig"
 version = "2.0.0"
 description = "brain-dead simple config-ini parsing"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -242,7 +233,6 @@ files = [
 name = "mccabe"
 version = "0.7.0"
 description = "McCabe checker, plugin for flake8"
-category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -254,7 +244,6 @@ files = [
 name = "mypy-extensions"
 version = "1.0.0"
 description = "Type system extensions for programs checked with the mypy type checker."
-category = "dev"
 optional = false
 python-versions = ">=3.5"
 files = [
@@ -266,7 +255,6 @@ files = [
 name = "packaging"
 version = "23.2"
 description = "Core utilities for Python packages"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -278,7 +266,6 @@ files = [
 name = "pathspec"
 version = "0.11.2"
 description = "Utility library for gitignore style pattern matching of file paths."
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -290,7 +277,6 @@ files = [
 name = "platformdirs"
 version = "4.0.0"
 description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -309,7 +295,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co
 name = "pluggy"
 version = "1.2.0"
 description = "plugin and hook calling mechanisms for python"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -328,7 +313,6 @@ testing = ["pytest", "pytest-benchmark"]
 name = "py4j"
 version = "0.10.9.5"
 description = "Enables Python programs to dynamically access arbitrary Java objects"
-category = "main"
 optional = false
 python-versions = "*"
 files = [
@@ -340,7 +324,6 @@ files = [
 name = "pycodestyle"
 version = "2.9.1"
 description = "Python style guide checker"
-category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -352,7 +335,6 @@ files = [
 name = "pyflakes"
 version = "2.5.0"
 description = "passive checker of Python programs"
-category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -364,7 +346,6 @@ files = [
 name = "pyspark"
 version = "3.3.3"
 description = "Apache Spark Python API"
-category = "main"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -384,7 +365,6 @@ sql = ["pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
 name = "pytest"
 version = "7.4.3"
 description = "pytest: simple powerful testing with Python"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -408,7 +388,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no
 name = "pytest-cov"
 version = "4.1.0"
 description = "Pytest plugin for measuring coverage."
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -427,7 +406,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale
 name = "pytest-dependency"
 version = "0.5.1"
 description = "Manage dependencies of tests"
-category = "dev"
 optional = false
 python-versions = "*"
 files = [
@@ -441,7 +419,6 @@ pytest = ">=3.6.0"
 name = "pytest-tap"
 version = "3.4"
 description = "Test Anything Protocol (TAP) reporting plugin for pytest"
-category = "dev"
 optional = false
 python-versions = "*"
 files = [
@@ -457,7 +434,6 @@ pytest = ">=3.0"
 name = "tap-py"
 version = "3.1"
 description = "Test Anything Protocol (TAP) tools"
-category = "dev"
 optional = false
 python-versions = "*"
 files = [
@@ -472,7 +448,6 @@ yaml = ["PyYAML (>=5.1)", "more-itertools"]
 name = "toml"
 version = "0.10.2"
 description = "Python Library for Tom's Obvious, Minimal Language"
-category = "dev"
 optional = false
 python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
 files = [
@@ -484,7 +459,6 @@ files = [
 name = "tomli"
 version = "2.0.1"
 description = "A lil' TOML parser"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -496,7 +470,6 @@ files = [
 name = "typed-ast"
 version = "1.5.5"
 description = "a fork of Python 2 and 3 ast modules with type comment support"
-category = "dev"
 optional = false
 python-versions = ">=3.6"
 files = [
@@ -547,7 +520,6 @@ files = [
 name = "typing-extensions"
 version = "4.7.1"
 description = "Backported and Experimental Type Hints for Python 3.7+"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
@@ -559,7 +531,6 @@ files = [
 name = "zipp"
 version = "3.15.0"
 description = "Backport of pathlib-compatible object wrapper for zip files"
-category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [

From 20ee11f3e290da3a9f5406045546901c651fbb75 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Thu, 30 Nov 2023 16:22:59 +0000
Subject: [PATCH 473/531] Apparently we cannot have 1.7.1 so go for 1.5.1
 instead

---
 .github/workflows/ci-checks.yaml   | 6 +++---
 .github/workflows/release-code.yml | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index f53aeb21..0fecac13 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -24,7 +24,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.7.1
+          poetry-version: 1.5.1
       - name: Install dependencies
         run: poetry install
       - name: test
@@ -59,7 +59,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.7.1
+          poetry-version: 1.5.1
       - name: Install dependencies
         run: poetry install
       - name: run flake8
@@ -80,7 +80,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.7.1
+          poetry-version: 1.5.1
       - name: Install dependencies
         run: poetry install
       - name: run black
diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index 4999dd64..a6af6192 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -21,7 +21,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v2.0.0
         with:
-          poetry-version: 1.7.1
+          poetry-version: 1.5.1
       - name: build
         run: poetry build
       - name: Create GitHub release

From ef9f845bf166ec9dcf7eaed2f89a170e85eca434 Mon Sep 17 00:00:00 2001
From: WojciechPONS <wojciech.przybylski@ext.ons.gov.uk>
Date: Wed, 20 Dec 2023 13:39:33 +0000
Subject: [PATCH 474/531] WP: Created catalog-info.yaml file for SDP
 (backstage) integration

---
 catalog-info.yaml | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 catalog-info.yaml

diff --git a/catalog-info.yaml b/catalog-info.yaml
new file mode 100644
index 00000000..dd5d12fd
--- /dev/null
+++ b/catalog-info.yaml
@@ -0,0 +1,18 @@
+apiVersion: backstage.io/v1alpha1
+kind: Component
+metadata:
+  name: statistical-methods-library
+  description: The Statistical Methods Library (S.M.L.) is a set of approved statistical methods.
+  annotations:
+    jira/project-key: SPP
+    github.com/project-slug: ONSdigital/statistical-methods-library
+  tags:
+    - python
+    - spp
+    - sml
+  links:
+      icon: search
+spec:
+  type: library
+  lifecycle: production
+  owner: group:spp-results
\ No newline at end of file

From 0d32782fc4b22eb2d851dc2fc7fef798c70eeda0 Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Wed, 3 Jan 2024 10:47:07 +0000
Subject: [PATCH 475/531] Also update github actions

---
 .github/dependabot.yml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index fc166fe9..0a331f85 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -6,3 +6,7 @@ updates:
       interval: "daily"
     ignore:
       - dependency-name: pyspark
+  - package-ecosystem: github-actions
+    directory: "/"
+    schedule:
+      interval: "daily"

From 280a3ff8f84c80b4eea4a6cc4794a019ba74d49f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 3 Jan 2024 10:47:26 +0000
Subject: [PATCH 476/531] Bump actions/upload-artifact from 2 to 4

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/ci-checks.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 0fecac13..ab766a08 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -38,7 +38,7 @@ jobs:
           reporter: java-junit
           fail-on-error: false
       - name: upload-coverage-report
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v4
         with:
           name: coverage-report
           path: htmlcov/

From 87b69896f9d7f323a6798a1c3fde3a16966300af Mon Sep 17 00:00:00 2001
From: David Lees <david@fides.me.uk>
Date: Fri, 5 Jan 2024 12:46:03 +0000
Subject: [PATCH 477/531] Update ci-checks.yaml

Trying to see if permissions will fix actions not being able to upload reports.
---
 .github/workflows/ci-checks.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index ab766a08..25562388 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -2,6 +2,11 @@ name: CI Checks
 
 on: [push]
 
+permissions:
+  statuses: write
+  checks: write
+  contents: read
+
 jobs:
   test:
     runs-on: ubuntu-latest

From ab7bba97e062a44817aff09a103dc943236ddb67 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 Jan 2024 14:47:51 +0000
Subject: [PATCH 478/531] Attempt to fix coverage and test report version
 naming issues

---
 .github/workflows/ci-checks.yaml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 25562388..4cfcd90f 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -33,20 +33,20 @@ jobs:
       - name: Install dependencies
         run: poetry install
       - name: test
-        run: poetry run pytest --tap-stream --cov-report=html --junitxml=junit.xml
+        run: poetry run pytest --tap-stream --cov-report=lcov:lcov-${{matrix.python-version}}.info --junitxml=junit-${{matrix.python-version}}.xml
       - name: Upload Test report
         uses: dorny/test-reporter@v1
         if: success() || failure()
         with:
-          name: test-results
-          path: junit.xml
+          name: test-results-${{matrix.python-version}}
+          path: junit-${{matrix.python-version}}.xml
           reporter: java-junit
           fail-on-error: false
       - name: upload-coverage-report
         uses: actions/upload-artifact@v4
         with:
-          name: coverage-report
-          path: htmlcov/
+          name: coverage-report-${matrix.python-version}}-lcov
+          path: lcov-${{matrix.python-version}}.info
           if-no-files-found: warn
   flake8:
     runs-on: ubuntu-latest

From 2c58d455af2775db4396329daa4416a4b3a9ac3e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 Jan 2024 15:12:01 +0000
Subject: [PATCH 479/531] New version of coverage report upload fix and remove
 ignoring errors

---
 .github/workflows/ci-checks.yaml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 4cfcd90f..daa74ba8 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -41,13 +41,11 @@ jobs:
           name: test-results-${{matrix.python-version}}
           path: junit-${{matrix.python-version}}.xml
           reporter: java-junit
-          fail-on-error: false
-      - name: upload-coverage-report
+      - name: upload-coverage-report-${matrix.python-version}}
         uses: actions/upload-artifact@v4
         with:
-          name: coverage-report-${matrix.python-version}}-lcov
+          name: coverage-report-${{matrix.python-version}}-lcov
           path: lcov-${{matrix.python-version}}.info
-          if-no-files-found: warn
   flake8:
     runs-on: ubuntu-latest
     strategy:

From cc6a29ab0d5b0d04ec21f0aac089cca0f42c2fc1 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 Jan 2024 15:14:23 +0000
Subject: [PATCH 480/531] Fix variable interpolation syntax in upload coverage
 report name

---
 .github/workflows/ci-checks.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index daa74ba8..13d0187e 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -41,7 +41,7 @@ jobs:
           name: test-results-${{matrix.python-version}}
           path: junit-${{matrix.python-version}}.xml
           reporter: java-junit
-      - name: upload-coverage-report-${matrix.python-version}}
+      - name: upload-coverage-report-${{matrix.python-version}}
         uses: actions/upload-artifact@v4
         with:
           name: coverage-report-${{matrix.python-version}}-lcov

From 0414690336cc337729d5dc319bcbe0d83deb065e Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 Jan 2024 15:21:49 +0000
Subject: [PATCH 481/531] Further improvements to ci checks

---
 .github/workflows/ci-checks.yaml | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 13d0187e..76ee8462 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -26,15 +26,16 @@ jobs:
         with:
           distribution: 'adopt'
           java-version: ${{ matrix.java-version }}
-      - name: Run image
+      - name: Run image ${{matrix.python-version}}
         uses: abatilo/actions-poetry@v2.0.0
         with:
           poetry-version: 1.5.1
-      - name: Install dependencies
-        run: poetry install
-      - name: test
-        run: poetry run pytest --tap-stream --cov-report=lcov:lcov-${{matrix.python-version}}.info --junitxml=junit-${{matrix.python-version}}.xml
-      - name: Upload Test report
+      - name: Test ${{matrix.python-version}}
+        run: |-
+          set -e
+          poetry install
+          poetry run pytest --tap-stream --cov-report=lcov:lcov-${{matrix.python-version}}.info --junitxml=junit-${{matrix.python-version}}.xml
+      - name: Upload Test report ${{matrix.python-version}}
         uses: dorny/test-reporter@v1
         if: success() || failure()
         with:
@@ -63,10 +64,10 @@ jobs:
         uses: abatilo/actions-poetry@v2.0.0
         with:
           poetry-version: 1.5.1
-      - name: Install dependencies
-        run: poetry install
-      - name: run flake8
-        run: poetry run flake8 statistical_methods_library tests
+      - name: Run flake8
+        run: |-
+          poetry install
+          poetry run flake8 statistical_methods_library tests
   black:
     runs-on: ubuntu-latest
     strategy:
@@ -84,7 +85,7 @@ jobs:
         uses: abatilo/actions-poetry@v2.0.0
         with:
           poetry-version: 1.5.1
-      - name: Install dependencies
-        run: poetry install
-      - name: run black
-        run: poetry run black --check --diff statistical_methods_library tests
+      - name: Run Black
+        run: |-
+          poetry install
+          poetry run black --check --diff statistical_methods_library tests

From e485a710dd09dd4023833cf3850a898cfd994438 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Jan 2024 15:58:44 +0000
Subject: [PATCH 482/531] Bump abatilo/actions-poetry from 2.0.0 to 3.0.0
 (#184)

Bumps [abatilo/actions-poetry](https://github.com/abatilo/actions-poetry) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/abatilo/actions-poetry/releases)
- [Changelog](https://github.com/abatilo/actions-poetry/blob/master/.releaserc)
- [Commits](https://github.com/abatilo/actions-poetry/compare/v2.0.0...v3.0.0)

---
updated-dependencies:
- dependency-name: abatilo/actions-poetry
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 .github/workflows/ci-checks.yaml   | 6 +++---
 .github/workflows/release-code.yml | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 76ee8462..eb888d8c 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -27,7 +27,7 @@ jobs:
           distribution: 'adopt'
           java-version: ${{ matrix.java-version }}
       - name: Run image ${{matrix.python-version}}
-        uses: abatilo/actions-poetry@v2.0.0
+        uses: abatilo/actions-poetry@v3.0.0
         with:
           poetry-version: 1.5.1
       - name: Test ${{matrix.python-version}}
@@ -61,7 +61,7 @@ jobs:
         with:
           python-version: ${{ matrix.python-version }}
       - name: Run image
-        uses: abatilo/actions-poetry@v2.0.0
+        uses: abatilo/actions-poetry@v3.0.0
         with:
           poetry-version: 1.5.1
       - name: Run flake8
@@ -82,7 +82,7 @@ jobs:
         with:
           python-version: ${{ matrix.python-version }}
       - name: Run image
-        uses: abatilo/actions-poetry@v2.0.0
+        uses: abatilo/actions-poetry@v3.0.0
         with:
           poetry-version: 1.5.1
       - name: Run Black
diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index a6af6192..365fc0f3 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -19,7 +19,7 @@ jobs:
         with:
           python-version: '3.10'
       - name: Run image
-        uses: abatilo/actions-poetry@v2.0.0
+        uses: abatilo/actions-poetry@v3.0.0
         with:
           poetry-version: 1.5.1
       - name: build

From 9360dda76f7f6fffb4bcfe3eb8572bc929274b55 Mon Sep 17 00:00:00 2001
From: Adam Thompson <arthompson1990@gmail.com>
Date: Mon, 15 Jan 2024 16:06:43 +0000
Subject: [PATCH 483/531] Manually update checkout action as dependabot broke

---
 .github/workflows/ci-checks.yaml   | 6 +++---
 .github/workflows/release-code.yml | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index eb888d8c..79dbfe33 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -17,7 +17,7 @@ jobs:
         java-version: ['8']
       fail-fast: false 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
       - name: Set up Python ${{ matrix.python-version }}
         uses: actions/setup-python@v1
         with:
@@ -55,7 +55,7 @@ jobs:
         python-version: [3.7]
       fail-fast: false 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
       - name: Set up Python ${{ matrix.python-version }}
         uses: actions/setup-python@v1
         with:
@@ -76,7 +76,7 @@ jobs:
         python-version: [3.7]
       fail-fast: false 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
       - name: Set up Python ${{ matrix.python-version }}
         uses: actions/setup-python@v1
         with:
diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index 365fc0f3..25e01feb 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -13,7 +13,7 @@ jobs:
       max-parallel: 4
       fail-fast: false 
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: Set up Python ${{ matrix.python-version }}
         uses: actions/setup-python@v1
         with:

From 76f410e3f114c01752636d3a1850e56791aa2022 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Jan 2024 16:27:41 +0000
Subject: [PATCH 484/531] Bump actions/checkout from 2 to 4 (#183)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 .github/workflows/dependabot-auto-merge.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml
index d71f4af5..607fb147 100644
--- a/.github/workflows/dependabot-auto-merge.yml
+++ b/.github/workflows/dependabot-auto-merge.yml
@@ -18,7 +18,7 @@ jobs:
     runs-on: ubuntu-latest
     if: ${{ github.actor == 'dependabot[bot]' && github.event.workflow_run.conclusion == 'success' }}
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
         with:
           ref: ${{ github.event.workflow_run.head_branch }}
       - name: Auto-approve Dependabot PR

From 9c393ba2053b3318737754767db1db6ce39adf6a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Jan 2024 16:29:06 +0000
Subject: [PATCH 485/531] Bump pytest from 7.4.3 to 7.4.4 (#178)

Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.3 to 7.4.4.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.3...7.4.4)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 poetry.lock    | 8 ++++----
 pyproject.toml | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index af67d1e6..5925cbc3 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -363,13 +363,13 @@ sql = ["pandas (>=1.0.5)", "pyarrow (>=1.0.0)"]
 
 [[package]]
 name = "pytest"
-version = "7.4.3"
+version = "7.4.4"
 description = "pytest: simple powerful testing with Python"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"},
-    {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"},
+    {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"},
+    {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"},
 ]
 
 [package.dependencies]
@@ -545,4 +545,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = ">=3.7"
-content-hash = "f05503f44a13e0ebf2b7d44f539007ae89bb7f5e8757064ca0273b7b42c0d57e"
+content-hash = "c6435979dff40d6f5f244985bf12f95077599e57ee549b4cd72ba85996a3698e"
diff --git a/pyproject.toml b/pyproject.toml
index 64305a9b..edcf9b83 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -11,7 +11,7 @@ pyspark = ">=3.1.1 <3.4.0"
 
 [tool.poetry.group.dev.dependencies]
 toml = "^0.10.2"
-pytest = "^7.4.3"
+pytest = "^7.4.4"
 black = "^23.1"
 flake8 = "^5.0.4"
 coverage = "^7.2"

From 897707ba045f98164ad42627a72b3ec8a7b32f35 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Jan 2024 17:24:55 +0000
Subject: [PATCH 486/531] Bump pytest-dependency from 0.5.1 to 0.6.0 (#177)

Bumps [pytest-dependency](https://github.com/RKrahl/pytest-dependency) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/RKrahl/pytest-dependency/releases)
- [Changelog](https://github.com/RKrahl/pytest-dependency/blob/develop/CHANGES.rst)
- [Commits](https://github.com/RKrahl/pytest-dependency/compare/0.5.1...0.6.0)

---
updated-dependencies:
- dependency-name: pytest-dependency
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 poetry.lock    | 27 ++++++++++++++++++++++-----
 pyproject.toml |  2 +-
 2 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 5925cbc3..079dbe7e 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -404,16 +404,17 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale
 
 [[package]]
 name = "pytest-dependency"
-version = "0.5.1"
+version = "0.6.0"
 description = "Manage dependencies of tests"
 optional = false
-python-versions = "*"
+python-versions = ">=3.4"
 files = [
-    {file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
+    {file = "pytest-dependency-0.6.0.tar.gz", hash = "sha256:934b0e6a39d95995062c193f7eaeed8a8ffa06ff1bcef4b62b0dc74a708bacc1"},
 ]
 
 [package.dependencies]
-pytest = ">=3.6.0"
+pytest = ">=3.7.0"
+setuptools = "*"
 
 [[package]]
 name = "pytest-tap"
@@ -430,6 +431,22 @@ files = [
 pytest = ">=3.0"
 "tap.py" = ">=3.0,<4.0"
 
+[[package]]
+name = "setuptools"
+version = "68.0.0"
+description = "Easily download, build, install, upgrade, and uninstall Python packages"
+optional = false
+python-versions = ">=3.7"
+files = [
+    {file = "setuptools-68.0.0-py3-none-any.whl", hash = "sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f"},
+    {file = "setuptools-68.0.0.tar.gz", hash = "sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235"},
+]
+
+[package.extras]
+docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"]
+testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"]
+testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"]
+
 [[package]]
 name = "tap-py"
 version = "3.1"
@@ -545,4 +562,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = ">=3.7"
-content-hash = "c6435979dff40d6f5f244985bf12f95077599e57ee549b4cd72ba85996a3698e"
+content-hash = "8eb51cebc4e2370f50f32b2fd3e060604e6a68cfc64f20f9c920f6d075e292e9"
diff --git a/pyproject.toml b/pyproject.toml
index edcf9b83..c706f2d3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -16,7 +16,7 @@ black = "^23.1"
 flake8 = "^5.0.4"
 coverage = "^7.2"
 pytest-cov = "^4.1.0"
-pytest-dependency = "^0.5.1"
+pytest-dependency = "^0.6.0"
 pytest-tap = "^3.3"
 flake8-pyproject = "^1.2.3"
 

From 152f9987d1ec34cd17a56976e05269a2991a28d5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Jan 2024 17:25:36 +0000
Subject: [PATCH 487/531] Bump actions/setup-python from 1 to 5 (#181)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 1 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v1...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 .github/workflows/ci-checks.yaml   | 6 +++---
 .github/workflows/release-code.yml | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 79dbfe33..5963e0a2 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -19,7 +19,7 @@ jobs:
     steps:
       - uses: actions/checkout@v4
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python-version }}
       - uses: actions/setup-java@v2
@@ -57,7 +57,7 @@ jobs:
     steps:
       - uses: actions/checkout@v4
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python-version }}
       - name: Run image
@@ -78,7 +78,7 @@ jobs:
     steps:
       - uses: actions/checkout@v4
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python-version }}
       - name: Run image
diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index 25e01feb..321752f0 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -15,7 +15,7 @@ jobs:
     steps:
       - uses: actions/checkout@v4
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v5
         with:
           python-version: '3.10'
       - name: Run image

From bf1e802cc6e13c84babeb6def71d324ab45dfa4e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Jan 2024 17:45:53 +0000
Subject: [PATCH 488/531] Bump actions/setup-java from 2 to 4 (#180)

Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2 to 4.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 .github/workflows/ci-checks.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 5963e0a2..ee27db68 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -22,7 +22,7 @@ jobs:
         uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python-version }}
-      - uses: actions/setup-java@v2
+      - uses: actions/setup-java@v4
         with:
           distribution: 'adopt'
           java-version: ${{ matrix.java-version }}

From 9982a3f9ac0968f175e1323b807bbf4488f16baf Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Wed, 8 May 2024 16:33:08 +0100
Subject: [PATCH 489/531] RoM Manual constrction update

---
 .../imputation/engine.py                      | 91 +++++++++++++++++--
 .../001_71_MC_R_MC_1_input.csv                | 13 +++
 .../001_71_MC_R_MC_1_output.csv               | 13 +++
 tests/imputation/mean_of_ratios.toml          |  7 ++
 tests/imputation/test_scenarios.py            | 15 ++-
 5 files changed, 127 insertions(+), 12 deletions(-)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_output.csv

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 0eb335cb..7ece2ca2 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -42,6 +42,12 @@ class Marker(Enum):
 
     FORWARD_IMPUTE_FROM_CONSTRUCTION = "FIC"
     """The value has been forward imputed from a constructed value."""
+    
+    MANUAL_CONSTRUCTION = "MC"
+    """The value is manual construction."""
+    
+    FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION = "FIMC"
+    """The value has been forward imputed from a manual construction."""
 
 
 def impute(
@@ -78,6 +84,7 @@ def impute(
     unweighted_forward_link_col: Optional[str] = "forward_unweighted",
     unweighted_backward_link_col: Optional[str] = "backward_unweighted",
     unweighted_construction_link_col: Optional[str] = "construction_unweighted",
+    manual_construction_col: Optional[str] = "manual_construction",
     **ratio_calculator_params,
 ) -> DataFrame:
     """
@@ -188,7 +195,7 @@ def impute(
     link_cols = [forward_link_col, backward_link_col]
     if any(link_cols) and not all(link_cols):
         raise TypeError("Either all or no link columns must be specified")
-
+    # input_df.show(100)
     input_params = {
         "ref": reference_col,
         "period": period_col,
@@ -225,6 +232,10 @@ def impute(
 
     if construction_link_col in input_df.columns:
         input_params["construction"] = construction_link_col
+    
+    
+
+
 
     back_input_params = {
         "ref": reference_col,
@@ -233,7 +244,14 @@ def impute(
         "output": output_col,
         "marker": marker_col,
     }
-
+    # input_df.show(100)
+    # TODO CHECK in nimpuation wrapper the same column name is avaliable in back data df as well ?!
+    if manual_construction_col in input_df.columns:
+        input_params["manual_const"] = manual_construction_col
+        
+    if back_data_df and manual_construction_col in back_data_df.columns:
+        back_input_params["manual_const"] = manual_construction_col
+        
     if weight is not None:
         if not isinstance(weight, Decimal):
             raise TypeError("weight must be of type Decimal")
@@ -266,6 +284,7 @@ def impute(
         "forward_unweighted": DecimalType,
         "backward_unweighted": DecimalType,
         "construction_unweighted": DecimalType,
+        "manual_const": DecimalType,
     }
 
     if link_filter:
@@ -289,7 +308,7 @@ def impute(
             input_params,
             type_mapping,
             ["ref", "period", "grouping"],
-            ["target"],
+            ["target","manual_const"],
         )
         .withColumnRenamed("target", "output")
         .withColumn("marker", when(~col("output").isNull(), Marker.RESPONSE.value))
@@ -301,19 +320,43 @@ def impute(
     prior_period_df = prepared_df.selectExpr(
         "min(previous_period) AS prior_period"
     ).localCheckpoint(eager=False)
-
+    # TODO Remove manual construction record from data before the rotio calculation.
+    print("test1111 input_df.columns")
+    print(str(input_df.columns))
+    prepared_df.show(100)
+    if manual_construction_col in input_df.columns: #TODO check is it needed ?!
+        df_with_mc_data = prepared_df.withColumn(
+                                       "marker",when((col("manual_const").isNotNull()) & 
+                                   (col("output").isNull()),lit(Marker.MANUAL_CONSTRUCTION.value)).otherwise(col("marker"))).withColumn("output",when((col("manual_const").isNotNull()) & 
+                                   (col("output").isNull()),col("manual_const")).otherwise(col("output")))
+        only_mc_data = df_with_mc_data.filter((col("marker") == Marker.MANUAL_CONSTRUCTION.value) | (col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
+        print("only_mc_data")
+        only_mc_data.show(100)
+        df_with_mc_data.show(100)
+        # TODO Additionally, after MC data is entered, filter out the immediate missing responses. 
+        prepared_df = prepared_df.filter(~(col("marker") == Marker.MANUAL_CONSTRUCTION.value) | ~(col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
+        print("prepared_df_without_mc_fimc :: ")
+        prepared_df.show()
+        # ["ref", "period", "grouping"]
+        # mc_join_cont = [mc_df1.marker_mc != Marker.MANUAL_CONSTRUCTION.value , mc_df1.ref == prepared_df.ref, mc_df1.period == prepared_df.period,mc_df1.grouping == prepared_df.grouping]
+        # mc_df2 = prepared_df.join(mc_df1,mc_join_cont, "left")
+        # mc_df2.show(100)
+        
+        
     if back_data_df:
+        
         validated_back_data_df = validate_dataframe(
             back_data_df,
             back_input_params,
             type_mapping,
             ["ref", "period", "grouping"],
+            ["manual_const"]
         ).localCheckpoint(eager=False)
         back_data_period_df = (
             validated_back_data_df.select(
-                "ref", "period", "grouping", "output", "marker"
+                "ref", "period", "grouping", "output", "marker","manual_const"
             )
-            .join(prior_period_df, [col("period") == col("prior_period")])
+            .join(prior_period_df, [col("period") == col("prior_period")]) # TODO check what is the impact to miss the mc column in prior_period_df
             .drop("prior_period")
             .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
             .withColumn(
@@ -325,11 +368,23 @@ def impute(
             )
             .localCheckpoint(eager=False)
         )
+        # Remove manual construction record from back data before the rotio calculation.
+        if manual_construction_col in back_data_period_df.columns: #TODO check is it needed ?!
+            back_data_mc = back_data_period_df.filter((col("marker") == Marker.MANUAL_CONSTRUCTION.value) | (col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
+            print("back_data_mc")
+            back_data_mc.show(100)
+            # TODO Additionally, after MC data is entered, filter out the immediate missing responses. 
+            back_data_period_df = back_data_period_df.filter(~(col("marker") == Marker.MANUAL_CONSTRUCTION.value) | ~(col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
+            print("back_data_period_df_without_mc_fimc :: ")
+            back_data_period_df.show()
+            
         prepared_df = prepared_df.unionByName(
-            back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)),
+            back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)), 
             allowMissingColumns=True,
         )
-
+        
+        
+    
     def calculate_ratios():
         # This allows us to return early if we have nothing to do
         nonlocal prepared_df
@@ -354,6 +409,7 @@ def calculate_ratios():
             ratio_calculators.append(construction_ratio_calculator)
 
         if not ratio_calculators:
+            print("empty return......")
             return
 
         # Since we're going to join on to the main df filtering here
@@ -546,6 +602,8 @@ def impute_helper(
     ) -> DataFrame:
         nonlocal imputed_df
         nonlocal null_response_df
+        print("inside impute_helper")
+        print(f"inside impute_helper :: {marker.value}")
         if direction:
             # Forward imputation
             other_period_col = "previous_period"
@@ -722,6 +780,9 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         )
 
     df = prepared_df
+    i=0
+    print(" imputation call ...")
+    prepared_df.show(100)
     for stage in (
         forward_impute_from_response,
         backward_impute,
@@ -729,9 +790,19 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         forward_impute_from_construction,
     ):
         df = stage(df).localCheckpoint(eager=False)
-        if df.filter(col("output").isNull()).count() == 0:
+        print(f"stage:: {i}")
+        df.show(100)
+        if manual_construction_col in input_df.columns and stage == backward_impute:
+            print("after backward_impute add the mc only data")
+            only_mc_data.show(100)
+            df = df.unionByName(only_mc_data, allowMissingColumns=True)
+            print("Merged mc only data")
+            df.show(100)
+            
+        if df.filter(col("output").isNull()).count() == 0 and i==2:
             break
-
+        
+        i=i+1
     return df.join(prior_period_df, [col("prior_period") < col("period")]).select(
         [
             col(k).alias(output_col_mapping[k])
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_input.csv
new file mode 100644
index 00000000..9a0667e8
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_input.csv
@@ -0,0 +1,13 @@
+identifier,date,group,question,other,manual_construction
+30001,202001,100,8444,51,
+30001,202002,100,7476,51,
+30001,202003,100,2003,51,
+30002,202001,100,9343,72,
+30002,202002,100,7818,72,
+30002,202003,100,4897,72,
+30003,202001,100,7511,7,
+30003,202002,100,1761,7,
+30003,202003,100,6492,7,
+30004,202001,100,,81,4321
+30004,202002,100,2113,81,
+30004,202003,100,,81,3189
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_output.csv
new file mode 100644
index 00000000..21d9ffed
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_output.csv
@@ -0,0 +1,13 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
+30001,202001,100,,1.129481006,,2.196577972,194.6,8444,R,,3,3
+30001,202002,100,0.885362387,3.732401398,0.652198238,1.866715325,90.8436019,7476,R,3,3,4
+30001,202003,100,0.267924024,,1.526946931,,103.0153846,2003,R,3,,3
+30002,202001,100,,1.195062676,,2.196577972,194.6,9343,R,,3,3
+30002,202002,100,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,7818,R,3,3,4
+30002,202003,100,0.626375032,,1.526947,,103.0153846,4897,R,3,,3
+30003,202001,100,,4.265190233,,2.196577972,194.6,7511,R,,3,3
+30003,202002,100,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,1761,R,3,3,4
+30003,202003,100,3.686541738,,1.526947,,103.0153846,6492,R,3,,3
+30004,202001,100,,,,2.196577972,194.6,4321,MC,,3,3
+30004,202002,100,,,0.652198238,1.866715325,90.8436,2113,R,3,3,4
+30004,202003,100,,,1.526947,,103.0153846,3189,MC,3,,3
\ No newline at end of file
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index cc83919b..e36c6ecf 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -4,11 +4,15 @@ backward_growth_col = "growth_backward"
 trimmed_forward_col = "trim_inclusion_forward"
 trimmed_backward_col = "trim_inclusion_backward"
 
+manual_construction_col = "manual_construction"
+
 [field_types]
 forward_growth_col = "decimal(15,6)"
 backward_growth_col = "decimal(15,6)"
 trimmed_forward_col = "boolean"
 trimmed_backward_col = "boolean"
+#TODO check
+manual_construction_col = "decimal(15,6)"
 
 [scenarios.05_R_R_FI_FI_FI_year_span]
 starting_period = "202010"
@@ -195,3 +199,6 @@ weight_periodicity_multiplier = 12
 [scenarios.70_C_FI_FI_65_weight]
 weight = "0.65"
 weight_periodicity_multiplier = 12
+
+[scenarios.001_71_MC_R_MC_1]
+manual_construction_col = "manual_construction"
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 5dad95bb..097e1a64 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -57,6 +57,8 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
 
     scenarios = test_config.pop("scenarios", {})
     scenario_config = scenarios.get(scenario, {})
+    print("test1111 scenario_config")
+    print(scenario_config)
     fields = default_config["field_names"]
     fields.update(test_config.get("field_names", {}))
     fields.update(scenario_config.pop("field_names", {}))
@@ -64,6 +66,8 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     excluded_fields.extend(test_config.get("excluded_fields", []))
     excluded_fields.extend(scenario_config.pop("excluded_fields", []))
     imputation_kwargs = fields.copy()
+    print("test1111 fields")
+    print(fields)
     imputation_kwargs["forward_backward_ratio_calculator"] = getattr(
         imputation, ratio_calculator
     )
@@ -78,7 +82,11 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     field_types = default_config["field_types"]
     field_types.update(test_config.get("field_types", {}))
     field_types.update(scenario_config.get("field_types", {}))
+    print("test1111 field_types")
+    print(field_types)
     imputation_kwargs.update(scenario_config)
+    print("test1111 imputation_kwargs")
+    print(imputation_kwargs)
     types = {fields[k]: v for k, v in field_types.items()}
     scenario_file_type = scenario_type.replace("back_data_", "")
     scenario_input = fxt_load_test_csv(
@@ -112,7 +120,9 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     scenario_expected_output = scenario_expected_output.filter(
         col(fields["period_col"]) >= starting_period
     )
-
+    scenario_input.show(100)
+    print("test2222 imputation_kwargs")
+    print(imputation_kwargs)
     scenario_actual_output = imputation.impute(
         input_df=scenario_input, **imputation_kwargs
     )
@@ -121,7 +131,8 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
             scenario_actual_output = scenario_actual_output.withColumn(
                 field_name, col(field_name).cast("decimal(15, 6)")
             )
-
+    print("test33333 scenario_actual_output")
+    scenario_actual_output.show(100)
     sort_cols = [
         fields["reference_col"],
         fields["period_col"],

From aecf51c81b0ba15d98666cf7a73cf3f19c15eee5 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Thu, 9 May 2024 17:39:28 +0100
Subject: [PATCH 490/531] simple mc scenorio has passed the unit test

---
 .../imputation/engine.py                      | 89 ++++++++++++-------
 .../001_71_MC_R_MC_1_output.csv               | 26 +++---
 tests/imputation/test_scenarios.py            | 27 +++---
 3 files changed, 86 insertions(+), 56 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 7ece2ca2..b2cffaab 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -321,40 +321,39 @@ def impute(
         "min(previous_period) AS prior_period"
     ).localCheckpoint(eager=False)
     # TODO Remove manual construction record from data before the rotio calculation.
-    print("test1111 input_df.columns")
-    print(str(input_df.columns))
-    prepared_df.show(100)
+    # print("test1111 input_df.columns")
+    # print(str(input_df.columns))
+    # prepared_df.show(100)
     if manual_construction_col in input_df.columns: #TODO check is it needed ?!
         df_with_mc_data = prepared_df.withColumn(
                                        "marker",when((col("manual_const").isNotNull()) & 
                                    (col("output").isNull()),lit(Marker.MANUAL_CONSTRUCTION.value)).otherwise(col("marker"))).withColumn("output",when((col("manual_const").isNotNull()) & 
                                    (col("output").isNull()),col("manual_const")).otherwise(col("output")))
         only_mc_data = df_with_mc_data.filter((col("marker") == Marker.MANUAL_CONSTRUCTION.value) | (col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
-        print("only_mc_data")
-        only_mc_data.show(100)
-        df_with_mc_data.show(100)
+        # print("only_mc_data")
+        # only_mc_data.show(100)
+        # df_with_mc_data.show(100)
         # TODO Additionally, after MC data is entered, filter out the immediate missing responses. 
         prepared_df = prepared_df.filter(~(col("marker") == Marker.MANUAL_CONSTRUCTION.value) | ~(col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
-        print("prepared_df_without_mc_fimc :: ")
-        prepared_df.show()
+        # print("prepared_df_without_mc_fimc :: ")
+        # prepared_df.show()
         # ["ref", "period", "grouping"]
         # mc_join_cont = [mc_df1.marker_mc != Marker.MANUAL_CONSTRUCTION.value , mc_df1.ref == prepared_df.ref, mc_df1.period == prepared_df.period,mc_df1.grouping == prepared_df.grouping]
         # mc_df2 = prepared_df.join(mc_df1,mc_join_cont, "left")
         # mc_df2.show(100)
         
-        
+    # TODO refactor do with one select  
     if back_data_df:
         
         validated_back_data_df = validate_dataframe(
             back_data_df,
             back_input_params,
             type_mapping,
-            ["ref", "period", "grouping"],
-            ["manual_const"]
+            ["ref", "period", "grouping"]
         ).localCheckpoint(eager=False)
         back_data_period_df = (
             validated_back_data_df.select(
-                "ref", "period", "grouping", "output", "marker","manual_const"
+                "ref", "period", "grouping", "output", "marker"
             )
             .join(prior_period_df, [col("period") == col("prior_period")]) # TODO check what is the impact to miss the mc column in prior_period_df
             .drop("prior_period")
@@ -368,15 +367,40 @@ def impute(
             )
             .localCheckpoint(eager=False)
         )
+        
+        if back_data_df and manual_construction_col in back_data_period_df.columns:
+            validated_back_data_df = validate_dataframe(
+                back_data_df,
+                back_input_params,
+                type_mapping,
+                ["ref", "period", "grouping"],
+                ["manual_const"]
+            ).localCheckpoint(eager=False)
+            back_data_period_df = (
+                validated_back_data_df.select(
+                    "ref", "period", "grouping", "output", "marker","manual_const"
+                )
+                .join(prior_period_df, [col("period") == col("prior_period")]) # TODO check what is the impact to miss the mc column in prior_period_df
+                .drop("prior_period")
+                .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
+                .withColumn(
+                    "previous_period",
+                    calculate_previous_period(col("period"), periodicity),
+                )
+                .withColumn(
+                    "next_period", calculate_next_period(col("period"), periodicity)
+                )
+                .localCheckpoint(eager=False)
+            )
         # Remove manual construction record from back data before the rotio calculation.
         if manual_construction_col in back_data_period_df.columns: #TODO check is it needed ?!
             back_data_mc = back_data_period_df.filter((col("marker") == Marker.MANUAL_CONSTRUCTION.value) | (col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
-            print("back_data_mc")
-            back_data_mc.show(100)
+            # print("back_data_mc")
+            # back_data_mc.show(100)
             # TODO Additionally, after MC data is entered, filter out the immediate missing responses. 
             back_data_period_df = back_data_period_df.filter(~(col("marker") == Marker.MANUAL_CONSTRUCTION.value) | ~(col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
-            print("back_data_period_df_without_mc_fimc :: ")
-            back_data_period_df.show()
+            # print("back_data_period_df_without_mc_fimc :: ")
+            # back_data_period_df.show()
             
         prepared_df = prepared_df.unionByName(
             back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)), 
@@ -409,7 +433,6 @@ def calculate_ratios():
             ratio_calculators.append(construction_ratio_calculator)
 
         if not ratio_calculators:
-            print("empty return......")
             return
 
         # Since we're going to join on to the main df filtering here
@@ -602,8 +625,8 @@ def impute_helper(
     ) -> DataFrame:
         nonlocal imputed_df
         nonlocal null_response_df
-        print("inside impute_helper")
-        print(f"inside impute_helper :: {marker.value}")
+        # print("inside impute_helper")
+        # print(f"inside impute_helper :: {marker.value}")
         if direction:
             # Forward imputation
             other_period_col = "previous_period"
@@ -780,9 +803,8 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         )
 
     df = prepared_df
-    i=0
-    print(" imputation call ...")
-    prepared_df.show(100)
+    # print(" imputation call ...")
+    # prepared_df.show(100)
     for stage in (
         forward_impute_from_response,
         backward_impute,
@@ -790,19 +812,26 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         forward_impute_from_construction,
     ):
         df = stage(df).localCheckpoint(eager=False)
-        print(f"stage:: {i}")
-        df.show(100)
+        # df.show(100)
+        # TODO move thid code after the rotio calculation. So dont need to do multiple times.
         if manual_construction_col in input_df.columns and stage == backward_impute:
-            print("after backward_impute add the mc only data")
-            only_mc_data.show(100)
+            # print("after backward_impute add the mc only data")
+            # only_mc_data.show(100)
+            # TODO CHECK default inner join is good enough or not ?
+            only_mc_data = only_mc_data.alias("mc").join(df,["period","grouping"]).select("mc.ref","mc.period","mc.grouping","mc.aux","mc.manual_const",
+                                                                                         "mc.previous_period","mc.next_period",
+                                                                                         "forward","backward","count_forward","count_backward","default_forward",
+                                                                                         "default_backward","construction","count_construction","default_construction",
+                                                                                         "mc.output","mc.marker").distinct()
+            # print("test try to get the links")
+            # only_mc_data.show(100)
             df = df.unionByName(only_mc_data, allowMissingColumns=True)
-            print("Merged mc only data")
-            df.show(100)
+            # print("Merged mc only data")
+            # df.show(100)
             
-        if df.filter(col("output").isNull()).count() == 0 and i==2:
+        if df.filter(col("output").isNull()).count() == 0 and stage == construct_values:
             break
         
-        i=i+1
     return df.join(prior_period_df, [col("prior_period") < col("period")]).select(
         [
             col(k).alias(output_col_mapping[k])
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_output.csv
index 21d9ffed..a5da49e3 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_output.csv
@@ -1,13 +1,13 @@
-identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction
-30001,202001,100,,1.129481006,,2.196577972,194.6,8444,R,,3,3
-30001,202002,100,0.885362387,3.732401398,0.652198238,1.866715325,90.8436019,7476,R,3,3,4
-30001,202003,100,0.267924024,,1.526946931,,103.0153846,2003,R,3,,3
-30002,202001,100,,1.195062676,,2.196577972,194.6,9343,R,,3,3
-30002,202002,100,0.836776196,1.596487645,0.652198238,1.866715325,90.8436,7818,R,3,3,4
-30002,202003,100,0.626375032,,1.526947,,103.0153846,4897,R,3,,3
-30003,202001,100,,4.265190233,,2.196577972,194.6,7511,R,,3,3
-30003,202002,100,0.234456131,0.271256932,0.652198238,1.866715325,90.8436,1761,R,3,3,4
-30003,202003,100,3.686541738,,1.526947,,103.0153846,6492,R,3,,3
-30004,202001,100,,,,2.196577972,194.6,4321,MC,,3,3
-30004,202002,100,,,0.652198238,1.866715325,90.8436,2113,R,3,3,4
-30004,202003,100,,,1.526947,,103.0153846,3189,MC,3,,3
\ No newline at end of file
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,2.196577972,194.6,8444,R,0,3,3,true,false,false
+30001,202002,100,0.885362387,3.732401398,0.652198238,1.866715325,90.8436019,7476,R,3,3,4,false,false,false
+30001,202003,100,0.267924024,,1.526946931,1,103.0153846,2003,R,3,0,3,false,true,false
+30002,202001,100,,1.195062676,1,2.196577972,194.6,9343,R,0,3,3,true,false,false
+30002,202002,100,0.836776196,1.596487645,0.652198238,1.866715325,90.8436019,7818,R,3,3,4,false,false,false
+30002,202003,100,0.626375032,,1.526947,1,103.0153846,4897,R,3,0,3,false,true,false
+30003,202001,100,,4.265190233,1,2.196577972,194.6,7511,R,0,3,3,true,false,false
+30003,202002,100,0.234456131,0.271256932,0.652198238,1.866715325,90.8436019,1761,R,3,3,4,false,false,false
+30003,202003,100,3.686541738,,1.526947,1,103.0153846,6492,R,3,0,3,false,true,false
+30004,202001,100,,,1,2.196577972,194.6,4321,MC,0,3,3,true,false,false
+30004,202002,100,,,0.652198238,1.866715325,90.8436019,2113,R,3,3,4,false,false,false
+30004,202003,100,,,1.526947,1,103.0153846,3189,MC,3,0,3,false,true,false
\ No newline at end of file
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 097e1a64..d7977241 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -57,8 +57,8 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
 
     scenarios = test_config.pop("scenarios", {})
     scenario_config = scenarios.get(scenario, {})
-    print("test1111 scenario_config")
-    print(scenario_config)
+    # print("test1111 scenario_config")
+    # print(scenario_config)
     fields = default_config["field_names"]
     fields.update(test_config.get("field_names", {}))
     fields.update(scenario_config.pop("field_names", {}))
@@ -66,8 +66,8 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     excluded_fields.extend(test_config.get("excluded_fields", []))
     excluded_fields.extend(scenario_config.pop("excluded_fields", []))
     imputation_kwargs = fields.copy()
-    print("test1111 fields")
-    print(fields)
+    # print("test1111 fields")
+    # print(fields)
     imputation_kwargs["forward_backward_ratio_calculator"] = getattr(
         imputation, ratio_calculator
     )
@@ -82,11 +82,11 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     field_types = default_config["field_types"]
     field_types.update(test_config.get("field_types", {}))
     field_types.update(scenario_config.get("field_types", {}))
-    print("test1111 field_types")
-    print(field_types)
+    # print("test1111 field_types")
+    # print(field_types)
     imputation_kwargs.update(scenario_config)
-    print("test1111 imputation_kwargs")
-    print(imputation_kwargs)
+    # print("test1111 imputation_kwargs")
+    # print(imputation_kwargs)
     types = {fields[k]: v for k, v in field_types.items()}
     scenario_file_type = scenario_type.replace("back_data_", "")
     scenario_input = fxt_load_test_csv(
@@ -120,9 +120,9 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     scenario_expected_output = scenario_expected_output.filter(
         col(fields["period_col"]) >= starting_period
     )
-    scenario_input.show(100)
-    print("test2222 imputation_kwargs")
-    print(imputation_kwargs)
+    # scenario_input.show(100)
+    # print("test2222 imputation_kwargs")
+    # print(imputation_kwargs)
     scenario_actual_output = imputation.impute(
         input_df=scenario_input, **imputation_kwargs
     )
@@ -131,13 +131,14 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
             scenario_actual_output = scenario_actual_output.withColumn(
                 field_name, col(field_name).cast("decimal(15, 6)")
             )
-    print("test33333 scenario_actual_output")
-    scenario_actual_output.show(100)
+    # print("test33333 scenario_actual_output")
+    # scenario_actual_output.orderBy("identifier","date").show(100)
     sort_cols = [
         fields["reference_col"],
         fields["period_col"],
         fields["grouping_col"],
     ]
+    # if scenario != "001_71_MC_R_MC_1":
     check_df_equality(
         actual=scenario_actual_output.sort(sort_cols),
         expected=scenario_expected_output.sort(sort_cols),

From 32be17979f9051847f4ff4bd19f1ab9522a2b8be Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Mon, 13 May 2024 16:18:55 +0100
Subject: [PATCH 491/531] fix for black and imputation unittest failures

---
 .../imputation/engine.py                      | 138 ++++++++++++------
 1 file changed, 92 insertions(+), 46 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index b2cffaab..6cecd667 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -42,10 +42,10 @@ class Marker(Enum):
 
     FORWARD_IMPUTE_FROM_CONSTRUCTION = "FIC"
     """The value has been forward imputed from a constructed value."""
-    
+
     MANUAL_CONSTRUCTION = "MC"
     """The value is manual construction."""
-    
+
     FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION = "FIMC"
     """The value has been forward imputed from a manual construction."""
 
@@ -232,10 +232,6 @@ def impute(
 
     if construction_link_col in input_df.columns:
         input_params["construction"] = construction_link_col
-    
-    
-
-
 
     back_input_params = {
         "ref": reference_col,
@@ -248,10 +244,13 @@ def impute(
     # TODO CHECK in nimpuation wrapper the same column name is avaliable in back data df as well ?!
     if manual_construction_col in input_df.columns:
         input_params["manual_const"] = manual_construction_col
-        
-    if back_data_df and manual_construction_col in back_data_df.columns:
-        back_input_params["manual_const"] = manual_construction_col
-        
+
+    if back_data_df:
+        if not isinstance(back_data_df, DataFrame):
+            raise TypeError("Input is not a DataFrame")
+        if manual_construction_col in back_data_df.columns:
+            back_input_params["manual_const"] = manual_construction_col
+
     if weight is not None:
         if not isinstance(weight, Decimal):
             raise TypeError("weight must be of type Decimal")
@@ -308,7 +307,7 @@ def impute(
             input_params,
             type_mapping,
             ["ref", "period", "grouping"],
-            ["target","manual_const"],
+            ["target", "manual_const"],
         )
         .withColumnRenamed("target", "output")
         .withColumn("marker", when(~col("output").isNull(), Marker.RESPONSE.value))
@@ -324,38 +323,51 @@ def impute(
     # print("test1111 input_df.columns")
     # print(str(input_df.columns))
     # prepared_df.show(100)
-    if manual_construction_col in input_df.columns: #TODO check is it needed ?!
+    if manual_construction_col in input_df.columns:  # TODO check is it needed ?!
         df_with_mc_data = prepared_df.withColumn(
-                                       "marker",when((col("manual_const").isNotNull()) & 
-                                   (col("output").isNull()),lit(Marker.MANUAL_CONSTRUCTION.value)).otherwise(col("marker"))).withColumn("output",when((col("manual_const").isNotNull()) & 
-                                   (col("output").isNull()),col("manual_const")).otherwise(col("output")))
-        only_mc_data = df_with_mc_data.filter((col("marker") == Marker.MANUAL_CONSTRUCTION.value) | (col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
+            "marker",
+            when(
+                (col("manual_const").isNotNull()) & (col("output").isNull()),
+                lit(Marker.MANUAL_CONSTRUCTION.value),
+            ).otherwise(col("marker")),
+        ).withColumn(
+            "output",
+            when(
+                (col("manual_const").isNotNull()) & (col("output").isNull()),
+                col("manual_const"),
+            ).otherwise(col("output")),
+        )
+        only_mc_data = df_with_mc_data.filter(
+            (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
+            | (col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value)
+        )
         # print("only_mc_data")
         # only_mc_data.show(100)
         # df_with_mc_data.show(100)
-        # TODO Additionally, after MC data is entered, filter out the immediate missing responses. 
-        prepared_df = prepared_df.filter(~(col("marker") == Marker.MANUAL_CONSTRUCTION.value) | ~(col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
+        # TODO Additionally, after MC data is entered, filter out the immediate missing responses.
+        prepared_df = prepared_df.filter(
+            ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
+            | ~(col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value)
+        )
         # print("prepared_df_without_mc_fimc :: ")
         # prepared_df.show()
         # ["ref", "period", "grouping"]
         # mc_join_cont = [mc_df1.marker_mc != Marker.MANUAL_CONSTRUCTION.value , mc_df1.ref == prepared_df.ref, mc_df1.period == prepared_df.period,mc_df1.grouping == prepared_df.grouping]
         # mc_df2 = prepared_df.join(mc_df1,mc_join_cont, "left")
         # mc_df2.show(100)
-        
-    # TODO refactor do with one select  
+
+    # TODO refactor do with one select
     if back_data_df:
-        
         validated_back_data_df = validate_dataframe(
-            back_data_df,
-            back_input_params,
-            type_mapping,
-            ["ref", "period", "grouping"]
+            back_data_df, back_input_params, type_mapping, ["ref", "period", "grouping"]
         ).localCheckpoint(eager=False)
         back_data_period_df = (
             validated_back_data_df.select(
                 "ref", "period", "grouping", "output", "marker"
             )
-            .join(prior_period_df, [col("period") == col("prior_period")]) # TODO check what is the impact to miss the mc column in prior_period_df
+            .join(
+                prior_period_df, [col("period") == col("prior_period")]
+            )  # TODO check what is the impact to miss the mc column in prior_period_df
             .drop("prior_period")
             .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
             .withColumn(
@@ -367,20 +379,22 @@ def impute(
             )
             .localCheckpoint(eager=False)
         )
-        
+
         if back_data_df and manual_construction_col in back_data_period_df.columns:
             validated_back_data_df = validate_dataframe(
                 back_data_df,
                 back_input_params,
                 type_mapping,
                 ["ref", "period", "grouping"],
-                ["manual_const"]
+                ["manual_const"],
             ).localCheckpoint(eager=False)
             back_data_period_df = (
                 validated_back_data_df.select(
-                    "ref", "period", "grouping", "output", "marker","manual_const"
+                    "ref", "period", "grouping", "output", "marker", "manual_const"
                 )
-                .join(prior_period_df, [col("period") == col("prior_period")]) # TODO check what is the impact to miss the mc column in prior_period_df
+                .join(
+                    prior_period_df, [col("period") == col("prior_period")]
+                )  # TODO check what is the impact to miss the mc column in prior_period_df
                 .drop("prior_period")
                 .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
                 .withColumn(
@@ -393,22 +407,34 @@ def impute(
                 .localCheckpoint(eager=False)
             )
         # Remove manual construction record from back data before the rotio calculation.
-        if manual_construction_col in back_data_period_df.columns: #TODO check is it needed ?!
-            back_data_mc = back_data_period_df.filter((col("marker") == Marker.MANUAL_CONSTRUCTION.value) | (col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
+        if (
+            manual_construction_col in back_data_period_df.columns
+        ):  # TODO check is it needed ?!
+            back_data_mc = back_data_period_df.filter(
+                (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
+                | (
+                    col("marker")
+                    == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
+                )
+            )
             # print("back_data_mc")
             # back_data_mc.show(100)
-            # TODO Additionally, after MC data is entered, filter out the immediate missing responses. 
-            back_data_period_df = back_data_period_df.filter(~(col("marker") == Marker.MANUAL_CONSTRUCTION.value) | ~(col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value))
+            # TODO Additionally, after MC data is entered, filter out the immediate missing responses.
+            back_data_period_df = back_data_period_df.filter(
+                ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
+                | ~(
+                    col("marker")
+                    == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
+                )
+            )
             # print("back_data_period_df_without_mc_fimc :: ")
             # back_data_period_df.show()
-            
+
         prepared_df = prepared_df.unionByName(
-            back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)), 
+            back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)),
             allowMissingColumns=True,
         )
-        
-        
-    
+
     def calculate_ratios():
         # This allows us to return early if we have nothing to do
         nonlocal prepared_df
@@ -818,20 +844,40 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
             # print("after backward_impute add the mc only data")
             # only_mc_data.show(100)
             # TODO CHECK default inner join is good enough or not ?
-            only_mc_data = only_mc_data.alias("mc").join(df,["period","grouping"]).select("mc.ref","mc.period","mc.grouping","mc.aux","mc.manual_const",
-                                                                                         "mc.previous_period","mc.next_period",
-                                                                                         "forward","backward","count_forward","count_backward","default_forward",
-                                                                                         "default_backward","construction","count_construction","default_construction",
-                                                                                         "mc.output","mc.marker").distinct()
+            only_mc_data = (
+                only_mc_data.alias("mc")
+                .join(df, ["period", "grouping"])
+                .select(
+                    "mc.ref",
+                    "mc.period",
+                    "mc.grouping",
+                    "mc.aux",
+                    "mc.manual_const",
+                    "mc.previous_period",
+                    "mc.next_period",
+                    "forward",
+                    "backward",
+                    "count_forward",
+                    "count_backward",
+                    "default_forward",
+                    "default_backward",
+                    "construction",
+                    "count_construction",
+                    "default_construction",
+                    "mc.output",
+                    "mc.marker",
+                )
+                .distinct()
+            )
             # print("test try to get the links")
             # only_mc_data.show(100)
             df = df.unionByName(only_mc_data, allowMissingColumns=True)
             # print("Merged mc only data")
             # df.show(100)
-            
+
         if df.filter(col("output").isNull()).count() == 0 and stage == construct_values:
             break
-        
+
     return df.join(prior_period_df, [col("prior_period") < col("period")]).select(
         [
             col(k).alias(output_col_mapping[k])

From 7f3789b0eb7f0de7995a9d5d3efc866066f0f30b Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Mon, 13 May 2024 16:25:27 +0100
Subject: [PATCH 492/531] fix for flake8 failure

---
 .../imputation/engine.py                        | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 6cecd667..36b82ee7 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -241,7 +241,8 @@ def impute(
         "marker": marker_col,
     }
     # input_df.show(100)
-    # TODO CHECK in nimpuation wrapper the same column name is avaliable in back data df as well ?!
+    # TODO CHECK in impuation wrapper the same column name
+    # is avaliable in back data df as well ?!
     if manual_construction_col in input_df.columns:
         input_params["manual_const"] = manual_construction_col
 
@@ -344,7 +345,8 @@ def impute(
         # print("only_mc_data")
         # only_mc_data.show(100)
         # df_with_mc_data.show(100)
-        # TODO Additionally, after MC data is entered, filter out the immediate missing responses.
+        # TODO Additionally, after MC data is entered,
+        # filter out the immediate missing responses.
         prepared_df = prepared_df.filter(
             ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
             | ~(col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value)
@@ -352,8 +354,6 @@ def impute(
         # print("prepared_df_without_mc_fimc :: ")
         # prepared_df.show()
         # ["ref", "period", "grouping"]
-        # mc_join_cont = [mc_df1.marker_mc != Marker.MANUAL_CONSTRUCTION.value , mc_df1.ref == prepared_df.ref, mc_df1.period == prepared_df.period,mc_df1.grouping == prepared_df.grouping]
-        # mc_df2 = prepared_df.join(mc_df1,mc_join_cont, "left")
         # mc_df2.show(100)
 
     # TODO refactor do with one select
@@ -394,7 +394,7 @@ def impute(
                 )
                 .join(
                     prior_period_df, [col("period") == col("prior_period")]
-                )  # TODO check what is the impact to miss the mc column in prior_period_df
+                )  # TODO chek impact to miss the mccolumn in prior_period_df
                 .drop("prior_period")
                 .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
                 .withColumn(
@@ -417,9 +417,11 @@ def impute(
                     == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
                 )
             )
+            back_data_mc.show(10)
             # print("back_data_mc")
             # back_data_mc.show(100)
-            # TODO Additionally, after MC data is entered, filter out the immediate missing responses.
+            # TODO Additionally, after MC data is entered,
+            # filter out the immediate missing responses.
             back_data_period_df = back_data_period_df.filter(
                 ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
                 | ~(
@@ -839,7 +841,8 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
     ):
         df = stage(df).localCheckpoint(eager=False)
         # df.show(100)
-        # TODO move thid code after the rotio calculation. So dont need to do multiple times.
+        # TODO move thid code after the rotio calculation.
+        # So dont need to do multiple times.
         if manual_construction_col in input_df.columns and stage == backward_impute:
             # print("after backward_impute add the mc only data")
             # only_mc_data.show(100)

From 7fe74b38739391dbf4d0df33e9a9b03d0f01eec3 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 14 May 2024 18:46:59 +0100
Subject: [PATCH 493/531] more MC scenarios unittest data

---
 .../imputation/engine.py                      | 69 ++++++++++++++++---
 .../001_72_MC_FIMC_2_input.csv                | 17 +++++
 .../001_72_MC_FIMC_2_output.csv               | 17 +++++
 .../001_73_R_R_MC_FIMC_FIMC_3_input.csv       | 21 ++++++
 .../001_73_R_R_MC_FIMC_FIMC_3_output.csv      | 21 ++++++
 .../001_74_C_FIC_FIC_MC_4_input.csv           | 17 +++++
 .../001_74_C_FIC_FIC_MC_4_output.csv          | 17 +++++
 .../001_75_C_FIC_MC_R_5_input.csv             | 17 +++++
 .../001_75_C_FIC_MC_R_5_output.csv            | 17 +++++
 .../001_76_C_MC_6_input.csv                   |  9 +++
 .../001_76_C_MC_6_output.csv                  |  9 +++
 .../001_77_R_FIR_MC_FIMC_7_input.csv          | 17 +++++
 .../001_77_R_FIR_MC_FIMC_7_output.csv         | 17 +++++
 tests/imputation/mean_of_ratios.toml          |  5 +-
 tests/imputation/test_scenarios.py            |  2 +-
 15 files changed, 257 insertions(+), 15 deletions(-)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_output.csv

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 36b82ee7..36dcdb49 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -347,9 +347,18 @@ def impute(
         # df_with_mc_data.show(100)
         # TODO Additionally, after MC data is entered,
         # filter out the immediate missing responses.
-        prepared_df = prepared_df.filter(
-            ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
-            | ~(col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value)
+        # may 13
+        # remove consecutive missing response after a MC
+        # TODO unCOMMENT
+        prepared_df = df_with_mc_data.filter(
+            col("marker").isNull()
+            | (
+                ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
+                & ~(
+                    col("marker")
+                    == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
+                )
+            )
         )
         # print("prepared_df_without_mc_fimc :: ")
         # prepared_df.show()
@@ -417,7 +426,7 @@ def impute(
                     == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
                 )
             )
-            back_data_mc.show(10)
+            back_data_mc.show(1)
             # print("back_data_mc")
             # back_data_mc.show(100)
             # TODO Additionally, after MC data is entered,
@@ -436,6 +445,8 @@ def impute(
             back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)),
             allowMissingColumns=True,
         )
+    # print("before calculate_ratios :: ")
+    # prepared_df.show(100)
 
     def calculate_ratios():
         # This allows us to return early if we have nothing to do
@@ -646,6 +657,8 @@ def calculate_weighted_link(link_name):
     # Caching for both imputed and unimputed data.
     imputed_df = None
     null_response_df = None
+    # print("After calculate_ratios :: ")
+    # prepared_df.show(100)
 
     # --- Impute helper ---
     def impute_helper(
@@ -655,6 +668,10 @@ def impute_helper(
         nonlocal null_response_df
         # print("inside impute_helper")
         # print(f"inside impute_helper :: {marker.value}")
+        # print("imputation helper :: df :: ")
+        # if imputed_df is None:
+        #     print("imputation helper :: imputed_df is None :: ")
+        # df.show(100)
         if direction:
             # Forward imputation
             other_period_col = "previous_period"
@@ -674,7 +691,8 @@ def impute_helper(
                 "forward",
                 "backward",
             )
-
+            # print("imputation helper :: working_df :: ")
+            # working_df.show(100)
             # Anything which isn't null is already imputed or a response and thus
             # can be imputed from. Note that in the case of backward imputation
             # this still holds since it always happens after forward imputation
@@ -684,16 +702,21 @@ def impute_helper(
             imputed_df = working_df.filter(~col("output").isNull()).localCheckpoint(
                 eager=True
             )
+            # print("imputation helper :: imputed_df :: ")
+            # imputed_df.show(100)
             # Any ref and grouping combos which have no values at all can't be
             # imputed from so we don't care about them here.
             ref_df = imputed_df.select("ref", "grouping").distinct()
+            # print("imputation helper :: ref_df :: ")
+            # ref_df.show(100)
             null_response_df = (
                 working_df.filter(col("output").isNull())
                 .drop("output", "marker")
                 .join(ref_df, ["ref", "grouping"])
                 .localCheckpoint(eager=True)
             )
-
+        # print("imputation helper :: null_response_df :: ")
+        # null_response_df.show(100)
         while True:
             other_df = imputed_df.selectExpr(
                 "ref AS other_ref",
@@ -723,6 +746,8 @@ def impute_helper(
                 )
                 .localCheckpoint(eager=False)
             )
+            # print("imputation helper :: calculation_df :: ")
+            # calculation_df.show(100)
             # If we've imputed nothing then we've got as far as we can get for
             # this phase.
             if calculation_df.count() == 0:
@@ -731,16 +756,23 @@ def impute_helper(
             # Store this set of imputed values in our main set for the next
             # iteration. Use eager checkpoints to help prevent rdd DAG explosion.
             imputed_df = imputed_df.union(calculation_df).localCheckpoint(eager=True)
+            # print("imputation helper :: imputed_df :: after union ")
+            # imputed_df.show(100)
             # Remove the newly imputed rows from our filtered set.
             null_response_df = null_response_df.join(
                 calculation_df.select("ref", "period", "grouping"),
                 ["ref", "period", "grouping"],
                 "leftanti",
             ).localCheckpoint(eager=True)
-
+            # print("imputation helper :: null_response_df :: after join ")
+            # null_response_df.show(100)
         # We should now have an output column which is as fully populated as
         # this phase of imputation can manage. As such replace the existing
         # output column with our one. Same goes for the marker column.
+        # print("imputation helper :: df :: before return ")
+        # df.show(100)
+        # print("imputation helper :: imputed_df :: before return ")
+        # imputed_df.show(100)
         return df.drop("output", "marker").join(
             imputed_df.select("ref", "period", "grouping", "output", "marker"),
             ["ref", "period", "grouping"],
@@ -762,6 +794,15 @@ def forward_impute_from_response(df: DataFrame) -> DataFrame:
     def backward_impute(df: DataFrame) -> DataFrame:
         return impute_helper(df, "backward", Marker.BACKWARD_IMPUTE, False)
 
+    def forward_impute_from_manualconstruction(df: DataFrame) -> DataFrame:
+        nonlocal imputed_df
+        nonlocal null_response_df
+        imputed_df = None
+        null_response_df = None
+        return impute_helper(
+            df, "forward", Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION, True
+        )
+
     # --- Construction functions ---
     def construct_values(df: DataFrame) -> DataFrame:
         if back_data_df:
@@ -831,16 +872,24 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         )
 
     df = prepared_df
-    # print(" imputation call ...")
-    # prepared_df.show(100)
     for stage in (
         forward_impute_from_response,
         backward_impute,
+        forward_impute_from_manualconstruction,
         construct_values,
         forward_impute_from_construction,
     ):
-        df = stage(df).localCheckpoint(eager=False)
+        # print(f"imputation stage: {stage}")
         # df.show(100)
+        if (
+            manual_construction_col not in input_df.columns
+            and stage == forward_impute_from_manualconstruction
+        ):
+            continue
+
+        df = stage(df).localCheckpoint(eager=False)
+        # print(f"after imputation stage: {stage}")
+        # df.show(1)
         # TODO move thid code after the rotio calculation.
         # So dont need to do multiple times.
         if manual_construction_col in input_df.columns and stage == backward_impute:
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_input.csv
new file mode 100644
index 00000000..4d27a45d
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_input.csv
@@ -0,0 +1,17 @@
+identifier,date,group,question,other,manual_construction
+40001,202001,100,9491,35,
+40001,202002,100,4783,35,
+40001,202003,100,7902,35,
+40001,202004,100,4911,35,
+40002,202001,100,2095,63,
+40002,202002,100,442,63,
+40002,202003,100,3136,63,
+40002,202004,100,2115,63,
+40003,202001,100,7863,16,
+40003,202002,100,8121,16,
+40003,202003,100,2151,16,
+40003,202004,100,1377,16,
+40004,202001,100,5131,78,
+40004,202002,100,9836,78,
+40004,202003,100,,78,7525,
+40004,202004,100,,78,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_output.csv
new file mode 100644
index 00000000..e71195aa
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_output.csv
@@ -0,0 +1,17 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+40001,202001,100,,1.984319465,1,2.053506032,128.0208333,9491,R,0,4,4,true,false,false
+40001,202002,100,0.503951112,0.6052898,0.916179196,1.507228985,120.7395833,4783,R,4,3,4,false,false,false
+40001,202003,100,1.652101192,1.609040929,3.003997558,1.551291583,115.6929824,7902,R,3,3,3,false,false,false
+40001,202004,100,0.621488231,,0.645360538,1,73.71052632,4911,R,3,0,3,false,true,false
+40002,202001,100,,4.739819005,1,2.053506032,128.0208333,2095,R,0,4,4,true,false,false
+40002,202002,100,0.21097852,0.140943878,0.916179196,1.507228985,120.7395833,442,R,4,3,4,false,false,false
+40002,202003,100,7.095022624,1.482742317,3.003997558,1.551291583,115.6929824,3136,R,3,3,3,false,false,false
+40002,202004,100,0.67442602,,0.645360538,1,73.71052632,2115,R,3,0,3,false,true,false
+40003,202001,100,,0.968230513,1,2.053506032,128.0208333,7863,R,0,4,4,true,false,false
+40003,202002,100,1.032811904,3.775453278,0.916179196,1.507228985,120.7395833,8121,R,4,3,4,false,false,false
+40003,202003,100,0.264868859,1.562091503,3.003997558,1.551291583,115.6929824,2151,R,3,3,3,false,false,false
+40003,202004,100,0.640167364,,0.645360538,1,73.71052632,1377,R,3,0,3,false,true,false
+40004,202001,100,,0.521655144,1,2.053506032,128.0208333,5131,R,0,4,4,true,false,false
+40004,202002,100,1.916975248,,0.916179196,1.507228985,120.7395833,9836,R,4,3,4,false,false,false
+40004,202003,100,,,3.003997558,1.551291583,115.6929824,7525,MC,3,3,3,false,false,false
+40004,202004,100,,,0.645360538,1,73.71052632,4856.338052,FIMC,3,0,3,false,true,false
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_input.csv
new file mode 100644
index 00000000..dbe544b5
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_input.csv
@@ -0,0 +1,21 @@
+identifier,date,group,question,other,manual_construction
+50001,202001,100,6362,59,
+50001,202002,100,8542,59,
+50001,202003,100,5623,59,
+50001,202004,100,7769,59,
+50001,202005,100,4687,59,
+50002,202001,100,4851,36,
+50002,202002,100,8894,36,
+50002,202003,100,3372,36,
+50002,202004,100,3522,36,
+50002,202005,100,2327,36,
+50003,202001,100,2238,76,
+50003,202002,100,769,76,
+50003,202003,100,7722,76,
+50003,202004,100,6445,76,
+50003,202005,100,1521,76,
+50004,202001,100,688,30,
+50004,202002,100,3245,30,
+50004,202003,100,,30,1487
+50004,202004,100,,30,
+50004,202005,100,,30,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_output.csv
new file mode 100644
index 00000000..ee677802
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_output.csv
@@ -0,0 +1,21 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+50001,202001,100,,0.744790447,1,1.103126475,70.34328358,6362,R,0,4,4,TRUE,FALSE,FALSE
+50001,202002,100,1.342659541,1.519117909,2.05906902,1.418769101,106.7164179,8542,R,4,3,4,FALSE,FALSE,FALSE
+50001,202003,100,0.65827675,0.723773973,3.693007078,0.959774209,97.76023392,5623,R,3,3,3,FALSE,FALSE,FALSE
+50001,202004,100,1.381646808,1.657563473,1.086919709,2.469481356,103.7192982,7769,R,3,3,3,FALSE,FALSE,FALSE
+50001,202005,100,0.603295147,,0.49999873,1,49.9122807,4687,R,3,0,3,FALSE,TRUE,FALSE
+50002,202001,100,,0.545423881,1,1.103126475,70.34328358,4851,R,0,4,4,TRUE,FALSE,FALSE
+50002,202002,100,1.833436405,2.637603796,2.05906902,1.418769101,106.7164179,8894,R,4,3,4,FALSE,FALSE,FALSE
+50002,202003,100,0.379131999,0.957410562,3.693007078,0.959774209,97.76023392,3372,R,3,3,3,FALSE,FALSE,FALSE
+50002,202004,100,1.044483986,1.513536743,1.086919709,2.469481356,103.7192982,3522,R,3,3,3,FALSE,FALSE,FALSE
+50002,202005,100,0.660704145,,0.49999873,1,49.9122807,2327,R,3,0,3,FALSE,TRUE,FALSE
+50003,202001,100,,2.910273082,1,1.103126475,70.34328358,2238,R,0,4,4,TRUE,FALSE,FALSE
+50003,202002,100,0.343610366,0.0995856,2.05906902,1.418769101,106.7164179,769,R,4,3,4,FALSE,FALSE,FALSE
+50003,202003,100,10.04161248,1.198138092,3.693007078,0.959774209,97.76023392,7722,R,3,3,3,FALSE,FALSE,FALSE
+50003,202004,100,0.834628335,4.237343853,1.086919709,2.469481356,103.7192982,6445,R,3,3,3,FALSE,FALSE,FALSE
+50003,202005,100,0.235996897,,0.49999873,1,49.9122807,1521,R,3,0,3,FALSE,TRUE,FALSE
+50004,202001,100,,0.21201849,1,1.103126475,70.34328358,688,R,0,4,4,TRUE,FALSE,FALSE
+50004,202002,100,4.716569767,,2.05906902,1.418769101,106.7164179,3245,R,4,3,4,FALSE,FALSE,FALSE
+50004,202003,100,,,3.693007078,0.959774209,97.76023392,1487,MC,3,3,3,FALSE,FALSE,FALSE
+50004,202004,100,,,1.086919709,2.469481356,103.7192982,1616.249608,FIMC,3,3,3,FALSE,FALSE,FALSE
+50004,202005,100,,,0.49999873,1,49.9122807,808.122751,FIMC,3,0,3,FALSE,TRUE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_input.csv
new file mode 100644
index 00000000..979cbbfa
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_input.csv
@@ -0,0 +1,17 @@
+identifier,date,group,question,other,manual_construction
+100001,202001,100,3074,26,
+100001,202002,100,9529,26,
+100001,202003,100,615,26,
+100001,202004,100,3540,26,
+100002,202001,100,8084,19,
+100002,202002,100,2422,19,
+100002,202003,100,3058,19,
+100002,202004,100,5608,19,
+100003,202001,100,5161,46,
+100003,202002,100,3648,46,
+100003,202003,100,205,46,
+100003,202004,100,2594,46,
+100004,202001,100,,86,
+100004,202002,100,,86,
+100004,202003,100,,86,
+100004,202004,100,,86,9352
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_output.csv
new file mode 100644
index 00000000..c5fd6ee9
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_output.csv
@@ -0,0 +1,17 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+100001,202001,100,,0.322594186,1,1.691693133,179.3296703,3074,R,0,3,3,TRUE,FALSE,FALSE
+100001,202002,100,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,9529,R,3,3,3,FALSE,FALSE,FALSE
+100001,202003,100,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,615,R,3,3,3,FALSE,FALSE,FALSE
+100001,202004,100,5.756097561,,6.74787815,1,129.032967,3540,R,3,0,3,FALSE,TRUE,FALSE
+100002,202001,100,,3.337737407,1,1.691693133,179.3296703,8084,R,0,3,3,TRUE,FALSE,FALSE
+100002,202002,100,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,2422,R,3,3,3,FALSE,FALSE,FALSE
+100002,202003,100,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3058,R,3,3,3,FALSE,FALSE,FALSE
+100002,202004,100,1.833878352,,6.74787815,1,129.032967,5608,R,3,0,3,FALSE,TRUE,FALSE
+100003,202001,100,,1.414747807,1,1.691693133,179.3296703,5161,R,0,3,3,TRUE,FALSE,FALSE
+100003,202002,100,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3648,R,3,3,3,FALSE,FALSE,FALSE
+100003,202003,100,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,205,R,3,3,3,FALSE,FALSE,FALSE
+100003,202004,100,12.65365854,,6.74787815,1,129.032967,2594,R,3,0,3,FALSE,TRUE,FALSE
+100004,202001,100,,,1,1.691693133,179.3296703,15422.351648,C,0,3,3,TRUE,FALSE,FALSE
+100004,202002,100,,,1.368771264,11.36048394,171.4175824,21109.671762,FIC,3,3,3,FALSE,FALSE,FALSE
+100004,202003,100,,,0.4611093,0.266016593,42.61538462,9733.865967,FIC,3,3,3,FALSE,FALSE,FALSE
+100004,202004,100,,,6.74787815,1,129.032967,9352,MC,3,0,3,FALSE,TRUE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_input.csv
new file mode 100644
index 00000000..3c67c063
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_input.csv
@@ -0,0 +1,17 @@
+identifier,date,group,question,other,manual_construction
+100001,202001,100,3074,26,
+100001,202002,100,9529,26,
+100001,202003,100,615,26,
+100001,202004,100,3540,26,
+100002,202001,100,8084,19,
+100002,202002,100,2422,19,
+100002,202003,100,3058,19,
+100002,202004,100,5608,19,
+100003,202001,100,5161,46,
+100003,202002,100,3648,46,
+100003,202003,100,205,46,
+100003,202004,100,2594,46,
+100004,202001,100,,86,
+100004,202002,100,,86,
+100004,202003,100,,86,9352
+100004,202004,100,8762,86,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_output.csv
new file mode 100644
index 00000000..e166f49a
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_output.csv
@@ -0,0 +1,17 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+100001,202001,100,,0.322594186,1,1.691693133,179.3296703,3074,R,0,3,3,TRUE,FALSE,FALSE
+100001,202002,100,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,9529,R,3,3,3,FALSE,FALSE,FALSE
+100001,202003,100,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,615,R,3,3,3,FALSE,FALSE,FALSE
+100001,202004,100,5.756097561,,6.74787815,1,115.8418079,3540,R,3,0,4,FALSE,TRUE,FALSE
+100002,202001,100,,3.337737407,1,1.691693133,179.3296703,8084,R,0,3,3,TRUE,FALSE,FALSE
+100002,202002,100,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,2422,R,3,3,3,FALSE,FALSE,FALSE
+100002,202003,100,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3058,R,3,3,3,FALSE,FALSE,FALSE
+100002,202004,100,1.833878352,,6.74787815,1,115.8418079,5608,R,3,0,4,FALSE,TRUE,FALSE
+100003,202001,100,,1.414747807,1,1.691693133,179.3296703,5161,R,0,3,3,TRUE,FALSE,FALSE
+100003,202002,100,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3648,R,3,3,3,FALSE,FALSE,FALSE
+100003,202003,100,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,205,R,3,3,3,FALSE,FALSE,FALSE
+100003,202004,100,12.65365854,,6.74787815,1,115.8418079,2594,R,3,0,4,FALSE,TRUE,FALSE
+100004,202001,100,,,1,1.691693133,179.3296703,15422.351648,C,0,3,3,TRUE,FALSE,FALSE
+100004,202002,100,,,1.368771264,11.36048394,171.4175824,21109.671762,FIC,3,3,3,FALSE,FALSE,FALSE
+100004,202003,100,,,0.4611093,0.266016593,42.61538462,9352,MC,3,3,3,FALSE,FALSE,FALSE
+100004,202004,100,,,6.74787815,1,115.8418079,8762,R,3,0,4,FALSE,TRUE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_input.csv
new file mode 100644
index 00000000..4ee996c1
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_input.csv
@@ -0,0 +1,9 @@
+identifier,date,group,question,other,manual_construction
+20001,202001,100,2536,35,
+20001,202002,100,8283,35,
+20002,202001,100,9113,72,
+20002,202002,100,2970,72,
+20003,202001,100,5644,77,
+20003,202002,100,989,77,
+20004,202001,100,,30,
+20004,202002,100,,30,3021
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_output.csv
new file mode 100644
index 00000000..955b819f
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_output.csv
@@ -0,0 +1,9 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+20001,202001,100,,0.306169262,1,3.027097983,93.98369565,2536,R,0,3,3,TRUE,FALSE,FALSE
+20001,202002,100,3.266167192,,1.255768523,1,66.5326087,8283,R,3,0,3,FALSE,TRUE,FALSE
+20002,202001,100,,3.068350168,1,3.027097983,93.98369565,9113,R,0,3,3,TRUE,FALSE,FALSE
+20002,202002,100,0.325908043,,1.255768523,1,66.5326087,2970,R,3,0,3,FALSE,TRUE,FALSE
+20003,202001,100,,5.70677452,1,3.027097983,93.98369565,5644,R,0,3,3,TRUE,FALSE,FALSE
+20003,202002,100,0.175230333,,1.255768523,1,66.5326087,989,R,3,0,3,FALSE,TRUE,FALSE
+20004,202001,100,,,1,3.027097983,93.98369565,2819.51087,C,0,3,3,TRUE,FALSE,FALSE
+20004,202002,100,,,1.255768523,1,66.5326087,3021,MC,3,0,3,FALSE,TRUE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_input.csv
new file mode 100644
index 00000000..90b58166
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_input.csv
@@ -0,0 +1,17 @@
+identifier,date,group,question,other,manual_construction
+40001,202001,100,9491,35,
+40001,202002,100,4783,35,
+40001,202003,100,7902,35,
+40001,202004,100,4911,35,
+40002,202001,100,2095,63,
+40002,202002,100,442,63,
+40002,202003,100,3136,63,
+40002,202004,100,2115,63,
+40003,202001,100,7863,16,
+40003,202002,100,8121,16,
+40003,202003,100,2151,16,
+40003,202004,100,1377,16,
+40004,202001,100,5131,78,
+40004,202002,100,,78,
+40004,202003,100,,78,7525
+40004,202004,100,,78,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_output.csv
new file mode 100644
index 00000000..217ddd9c
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_output.csv
@@ -0,0 +1,17 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+40001,202001,100,,1.984319465,1,2.564122994,128.0208333,9491,R,0,3,4,TRUE,FALSE,FALSE
+40001,202002,100,0.503951112,0.6052898,0.582580512,1.507228985,117.0701754,4783,R,3,3,3,FALSE,FALSE,FALSE
+40001,202003,100,1.652101192,1.609040929,3.003997558,1.551291583,115.692982,7902,R,3,3,3,FALSE,FALSE,FALSE
+40001,202004,100,0.621488231,,0.645360538,1,73.71052632,4911,R,3,0,3,FALSE,TRUE,FALSE
+40002,202001,100,,4.739819005,1,2.564122994,128.0208333,2095,R,0,3,4,TRUE,FALSE,FALSE
+40002,202002,100,0.21097852,0.140943878,0.582580512,1.507228985,117.0701754,442,R,3,3,3,FALSE,FALSE,FALSE
+40002,202003,100,7.095022624,1.482742317,3.003997558,1.551291583,115.692982,3136,R,3,3,3,FALSE,FALSE,FALSE
+40002,202004,100,0.67442602,,0.645360538,1,73.71052632,2115,R,3,0,3,FALSE,TRUE,FALSE
+40003,202001,100,,0.968230513,1,2.564122994,128.0208333,7863,R,0,3,4,TRUE,FALSE,FALSE
+40003,202002,100,1.032811904,3.775453278,0.582580512,1.507228985,117.0701754,8121,R,3,3,3,FALSE,FALSE,FALSE
+40003,202003,100,0.264868859,1.562091503,3.003997558,1.551291583,115.692982,2151,R,3,3,3,FALSE,FALSE,FALSE
+40003,202004,100,0.640167364,,0.645360538,1,73.71052632,1377,R,3,0,3,FALSE,TRUE,FALSE
+40004,202001,100,,,1,2.564122994,128.0208333,5131,R,0,3,4,TRUE,FALSE,FALSE
+40004,202002,100,,,0.582580512,1.507228985,117.0701754,2989.220607,FIR,3,3,3,FALSE,FALSE,FALSE
+40004,202003,100,,,3.003997558,1.551291583,115.692982,7525,MC,3,3,3,FALSE,FALSE,FALSE
+40004,202004,100,,,0.645360538,1,73.71052632,4856.338052,FIMC,3,0,3,FALSE,TRUE,FALSE
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index e36c6ecf..2ee18de8 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -198,7 +198,4 @@ weight_periodicity_multiplier = 12
 
 [scenarios.70_C_FI_FI_65_weight]
 weight = "0.65"
-weight_periodicity_multiplier = 12
-
-[scenarios.001_71_MC_R_MC_1]
-manual_construction_col = "manual_construction"
+weight_periodicity_multiplier = 12
\ No newline at end of file
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index d7977241..c14727a6 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -132,7 +132,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
                 field_name, col(field_name).cast("decimal(15, 6)")
             )
     # print("test33333 scenario_actual_output")
-    # scenario_actual_output.orderBy("identifier","date").show(100)
+    # scenario_actual_output.orderBy("identifier", "date").show(100)
     sort_cols = [
         fields["reference_col"],
         fields["period_col"],

From 0272232296dc36c9645197b744270f076e4f34e5 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Wed, 15 May 2024 15:46:12 +0100
Subject: [PATCH 494/531] add methodalogist scenarios 8 to 10 test data

---
 .../001_78_C_FIC_MC_FIMC_8_input.csv            | 17 +++++++++++++++++
 .../001_78_C_FIC_MC_FIMC_8_output.csv           | 17 +++++++++++++++++
 .../001_79_MC_BI_R_9_input.csv                  | 13 +++++++++++++
 .../001_79_MC_BI_R_9_output.csv                 | 13 +++++++++++++
 .../001_80_R(MC)_R_FIR_10_input.csv             | 13 +++++++++++++
 .../001_80_R(MC)_R_FIR_10_output.csv            | 13 +++++++++++++
 6 files changed, 86 insertions(+)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_output.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_input.csv
new file mode 100644
index 00000000..380b76f6
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_input.csv
@@ -0,0 +1,17 @@
+identifier,date,group,question,other,manual_construction
+100001,202001,100,3074,26,
+100001,202002,100,9529,26,
+100001,202003,100,615,26,
+100001,202004,100,3540,26,
+100002,202001,100,8084,19,
+100002,202002,100,2422,19,
+100002,202003,100,3058,19,
+100002,202004,100,5608,19,
+100003,202001,100,5161,46,
+100003,202002,100,3648,46,
+100003,202003,100,205,46,
+100003,202004,100,2594,46,
+100004,202001,100,,86,
+100004,202002,100,,86,
+100004,202003,100,,86,11085
+100004,202004,100,,86,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_output.csv
new file mode 100644
index 00000000..77730dae
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_output.csv
@@ -0,0 +1,17 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+100001,202001,100,,0.322594186,1,1.691693133,179.3296703,3074,R,0,3,3,TRUE,FALSE,FALSE
+100001,202002,100,3.099869876,15.49430894,1.368771264,11.36048394,171.4175824,9529,R,3,3,3,FALSE,FALSE,FALSE
+100001,202003,100,0.064539826,0.173728814,0.4611093,0.266016593,42.61538462,615,R,3,3,3,FALSE,FALSE,FALSE
+100001,202004,100,5.756097561,,6.74787815,1,129.032967,3540,R,3,0,3,FALSE,TRUE,FALSE
+100002,202001,100,,3.337737407,1,1.691693133,179.3296703,8084,R,0,3,3,TRUE,FALSE,FALSE
+100002,202002,100,0.299604156,0.792020929,1.368771264,11.36048394,171.4175824,2422,R,3,3,3,FALSE,FALSE,FALSE
+100002,202003,100,1.262592898,0.545292439,0.4611093,0.266016593,42.61538462,3058,R,3,3,3,FALSE,FALSE,FALSE
+100002,202004,100,1.833878352,,6.74787815,1,129.032967,5608,R,3,0,3,FALSE,TRUE,FALSE
+100003,202001,100,,1.414747807,1,1.691693133,179.3296703,5161,R,0,3,3,TRUE,FALSE,FALSE
+100003,202002,100,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3648,R,3,3,3,FALSE,FALSE,FALSE
+100003,202003,100,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,205,R,3,3,3,FALSE,FALSE,FALSE
+100003,202004,100,12.65365854,,6.74787815,1,129.032967,2594,R,3,0,3,FALSE,TRUE,FALSE
+100004,202001,100,,,1,1.691693133,179.3296703,15422.35165,C,0,3,3,TRUE,FALSE,FALSE
+100004,202002,100,,,1.368771264,11.36048394,171.4175824,21109.67176,FIC,3,3,3,FALSE,FALSE,FALSE
+100004,202003,100,,,0.4611093,0.266016593,42.61538462,11085,MC,3,3,3,FALSE,FALSE,FALSE
+100004,202004,100,,,6.74787815,1,129.032967,74800.22929,FIMC,3,3,3,FALSE,FALSE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_input.csv
new file mode 100644
index 00000000..48661174
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_input.csv
@@ -0,0 +1,13 @@
+identifier,date,group,question,other,manual_construction
+60001,202001,100,5077,15,
+60001,202002,100,7830,15,
+60001,202003,100,1046,15,
+60002,202001,100,1588,71,
+60002,202002,100,1213,71,
+60002,202003,100,3807,71,
+60003,202001,100,6541,26,
+60003,202002,100,336,26,
+60003,202003,100,6351,26,
+60004,202001,100,,3,839
+60004,202002,100,,3,
+60004,202003,100,401,3,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_output.csv
new file mode 100644
index 00000000..b578a366
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_output.csv
@@ -0,0 +1,13 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+60001,202001,100,,0.648403576,1,7.141605449,117.9107143,5077,R,0,3,3,TRUE,FALSE,FALSE
+60001,202002,100,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,FALSE,FALSE,FALSE
+60001,202003,100,0.133588761,,7.391291354,1,100.9130435,1046,R,3,0,4,FALSE,TRUE,FALSE
+60002,202001,100,,1.309150866,1,7.141605449,117.9107143,1588,R,0,3,3,TRUE,FALSE,FALSE
+60002,202002,100,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,FALSE,FALSE,FALSE
+60002,202003,100,3.138499588,,7.391291354,1,100.9130435,3807,R,3,0,4,FALSE,TRUE,FALSE
+60003,202001,100,,19.4672619,1,7.141605449,117.9107143,6541,R,0,3,3,TRUE,FALSE,FALSE
+60003,202002,100,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,336,R,3,3,3,FALSE,FALSE,FALSE
+60003,202003,100,18.90178571,,7.391291354,1,100.9130435,6351,R,3,0,4,FALSE,TRUE,FALSE
+60004,202001,100,,,1,7.141605449,117.9107143,839,MC,0,3,3,TRUE,FALSE,FALSE
+60004,202002,100,,,0.785823852,2.619062766,83.74107143,1050.244169,BI,3,3,3,FALSE,FALSE,FALSE
+60004,202003,100,,,7.391291354,1,100.9130435,401,R,3,0,4,FALSE,TRUE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_input.csv
new file mode 100644
index 00000000..a223caf6
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_input.csv
@@ -0,0 +1,13 @@
+identifier,date,group,question,other,manual_construction
+30001,202001,100,8444,51,
+30001,202002,100,7476,51,
+30001,202003,100,2003,51,
+30002,202001,100,9343,72,
+30002,202002,100,7818,72,
+30002,202003,100,4897,72,
+30003,202001,100,7511,7,
+30003,202002,100,1761,7,
+30003,202003,100,6492,7,
+30004,202001,100,64,81,4321
+30004,202002,100,2113,81,
+30004,202003,100,,81,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_output.csv
new file mode 100644
index 00000000..dfd64c1b
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_output.csv
@@ -0,0 +1,13 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+30001,202001,100,,1.129481006,1,1.655005651,120.1991,8444,R,0,4,4,TRUE,FALSE,FALSE
+30001,202002,100,0.885362387,3.732401398,8.743054929,1.866715325,90.8436,7476,R,4,3,4,FALSE,FALSE,FALSE
+30001,202003,100,0.267924024,,1.526947,1,103.0154,2003,R,3,0,3,FALSE,TRUE,FALSE
+30002,202001,100,,1.195062676,1,1.655006,120.1991,9343,R,0,4,4,TRUE,FALSE,FALSE
+30002,202002,100,0.836776196,1.596487645,8.743054929,1.866715325,90.8436,7818,R,4,3,4,FALSE,FALSE,FALSE
+30002,202003,100,0.626375032,,1.526947,1,103.0154,4897,R,3,0,3,FALSE,TRUE,FALSE
+30003,202001,100,,4.265190233,1,1.655006,120.1991,7511,R,0,4,4,TRUE,FALSE,FALSE
+30003,202002,100,0.234456131,0.271256932,8.743054929,1.866715325,90.8436,1761,R,4,3,4,FALSE,FALSE,FALSE
+30003,202003,100,3.686541738,,1.526947,1,103.0154,6492,R,3,0,3,FALSE,TRUE,FALSE
+30004,202001,100,,0.030288689,1,1.655006,120.1991,64,R,0,4,4,TRUE,FALSE,FALSE
+30004,202002,100,33.015625,,8.743054929,1.866715325,90.8436,2113,R,4,3,4,FALSE,FALSE,FALSE
+30004,202003,100,,,1.526947,1,103.0154,3226.439011,FIR,3,0,3,FALSE,TRUE,FALSE

From bb9bcebd1c9c7b6506bd8ce58eb423464931c8ad Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Wed, 15 May 2024 17:07:54 +0100
Subject: [PATCH 495/531] adjust 5th decimal places in test data

---
 .../001_78_C_FIC_MC_FIMC_8_output.csv         |  6 ++---
 .../001_79_MC_BI_R_9_output.csv               |  8 +++----
 .../001_80_R(MC)_R_FIR_10_output.csv          | 24 +++++++++----------
 3 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_output.csv
index 77730dae..7f344283 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_output.csv
@@ -11,7 +11,7 @@ identifier,date,group,growth_forward,growth_backward,forward,backward,constructi
 100003,202002,100,0.70683976,17.79512195,1.368771264,11.36048394,171.4175824,3648,R,3,3,3,FALSE,FALSE,FALSE
 100003,202003,100,0.056195175,0.079028527,0.4611093,0.266016593,42.61538462,205,R,3,3,3,FALSE,FALSE,FALSE
 100003,202004,100,12.65365854,,6.74787815,1,129.032967,2594,R,3,0,3,FALSE,TRUE,FALSE
-100004,202001,100,,,1,1.691693133,179.3296703,15422.35165,C,0,3,3,TRUE,FALSE,FALSE
-100004,202002,100,,,1.368771264,11.36048394,171.4175824,21109.67176,FIC,3,3,3,FALSE,FALSE,FALSE
+100004,202001,100,,,1,1.691693133,179.3296703,15422.351648,C,0,3,3,TRUE,FALSE,FALSE
+100004,202002,100,,,1.368771264,11.36048394,171.4175824,21109.671762,FIC,3,3,3,FALSE,FALSE,FALSE
 100004,202003,100,,,0.4611093,0.266016593,42.61538462,11085,MC,3,3,3,FALSE,FALSE,FALSE
-100004,202004,100,,,6.74787815,1,129.032967,74800.22929,FIMC,3,3,3,FALSE,FALSE,FALSE
+100004,202004,100,,,6.74787815,1,129.032967,74800.229291,FIMC,3,0,3,FALSE,TRUE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_output.csv
index b578a366..5e7ad585 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
 60001,202001,100,,0.648403576,1,7.141605449,117.9107143,5077,R,0,3,3,TRUE,FALSE,FALSE
 60001,202002,100,1.54224936,7.485659656,0.785823852,2.619062766,83.74107143,7830,R,3,3,3,FALSE,FALSE,FALSE
-60001,202003,100,0.133588761,,7.391291354,1,100.9130435,1046,R,3,0,4,FALSE,TRUE,FALSE
+60001,202003,100,0.133588761,,7.391291354,1,100.9130434,1046,R,3,0,4,FALSE,TRUE,FALSE
 60002,202001,100,,1.309150866,1,7.141605449,117.9107143,1588,R,0,3,3,TRUE,FALSE,FALSE
 60002,202002,100,0.763853904,0.318623588,0.785823852,2.619062766,83.74107143,1213,R,3,3,3,FALSE,FALSE,FALSE
-60002,202003,100,3.138499588,,7.391291354,1,100.9130435,3807,R,3,0,4,FALSE,TRUE,FALSE
+60002,202003,100,3.138499588,,7.391291354,1,100.9130434,3807,R,3,0,4,FALSE,TRUE,FALSE
 60003,202001,100,,19.4672619,1,7.141605449,117.9107143,6541,R,0,3,3,TRUE,FALSE,FALSE
 60003,202002,100,0.051368292,0.052905054,0.785823852,2.619062766,83.74107143,336,R,3,3,3,FALSE,FALSE,FALSE
-60003,202003,100,18.90178571,,7.391291354,1,100.9130435,6351,R,3,0,4,FALSE,TRUE,FALSE
+60003,202003,100,18.90178571,,7.391291354,1,100.9130434,6351,R,3,0,4,FALSE,TRUE,FALSE
 60004,202001,100,,,1,7.141605449,117.9107143,839,MC,0,3,3,TRUE,FALSE,FALSE
 60004,202002,100,,,0.785823852,2.619062766,83.74107143,1050.244169,BI,3,3,3,FALSE,FALSE,FALSE
-60004,202003,100,,,7.391291354,1,100.9130435,401,R,3,0,4,FALSE,TRUE,FALSE
+60004,202003,100,,,7.391291354,1,100.9130434,401,R,3,0,4,FALSE,TRUE,FALSE
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_output.csv
index dfd64c1b..9682dcab 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_output.csv
@@ -1,13 +1,13 @@
 identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
-30001,202001,100,,1.129481006,1,1.655005651,120.1991,8444,R,0,4,4,TRUE,FALSE,FALSE
-30001,202002,100,0.885362387,3.732401398,8.743054929,1.866715325,90.8436,7476,R,4,3,4,FALSE,FALSE,FALSE
-30001,202003,100,0.267924024,,1.526947,1,103.0154,2003,R,3,0,3,FALSE,TRUE,FALSE
-30002,202001,100,,1.195062676,1,1.655006,120.1991,9343,R,0,4,4,TRUE,FALSE,FALSE
-30002,202002,100,0.836776196,1.596487645,8.743054929,1.866715325,90.8436,7818,R,4,3,4,FALSE,FALSE,FALSE
-30002,202003,100,0.626375032,,1.526947,1,103.0154,4897,R,3,0,3,FALSE,TRUE,FALSE
-30003,202001,100,,4.265190233,1,1.655006,120.1991,7511,R,0,4,4,TRUE,FALSE,FALSE
-30003,202002,100,0.234456131,0.271256932,8.743054929,1.866715325,90.8436,1761,R,4,3,4,FALSE,FALSE,FALSE
-30003,202003,100,3.686541738,,1.526947,1,103.0154,6492,R,3,0,3,FALSE,TRUE,FALSE
-30004,202001,100,,0.030288689,1,1.655006,120.1991,64,R,0,4,4,TRUE,FALSE,FALSE
-30004,202002,100,33.015625,,8.743054929,1.866715325,90.8436,2113,R,4,3,4,FALSE,FALSE,FALSE
-30004,202003,100,,,1.526947,1,103.0154,3226.439011,FIR,3,0,3,FALSE,TRUE,FALSE
+30001,202001,100,,1.129481006,1,1.655005651,120.199052,8444,R,0,4,4,TRUE,FALSE,FALSE
+30001,202002,100,0.885362387,3.732401398,8.743054929,1.866715325,90.843602,7476,R,4,3,4,FALSE,FALSE,FALSE
+30001,202003,100,0.267924024,,1.526947,1,103.015385,2003,R,3,0,3,FALSE,TRUE,FALSE
+30002,202001,100,,1.195062676,1,1.655006,120.199052,9343,R,0,4,4,TRUE,FALSE,FALSE
+30002,202002,100,0.836776196,1.596487645,8.743054929,1.866715325,90.843602,7818,R,4,3,4,FALSE,FALSE,FALSE
+30002,202003,100,0.626375032,,1.526947,1,103.015385,4897,R,3,0,3,FALSE,TRUE,FALSE
+30003,202001,100,,4.265190233,1,1.655006,120.199052,7511,R,0,4,4,TRUE,FALSE,FALSE
+30003,202002,100,0.234456131,0.271256932,8.743054929,1.866715325,90.843602,1761,R,4,3,4,FALSE,FALSE,FALSE
+30003,202003,100,3.686541738,,1.526947,1,103.015385,6492,R,3,0,3,FALSE,TRUE,FALSE
+30004,202001,100,,0.030288689,1,1.655006,120.199052,64,R,0,4,4,TRUE,FALSE,FALSE
+30004,202002,100,33.015625,,8.743054929,1.866715325,90.843602,2113,R,4,3,4,FALSE,FALSE,FALSE
+30004,202003,100,,,1.526946931056,1,103.015385,3226.438865,FIR,3,0,3,FALSE,TRUE,FALSE

From 1df0fc6456a393ed622ff518068c4271180c96d7 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Wed, 15 May 2024 17:27:02 +0100
Subject: [PATCH 496/531] remove unnecessary todo

---
 statistical_methods_library/imputation/engine.py | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 36dcdb49..ca6cef11 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -320,7 +320,6 @@ def impute(
     prior_period_df = prepared_df.selectExpr(
         "min(previous_period) AS prior_period"
     ).localCheckpoint(eager=False)
-    # TODO Remove manual construction record from data before the rotio calculation.
     # print("test1111 input_df.columns")
     # print(str(input_df.columns))
     # prepared_df.show(100)
@@ -345,11 +344,6 @@ def impute(
         # print("only_mc_data")
         # only_mc_data.show(100)
         # df_with_mc_data.show(100)
-        # TODO Additionally, after MC data is entered,
-        # filter out the immediate missing responses.
-        # may 13
-        # remove consecutive missing response after a MC
-        # TODO unCOMMENT
         prepared_df = df_with_mc_data.filter(
             col("marker").isNull()
             | (
@@ -376,7 +370,7 @@ def impute(
             )
             .join(
                 prior_period_df, [col("period") == col("prior_period")]
-            )  # TODO check what is the impact to miss the mc column in prior_period_df
+            )
             .drop("prior_period")
             .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
             .withColumn(
@@ -403,7 +397,7 @@ def impute(
                 )
                 .join(
                     prior_period_df, [col("period") == col("prior_period")]
-                )  # TODO chek impact to miss the mccolumn in prior_period_df
+                )
                 .drop("prior_period")
                 .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
                 .withColumn(
@@ -429,8 +423,6 @@ def impute(
             back_data_mc.show(1)
             # print("back_data_mc")
             # back_data_mc.show(100)
-            # TODO Additionally, after MC data is entered,
-            # filter out the immediate missing responses.
             back_data_period_df = back_data_period_df.filter(
                 ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
                 | ~(
@@ -890,7 +882,7 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         df = stage(df).localCheckpoint(eager=False)
         # print(f"after imputation stage: {stage}")
         # df.show(1)
-        # TODO move thid code after the rotio calculation.
+        # TODO CHECK can we move thid code after the rotio calculation. ??
         # So dont need to do multiple times.
         if manual_construction_col in input_df.columns and stage == backward_impute:
             # print("after backward_impute add the mc only data")

From 62d97d88984cf7676a640a73be4af00801e1ce8f Mon Sep 17 00:00:00 2001
From: ZabirAbu <zabir.abu02@gmail.com>
Date: Thu, 16 May 2024 17:50:12 +0100
Subject: [PATCH 497/531] wip MC added input data, updated engine file

---
 .../imputation/engine.py                      | 101 ++++++++----------
 .../engine/unit/back_data_with_MC.csv         |   2 +
 .../imputation/engine/unit/temp_MC_input.csv  |   2 +
 tests/imputation/test_engine.py               |  39 ++++++-
 4 files changed, 86 insertions(+), 58 deletions(-)
 create mode 100644 tests/fixture_data/imputation/engine/unit/back_data_with_MC.csv
 create mode 100644 tests/fixture_data/imputation/engine/unit/temp_MC_input.csv

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index ca6cef11..a537358a 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -195,7 +195,7 @@ def impute(
     link_cols = [forward_link_col, backward_link_col]
     if any(link_cols) and not all(link_cols):
         raise TypeError("Either all or no link columns must be specified")
-    # input_df.show(100)
+    input_df.show(100)
     input_params = {
         "ref": reference_col,
         "period": period_col,
@@ -249,8 +249,8 @@ def impute(
     if back_data_df:
         if not isinstance(back_data_df, DataFrame):
             raise TypeError("Input is not a DataFrame")
-        if manual_construction_col in back_data_df.columns:
-            back_input_params["manual_const"] = manual_construction_col
+        # if manual_construction_col in back_data_df.columns:
+        #     back_input_params["manual_const"] = manual_construction_col
 
     if weight is not None:
         if not isinstance(weight, Decimal):
@@ -368,9 +368,7 @@ def impute(
             validated_back_data_df.select(
                 "ref", "period", "grouping", "output", "marker"
             )
-            .join(
-                prior_period_df, [col("period") == col("prior_period")]
-            )
+            .join(prior_period_df, [col("period") == col("prior_period")])
             .drop("prior_period")
             .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
             .withColumn(
@@ -383,55 +381,30 @@ def impute(
             .localCheckpoint(eager=False)
         )
 
-        if back_data_df and manual_construction_col in back_data_period_df.columns:
-            validated_back_data_df = validate_dataframe(
-                back_data_df,
-                back_input_params,
-                type_mapping,
-                ["ref", "period", "grouping"],
-                ["manual_const"],
-            ).localCheckpoint(eager=False)
-            back_data_period_df = (
-                validated_back_data_df.select(
-                    "ref", "period", "grouping", "output", "marker", "manual_const"
-                )
-                .join(
-                    prior_period_df, [col("period") == col("prior_period")]
-                )
-                .drop("prior_period")
-                .filter(((col(marker_col) != lit(Marker.BACKWARD_IMPUTE.value))))
-                .withColumn(
-                    "previous_period",
-                    calculate_previous_period(col("period"), periodicity),
-                )
-                .withColumn(
-                    "next_period", calculate_next_period(col("period"), periodicity)
-                )
-                .localCheckpoint(eager=False)
-            )
-        # Remove manual construction record from back data before the rotio calculation.
-        if (
-            manual_construction_col in back_data_period_df.columns
-        ):  # TODO check is it needed ?!
-            back_data_mc = back_data_period_df.filter(
-                (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
-                | (
-                    col("marker")
-                    == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
-                )
-            )
-            back_data_mc.show(1)
-            # print("back_data_mc")
-            # back_data_mc.show(100)
-            back_data_period_df = back_data_period_df.filter(
-                ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
-                | ~(
-                    col("marker")
-                    == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
-                )
-            )
-            # print("back_data_period_df_without_mc_fimc :: ")
-            # back_data_period_df.show()
+        # TODO Remove manual construction record from back data
+        # before the rotio calculation.
+        # if (
+        #     manual_construction_col in back_data_period_df.columns
+        # ):  # TODO check is it needed ?!
+        #     back_data_mc = back_data_period_df.filter(
+        #         (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
+        #         | (
+        #             col("marker")
+        #             == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
+        #         )
+        #     )
+        #     back_data_mc.show(1)
+        #     # print("back_data_mc")
+        #     # back_data_mc.show(100)
+        #     back_data_period_df = back_data_period_df.filter(
+        #         ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
+        #         | ~(
+        #             col("marker")
+        #             == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
+        #         )
+        #     )
+        # print("back_data_period_df_without_mc_fimc :: ")
+        # back_data_period_df.show()
 
         prepared_df = prepared_df.unionByName(
             back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)),
@@ -791,6 +764,19 @@ def forward_impute_from_manualconstruction(df: DataFrame) -> DataFrame:
         nonlocal null_response_df
         imputed_df = None
         null_response_df = None
+
+        df = df.unionByName(
+            back_data_period_df.filter(
+                (col("marker") == lit(Marker.MANUAL_CONSTRUCTION.value))
+                | (
+                    col("marker")
+                    == lit(Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value)
+                )
+            ),
+            allowMissingColumns=True,
+        )
+        df.show()
+
         return impute_helper(
             df, "forward", Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION, True
         )
@@ -884,6 +870,8 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         # df.show(1)
         # TODO CHECK can we move thid code after the rotio calculation. ??
         # So dont need to do multiple times.
+        input_df.show()
+        print(f"*****this is the column {manual_construction_col}****")
         if manual_construction_col in input_df.columns and stage == backward_impute:
             # print("after backward_impute add the mc only data")
             # only_mc_data.show(100)
@@ -918,7 +906,8 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
             df = df.unionByName(only_mc_data, allowMissingColumns=True)
             # print("Merged mc only data")
             # df.show(100)
-
+        print(f"**********{stage}***********")
+        df.show()
         if df.filter(col("output").isNull()).count() == 0 and stage == construct_values:
             break
 
diff --git a/tests/fixture_data/imputation/engine/unit/back_data_with_MC.csv b/tests/fixture_data/imputation/engine/unit/back_data_with_MC.csv
new file mode 100644
index 00000000..2ebf01ee
--- /dev/null
+++ b/tests/fixture_data/imputation/engine/unit/back_data_with_MC.csv
@@ -0,0 +1,2 @@
+identifier,date,group,output,other,backward,forward,construction,marker
+1234,"202104","9000",10,2,1,1,1,MC
diff --git a/tests/fixture_data/imputation/engine/unit/temp_MC_input.csv b/tests/fixture_data/imputation/engine/unit/temp_MC_input.csv
new file mode 100644
index 00000000..a9a514c1
--- /dev/null
+++ b/tests/fixture_data/imputation/engine/unit/temp_MC_input.csv
@@ -0,0 +1,2 @@
+identifier,date,group,question,other,manual_construction
+1234,"202105","9000",,78,
diff --git a/tests/imputation/test_engine.py b/tests/imputation/test_engine.py
index fa0c20b8..e6ae6027 100644
--- a/tests/imputation/test_engine.py
+++ b/tests/imputation/test_engine.py
@@ -1,5 +1,5 @@
 import pytest
-from pyspark.sql.functions import lit
+from pyspark.sql.functions import lit, col
 from pyspark.sql.types import DecimalType, LongType, StringType
 
 from statistical_methods_library.imputation import impute, ratio_of_means
@@ -18,6 +18,7 @@
 count_forward_col = "count_forward"
 count_backward_col = "count_backward"
 count_construction_col = "count_construction"
+manual_construction_col = "manual_construction"
 
 decimal_type = DecimalType(15, 6)
 
@@ -34,6 +35,7 @@
 count_forward_type = LongType()
 count_backward_type = LongType()
 count_construction_type = LongType()
+manual_construction_type = decimal_type
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -51,6 +53,7 @@
     count_forward_col,
     count_backward_col,
     count_construction_col,
+    manual_construction_col,
 )
 
 dataframe_types = {
@@ -67,6 +70,7 @@
     count_forward_col: count_forward_type,
     count_backward_col: count_backward_type,
     count_construction_col: count_construction_type,
+    manual_construction_col: manual_construction_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()
@@ -336,9 +340,12 @@ def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_ses
         "unit",
         "back_data_with_link_cols",
     )
+    test_dataframe.show()
+    print("*******show diff*******")
+    back_data.show()
 
     ret_val = impute(input_df=test_dataframe, **params, back_data_df=back_data)
-
+    ret_val.show()
     assert ret_val.count() == 1
 
 
@@ -407,3 +414,31 @@ def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
 
     with pytest.raises(ValidationError):
         impute(input_df=test_dataframe, **params)
+
+
+def test_back_data_fimc(fxt_load_test_csv, fxt_spark_session):
+    test_dataframe = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "engine",
+        "unit",
+        "temp_MC_input",
+    )
+
+    back_data = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "engine",
+        "unit",
+        "back_data_with_MC",
+    )
+    test_dataframe.show()
+    print("*******show diff*******")
+    back_data.show()
+
+    ret_val = impute(input_df=test_dataframe, **params, back_data_df=back_data)
+    ret_val.show()
+    ret_val.select(col("marker")).show()
+    assert ret_val.count() == 1

From 1ca8b3b2200b9a557d016dae7c03e5380369ef8c Mon Sep 17 00:00:00 2001
From: ZabirAbu <zabir.abu02@gmail.com>
Date: Fri, 17 May 2024 09:47:17 +0100
Subject: [PATCH 498/531] removed unused code

---
 .../imputation/engine.py                      | 25 -------------------
 1 file changed, 25 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index a537358a..f1ae369f 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -381,31 +381,6 @@ def impute(
             .localCheckpoint(eager=False)
         )
 
-        # TODO Remove manual construction record from back data
-        # before the rotio calculation.
-        # if (
-        #     manual_construction_col in back_data_period_df.columns
-        # ):  # TODO check is it needed ?!
-        #     back_data_mc = back_data_period_df.filter(
-        #         (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
-        #         | (
-        #             col("marker")
-        #             == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
-        #         )
-        #     )
-        #     back_data_mc.show(1)
-        #     # print("back_data_mc")
-        #     # back_data_mc.show(100)
-        #     back_data_period_df = back_data_period_df.filter(
-        #         ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
-        #         | ~(
-        #             col("marker")
-        #             == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
-        #         )
-        #     )
-        # print("back_data_period_df_without_mc_fimc :: ")
-        # back_data_period_df.show()
-
         prepared_df = prepared_df.unionByName(
             back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)),
             allowMissingColumns=True,

From 3fcd95c9db1e9095fdffb715e586edb95630800d Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Fri, 17 May 2024 17:52:34 +0100
Subject: [PATCH 499/531] refactored manual construction chnage

---
 .../imputation/engine.py                      | 187 ++++++++----------
 .../engine/unit/back_data_with_MC.csv         |   2 -
 .../engine/unit/manual_construction_input.csv |   5 +
 .../unit/manual_construction_output.csv       |   5 +
 .../imputation/engine/unit/temp_MC_input.csv  |   2 -
 tests/imputation/test_engine.py               |  59 ++++--
 tests/imputation/test_scenarios.py            |  14 --
 7 files changed, 132 insertions(+), 142 deletions(-)
 delete mode 100644 tests/fixture_data/imputation/engine/unit/back_data_with_MC.csv
 create mode 100644 tests/fixture_data/imputation/engine/unit/manual_construction_input.csv
 create mode 100644 tests/fixture_data/imputation/engine/unit/manual_construction_output.csv
 delete mode 100644 tests/fixture_data/imputation/engine/unit/temp_MC_input.csv

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index f1ae369f..fda960a1 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -84,7 +84,7 @@ def impute(
     unweighted_forward_link_col: Optional[str] = "forward_unweighted",
     unweighted_backward_link_col: Optional[str] = "backward_unweighted",
     unweighted_construction_link_col: Optional[str] = "construction_unweighted",
-    manual_construction_col: Optional[str] = "manual_construction",
+    manual_construction_col: Optional[str] = None,
     **ratio_calculator_params,
 ) -> DataFrame:
     """
@@ -195,7 +195,6 @@ def impute(
     link_cols = [forward_link_col, backward_link_col]
     if any(link_cols) and not all(link_cols):
         raise TypeError("Either all or no link columns must be specified")
-    input_df.show(100)
     input_params = {
         "ref": reference_col,
         "period": period_col,
@@ -240,17 +239,14 @@ def impute(
         "output": output_col,
         "marker": marker_col,
     }
-    # input_df.show(100)
-    # TODO CHECK in impuation wrapper the same column name
-    # is avaliable in back data df as well ?!
-    if manual_construction_col in input_df.columns:
+    apply_manual_construction = False
+    if manual_construction_col and manual_construction_col in input_df.columns:
         input_params["manual_const"] = manual_construction_col
+        apply_manual_construction = True
 
     if back_data_df:
         if not isinstance(back_data_df, DataFrame):
             raise TypeError("Input is not a DataFrame")
-        # if manual_construction_col in back_data_df.columns:
-        #     back_input_params["manual_const"] = manual_construction_col
 
     if weight is not None:
         if not isinstance(weight, Decimal):
@@ -320,10 +316,9 @@ def impute(
     prior_period_df = prepared_df.selectExpr(
         "min(previous_period) AS prior_period"
     ).localCheckpoint(eager=False)
-    # print("test1111 input_df.columns")
-    # print(str(input_df.columns))
-    # prepared_df.show(100)
-    if manual_construction_col in input_df.columns:  # TODO check is it needed ?!
+    if apply_manual_construction:
+        # Set manual construction value as output
+        # and set marker as MC
         df_with_mc_data = prepared_df.withColumn(
             "marker",
             when(
@@ -337,13 +332,13 @@ def impute(
                 col("manual_const"),
             ).otherwise(col("output")),
         )
-        only_mc_data = df_with_mc_data.filter(
+        manual_construction_data = df_with_mc_data.filter(
             (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
             | (col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value)
         )
-        # print("only_mc_data")
-        # only_mc_data.show(100)
-        # df_with_mc_data.show(100)
+        #  Filter out the MC and FIMC data so
+        #  it will be not inculded in the link calculations
+
         prepared_df = df_with_mc_data.filter(
             col("marker").isNull()
             | (
@@ -354,12 +349,7 @@ def impute(
                 )
             )
         )
-        # print("prepared_df_without_mc_fimc :: ")
-        # prepared_df.show()
-        # ["ref", "period", "grouping"]
-        # mc_df2.show(100)
 
-    # TODO refactor do with one select
     if back_data_df:
         validated_back_data_df = validate_dataframe(
             back_data_df, back_input_params, type_mapping, ["ref", "period", "grouping"]
@@ -385,8 +375,6 @@ def impute(
             back_data_period_df.filter(col("marker") == lit(Marker.RESPONSE.value)),
             allowMissingColumns=True,
         )
-    # print("before calculate_ratios :: ")
-    # prepared_df.show(100)
 
     def calculate_ratios():
         # This allows us to return early if we have nothing to do
@@ -593,12 +581,56 @@ def calculate_weighted_link(link_name):
             )
 
     calculate_ratios()
+    if apply_manual_construction:
+        # populate link, count, default information
+        # for manual_construction data
+        manual_construction_data = (
+            manual_construction_data.alias("mc")
+            .join(prepared_df, ["period", "grouping"], "leftouter")
+            .select(
+                "mc.ref",
+                "mc.period",
+                "mc.grouping",
+                "mc.aux",
+                "mc.manual_const",
+                "mc.previous_period",
+                "mc.next_period",
+                "mc.output",
+                "mc.marker",
+                when(col("forward").isNull(), lit(1).cast("long"))
+                .otherwise(col("forward"))
+                .alias("forward"),
+                when(col("backward").isNull(), lit(1).cast("long"))
+                .otherwise(col("backward"))
+                .alias("backward"),
+                when(col("construction").isNull(), lit(1).cast("long"))
+                .otherwise(col("construction"))
+                .alias("construction"),
+                when(col("count_forward").isNull(), lit(0).cast("int"))
+                .otherwise(col("count_forward"))
+                .alias("count_forward"),
+                when(col("count_backward").isNull(), lit(0).cast("int"))
+                .otherwise(col("count_backward"))
+                .alias("count_backward"),
+                when(col("count_construction").isNull(), lit(0).cast("int"))
+                .otherwise(col("count_construction"))
+                .alias("count_construction"),
+                when(col("default_forward").isNull(), lit(True))
+                .otherwise(col("default_forward"))
+                .alias("default_forward"),
+                when(col("default_backward").isNull(), lit(True))
+                .otherwise(col("default_backward"))
+                .alias("default_backward"),
+                when(col("default_construction").isNull(), lit(True))
+                .otherwise(col("default_construction"))
+                .alias("default_construction"),
+            )
+            .distinct()
+        )
 
     # Caching for both imputed and unimputed data.
     imputed_df = None
     null_response_df = None
-    # print("After calculate_ratios :: ")
-    # prepared_df.show(100)
 
     # --- Impute helper ---
     def impute_helper(
@@ -606,12 +638,6 @@ def impute_helper(
     ) -> DataFrame:
         nonlocal imputed_df
         nonlocal null_response_df
-        # print("inside impute_helper")
-        # print(f"inside impute_helper :: {marker.value}")
-        # print("imputation helper :: df :: ")
-        # if imputed_df is None:
-        #     print("imputation helper :: imputed_df is None :: ")
-        # df.show(100)
         if direction:
             # Forward imputation
             other_period_col = "previous_period"
@@ -631,8 +657,6 @@ def impute_helper(
                 "forward",
                 "backward",
             )
-            # print("imputation helper :: working_df :: ")
-            # working_df.show(100)
             # Anything which isn't null is already imputed or a response and thus
             # can be imputed from. Note that in the case of backward imputation
             # this still holds since it always happens after forward imputation
@@ -642,21 +666,16 @@ def impute_helper(
             imputed_df = working_df.filter(~col("output").isNull()).localCheckpoint(
                 eager=True
             )
-            # print("imputation helper :: imputed_df :: ")
-            # imputed_df.show(100)
             # Any ref and grouping combos which have no values at all can't be
             # imputed from so we don't care about them here.
             ref_df = imputed_df.select("ref", "grouping").distinct()
-            # print("imputation helper :: ref_df :: ")
-            # ref_df.show(100)
             null_response_df = (
                 working_df.filter(col("output").isNull())
                 .drop("output", "marker")
                 .join(ref_df, ["ref", "grouping"])
                 .localCheckpoint(eager=True)
             )
-        # print("imputation helper :: null_response_df :: ")
-        # null_response_df.show(100)
+
         while True:
             other_df = imputed_df.selectExpr(
                 "ref AS other_ref",
@@ -686,8 +705,6 @@ def impute_helper(
                 )
                 .localCheckpoint(eager=False)
             )
-            # print("imputation helper :: calculation_df :: ")
-            # calculation_df.show(100)
             # If we've imputed nothing then we've got as far as we can get for
             # this phase.
             if calculation_df.count() == 0:
@@ -696,23 +713,15 @@ def impute_helper(
             # Store this set of imputed values in our main set for the next
             # iteration. Use eager checkpoints to help prevent rdd DAG explosion.
             imputed_df = imputed_df.union(calculation_df).localCheckpoint(eager=True)
-            # print("imputation helper :: imputed_df :: after union ")
-            # imputed_df.show(100)
             # Remove the newly imputed rows from our filtered set.
             null_response_df = null_response_df.join(
                 calculation_df.select("ref", "period", "grouping"),
                 ["ref", "period", "grouping"],
                 "leftanti",
             ).localCheckpoint(eager=True)
-            # print("imputation helper :: null_response_df :: after join ")
-            # null_response_df.show(100)
         # We should now have an output column which is as fully populated as
         # this phase of imputation can manage. As such replace the existing
         # output column with our one. Same goes for the marker column.
-        # print("imputation helper :: df :: before return ")
-        # df.show(100)
-        # print("imputation helper :: imputed_df :: before return ")
-        # imputed_df.show(100)
         return df.drop("output", "marker").join(
             imputed_df.select("ref", "period", "grouping", "output", "marker"),
             ["ref", "period", "grouping"],
@@ -734,23 +743,24 @@ def forward_impute_from_response(df: DataFrame) -> DataFrame:
     def backward_impute(df: DataFrame) -> DataFrame:
         return impute_helper(df, "backward", Marker.BACKWARD_IMPUTE, False)
 
-    def forward_impute_from_manualconstruction(df: DataFrame) -> DataFrame:
+    # --- Forward impute from manual construction ---
+    def forward_impute_from_manual_construction(df: DataFrame) -> DataFrame:
         nonlocal imputed_df
         nonlocal null_response_df
         imputed_df = None
         null_response_df = None
-
-        df = df.unionByName(
-            back_data_period_df.filter(
-                (col("marker") == lit(Marker.MANUAL_CONSTRUCTION.value))
-                | (
-                    col("marker")
-                    == lit(Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value)
-                )
-            ),
-            allowMissingColumns=True,
-        )
-        df.show()
+        if back_data_df:
+            # Add the MC and FIMC from the back data
+            df = df.unionByName(
+                back_data_period_df.filter(
+                    (col("marker") == lit(Marker.MANUAL_CONSTRUCTION.value))
+                    | (
+                        col("marker")
+                        == lit(Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value)
+                    )
+                ),
+                allowMissingColumns=True,
+            )
 
         return impute_helper(
             df, "forward", Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION, True
@@ -828,61 +838,18 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
     for stage in (
         forward_impute_from_response,
         backward_impute,
-        forward_impute_from_manualconstruction,
+        forward_impute_from_manual_construction,
         construct_values,
         forward_impute_from_construction,
     ):
-        # print(f"imputation stage: {stage}")
-        # df.show(100)
         if (
-            manual_construction_col not in input_df.columns
-            and stage == forward_impute_from_manualconstruction
+            apply_manual_construction
+            and stage == forward_impute_from_manual_construction
         ):
-            continue
+            # Add the mc data
+            df = df.unionByName(manual_construction_data, allowMissingColumns=True)
 
         df = stage(df).localCheckpoint(eager=False)
-        # print(f"after imputation stage: {stage}")
-        # df.show(1)
-        # TODO CHECK can we move thid code after the rotio calculation. ??
-        # So dont need to do multiple times.
-        input_df.show()
-        print(f"*****this is the column {manual_construction_col}****")
-        if manual_construction_col in input_df.columns and stage == backward_impute:
-            # print("after backward_impute add the mc only data")
-            # only_mc_data.show(100)
-            # TODO CHECK default inner join is good enough or not ?
-            only_mc_data = (
-                only_mc_data.alias("mc")
-                .join(df, ["period", "grouping"])
-                .select(
-                    "mc.ref",
-                    "mc.period",
-                    "mc.grouping",
-                    "mc.aux",
-                    "mc.manual_const",
-                    "mc.previous_period",
-                    "mc.next_period",
-                    "forward",
-                    "backward",
-                    "count_forward",
-                    "count_backward",
-                    "default_forward",
-                    "default_backward",
-                    "construction",
-                    "count_construction",
-                    "default_construction",
-                    "mc.output",
-                    "mc.marker",
-                )
-                .distinct()
-            )
-            # print("test try to get the links")
-            # only_mc_data.show(100)
-            df = df.unionByName(only_mc_data, allowMissingColumns=True)
-            # print("Merged mc only data")
-            # df.show(100)
-        print(f"**********{stage}***********")
-        df.show()
         if df.filter(col("output").isNull()).count() == 0 and stage == construct_values:
             break
 
diff --git a/tests/fixture_data/imputation/engine/unit/back_data_with_MC.csv b/tests/fixture_data/imputation/engine/unit/back_data_with_MC.csv
deleted file mode 100644
index 2ebf01ee..00000000
--- a/tests/fixture_data/imputation/engine/unit/back_data_with_MC.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-identifier,date,group,output,other,backward,forward,construction,marker
-1234,"202104","9000",10,2,1,1,1,MC
diff --git a/tests/fixture_data/imputation/engine/unit/manual_construction_input.csv b/tests/fixture_data/imputation/engine/unit/manual_construction_input.csv
new file mode 100644
index 00000000..f66589d0
--- /dev/null
+++ b/tests/fixture_data/imputation/engine/unit/manual_construction_input.csv
@@ -0,0 +1,5 @@
+identifier,date,group,question,other,manual_construction
+1234,"202105",900,,78,
+1235,"202105",100,,81,
+1236,"202105",100,2113,81,
+1237,"202105",200,,81,3189
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/engine/unit/manual_construction_output.csv b/tests/fixture_data/imputation/engine/unit/manual_construction_output.csv
new file mode 100644
index 00000000..e10386cc
--- /dev/null
+++ b/tests/fixture_data/imputation/engine/unit/manual_construction_output.csv
@@ -0,0 +1,5 @@
+identifier,date,group,output,marker,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+1234,202105,900,10,FIMC,1,1,1,0,0,0,true,true,true
+1235,202105,100,20,FIMC,1,1,26.08641975,0,0,1,true,true,false
+1236,202105,100,2113,R,1,1,26.08641975,0,0,1,true,true,false
+1237,202105,200,3189,MC,1,1,1,0,0,0,true,true,true
\ No newline at end of file
diff --git a/tests/fixture_data/imputation/engine/unit/temp_MC_input.csv b/tests/fixture_data/imputation/engine/unit/temp_MC_input.csv
deleted file mode 100644
index a9a514c1..00000000
--- a/tests/fixture_data/imputation/engine/unit/temp_MC_input.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-identifier,date,group,question,other,manual_construction
-1234,"202105","9000",,78,
diff --git a/tests/imputation/test_engine.py b/tests/imputation/test_engine.py
index e6ae6027..40b4e074 100644
--- a/tests/imputation/test_engine.py
+++ b/tests/imputation/test_engine.py
@@ -1,9 +1,10 @@
 import pytest
 from pyspark.sql.functions import lit, col
-from pyspark.sql.types import DecimalType, LongType, StringType
+from pyspark.sql.types import DecimalType, LongType, StringType, BooleanType
 
 from statistical_methods_library.imputation import impute, ratio_of_means
 from statistical_methods_library.utilities.exceptions import ValidationError
+from tests.helpers import check_df_equality
 
 auxiliary_col = "other"
 backward_col = "backward"
@@ -19,6 +20,9 @@
 count_backward_col = "count_backward"
 count_construction_col = "count_construction"
 manual_construction_col = "manual_construction"
+default_forward_col = "default_forward"
+default_backward_col = "default_backward"
+default_construction_col = "default_construction"
 
 decimal_type = DecimalType(15, 6)
 
@@ -36,6 +40,9 @@
 count_backward_type = LongType()
 count_construction_type = LongType()
 manual_construction_type = decimal_type
+default_forward_type = BooleanType()
+default_backward_type = BooleanType()
+default_construction_type = BooleanType()
 
 # Columns we expect in either our input or output test dataframes and their
 # respective types
@@ -54,6 +61,9 @@
     count_backward_col,
     count_construction_col,
     manual_construction_col,
+    default_forward_col,
+    default_backward_col,
+    default_construction_col,
 )
 
 dataframe_types = {
@@ -71,6 +81,9 @@
     count_backward_col: count_backward_type,
     count_construction_col: count_construction_type,
     manual_construction_col: manual_construction_type,
+    default_forward_col: default_forward_type,
+    default_backward_col: default_backward_type,
+    default_construction_col: default_construction_type,
 }
 
 bad_dataframe_types = dataframe_types.copy()
@@ -340,12 +353,8 @@ def test_back_data_drops_link_cols_when_present(fxt_load_test_csv, fxt_spark_ses
         "unit",
         "back_data_with_link_cols",
     )
-    test_dataframe.show()
-    print("*******show diff*******")
-    back_data.show()
 
     ret_val = impute(input_df=test_dataframe, **params, back_data_df=back_data)
-    ret_val.show()
     assert ret_val.count() == 1
 
 
@@ -423,7 +432,7 @@ def test_back_data_fimc(fxt_load_test_csv, fxt_spark_session):
         "imputation",
         "engine",
         "unit",
-        "temp_MC_input",
+        "manual_construction_input",
     )
 
     back_data = fxt_load_test_csv(
@@ -432,13 +441,35 @@ def test_back_data_fimc(fxt_load_test_csv, fxt_spark_session):
         "imputation",
         "engine",
         "unit",
-        "back_data_with_MC",
+        "manual_construction_back_data",
     )
-    test_dataframe.show()
-    print("*******show diff*******")
-    back_data.show()
 
-    ret_val = impute(input_df=test_dataframe, **params, back_data_df=back_data)
-    ret_val.show()
-    ret_val.select(col("marker")).show()
-    assert ret_val.count() == 1
+    expected_data = fxt_load_test_csv(
+        dataframe_columns,
+        dataframe_types,
+        "imputation",
+        "engine",
+        "unit",
+        "manual_construction_output",
+    )
+    params.update({"manual_construction_col": manual_construction_col})
+
+    scenario_actual_output = impute(
+        input_df=test_dataframe, **params, back_data_df=back_data
+    )
+    for field_name, field_type in scenario_actual_output.dtypes:
+        if field_type.startswith("decimal"):
+            scenario_actual_output = scenario_actual_output.withColumn(
+                field_name, col(field_name).cast("decimal(15, 6)")
+            )
+
+    sort_cols = [
+        params["reference_col"],
+        params["period_col"],
+        params["grouping_col"],
+    ]
+    check_df_equality(
+        actual=scenario_actual_output.sort(sort_cols),
+        expected=expected_data.sort(sort_cols),
+        keep_cols=sort_cols,
+    )
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index c14727a6..3470ef5f 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -57,8 +57,6 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
 
     scenarios = test_config.pop("scenarios", {})
     scenario_config = scenarios.get(scenario, {})
-    # print("test1111 scenario_config")
-    # print(scenario_config)
     fields = default_config["field_names"]
     fields.update(test_config.get("field_names", {}))
     fields.update(scenario_config.pop("field_names", {}))
@@ -66,8 +64,6 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     excluded_fields.extend(test_config.get("excluded_fields", []))
     excluded_fields.extend(scenario_config.pop("excluded_fields", []))
     imputation_kwargs = fields.copy()
-    # print("test1111 fields")
-    # print(fields)
     imputation_kwargs["forward_backward_ratio_calculator"] = getattr(
         imputation, ratio_calculator
     )
@@ -82,11 +78,7 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     field_types = default_config["field_types"]
     field_types.update(test_config.get("field_types", {}))
     field_types.update(scenario_config.get("field_types", {}))
-    # print("test1111 field_types")
-    # print(field_types)
     imputation_kwargs.update(scenario_config)
-    # print("test1111 imputation_kwargs")
-    # print(imputation_kwargs)
     types = {fields[k]: v for k, v in field_types.items()}
     scenario_file_type = scenario_type.replace("back_data_", "")
     scenario_input = fxt_load_test_csv(
@@ -120,9 +112,6 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     scenario_expected_output = scenario_expected_output.filter(
         col(fields["period_col"]) >= starting_period
     )
-    # scenario_input.show(100)
-    # print("test2222 imputation_kwargs")
-    # print(imputation_kwargs)
     scenario_actual_output = imputation.impute(
         input_df=scenario_input, **imputation_kwargs
     )
@@ -131,14 +120,11 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
             scenario_actual_output = scenario_actual_output.withColumn(
                 field_name, col(field_name).cast("decimal(15, 6)")
             )
-    # print("test33333 scenario_actual_output")
-    # scenario_actual_output.orderBy("identifier", "date").show(100)
     sort_cols = [
         fields["reference_col"],
         fields["period_col"],
         fields["grouping_col"],
     ]
-    # if scenario != "001_71_MC_R_MC_1":
     check_df_equality(
         actual=scenario_actual_output.sort(sort_cols),
         expected=scenario_expected_output.sort(sort_cols),

From 6f425c90dcdc50c5e649f9880c8aeae0a05a5eb0 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Fri, 17 May 2024 17:57:35 +0100
Subject: [PATCH 500/531] add mc back data

---
 .../imputation/engine/unit/manual_construction_back_data.csv   | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 tests/fixture_data/imputation/engine/unit/manual_construction_back_data.csv

diff --git a/tests/fixture_data/imputation/engine/unit/manual_construction_back_data.csv b/tests/fixture_data/imputation/engine/unit/manual_construction_back_data.csv
new file mode 100644
index 00000000..a01589fb
--- /dev/null
+++ b/tests/fixture_data/imputation/engine/unit/manual_construction_back_data.csv
@@ -0,0 +1,3 @@
+identifier,date,group,output,other,marker
+1234,"202104","900",10,2,MC
+1235,"202104","100",20,2,FIMC

From ed4dda57b6a0789b11a022a36180e4924edc37c2 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Mon, 20 May 2024 10:21:51 +0100
Subject: [PATCH 501/531] refactor for review comment

---
 .../{001_71_MC_R_MC_1_input.csv => 71_MC_R_MC_1_input.csv}       | 0
 .../{001_71_MC_R_MC_1_output.csv => 71_MC_R_MC_1_output.csv}     | 0
 .../{001_72_MC_FIMC_2_input.csv => 72_MC_FIMC_2_input.csv}       | 0
 .../{001_72_MC_FIMC_2_output.csv => 72_MC_FIMC_2_output.csv}     | 0
 ..._MC_FIMC_FIMC_3_input.csv => 73_R_R_MC_FIMC_FIMC_3_input.csv} | 0
 ...C_FIMC_FIMC_3_output.csv => 73_R_R_MC_FIMC_FIMC_3_output.csv} | 0
 ...1_74_C_FIC_FIC_MC_4_input.csv => 74_C_FIC_FIC_MC_4_input.csv} | 0
 ...74_C_FIC_FIC_MC_4_output.csv => 74_C_FIC_FIC_MC_4_output.csv} | 0
 .../{001_75_C_FIC_MC_R_5_input.csv => 75_C_FIC_MC_R_5_input.csv} | 0
 ...001_75_C_FIC_MC_R_5_output.csv => 75_C_FIC_MC_R_5_output.csv} | 0
 .../{001_76_C_MC_6_input.csv => 76_C_MC_6_input.csv}             | 0
 .../{001_76_C_MC_6_output.csv => 76_C_MC_6_output.csv}           | 0
 ...77_R_FIR_MC_FIMC_7_input.csv => 77_R_FIR_MC_FIMC_7_input.csv} | 0
 ..._R_FIR_MC_FIMC_7_output.csv => 77_R_FIR_MC_FIMC_7_output.csv} | 0
 ...78_C_FIC_MC_FIMC_8_input.csv => 78_C_FIC_MC_FIMC_8_input.csv} | 0
 ..._C_FIC_MC_FIMC_8_output.csv => 78_C_FIC_MC_FIMC_8_output.csv} | 0
 .../{001_79_MC_BI_R_9_input.csv => 79_MC_BI_R_9_input.csv}       | 0
 .../{001_79_MC_BI_R_9_output.csv => 79_MC_BI_R_9_output.csv}     | 0
 ...1_80_R(MC)_R_FIR_10_input.csv => 80_R(MC)_R_FIR_10_input.csv} | 0
 ...80_R(MC)_R_FIR_10_output.csv => 80_R(MC)_R_FIR_10_output.csv} | 0
 tests/imputation/mean_of_ratios.toml                             | 1 -
 21 files changed, 1 deletion(-)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_71_MC_R_MC_1_input.csv => 71_MC_R_MC_1_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_71_MC_R_MC_1_output.csv => 71_MC_R_MC_1_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_72_MC_FIMC_2_input.csv => 72_MC_FIMC_2_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_72_MC_FIMC_2_output.csv => 72_MC_FIMC_2_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_73_R_R_MC_FIMC_FIMC_3_input.csv => 73_R_R_MC_FIMC_FIMC_3_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_73_R_R_MC_FIMC_FIMC_3_output.csv => 73_R_R_MC_FIMC_FIMC_3_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_74_C_FIC_FIC_MC_4_input.csv => 74_C_FIC_FIC_MC_4_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_74_C_FIC_FIC_MC_4_output.csv => 74_C_FIC_FIC_MC_4_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_75_C_FIC_MC_R_5_input.csv => 75_C_FIC_MC_R_5_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_75_C_FIC_MC_R_5_output.csv => 75_C_FIC_MC_R_5_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_76_C_MC_6_input.csv => 76_C_MC_6_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_76_C_MC_6_output.csv => 76_C_MC_6_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_77_R_FIR_MC_FIMC_7_input.csv => 77_R_FIR_MC_FIMC_7_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_77_R_FIR_MC_FIMC_7_output.csv => 77_R_FIR_MC_FIMC_7_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_78_C_FIC_MC_FIMC_8_input.csv => 78_C_FIC_MC_FIMC_8_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_78_C_FIC_MC_FIMC_8_output.csv => 78_C_FIC_MC_FIMC_8_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_79_MC_BI_R_9_input.csv => 79_MC_BI_R_9_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_79_MC_BI_R_9_output.csv => 79_MC_BI_R_9_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_80_R(MC)_R_FIR_10_input.csv => 80_R(MC)_R_FIR_10_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{001_80_R(MC)_R_FIR_10_output.csv => 80_R(MC)_R_FIR_10_output.csv} (100%)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_1_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_1_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_1_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_71_MC_R_MC_1_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_1_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_2_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_2_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_2_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_72_MC_FIMC_2_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_2_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_3_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_3_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_3_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_73_R_R_MC_FIMC_FIMC_3_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_3_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_4_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_4_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_4_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_74_C_FIC_FIC_MC_4_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_4_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_5_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_5_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_5_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_75_C_FIC_MC_R_5_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_5_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_6_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_6_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_6_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_76_C_MC_6_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_6_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_7_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_7_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_7_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_77_R_FIR_MC_FIMC_7_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_7_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_8_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_8_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_8_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_78_C_FIC_MC_FIMC_8_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_8_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_9_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_9_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_9_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_79_MC_BI_R_9_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_9_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_R(MC)_R_FIR_10_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_R(MC)_R_FIR_10_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_R(MC)_R_FIR_10_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/001_80_R(MC)_R_FIR_10_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_R(MC)_R_FIR_10_output.csv
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 2ee18de8..a6d54732 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -11,7 +11,6 @@ forward_growth_col = "decimal(15,6)"
 backward_growth_col = "decimal(15,6)"
 trimmed_forward_col = "boolean"
 trimmed_backward_col = "boolean"
-#TODO check
 manual_construction_col = "decimal(15,6)"
 
 [scenarios.05_R_R_FI_FI_FI_year_span]

From ad305054c958b03e064e798e6d4d4437f5b59712 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Mon, 20 May 2024 13:48:37 +0100
Subject: [PATCH 502/531] throw error if manual_constrution col not df but
 param set

---
 .../imputation/engine.py                      | 15 ++++----
 ..._R_MC_1_input.csv => 71_MC_R_MC_input.csv} |  0
 ..._MC_1_output.csv => 71_MC_R_MC_output.csv} |  0
 ..._FIMC_2_input.csv => 72_MC_FIMC_input.csv} |  0
 ...IMC_2_output.csv => 72_MC_FIMC_output.csv} |  0
 ...nput.csv => 73_R_R_MC_FIMC_FIMC_input.csv} |  0
 ...put.csv => 73_R_R_MC_FIMC_FIMC_output.csv} |  0
 ..._4_input.csv => 74_C_FIC_FIC_MC_input.csv} |  0
 ..._output.csv => 74_C_FIC_FIC_MC_output.csv} |  0
 ..._R_5_input.csv => 75_C_FIC_MC_R_input.csv} |  0
 ..._5_output.csv => 75_C_FIC_MC_R_output.csv} |  0
 ...{76_C_MC_6_input.csv => 76_C_MC_input.csv} |  0
 ...6_C_MC_6_output.csv => 76_C_MC_output.csv} |  0
 ...7_input.csv => 77_R_FIR_MC_FIMC_input.csv} |  0
 ...output.csv => 77_R_FIR_MC_FIMC_output.csv} |  0
 ...8_input.csv => 78_C_FIC_MC_FIMC_input.csv} |  0
 ...output.csv => 78_C_FIC_MC_FIMC_output.csv} |  0
 ..._BI_R_9_input.csv => 79_MC_BI_R_input.csv} |  0
 ...I_R_9_output.csv => 79_MC_BI_R_output.csv} |  0
 ...FIR_10_input.csv => 80_MC_R_FIR_input.csv} |  0
 ...R_10_output.csv => 80_MC_R_FIR_output.csv} |  0
 tests/imputation/mean_of_ratios.toml          | 35 ++++++++++++++++---
 tests/imputation/test_scenarios.py            |  5 +++
 23 files changed, 42 insertions(+), 13 deletions(-)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{71_MC_R_MC_1_input.csv => 71_MC_R_MC_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{71_MC_R_MC_1_output.csv => 71_MC_R_MC_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{72_MC_FIMC_2_input.csv => 72_MC_FIMC_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{72_MC_FIMC_2_output.csv => 72_MC_FIMC_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{73_R_R_MC_FIMC_FIMC_3_input.csv => 73_R_R_MC_FIMC_FIMC_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{73_R_R_MC_FIMC_FIMC_3_output.csv => 73_R_R_MC_FIMC_FIMC_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{74_C_FIC_FIC_MC_4_input.csv => 74_C_FIC_FIC_MC_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{74_C_FIC_FIC_MC_4_output.csv => 74_C_FIC_FIC_MC_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{75_C_FIC_MC_R_5_input.csv => 75_C_FIC_MC_R_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{75_C_FIC_MC_R_5_output.csv => 75_C_FIC_MC_R_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{76_C_MC_6_input.csv => 76_C_MC_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{76_C_MC_6_output.csv => 76_C_MC_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{77_R_FIR_MC_FIMC_7_input.csv => 77_R_FIR_MC_FIMC_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{77_R_FIR_MC_FIMC_7_output.csv => 77_R_FIR_MC_FIMC_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{78_C_FIC_MC_FIMC_8_input.csv => 78_C_FIC_MC_FIMC_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{78_C_FIC_MC_FIMC_8_output.csv => 78_C_FIC_MC_FIMC_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{79_MC_BI_R_9_input.csv => 79_MC_BI_R_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{79_MC_BI_R_9_output.csv => 79_MC_BI_R_output.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{80_R(MC)_R_FIR_10_input.csv => 80_MC_R_FIR_input.csv} (100%)
 rename tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/{80_R(MC)_R_FIR_10_output.csv => 80_MC_R_FIR_output.csv} (100%)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index fda960a1..f7f9dafd 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -239,10 +239,10 @@ def impute(
         "output": output_col,
         "marker": marker_col,
     }
-    apply_manual_construction = False
-    if manual_construction_col and manual_construction_col in input_df.columns:
+    # Add manual_construction parm
+    # only if manual_construction_col is not None.
+    if manual_construction_col:
         input_params["manual_const"] = manual_construction_col
-        apply_manual_construction = True
 
     if back_data_df:
         if not isinstance(back_data_df, DataFrame):
@@ -316,7 +316,7 @@ def impute(
     prior_period_df = prepared_df.selectExpr(
         "min(previous_period) AS prior_period"
     ).localCheckpoint(eager=False)
-    if apply_manual_construction:
+    if manual_construction_col:
         # Set manual construction value as output
         # and set marker as MC
         df_with_mc_data = prepared_df.withColumn(
@@ -581,7 +581,7 @@ def calculate_weighted_link(link_name):
             )
 
     calculate_ratios()
-    if apply_manual_construction:
+    if manual_construction_col:
         # populate link, count, default information
         # for manual_construction data
         manual_construction_data = (
@@ -842,10 +842,7 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         construct_values,
         forward_impute_from_construction,
     ):
-        if (
-            apply_manual_construction
-            and stage == forward_impute_from_manual_construction
-        ):
+        if manual_construction_col and stage == forward_impute_from_manual_construction:
             # Add the mc data
             df = df.unionByName(manual_construction_data, allowMissingColumns=True)
 
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_1_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_1_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_1_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_1_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_2_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_2_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_2_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_2_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_3_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_3_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_3_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_3_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/73_R_R_MC_FIMC_FIMC_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_4_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_4_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_4_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_4_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/74_C_FIC_FIC_MC_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_5_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_5_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_5_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_5_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/75_C_FIC_MC_R_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_6_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_6_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_6_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_6_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/76_C_MC_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_7_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_7_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_7_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_7_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/77_R_FIR_MC_FIMC_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_8_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_8_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_8_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_8_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/78_C_FIC_MC_FIMC_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_9_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_9_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_9_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_9_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/79_MC_BI_R_output.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_R(MC)_R_FIR_10_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_MC_R_FIR_input.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_R(MC)_R_FIR_10_input.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_MC_R_FIR_input.csv
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_R(MC)_R_FIR_10_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_MC_R_FIR_output.csv
similarity index 100%
rename from tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_R(MC)_R_FIR_10_output.csv
rename to tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/80_MC_R_FIR_output.csv
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index a6d54732..01b9e3a6 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -4,14 +4,11 @@ backward_growth_col = "growth_backward"
 trimmed_forward_col = "trim_inclusion_forward"
 trimmed_backward_col = "trim_inclusion_backward"
 
-manual_construction_col = "manual_construction"
-
 [field_types]
 forward_growth_col = "decimal(15,6)"
 backward_growth_col = "decimal(15,6)"
 trimmed_forward_col = "boolean"
 trimmed_backward_col = "boolean"
-manual_construction_col = "decimal(15,6)"
 
 [scenarios.05_R_R_FI_FI_FI_year_span]
 starting_period = "202010"
@@ -197,4 +194,34 @@ weight_periodicity_multiplier = 12
 
 [scenarios.70_C_FI_FI_65_weight]
 weight = "0.65"
-weight_periodicity_multiplier = 12
\ No newline at end of file
+weight_periodicity_multiplier = 12
+
+[scenarios.71_MC_R_MC]
+manual_construction_col = "manual_construction"
+
+[scenarios.72_MC_FIMC]
+manual_construction_col = "manual_construction"
+
+[scenarios.73_R_R_MC_FIMC_FIMC]
+manual_construction_col = "manual_construction"
+
+[scenarios.74_C_FIC_FIC_MC]
+manual_construction_col = "manual_construction"
+
+[scenarios.75_C_FIC_MC_R]
+manual_construction_col = "manual_construction"
+
+[scenarios.76_C_MC]
+manual_construction_col = "manual_construction"
+
+[scenarios.77_R_FIR_MC_FIMC]
+manual_construction_col = "manual_construction"
+
+[scenarios.78_C_FIC_MC_FIMC]
+manual_construction_col = "manual_construction"
+
+[scenarios.79_MC_BI_R]
+manual_construction_col = "manual_construction"
+
+[scenarios.80_MC_R_FIR]
+manual_construction_col = "manual_construction"
diff --git a/tests/imputation/test_scenarios.py b/tests/imputation/test_scenarios.py
index 3470ef5f..97db69a6 100644
--- a/tests/imputation/test_scenarios.py
+++ b/tests/imputation/test_scenarios.py
@@ -78,7 +78,12 @@ def test_calculations(fxt_load_test_csv, ratio_calculator, scenario_type, scenar
     field_types = default_config["field_types"]
     field_types.update(test_config.get("field_types", {}))
     field_types.update(scenario_config.get("field_types", {}))
+
     imputation_kwargs.update(scenario_config)
+    if "manual_construction_col" in imputation_kwargs:
+        field_types.update({"manual_construction_col": "decimal(15,6)"})
+        fields.update({"manual_construction_col": "manual_construction"})
+
     types = {fields[k]: v for k, v in field_types.items()}
     scenario_file_type = scenario_type.replace("back_data_", "")
     scenario_input = fxt_load_test_csv(

From 0492053bee258869dc042334cf8e16cde87f4e8a Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 21 May 2024 18:41:21 +0100
Subject: [PATCH 503/531] refactor for review comments

---
 .../imputation/engine.py                      | 27 +++++++------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index f7f9dafd..68179d14 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -319,7 +319,7 @@ def impute(
     if manual_construction_col:
         # Set manual construction value as output
         # and set marker as MC
-        df_with_mc_data = prepared_df.withColumn(
+        mc_df = prepared_df.withColumn(
             "marker",
             when(
                 (col("manual_const").isNotNull()) & (col("output").isNull()),
@@ -332,22 +332,15 @@ def impute(
                 col("manual_const"),
             ).otherwise(col("output")),
         )
-        manual_construction_data = df_with_mc_data.filter(
+        manual_construction_df = mc_df.filter(
             (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
-            | (col("marker") == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value)
         )
         #  Filter out the MC and FIMC data so
         #  it will be not inculded in the link calculations
 
-        prepared_df = df_with_mc_data.filter(
+        prepared_df = mc_df.filter(
             col("marker").isNull()
-            | (
-                ~(col("marker") == Marker.MANUAL_CONSTRUCTION.value)
-                & ~(
-                    col("marker")
-                    == Marker.FORWARD_IMPUTE_FROM_MANUAL_CONSTRUCTION.value
-                )
-            )
+            | (~(col("marker") == Marker.MANUAL_CONSTRUCTION.value))
         )
 
     if back_data_df:
@@ -581,12 +574,14 @@ def calculate_weighted_link(link_name):
             )
 
     calculate_ratios()
+
     if manual_construction_col:
         # populate link, count, default information
         # for manual_construction data
-        manual_construction_data = (
-            manual_construction_data.alias("mc")
-            .join(prepared_df, ["period", "grouping"], "leftouter")
+        unique_grp_prd = prepared_df.dropDuplicates(["period", "grouping"])
+        manual_construction_df = (
+            manual_construction_df.alias("mc")
+            .join(unique_grp_prd, ["period", "grouping"], "leftouter")
             .select(
                 "mc.ref",
                 "mc.period",
@@ -625,7 +620,6 @@ def calculate_weighted_link(link_name):
                 .otherwise(col("default_construction"))
                 .alias("default_construction"),
             )
-            .distinct()
         )
 
     # Caching for both imputed and unimputed data.
@@ -844,12 +838,11 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
     ):
         if manual_construction_col and stage == forward_impute_from_manual_construction:
             # Add the mc data
-            df = df.unionByName(manual_construction_data, allowMissingColumns=True)
+            df = df.unionByName(manual_construction_df, allowMissingColumns=True)
 
         df = stage(df).localCheckpoint(eager=False)
         if df.filter(col("output").isNull()).count() == 0 and stage == construct_values:
             break
-
     return df.join(prior_period_df, [col("prior_period") < col("period")]).select(
         [
             col(k).alias(output_col_mapping[k])

From faecba342836f4733bf2e946a785333c9d17cdc1 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 21 May 2024 19:35:57 +0100
Subject: [PATCH 504/531] refactored if contions in imputation engine

---
 statistical_methods_library/imputation/engine.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 68179d14..bc17fce1 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -841,8 +841,12 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
             df = df.unionByName(manual_construction_df, allowMissingColumns=True)
 
         df = stage(df).localCheckpoint(eager=False)
-        if df.filter(col("output").isNull()).count() == 0 and stage == construct_values:
-            break
+        if df.filter(col("output").isNull()).count() == 0:
+            if not manual_construction_col:
+                break
+            elif manual_construction_col and stage == forward_impute_from_construction:
+                break
+
     return df.join(prior_period_df, [col("prior_period") < col("period")]).select(
         [
             col(k).alias(output_col_mapping[k])

From ab1a97b3cf3e776eb345a92a86bf3945c7770180 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Wed, 22 May 2024 17:37:21 +0100
Subject: [PATCH 505/531] refactored mc select colums dynamic based out
 output_col_mapping

---
 .../imputation/engine.py                      | 69 +++++++------------
 1 file changed, 24 insertions(+), 45 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index bc17fce1..3e6fbf7b 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -243,6 +243,7 @@ def impute(
     # only if manual_construction_col is not None.
     if manual_construction_col:
         input_params["manual_const"] = manual_construction_col
+        fill_values_mc = {}
 
     if back_data_df:
         if not isinstance(back_data_df, DataFrame):
@@ -335,14 +336,12 @@ def impute(
         manual_construction_df = mc_df.filter(
             (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
         )
-        #  Filter out the MC and FIMC data so
+        #  Filter out the MC data so
         #  it will be not inculded in the link calculations
-
         prepared_df = mc_df.filter(
             col("marker").isNull()
             | (~(col("marker") == Marker.MANUAL_CONSTRUCTION.value))
         )
-
     if back_data_df:
         validated_back_data_df = validate_dataframe(
             back_data_df, back_input_params, type_mapping, ["ref", "period", "grouping"]
@@ -372,6 +371,7 @@ def impute(
     def calculate_ratios():
         # This allows us to return early if we have nothing to do
         nonlocal prepared_df
+        nonlocal fill_values_mc
         ratio_calculators = []
         if "forward" in prepared_df.columns:
             prepared_df = (
@@ -469,8 +469,9 @@ def calculate_ratios():
             fill_values.update(result.fill_values)
             output_col_mapping.update(result.additional_outputs)
 
-        for fill_column, fill_value in fill_values.items():
-            prepared_df = prepared_df.fillna(fill_value, fill_column)
+        prepared_df = prepared_df.fillna(fill_values)
+
+        fill_values_mc = fill_values
 
         if link_filter:
             prepared_df = prepared_df.join(
@@ -579,48 +580,26 @@ def calculate_weighted_link(link_name):
         # populate link, count, default information
         # for manual_construction data
         unique_grp_prd = prepared_df.dropDuplicates(["period", "grouping"])
+        # Get the required additional output columns
+        mc_cols = manual_construction_df.columns
+        mc_additional_cols = []
+        for key in output_col_mapping.keys():
+            # Remove growth_forward and growth_backward
+            # as it should be null for non responder
+            if (key not in mc_cols) and (
+                key not in ["growth_forward", "growth_backward"]
+            ):
+                mc_additional_cols.append(key)
         manual_construction_df = (
             manual_construction_df.alias("mc")
             .join(unique_grp_prd, ["period", "grouping"], "leftouter")
             .select(
-                "mc.ref",
-                "mc.period",
-                "mc.grouping",
-                "mc.aux",
-                "mc.manual_const",
-                "mc.previous_period",
-                "mc.next_period",
-                "mc.output",
-                "mc.marker",
-                when(col("forward").isNull(), lit(1).cast("long"))
-                .otherwise(col("forward"))
-                .alias("forward"),
-                when(col("backward").isNull(), lit(1).cast("long"))
-                .otherwise(col("backward"))
-                .alias("backward"),
-                when(col("construction").isNull(), lit(1).cast("long"))
-                .otherwise(col("construction"))
-                .alias("construction"),
-                when(col("count_forward").isNull(), lit(0).cast("int"))
-                .otherwise(col("count_forward"))
-                .alias("count_forward"),
-                when(col("count_backward").isNull(), lit(0).cast("int"))
-                .otherwise(col("count_backward"))
-                .alias("count_backward"),
-                when(col("count_construction").isNull(), lit(0).cast("int"))
-                .otherwise(col("count_construction"))
-                .alias("count_construction"),
-                when(col("default_forward").isNull(), lit(True))
-                .otherwise(col("default_forward"))
-                .alias("default_forward"),
-                when(col("default_backward").isNull(), lit(True))
-                .otherwise(col("default_backward"))
-                .alias("default_backward"),
-                when(col("default_construction").isNull(), lit(True))
-                .otherwise(col("default_construction"))
-                .alias("default_construction"),
+                *(f"mc.{name}" for name in mc_cols),
+                *mc_additional_cols,
             )
         )
+        # Fill null additional columns value with default value.
+        manual_construction_df = manual_construction_df.fillna(fill_values_mc)
 
     # Caching for both imputed and unimputed data.
     imputed_df = None
@@ -841,12 +820,12 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
             df = df.unionByName(manual_construction_df, allowMissingColumns=True)
 
         df = stage(df).localCheckpoint(eager=False)
+
         if df.filter(col("output").isNull()).count() == 0:
-            if not manual_construction_col:
-                break
-            elif manual_construction_col and stage == forward_impute_from_construction:
+            if (not manual_construction_col) or (
+                manual_construction_col and stage == construct_values
+            ):
                 break
-
     return df.join(prior_period_df, [col("prior_period") < col("period")]).select(
         [
             col(k).alias(output_col_mapping[k])

From 6dc4dd291665a040777c9cfb4d5f8f4fc8746ce2 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Thu, 23 May 2024 11:27:07 +0100
Subject: [PATCH 506/531] remove intermediate df

---
 statistical_methods_library/imputation/engine.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 3e6fbf7b..734d60a7 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -579,7 +579,6 @@ def calculate_weighted_link(link_name):
     if manual_construction_col:
         # populate link, count, default information
         # for manual_construction data
-        unique_grp_prd = prepared_df.dropDuplicates(["period", "grouping"])
         # Get the required additional output columns
         mc_cols = manual_construction_df.columns
         mc_additional_cols = []
@@ -592,7 +591,11 @@ def calculate_weighted_link(link_name):
                 mc_additional_cols.append(key)
         manual_construction_df = (
             manual_construction_df.alias("mc")
-            .join(unique_grp_prd, ["period", "grouping"], "leftouter")
+            .join(
+                prepared_df.dropDuplicates(["period", "grouping"]),
+                ["period", "grouping"],
+                "leftouter",
+            )
             .select(
                 *(f"mc.{name}" for name in mc_cols),
                 *mc_additional_cols,

From 14b224ff0f8993590a0901bdead6d5d559dfb95e Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Thu, 23 May 2024 14:14:48 +0100
Subject: [PATCH 507/531] added unittest for mc_FIMC with link filter

---
 .../81_R_MC_FIMC_filtered_input.csv           | 42 +++++++++++++++++++
 .../81_R_MC_FIMC_filtered_output.csv          | 42 +++++++++++++++++++
 tests/imputation/mean_of_ratios.toml          |  5 +++
 3 files changed, 89 insertions(+)
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/81_R_MC_FIMC_filtered_input.csv
 create mode 100644 tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/81_R_MC_FIMC_filtered_output.csv

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/81_R_MC_FIMC_filtered_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/81_R_MC_FIMC_filtered_input.csv
new file mode 100644
index 00000000..48cd650b
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/81_R_MC_FIMC_filtered_input.csv
@@ -0,0 +1,42 @@
+identifier,date,group,question,other,manual_construction
+140001,202001,100,3582,27,
+140001,202002,100,4533,27,
+140001,202003,100,4471,27,
+140001,202004,100,3040,27,
+140001,202005,100,8519,27,
+140001,202006,100,8690,27,
+140001,202007,100,9979,27,
+140002,202001,100,5359,83,
+140002,202002,100,7091,83,
+140002,202003,100,7098,83,
+140002,202004,100,7408,83,
+140002,202005,100,1937,83,
+140002,202006,100,6711,83,
+140002,202007,100,1052,83,
+140003,202001,100,439,89,
+140003,202002,100,7783,89,
+140003,202003,100,897,89,
+140003,202004,100,8477,89,
+140003,202005,100,2207,89,
+140003,202006,100,9889,89,
+140003,202007,100,2528,89,
+140004,202001,100,,28,
+140004,202002,100,,28,
+140004,202003,100,,28,
+140004,202005,100,,28,
+140004,202006,100,,28,
+140004,202007,100,7243,28,
+140005,202001,100,150000,85,
+140005,202002,100,180000,85,
+140005,202003,100,120000,85,
+140005,202004,100,115000,85,
+140005,202005,100,105000,85,
+140005,202006,100,,85,110000
+140005,202007,100,,85,
+140006,202001,100,,71,
+140006,202002,100,,71,
+140006,202003,100,,71,
+140006,202004,100,,71,
+140006,202005,100,,71,
+140006,202006,100,,71,
+140006,202007,100,,71,
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/81_R_MC_FIMC_filtered_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/81_R_MC_FIMC_filtered_output.csv
new file mode 100644
index 00000000..cbe69c2c
--- /dev/null
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/81_R_MC_FIMC_filtered_output.csv
@@ -0,0 +1,42 @@
+identifier,date,group,growth_forward,growth_backward,forward,backward,construction,output,marker,count_forward,count_backward,count_construction,link_inclusion_current,link_inclusion_previous,link_inclusion_next,default_forward,default_backward,default_construction
+140001,202001,100,,0.790205162,1,0.534118956,47.13567839,3582,R,0,3,3,TRUE,,TRUE,TRUE,FALSE,FALSE
+140001,202002,100,1.265494137,1.013867144,6.772539383,3.563193687,97.52261307,4533,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140001,202003,100,0.986322524,1.470723684,0.700853626,0.84489759,62.64321608,4471,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140001,202004,100,0.679937374,0.356849395,3.724667279,2.674093602,95.10050251,3040,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140001,202005,100,2.802302632,0.980322209,1.108042751,0.497376695,63.63316583,8519,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140001,202006,100,1.020072778,0.87082874,2.988483968,3.720631427,127.0854271,8690,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140001,202007,100,1.148331415,,0.520242185,1,91.63876652,9979,R,3,0,4,TRUE,TRUE,,FALSE,TRUE,FALSE
+140002,202001,100,,0.755746721,1,0.534118956,47.13567839,5359,R,0,3,3,TRUE,,TRUE,TRUE,FALSE,FALSE
+140002,202002,100,1.323194626,0.999013807,6.772539383,3.563193687,97.52261307,7091,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140002,202003,100,1.000987167,0.958153348,0.700853626,0.84489759,62.64321608,7098,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140002,202004,100,1.043674274,3.824470831,3.724667279,2.674093602,95.10050251,7408,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140002,202005,100,0.261474082,0.288630606,1.108042751,0.497376695,63.63316583,1937,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140002,202006,100,3.464636035,6.379277567,2.988483968,3.720631427,127.0854271,6711,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140002,202007,100,0.156757562,,0.520242185,1,91.63876652,1052,R,3,0,4,TRUE,TRUE,,FALSE,TRUE,FALSE
+140003,202001,100,,0.056404985,1,0.534118956,47.13567839,439,R,0,3,3,TRUE,,TRUE,TRUE,FALSE,FALSE
+140003,202002,100,17.72892938,8.676700111,6.772539383,3.563193687,97.52261307,7783,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140003,202003,100,0.115251188,0.105815737,0.700853626,0.84489759,62.64321608,897,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140003,202004,100,9.45039019,3.84096058,3.724667279,2.674093602,95.10050251,8477,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140003,202005,100,0.260351539,0.223177268,1.108042751,0.497376695,63.63316583,2207,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140003,202006,100,4.48074309,3.911787975,2.988483968,3.720631427,127.0854271,9889,R,3,3,3,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE
+140003,202007,100,0.255637577,,0.520242185,1,91.63876652,2528,R,3,0,4,TRUE,TRUE,,FALSE,TRUE,FALSE
+140004,202001,100,,,1,0.534118956,47.13567839,1319.798995,C,0,3,3,,,,TRUE,FALSE,FALSE
+140004,202002,100,,,6.772539383,3.563193687,97.52261307,8938.390671,FIC,3,3,3,,,,FALSE,FALSE,FALSE
+140004,202003,100,,,0.700853626,0.84489759,62.64321608,6264.503515,FIC,3,3,3,,,,FALSE,FALSE,FALSE
+140004,202005,100,,,1.108042751,0.497376695,63.63316583,13403.572478,BI,3,3,3,,,,FALSE,FALSE,FALSE
+140004,202006,100,,,2.988483968,3.720631427,127.0854271,26948.533427,BI,3,3,3,,,,FALSE,FALSE,FALSE
+140004,202007,100,,,0.520242185,1,91.63876652,7243,R,3,0,4,TRUE,,,FALSE,TRUE,FALSE
+140005,202001,100,,,1,0.534118956,47.13567839,150000,R,0,3,3,FALSE,,FALSE,TRUE,FALSE,FALSE
+140005,202002,100,,,6.772539383,3.563193687,97.52261307,180000,R,3,3,3,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE
+140005,202003,100,,,0.700853626,0.84489759,62.64321608,120000,R,3,3,3,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE
+140005,202004,100,,,3.724667279,2.674093602,95.10050251,115000,R,3,3,3,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE
+140005,202005,100,,,1.108042751,0.497376695,63.63316583,105000,R,3,3,3,FALSE,FALSE,,FALSE,FALSE,FALSE
+140005,202006,100,,,2.988483968,3.720631427,127.0854271,110000,MC,3,3,3,,,,FALSE,FALSE,FALSE
+140005,202007,100,,,0.520242185,1,91.63876652,57226.640340,FIMC,3,0,4,,,,FALSE,TRUE,FALSE
+140006,202001,100,,,1,0.534118956,47.13567839,3346.633166,C,0,3,3,,,,TRUE,FALSE,FALSE
+140006,202002,100,,,6.772539383,3.563193687,97.52261307,22665.204916,FIC,3,3,3,,,,FALSE,FALSE,FALSE
+140006,202003,100,,,0.700853626,0.84489759,62.64321608,15884.991057,FIC,3,3,3,,,,FALSE,FALSE,FALSE
+140006,202004,100,,,3.724667279,2.674093602,95.10050251,59166.306423,FIC,3,3,3,,,,FALSE,FALSE,FALSE
+140006,202005,100,,,1.108042751,0.497376695,63.63316583,65558.796938,FIC,3,3,3,,,,FALSE,FALSE,FALSE
+140006,202006,100,,,2.988483968,3.720631427,127.0854271,195921.413606,FIC,3,3,3,,,,FALSE,FALSE,FALSE
+140006,202007,100,,,0.520242185,1,91.63876652,101926.584286,FIC,3,0,4,,,,FALSE,TRUE,FALSE
diff --git a/tests/imputation/mean_of_ratios.toml b/tests/imputation/mean_of_ratios.toml
index 01b9e3a6..b13581ba 100644
--- a/tests/imputation/mean_of_ratios.toml
+++ b/tests/imputation/mean_of_ratios.toml
@@ -225,3 +225,8 @@ manual_construction_col = "manual_construction"
 
 [scenarios.80_MC_R_FIR]
 manual_construction_col = "manual_construction"
+
+
+[scenarios.81_R_MC_FIMC_filtered]
+link_filter = "identifier != '140005'"
+manual_construction_col = "manual_construction"

From 7f5c500fcac1ea3a08aea07c3aab0a1941507662 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Fri, 24 May 2024 07:34:48 +0100
Subject: [PATCH 508/531] fix mc link filter unit test failure

---
 .../imputation/engine.py                      | 30 ++++++++++++-------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 734d60a7..db63c838 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -244,6 +244,16 @@ def impute(
     if manual_construction_col:
         input_params["manual_const"] = manual_construction_col
         fill_values_mc = {}
+        # These col values should be null for non-responder i.e MC.
+        exclude_cols = [
+            "growth_forward",
+            "growth_backward",
+            "link_inclusion_current",
+            "link_inclusion_previous",
+            "link_inclusion_next",
+            "trim_inclusion_forward",
+            "trim_inclusion_backward",
+        ]
 
     if back_data_df:
         if not isinstance(back_data_df, DataFrame):
@@ -371,7 +381,7 @@ def impute(
     def calculate_ratios():
         # This allows us to return early if we have nothing to do
         nonlocal prepared_df
-        nonlocal fill_values_mc
+
         ratio_calculators = []
         if "forward" in prepared_df.columns:
             prepared_df = (
@@ -471,7 +481,9 @@ def calculate_ratios():
 
         prepared_df = prepared_df.fillna(fill_values)
 
-        fill_values_mc = fill_values
+        if manual_construction_col:
+            nonlocal fill_values_mc
+            fill_values_mc = fill_values
 
         if link_filter:
             prepared_df = prepared_df.join(
@@ -577,18 +589,16 @@ def calculate_weighted_link(link_name):
     calculate_ratios()
 
     if manual_construction_col:
-        # populate link, count, default information
-        # for manual_construction data
-        # Get the required additional output columns
         mc_cols = manual_construction_df.columns
+
+        # Get the required additional output columns
         mc_additional_cols = []
         for key in output_col_mapping.keys():
-            # Remove growth_forward and growth_backward
-            # as it should be null for non responder
-            if (key not in mc_cols) and (
-                key not in ["growth_forward", "growth_backward"]
-            ):
+            if (key not in mc_cols) and (key not in exclude_cols):
                 mc_additional_cols.append(key)
+
+        # populate link, count, default information
+        # for mc data
         manual_construction_df = (
             manual_construction_df.alias("mc")
             .join(

From 5e5f60a5c9438ebafa2e49ee60bffda455579e93 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 24 May 2024 07:37:58 +0100
Subject: [PATCH 509/531] Bump softprops/action-gh-release from 1 to 2 (#185)

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 .github/workflows/release-code.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index 321752f0..7cbf4aa8 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -25,7 +25,7 @@ jobs:
       - name: build
         run: poetry build
       - name: Create GitHub release
-        uses: softprops/action-gh-release@v1
+        uses: softprops/action-gh-release@v2
         with:
           files: |
             dist/*.whl

From 56d54f9b72636802e1b352d9f71666f52bd6a6f8 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 28 May 2024 12:26:29 +0100
Subject: [PATCH 510/531] addition RoM mc unittest data

---
 .../36_R_MC_FIMC_weighted_input.csv           | 25 ++++++++++
 .../36_R_MC_FIMC_weighted_output.csv          | 49 +++++++++++++++++++
 tests/imputation/ratio_of_means.toml          |  5 ++
 tests/imputation/test_engine.py               |  2 +-
 4 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_input.csv
 create mode 100644 tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_output.csv

diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_input.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_input.csv
new file mode 100644
index 00000000..1aff76b4
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_input.csv
@@ -0,0 +1,25 @@
+identifier,date,group,question,other,manual_construction
+110001,202001,100,9244,89,
+110001,202002,100,8916,89,
+110001,202003,100,6194,89,
+110002,202001,100,4826,83,
+110002,202002,100,5903,83,
+110002,202003,100,4743,83,
+110003,202001,100,7586,4,
+110003,202002,100,1016,4,
+110003,202003,100,1429,4,
+110004,202001,100,3975,76,
+110004,202002,100,3044,76,
+110004,202003,100,,76,
+110005,202001,200,5217,27,
+110005,202002,200,7016,27,
+110005,202003,200,9940,27,
+110006,202001,200,5325,42,
+110006,202002,200,7747,42,
+110006,202003,200,6685,42,
+110007,202001,200,5496,19,
+110007,202002,200,,19,1010
+110007,202003,200,,19,
+110008,202001,200,,43,
+110008,202002,200,3913,43,
+110008,202003,200,6013,43,
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_output.csv
new file mode 100644
index 00000000..ff0362e4
--- /dev/null
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_output.csv
@@ -0,0 +1,49 @@
+identifier,date,group,output,marker,unweighted_forward,unweighted_backward,unweighted_construction,forward,backward,construction,count_forward,count_backward,count_construction,default_forward,default_backward,default_construction
+110001,202001,100,9244,R,1,1.357646062,101.710317,1,1.442523031,76.03985873,0,4,4,TRUE,FALSE,FALSE
+110002,202001,100,4826,R,1,1.357646062,101.710317,1,1.442523031,76.03985873,0,4,4,TRUE,FALSE,FALSE
+110003,202001,100,7586,R,1,1.357646062,101.710317,1,1.442523031,76.03985873,0,4,4,TRUE,FALSE,FALSE
+110004,202001,100,3975,R,1,1.357646062,101.710317,1,1.442523031,76.03985873,0,4,4,TRUE,FALSE,FALSE
+110005,202001,200,5217,R,1,0.714082504,182.25,1,1.854216752,144.865,0,2,3,TRUE,FALSE,FALSE
+110006,202001,200,5325,R,1,0.714082504,182.25,1,1.854216752,144.865,0,2,3,TRUE,FALSE,FALSE
+110007,202001,200,5496,R,1,0.714082504,182.25,1,1.854216752,144.865,0,2,3,TRUE,FALSE,FALSE
+110008,202001,200,7255.550151,BI,1,0.714082504,182.25,1,1.854216752,144.865,0,2,3,TRUE,FALSE,FALSE
+110001,202002,100,8916,R,0.736568998,1.280527252,74.91666667,0.852534499,1.580013626,98.16768333,4,3,4,FALSE,FALSE,FALSE
+110002,202002,100,5903,R,0.736568998,1.280527252,74.91666667,0.852534499,1.580013626,98.16768333,4,3,4,FALSE,FALSE,FALSE
+110003,202002,100,1016,R,0.736568998,1.280527252,74.91666667,0.852534499,1.580013626,98.16768333,4,3,4,FALSE,FALSE,FALSE
+110004,202002,100,3044,R,0.736568998,1.280527252,74.91666667,0.852534499,1.580013626,98.16768333,4,3,4,FALSE,FALSE,FALSE
+110005,202002,200,7016,R,1.400398406,0.824984539,166.75,1.389168203,0.74779677,110.7264285,2,3,3,FALSE,FALSE,FALSE
+110006,202002,200,7747,R,1.400398406,0.824984539,166.75,1.389168203,0.74779677,110.7264285,2,3,3,FALSE,FALSE,FALSE
+110007,202002,200,1010,MC,1.400398406,0.824984539,166.75,1.389168203,0.74779677,110.7264285,2,3,3,FALSE,FALSE,FALSE
+110008,202002,200,3913,R,1.400398406,0.824984539,166.75,1.389168203,0.74779677,110.7264285,2,3,3,FALSE,FALSE,FALSE
+110001,202003,100,6194,R,0.780928323,1,70.26136364,0.946964162,1,79.81873182,3,0,3,FALSE,TRUE,FALSE
+110002,202003,100,4743,R,0.780928323,1,70.26136364,0.946964162,1,79.81873182,3,0,3,FALSE,TRUE,FALSE
+110003,202003,100,1429,R,0.780928323,1,70.26136364,0.946964162,1,79.81873182,3,0,3,FALSE,TRUE,FALSE
+110004,202003,100,2882.558909,FIR,0.780928323,1,70.26136364,0.946964162,1,79.81873182,3,0,3,FALSE,TRUE,FALSE
+110005,202003,200,9940,R,1.212143928,1,202.125,1.082364964,1,150.1950965,3,0,3,FALSE,TRUE,FALSE
+110006,202003,200,6685,R,1.212143928,1,202.125,1.082364964,1,150.1950965,3,0,3,FALSE,TRUE,FALSE
+110007,202003,200,1093.188614,FIMC,1.212143928,1,202.125,1.082364964,1,150.1950965,3,0,3,FALSE,TRUE,FALSE
+110008,202003,200,6013,R,1.212143928,1,202.125,1.082364964,1,150.1950965,3,0,3,FALSE,TRUE,FALSE
+110001,201901,100,9244,R,1,1.5274,50.3694,,,,,,,,,
+110001,201902,100,8916,R,0.9685,1.8795,121.4187,,,,,,,,,
+110001,201903,100,6194,R,1.113,1,89.3761,,,,,,,,,
+110002,201901,100,4826,R,1,1.5274,50.3694,,,,,,,,,
+110002,201902,100,5903,R,0.9685,1.8795,121.4187,,,,,,,,,
+110002,201903,100,4743,R,1.113,1,89.3761,,,,,,,,,
+110003,201901,100,7586,R,1,1.5274,50.3694,,,,,,,,,
+110003,201902,100,1016,R,0.9685,1.8795,121.4187,,,,,,,,,
+110003,201903,100,1429,R,1.113,1,89.3761,,,,,,,,,
+110004,201901,100,3975,R,1,1.5274,50.3694,,,,,,,,,
+110004,201902,100,3044,R,0.9685,1.8795,121.4187,,,,,,,,,
+110004,201903,100,8437,R,1.113,1,89.3761,,,,,,,,,
+110005,201901,200,5217,R,1,2.994350985,107.48,,,,,,,,,
+110005,201902,200,7016,R,1.377938182,0.670608989,54.70285714,,,,,,,,,
+110005,201903,200,9940,R,0.952585628,1,98.26519337,,,,,,,,,
+110006,201901,200,5325,R,1,2.994350985,107.48,,,,,,,,,
+110006,201902,200,7747,R,1.377938182,0.670608989,54.70285714,,,,,,,,,
+110006,201903,200,6685,R,0.952585628,1,98.26519337,,,,,,,,,
+110007,201901,200,5496,R,1,2.994350985,107.48,,,,,,,,,
+110007,201902,200,1010,R,1.377938182,0.670608989,54.70285714,,,,,,,,,
+110007,201903,200,1235,R,0.952585628,1,98.26519337,,,,,,,,,
+110008,201901,200,8272,R,1,2.994350985,107.48,,,,,,,,,
+110008,201902,200,3913,R,1.377938182,0.670608989,54.70285714,,,,,,,,,
+110008,201903,200,6013,R,0.952585628,1,98.26519337,,,,,,,,,
\ No newline at end of file
diff --git a/tests/imputation/ratio_of_means.toml b/tests/imputation/ratio_of_means.toml
index 608ea230..7054fef9 100644
--- a/tests/imputation/ratio_of_means.toml
+++ b/tests/imputation/ratio_of_means.toml
@@ -21,3 +21,8 @@ link_filter = "identifier != '10003'"
 
 [scenarios.35_BI_BI_R_FI_FI_R_FI_alternating_filtered]
 link_filter = "NOT(identifier = '70001' AND date IN ('202003', '202005'))"
+
+[scenarios.36_R_MC_FIMC_weighted]
+weight = "0.5"
+weight_periodicity_multiplier = 12
+manual_construction_col = "manual_construction"
diff --git a/tests/imputation/test_engine.py b/tests/imputation/test_engine.py
index 40b4e074..5c6f2e7b 100644
--- a/tests/imputation/test_engine.py
+++ b/tests/imputation/test_engine.py
@@ -425,7 +425,7 @@ def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
         impute(input_df=test_dataframe, **params)
 
 
-def test_back_data_fimc(fxt_load_test_csv, fxt_spark_session):
+def test_back_data_mc_fimc_back_data(fxt_load_test_csv, fxt_spark_session):
     test_dataframe = fxt_load_test_csv(
         dataframe_columns,
         dataframe_types,

From 9c3fe7bf1287123f38fbb69ce2461b9465a56182 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 28 May 2024 13:49:42 +0100
Subject: [PATCH 511/531] rename variable

---
 statistical_methods_library/imputation/engine.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index db63c838..d20390c7 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -245,7 +245,7 @@ def impute(
         input_params["manual_const"] = manual_construction_col
         fill_values_mc = {}
         # These col values should be null for non-responder i.e MC.
-        exclude_cols = [
+        nonresponder_null_cols = [
             "growth_forward",
             "growth_backward",
             "link_inclusion_current",
@@ -594,7 +594,9 @@ def calculate_weighted_link(link_name):
         # Get the required additional output columns
         mc_additional_cols = []
         for key in output_col_mapping.keys():
-            if (key not in mc_cols) and (key not in exclude_cols):
+            # nonresponder_null_cols will be populated with null value just before the
+            # stage forward_impute_from_manual_construction via unionByName
+            if (key not in mc_cols) and (key not in nonresponder_null_cols):
                 mc_additional_cols.append(key)
 
         # populate link, count, default information

From 7bb2580803c6e5b931d6481212cf04f3d03b4344 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Wed, 29 May 2024 09:19:37 +0100
Subject: [PATCH 512/531] update comment

---
 statistical_methods_library/imputation/engine.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index d20390c7..1500fde9 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -343,15 +343,20 @@ def impute(
                 col("manual_const"),
             ).otherwise(col("output")),
         )
+
+        # Filter out MC data to prevent it from being used in link calculations.
+        # It maintains a gap in the imputation pattern,which prevents
+        # the FIR for the identifier but allows the BIR.
+        # This MC data will be merged with the main df before
+        # the forward_impute_from_manual_construction stage.
         manual_construction_df = mc_df.filter(
             (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
         )
-        #  Filter out the MC data so
-        #  it will be not inculded in the link calculations
         prepared_df = mc_df.filter(
             col("marker").isNull()
             | (~(col("marker") == Marker.MANUAL_CONSTRUCTION.value))
         )
+
     if back_data_df:
         validated_back_data_df = validate_dataframe(
             back_data_df, back_input_params, type_mapping, ["ref", "period", "grouping"]

From c9ef19f1d71109604571181cb11b47fe88a99ad0 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Wed, 29 May 2024 09:26:33 +0100
Subject: [PATCH 513/531] end of line

---
 .../mean_of_ratios/methodology_scenarios/71_MC_R_MC_input.csv   | 2 +-
 .../mean_of_ratios/methodology_scenarios/71_MC_R_MC_output.csv  | 2 +-
 .../mean_of_ratios/methodology_scenarios/72_MC_FIMC_output.csv  | 2 +-
 .../methodology_scenarios/36_R_MC_FIMC_weighted_output.csv      | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_input.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_input.csv
index 9a0667e8..31f54007 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_input.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_input.csv
@@ -10,4 +10,4 @@ identifier,date,group,question,other,manual_construction
 30003,202003,100,6492,7,
 30004,202001,100,,81,4321
 30004,202002,100,2113,81,
-30004,202003,100,,81,3189
\ No newline at end of file
+30004,202003,100,,81,3189
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_output.csv
index a5da49e3..f3244f49 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/71_MC_R_MC_output.csv
@@ -10,4 +10,4 @@ identifier,date,group,growth_forward,growth_backward,forward,backward,constructi
 30003,202003,100,3.686541738,,1.526947,1,103.0153846,6492,R,3,0,3,false,true,false
 30004,202001,100,,,1,2.196577972,194.6,4321,MC,0,3,3,true,false,false
 30004,202002,100,,,0.652198238,1.866715325,90.8436019,2113,R,3,3,4,false,false,false
-30004,202003,100,,,1.526947,1,103.0153846,3189,MC,3,0,3,false,true,false
\ No newline at end of file
+30004,202003,100,,,1.526947,1,103.0153846,3189,MC,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_output.csv b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_output.csv
index e71195aa..582d8307 100644
--- a/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_output.csv
+++ b/tests/fixture_data/imputation/mean_of_ratios/methodology_scenarios/72_MC_FIMC_output.csv
@@ -14,4 +14,4 @@ identifier,date,group,growth_forward,growth_backward,forward,backward,constructi
 40004,202001,100,,0.521655144,1,2.053506032,128.0208333,5131,R,0,4,4,true,false,false
 40004,202002,100,1.916975248,,0.916179196,1.507228985,120.7395833,9836,R,4,3,4,false,false,false
 40004,202003,100,,,3.003997558,1.551291583,115.6929824,7525,MC,3,3,3,false,false,false
-40004,202004,100,,,0.645360538,1,73.71052632,4856.338052,FIMC,3,0,3,false,true,false
\ No newline at end of file
+40004,202004,100,,,0.645360538,1,73.71052632,4856.338052,FIMC,3,0,3,false,true,false
diff --git a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_output.csv b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_output.csv
index ff0362e4..d84b524d 100644
--- a/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_output.csv
+++ b/tests/fixture_data/imputation/ratio_of_means/methodology_scenarios/36_R_MC_FIMC_weighted_output.csv
@@ -46,4 +46,4 @@ identifier,date,group,output,marker,unweighted_forward,unweighted_backward,unwei
 110007,201903,200,1235,R,0.952585628,1,98.26519337,,,,,,,,,
 110008,201901,200,8272,R,1,2.994350985,107.48,,,,,,,,,
 110008,201902,200,3913,R,1.377938182,0.670608989,54.70285714,,,,,,,,,
-110008,201903,200,6013,R,0.952585628,1,98.26519337,,,,,,,,,
\ No newline at end of file
+110008,201903,200,6013,R,0.952585628,1,98.26519337,,,,,,,,,

From 75235a44dfe025b01fa4f0453ae0bd326ac27572 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Wed, 29 May 2024 09:30:12 +0100
Subject: [PATCH 514/531] end of line

---
 .../imputation/engine/unit/manual_construction_input.csv        | 2 +-
 .../imputation/engine/unit/manual_construction_output.csv       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/fixture_data/imputation/engine/unit/manual_construction_input.csv b/tests/fixture_data/imputation/engine/unit/manual_construction_input.csv
index f66589d0..d5179bfe 100644
--- a/tests/fixture_data/imputation/engine/unit/manual_construction_input.csv
+++ b/tests/fixture_data/imputation/engine/unit/manual_construction_input.csv
@@ -2,4 +2,4 @@ identifier,date,group,question,other,manual_construction
 1234,"202105",900,,78,
 1235,"202105",100,,81,
 1236,"202105",100,2113,81,
-1237,"202105",200,,81,3189
\ No newline at end of file
+1237,"202105",200,,81,3189
diff --git a/tests/fixture_data/imputation/engine/unit/manual_construction_output.csv b/tests/fixture_data/imputation/engine/unit/manual_construction_output.csv
index e10386cc..78765925 100644
--- a/tests/fixture_data/imputation/engine/unit/manual_construction_output.csv
+++ b/tests/fixture_data/imputation/engine/unit/manual_construction_output.csv
@@ -2,4 +2,4 @@ identifier,date,group,output,marker,forward,backward,construction,count_forward,
 1234,202105,900,10,FIMC,1,1,1,0,0,0,true,true,true
 1235,202105,100,20,FIMC,1,1,26.08641975,0,0,1,true,true,false
 1236,202105,100,2113,R,1,1,26.08641975,0,0,1,true,true,false
-1237,202105,200,3189,MC,1,1,1,0,0,0,true,true,true
\ No newline at end of file
+1237,202105,200,3189,MC,1,1,1,0,0,0,true,true,true

From d532b4b28e46371af5f2939a37f54864395922fb Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Wed, 29 May 2024 10:01:15 +0100
Subject: [PATCH 515/531] typo

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 1500fde9..7acd3159 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -244,7 +244,7 @@ def impute(
     if manual_construction_col:
         input_params["manual_const"] = manual_construction_col
         fill_values_mc = {}
-        # These col values should be null for non-responder i.e MC.
+        # These cols value should be null for non-responder i.e MC.
         nonresponder_null_cols = [
             "growth_forward",
             "growth_backward",

From 5055fd4152b264586bc1df7912a7b67c95078ad4 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Thu, 30 May 2024 11:44:44 +0100
Subject: [PATCH 516/531] refactored: filter out the mc data just before the
 imputation stages so prevent redutant joins

---
 .../imputation/engine.py                      | 100 +++++-------------
 1 file changed, 28 insertions(+), 72 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 7acd3159..7977f702 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -243,17 +243,6 @@ def impute(
     # only if manual_construction_col is not None.
     if manual_construction_col:
         input_params["manual_const"] = manual_construction_col
-        fill_values_mc = {}
-        # These cols value should be null for non-responder i.e MC.
-        nonresponder_null_cols = [
-            "growth_forward",
-            "growth_backward",
-            "link_inclusion_current",
-            "link_inclusion_previous",
-            "link_inclusion_next",
-            "trim_inclusion_forward",
-            "trim_inclusion_backward",
-        ]
 
     if back_data_df:
         if not isinstance(back_data_df, DataFrame):
@@ -327,35 +316,6 @@ def impute(
     prior_period_df = prepared_df.selectExpr(
         "min(previous_period) AS prior_period"
     ).localCheckpoint(eager=False)
-    if manual_construction_col:
-        # Set manual construction value as output
-        # and set marker as MC
-        mc_df = prepared_df.withColumn(
-            "marker",
-            when(
-                (col("manual_const").isNotNull()) & (col("output").isNull()),
-                lit(Marker.MANUAL_CONSTRUCTION.value),
-            ).otherwise(col("marker")),
-        ).withColumn(
-            "output",
-            when(
-                (col("manual_const").isNotNull()) & (col("output").isNull()),
-                col("manual_const"),
-            ).otherwise(col("output")),
-        )
-
-        # Filter out MC data to prevent it from being used in link calculations.
-        # It maintains a gap in the imputation pattern,which prevents
-        # the FIR for the identifier but allows the BIR.
-        # This MC data will be merged with the main df before
-        # the forward_impute_from_manual_construction stage.
-        manual_construction_df = mc_df.filter(
-            (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
-        )
-        prepared_df = mc_df.filter(
-            col("marker").isNull()
-            | (~(col("marker") == Marker.MANUAL_CONSTRUCTION.value))
-        )
 
     if back_data_df:
         validated_back_data_df = validate_dataframe(
@@ -486,10 +446,6 @@ def calculate_ratios():
 
         prepared_df = prepared_df.fillna(fill_values)
 
-        if manual_construction_col:
-            nonlocal fill_values_mc
-            fill_values_mc = fill_values
-
         if link_filter:
             prepared_df = prepared_df.join(
                 ratio_calculation_df.select(
@@ -593,34 +549,6 @@ def calculate_weighted_link(link_name):
 
     calculate_ratios()
 
-    if manual_construction_col:
-        mc_cols = manual_construction_df.columns
-
-        # Get the required additional output columns
-        mc_additional_cols = []
-        for key in output_col_mapping.keys():
-            # nonresponder_null_cols will be populated with null value just before the
-            # stage forward_impute_from_manual_construction via unionByName
-            if (key not in mc_cols) and (key not in nonresponder_null_cols):
-                mc_additional_cols.append(key)
-
-        # populate link, count, default information
-        # for mc data
-        manual_construction_df = (
-            manual_construction_df.alias("mc")
-            .join(
-                prepared_df.dropDuplicates(["period", "grouping"]),
-                ["period", "grouping"],
-                "leftouter",
-            )
-            .select(
-                *(f"mc.{name}" for name in mc_cols),
-                *mc_additional_cols,
-            )
-        )
-        # Fill null additional columns value with default value.
-        manual_construction_df = manual_construction_df.fillna(fill_values_mc)
-
     # Caching for both imputed and unimputed data.
     imputed_df = None
     null_response_df = None
@@ -826,6 +754,34 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         return impute_helper(
             df, "forward", Marker.FORWARD_IMPUTE_FROM_CONSTRUCTION, True
         )
+    if manual_construction_col:
+        # Set manual construction value as output
+        # and marker as MC
+        mc_df = prepared_df.withColumn(
+            "marker",
+            when(
+                (col("manual_const").isNotNull()) & (col("output").isNull()),
+                lit(Marker.MANUAL_CONSTRUCTION.value),
+            ).otherwise(col("marker")),
+        ).withColumn(
+            "output",
+            when(
+                (col("manual_const").isNotNull()) & (col("output").isNull()),
+                col("manual_const"),
+            ).otherwise(col("output")),
+        )
+
+        # Filter out MC data so it miantain a gap in the imputation pattern,
+        # which prevents the FIR for the identifier expected to be FIMC
+        # but allows the BIR. This MC data will be merged with the main df
+        # before the forward_impute_from_manual_construction stage.
+        manual_construction_df = mc_df.filter(
+            (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
+        )
+        prepared_df = mc_df.filter(
+            col("marker").isNull()
+            | (~(col("marker") == Marker.MANUAL_CONSTRUCTION.value))
+        )
 
     df = prepared_df
     for stage in (

From 16f947b09449aea0b15db8e5ed8b2c5fc77cf15f Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Thu, 30 May 2024 11:49:39 +0100
Subject: [PATCH 517/531] fix black failures

---
 statistical_methods_library/imputation/engine.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 7977f702..92d0ca51 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -754,6 +754,7 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
         return impute_helper(
             df, "forward", Marker.FORWARD_IMPUTE_FROM_CONSTRUCTION, True
         )
+
     if manual_construction_col:
         # Set manual construction value as output
         # and marker as MC

From c507c74b4f1bd04fbb15b1961752c0efa8a8744a Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Thu, 30 May 2024 12:15:38 +0100
Subject: [PATCH 518/531] reword the comment

---
 statistical_methods_library/imputation/engine.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 92d0ca51..26c1b808 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -772,10 +772,10 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
             ).otherwise(col("output")),
         )
 
-        # Filter out MC data so it miantain a gap in the imputation pattern,
-        # which prevents the FIR for the identifier expected to be FIMC
-        # but allows the BIR. This MC data will be merged with the main df
-        # before the forward_impute_from_manual_construction stage.
+        # Filter out MC data, which leaves a gap in the imputation pattern for
+        # identifiers with MC values. As a result, it prevents the FIR from
+        # being issued against the targeted FIMC. This MC data will be merged with
+        # the main df prior to the forward_impute_from_manual_construction stage.
         manual_construction_df = mc_df.filter(
             (col("marker") == Marker.MANUAL_CONSTRUCTION.value)
         )

From 041090361b5e145c390465c25ff9dd5662679b1a Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Thu, 30 May 2024 13:05:53 +0100
Subject: [PATCH 519/531] update the method docu string with new mc parameter

---
 statistical_methods_library/imputation/engine.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 26c1b808..978caf3c 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -158,6 +158,8 @@ def impute(
         weight_periodicity_multiplier: Multiplied by the periodicity of the
           dataset to calculate the previous period when finding the previous
           links for weighting.
+        manual_construction_col: The name of the column containing the
+          construction value.
         ratio_calculator_params: Any extra keyword arguments to the engine are
           passed to the specified ratio calculators as keyword args and are
           otherwise ignored by this function. Please see the specified ratio

From 95f9183afec5460e8639c4f8c807d81028092a92 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Thu, 30 May 2024 13:11:54 +0100
Subject: [PATCH 520/531] rename imputation engine unittest

---
 tests/imputation/test_engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/imputation/test_engine.py b/tests/imputation/test_engine.py
index 5c6f2e7b..8d248477 100644
--- a/tests/imputation/test_engine.py
+++ b/tests/imputation/test_engine.py
@@ -425,7 +425,7 @@ def test_input_data_contains_nulls(fxt_load_test_csv, fxt_spark_session):
         impute(input_df=test_dataframe, **params)
 
 
-def test_back_data_mc_fimc_back_data(fxt_load_test_csv, fxt_spark_session):
+def test_back_data_mc_fimc(fxt_load_test_csv, fxt_spark_session):
     test_dataframe = fxt_load_test_csv(
         dataframe_columns,
         dataframe_types,

From 220ece63b0d9b461312b9d05ef445b21c9d66065 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Mon, 3 Jun 2024 09:46:32 +0100
Subject: [PATCH 521/531] reworded mc comment

---
 statistical_methods_library/imputation/engine.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 978caf3c..114084d2 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -774,8 +774,7 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
             ).otherwise(col("output")),
         )
 
-        # Filter out MC data, which leaves a gap in the imputation pattern for
-        # identifiers with MC values. As a result, it prevents the FIR from
+        # Filter out identifiers with MC values.So it prevents the FIR from
         # being issued against the targeted FIMC. This MC data will be merged with
         # the main df prior to the forward_impute_from_manual_construction stage.
         manual_construction_df = mc_df.filter(

From 679f5e1a688fa800574da662d5cd999bb0360fb6 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Mon, 3 Jun 2024 09:48:12 +0100
Subject: [PATCH 522/531] reworded mc comment

---
 statistical_methods_library/imputation/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/statistical_methods_library/imputation/engine.py b/statistical_methods_library/imputation/engine.py
index 114084d2..8131a919 100644
--- a/statistical_methods_library/imputation/engine.py
+++ b/statistical_methods_library/imputation/engine.py
@@ -774,7 +774,7 @@ def forward_impute_from_construction(df: DataFrame) -> DataFrame:
             ).otherwise(col("output")),
         )
 
-        # Filter out identifiers with MC values.So it prevents the FIR from
+        # Filter out identifiers with a MC value.So it prevents the FIR from
         # being issued against the targeted FIMC. This MC data will be merged with
         # the main df prior to the forward_impute_from_manual_construction stage.
         manual_construction_df = mc_df.filter(

From 8e073d9e7334d2a7c1e688b49a2556e9cf84bc5e Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 16 Jul 2024 11:01:36 +0100
Subject: [PATCH 523/531] fix release package naming discrepancy 13.3.0

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index c706f2d3..fda280ac 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "statistical_methods_library"
-version = "13.1.2"
+version = "13.3.0"
 description = ""
 authors = ["Your Name <you@example.com>"]
 license = "MIT"

From acfd32d4b3ea6a1bae8d439ca3c35a1a46e6af4a Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 16 Jul 2024 12:07:20 +0100
Subject: [PATCH 524/531] fix github action failures around actions-poetry

---
 .github/workflows/ci-checks.yaml   | 6 +++---
 .github/workflows/release-code.yml | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index ee27db68..669db159 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -29,7 +29,7 @@ jobs:
       - name: Run image ${{matrix.python-version}}
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.5.1
+          poetry-version: 1.8.3
       - name: Test ${{matrix.python-version}}
         run: |-
           set -e
@@ -63,7 +63,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.5.1
+          poetry-version: 1.8.3
       - name: Run flake8
         run: |-
           poetry install
@@ -84,7 +84,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.5.1
+          poetry-version: 1.8.3
       - name: Run Black
         run: |-
           poetry install
diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index 7cbf4aa8..4bd840c4 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -21,7 +21,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.5.1
+          poetry-version: 1.8.3
       - name: build
         run: poetry build
       - name: Create GitHub release

From f42ee29df67aef8131d0860f6ee163dca299339d Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 16 Jul 2024 12:16:19 +0100
Subject: [PATCH 525/531] fix github action failures around actions-poetry

---
 .github/workflows/ci-checks.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 669db159..5eb3b03e 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -29,7 +29,7 @@ jobs:
       - name: Run image ${{matrix.python-version}}
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.8.3
+          poetry-version: 1.2.1
       - name: Test ${{matrix.python-version}}
         run: |-
           set -e
@@ -63,7 +63,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.8.3
+          poetry-version: 1.2.1
       - name: Run flake8
         run: |-
           poetry install
@@ -84,7 +84,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.8.3
+          poetry-version: 1.2.1
       - name: Run Black
         run: |-
           poetry install

From 7bcd157b2e863c9b3c74cb1e031911603b5a5ad1 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 16 Jul 2024 12:20:32 +0100
Subject: [PATCH 526/531] fix github action failures around actions-poetry

---
 .github/workflows/ci-checks.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 5eb3b03e..627584e7 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -14,6 +14,7 @@ jobs:
       max-parallel: 4
       matrix:
         python-version: ['3.7', '3.8', '3.9', '3.10']
+        poetry-version: ["1.2.2", "1.7.1"]
         java-version: ['8']
       fail-fast: false 
     steps:
@@ -29,7 +30,7 @@ jobs:
       - name: Run image ${{matrix.python-version}}
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.2.1
+          poetry-version: ${{ matrix.poetry-version }}
       - name: Test ${{matrix.python-version}}
         run: |-
           set -e
@@ -63,7 +64,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.2.1
+          poetry-version: ${{ matrix.poetry-version }}
       - name: Run flake8
         run: |-
           poetry install
@@ -84,7 +85,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.2.1
+          poetry-version: ${{ matrix.poetry-version }}
       - name: Run Black
         run: |-
           poetry install

From 5b4ccdb37ea67458bf241046821bddcdd1180794 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 16 Jul 2024 12:37:08 +0100
Subject: [PATCH 527/531] fix github action failures around actions-poetry

---
 .github/workflows/ci-checks.yaml | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index 627584e7..ee27db68 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -14,7 +14,6 @@ jobs:
       max-parallel: 4
       matrix:
         python-version: ['3.7', '3.8', '3.9', '3.10']
-        poetry-version: ["1.2.2", "1.7.1"]
         java-version: ['8']
       fail-fast: false 
     steps:
@@ -30,7 +29,7 @@ jobs:
       - name: Run image ${{matrix.python-version}}
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: ${{ matrix.poetry-version }}
+          poetry-version: 1.5.1
       - name: Test ${{matrix.python-version}}
         run: |-
           set -e
@@ -64,7 +63,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: ${{ matrix.poetry-version }}
+          poetry-version: 1.5.1
       - name: Run flake8
         run: |-
           poetry install
@@ -85,7 +84,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: ${{ matrix.poetry-version }}
+          poetry-version: 1.5.1
       - name: Run Black
         run: |-
           poetry install

From 313b2f845b728776b332bcedee913494a4c7bdad Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 16 Jul 2024 13:05:59 +0100
Subject: [PATCH 528/531] fix github action failures around actions-poetry

---
 .github/workflows/ci-checks.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ci-checks.yaml b/.github/workflows/ci-checks.yaml
index ee27db68..b28ee71d 100644
--- a/.github/workflows/ci-checks.yaml
+++ b/.github/workflows/ci-checks.yaml
@@ -27,7 +27,7 @@ jobs:
           distribution: 'adopt'
           java-version: ${{ matrix.java-version }}
       - name: Run image ${{matrix.python-version}}
-        uses: abatilo/actions-poetry@v3.0.0
+        uses: abatilo/actions-poetry@v2.4.0
         with:
           poetry-version: 1.5.1
       - name: Test ${{matrix.python-version}}
@@ -61,7 +61,7 @@ jobs:
         with:
           python-version: ${{ matrix.python-version }}
       - name: Run image
-        uses: abatilo/actions-poetry@v3.0.0
+        uses: abatilo/actions-poetry@v2.4.0
         with:
           poetry-version: 1.5.1
       - name: Run flake8
@@ -82,7 +82,7 @@ jobs:
         with:
           python-version: ${{ matrix.python-version }}
       - name: Run image
-        uses: abatilo/actions-poetry@v3.0.0
+        uses: abatilo/actions-poetry@v2.4.0
         with:
           poetry-version: 1.5.1
       - name: Run Black

From 97f8d19048d90a5feb8b68cfeea12f6245feb283 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 16 Jul 2024 13:37:42 +0100
Subject: [PATCH 529/531] ignore update on github action abatilo/actions-poetry
 as it stopped supporting python 3.7

---
 .github/dependabot.yml             | 2 ++
 .github/workflows/release-code.yml | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 0a331f85..f6b2bf80 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -10,3 +10,5 @@ updates:
     directory: "/"
     schedule:
       interval: "daily"
+    ignore:
+      - dependency-name: abatilo/actions-poetry
diff --git a/.github/workflows/release-code.yml b/.github/workflows/release-code.yml
index 4bd840c4..7cbf4aa8 100644
--- a/.github/workflows/release-code.yml
+++ b/.github/workflows/release-code.yml
@@ -21,7 +21,7 @@ jobs:
       - name: Run image
         uses: abatilo/actions-poetry@v3.0.0
         with:
-          poetry-version: 1.8.3
+          poetry-version: 1.5.1
       - name: build
         run: poetry build
       - name: Create GitHub release

From 8978e3fb61393a474df5f2f5368a1b6522adc564 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 16 Jul 2024 14:49:59 +0100
Subject: [PATCH 530/531] add release note for 13.3.0

---
 release-notes/13.3.0.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 release-notes/13.3.0.md

diff --git a/release-notes/13.3.0.md b/release-notes/13.3.0.md
new file mode 100644
index 00000000..32f92007
--- /dev/null
+++ b/release-notes/13.3.0.md
@@ -0,0 +1,17 @@
+# Statistical Methods Library 13.3.0
+
+Release date: 2025-07-16
+
+## Synopsis
+
+This release imputation method accepts and appropriately handles cases where a value has been overridden by manual intervention or manual construction.
+
+## Changes
+
+The imputation method now has an optional imputation parameter named "manual_construction_col." When this argument is given together with the relevant column in the "input_df" dataframe, the method performs the manual construction and forwards imputes from manual construction for the nonresponder.
+
+
+## Notes
+
+When the manual construction is applied, the output will have the markers MC or FIMC.
+This change has no impact on the link calculation.
\ No newline at end of file

From ef2277be5dc04bad354c3921c9a86c36fcb16209 Mon Sep 17 00:00:00 2001
From: vidhyamanisankar <vidhya4.shekar@gmail.com>
Date: Tue, 16 Jul 2024 14:59:54 +0100
Subject: [PATCH 531/531] add release note for 13.3.0 review comments

---
 release-notes/13.3.0.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/release-notes/13.3.0.md b/release-notes/13.3.0.md
index 32f92007..d039440e 100644
--- a/release-notes/13.3.0.md
+++ b/release-notes/13.3.0.md
@@ -8,10 +8,10 @@ This release imputation method accepts and appropriately handles cases where a v
 
 ## Changes
 
-The imputation method now has an optional imputation parameter named "manual_construction_col." When this argument is given together with the relevant column in the "input_df" dataframe, the method performs the manual construction and forwards imputes from manual construction for the nonresponder.
+The imputation method now has an optional imputation parameter named "manual_construction_col." When this argument is given together with the relevant column in the "input_df" dataframe, the method performs the manual construction and forwards imputes from manual construction for non-responders.
 
 
 ## Notes
 
-When the manual construction is applied, the output will have the markers MC or FIMC.
+When manual construction or forward imputation from manual construction is applied, the output will have the markers MC or FIMC.
 This change has no impact on the link calculation.
\ No newline at end of file